straumur-web-component 0.5.7 → 0.5.8-alpha.1
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.js +10 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
"use strict";var StraumurWeb=(()=>{var Qo=Object.defineProperty;var Yc=Object.getOwnPropertyDescriptor;var jc=Object.getOwnPropertyNames;var $c=Object.prototype.hasOwnProperty;var zc=(t,e)=>{for(var r in e)Qo(t,r,{get:e[r],enumerable:!0})},Gc=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of jc(e))!$c.call(t,s)&&s!==r&&Qo(t,s,{get:()=>e[s],enumerable:!(o=Yc(e,s))||o.enumerable});return t};var Kc=t=>Gc(Qo({},"__esModule",{value:!0}),t);var _p={};zc(_p,{StraumurCheckout:()=>Hc});var jr,Y,fn,Wc,Ct,un,_n,yn,gn,os,es,ts,vn,cr={},Cn=[],Zc=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,$r=Array.isArray;function $e(t,e){for(var r in e)t[r]=e[r];return t}function ss(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function a(t,e,r){var o,s,n,i={};for(n in e)n=="key"?o=e[n]:n=="ref"?s=e[n]:i[n]=e[n];if(arguments.length>2&&(i.children=arguments.length>3?jr.call(arguments,2):r),typeof t=="function"&&t.defaultProps!=null)for(n in t.defaultProps)i[n]==null&&(i[n]=t.defaultProps[n]);return Vr(t,i,o,s,null)}function Vr(t,e,r,o,s){var n={type:t,props:e,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:s??++fn,__i:-1,__u:0};return s==null&&Y.vnode!=null&&Y.vnode(n),n}function le(t){return t.children}function Hr(t,e){this.props=t,this.context=e}function Lt(t,e){if(e==null)return t.__?Lt(t.__,t.__i+1):null;for(var r;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null)return r.__e;return typeof t.type=="function"?Lt(t):null}function En(t){var e,r;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null){t.__e=t.__c.base=r.__e;break}return En(t)}}function rs(t){(!t.__d&&(t.__d=!0)&&Ct.push(t)&&!Yr.__r++||un!=Y.debounceRendering)&&((un=Y.debounceRendering)||_n)(Yr)}function Yr(){for(var t,e,r,o,s,n,i,c=1;Ct.length;)Ct.length>c&&Ct.sort(yn),t=Ct.shift(),c=Ct.length,t.__d&&(r=void 0,s=(o=(e=t).__v).__e,n=[],i=[],e.__P&&((r=$e({},o)).__v=o.__v+1,Y.vnode&&Y.vnode(r),ns(e.__P,r,o,e.__n,e.__P.namespaceURI,32&o.__u?[s]:null,n,s??Lt(o),!!(32&o.__u),i),r.__v=o.__v,r.__.__k[r.__i]=r,Rn(n,r,i),r.__e!=s&&En(r)));Yr.__r=0}function bn(t,e,r,o,s,n,i,c,d,p,u){var l,h,m,y,E,C,_=o&&o.__k||Cn,g=e.length;for(d=qc(r,e,_,d,g),l=0;l<g;l++)(m=r.__k[l])!=null&&(h=m.__i==-1?cr:_[m.__i]||cr,m.__i=l,C=ns(t,m,h,s,n,i,c,d,p,u),y=m.__e,m.ref&&h.ref!=m.ref&&(h.ref&&as(h.ref,null,m),u.push(m.ref,m.__c||y,m)),E==null&&y!=null&&(E=y),4&m.__u||h.__k===m.__k?d=Sn(m,d,t):typeof m.type=="function"&&C!==void 0?d=C:y&&(d=y.nextSibling),m.__u&=-7);return r.__e=E,d}function qc(t,e,r,o,s){var n,i,c,d,p,u=r.length,l=u,h=0;for(t.__k=new Array(s),n=0;n<s;n++)(i=e[n])!=null&&typeof i!="boolean"&&typeof i!="function"?(d=n+h,(i=t.__k[n]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?Vr(null,i,null,null,null):$r(i)?Vr(le,{children:i},null,null,null):i.constructor==null&&i.__b>0?Vr(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=t,i.__b=t.__b+1,c=null,(p=i.__i=Xc(i,r,d,l))!=-1&&(l--,(c=r[p])&&(c.__u|=2)),c==null||c.__v==null?(p==-1&&(s>u?h--:s<u&&h++),typeof i.type!="function"&&(i.__u|=4)):p!=d&&(p==d-1?h--:p==d+1?h++:(p>d?h--:h++,i.__u|=4))):t.__k[n]=null;if(l)for(n=0;n<u;n++)(c=r[n])!=null&&(2&c.__u)==0&&(c.__e==o&&(o=Lt(c)),Tn(c,c));return o}function Sn(t,e,r){var o,s;if(typeof t.type=="function"){for(o=t.__k,s=0;o&&s<o.length;s++)o[s]&&(o[s].__=t,e=Sn(o[s],e,r));return e}t.__e!=e&&(e&&t.type&&!r.contains(e)&&(e=Lt(t)),r.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Xc(t,e,r,o){var s,n,i=t.key,c=t.type,d=e[r];if(d===null&&t.key==null||d&&i==d.key&&c==d.type&&(2&d.__u)==0)return r;if(o>(d!=null&&(2&d.__u)==0?1:0))for(s=r-1,n=r+1;s>=0||n<e.length;){if(s>=0){if((d=e[s])&&(2&d.__u)==0&&i==d.key&&c==d.type)return s;s--}if(n<e.length){if((d=e[n])&&(2&d.__u)==0&&i==d.key&&c==d.type)return n;n++}}return-1}function mn(t,e,r){e[0]=="-"?t.setProperty(e,r??""):t[e]=r==null?"":typeof r!="number"||Zc.test(e)?r:r+"px"}function Br(t,e,r,o,s){var n;e:if(e=="style")if(typeof r=="string")t.style.cssText=r;else{if(typeof o=="string"&&(t.style.cssText=o=""),o)for(e in o)r&&e in r||mn(t.style,e,"");if(r)for(e in r)o&&r[e]==o[e]||mn(t.style,e,r[e])}else if(e[0]=="o"&&e[1]=="n")n=e!=(e=e.replace(gn,"$1")),e=e.toLowerCase()in t||e=="onFocusOut"||e=="onFocusIn"?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+n]=r,r?o?r.u=o.u:(r.u=os,t.addEventListener(e,n?ts:es,n)):t.removeEventListener(e,n?ts:es,n);else{if(s=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&r==1?"":r))}}function hn(t){return function(e){if(this.l){var r=this.l[e.type+t];if(e.t==null)e.t=os++;else if(e.t<r.u)return;return r(Y.event?Y.event(e):e)}}}function ns(t,e,r,o,s,n,i,c,d,p){var u,l,h,m,y,E,C,_,g,O,N,b,P,L,H,U,F,M=e.type;if(e.constructor!=null)return null;128&r.__u&&(d=!!(32&r.__u),n=[c=e.__e=r.__e]),(u=Y.__b)&&u(e);e:if(typeof M=="function")try{if(_=e.props,g="prototype"in M&&M.prototype.render,O=(u=M.contextType)&&o[u.__c],N=u?O?O.props.value:u.__:o,r.__c?C=(l=e.__c=r.__c).__=l.__E:(g?e.__c=l=new M(_,N):(e.__c=l=new Hr(_,N),l.constructor=M,l.render=Qc),O&&O.sub(l),l.props=_,l.state||(l.state={}),l.context=N,l.__n=o,h=l.__d=!0,l.__h=[],l._sb=[]),g&&l.__s==null&&(l.__s=l.state),g&&M.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=$e({},l.__s)),$e(l.__s,M.getDerivedStateFromProps(_,l.__s))),m=l.props,y=l.state,l.__v=e,h)g&&M.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),g&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(g&&M.getDerivedStateFromProps==null&&_!==m&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(_,N),!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(_,l.__s,N)===!1||e.__v==r.__v){for(e.__v!=r.__v&&(l.props=_,l.state=l.__s,l.__d=!1),e.__e=r.__e,e.__k=r.__k,e.__k.some(function(ie){ie&&(ie.__=e)}),b=0;b<l._sb.length;b++)l.__h.push(l._sb[b]);l._sb=[],l.__h.length&&i.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(_,l.__s,N),g&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(m,y,E)})}if(l.context=N,l.props=_,l.__P=t,l.__e=!1,P=Y.__r,L=0,g){for(l.state=l.__s,l.__d=!1,P&&P(e),u=l.render(l.props,l.state,l.context),H=0;H<l._sb.length;H++)l.__h.push(l._sb[H]);l._sb=[]}else do l.__d=!1,P&&P(e),u=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++L<25);l.state=l.__s,l.getChildContext!=null&&(o=$e($e({},o),l.getChildContext())),g&&!h&&l.getSnapshotBeforeUpdate!=null&&(E=l.getSnapshotBeforeUpdate(m,y)),U=u,u!=null&&u.type===le&&u.key==null&&(U=Pn(u.props.children)),c=bn(t,$r(U)?U:[U],e,r,o,s,n,i,c,d,p),l.base=e.__e,e.__u&=-161,l.__h.length&&i.push(l),C&&(l.__E=l.__=null)}catch(ie){if(e.__v=null,d||n!=null)if(ie.then){for(e.__u|=d?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;n[n.indexOf(c)]=null,e.__e=c}else for(F=n.length;F--;)ss(n[F]);else e.__e=r.__e,e.__k=r.__k;Y.__e(ie,e,r)}else n==null&&e.__v==r.__v?(e.__k=r.__k,e.__e=r.__e):c=e.__e=Jc(r.__e,e,r,o,s,n,i,d,p);return(u=Y.diffed)&&u(e),128&e.__u?void 0:c}function Rn(t,e,r){for(var o=0;o<r.length;o++)as(r[o],r[++o],r[++o]);Y.__c&&Y.__c(e,t),t.some(function(s){try{t=s.__h,s.__h=[],t.some(function(n){n.call(s)})}catch(n){Y.__e(n,s.__v)}})}function Pn(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:$r(t)?t.map(Pn):$e({},t)}function Jc(t,e,r,o,s,n,i,c,d){var p,u,l,h,m,y,E,C=r.props,_=e.props,g=e.type;if(g=="svg"?s="http://www.w3.org/2000/svg":g=="math"?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),n!=null){for(p=0;p<n.length;p++)if((m=n[p])&&"setAttribute"in m==!!g&&(g?m.localName==g:m.nodeType==3)){t=m,n[p]=null;break}}if(t==null){if(g==null)return document.createTextNode(_);t=document.createElementNS(s,g,_.is&&_),c&&(Y.__m&&Y.__m(e,n),c=!1),n=null}if(g==null)C===_||c&&t.data==_||(t.data=_);else{if(n=n&&jr.call(t.childNodes),C=r.props||cr,!c&&n!=null)for(C={},p=0;p<t.attributes.length;p++)C[(m=t.attributes[p]).name]=m.value;for(p in C)if(m=C[p],p!="children"){if(p=="dangerouslySetInnerHTML")l=m;else if(!(p in _)){if(p=="value"&&"defaultValue"in _||p=="checked"&&"defaultChecked"in _)continue;Br(t,p,null,m,s)}}for(p in _)m=_[p],p=="children"?h=m:p=="dangerouslySetInnerHTML"?u=m:p=="value"?y=m:p=="checked"?E=m:c&&typeof m!="function"||C[p]===m||Br(t,p,m,C[p],s);if(u)c||l&&(u.__html==l.__html||u.__html==t.innerHTML)||(t.innerHTML=u.__html),e.__k=[];else if(l&&(t.innerHTML=""),bn(e.type=="template"?t.content:t,$r(h)?h:[h],e,r,o,g=="foreignObject"?"http://www.w3.org/1999/xhtml":s,n,i,n?n[0]:r.__k&&Lt(r,0),c,d),n!=null)for(p=n.length;p--;)ss(n[p]);c||(p="value",g=="progress"&&y==null?t.removeAttribute("value"):y!=null&&(y!==t[p]||g=="progress"&&!y||g=="option"&&y!=C[p])&&Br(t,p,y,C[p],s),p="checked",E!=null&&E!=t[p]&&Br(t,p,E,C[p],s))}return t}function as(t,e,r){try{if(typeof t=="function"){var o=typeof t.__u=="function";o&&t.__u(),o&&e==null||(t.__u=t(e))}else t.current=e}catch(s){Y.__e(s,r)}}function Tn(t,e,r){var o,s;if(Y.unmount&&Y.unmount(t),(o=t.ref)&&(o.current&&o.current!=t.__e||as(o,null,e)),(o=t.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(n){Y.__e(n,e)}o.base=o.__P=null}if(o=t.__k)for(s=0;s<o.length;s++)o[s]&&Tn(o[s],e,r||typeof t.type!="function");r||ss(t.__e),t.__c=t.__=t.__e=void 0}function Qc(t,e,r){return this.constructor(t,r)}function Ut(t,e,r){var o,s,n,i;e==document&&(e=document.documentElement),Y.__&&Y.__(t,e),s=(o=typeof r=="function")?null:r&&r.__k||e.__k,n=[],i=[],ns(e,t=(!o&&r||e).__k=a(le,null,[t]),s||cr,cr,e.namespaceURI,!o&&r?[r]:s?null:e.firstChild?jr.call(e.childNodes):null,n,!o&&r?r:s?s.__e:e.firstChild,o,i),Rn(n,t,i)}function An(t){function e(r){var o,s;return this.getChildContext||(o=new Set,(s={})[e.__c]=this,this.getChildContext=function(){return s},this.componentWillUnmount=function(){o=null},this.shouldComponentUpdate=function(n){this.props.value!=n.value&&o.forEach(function(i){i.__e=!0,rs(i)})},this.sub=function(n){o.add(n);var i=n.componentWillUnmount;n.componentWillUnmount=function(){o&&o.delete(n),i&&i.call(n)}}),r.children}return e.__c="__cC"+vn++,e.__=t,e.Provider=e.__l=(e.Consumer=function(r,o){return r.children(o)}).contextType=e,e}jr=Cn.slice,Y={__e:function(t,e,r,o){for(var s,n,i;e=e.__;)if((s=e.__c)&&!s.__)try{if((n=s.constructor)&&n.getDerivedStateFromError!=null&&(s.setState(n.getDerivedStateFromError(t)),i=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(t,o||{}),i=s.__d),i)return s.__E=s}catch(c){t=c}throw t}},fn=0,Wc=function(t){return t!=null&&t.constructor==null},Hr.prototype.setState=function(t,e){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=$e({},this.state),typeof t=="function"&&(t=t($e({},r),this.props)),t&&$e(r,t),t!=null&&this.__v&&(e&&this._sb.push(e),rs(this))},Hr.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),rs(this))},Hr.prototype.render=le,Ct=[],_n=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,yn=function(t,e){return t.__v.__b-e.__v.__b},Yr.__r=0,gn=/(PointerCapture)$|Capture$/i,os=0,es=hn(!1),ts=hn(!0),vn=0;function ce(t,{insertAt:e}={}){if(!t||typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",e==="top"&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}ce(`:root{--straumur__color-primary: #002649;--straumur__color-secondary: #72889d;--straumur__color-secondary-gamma: #eef0f2;--straumur__color-blue-beta: #bce6f3;--straumur__color-blue-gamma: #eff8fa;--straumur__color-red-beta: #d96666;--straumur__color-red-gamma: #fff8f5;--straumur__color-gray-epsilon: #e7e7e7;--straumur__color-cosmos-blue-delta: #cdd8e2;--straumur__color-cosmos-blue-gamma: #e6ebef;--straumur__color-white: #ffffff;--straumur__color-transparent: transparent;--straumur__border-radius-xxs: 4px;--straumur__border-radius-xs: 6px;--straumur__border-radius-s: 8px;--straumur__border-radius-md: 10px;--straumur__border-radius-lg: 12px;--straumur__border-radius-xlg: 14px;--straumur__border-radius-xxlg: 16px;--straumur__space-xxs: 4px;--straumur__space-xs: 6px;--straumur__space-s: 8px;--straumur__space-md: 10px;--straumur__space-lg: 12px;--straumur__space-xlg: 14px;--straumur__space-xxlg: 16px;--straumur__space-3xlg: 18px;--straumur__space-4xlg: 20px;--straumur__space-5xlg: 24px;--straumur__space-6xlg: 32px;--straumur__space-7xlg: 40px;--straumur__space-8xlg: 48px;--apple-pay-button-width: 100%;--apple-pay-button-height: 48px;--apple-pay-button-border-radius: 4px}.straumur__root-component{font-family:AkzidenzGroteskPro,sans-serif;max-width:440px;min-width:320px}.straumur__component *{font-family:inherit}.straumur__render-brand-icons__overflow{color:#72889d}.straumur__component{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:300px;background-color:var(--straumur__color-white);border-radius:var(--straumur__border-radius-xxlg)}.js-iframe{border:none;color-scheme:auto;height:100%;overflow:hidden;width:100%}.adyen-checkout__threeds2__challenge.adyen-checkout__threeds2__challenge--05{background-color:transparent;display:block;height:inherit;min-height:400px;overflow:hidden;position:relative;width:100%}
|
|
2
|
-
`);var ed=()=>({STAGING_BASE_URL:"https://checkout-api.staging.straumur.is/api/v1/embeddedcheckout",PRODUCTION_BASE_URL:"https://greidslugatt.straumur.is/api/v1/embeddedcheckout",GET_PAYMENT_METHODS_URL:"payment-methods",POST_PAYMENT_URL:"payment",POST_DETAILS_URL:"details",POST_DISABLE_TOKEN_URL:"disable-token"}),Et=ed();function zr(t){switch(t){case"test":return Et.STAGING_BASE_URL;case"live":return Et.PRODUCTION_BASE_URL;default:throw new Error(`Unknown environment: ${t}`)}}function Dn(t,e){return fetch(`${zr(t)}/${Et.GET_PAYMENT_METHODS_URL}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}function Qe(t,e){return fetch(`${zr(t)}/${Et.POST_PAYMENT_URL}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}function Fe(t,e){return fetch(`${zr(t)}/${Et.POST_DETAILS_URL}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}function In(t,e){return fetch(`${zr(t)}/${Et.POST_DISABLE_TOKEN_URL}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function is(t,e){try{let r=await Dn(t,{sessionId:e});if(!r.ok){let s=r.headers.get("content-type"),n="error.failedToInitializePaymentMethods";return s&&s.includes("application/json")&&(n=(await r.json()).errorMessage),{resultCode:"Error",error:n}}return{resultCode:"Success",...await r.json()}}catch{return{resultCode:"Error",error:"error.failedToInitializePaymentMethods"}}}var Bt,q,ls,xn,Kr=0,Un=[],re=Y,wn=re.__b,kn=re.__r,Nn=re.diffed,On=re.__c,Fn=re.unmount,Mn=re.__;function Wr(t,e){re.__h&&re.__h(q,t,Kr||e),Kr=0;var r=q.__H||(q.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function z(t){return Kr=1,td(Hn,t)}function td(t,e,r){var o=Wr(Bt++,2);if(o.t=t,!o.__c&&(o.__=[r?r(e):Hn(void 0,e),function(c){var d=o.__N?o.__N[0]:o.__[0],p=o.t(d,c);d!==p&&(o.__N=[p,o.__[1]],o.__c.setState({}))}],o.__c=q,!q.__f)){var s=function(c,d,p){if(!o.__c.__H)return!0;var u=o.__c.__H.__.filter(function(h){return!!h.__c});if(u.every(function(h){return!h.__N}))return!n||n.call(this,c,d,p);var l=o.__c.props!==c;return u.forEach(function(h){if(h.__N){var m=h.__[0];h.__=h.__N,h.__N=void 0,m!==h.__[0]&&(l=!0)}}),n&&n.call(this,c,d,p)||l};q.__f=!0;var n=q.shouldComponentUpdate,i=q.componentWillUpdate;q.componentWillUpdate=function(c,d,p){if(this.__e){var u=n;n=void 0,s(c,d,p),n=u}i&&i.call(this,c,d,p)},q.shouldComponentUpdate=s}return o.__N||o.__}function pe(t,e){var r=Wr(Bt++,3);!re.__s&&Vn(r.__H,e)&&(r.__=t,r.u=e,q.__H.__h.push(r))}function ne(t){return Kr=5,rd(function(){return{current:t}},[])}function rd(t,e){var r=Wr(Bt++,7);return Vn(r.__H,e)&&(r.__=t(),r.__H=e,r.__h=t),r.__}function Bn(t){var e=q.context[t.__c],r=Wr(Bt++,9);return r.c=t,e?(r.__==null&&(r.__=!0,e.sub(q)),e.props.value):t.__}function od(){for(var t;t=Un.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Gr),t.__H.__h.forEach(cs),t.__H.__h=[]}catch(e){t.__H.__h=[],re.__e(e,t.__v)}}re.__b=function(t){q=null,wn&&wn(t)},re.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Mn&&Mn(t,e)},re.__r=function(t){kn&&kn(t),Bt=0;var e=(q=t.__c).__H;e&&(ls===q?(e.__h=[],q.__h=[],e.__.forEach(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(e.__h.forEach(Gr),e.__h.forEach(cs),e.__h=[],Bt=0)),ls=q},re.diffed=function(t){Nn&&Nn(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Un.push(e)!==1&&xn===re.requestAnimationFrame||((xn=re.requestAnimationFrame)||sd)(od)),e.__H.__.forEach(function(r){r.u&&(r.__H=r.u),r.u=void 0})),ls=q=null},re.__c=function(t,e){e.some(function(r){try{r.__h.forEach(Gr),r.__h=r.__h.filter(function(o){return!o.__||cs(o)})}catch(o){e.some(function(s){s.__h&&(s.__h=[])}),e=[],re.__e(o,r.__v)}}),On&&On(t,e)},re.unmount=function(t){Fn&&Fn(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.forEach(function(o){try{Gr(o)}catch(s){e=s}}),r.__H=void 0,e&&re.__e(e,r.__v))};var Ln=typeof requestAnimationFrame=="function";function sd(t){var e,r=function(){clearTimeout(o),Ln&&cancelAnimationFrame(e),setTimeout(t)},o=setTimeout(r,100);Ln&&(e=requestAnimationFrame(r))}function Gr(t){var e=q,r=t.__c;typeof r=="function"&&(t.__c=void 0,r()),q=e}function cs(t){var e=q;t.__c=t.__(),q=e}function Vn(t,e){return!t||t.length!==e.length||e.some(function(r,o){return r!==t[o]})}function Hn(t,e){return typeof e=="function"?e(t):e}ce(`.straumur__card-component{position:relative;cursor:pointer;background:var(--straumur__color-white);border-radius:var(--straumur__border-radius-lg);transition:all .3s ease;padding:var(--straumur__space-xxlg) var(--straumur__space-5xlg)}.straumur__card-component__radio-selector{position:absolute;opacity:0;cursor:pointer}.straumur__card-component__content{display:grid;grid-template-columns:26px 40px auto 1fr;align-items:center;gap:var(--straumur__space-lg);transition:background-color .3s ease}.straumur__card-component__radio-selector:checked+.straumur__card-component__content{padding-bottom:var(--straumur__space-xxlg)}.straumur__card-component--circle{width:var(--straumur__space-5xlg);height:var(--straumur__space-5xlg);border:1px solid var(--straumur__color-cosmos-blue-gamma);background:var(--straumur__color-secondary-gamma);border-radius:50%;position:relative;transition:all .3s ease}.straumur__card-component__content:hover .straumur__card-component--circle{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__card-component--circle:after{content:"";position:absolute;width:100%;height:100%;border-radius:50%;top:50%;left:50%;transform:translate(-50%,-50%) scale(0);transition:transform .2s ease}.straumur__card-component__radio-selector:checked+.straumur__card-component__content .straumur__card-component--circle{background:var(--straumur__color-blue-beta);border-color:var(--straumur__color-transparent)}.straumur__card-component__radio-selector:checked+.straumur__card-component__content .straumur__card-component--circle:after{transform:translate(-50%,-50%) scale(1);background:var(--straumur__color-primary);height:var(--straumur__space-md);width:var(--straumur__space-md)}.straumur__card-component--text{color:#213547;font-size:1rem;user-select:none}.straumur__card-component--brands{display:flex;margin-left:auto;align-items:center;gap:var(--straumur__space-xxs)}.straumur__card-component__expandable{background:var(--straumur__color-white);max-height:0;overflow:hidden;transition:all .3s ease;opacity:0}.straumur__card-component__loading-text{display:flex;justify-content:center}.straumur__card-component__radio-selector:checked~.straumur__card-component__expandable{max-height:600px;opacity:1}.straumur__card-component__form{display:flex;padding-top:var(--straumur__space-xxlg);flex-direction:column;gap:var(--straumur__space-5xlg)}.straumur__card-component__form--wrapper{display:flex;flex-direction:column;justify-items:start;position:relative;width:100%}.straumur__card-component__form--wrapper--error{color:var(--straumur__color-red-beta);font-size:12px}.straumur__card-component__form--wrapper--label{transform:translate(var(--straumur__space-md)) translateY(-50%);z-index:1;background:linear-gradient(to top,var(--straumur__color-secondary-gamma) 53%,var(--straumur__color-transparent) 50%);position:absolute;font-weight:500;font-size:14px;padding:0 var(--straumur__space-xxs)}.straumur__card-component__form--wrapper--label--error{color:var(--straumur__color-red-beta);background:linear-gradient(to top,var(--straumur__color-red-gamma) 53%,var(--straumur__color-transparent) 50%)}.straumur__card-component__form--wrapper--label--info{position:absolute;top:33%;right:var(--straumur__space-md)}.straumur__card-component__form--wrapper--input{background:var(--straumur__color-secondary-gamma);color:#00112c;display:block;font-family:inherit;border:1px solid var(--straumur__color-transparent);border-radius:var(--straumur__border-radius-s);font-size:1rem;height:48px;outline:none;padding-left:var(--straumur__space-lg);transition:border .2s ease-out,box-shadow .2s ease-out}.straumur__card-component__form--wrapper--input:hover{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__card-component__form--wrapper--input--error{background:var(--straumur__color-red-gamma);border:1px solid var(--straumur__color-red-beta)}.straumur__card-component__form--wrapper--input--error:hover{border:1px solid var(--straumur__color-red-beta)}.straumur__card-component__form--field-wrapper{display:flex;width:100%;gap:var(--straumur__space-5xlg)}.straumur__card-component__submit-button{background:var(--straumur__color-primary);border:none;border-radius:var(--straumur__border-radius-s);color:var(--straumur__color-white);cursor:pointer;font-size:1rem;height:40px;outline:none;padding:0 var(--straumur__space-xxlg);transition:background .2s ease-out;width:100%}.straumur__card-component__submit-button:hover{background:var(--straumur__color-primary);border:1px solid #dbdee2}.straumur__card-component__submit-button:disabled{background:#72889d;border:1px solid #dbdee2;cursor:not-allowed}.straumur__card-component__form--wrapper--label-checkbox{height:38px;display:flex;align-items:center;padding:8px;gap:var(--straumur__space-s);border-radius:var(--straumur__border-radius-s);cursor:pointer;user-select:none;transition:background-color .25s ease-in-out}.straumur__card-component__form--wrapper--label-checkbox:hover{background-color:var(--straumur__color-blue-gamma)}.straumur__card-component__form--wrapper--label-checkbox:hover .straumur__card-component__form--wrapper--label-checkbox--checkmark{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__card-component__form--wrapper--label-checkbox--checkmark{height:var(--straumur__space-5xlg);width:var(--straumur__space-5xlg);background-color:var(--straumur__color-secondary-gamma);border-radius:var(--straumur__border-radius-xxs);flex-shrink:0;border:1px solid var(--straumur__color-transparent);transition:all .2s ease-in}.straumur__card-component__form--wrapper--label-checkbox:hover .straumur__card-component__form--wrapper--label-checkbox--checkmark.straumur__card-component__form--wrapper--label-checkbox--checkmark--checked{border:1px solid var(--straumur__color-transparent)}.straumur__card-component__form--wrapper--label-checkbox--checkmark--checked{background-color:var(--straumur__color-blue-beta)}.straumur__card-component__form--wrapper--label-checkbox--checkmark--icon{height:100%;display:flex;justify-content:center;align-items:center;font-size:9px;opacity:0;visibility:hidden;transition:all .2s ease-in}.straumur__card-component__form--wrapper--label-checkbox--checkmark--icon--checked{opacity:1;visibility:visible}.straumur__card-component__form--wrapper--label-checkbox--checkbox{display:none}.js-iframe{border:none;color-scheme:auto;height:100%;overflow:hidden;width:100%}
|
|
3
|
-
`);var Yn=An(void 0),nd={card:!1,storedcard:!1,googlepay:!1,applepay:!1},jn=({children:t,initialValue:e})=>{let[r,o]=z(e),[s,n]=z(null),[i,c]=z(!1),[d,p]=z(nd),[u,l]=z({}),[h,m]=z(null),[y,E]=z(null),C=(N,b)=>{p(P=>({...P,[N]:b}))},_=(N,b)=>{l(P=>({...P,[N]:b}))},g=N=>{E(N)},O=N=>{m(N)};return a(Yn.Provider,{value:{activePaymentMethod:r,setActivePaymentMethod:o,activeStoredPaymentMethodId:s,setActiveStoredPaymentMethodId:n,isPaymentMethodInitialized:d,updatePaymentMethodInitialization:C,isStoredCardInitialized:u,updateStoredCardInitialization:_,handleSuccess:O,success:h,handleError:g,error:y,threeDSecureActive:i,setThreeDSecureActive:c}},t)},_e=()=>{let t=Bn(Yn);if(t===void 0)throw new Error("usePaymentMethodGroup must be used within a PaymentMethodGroup");return t};var Jr,W,Kn,bt,$n,Wn,ds,fs,ps,us,Zn,dr={},qn=[],ad=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Qr=Array.isArray;function et(t,e){for(var r in e)t[r]=e[r];return t}function Xn(t){var e=t.parentNode;e&&e.removeChild(t)}function f(t,e,r){var o,s,n,i={};for(n in e)n=="key"?o=e[n]:n=="ref"?s=e[n]:i[n]=e[n];if(arguments.length>2&&(i.children=arguments.length>3?Jr.call(arguments,2):r),typeof t=="function"&&t.defaultProps!=null)for(n in t.defaultProps)i[n]===void 0&&(i[n]=t.defaultProps[n]);return qr(t,i,o,s,null)}function qr(t,e,r,o,s){var n={type:t,props:e,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:s??++Kn,__i:-1,__u:0};return s==null&&W.vnode!=null&&W.vnode(n),n}function tt(t){return t.children}function j(t,e){this.props=t,this.context=e}function St(t,e){if(e==null)return t.__?St(t.__,t.__i+1):null;for(var r;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null)return r.__e;return typeof t.type=="function"?St(t):null}function Jn(t){var e,r;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null){t.__e=t.__c.base=r.__e;break}return Jn(t)}}function ms(t){(!t.__d&&(t.__d=!0)&&bt.push(t)&&!Xr.__r++||$n!==W.debounceRendering)&&(($n=W.debounceRendering)||Wn)(Xr)}function Xr(){var t,e,r,o,s,n,i,c;for(bt.sort(ds);t=bt.shift();)t.__d&&(e=bt.length,o=void 0,n=(s=(r=t).__v).__e,i=[],c=[],r.__P&&((o=et({},s)).__v=s.__v+1,W.vnode&&W.vnode(o),ys(r.__P,o,s,r.__n,r.__P.namespaceURI,32&s.__u?[n]:null,i,n??St(s),!!(32&s.__u),c),o.__v=s.__v,o.__.__k[o.__i]=o,ta(i,o,c),o.__e!=n&&Jn(o)),bt.length>e&&bt.sort(ds));Xr.__r=0}function Qn(t,e,r,o,s,n,i,c,d,p,u){var l,h,m,y,E,C=o&&o.__k||qn,_=e.length;for(r.__d=d,id(r,e,C),d=r.__d,l=0;l<_;l++)(m=r.__k[l])!=null&&typeof m!="boolean"&&typeof m!="function"&&(h=m.__i===-1?dr:C[m.__i]||dr,m.__i=l,ys(t,m,h,s,n,i,c,d,p,u),y=m.__e,m.ref&&h.ref!=m.ref&&(h.ref&&gs(h.ref,null,m),u.push(m.ref,m.__c||y,m)),E==null&&y!=null&&(E=y),65536&m.__u||h.__k===m.__k?(d&&typeof m.type=="string"&&!t.contains(d)&&(d=St(h)),d=ea(m,d,t)):typeof m.type=="function"&&m.__d!==void 0?d=m.__d:y&&(d=y.nextSibling),m.__d=void 0,m.__u&=-196609);r.__d=d,r.__e=E}function id(t,e,r){var o,s,n,i,c,d=e.length,p=r.length,u=p,l=0;for(t.__k=[],o=0;o<d;o++)i=o+l,(s=t.__k[o]=(s=e[o])==null||typeof s=="boolean"||typeof s=="function"?null:typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?qr(null,s,null,null,null):Qr(s)?qr(tt,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?qr(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s)!=null?(s.__=t,s.__b=t.__b+1,c=ld(s,r,i,u),s.__i=c,n=null,c!==-1&&(u--,(n=r[c])&&(n.__u|=131072)),n==null||n.__v===null?(c==-1&&l--,typeof s.type!="function"&&(s.__u|=65536)):c!==i&&(c==i-1?l=c-i:c==i+1?l++:c>i?u>d-i?l+=c-i:l--:c<i&&l++,c!==o+l&&(s.__u|=65536))):(n=r[i])&&n.key==null&&n.__e&&!(131072&n.__u)&&(n.__e==t.__d&&(t.__d=St(n)),hs(n,n,!1),r[i]=null,u--);if(u)for(o=0;o<p;o++)(n=r[o])!=null&&!(131072&n.__u)&&(n.__e==t.__d&&(t.__d=St(n)),hs(n,n))}function ea(t,e,r){var o,s;if(typeof t.type=="function"){for(o=t.__k,s=0;o&&s<o.length;s++)o[s]&&(o[s].__=t,e=ea(o[s],e,r));return e}t.__e!=e&&(r.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType===8);return e}function _s(t,e){return e=e||[],t==null||typeof t=="boolean"||(Qr(t)?t.some(function(r){_s(r,e)}):e.push(t)),e}function ld(t,e,r,o){var s=t.key,n=t.type,i=r-1,c=r+1,d=e[r];if(d===null||d&&s==d.key&&n===d.type&&!(131072&d.__u))return r;if(o>(d==null||131072&d.__u?0:1))for(;i>=0||c<e.length;){if(i>=0){if((d=e[i])&&!(131072&d.__u)&&s==d.key&&n===d.type)return i;i--}if(c<e.length){if((d=e[c])&&!(131072&d.__u)&&s==d.key&&n===d.type)return c;c++}}return-1}function zn(t,e,r){e[0]==="-"?t.setProperty(e,r??""):t[e]=r==null?"":typeof r!="number"||ad.test(e)?r:r+"px"}function Zr(t,e,r,o,s){var n;e:if(e==="style")if(typeof r=="string")t.style.cssText=r;else{if(typeof o=="string"&&(t.style.cssText=o=""),o)for(e in o)r&&e in r||zn(t.style,e,"");if(r)for(e in r)o&&r[e]===o[e]||zn(t.style,e,r[e])}else if(e[0]==="o"&&e[1]==="n")n=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in t||e==="onFocusOut"||e==="onFocusIn"?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+n]=r,r?o?r.u=o.u:(r.u=fs,t.addEventListener(e,n?us:ps,n)):t.removeEventListener(e,n?us:ps,n);else{if(s=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&e[4]!=="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&r==1?"":r))}}function Gn(t){return function(e){if(this.l){var r=this.l[e.type+t];if(e.t==null)e.t=fs++;else if(e.t<r.u)return;return r(W.event?W.event(e):e)}}}function ys(t,e,r,o,s,n,i,c,d,p){var u,l,h,m,y,E,C,_,g,O,N,b,P,L,H,U,F=e.type;if(e.constructor!==void 0)return null;128&r.__u&&(d=!!(32&r.__u),n=[c=e.__e=r.__e]),(u=W.__b)&&u(e);e:if(typeof F=="function")try{if(_=e.props,g="prototype"in F&&F.prototype.render,O=(u=F.contextType)&&o[u.__c],N=u?O?O.props.value:u.__:o,r.__c?C=(l=e.__c=r.__c).__=l.__E:(g?e.__c=l=new F(_,N):(e.__c=l=new j(_,N),l.constructor=F,l.render=dd),O&&O.sub(l),l.props=_,l.state||(l.state={}),l.context=N,l.__n=o,h=l.__d=!0,l.__h=[],l._sb=[]),g&&l.__s==null&&(l.__s=l.state),g&&F.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=et({},l.__s)),et(l.__s,F.getDerivedStateFromProps(_,l.__s))),m=l.props,y=l.state,l.__v=e,h)g&&F.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),g&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(g&&F.getDerivedStateFromProps==null&&_!==m&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(_,N),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(_,l.__s,N)===!1||e.__v===r.__v)){for(e.__v!==r.__v&&(l.props=_,l.state=l.__s,l.__d=!1),e.__e=r.__e,e.__k=r.__k,e.__k.forEach(function(M){M&&(M.__=e)}),b=0;b<l._sb.length;b++)l.__h.push(l._sb[b]);l._sb=[],l.__h.length&&i.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(_,l.__s,N),g&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(m,y,E)})}if(l.context=N,l.props=_,l.__P=t,l.__e=!1,P=W.__r,L=0,g){for(l.state=l.__s,l.__d=!1,P&&P(e),u=l.render(l.props,l.state,l.context),H=0;H<l._sb.length;H++)l.__h.push(l._sb[H]);l._sb=[]}else do l.__d=!1,P&&P(e),u=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++L<25);l.state=l.__s,l.getChildContext!=null&&(o=et(et({},o),l.getChildContext())),g&&!h&&l.getSnapshotBeforeUpdate!=null&&(E=l.getSnapshotBeforeUpdate(m,y)),Qn(t,Qr(U=u!=null&&u.type===tt&&u.key==null?u.props.children:u)?U:[U],e,r,o,s,n,i,c,d,p),l.base=e.__e,e.__u&=-161,l.__h.length&&i.push(l),C&&(l.__E=l.__=null)}catch(M){e.__v=null,d||n!=null?(e.__e=c,e.__u|=d?160:32,n[n.indexOf(c)]=null):(e.__e=r.__e,e.__k=r.__k),W.__e(M,e,r)}else n==null&&e.__v===r.__v?(e.__k=r.__k,e.__e=r.__e):e.__e=cd(r.__e,e,r,o,s,n,i,d,p);(u=W.diffed)&&u(e)}function ta(t,e,r){e.__d=void 0;for(var o=0;o<r.length;o++)gs(r[o],r[++o],r[++o]);W.__c&&W.__c(e,t),t.some(function(s){try{t=s.__h,s.__h=[],t.some(function(n){n.call(s)})}catch(n){W.__e(n,s.__v)}})}function cd(t,e,r,o,s,n,i,c,d){var p,u,l,h,m,y,E,C=r.props,_=e.props,g=e.type;if(g==="svg"?s="http://www.w3.org/2000/svg":g==="math"?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),n!=null){for(p=0;p<n.length;p++)if((m=n[p])&&"setAttribute"in m==!!g&&(g?m.localName===g:m.nodeType===3)){t=m,n[p]=null;break}}if(t==null){if(g===null)return document.createTextNode(_);t=document.createElementNS(s,g,_.is&&_),n=null,c=!1}if(g===null)C===_||c&&t.data===_||(t.data=_);else{if(n=n&&Jr.call(t.childNodes),C=r.props||dr,!c&&n!=null)for(C={},p=0;p<t.attributes.length;p++)C[(m=t.attributes[p]).name]=m.value;for(p in C)if(m=C[p],p!="children"){if(p=="dangerouslySetInnerHTML")l=m;else if(p!=="key"&&!(p in _)){if(p=="value"&&"defaultValue"in _||p=="checked"&&"defaultChecked"in _)continue;Zr(t,p,null,m,s)}}for(p in _)m=_[p],p=="children"?h=m:p=="dangerouslySetInnerHTML"?u=m:p=="value"?y=m:p=="checked"?E=m:p==="key"||c&&typeof m!="function"||C[p]===m||Zr(t,p,m,C[p],s);if(u)c||l&&(u.__html===l.__html||u.__html===t.innerHTML)||(t.innerHTML=u.__html),e.__k=[];else if(l&&(t.innerHTML=""),Qn(t,Qr(h)?h:[h],e,r,o,g==="foreignObject"?"http://www.w3.org/1999/xhtml":s,n,i,n?n[0]:r.__k&&St(r,0),c,d),n!=null)for(p=n.length;p--;)n[p]!=null&&Xn(n[p]);c||(p="value",y!==void 0&&(y!==t[p]||g==="progress"&&!y||g==="option"&&y!==C[p])&&Zr(t,p,y,C[p],s),p="checked",E!==void 0&&E!==t[p]&&Zr(t,p,E,C[p],s))}return t}function gs(t,e,r){try{typeof t=="function"?t(e):t.current=e}catch(o){W.__e(o,r)}}function hs(t,e,r){var o,s;if(W.unmount&&W.unmount(t),(o=t.ref)&&(o.current&&o.current!==t.__e||gs(o,null,e)),(o=t.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(n){W.__e(n,e)}o.base=o.__P=null}if(o=t.__k)for(s=0;s<o.length;s++)o[s]&&hs(o[s],e,r||typeof t.type!="function");r||t.__e==null||Xn(t.__e),t.__c=t.__=t.__e=t.__d=void 0}function dd(t,e,r){return this.constructor(t,r)}function vs(t,e,r){var o,s,n;W.__&&W.__(t,e),o=e.__k,s=[],n=[],ys(e,t=e.__k=f(tt,null,[t]),o||dr,dr,e.namespaceURI,o?null:e.firstChild?Jr.call(e.childNodes):null,s,o?o.__e:e.firstChild,!1,n),ta(s,t,n)}function ra(t,e){var r={__c:e="__cC"+Zn++,__:t,Consumer:function(o,s){return o.children(s)},Provider:function(o){var s,n;return this.getChildContext||(s=[],(n={})[e]=this,this.getChildContext=function(){return n},this.componentWillUnmount=function(){s=null},this.shouldComponentUpdate=function(i){this.props.value!==i.value&&s.some(function(c){c.__e=!0,ms(c)})},this.sub=function(i){s.push(i);var c=i.componentWillUnmount;i.componentWillUnmount=function(){s&&s.splice(s.indexOf(i),1),c&&c.call(i)}}),o.children}};return r.Provider.__=r.Consumer.contextType=r}Jr=qn.slice,W={__e:function(t,e,r,o){for(var s,n,i;e=e.__;)if((s=e.__c)&&!s.__)try{if((n=s.constructor)&&n.getDerivedStateFromError!=null&&(s.setState(n.getDerivedStateFromError(t)),i=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(t,o||{}),i=s.__d),i)return s.__E=s}catch(c){t=c}throw t}},Kn=0,j.prototype.setState=function(t,e){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=et({},this.state),typeof t=="function"&&(t=t(et({},r),this.props)),t&&et(r,t),t!=null&&this.__v&&(e&&this._sb.push(e),ms(this))},j.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),ms(this))},j.prototype.render=tt,bt=[],Wn=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ds=function(t,e){return t.__v.__b-e.__v.__b},Xr.__r=0,fs=0,ps=Gn(!1),us=Gn(!0),Zn=0;var Vt,X,Cs,oa,pr=0,pa=[],oe=W,sa=oe.__b,na=oe.__r,aa=oe.diffed,ia=oe.__c,la=oe.unmount,ca=oe.__;function to(t,e){oe.__h&&oe.__h(X,t,pr||e),pr=0;var r=X.__H||(X.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function ye(t){return pr=1,pd(fa,t)}function pd(t,e,r){var o=to(Vt++,2);if(o.t=t,!o.__c&&(o.__=[r?r(e):fa(void 0,e),function(c){var d=o.__N?o.__N[0]:o.__[0],p=o.t(d,c);d!==p&&(o.__N=[p,o.__[1]],o.__c.setState({}))}],o.__c=X,!X.u)){var s=function(c,d,p){if(!o.__c.__H)return!0;var u=o.__c.__H.__.filter(function(h){return!!h.__c});if(u.every(function(h){return!h.__N}))return!n||n.call(this,c,d,p);var l=!1;return u.forEach(function(h){if(h.__N){var m=h.__[0];h.__=h.__N,h.__N=void 0,m!==h.__[0]&&(l=!0)}}),!(!l&&o.__c.props===c)&&(!n||n.call(this,c,d,p))};X.u=!0;var n=X.shouldComponentUpdate,i=X.componentWillUpdate;X.componentWillUpdate=function(c,d,p){if(this.__e){var u=n;n=void 0,s(c,d,p),n=u}i&&i.call(this,c,d,p)},X.shouldComponentUpdate=s}return o.__N||o.__}function ze(t,e){var r=to(Vt++,3);!oe.__s&&ha(r.__H,e)&&(r.__=t,r.i=e,X.__H.__h.push(r))}function rt(t){return pr=5,ro(function(){return{current:t}},[])}function ro(t,e){var r=to(Vt++,7);return ha(r.__H,e)&&(r.__=t(),r.__H=e,r.__h=t),r.__}function ua(t,e){return pr=8,ro(function(){return t},e)}function ma(t){var e=X.context[t.__c],r=to(Vt++,9);return r.c=t,e?(r.__==null&&(r.__=!0,e.sub(X)),e.props.value):t.__}function ud(){for(var t;t=pa.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(eo),t.__H.__h.forEach(Es),t.__H.__h=[]}catch(e){t.__H.__h=[],oe.__e(e,t.__v)}}oe.__b=function(t){X=null,sa&&sa(t)},oe.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),ca&&ca(t,e)},oe.__r=function(t){na&&na(t),Vt=0;var e=(X=t.__c).__H;e&&(Cs===X?(e.__h=[],X.__h=[],e.__.forEach(function(r){r.__N&&(r.__=r.__N),r.i=r.__N=void 0})):(e.__h.forEach(eo),e.__h.forEach(Es),e.__h=[],Vt=0)),Cs=X},oe.diffed=function(t){aa&&aa(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(pa.push(e)!==1&&oa===oe.requestAnimationFrame||((oa=oe.requestAnimationFrame)||md)(ud)),e.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.i=void 0})),Cs=X=null},oe.__c=function(t,e){e.some(function(r){try{r.__h.forEach(eo),r.__h=r.__h.filter(function(o){return!o.__||Es(o)})}catch(o){e.some(function(s){s.__h&&(s.__h=[])}),e=[],oe.__e(o,r.__v)}}),ia&&ia(t,e)},oe.unmount=function(t){la&&la(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.forEach(function(o){try{eo(o)}catch(s){e=s}}),r.__H=void 0,e&&oe.__e(e,r.__v))};var da=typeof requestAnimationFrame=="function";function md(t){var e,r=function(){clearTimeout(o),da&&cancelAnimationFrame(e),setTimeout(t)},o=setTimeout(r,100);da&&(e=requestAnimationFrame(r))}function eo(t){var e=X,r=t.__c;typeof r=="function"&&(t.__c=void 0,r()),X=e}function Es(t){var e=X;t.__c=t.__(),X=e}function ha(t,e){return!t||t.length!==e.length||e.some(function(r,o){return r!==t[o]})}function fa(t,e){return typeof e=="function"?e(t):e}var _a="encrypted",I="encryptedCardNumber",x="encryptedExpiryDate",k="encryptedExpiryMonth",A="encryptedExpiryYear",D="encryptedSecurityCode",he="encryptedPassword",ur="encryptedSecurityCode3digits",mr="encryptedSecurityCode4digits",hr="giftcard",ya="5.5.3",Rt=["amex","mc","visa"],ga=[hr],hd=[I,x,k,A,D,he],oo=hd,va=["bcmc"],Ca="required",so="optional",no="hidden",Me=Ca,fr=so,_r=no,Ie=Ca,yr=so,Pt=no,Ea="data-cse",ba="data-info",Sa="data-uid",Ra=["accel","pulse","star","nyce"];var Tt={[I]:"cardNumber",[x]:"expiryDate",[D]:"securityCode",[k]:"expiryMonth",[A]:"expiryYear",[he]:"password",[ur]:"securityCodeThreeDigits",[mr]:"securityCodeFourDigits"},Pa=6e3;var xe=(t,e)=>e.split(".").reduce((r,o)=>r&&r[o]?r[o]:void 0,t);var Ge="field.error.required";var ao="invalid.format.expects",Ta="creditCard.holderName.invalid",Aa="creditCard.taxNumber.invalid",Da="boleto.socialSecurityNumber.invalid",At=function(t){return t.CC_NUM="cc.num",t.CC_DAT="cc.dat",t.CC_MTH="cc.mth",t.CC_YR="cc.yr",t.CC_CVC="cc.cvc",t.KCP_PWD="kcp.pwd",t}({}),Ht=function(t){return t.ERROR_MSG_INCOMPLETE_FIELD="err.gen.9100",t.ERROR_MSG_INVALID_FIELD="err.gen.9101",t.ERROR_MSG_LUHN_CHECK_FAILED="cc.num.902",t.ERROR_MSG_EMPTY_PAN="cc.num.900",t.ERROR_MSG_UNSUPPORTED_CARD_ENTERED="cc.num.903",t.ERROR_MSG_INCORRECTLY_FILLED_PAN="cc.num.901",t.ERROR_MSG_CARD_TOO_OLD="cc.dat.912",t.ERROR_MSG_CARD_TOO_FAR_IN_FUTURE="cc.dat.913",t.ERROR_MSG_CARD_EXPIRES_TOO_SOON="cc.dat.914",t.ERROR_MSG_EMPTY_DATE="cc.dat.910",t.ERROR_MSG_INCORRECTLY_FILLED__DATE="cc.dat.911",t.ERROR_MSG_EMPTY_YEAR="cc.yr.917",t.ERROR_MSG_INCORRECTLY_FILLED_YEAR="cc.yr.918",t.ERROR_MSG_EMPTY_MONTH="cc.mth.915",t.ERROR_MSG_EMPTY_CVC="cc.cvc.920",t.ERROR_MSG_INCORRECTLY_FILLED_CVC="cc.cvc.921",t.ERROR_MSG_EMPTY_KCP_PWD="kcp.pwd.940",t.ERROR_MSG_INCORRECTLY_FILLED_KCP_PWD="kcp.pwd.941",t}({}),Ia={[I]:"cc.num.900",[x]:"cc.dat.910",[k]:"cc.mth.915",[A]:"cc.yr.917",[D]:"cc.cvc.920",[he]:"kcp.pwd.940"};var xa=t=>t?Array.prototype.slice.call(t.querySelectorAll('[data-cse*="encrypted"]')).map(e=>e.getAttribute("data-cse")):[],wa=(t,e)=>(e===x?(t[k]=!1,t[A]=!1):t[e]=!1,t),ka=(t,e)=>(r,o)=>{let s=e.valid[o]!==!0?((n,i)=>i!==1||n!==k&&n!==A?n:x)(o,t):null;return s=((n,i,c)=>{let{isFieldOfType:d,fieldIsValid:p}=c.reduce((m,y)=>(m.isFieldOfType||(m.isFieldOfType=n===y,m.fieldIsValid=!i.errors[y]),m),{isFieldOfType:!1,fieldIsValid:!1}),u=n===D?"cvcPolicy":"expiryDatePolicy",l=u==="cvcPolicy"?fr:yr,h=u==="cvcPolicy"?_r:Pt;return(i[u]===l||i[u]===h)&&p&&d?null:n})(s,e,[D,x,k,A]),s&&!r.includes(s)&&r.push(s),r},Na=(t,e,r)=>({rootNode:e,fieldType:t,error:xe(r,`errors.${t}`)||Ia[t],type:"card"});function w(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var io=class{constructor(e){w(this,"callbacks",void 0),w(this,"config",void 0),w(this,"props",void 0),w(this,"state",void 0),w(this,"validateForm",void 0),w(this,"handleBrandFromBinLookup",void 0),w(this,"callbacksHandler",void 0),w(this,"configHandler",void 0),w(this,"createCardSecuredFields",void 0),w(this,"createNonCardSecuredFields",void 0),w(this,"createSecuredFields",void 0),w(this,"destroySecuredFields",void 0),w(this,"handleIOSTouchEvents",void 0),w(this,"destroyTouchendListener",void 0),w(this,"destroyTouchstartListener",void 0),w(this,"handleBinValue",void 0),w(this,"handleEncryption",void 0),w(this,"handleFocus",void 0),w(this,"handleIframeConfigFeedback",void 0),w(this,"handleValidation",void 0),w(this,"handleSFShiftTab",void 0),w(this,"handleShiftTab",void 0),w(this,"isConfigured",void 0),w(this,"postMessageToAllIframes",void 0),w(this,"processAutoComplete",void 0),w(this,"processBrand",void 0),w(this,"sendBrandToCardSF",void 0),w(this,"sendExpiryDatePolicyToSF",void 0),w(this,"setFocusOnFrame",void 0),w(this,"setupSecuredField",void 0),w(this,"touchendListener",void 0),w(this,"touchstartListener",void 0),w(this,"hasGenuineTouchEvents",void 0),w(this,"encryptedAttrName",void 0),w(this,"hasRedundantCVCField",void 0),w(this,"isSingleBrandedCard",void 0),w(this,"securityCode",void 0),this.props=e,this.state={},this.config={},this.callbacks={}}};var Oa=Object.prototype.toString;function gr(t){return typeof t=="object"&&t!==null&&Object.prototype.toString.call(t)==="[object Array]"}function ge(t){return t!=null}function vr(t){return t!==!1&&ge(t)}function bs(t){return!!t&&typeof t=="object"}function Fa(t){return!vr(t)||!(!(typeof(e=t)=="number"||bs(e)&&Oa.call(e)==="[object Number]")||t!==0&&!Number.isNaN(t))||!(!gr(t)&&!function(r){return typeof r=="string"||bs(r)&&Oa.call(r)==="[object String]"}(t)||t.length!==0)||!(!bs(t)||Object.keys(t).length!==0);var e}function Dt(...t){let e=gr(t[0])?t[0]:t;return{from:r=>e.map(o=>o in r?{[o]:r[o]}:{}).reduce((o,s)=>({...o,...s}),{})}}function Ma(...t){let e=gr(t[0])?t[0]:t;return{from:r=>Dt(...Object.keys(r).filter(o=>!e.includes(o))).from(r)}}var La=t=>gr(t)&&t.length?t:Rt;var Cr=typeof window<"u"&&window.console&&window.console.error&&window.console.error.bind(window.console);typeof window<"u"&&window.console&&window.console.info&&window.console.info.bind(window.console);var lo=typeof window<"u"&&window.console&&window.console.log&&window.console.log.bind(window.console),Ee=typeof window<"u"&&window.console&&window.console.warn&&window.console.warn.bind(window.console);function Ua(t){this.config.cardGroupTypes=La(t.cardGroupTypes);let e=t.loadingContext;if(!e)return void Ee("WARNING Config :: no loadingContext has been specified!");var r;this.config.loadingContext=(r=e).charAt(r.length-1)==="/"?e:`${e}/`,this.config.isCreditCardType=ga.includes(t.type)===!1,this.config.iframeUIConfig=t.iframeUIConfig??{},this.config.autoFocus=!(t.autoFocus===!1||t.autoFocus==="false"),this.config.showWarnings=t.showWarnings===!0||t.showWarnings==="true",this.config.trimTrailingSeparator=!(t.trimTrailingSeparator===!1||t.trimTrailingSeparator==="false"),this.config.keypadFix=!(t.keypadFix===!1||t.keypadFix==="false"),this.config.legacyInputMode=t.legacyInputMode||null,this.config.minimumExpiryDate=t.minimumExpiryDate||null,this.config.sfLogAtStart=window._b$dl===!0;let o=this.config.isCreditCardType?"card":t.type,s=btoa(window.location.origin),n=`${o}${t.forceCompat||typeof window.TextEncoder!="function"?"Compat":""}`;this.config.iframeSrc=`${this.config.loadingContext}securedfields/${t.clientKey}/${ya}/securedFields.html?type=${n}&d=${s}`}var ve=()=>{};function Ba(t={}){this.callbacks.onLoad=t.onLoad?t.onLoad:ve,this.callbacks.onConfigSuccess=t.onConfigSuccess?t.onConfigSuccess:ve,this.callbacks.onFieldValid=t.onFieldValid?t.onFieldValid:ve,this.callbacks.onAllValid=t.onAllValid?t.onAllValid:ve,this.callbacks.onBrand=t.onBrand?t.onBrand:ve,this.callbacks.onError=t.onError?t.onError:ve,this.callbacks.onFocus=t.onFocus?t.onFocus:ve,this.callbacks.onBinValue=t.onBinValue?t.onBinValue:ve,this.callbacks.onAutoComplete=t.onAutoComplete?t.onAutoComplete:ve,this.callbacks.onAdditionalSFConfig=t.onAdditionalSFConfig?t.onAdditionalSFConfig:ve,this.callbacks.onAdditionalSFRemoved=t.onAdditionalSFRemoved?t.onAdditionalSFRemoved:ve,this.callbacks.onTouchstartIOS=t.onTouchstartIOS?t.onTouchstartIOS:ve,this.callbacks.onKeyPressed=t.onKeyPressed?t.onKeyPressed:ve}var Va=({fieldType:t,encryptedFieldName:e,uuid:r,isValid:o,txVariant:s,rootNode:n})=>({fieldType:t,encryptedFieldName:e,uid:r,valid:o,type:s,rootNode:n}),Ha=({fieldType:t,txVariant:e,rootNode:r})=>{let o=t===x,s=[],n=["encryptedExpiryMonth","encryptedExpiryYear"],i,c,d,p,u=o?2:1;for(i=0;i<u;i+=1){d=o?n[i]:t,c=`${e}-encrypted-${d}`,p=o?d:t;let l=Va({fieldType:t,encryptedFieldName:p,uuid:c,isValid:!1,txVariant:e,rootNode:r});s.push(l)}return s},Ya=({fieldType:t,txVariant:e,rootNode:r,encryptedObjArr:o})=>{let s,n,i,c,d,p=[];for(s=0;s<o.length;s+=1){i=o[s],c=i.encryptedFieldName,n=`${e}-encrypted-${c}`,d=i.blob;let u=Va({fieldType:t,encryptedFieldName:c,uuid:n,isValid:!0,txVariant:e,rootNode:r});u.blob=d,p.push(u)}return p};function R(t={},e){return Object.prototype.hasOwnProperty.call(t,e)}var co=(t,e,r,o,s)=>{if(!R(t,"error"))return null;let n=e,i={rootNode:o,fieldType:t.fieldType,error:null,type:null},c=t.error!=="";return c||n.hasError?(i.error=c?t.error:"",i.type=r,n.hasError=c,n.errorType=i.error,s(i),i):null};function ja(t){let e,r=t.fieldType;if(this.state.type==="card"&&R(t,"cvcPolicy")&&ge(t.cvcPolicy)&&R(this.state.securedFields,D)&&(this.state.securedFields[D].cvcPolicy=t.cvcPolicy),co(t,this.state.securedFields[r],this.state.type,this.props.rootNode,this.callbacks.onError),this.state.securedFields[r].isEncrypted){e=Ha({fieldType:r,txVariant:this.state.type,rootNode:this.props.rootNode}),r===I&&(e[0].endDigits="");for(let o=0,s=e.length;o<s;o+=1)this.callbacks.onFieldValid(e[o]);this.state.securedFields[r].isEncrypted=!1}this.validateForm(),R(t,"brand")&&this.processBrand(t)}var se=(t,e,r)=>{if(e){let o=JSON.stringify(t);e.postMessage(o,r)}};function ae(t,e){return t.securedFields[e]?.iframeContentWindow||null}function $a(t){let e=t.fieldType,r,o;this.config.autoFocus&&(t.type!=="year"&&e!==A||this.setFocusOnFrame(D),e===k&&this.setFocusOnFrame(A));let s=t[e];this.state.securedFields[e].isEncrypted=!0,co({error:"",fieldType:e},this.state.securedFields[e],this.state.type,this.props.rootNode,this.callbacks.onError);let n=Ya({fieldType:e,txVariant:this.state.type,rootNode:this.props.rootNode,encryptedObjArr:s});if(e===k&&R(this.state.securedFields,A)){let i={txVariant:this.state.type,code:t.code,blob:s[0].blob,fieldType:A,numKey:this.state.securedFields[A].numKey};se(i,ae(this.state,A),this.config.loadingContext)}for(e===I&&vr(t.endDigits)&&(n[0].endDigits=t.endDigits),e===I&&vr(t.issuerBin)&&(n[0].issuerBin=+t.issuerBin),e===x&&vr(t.expiryDate)&&(n[1].expiryDate=t.expiryDate),r=0,o=n.length;r<o;r+=1)this.callbacks.onFieldValid(n[r]);this.validateForm()}var po=(t,e)=>{let r=[];return t&&typeof t.querySelectorAll=="function"&&(r=[].slice.call(t.querySelectorAll(e))),r},we=(t,e)=>{if(t)return t.querySelector(e)},Er=(t,e)=>{if(t)return t.getAttribute(e)},za=t=>{for(;t.firstChild;)t.removeChild(t.firstChild)};var Ss,T={__NO_BRAND:"noBrand",cards:[]};T.cards.push({cardType:"mc",startingRules:[51,52,53,54,55,22,23,24,25,26,27],permittedLengths:[16],pattern:/^(5[1-5][0-9]{0,14}|2[2-7][0-9]{0,14})$/,securityCode:"CVC"}),T.cards.push({cardType:"visadankort",startingRules:[4571],permittedLengths:[16],pattern:/^(4571)[0-9]{0,12}$/}),T.cards.push({cardType:"visa",startingRules:[4],permittedLengths:[13,16,19],pattern:/^4[0-9]{0,18}$/,securityCode:"CVV"}),T.cards.push({cardType:"amex",startingRules:[34,37],permittedLengths:[15],pattern:/^3[47][0-9]{0,13}$/,securityCode:"CID"}),T.cards.push({cardType:"diners",startingRules:[36],permittedLengths:[14,15,16,17,18,19],pattern:/^(36)[0-9]{0,12}$/}),T.cards.push({cardType:"maestrouk",startingRules:[6759],permittedLengths:[16,18,19],pattern:/^(6759)[0-9]{0,15}$/}),T.cards.push({cardType:"solo",startingRules:[6767],permittedLengths:[16,18,19],pattern:/^(6767)[0-9]{0,15}$/}),T.cards.push({cardType:"laser",startingRules:[6304,6706,677117,677120],permittedLengths:[16,17,18,19],pattern:/^(6304|6706|6709|6771)[0-9]{0,15}$/,cvcPolicy:"optional"}),T.cards.push({cardType:"discover",startingRules:[6011,644,645,646,647,648,649,65],permittedLengths:[16,17,18,19],pattern:/^(6011[0-9]{0,12}|(644|645|646|647|648|649)[0-9]{0,13}|65[0-9]{0,14})$/}),T.cards.push({cardType:"jcb",startingRules:[3528,3529,353,354,355,356,357,358],permittedLengths:[16,19],pattern:/^(352[8,9]{1}[0-9]{0,15}|35[4-8]{1}[0-9]{0,16})$/,securityCode:"CAV"}),T.cards.push({cardType:"bcmc",startingRules:[6703,479658,606005],permittedLengths:[16,17,18,19],pattern:/^((6703)[0-9]{0,15}|(479658|606005)[0-9]{0,13})$/,cvcPolicy:"hidden"}),T.cards.push({cardType:"bijcard",startingRules:[5100081],permittedLengths:[16],pattern:/^(5100081)[0-9]{0,9}$/}),T.cards.push({cardType:"dankort",startingRules:[5019],permittedLengths:[16],pattern:/^(5019)[0-9]{0,12}$/}),T.cards.push({cardType:"hipercard",startingRules:[606282],permittedLengths:[16],pattern:/^(606282)[0-9]{0,10}$/}),T.cards.push({cardType:"cup",startingRules:[62,81],permittedLengths:[14,15,16,17,18,19],pattern:/^(62|81)[0-9]{0,17}$/}),T.cards.push({cardType:"maestro",startingRules:[50,56,57,58,6],permittedLengths:[16,17,18,19],pattern:/^(5[0|6-8][0-9]{0,17}|6[0-9]{0,18})$/,cvcPolicy:"optional"}),T.cards.push({cardType:"elo",startingRules:[506699,50670,50671,50672,50673,50674,50675,50676,506770,506771,506772,506773,506774,506775,506776,506777,506778,401178,438935,451416,457631,457632,504175,627780,636297,636368],permittedLengths:[16],pattern:/^((((506699)|(506770)|(506771)|(506772)|(506773)|(506774)|(506775)|(506776)|(506777)|(506778)|(401178)|(438935)|(451416)|(457631)|(457632)|(504175)|(627780)|(636368)|(636297))[0-9]{0,10})|((50676)|(50675)|(50674)|(50673)|(50672)|(50671)|(50670))[0-9]{0,11})$/}),T.cards.push({cardType:"uatp",startingRules:[1],permittedLengths:[15],pattern:/^1[0-9]{0,14}$/,cvcPolicy:"optional"}),T.cards.push({cardType:"cartebancaire",startingRules:[4,5,6],permittedLengths:[16],pattern:/^[4-6][0-9]{0,15}$/}),T.cards.push({cardType:"visaalphabankbonus",startingRules:[450903],permittedLengths:[16],pattern:/^(450903)[0-9]{0,10}$/}),T.cards.push({cardType:"mcalphabankbonus",startingRules:[510099],permittedLengths:[16],pattern:/^(510099)[0-9]{0,10}$/}),T.cards.push({cardType:"hiper",startingRules:[637095,637568,637599,637609,637612],permittedLengths:[16],pattern:/^(637095|637568|637599|637609|637612)[0-9]{0,10}$/}),T.cards.push({cardType:"oasis",startingRules:[982616],permittedLengths:[16],pattern:/^(982616)[0-9]{0,10}$/,cvcPolicy:"optional"}),T.cards.push({cardType:"karenmillen",startingRules:[98261465],permittedLengths:[16],pattern:/^(98261465)[0-9]{0,8}$/,cvcPolicy:"optional"}),T.cards.push({cardType:"warehouse",startingRules:[982633],permittedLengths:[16],pattern:/^(982633)[0-9]{0,10}$/,cvcPolicy:"optional"}),T.cards.push({cardType:"mir",startingRules:[220],permittedLengths:[16,17,18,19],pattern:/^(220)[0-9]{0,16}$/}),T.cards.push({cardType:"codensa",startingRules:[590712],permittedLengths:[16],pattern:/^(590712)[0-9]{0,10}$/}),T.cards.push({cardType:"naranja",startingRules:[377798,377799,402917,402918,527571,527572,589562],permittedLengths:[16,17,18,19],pattern:/^(37|40|5[28])([279])\d*$/}),T.cards.push({cardType:"cabal",startingRules:[589657,600691,603522,6042,6043,636908],permittedLengths:[16,17,18,19],pattern:/^(58|6[03])([03469])\d*$/}),T.cards.push({cardType:"shopping",startingRules:[2799,589407,603488],permittedLengths:[16,17,18,19],pattern:/^(27|58|60)([39])\d*$/}),T.cards.push({cardType:"argencard",startingRules:[501],permittedLengths:[16,17,18,19],pattern:/^(50)(1)\d*$/}),T.cards.push({cardType:"troy",startingRules:[9792],permittedLengths:[16],pattern:/^(97)(9)\d*$/}),T.cards.push({cardType:"forbrugsforeningen",startingRules:[600722],permittedLengths:[16],pattern:/^(60)(0)\d*$/}),T.cards.push({cardType:"vpay",startingRules:[401,408,413,434,435,437,439,441,442,443,444,446,447,455,458,460,461,463,466,471,479,482,483,487],permittedLengths:[13,14,15,16,17,18,19],pattern:/^(40[1,8]|413|43[4,5]|44[1,2,3,4,6,7]|45[5,8]|46[0,1,3,6]|47[1,9]|48[2,3,7])[0-9]{0,16}$/}),T.cards.push({cardType:"rupay",startingRules:[508528],permittedLengths:[16],pattern:/^(100003|508(2|[5-9])|60(69|[7-8])|652(1[5-9]|[2-5][0-9]|8[5-9])|65300[3-4]|8172([0-1]|[3-5]|7|9)|817(3[3-8]|40[6-9]|410)|35380([0-2]|[5-6]|9))[0-9]{0,12}$/}),T.cards.push({cardType:"ticket",expiryDatePolicy:"hidden"});var Yt={detectCard:(t,e)=>{let r,o,s;if(e){if(r=T.cards.filter(n=>e.includes(n.cardType)).filter(n=>R(n,"pattern")&&t.match(n.pattern)),r.length){if(r.length===1)return r[0];for(o=0,s=r.length;o<s;o+=1)if(!r[o].longestRule){let n=r[o].startingRules.reduce((i,c)=>i>c?i:c);r[o].longestRule=String(n).length}return r.reduce((n,i)=>n.longestRule>=i.longestRule?n:i)}return{cardType:T.__NO_BRAND}}return{cardType:T.__NO_BRAND}},detectCardLength:(t,e)=>{let r,o,s=0,n=!1,i=e,c=t.cardType!==T.__NO_BRAND?t.permittedLengths[t.permittedLengths.length-1]:0;if(c&&i>c&&(s=i.length-c,s>0&&(i=i.substring(0,i.length-s),o=i)),t.permittedLengths.forEach(d=>{i.length===d&&(n=!0)}),i.length===c){let d=Math.floor(i.length/4);r=c+(i.length%4>0?d:d-1),t.cardType.toLowerCase()==="amex"&&(r=c+2)}return{shortenedNewValue:o,maxLength:r,reachedValidLength:n}},getShortestPermittedCardLength:()=>{if(!Ss){let t=[];T.cards.forEach(e=>{t=t.concat(e.permittedLengths??[])}),Ss=Math.min.apply(null,t)}return Ss},getCardByBrand:t=>T.cards.filter(e=>e.cardType===t)[0],isGenericCardType:t=>{if(!t)throw new Error("Error: isGenericCardType: type param has not been specified");return t==="card"||t==="scheme"},__NO_BRAND:T.__NO_BRAND,allCards:T.cards};function Ga({src:t,title:e="iframe element",policy:r="origin"}){let o=document.createElement("iframe");o.setAttribute("src",t),o.classList.add("js-iframe"),e===""||e.trim().length===0||e==="none"?o.setAttribute("role","presentation"):o.setAttribute("title",e),o.setAttribute("allowtransparency","true"),o.setAttribute("referrerpolicy",r);let s=document.createTextNode("<p>Your browser does not support iframes.</p>");return o.appendChild(s),o}var Ke=(t,e,r,o=!1)=>!(!t||typeof t.addEventListener!="function")&&(t.addEventListener(e,r,o),!0),ot=(t,e,r,o=!1)=>!(!t||typeof t.removeEventListener!="function")&&(t.removeEventListener(e,r,o),!0);var Ka=(t,e,r)=>{let o=t.origin,s=e.indexOf("/checkoutshopper/"),n=s>-1?e.substring(0,s):e,i=n.length-1;return n.charAt(i)==="/"&&(n=n.substring(0,i)),o===n||(r&&Ee(`WARNING postMessageValidation: postMessage listener for iframe::origin mismatch!
|
|
4
|
-
Received message with origin:`,o,"but the only allowed origin for messages to CSF is",n,"### event.data=",t.data),!1)},Wa=t=>t.data&&t.data.type&&typeof t.data.type=="string"&&t.data.type.indexOf("webpack")>-1,Za=t=>t.data&&typeof t.data=="string"&&t.data.indexOf("cvox")>-1;function qa(){if(!window.crypto)return 4294967296*Math.random()|0;let t=new Uint32Array(1);return window.crypto.getRandomValues(t),t[0]}function Rs(t,e){let r=typeof t;return t&&e&&r==="object"&&r===typeof e?Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(o=>Rs(t[o],e[o])):t===e}function Le(...t){let e=t,r=e.shift();return function(...o){return r.apply(this,e.concat(o))}}function G(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var uo=class{constructor(){G(this,"sfConfig",void 0),G(this,"loadingContext",void 0),G(this,"holderEl",void 0),G(this,"iframeRef",void 0),G(this,"loadToConfigTimeout",void 0),G(this,"_isValid",void 0),G(this,"_iframeContentWindow",void 0),G(this,"_numKey",void 0),G(this,"_isEncrypted",void 0),G(this,"_hasError",void 0),G(this,"_errorType",void 0),G(this,"_cvcPolicy",void 0),G(this,"_expiryDatePolicy",void 0),G(this,"_iframeOnLoadListener",void 0),G(this,"_postMessageListener",void 0),G(this,"onIframeLoadedCallback",void 0),G(this,"onConfigCallback",void 0),G(this,"onEncryptionCallback",void 0),G(this,"onValidationCallback",void 0),G(this,"onFocusCallback",void 0),G(this,"onBinValueCallback",void 0),G(this,"onTouchstartCallback",void 0),G(this,"onShiftTabCallback",void 0),G(this,"onAutoCompleteCallback",void 0),G(this,"onKeyPressedCallback",void 0),this.sfConfig={}}};var fd=(t,e)=>Object.values(Ht).reduce((r,o)=>(o.includes(e)&&(r[o]=t.get(o)),r),{}),Xa=(t,e,r)=>{let o={...t},s=_d(r);return o.error=fd(e,s),o},Ja=(t,e)=>{let r=t;for(let[o,s]of Object.entries(e))if(s===t){r=o;break}return r?.toLowerCase().replace(/[_.\s]/g,"-")},_d=t=>{let e;switch(t){case I:e=At.CC_NUM;break;case x:e=At.CC_DAT;break;case k:e=At.CC_MTH;break;case A:e=At.CC_YR;break;case D:e=At.CC_CVC;break;case he:e=At.KCP_PWD}return e};var Qa=(t,e,r,o)=>{let s={...t},n={};switch(r){case"ach":case hr:break;default:if(o===D)n[ur]=e.get("creditCard.securityCode.contextualText.3digits"),n[mr]=e.get("creditCard.securityCode.contextualText.4digits");else{let i=`creditCard.${Tt[o]}.contextualText`,c=e.get(i);c!==i&&(n[o]=c)}}return Object.keys(n).length&&(s.contextualTexts=n),s};function ei(t,e,r,o){let s=["ach","giftcard"].includes(t)?t:"creditCard",n=r.get(`${s}.${e}.aria.iframeTitle`),i=r.get(`${s}.${Tt[e]}.label`),c=r.locale,d=Xa({iframeTitle:n,label:i},r,e);return o&&(d=Qa(d,r,t,e)),{...c&&{lang:c},[e]:d}}function ti(t,e,r){return t===hr?{[e]:r[Tt[e]]??""}:e===D?{[ur]:r.securityCodeThreeDigits??"",[mr]:r.securityCodeFourDigits??""}:{[e]:r[Tt[e]]??""}}var mo=class extends uo{init(e,r,o,s){let n=ei(this.sfConfig.txVariant,this.sfConfig.fieldType,e,s);this.sfConfig.iframeUIConfig.ariaConfig=n,this.sfConfig.iframeUIConfig.placeholders=ti(this.sfConfig.txVariant,this.sfConfig.fieldType,o);let i={src:r,title:n[this.sfConfig.fieldType].iframeTitle,policy:"origin"},c=Ga(i);this.holderEl.appendChild(c);let d=we(this.holderEl,".js-iframe");return d&&(this.iframeContentWindow=d.contentWindow,this.iframeOnLoadListener=this.iframeOnLoadListenerFn,Ke(d,"load",this.iframeOnLoadListener,!1)),this.iframeRef=d,this}iframeOnLoadListenerFn(){this.postMessageListener=this.postMessageListenerFn,Ke(window,"message",this.postMessageListener,!1);let e={...this.sfConfig,numKey:this.numKey};window._b$dl&&console.log("### SecuredField:::: onIframeLoaded:: created configObj=",e),se(e,this.iframeContentWindow,this.loadingContext),this.onIframeLoadedCallback()}postMessageListenerFn(e){if(!Ka(e,this.loadingContext,this.sfConfig.showWarnings))return;let r;try{r=JSON.parse(e.data)}catch{return Wa(e)?void(this.sfConfig.showWarnings&&lo("### SecuredField::postMessageListenerFn:: PARSE FAIL - WEBPACK")):Za(e)?void(this.sfConfig.showWarnings&&lo("### SecuredField::postMessageListenerFn:: PARSE FAIL - CHROMEVOX")):void(this.sfConfig.showWarnings&&lo("### SecuredField::postMessageListenerFn:: PARSE FAIL - UNKNOWN REASON: event.data=",e.data))}if(R(r,"action")&&R(r,"numKey"))if(this.numKey===r.numKey)switch(r.action){case"encryption":this.isValid=!0,this.onEncryptionCallback(r);break;case"config":window._b$dl&&console.log("### SecuredField::postMessageListenerFn:: configured - calling onConfigCallback",r.fieldType),this.onConfigCallback(r);break;case"focus":this.onFocusCallback(r);break;case"binValue":this.onBinValueCallback(r);break;case"touch":this.onTouchstartCallback(r);break;case"shifttab":this.onShiftTabCallback(r);break;case"autoComplete":this.onAutoCompleteCallback(r);break;case"enterKeyPressed":this.onKeyPressedCallback(r);break;default:this.isValid=!1,this.onValidationCallback(r)}else this.sfConfig.showWarnings&&
|
|
5
|
-
About to set up securedField:`,n),await this.setupSecuredField(n,e,r).catch(i=>{window._b$dl&&console.log("Secured fields setup failure. e=",i)}),window._b$dl&&console.log("Finished setting up securedField:",n)}if(window._b$dl&&console.log("Finished setting up all securedFields"),this.isSingleBrandedCard){let s={type:this.state.type,rootNode:this.props.rootNode,brand:o,cvcPolicy:e,expiryDatePolicy:r,cvcText:this.securityCode};setTimeout(()=>{this.callbacks.onBrand(s)},0)}}function ni(t,e,r){return new Promise((o,s)=>{let n=
|
|
6
|
-
iframe load count=${this.state.iframeCount}. Expected count:${this.state.numIframes}`);if(c.loadToConfigTimeout=setTimeout(()=>{s({type:i.fieldType,failReason:"sf took too long to config"})},Pa),this.state.iframeCount===this.state.originalNumIframes){let d={iframesLoaded:!0};this.callbacks.onLoad(d)}}).onConfig(d=>{this.handleIframeConfigFeedback(d),clearTimeout(c.loadToConfigTimeout),c.loadToConfigTimeout=null,o(d)}).onFocus(d=>{this.handleFocus(d)}).onBinValue(d=>{this.handleBinValue(d)}).onTouchstart(d=>{this.props.shouldDisableIOSArrowKeys&&(this.hasGenuineTouchEvents||d.hasGenuineTouchEvents)&&this.callbacks.onTouchstartIOS({fieldType:d.fieldType}),(d.hasGenuineTouchEvents||this.hasGenuineTouchEvents)&&this.postMessageToAllIframes({fieldType:d.fieldType,fieldClick:!0})}).onShiftTab(d=>{this.handleSFShiftTab(d.fieldType)}).onEncryption(d=>{this.handleEncryption(d)}).onValidation(d=>{this.handleValidation(d)}).onAutoComplete(d=>{this.processAutoComplete(d)}).onKeyPressed(d=>{let{numKey:p,...u}=d;this.callbacks.onKeyPressed(u)});this.state.securedFields[n]=c})}var Cd=typeof navigator<"u"&&function(){let t=navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(t.indexOf("Trident/")>0){let o=t.indexOf("rv:");return parseInt(t.substring(o+3,t.indexOf(".",o)),10)}let r=t.indexOf("Edge/");return r>0&&parseInt(t.substring(r+5,t.indexOf(".",r)),10)}(),ke={__IS_IE:Cd,__IS_IOS:typeof navigator<"u"&&/iphone|ipod|ipad/i.test(navigator.userAgent),__IS_FIREFOX:typeof navigator<"u"&&/(firefox)/i.test(navigator.userAgent)};var jt={touchendListener:function(t){let e=t.target;if(e instanceof HTMLInputElement||HTMLTextAreaElement&&e instanceof HTMLTextAreaElement){let o=e.value,s="selectionStart"in(r=e)?r.selectionStart:0,n=!1;s===o.length&&(s-=1,n=!0),e.value=o;try{e.setSelectionRange&&(e.focus(),e.setSelectionRange(s,s),n&&(s+=1,setTimeout(()=>{e.setSelectionRange(s,s)},0)))}catch{}}else if(this.config.keypadFix){let o=this.props.rootNode,s=document.createElement("input");s.style.width="1px",s.style.height="1px",s.style.opacity="0",s.style.fontSize="18px",o.appendChild(s),s.focus(),o.removeChild(s)}var r;this.destroyTouchendListener(),this.state.registerFieldForIos=!1,this.postMessageToAllIframes({fieldType:"webInternalElement",fieldClick:!0})},touchstartListener:function(t){this.hasGenuineTouchEvents=!0;let e=t.target;if(e instanceof HTMLInputElement||e instanceof HTMLSpanElement){this.postMessageToAllIframes({fieldType:"webInternalElement",checkoutTouchEvent:!0});let r=e.getAttribute("name")??e.getAttribute("data-id");this.callbacks.onTouchstartIOS?.({fieldType:"webInternalElement",name:r})}},handleTouchend:function(){let t=we(document,"body");t.style.cursor="pointer",Ke(t,"touchend",this.touchendListener),this.state.registerFieldForIos=!0},destroyTouchendListener:function(){if(!ke.__IS_IOS)return!1;let t=we(document,"body");return t.style.cursor="auto",ot(t,"touchend",this.touchendListener),!0},destroyTouchstartListener:function(){return!!ke.__IS_IOS&&(ot(document,"touchstart",this.touchstartListener),!0)}};var st=(t,e,r)=>((o,s=!0)=>{let n=Array.prototype.slice.call(po(document,"*[data-cse], a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), object, embed, *[tabindex], *[contenteditable]")),i=[];n.forEach(d=>{let p=d.getAttribute("tabindex"),u=!p||parseInt(p,10)>=0,l=d.getBoundingClientRect(),h=l.width>0&&l.height>0;u&&h&&i.push(d)});let c=((d,p)=>{for(let u=0;u<d.length;u+=1)if(p(d[u]))return u;return-1})(i,d=>d===o||o.contains(d));return i[c+(s?-1:1)]})(we(e,`[data-cse=${t}]`),r),ai=t=>{t&&(t.focus(),t.blur(),t.focus())};function ii(t,e,r,o){let s,n;switch(t){case I:s=st(I,e);break;case x:case k:n=I;break;case A:n=k;break;case D:o===1?s=st(D,e):n=r?A:x}return{fieldToFocus:n,additionalField:s}}function li(t,e){let r,o;switch(t){case I:r=st(I,e);break;case D:o=I}return{fieldToFocus:o,additionalField:r}}function ci(t,e,r){let o,s;switch(t){case I:o=st(I,e);break;case x:case k:s=I;break;case A:s=k;break;case D:s=r?A:x;break;case he:o=st(t,e)}return{fieldToFocus:s,additionalField:o}}var Ds={handleShiftTab:function(t){let e;this.state.type==="giftcard"?e=li(t,this.props.rootNode):e=this.state.isKCP?ci(t,this.props.rootNode,this.state.hasSeparateDateFields):ii(t,this.props.rootNode,this.state.hasSeparateDateFields,this.state.numIframes);let r=e.fieldToFocus,o=e.additionalField;r?this.setFocusOnFrame(r,!1):o&&ai(o)},handleSFShiftTab:function(t){(ke.__IS_FIREFOX||ke.__IS_IE&&ke.__IS_IE<=11)&&this.handleShiftTab(t)}};function di(t){if(R(this.state.securedFields,I)){let e={txVariant:this.state.type,...t,fieldType:I,numKey:this.state.securedFields[I].numKey};se(e,ae(this.state,I),this.config.loadingContext)}}function pi(t){(R(this.state.securedFields,k)&&R(this.state.securedFields,A)?[k,A]:[x]).forEach(e=>{let r={txVariant:this.state.type,...t,fieldType:e,numKey:this.state.securedFields[e].numKey};se(r,ae(this.state,e),this.config.loadingContext)})}function ui(t,e){let r=this.state.type==="card";if(!t||!Object.keys(t).length)return r?(this.sendBrandToCardSF({brand:"reset"}),this.sendExpiryDatePolicyToSF({expiryDatePolicy:Ie})):e&&this.processBrand({...e,fieldType:I}),void(this.state.type==="card"&&R(this.state.securedFields,x)&&(this.state.securedFields[x].expiryDatePolicy=Ie));let o=t.supportedBrands[0],s=o.brand,n=o.expiryDatePolicy??(o.showExpiryDate===!0?Ie:Pt),i={brand:s,cvcPolicy:o.cvcPolicy,expiryDatePolicy:n,cvcText:"Security code",showSocialSecurityNumber:o.showSocialSecurityNumber??!1,fieldType:I};if(this.processBrand(i),r){let c={brand:s,enableLuhnCheck:t.supportedBrands[0].enableLuhnCheck!==!1,...o?.panLength&&!t.isDualBrandSelection&&{panLength:o?.panLength}};this.sendBrandToCardSF(c),this.sendExpiryDatePolicyToSF({expiryDatePolicy:n})}R(this.state.securedFields,D)&&(this.state.securedFields[D].cvcPolicy=o.cvcPolicy),R(this.state.securedFields,x)?this.state.securedFields[x].expiryDatePolicy=n:R(this.state.securedFields,k)&&R(this.state.securedFields,A)&&(this.state.securedFields[k].expiryDatePolicy=n,this.state.securedFields[A].expiryDatePolicy=n),this.validateForm()}function mi({csfState:t,csfConfig:e},r,o){if(!R(t.securedFields,r))return;let s={txVariant:t.type,fieldType:r,focus:!0,numKey:t.securedFields[r].numKey};se(s,ae(t,r),e.loadingContext)}function hi({csfState:t,csfConfig:e},r){let o=Object.keys(r||{});return o.length?(Object.keys(t.securedFields).forEach(s=>{let n={txVariant:t.type,fieldType:s,numKey:t.securedFields[s].numKey};o.forEach(i=>{n[i]=r[i]}),se(n,ae(t,s),e.loadingContext)}),!0):!1}function fi({csfState:t,csfConfig:e,csfProps:r,csfCallbacks:o},s){if(s.fieldType===I){let c={brand:s.brand,cvcPolicy:s.cvcPolicy,expiryDatePolicy:s.expiryDatePolicy,showSocialSecurityNumber:s.showSocialSecurityNumber},d=(n=c,i=t.brand,!Rs(n,i));if(!d)return null;let p=t.type==="card"||t.type==="bcmc";if(p&&d&&(t.brand=c,R(t.securedFields,D))){let l={txVariant:t.type,brand:c.brand,fieldType:D,cvcPolicy:s.cvcPolicy,numKey:t.securedFields[D].numKey};se(l,ae(t,D),e.loadingContext)}let u=p?Dt(["brand","cvcPolicy","cvcText","expiryDatePolicy","showSocialSecurityNumber"]).from(s):null;if(u&&u.brand){let l=u;l.type=t.type,l.rootNode=r.rootNode,o.onBrand(l)}return!0}var n,i;return!1}function _i({csfState:t,csfConfig:e,csfCallbacks:r},o){if(o.name==="cc-name"){let s={...o};delete s.numKey;let n=s;return r.onAutoComplete(n),!0}if(o.name==="cc-exp"){let s=o.value.replace(/[^0-9]/gi,"/").split("/");if(s.length!==2)return!1;s[0].length===1&&(s[0]=`0${s[0]}`);let n=s[0],i=s[1];if(!((i?.length===4||i?.length===2)&&!isNaN(parseInt(i))))return!1;let c=i.slice(-2),d=`${n}/${c}`;if(R(t.securedFields,x)){let p={txVariant:t.type,fieldType:x,autoComplete:d,numKey:t.securedFields[x].numKey};return se(p,ae(t,x),e.loadingContext),!0}if(R(t.securedFields,k)){let p={txVariant:t.type,fieldType:k,autoComplete:n,numKey:t.securedFields[k].numKey};se(p,ae(t,k),e.loadingContext)}return R(t.securedFields,A)&&setTimeout(()=>{let p={txVariant:t.type,fieldType:A,autoComplete:c,numKey:t.securedFields[A].numKey};se(p,ae(t,A),e.loadingContext)},0),!0}return!1}function yi({csfState:t,csfProps:e,csfCallbacks:r},o,s){let n={...s};delete n.numKey,n.rootNode=e.rootNode,n.type=t.type;let i=n.fieldType;n.focus?t.currentFocusObject!==i&&(t.currentFocusObject=i,ke.__IS_IOS&&!t.registerFieldForIos&&o()):t.currentFocusObject===i&&(t.currentFocusObject=null);let c=n;c.currentFocusObject=t.currentFocusObject,r.onFocus(c)}function gi({csfState:t,csfCallbacks:e},r,o){if(t.iframeConfigCount+=1,window._b$dl&&console.log("### handleIframeConfigFeedback::csfState.iframeConfigCount:: ",t.iframeConfigCount,"who=",o.fieldType),t.isConfigured){let s={additionalIframeConfigured:!0,fieldType:o.fieldType,type:t.type};e.onAdditionalSFConfig(s)}else if(t.iframeConfigCount===t.originalNumIframes)return r(),!0;return!1}function vi({csfState:t,csfConfig:e,csfProps:r,csfCallbacks:o},s){t.isConfigured=!0;let n={iframesConfigured:!0,type:t.type,rootNode:r.rootNode};if(o.onConfigSuccess(n),t.numIframes===1&&e.isCreditCardType){if(t.type==="card")return Cr("ERROR: Payment method with a single secured field - but 'brands' has not been set to an array containing the specific card brand"),!1;let i=Yt.getCardByBrand(t.type);i&&(i.cvcPolicy??Me)!==Me&&s()}return!0}function Ci({csfState:t,csfProps:e,csfCallbacks:r}){let o=(i=>{let c=Object.keys(i);for(let d=0,p=c.length;d<p;d+=1)if(!i[c[d]].isValid)return!1;return!0})(t.securedFields),s=o!==t.allValid;if(t.allValid=o,!o&&!s)return;let n={allValid:o,type:t.type,rootNode:e.rootNode};r.onAllValid(n)}function Ei({csfState:t,csfCallbacks:e},r){let{binValue:o,encryptedBin:s,uuid:n}=r,i={binValue:o,type:t.type};s&&(i.encryptedBin=s,i.uuid=n),e.onBinValue(i)}function bi(){this.postMessageToAllIframes({destroy:!0}),Object.keys(this.state.securedFields).forEach(t=>{let e=this.state.securedFields[t];e&&e.destroy(),this.state.securedFields[t]=null}),this.destroyTouchendListener(),this.destroyTouchstartListener(),this.state.securedFields={}}var Rr=(t="You cannot use secured fields")=>{Ee(`${t} - they are not yet configured. Use the 'onConfigSuccess' callback to know when this has happened.`)},ho=class extends io{init(){this.configHandler(this.props),this.callbacksHandler(this.props.callbacks);let e=this.createSecuredFields();this.state.numIframes=this.state.originalNumIframes=e,this.state.isKCP=!!this.props.isKCP,ke.__IS_IOS&&this.props.shouldDisableIOSArrowKeys&&(this.hasGenuineTouchEvents=!1,Ke(document,"touchstart",this.touchstartListener))}createReturnObject(){return{updateStyles:e=>{this.state.isConfigured?this.postMessageToAllIframes({styleObject:e}):Ee("You cannot update the secured fields styling - they are not yet configured. Use the 'onConfigSuccess' callback to know when this has happened.")},setFocusOnFrame:e=>{this.state.isConfigured?this.setFocusOnFrame(e):Rr("You cannot set focus on any secured field")},isValidated:(e,r)=>{if(this.state.isConfigured){if(R(this.state.securedFields,e)){this.state.securedFields[e].hasError=!0,this.state.securedFields[e].errorType===""&&(this.state.securedFields[e].errorType="isValidated");let o={txVariant:this.state.type,fieldType:e,externalValidation:!0,code:r,numKey:this.state.securedFields[e].numKey};se(o,ae(this.state,e),this.config.loadingContext)}}else Rr("You cannot set validated on any secured field")},hasUnsupportedCard:(e,r)=>{if(this.state.isConfigured){if(R(this.state.securedFields,e)){this.state.securedFields[e].hasError=!!r,this.state.securedFields[e].errorType=r;let o={txVariant:this.state.type,fieldType:e,unsupportedCard:!!r,code:r,numKey:this.state.securedFields[e].numKey};se(o,ae(this.state,e),this.config.loadingContext)}}else Rr("You cannot set hasUnsupportedCard on any secured field")},destroy:()=>{this.state.isConfigured?this.destroySecuredFields():Rr("You cannot destroy secured fields")},brandsFromBinLookup:(e,r)=>{if(!this.config.isCreditCardType)return null;this.state.isConfigured?this.handleBrandFromBinLookup(e,r):Rr("You cannot set pass brands to secured fields")},addSecuredField:e=>{let r=we(this.props.rootNode,`[data-cse="${e}"]`);r&&(this.state.numIframes+=1,this.setupSecuredField(r))},removeSecuredField:e=>{if(this.state.securedFields[e]){this.state.securedFields[e].destroy(),delete this.state.securedFields[e],this.state.numIframes-=1,this.state.iframeCount-=1;let r={additionalIframeRemoved:!0,fieldType:e,type:this.state.type};this.callbacks.onAdditionalSFRemoved(r)}},setKCPStatus:e=>{this.state.isKCP=e},sfIsOptionalOrHidden:e=>this.state.securedFields[e].isOptionalOrHidden()}}constructor(e){super(e),this.state={type:this.props.type,brand:this.props.type!=="card"?{brand:this.props.type,cvcPolicy:"required"}:{brand:null,cvcPolicy:"required"},allValid:void 0,numIframes:0,originalNumIframes:0,iframeCount:0,iframeConfigCount:0,isConfigured:!1,hasSeparateDateFields:!1,currentFocusObject:null,registerFieldForIos:!1,securedFields:{},isKCP:!1};let r={csfState:this.state,csfConfig:this.config,csfProps:this.props,csfCallbacks:this.callbacks};this.configHandler=Ua,this.callbacksHandler=Ba,this.validateForm=Le(Ci,r),this.isConfigured=Le(vi,r,this.validateForm),this.handleIframeConfigFeedback=Le(gi,r,this.isConfigured),this.processBrand=Le(fi,r),this.handleValidation=ja,this.handleEncryption=$a,this.createSecuredFields=ri,this.createNonCardSecuredFields=oi,this.createCardSecuredFields=si,this.setupSecuredField=ni,this.postMessageToAllIframes=Le(hi,r),this.handleIOSTouchEvents=jt.handleTouchend.bind(this),this.touchendListener=jt.touchendListener.bind(this),this.destroyTouchendListener=jt.destroyTouchendListener.bind(this),this.touchstartListener=jt.touchstartListener.bind(this),this.destroyTouchstartListener=jt.destroyTouchstartListener.bind(this),this.setFocusOnFrame=Le(mi,r),this.handleFocus=Le(yi,r,this.handleIOSTouchEvents),this.handleSFShiftTab=Ds.handleSFShiftTab,this.handleShiftTab=Ds.handleShiftTab,this.destroySecuredFields=bi,this.processAutoComplete=Le(_i,r),this.handleBinValue=Le(Ei,r),this.handleBrandFromBinLookup=ui,this.sendBrandToCardSF=di,this.sendExpiryDatePolicyToSF=pi,this.init()}};var Si=t=>{if(!t)throw new Error("No securedFields configuration object defined");let e={...t};try{let o=Yt.isGenericCardType(e.type);e.type=o?"card":e.type}catch{e.type="card"}if(!R(e,"rootNode"))return Cr('ERROR: SecuredFields configuration object is missing a "rootNode" property');if(Fa(e.clientKey))return Ee('WARNING: AdyenCheckout configuration object is missing a "clientKey" property.');let r=Ed(e.rootNode);return r?(e.rootNode=r,new ho(e).createReturnObject()):Cr(`ERROR: SecuredFields cannot find a valid rootNode element for ${e.type}`)},Ed=t=>{let e;return typeof t=="object"&&(e=t),typeof t!="string"||(e=we(document,t),e)?e:null};var Ri=t=>t.replace(/([a-z])([A-Z])/g,"$1_$2").toLowerCase();var fo=(t,e)=>{let r=t==="card"?"nocard":t||"nocard",o={type:r,extension:"svg"};return e.getImage(o)(r)},Pi=t=>{let e=Ri(t);return oo.includes(t)&&(e=e.substring(_a.length+1)),e};function _o(t,e,r,o){return(e!==so&&e!==no||r[t]!==0)&&o[t]}var be={handleFocus:function(t){this.numCharsInField[t.fieldType]=t.numChars,this.props.onFocus(t)},handleOnAllValid:function(t){return!this.state.detectedUnsupportedBrands&&(this.setState({isSfpValid:t.allValid},()=>{this.props.onChange(this.state,{event:"handleOnAllValid"}),this.props.onAllValid(t)}),!0)},handleOnAutoComplete:function(t){this.setState({autoCompleteName:t.value},()=>{this.props.onChange(this.state,{event:"handleOnAutoComplete",fieldType:t.fieldType}),this.setState({autoCompleteName:null})}),this.props.onAutoComplete(t)},handleOnFieldValid:function(t){return(!this.state.detectedUnsupportedBrands||t.fieldType!==I)&&(this.setState(e=>({data:{...e.data,[t.encryptedFieldName]:t.blob},valid:{...e.valid,[t.encryptedFieldName]:t.valid},errors:{...e.errors,[t.fieldType]:e.errors[t.fieldType]??!1}}),()=>{this.props.onChange(this.state,{event:"handleOnFieldValid",fieldType:t.fieldType}),this.props.onFieldValid(t)}),!0)},handleOnLoad:function(t){clearTimeout(this.csfLoadFailTimeout),this.csfLoadFailTimeout=null,this.props.onLoad(t),this.csfConfigFailTimeout=setTimeout(()=>{this.state.status!=="ready"&&(this.setState({status:"csfConfigFailure"}),this.props.onError(new v("ERROR","secured fields have failed to configure")))},this.csfConfigFailTimeoutMS)},handleOnConfigSuccess:function(t){clearTimeout(this.csfConfigFailTimeout),this.csfConfigFailTimeout=null,this.setState({status:"ready"},()=>{this.props.onConfigSuccess(t)})},handleOnBrand:function(t){this.setState(e=>{let r=_o(D,t.cvcPolicy,this.numCharsInField,e.errors),o=this.numDateFields===1?_o(x,t.expiryDatePolicy,this.numCharsInField,e.errors):null,s=this.numDateFields===2?_o(k,t.expiryDatePolicy,this.numCharsInField,e.errors):null,n=this.numDateFields===2?_o(A,t.expiryDatePolicy,this.numCharsInField,e.errors):null;return{brand:t.brand,cvcPolicy:t.cvcPolicy??Me,showSocialSecurityNumber:t.showSocialSecurityNumber,errors:{...e.errors,...ge(r)&&{[D]:r},...ge(o)&&{[x]:o},...ge(s)&&{[k]:s},...ge(n)&&{[A]:n}},expiryDatePolicy:t.expiryDatePolicy??Ie}},()=>{this.props.onChange(this.state,{event:"handleOnBrand"});let e=this.props.brandsConfiguration[t.brand]?.icon??fo(t.brand,this.props.resources);this.props.onBrand({...t,brandImageUrl:e})})},handleOnError:function(t,e=null){let r=t.error;return this.setState(o=>({errors:{...o.errors,[t.fieldType]:r||!1},...e&&{data:{...o.data,[I]:void 0}},...e&&{valid:{...o.valid,[I]:!1}},...e&&{isSfpValid:!1}}),()=>{this.props.onChange(this.state,{event:"handleOnError",fieldType:t.fieldType})}),!0},handleOnNoDataRequired:function(){this.setState({status:"ready"},()=>this.props.onChange({isSfpValid:!0}))},handleOnTouchstartIOS:function(t){this.props.disableIOSArrowKeys?.(t)},handleKeyPressed:function(t){if(t.action==="enterKeyPressed"){let e=new KeyboardEvent("keypress",{bubbles:!0,cancelable:!0,key:"Enter",code:"Enter"});this.props.handleKeyPress?.(e)}}};var Ti={type:"card",keypadFix:!0,rootNode:null,loadingContext:null,brands:[],showWarnings:!1,autoFocus:!0,trimTrailingSeparator:!0,onChange:()=>{},onLoad:()=>{},onConfigSuccess:()=>{},onAllValid:()=>{},onFieldValid:()=>{},onBrand:()=>{},onError:()=>{},onBinValue:()=>{},onFocus:()=>{},onAutoComplete:()=>{},handleKeyPress:()=>{},styles:{}};function Z(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Pr=class extends j{componentDidMount(){this.props.rootNode&&this.setRootNode(this.props.rootNode);let e=xa(this.rootNode),r=e.reduce(wa,{});this.setState({valid:r}),e.forEach(o=>{this.numCharsInField[o]=0}),this.numDateFields=e.filter(o=>o.match(/Expiry/)).length,e.length?(this.destroy(),this.initializeCSF(this.rootNode)):this.handleOnNoDataRequired()}componentDidUpdate(){this.checkForKCPFields(),this.props.onStateUpdate?.(this.state)}componentWillUnmount(){this.csf=null,clearTimeout(this.csfLoadFailTimeout),clearTimeout(this.csfConfigFailTimeout)}initializeCSF(e){let r=this.props.loadingContext,o={rootNode:e,type:this.props.type,clientKey:this.props.clientKey,cardGroupTypes:this.props.brands,autoFocus:this.props.autoFocus,trimTrailingSeparator:this.props.trimTrailingSeparator,loadingContext:r,keypadFix:this.props.keypadFix,showWarnings:this.props.showWarnings,iframeUIConfig:{sfStyles:this.props.styles},i18n:this.props.i18n,callbacks:{onLoad:this.handleOnLoad,onConfigSuccess:this.handleOnConfigSuccess,onFieldValid:this.handleOnFieldValid,onAllValid:this.handleOnAllValid,onBrand:this.handleOnBrand,onError:this.handleOnError,onFocus:this.handleFocus,onBinValue:this.props.onBinValue,onAutoComplete:this.handleOnAutoComplete,onAdditionalSFConfig:this.props.onAdditionalSFConfig,onAdditionalSFRemoved:this.props.onAdditionalSFRemoved,onTouchstartIOS:this.handleOnTouchstartIOS,onKeyPressed:this.handleKeyPressed},isKCP:this.state.hasKoreanFields,legacyInputMode:this.props.legacyInputMode,minimumExpiryDate:this.props.minimumExpiryDate,implementationType:this.props.implementationType||"components",forceCompat:this.props.forceCompat,maskSecurityCode:this.props.maskSecurityCode,exposeExpiryDate:this.props.exposeExpiryDate,shouldDisableIOSArrowKeys:!!this.props.disableIOSArrowKeys,placeholders:this.props.placeholders??{},showContextualElement:this.props.showContextualElement};this.csf=Si(o),this.csfLoadFailTimeout=setTimeout(()=>{this.state.status!=="ready"&&(this.setState({status:"csfLoadFailure"}),this.props.onError(new v("ERROR","secured field iframes have failed to load")))},this.csfLoadFailTimeoutMS)}checkForKCPFields(){let e=!1;if(this.props.koreanAuthenticationRequired&&(e=this.issuingCountryCode?this.issuingCountryCode==="kr":this.props.countryCode==="kr"),this.state.hasKoreanFields&&!e){let r=o=>({data:{...o.data,[he]:void 0},valid:{...o.valid,[he]:!1},errors:{...o.errors,[he]:!1},hasKoreanFields:!1});this.setState(r,()=>{this.props.onChange(this.state)}),this.csf.removeSecuredField(he),this.csf.setKCPStatus(!1)}if(!this.state.hasKoreanFields&&e){let r=o=>({valid:{...o.valid,[he]:!1},hasKoreanFields:!0,isSfpValid:!1});this.setState(r,()=>{this.props.onChange(this.state)}),this.csf.addSecuredField(he),this.csf.setKCPStatus(!0)}}getChildContext(){return{i18n:this.props.i18n}}handleUnsupportedCard(e){let r=!!e.error;return r&&this.setState({detectedUnsupportedBrands:e.detectedBrands}),e.rootNode=this.rootNode,this.handleOnError(e,r),this.csf&&this.csf.hasUnsupportedCard(I,e.error),r}setFocusOn(e){this.csf&&this.csf.setFocusOnFrame(e)}updateStyles(e){this.csf&&this.csf.updateStyles(e)}sfIsOptionalOrHidden(e){return this.csf.sfIsOptionalOrHidden(e)}destroy(){this.csf&&this.csf.destroy()}showValidation(){let{numDateFields:e,state:r}=this;Object.keys(r.valid).reduce(ka(e,r),[]).forEach(o=>{let s=Na(o,this.rootNode,r);this.handleOnError(s,!!r.detectedUnsupportedBrands),this.csf&&this.csf.isValidated&&this.csf.isValidated(o,s.error)})}mapErrorsToValidationRuleResult(){return Object.keys(this.state.errors).reduce((e,r)=>{let o=this.state.errors[r];return e[r]=o?{isValid:!1,errorMessage:Ja(o,Ht),errorI18n:this.props.i18n.get(o),error:o,rootNode:this.rootNode,...this.state.detectedUnsupportedBrands&&{detectedBrands:this.state.detectedUnsupportedBrands}}:null,e},{})}processBinLookupResponse(e,r){if(this.state.detectedUnsupportedBrands&&(this.setState(n=>({errors:{...n.errors,[I]:!1},detectedUnsupportedBrands:null})),this.csf&&e)){let n={type:"card",fieldType:"encryptedCardNumber",error:""};this.handleUnsupportedCard(n)}this.issuingCountryCode=e?.issuingCountryCode?.toLowerCase();let o=r?.brand,s=o&&va.includes(r.brand);s&&this.setState(r,()=>{this.props.onChange(this.state)}),this.csf&&this.csf.brandsFromBinLookup(e,s?r:null)}render(e,r){return e.render({setRootNode:this.setRootNode,setFocusOn:this.setFocusOn},r)}constructor(e){super(e),Z(this,"csfLoadFailTimeout",void 0),Z(this,"csfLoadFailTimeoutMS",void 0),Z(this,"csfConfigFailTimeout",void 0),Z(this,"csfConfigFailTimeoutMS",void 0),Z(this,"numCharsInField",void 0),Z(this,"rootNode",void 0),Z(this,"numDateFields",void 0),Z(this,"csf",void 0),Z(this,"handleOnLoad",void 0),Z(this,"handleOnConfigSuccess",void 0),Z(this,"handleOnFieldValid",void 0),Z(this,"handleOnAllValid",void 0),Z(this,"handleOnBrand",void 0),Z(this,"handleFocus",void 0),Z(this,"handleOnError",void 0),Z(this,"handleOnAutoComplete",void 0),Z(this,"handleOnNoDataRequired",void 0),Z(this,"handleOnTouchstartIOS",void 0),Z(this,"handleKeyPressed",void 0),Z(this,"state",void 0),Z(this,"props",void 0),Z(this,"issuingCountryCode",void 0),Z(this,"setRootNode",o=>{this.rootNode=o});let r={status:"loading",brand:e.type,errors:{},valid:{},data:{},cvcPolicy:Me,expiryDatePolicy:Ie,isSfpValid:!1,hasKoreanFields:e.hasKoreanFields};this.state=r,this.csfLoadFailTimeout=null,this.csfLoadFailTimeoutMS=3e4,this.csfConfigFailTimeout=null,this.csfConfigFailTimeoutMS=15e3,this.numCharsInField={},this.handleOnLoad=be.handleOnLoad.bind(this),this.handleOnConfigSuccess=be.handleOnConfigSuccess.bind(this),this.handleOnFieldValid=be.handleOnFieldValid.bind(this),this.handleOnAllValid=be.handleOnAllValid.bind(this),this.handleOnBrand=be.handleOnBrand.bind(this),this.handleFocus=be.handleFocus.bind(this),this.handleOnError=be.handleOnError.bind(this),this.handleOnNoDataRequired=be.handleOnNoDataRequired.bind(this),this.handleOnAutoComplete=be.handleOnAutoComplete.bind(this),this.handleOnTouchstartIOS=be.handleOnTouchstartIOS.bind(this),this.handleKeyPressed=be.handleKeyPressed.bind(this),this.processBinLookupResponse=this.processBinLookupResponse.bind(this),this.setFocusOn=this.setFocusOn.bind(this),this.updateStyles=this.updateStyles.bind(this),this.handleUnsupportedCard=this.handleUnsupportedCard.bind(this),this.showValidation=this.showValidation.bind(this),this.destroy=this.destroy.bind(this)}};Z(Pr,"defaultProps",Ti);function Ai(t){let[e,r]=t;return{dualBrandSelectElements:[{id:e.brand,brandObject:e},{id:r.brand,brandObject:r}],selectedBrandValue:e.brand,leadBrand:e}}var bd=(t,e)=>t.reduce((r,o)=>r||e.includes(o.brand),!1),Di=t=>t.map(e=>({...e})),Sd=(t,e="mc",r="visa")=>{let o=Di(t);return o[0].brand!==e&&o[0].brand!==r&&o.reverse(),o.length=1,o};function Ii(t,e,r,o={}){let{type:s,cvcPolicy:n}=t,{sfp:i}=e,{dualBrandSelectElements:c,setDualBrandSelectElements:d,setSelectedBrandValue:p,issuingCountryCode:u,setIssuingCountryCode:l}=r;return{processBinLookup:(h,m)=>{let y=h?.issuingCountryCode?h.issuingCountryCode.toLowerCase():null;if(l(y),!h||!Object.keys(h).length){d([]),p("");let E=m&&s!=="card"?s:null;return i.current.processBinLookupResponse(h,{brand:E,cvcPolicy:n}),void(o.current=0)}if(h.supportedBrands?.length){let E=bd(h.supportedBrands,Ra),C=E?Sd(h.supportedBrands):Di(h.supportedBrands);if(C.length>1){let _=Ai(C);d(_.dualBrandSelectElements),p(_.selectedBrandValue),i.current.processBinLookupResponse({issuingCountryCode:h.issuingCountryCode,supportedBrands:[_.leadBrand]}),_.leadBrand.panLength>0&&(o.current=_.leadBrand.panLength)}else d([]),p(""),E||p(C[0].brand),i.current.processBinLookupResponse({issuingCountryCode:h.issuingCountryCode,supportedBrands:C}),C[0].panLength>0&&(o.current=C[0].panLength)}},handleDualBrandSelection:h=>{let m=h;if(h instanceof Event){let E=h.target;m=E.getAttribute("data-value")||E.getAttribute("value")}let y=[];m&&(y=c.reduce((E,C)=>(C.brandObject.brand===m&&E.push(C.brandObject),E),[]),y.length&&(p(m),i.current.processBinLookupResponse({issuingCountryCode:u,supportedBrands:y,isDualBrandSelection:!0})))}}}var xi=ra(void 0),$t=({i18n:t,loadingContext:e,resources:r,children:o})=>(ze(()=>{t&&e&&r||console.warn(`CoreProvider - WARNING core provider is missing:${t?"":"i18n"} ${e?"":"loadingContext"} ${r?"":"resources"}`)},[t,e,r]),f(xi.Provider,{value:{i18n:t,loadingContext:e,resources:r}},_s(o))),nt=()=>{let t=ma(xi);if(t===void 0)throw new Error('"useCoreContext" must be used within a CoreProvider');return t};function wi(){let{resources:t}=nt();return ua(e=>t?.getImage(e),[])}var yo="threeDS2Fingerprint",It="3DS2Fingerprint_Error",go="callSubmit3DS2Fingerprint_Response",vo="threeDS2Challenge",Se="3DS2Challenge_Error",Re="threeDS2",at="3DS2",We='Missing "token" property from threeDS2 action',Co="02";var xt="timeout",ki={result:{transStatus:"U"},type:"challengeResult",errorCode:xt},Ni={result:{threeDSCompInd:"N"},type:"fingerPrintResult",errorCode:xt},Is={"01":["250px","400px"],"02":["390px","400px"],"03":["500px","600px"],"04":["600px","400px"],"05":["100%","100%"]};var zt=(t,e=!1)=>{let r;try{r=new URL(t)}catch{return!1}return e&&r.protocol==="http:"||r.protocol==="https:"};function Oi(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var xs={exports:{}};var Fi;function Mi(){return Fi||(Fi=1,t=xs,function(){var e={}.hasOwnProperty;function r(){for(var n="",i=0;i<arguments.length;i++){var c=arguments[i];c&&(n=s(n,o(c)))}return n}function o(n){if(typeof n=="string"||typeof n=="number")return n;if(typeof n!="object")return"";if(Array.isArray(n))return r.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var i="";for(var c in n)e.call(n,c)&&n[c]&&(i=s(i,c));return i}function s(n,i){return i?n?n+" "+i:n+i:n}t.exports?(r.default=r,t.exports=r):window.classNames=r}()),xs.exports;var t}var Ue=Oi(Mi());var wt=({inline:t=!1,size:e="large"})=>f("div",{"data-testid":"spinner",className:"adyen-checkout__spinner__wrapper "+(t?"adyen-checkout__spinner__wrapper--inline":"")},f("div",{className:`adyen-checkout__spinner adyen-checkout__spinner--${e}`}));function Gt(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=16*Math.random()|0;return(t=="x"?e:3&e|8).toString(16)})}function Li(t){let{backgroundUrl:e="",className:r="",classNameModifiers:o=[],src:s="",alt:n="",showOnError:i=!1}=t,[c,d]=ye(!1),p=rt(null),u=()=>{d(!0)},l=Ue([r],"adyen-checkout__image",{"adyen-checkout__image--loaded":c},...o.map(h=>`adyen-checkout__image--${h}`));return ze(()=>{let h=e?new Image:p.current;h.src=e||s,h.onload=u,d(!!h.complete)},[]),e?f("div",{"data-testid":"background",style:{backgroundUrl:e},...t,className:l}):f("img",{...t,alt:n,ref:p,className:l,onError:()=>{d(i)}})}function ks(t){let e=t.replace("_","-"),r=new RegExp("([a-z]{2})([-])([A-Z]{2})");if(r.test(e))return e;let[o,s]=e.split("-");if(o.length!==2)throw new v("IMPLEMENTATION_ERROR",`Locale '${t}' does not match the expected format`);if(!s)return o.toLowerCase();let n=[o.toLowerCase(),s.toUpperCase()].join("-");if(r.test(n))return n;throw new v("IMPLEMENTATION_ERROR",`Locale '${t}' does not match the expected format`)}function Ui(t={}){return Object.keys(t).reduce((e,r)=>(e[ks(r)]=t[r],e),{})}var ws=(t,e)=>t.replace(/%{(\w+)}/g,(r,o)=>e[o]||""),Bi=(t,e,r={values:{},count:0})=>{let o=`${e}__plural`,s=n=>`${e}__${n}`;return Object.prototype.hasOwnProperty.call(t,s(r.count))?ws(t[s(r.count)],r.values):Object.prototype.hasOwnProperty.call(t,o)&&r.count>1?ws(t[o],r.values):Object.prototype.hasOwnProperty.call(t,e)?ws(t[e],r.values):null};var Vi="https://checkoutshopper-live.adyen.com/checkoutshopper/",Hi=["amount","secondaryAmount","countryCode","environment","_environmentUrls","loadingContext","i18n","modules","order","session","clientKey","showPayButton","redirectFromTopWhenInIframe","onPaymentCompleted","onPaymentFailed","beforeRedirect","beforeSubmit","onSubmit","onActionHandled","onAdditionalDetails","onChange","onEnterKeyPressed","onError","onBalanceCheck","onOrderCancel","onOrderRequest","onOrderUpdated","onPaymentMethodsRequest"];function Yi(t,e){let{headers:r=[],errorLevel:o="warn",errorCode:s,loadingContext:n=Vi,method:i="GET",path:c,timeout:d=6e4}=t,p={method:i,mode:"cors",cache:"default",credentials:"same-origin",headers:{Accept:"application/json, text/plain, */*","Content-Type":i==="POST"?"application/json":"text/plain",...r},redirect:"follow",referrerPolicy:"no-referrer-when-downgrade",...AbortSignal?.timeout&&{signal:AbortSignal?.timeout(d)},...e&&{body:JSON.stringify(e)}},u=`${n}${c}`;return fetch(u,p).then(async l=>{let h=await l.json();if(l.ok)return h;if(function(m){return m&&m.errorCode&&m.errorType&&m.message&&m.status}(h))return void Ns({message:h.message,level:o,cause:h,code:s});Ns({message:t.errorMessage||`Service at ${u} is not available`,level:o,cause:h,code:s})}).catch(l=>{if(l instanceof v)throw l;Ns({message:t.errorMessage||`Call to ${u} failed. Error= ${l}`,level:o,cause:l,code:s})})}function Ns({message:t,level:e,cause:r,code:o}){switch(e){case"silent":break;case"info":case"warn":case"error":console[e](t);break;default:throw new v("NETWORK_ERROR",t,{cause:r,code:o})}}function Os(t,e){return Yi({...t,method:"GET"},e)}function J(t,e){return Yi({...t,method:"POST"},e)}var ji=(t,e=300)=>{let r;return function(...o){clearTimeout(r),r=setTimeout(()=>t.apply(this,o),e)}};function Eo(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Tr=class extends j{render(){let{classNameModifiers:e=[],disabled:r,href:o,icon:s,inline:n,label:i,ariaLabel:c,status:d,variant:p,buttonRef:u}=this.props,{completed:l}=this.state,{i18n:h}=nt(),m=s?f("img",{className:"adyen-checkout__button__icon",src:s,alt:"","aria-hidden":"true"}):"",y=[...e,...p!=="primary"?[p]:[],...n?["inline"]:[],...l?["completed"]:[],...d==="loading"||d==="redirect"?["loading"]:[]],E=Ue(["adyen-checkout__button",...y.map(g=>`adyen-checkout__button--${g}`)]),C={loading:f("span",{className:"adyen-checkout__button__content"},f(wt,{size:"medium",inline:!0}),f("span",{className:"adyen-checkout__button__text--sr-only"},h.get("loading"))),redirect:f("span",{className:"adyen-checkout__button__content"},f(wt,{size:"medium",inline:!0}),h.get("payButton.redirecting")),default:f("span",{className:"adyen-checkout__button__content"},m,f("span",{className:"adyen-checkout__button__text"},i))},_=C[d]||C.default;return o?f("a",{className:E,href:o,disabled:r,target:this.props.target,rel:this.props.rel},_):f("button",{ref:u,className:E,type:"button",disabled:r,onClick:this.onClick,onKeyDown:this.onKeyDown,"aria-label":c},_,d!=="loading"&&d!=="redirect"&&this.props.children)}constructor(...e){super(...e),Eo(this,"onClick",r=>{r.preventDefault(),this.props.disabled||this.props.onClick(r,{complete:this.complete})}),Eo(this,"complete",(r=1e3)=>{this.setState({completed:!0}),setTimeout(()=>{this.setState({completed:!1})},r)}),Eo(this,"onKeyDown",r=>{this.props.onKeyDown?.(r)})}};Eo(Tr,"defaultProps",{status:"default",variant:"primary",disabled:!1,label:"",inline:!1,target:"_self",onClick:()=>{}});var Fs="v3/analytics",$i=1e4;var Ne={log:"log",error:"error",info:"info"},Q={network:"Network",apiError:"ApiError",sdkError:"SdkError",redirect:"Redirect"},zi={redirect:"600"},e1=function(t){return t.clicked="clicked",t.rendered="rendered",t}({}),Gi="action",Ms="submit",bo="selected",Be="rendered";var Ki="validationError",Wi="focus",Zi="unfocus";var So="instant_payment_button";var $=function(t){return t.ACTION_IS_MISSING_PAYMENT_DATA="700",t.ACTION_IS_MISSING_TOKEN="701",t.TOKEN_IS_MISSING_THREEDSMETHODURL="702",t.TOKEN_IS_MISSING_OTHER_PROPS="703",t.TOKEN_DECODE_OR_PARSING_FAILED="704",t.THREEDS2_TIMEOUT="705",t.TOKEN_IS_MISSING_ACSURL="800",t.NO_TRANSSTATUS="801",t.NO_DETAILS_FOR_FRICTIONLESS_OR_REFUSED="802",t.NO_COMPONENT_FOR_ACTION="803",t.NO_ACTION_FOR_CHALLENGE="804",t.CHALLENGE_RESOLVED_WITHOUT_RESULT_PROP="805",t}({}),Ve=function(t){return t.FINGERPRINT_DATA_SENT="fingerprintDataSentWeb",t.FINGERPRINT_IFRAME_LOADED="fingerprintIframeLoaded",t.FINGERPRINT_COMPLETED="fingerprintCompleted",t.CHALLENGE_DATA_SENT="challengeDataSentWeb",t.CHALLENGE_IFRAME_LOADED="challengeIframeLoaded",t.CHALLENGE_COMPLETED="challengeCompleted",t}({}),Ls={[Ta]:"925",[Aa]:"942",[Da]:"926",[`${Ge}.country`]:"930",[`${Ge}.street`]:"931",[`${Ge}.house_number_or_name`]:"932",[`${Ge}.postal_code`]:"933",[`${Ge}.city`]:"935",[`${Ge}.state_or_province`]:"936",[`${ao}.postal_code`]:"934"},Ro=["cart","minicart","pdp","checkout"],qi=["applicationInfo","checkoutAttemptId"],Xi="fetch-checkoutAttemptId-failed",Us={all:"all",initial:"initial"};var Ji=t=>t.replace(/[^0-9]/g,"");var Qi=()=>Date.now(),el=(t,e)=>{if(t===Ge||t===ao)return Ls[`${t}.${e}`]??t;let r=Ls[t]??t;return isNaN(Number(r))&&(r=Ji(r)),r},tl=t=>Object.keys(t).reduce((e,r)=>(qi.includes(r)&&(e[r]=t[r]),e),{});function Bs(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var it=class{constructor(){Bs(this,"timestamp",void 0),Bs(this,"id",void 0),Bs(this,"component",void 0),this.id=Gt(),this.timestamp=String(Qi())}};function He(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ue=class extends it{getEventCategory(){return Ne.info}constructor(e){return super(),He(this,"type",void 0),He(this,"target",void 0),He(this,"issuer",void 0),He(this,"isExpress",void 0),He(this,"expressPage",void 0),He(this,"isStoredPaymentMethod",void 0),He(this,"brand",void 0),He(this,"validationErrorCode",void 0),He(this,"validationErrorMessage",void 0),He(this,"configData",void 0),this.component=e.component,this.type=e.type,this.target=e.target,this.issuer=e.issuer,this.isExpress=e.isExpress,this.isStoredPaymentMethod=e.isStoredPaymentMethod,this.isExpress=e.isExpress,this.expressPage=e.expressPage,this.brand=e.brand,this.validationErrorCode=e.validationErrorCode,this.validationErrorMessage=e.validationErrorMessage,this.configData=e.configData,this.type===Ki&&(this.validationErrorCode=el(this.validationErrorCode,this.target)),this}};function lt(){let t=xe(window,"screen.colorDepth")||"",e=xe(window,"screen.height")||"",r=xe(window,"screen.width")||"",o=xe(window,"navigator.userAgent")||"";return{acceptHeader:"*/*",colorDepth:t,language:xe(window,"navigator.language")||"en",javaEnabled:!1,screenHeight:e,screenWidth:r,userAgent:o,timeZoneOffset:new Date().getTimezoneOffset()}}var rl=t=>{let e=null;return r=>{if(t.props.doBinLookup!==!1){if(r.encryptedBin&&t.props.clientKey)e=r.uuid,J({loadingContext:t.props.loadingContext,path:`v3/bin/binLookup?token=${t.props.clientKey}`},{type:t.props.brand,supportedBrands:t.props.brands||Rt,encryptedBin:r.encryptedBin,requestId:r.uuid}).then(o=>{if(o?.requestId===e)if(o.brands?.length){let s=o.brands.reduce((n,i)=>(n.detectedBrands.push(i.brand),n.paymentMethodVariants.push(i.paymentMethodVariant),i.supported===!0&&n.supportedBrands.push(i),n),{supportedBrands:[],detectedBrands:[],paymentMethodVariants:[]});if(s.supportedBrands.length)return t.processBinLookupResponse({issuingCountryCode:o.issuingCountryCode,supportedBrands:s.supportedBrands,...o.showSocialSecurityNumber?{showSocialSecurityNumber:o.showSocialSecurityNumber}:{}}),void t.onBinLookup({type:r.type,detectedBrands:s.detectedBrands,supportedBrands:s.supportedBrands.map(n=>n.brand),paymentMethodVariants:s.paymentMethodVariants,supportedBrandsRaw:s.supportedBrands,brands:t.props.brands||Rt,issuingCountryCode:o.issuingCountryCode});if(s.detectedBrands.length){let n={type:"card",fieldType:"encryptedCardNumber",error:Ht.ERROR_MSG_UNSUPPORTED_CARD_ENTERED,detectedBrands:s.detectedBrands};return t.handleUnsupportedCard(n),void t.onBinLookup({type:r.type,detectedBrands:s.detectedBrands,supportedBrands:null,paymentMethodVariants:s.paymentMethodVariants,brands:t.props.brands||Rt})}}else t.onBinLookup({type:r.type,detectedBrands:null,supportedBrands:null,paymentMethodVariants:null,brands:t.props.brands||Rt}),t.processBinLookupResponse({},!0);else o?.requestId||t.props.onError(o||{errorType:"binLookup",message:"unknownError"})});else if(e){t.processBinLookupResponse(null,!0),e=null;let o={type:"card",fieldType:"encryptedCardNumber",error:""};t.handleUnsupportedCard(o),t.onBinLookup({isReset:!0})}t.props.onBinValue&&t.props.onBinValue(r)}else t.props.onBinValue&&t.props.onBinValue(r)}};function ct(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Kt=class{constructor(e,r="body",o={},s={}){ct(this,"src",void 0),ct(this,"node",void 0),ct(this,"attributes",void 0),ct(this,"dataAttributes",void 0),ct(this,"isScriptLoadCalled",!1),ct(this,"script",void 0),ct(this,"load",()=>{if(!this.isScriptLoadCalled)return new Promise((n,i)=>{let c=()=>{this.script.setAttribute("data-script-loaded","true"),n()},d=u=>{this.remove(),i(new v("SCRIPT_ERROR",`Unable to load script ${this.src}. Message: ${u.message}`,{cause:u.error}))};this.isScriptLoadCalled=!0;let p=document.querySelector(this.node);if(this.script=p.querySelector(`script[src="${this.src}"]`),this.script&&this.script.getAttribute("data-script-loaded"))n();else{if(this.script)return this.script.addEventListener("load",c),void this.script.addEventListener("error",d);this.script=document.createElement("script"),Object.assign(this.script,this.attributes),Object.assign(this.script.dataset,this.dataAttributes),this.script.src=this.src,this.script.async=!0,this.script.addEventListener("load",c),this.script.addEventListener("error",d),p.appendChild(this.script)}})}),ct(this,"remove",()=>this.script.parentNode&&this.script.parentNode.removeChild(this.script)),this.src=e,this.node=r,this.attributes=o,this.dataAttributes=s}};var Pd=(t,e)=>e?.value&&e?.currency?t.amount(e.value,e.currency,{currencyDisplay:e.currencyDisplay||"symbol"}):"",ol=(t,e)=>`${t.get("payButton")} ${Pd(t,e)}`,sl=(t,e)=>{let r=e&&e?.value&&e?.currency?t.amount(e.value,e.currency,{currencyDisplay:e.currencyDisplay||"symbol"}):"";return`${r.length?"/ ":""}${r}`};var nl=({label:t})=>f("span",{className:"checkout-secondary-button__text"},t);var al=({amount:t,secondaryAmount:e,classNameModifiers:r=[],label:o,...s})=>{let{i18n:n}=nt(),i=t&&{}.hasOwnProperty.call(t,"value")&&t.value===0,c=i?n.get("confirmPreauthorization"):ol(n,t),d=!i&&!o&&t&&e&&Object.keys(e).length?sl(n,e):null;return f(Tr,{...s,disabled:s.disabled||s.status==="loading",classNameModifiers:[...r,"pay"],label:o||c},d&&f(nl,{label:d}))};function il(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ze=class extends j{iframeOnLoad(){this.props.callback&&typeof this.props.callback=="function"&&this.props.callback(this.iframeEl.contentWindow)}componentDidMount(){this.iframeEl.addEventListener?this.iframeEl.addEventListener("load",this.iframeOnLoad.bind(this),!1):this.iframeEl.attachEvent?this.iframeEl.attachEvent("onload",this.iframeOnLoad.bind(this)):this.iframeEl.onload=this.iframeOnLoad.bind(this)}componentWillUnmount(){this.iframeEl.removeEventListener?this.iframeEl.removeEventListener("load",this.iframeOnLoad.bind(this),!1):this.iframeEl.detachEvent?this.iframeEl.detachEvent("onload",this.iframeOnLoad.bind(this)):this.iframeEl.onload=null}render({name:e,src:r,width:o,height:s,minWidth:n,minHeight:i,allow:c,title:d,classNameModifiers:p}){let u=p.filter(l=>!!l);return f("iframe",{ref:l=>{this.iframeEl=l},allow:c,className:Ue("adyen-checkout__iframe",`adyen-checkout__iframe--${e}`,u.length&&p.map(l=>`adyen-checkout__iframe--${e}-${l}`)),name:e,src:r,width:o,height:s,frameBorder:"0",title:d,referrerpolicy:"origin","min-width":n,"min-height":i})}constructor(...e){super(...e),il(this,"iframeEl",void 0)}};il(Ze,"defaultProps",{width:"0",height:"0",minWidth:"0",minHeight:"0",src:null,allow:null,title:"components iframe",classNameModifiers:[]});var ee=function(t){return t.address="address",t.bankTransfer_IBAN="bankTransfer_IBAN",t.bankTransfer_BE="bankTransfer_BE",t.bankTransfer_NL="bankTransfer_NL",t.bankTransfer_PL="bankTransfer_PL",t.bankTransfer_FR="bankTransfer_FR",t.bankTransfer_CH="bankTransfer_CH",t.bankTransfer_IE="bankTransfer_IE",t.bankTransfer_GB="bankTransfer_GB",t.bankTransfer_DE="bankTransfer_DE",t.donation="donation",t.personal_details="personal_details",t.dropin="dropin",t.bcmc="bcmc",t.card="card",t.scheme="scheme",t.storedCard="storedCard",t.customCard="customcard",t.threeDS2Challenge="threeDS2Challenge",t.threeDS2Fingerprint="threeDS2Fingerprint",t.threeDS2DeviceFingerprint="threeDS2DeviceFingerprint",t.ach="ach",t.directdebit_GB="directdebit_GB",t.sepadirectdebit="sepadirectdebit",t.eft_directdebit_CA="eft_directdebit_CA",t.affirm="affirm",t.afterpay="afterpay",t.afterpay_default="afterpay_default",t.afterpay_b2b="afterpay_b2b",t.atome="atome",t.facilypay_3x="facilypay_3x",t.facilypay_4x="facilypay_4x",t.facilypay_6x="facilypay_6x",t.facilypay_10x="facilypay_10x",t.facilypay_12x="facilypay_12x",t.ratepay="ratepay",t.ratepay_directdebit="ratepay_directdebit",t.amazonpay="amazonpay",t.applepay="applepay",t.cashapp="cashapp",t.clicktopay="clicktopay",t.googlepay="googlepay",t.paypal="paypal",t.fastlane="fastlane",t.paywithgoogle="paywithgoogle",t.boletobancario="boletobancario",t.boletobancario_itau="boletobancario_itau",t.boletobancario_santander="boletobancario_santander",t.primeiropay_boleto="primeiropay_boleto",t.doku="doku",t.doku_alfamart="doku_alfamart",t.doku_permata_lite_atm="doku_permata_lite_atm",t.doku_indomaret="doku_indomaret",t.doku_atm_mandiri_va="doku_atm_mandiri_va",t.doku_sinarmas_va="doku_sinarmas_va",t.doku_mandiri_va="doku_mandiri_va",t.doku_cimb_va="doku_cimb_va",t.doku_danamon_va="doku_danamon_va",t.doku_bri_va="doku_bri_va",t.doku_bni_va="doku_bni_va",t.doku_bca_va="doku_bca_va",t.doku_wallet="doku_wallet",t.oxxo="oxxo",t.billdesk_online="billdesk_online",t.billdesk_wallet="billdesk_wallet",t.dotpay="dotpay",t.eps="eps",t.molpay_ebanking_fpx_MY="molpay_ebanking_fpx_MY",t.molpay_ebanking_TH="molpay_ebanking_TH",t.molpay_ebanking_VN="molpay_ebanking_VN",t.onlineBanking_CZ="onlineBanking_CZ",t.onlinebanking_IN="onlinebanking_IN",t.onlineBanking_PL="onlineBanking_PL",t.onlineBanking_SK="onlineBanking_SK",t.paybybank="paybybank",t.payu_IN_cashcard="payu_IN_cashcard",t.payu_IN_nb="payu_IN_nb",t.wallet_IN="wallet_IN",t.dragonpay="dragonpay",t.dragonpay_ebanking="dragonpay_ebanking",t.dragonpay_otc_banking="dragonpay_otc_banking",t.dragonpay_otc_non_banking="dragonpay_otc_non_banking",t.dragonpay_otc_philippines="dragonpay_otc_philippines",t.econtext="econtext",t.econtext_atm="econtext_atm",t.econtext_online="econtext_online",t.econtext_seven_eleven="econtext_seven_eleven",t.econtext_stores="econtext_stores",t.giropay="giropay",t.multibanco="multibanco",t.redirect="redirect",t.twint="twint",t.vipps="vipps",t.trustly="trustly",t.paybybank_AIS_DD="paybybank_AIS_DD",t.riverty="riverty",t.paybybank_pix="paybybank_pix",t.klarna="klarna",t.klarna_account="klarna_account",t.klarna_paynow="klarna_paynow",t.klarna_b2b="klarna_b2b",t.bcmc_mobile="bcmc_mobile",t.bcmc_mobile_QR="bcmc_mobile_QR",t.pix="pix",t.swish="swish",t.wechatpay="wechatpay",t.wechatpayQR="wechatpayQR",t.promptpay="promptpay",t.paynow="paynow",t.duitnow="duitnow",t.blik="blik",t.mbway="mbway",t.ancv="ancv",t.payto="payto",t.upi="upi",t.upi_qr="upi_qr",t.upi_collect="upi_collect",t.upi_intent="upi_intent",t.giftcard="giftcard",t.mealVoucher_FR="mealVoucher_FR",t.mealVoucher_FR_natixis="mealVoucher_FR_natixis",t.mealVoucher_FR_sodexo="mealVoucher_FR_sodexo",t.mealVoucher_FR_groupeup="mealVoucher_FR_groupeup",t}({});function kt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var qe=class{buildElementProps(e){this.props=this.formatProps({...this.constructor.defaultProps,...e})}formatProps(e){return e}formatData(){return{}}setUpAnalytics(e){return null}submitAnalytics(e){return null}handleKeyPress(e){return null}setState(e){this.state={...this.state,...e}}get data(){let e=xe(this.props,"modules.risk.data"),r=xe(this.props,"modules.analytics.getCheckoutAttemptId")?.()??Xi,o=this.state.order||this.props.order,s=this.formatData();return s.paymentMethod&&r&&(s.paymentMethod.checkoutAttemptId=r),{...e&&{riskData:{clientData:e}},...o&&{order:{orderData:o.orderData,pspReference:o.pspReference}},...s,clientStateDataIndicator:!0}}activate(){}render(){throw new Error("Payment method cannot be rendered.")}mount(e){let r=typeof e=="string"?document.querySelector(e):e;if(!r)throw new Error("Component could not mount. Root node was not found.");let o=!this._node;return this._node&&this.unmount(),this._node=r,Ke(this._node,"keypress",this.handleKeyPress,!1),this._component=this.render(),vs(this._component,r),o&&this.props.modules&&this.props.modules.analytics&&this.setUpAnalytics({containerWidth:r&&r.offsetWidth,component:this.props.isDropin?"dropin":this.constructor.analyticsType??this.constructor.type,flavor:this.props.isDropin?"dropin":"components"}).then(()=>{if(!this.props.isDropin){let s=new ue({type:Be});this.submitAnalytics(s)}}),this}update(e){return this.props=this.formatProps({...this.props,...e}),this.state={},this.unmount().mount(this._node)}unmount(){return ot(this._node,"keypress",this.handleKeyPress),this._node&&vs(null,this._node),this}remove(){this.unmount(),this.core&&this.core.remove(this)}constructor(e,r){if(kt(this,"_id",`${this.constructor.type}-${Gt()}`),kt(this,"core",void 0),kt(this,"props",void 0),kt(this,"state",{}),kt(this,"_component",void 0),kt(this,"_node",null),!function(s){return!!s&&typeof s.initialize=="function"&&typeof s.createFromAction=="function"}(e))throw new v("IMPLEMENTATION_ERROR",`Trying to initialise the component '${this.constructor.type}' without a reference to an instance of AdyenCheckout`);this.core=e,this.buildElementProps(r),this.handleKeyPress=this.handleKeyPress.bind(this)}};kt(qe,"defaultProps",{});var Td=["action","resultCode","sessionData","order","sessionResult","donationToken","error"];function Xe(t){let e=[],r=Object.keys(t).reduce((o,s)=>(Td.includes(s)?o[s]=t[s]:e.push(s),o),{});return e.length&&console.warn(`The following properties should not be passed to the client: ${e.join(", ")}`),r}function Wt(t){t&&(delete t.order,delete t.action,t.donationToken&&t.donationToken.length!==0||delete t.donationToken)}function Je(t){return["Cancelled","Error","Refused"].includes(t.resultCode)?Promise.reject(t):Promise.resolve(t)}function Po(t){return t?typeof t.activePaymentMethod=="object"&&typeof t.closeActivePaymentMethod=="function":!1}function ll(t,e){return t==="FI"&&e?{openFirstPaymentMethod:!1,openFirstStoredPaymentMethod:!1}:{}}var dt=class extends Error{constructor(e){super(e)}};function Ar(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var de=class extends it{getEventCategory(){return Ne.log}constructor(e){return super(),Ar(this,"type",void 0),Ar(this,"message",void 0),Ar(this,"subType",void 0),Ar(this,"result",void 0),Ar(this,"target",void 0),this.type=e.type,this.message=e.message,this.subType=e.subType,this.result=e.result,this.target=e.target,this.component=e.component,this}};function Vs(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var te=class extends it{getEventCategory(){return Ne.error}constructor(e){return super(),Vs(this,"code",void 0),Vs(this,"errorType",void 0),Vs(this,"message",void 0),this.code=e.code,this.errorType=e.errorType,this.message=e.message,this.component=e.component,this}};function Oe(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var me=class extends qe{buildElementProps(e){let r={showPayButton:!0,...this.core.getCorePropsForComponent(),...e?.isStoredPaymentMethod?{}:this.getPaymentMethodFromPaymentMethodsResponse(e?.type),...e},o=Po(this);this.props=this.formatProps({...this.constructor.defaultProps,...ll(this.core.options.countryCode,o),...r})}getPaymentMethodFromPaymentMethodsResponse(e){return this.core.paymentMethodsResponse.find(e||this.constructor.type)}storeElementRefOnCore(e){e?.isDropin||this.core.storeElementReference(this)}isAvailable(){return Promise.resolve()}setState(e){this.state={...this.state,...e},this.onChange()}showValidation(){return this.componentRef&&this.componentRef.showValidation&&this.componentRef.showValidation(),this}setElementStatus(e,r){return this.elementRef?.setStatus(e,r),this}setStatus(e,r){return this.componentRef?.setStatus&&this.componentRef.setStatus(e,r),this}onChange(){this.props.onChange?.({data:this.data,isValid:this.isValid,errors:this.state.errors,valid:this.state.valid},this.elementRef)}setUpAnalytics(e){let r=this.props.session?.id;return this.props.modules.analytics.setUp({...e,...r&&{sessionId:r}})}submitAnalytics(e){try{e.component=this.getComponent(e),this.props.modules.analytics.sendAnalytics(e)}catch(r){console.warn("Failed to submit the analytics event. Error:",r)}}getComponent({component:e}){return e||(this.constructor.analyticsType?this.constructor.analyticsType:this.constructor.type==="scheme"||this.constructor.type==="bcmc"?this.constructor.type:this.type)}submit(){this.isValid?this.makePaymentsCall().then(Xe).then(Je).then(this.handleResponse).catch(e=>{e instanceof dt?this.setElementStatus("ready"):this.handleFailedResult(e)}):this.showValidation()}makePaymentsCall(){if(this.setElementStatus("loading"),this.props.onSubmit)return this.submitUsingAdvancedFlow();if(this.core.session)return(this.props.beforeSubmit?new Promise((e,r)=>this.props.beforeSubmit(this.data,this.elementRef,{resolve:e,reject:()=>r(new dt("beforeSubmitRejected"))})):Promise.resolve(this.data)).then(this.submitUsingSessionsFlow);this.handleError(new v("IMPLEMENTATION_ERROR",'It can not perform /payments call. Callback "onSubmit" is missing or Checkout session is not available'))}async submitUsingAdvancedFlow(){return new Promise((e,r)=>{let o=new de({type:Ms,message:"Shopper clicked pay"});this.submitAnalytics(o),this.props.onSubmit({data:this.data,isValid:this.isValid},this.elementRef,{resolve:e,reject:r})})}async submitUsingSessionsFlow(e){let r=new de({type:Ms,message:"Shopper clicked pay"});this.submitAnalytics(r);try{return await this.core.session.submitPayment(e)}catch(o){return o instanceof v?this.handleError(o):this.handleError(new v("ERROR","Error when making /payments call",{cause:o})),Promise.reject(o)}}onComplete(e){this.props.onComplete&&this.props.onComplete(e,this.elementRef)}handleAdditionalDetails(e){this.makeAdditionalDetailsCall(e).then(Xe).then(Je).then(this.handleResponse).catch(this.handleFailedResult)}makeAdditionalDetailsCall(e){return this.props.onAdditionalDetails?new Promise((r,o)=>{this.props.onAdditionalDetails(e,this.elementRef,{resolve:r,reject:o})}):this.core.session?this.submitAdditionalDetailsUsingSessionsFlow(e.data):void this.handleError(new v("IMPLEMENTATION_ERROR",'It can not perform /payments/details call. Callback "onAdditionalDetails" is missing or Checkout session is not available'))}async submitAdditionalDetailsUsingSessionsFlow(e){try{return await this.core.session.submitDetails(e)}catch(r){return r instanceof v?this.handleError(r):this.handleError(new v("ERROR","Error when making /details call",{cause:r})),Promise.reject(r)}}handleAction(e,r={}){if(!e||!e.type)throw R(e,"action")&&R(e,"resultCode")?new Error('handleAction::Invalid Action - the passed action object itself has an "action" property and a "resultCode": have you passed in the whole response object by mistake?'):new Error('handleAction::Invalid Action - the passed action object does not have a "type" property');let o=this.core.createFromAction(e,{...this.elementRef.props,...r,onAdditionalDetails:this.handleAdditionalDetails});return o?(this.unmount(),o.mount(this._node)):null}onActionHandled(e){this.props?.onActionHandled?.({originalAction:this.props.originalAction,...e})}handleResponse(e){e.action?this.elementRef.handleAction(e.action):e.order?.remainingAmount?.value>0?this.handleOrder(e):this.handleSuccessResult(e)}handleKeyPress(e){e.key!=="Enter"&&e.code!=="Enter"||(e.preventDefault(),this.onEnterKeyPressed(document?.activeElement,this))}onEnterKeyPressed(e,r){this.props.onEnterKeyPressed?this.props.onEnterKeyPressed(e,r):(e.blur(),this.submit())}updateParent(e={}){return this.elementRef.core.update(e)}get isValid(){return!1}get icon(){let e=this.props.paymentMethodType||this.type;return this.props.icon??this.resources.getImage()(e)}get displayName(){let e=this.core.paymentMethodsResponse?.paymentMethods?.find(r=>r.type===this.type);return this.props.name||e?.name||this.type}get accessibleName(){return this.displayName}get additionalInfo(){return null}get type(){return this.props.type||this.constructor.type}async handleAdvanceFlowPaymentMethodsUpdate(e,r){return new Promise((o,s)=>{if(!this.props.onPaymentMethodsRequest)return o();this.props.onPaymentMethodsRequest({...e&&{order:{orderData:e.orderData,pspReference:e.pspReference}},locale:this.core.options.locale},{resolve:o,reject:s})}).catch(o=>{this.handleError(new v("IMPLEMENTATION_ERROR","Something failed during payment methods update or onPaymentMethodsRequest was not implemented",{cause:o}))}).then(o=>this.core.update({...o&&{paymentMethodsResponse:o},order:e,amount:e?e.remainingAmount:r}))}constructor(e,r){super(e,r),Oe(this,"componentRef",void 0),Oe(this,"resources",void 0),Oe(this,"elementRef",void 0),Oe(this,"handleError",o=>{if(this.setElementStatus("ready"),o.name===Ts&&o.options.code){let s=new te({errorType:Q.apiError,code:o.options.code});this.submitAnalytics(s)}this.props.onError&&this.props.onError(o,this.elementRef)}),Oe(this,"handleOrder",o=>{let{order:s}=o;(this.core.session?this.core.update({order:s}):this.handleAdvanceFlowPaymentMethodsUpdate(s)).then(()=>{this.props.onOrderUpdated?.({order:s})})}),Oe(this,"handleFailedResult",o=>{Po(this.elementRef)&&this.elementRef.displayFinalAnimation("error"),Wt(o),this.props.onPaymentFailed?.(o,this.elementRef)}),Oe(this,"handleSuccessResult",o=>{Po(this.elementRef)&&this.elementRef.displayFinalAnimation("success"),Wt(o),this.props.onPaymentCompleted?.(o,this.elementRef)}),Oe(this,"setComponentRef",o=>{this.componentRef=o}),Oe(this,"payButton",o=>f(al,{...o,amount:this.props.amount,secondaryAmount:this.props.secondaryAmount,onClick:this.submit})),this.core.register(this.constructor),this.submit=this.submit.bind(this),this.setState=this.setState.bind(this),this.onComplete=this.onComplete.bind(this),this.handleAction=this.handleAction.bind(this),this.handleOrder=this.handleOrder.bind(this),this.handleAdditionalDetails=this.handleAdditionalDetails.bind(this),this.handleResponse=this.handleResponse.bind(this),this.setElementStatus=this.setElementStatus.bind(this),this.submitAnalytics=this.submitAnalytics.bind(this),this.makePaymentsCall=this.makePaymentsCall.bind(this),this.makeAdditionalDetailsCall=this.makeAdditionalDetailsCall.bind(this),this.submitUsingSessionsFlow=this.submitUsingSessionsFlow.bind(this),this.elementRef=r&&r.elementRef||this,this.resources=this.props.modules?this.props.modules.resources:void 0,this.storeElementRefOnCore(this.props),this.onEnterKeyPressed=this.onEnterKeyPressed.bind(this),this.onActionHandled=this.onActionHandled.bind(this)}};Oe(me,"type",void 0),Oe(me,"txVariants",[]);function Hs(t){let e=rt(null),[r,o]=ye({}),[s,n]=ye({}),[i,c]=ye({}),[d,p]=ye(!1),[u,l]=ye(null),[h,m]=ye([]),[y,E]=ye(""),C=ro(()=>Ii(t,{sfp:e},{dualBrandSelectElements:h,setDualBrandSelectElements:m,setSelectedBrandValue:E,issuingCountryCode:u,setIssuingCountryCode:l}),[h,u]);return this.processBinLookupResponse=(_,g)=>{C.processBinLookup(_,g)},this.dualBrandingChangeHandler=C.handleDualBrandSelection,ze(()=>(this.setFocusOn=e.current.setFocusOn,this.updateStyles=e.current.updateStyles,this.showValidation=e.current.showValidation,this.handleUnsupportedCard=e.current.handleUnsupportedCard,()=>{e.current.destroy()}),[]),ze(()=>{let _=e.current.mapErrorsToValidationRuleResult(),g={...r,..._};if(t.onChange({data:i,valid:s,errors:g,isValid:d,selectedBrandValue:y}),Object.keys(g).length){let O=Object.entries(g).map(([N,b])=>({fieldType:N,...b||{error:"",rootNode:this.props.rootNode}}));this.props.onValidationError?.(O)}},[i,s,r,y]),f(Pr,{ref:e,...Ad(t),type:t.brand,onChange:_=>{c({...i,..._.data}),o({...r,..._.errors}),n({...s,..._.valid}),p(_.isSfpValid)},render:()=>null})}Hs.defaultProps={onChange:()=>{},onError:()=>{},onValidationError:()=>{}};var Ad=t=>({autoFocus:t.autoFocus,brands:t.brands,brandsConfiguration:t.brandsConfiguration,clientKey:t.clientKey,forceCompat:t.forceCompat,i18n:t.i18n,implementationType:t.implementationType,keypadFix:t.keypadFix,legacyInputMode:t.legacyInputMode,loadingContext:t.loadingContext,minimumExpiryDate:t.minimumExpiryDate,onAdditionalSFConfig:t.onAdditionalSFConfig,onAdditionalSFRemoved:t.onAdditionalSFRemoved,onAllValid:t.onAllValid,onAutoComplete:t.onAutoComplete,onBinValue:t.onBinValue,onBrand:t.onBrand,onConfigSuccess:t.onConfigSuccess,handleKeyPress:t.handleKeyPress,onError:t.onError,onFieldValid:t.onFieldValid,onFocus:t.onFocus,onLoad:t.onLoad,rootNode:t.rootNode,showWarnings:t.showWarnings,styles:t.styles,trimTrailingSeparator:t.trimTrailingSeparator,resources:t.resources,maskSecurityCode:t.maskSecurityCode,placeholders:t.placeholders});function Nt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ye=class extends me{formatProps(e){return{...e,type:ee.customCard}}formatData(){let e=this.state.selectedBrandValue;return{paymentMethod:{type:"scheme",...this.state.data,...e&&{brand:e}},browserInfo:this.browserInfo,origin:!!window&&window.location.origin}}updateStyles(e){return this.componentRef?.updateStyles&&this.componentRef.updateStyles(e),this}setFocusOn(e){return this.componentRef?.setFocusOn&&this.componentRef.setFocusOn(e),this}processBinLookupResponse(e){return this.componentRef?.processBinLookupResponse&&this.componentRef.processBinLookupResponse(e),this}dualBrandingChangeHandler(e){return this.componentRef?.dualBrandingChangeHandler&&this.componentRef.dualBrandingChangeHandler(e),this}handleUnsupportedCard(e){return this.componentRef?.handleUnsupportedCard&&this.componentRef.handleUnsupportedCard(e),this}onBinLookup(e){let r={...e};r.rootNode=this._node,r.isReset||(r.supportedBrandsRaw=e.supportedBrandsRaw?.map(o=>(o.brandImageUrl=this.props.brandsConfiguration[o.brand]?.icon??fo(o.brand,this.resources),o))),this.props.onBinLookup(r)}get isValid(){return!!this.state.isValid}get browserInfo(){return lt()}render(){return f($t,{i18n:this.props.i18n,loadingContext:this.props.loadingContext,resources:this.resources},f(Hs,{ref:e=>{this.componentRef=e},...this.props,...this.state,handleKeyPress:this.handleKeyPress,rootNode:this._node,onChange:this.setState,onBinValue:this.onBinValue,implementationType:"custom",resources:this.resources,brand:this.brand,onFocus:this.onFocus}))}constructor(...e){super(...e),Nt(this,"brand",ee.card),Nt(this,"onBinValue",rl(this)),Nt(this,"onFocus",r=>{let o=new ue({type:r.focus===!0?Wi:Zi,target:Pi(r.fieldType)});this.submitAnalytics(o),this.props.onFocus?.(r)}),Nt(this,"onEnterKeyPressed",(r,o)=>{this.props.onEnterKeyPressed?.(r,o)})}};Nt(Ye,"type",ee.customCard),Nt(Ye,"analyticsType","custom-scheme"),Nt(Ye,"defaultProps",{onBinLookup:()=>{},brandsConfiguration:{}});var Zt=class extends j{componentDidMount(){this.formEl.submit(),this.props.onFormSubmit(`${this.props.inputName} sent`)}render({name:e,action:r,target:o,inputName:s,inputValue:n}){return f("form",{ref:i=>{this.formEl=i},method:"POST",className:Ue(["adyen-checkout__threeds2__form",`adyen-checkout__threeds2__form--${e}`]),name:e,action:r,target:o,style:{display:"none"}},f("input",{name:s,value:n}))}constructor(...e){var r,o,s;super(...e),s=void 0,(o="formEl")in(r=this)?Object.defineProperty(r,o,{value:s,enumerable:!0,configurable:!0,writable:!0}):r[o]=s}};var qt=(t,e,r,o)=>s=>{let n={};if((s.origin||s.originalEvent?.origin)!==t)return"Message was not sent from the expected domain";if(typeof s.data!="string")return"Event data was not of type string";if(!s.data.length)return"Invalid event data string";try{let i=JSON.parse(s.data);if(!R(i,"type")||i.type!==o)return"Event data was not of expected type";e(i)}catch{return n.type=`${o}-JSON-parse-error`,n.comment="failed to JSON parse event.data",n.extraInfo=`event.data = ${s.data}`,n.eventDataRaw=s.data,console.debug("get-process-message-handler::CATCH::Un-parseable JSON:: parseErrorObj=",n),!1}return!0};var Dr=t=>{let e=/^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/.exec(t);if(!e)return null;let[,r,o,s,n]=e;return r&&o&&s?`${r}:${o}${s}${n?`:${n}`:""}`:null};var Dd="not base64",Id="malformed URI sequence",pt={decode:t=>{if(!pt.isBase64(t))return{success:!1,error:Dd};try{return{success:!0,data:(e=t,decodeURIComponent(Array.prototype.map.call(window.atob(e),r=>`%${`00${r.charCodeAt(0).toString(16)}`.slice(-2)}`).join("")))}}catch{return{success:!1,error:Id}}var e},encode:t=>window.btoa(t),isBase64:t=>{if(!t||t.length%4)return!1;try{return window.btoa(window.atob(t))===t}catch{return!1}}};var Xt=t=>"success"in t&&!t.success,cl=t=>{let e=pt.decode(t);if(e.success)try{return JSON.parse(e.data)}catch{return{success:!1,error:"Could not JSON parse token"}}return e},To=t=>{if(!t||!Object.keys(t).length)throw new Error("No (populated) data object to encode");return pt.encode(JSON.stringify(t))},dl=t=>{let e=t.length===1?`0${t}`:t;return Object.prototype.hasOwnProperty.call(Is,e)?e:Co},xd=t=>Is[dl(t)],pl=({token:t,size:e})=>{let r=cl(t);if(Xt(r))return r;let{acsTransID:o,acsURL:s,messageVersion:n,threeDSNotificationURL:i,threeDSServerTransID:c}=r,d=Dr(i);return{acsURL:s,cReqData:{acsTransID:o,messageVersion:n,threeDSServerTransID:c,messageType:"CReq",challengeWindowSize:dl(e)},iframeSizeArr:xd(e),postMessageDomain:d}},ul=({token:t,notificationURL:e})=>{let r=cl(t);if(Xt(r))return r;let{threeDSMethodNotificationURL:o,threeDSMethodUrl:s,threeDSServerTransID:n}=r,i=e||o;return{threeDSServerTransID:n,threeDSMethodURL:s,threeDSMethodNotificationURL:i,postMessageDomain:Dr(i)}},ml=(t,e,r)=>({data:{[t]:To({threeDSCompInd:e.threeDSCompInd}),paymentData:r}}),hl=(t,e,r)=>({data:{details:{"threeds2.fingerprint":To(e)},paymentData:r}}),fl=(t,e,r)=>({data:{details:{[t]:To({transStatus:e,authorisationToken:r})}}}),_l=(t,e,r)=>({data:{details:{"threeds2.challengeResult":To({transStatus:e})},paymentData:r}}),Ao=t=>{let e=window.btoa(t).split("=")[0];return e=e.replace(/\+/g,"-"),e=e.replace(/\//g,"_"),e},wd=["elementRef"],kd=["createFromAction","onAdditionalDetails"],yl=(t,e)=>{if(t==="fingerprint"){let r=e.elementRef?wd:kd,o=Dt(r).from(e);return o.showSpinner=!e.isDropin,o.statusType="loading",o}return{statusType:"custom",i18n:e.i18n}};var Jt=(t,e,r)=>{let o;return{promise:new Promise((s,n)=>{o=setTimeout(()=>{n(r)},t),e.then(i=>{clearTimeout(o),s(i)}).catch(i=>{clearTimeout(o),n(i)})}),cancel:()=>{clearTimeout(o)}}};function Ys(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var gl="threeDSIframe",Do=class extends j{get3DS2ChallengePromise(){return new Promise((e,r)=>{this.processMessageHandler=qt(this.props.postMessageDomain,e,r,"challengeResult"),window.addEventListener("message",this.processMessageHandler)})}componentDidMount(){this.challengePromise=Jt(6e5,this.get3DS2ChallengePromise(),ki),this.challengePromise.promise.then(e=>{window.removeEventListener("message",this.processMessageHandler),this.props.onCompleteChallenge(e)}).catch(e=>{window.removeEventListener("message",this.processMessageHandler),this.props.onErrorChallenge(e)})}componentWillUnmount(){this.challengePromise&&this.challengePromise.cancel(),window.removeEventListener("message",this.processMessageHandler)}render({acsURL:e,cReqData:r,iframeSizeArr:o,onFormSubmit:s},{base64URLencodedData:n,status:i}){let[c,d]=o;return f("div",{className:Ue(["adyen-checkout__threeds2__challenge",`adyen-checkout__threeds2__challenge--${r.challengeWindowSize}`])},i!=="iframeLoaded"&&f(wt,null),f(Ze,{name:gl,width:c,height:d,callback:this.iframeCallback}),f(Zt,{name:"cReqForm",action:e,target:gl,inputName:"creq",inputValue:n,onFormSubmit:s}))}constructor(e){super(e),Ys(this,"processMessageHandler",void 0),Ys(this,"challengePromise",void 0),Ys(this,"iframeCallback",()=>{this.setState({status:"iframeLoaded"}),this.state.status==="init"&&this.props.onActionHandled?.({componentType:"3DS2Challenge",actionDescription:`${at} challenge iframe loaded`})});let r=JSON.stringify(this.props.cReqData),o=Ao(r);this.state={base64URLencodedData:o,status:"init"}}};function vl(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ir=class extends j{componentDidMount(){if(Xt(this.state.challengeData)){let e=this.state.challengeData.error,r=e.indexOf(We)>-1?$.ACTION_IS_MISSING_TOKEN:$.TOKEN_DECODE_OR_PARSING_FAILED;this.setError({errorInfo:e.indexOf(We)>-1?`${$.ACTION_IS_MISSING_TOKEN}: ${this.props.i18n.get("err.gen.9102")}`:`${$.TOKEN_DECODE_OR_PARSING_FAILED}: ${this.props.i18n.get("err.gen.9102")}`},!0);let o=new te({code:r,errorType:Q.apiError,message:`${Se}: ${e}`});this.props.onSubmitAnalytics(o),console.debug("### PrepareChallenge3DS2::exiting:: no challengeData")}else{let e=this.props.environment==="test"&&this.props._environmentUrls?.api?.includes("http://localhost:8080"),{acsURL:r}=this.state.challengeData;if(!zt(r,e)){this.setError({errorInfo:`${$.TOKEN_IS_MISSING_ACSURL}: ${this.props.i18n.get("err.gen.9102")}`},!0);let i=new te({code:$.TOKEN_IS_MISSING_ACSURL,errorType:Q.apiError,message:`${Se}: Decoded token is missing a valid acsURL property`});return this.props.onSubmitAnalytics(i),void console.debug("### PrepareChallenge3DS2::exiting:: no valid acsURL")}let{acsTransID:o,messageVersion:s,threeDSServerTransID:n}=this.state.challengeData.cReqData;if(!o||!s||!n){this.setError({errorInfo:`${$.TOKEN_IS_MISSING_OTHER_PROPS}: ${this.props.i18n.get("err.gen.9102")}`},!0);let i=new te({code:$.TOKEN_IS_MISSING_OTHER_PROPS,errorType:Q.apiError,message:`${Se}: Decoded token is missing one or more of the following properties (acsTransID | messageVersion | threeDSServerTransID)`});return this.props.onSubmitAnalytics(i),void console.debug("### PrepareChallenge3DS2::exiting:: missing one or more of the following properties (acsTransID | messageVersion | threeDSServerTransID)")}this.setState({status:"performingChallenge"})}}setStatusComplete(e,r=null){this.setState({status:"complete"},()=>{let o=(this.props.isMDFlow?_l:fl)(this.props.dataKey,e.transStatus,this.props.paymentData),s;r&&console.debug("### PrepareChallenge3DS2::errorCodeObject::",r);let n=r||e;if(n.errorCode){let c={code:n.errorCode==="timeout"?$.THREEDS2_TIMEOUT:$.NO_TRANSSTATUS,errorType:n.errorCode==="timeout"?Q.network:Q.apiError};s=new te({message:n.message,...c}),this.props.onSubmitAnalytics(s)}let i;switch(e?.transStatus){case"Y":i="success";break;case"N":i="failed";break;case"U":i=r?"timeout":"cancelled"}e?.errorCode&&(i="noTransStatus"),s=new de({type:Re,message:`${at} challenge has completed`,subType:Ve.CHALLENGE_COMPLETED,result:i}),this.props.onSubmitAnalytics(s),this.props.onComplete(o)})}setError(e,r){this.setState({status:"error",errorInfo:e.errorInfo}),r&&this.props.onError(new v(Sr,e.errorInfo,{cause:e.errorObj}))}render(e,{challengeData:r}){let o=wi();return this.state.status==="performingChallenge"?f(Do,{onCompleteChallenge:s=>{let n=null;if(R(s.result,"errorCode")&&s.result.errorCode.length&&(n={errorCode:s.result.errorCode,message:`${Se}: ${s.result.errorDescription?s.result.errorDescription:"no transStatus could be retrieved"}`},this.props.isMDFlow&&this.props.onError(new v(Sr,`${Se}: ${s.result.errorDescription?s.result.errorDescription:"no transStatus could be retrieved"}`,{cause:s.result.errorCode}))),!s.result){this.setError({errorInfo:`${Se}: ${this.props.i18n.get("3ds.chal.805",{values:{result:'"result"'}})}`,errorObj:s},!0);let i=new te({code:$.CHALLENGE_RESOLVED_WITHOUT_RESULT_PROP,errorType:Q.apiError,message:`${Se}: challenge resolved without a "result" object`});return this.props.onSubmitAnalytics(i),void console.debug('### PrepareChallenge3DS2::exiting:: challenge resolved without a "result" object')}this.setStatusComplete(s.result,n)},onErrorChallenge:s=>{if(R(s,"errorCode")){let n={errorCode:s.errorCode,message:`${vo}: ${s.errorCode}`};return this.props.isMDFlow&&this.props.onError(new v(Sr,`${Se}: '3DS2 challenge timed out'`,{cause:s.errorCode})),void this.setStatusComplete(s.result,n)}},...r,onActionHandled:this.props.onActionHandled,onFormSubmit:this.onFormSubmit}):this.state.status==="error"?f("div",{className:"adyen-checkout__threeds2-challenge-error"},f(Li,{className:"adyen-checkout__status__icon adyen-checkout__status__icon--error",src:o({imageFolder:"components/"})("error"),alt:""}),f("div",{className:"adyen-checkout__status__text"},this.state.errorInfo?this.state.errorInfo:this.props.i18n.get("error.message.unknown"))):null}constructor(e){if(super(e),vl(this,"onFormSubmit",r=>{let o=new de({type:Re,message:r,subType:Ve.CHALLENGE_DATA_SENT});this.props.onSubmitAnalytics(o)}),this.props.token){let r=pl({token:this.props.token,size:this.props.challengeWindowSize||this.props.size});this.state={status:"init",challengeData:r}}else this.state={challengeData:{success:!1,error:We}},console.debug(`${Se}: ${We}`)}};vl(Ir,"defaultProps",{onComplete:()=>{},onError:()=>{},isMDFlow:!1});function Io(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Qt=class extends me{onComplete(e){e&&super.onComplete(e),this.unmount()}render(){if(!ge(this.props.paymentData)){let e=R(this.props,"isMDFlow")?"paymentData":"authorisationToken";this.props.onError(new v(br,`No ${e} received. 3DS2 Challenge cannot proceed`));let r=new te({code:$.ACTION_IS_MISSING_PAYMENT_DATA,errorType:Q.apiError,message:`${Se}: Missing 'paymentData' property from threeDS2 action`});return this.submitAnalytics(r),null}return f($t,{i18n:this.props.i18n,loadingContext:this.props.loadingContext,resources:this.resources},f(Ir,{...this.props,onComplete:this.onComplete,onSubmitAnalytics:this.submitAnalytics,isMDFlow:this.props.paymentData.length<15,onActionHandled:this.onActionHandled}))}constructor(...e){super(...e),Io(this,"submitAnalytics",r=>{r instanceof ue&&r.type===Be||super.submitAnalytics(r)}),Io(this,"onActionHandled",r=>{let o=new de({type:Re,message:r.actionDescription,subType:Ve.CHALLENGE_IFRAME_LOADED});this.submitAnalytics(o),super.onActionHandled(r)})}};Io(Qt,"type",ee.threeDS2Challenge),Io(Qt,"defaultProps",{dataKey:"threeDSResult",size:Co,type:vo});function js(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Cl="threeDSMethodIframe",xr=class extends j{get3DS2MethodPromise(){return new Promise((e,r)=>{this.processMessageHandler=qt(this.props.postMessageDomain,e,r,"fingerPrintResult"),window.addEventListener("message",this.processMessageHandler)})}componentDidMount(){this.fingerPrintPromise=Jt(1e4,this.get3DS2MethodPromise(),Ni),this.fingerPrintPromise.promise.then(e=>{window.removeEventListener("message",this.processMessageHandler),this.props.onCompleteFingerprint(e)}).catch(e=>{window.removeEventListener("message",this.processMessageHandler),this.props.onErrorFingerprint(e)})}componentWillUnmount(){this.fingerPrintPromise&&this.fingerPrintPromise.cancel(),window.removeEventListener("message",this.processMessageHandler)}render({threeDSMethodURL:e,onActionHandled:r,onFormSubmit:o},{base64URLencodedData:s}){return f("div",{className:"adyen-checkout__3ds2-device-fingerprint"},this.props.showSpinner&&f(wt,null),f("div",{style:{display:"none"}},f(Ze,{name:Cl,callback:()=>{r?.({componentType:"3DS2Fingerprint",actionDescription:`${at} fingerprint iframe loaded`})}}),f(Zt,{name:"threeDSMethodForm",action:e,target:Cl,inputName:"threeDSMethodData",inputValue:s,onFormSubmit:o})))}constructor(e){super(e),js(this,"processMessageHandler",void 0),js(this,"fingerPrintPromise",void 0);let{threeDSServerTransID:r,threeDSMethodNotificationURL:o}=this.props,s=JSON.stringify({threeDSServerTransID:r,threeDSMethodNotificationURL:o}),n=Ao(s);this.state={base64URLencodedData:n}}};js(xr,"defaultProps",{showSpinner:!0});function $s(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var er=class extends j{componentDidMount(){if(Xt(this.state.fingerPrintData)){let e=this.state.fingerPrintData.error,r=e.indexOf(We)>-1?$.ACTION_IS_MISSING_TOKEN:$.TOKEN_DECODE_OR_PARSING_FAILED;this.setStatusComplete({threeDSCompInd:"N"},{errorCode:r,message:`${It}: ${e}`}),console.debug("### PrepareFingerprint3DS2:: token does not exist or could not be base64 decoded &/or JSON.parsed")}else{let e=this.props.environment==="test"&&this.props._environmentUrls?.api?.includes("http://localhost:8080"),{threeDSMethodURL:r,threeDSMethodNotificationURL:o,postMessageDomain:s,threeDSServerTransID:n}=this.state.fingerPrintData;if(!zt(r,e))return this.setStatusComplete({threeDSCompInd:"U"},{errorCode:$.TOKEN_IS_MISSING_THREEDSMETHODURL,message:`${It}: Decoded token is missing a valid threeDSMethodURL property`}),void console.debug("### PrepareFingerprint3DS2::exiting:: no valid threeDSMethodURL");let i=zt(o,e),c=zt(s,e),d=n?.length;if(!i||!c||!d)return this.setStatusComplete({threeDSCompInd:"N"},{errorCode:$.TOKEN_IS_MISSING_OTHER_PROPS,message:`${It}: Decoded token is missing one or more of the following properties (threeDSMethodNotificationURL | postMessageDomain | threeDSServerTransID)`}),void console.debug("### PrepareFingerprint3DS2::exiting:: Decoded token is missing one or more of the following properties (threeDSMethodNotificationURL | postMessageDomain | threeDSServerTransID)");this.setState({status:"retrievingFingerPrint"})}}setStatusComplete(e,r=null){this.setState({status:"complete"},()=>{let o=(this.props.isMDFlow?hl:ml)(this.props.dataKey,e,this.props.paymentData),s,n=r||e;if(n.errorCode){let c={code:n.errorCode===xt?$.THREEDS2_TIMEOUT:n.errorCode,errorType:n.errorCode===xt?Q.network:Q.apiError};s=new te({message:n.message,...c}),this.props.onSubmitAnalytics(s)}let i;switch(e?.threeDSCompInd){case"Y":i="success";break;case"N":i=r?r.errorCode===xt?xt:"failedInternal":"failed";break;case"U":i="noThreeDSMethodURL"}s=new de({type:Re,message:`${at} fingerprinting has completed`,subType:Ve.FINGERPRINT_COMPLETED,result:i}),this.props.onSubmitAnalytics(s),this.props.onComplete(o)})}render({showSpinner:e},{status:r,fingerPrintData:o}){return r==="retrievingFingerPrint"?f(xr,{onCompleteFingerprint:s=>{this.setStatusComplete(s.result)},onErrorFingerprint:s=>{let n={errorCode:s.errorCode,message:`${yo}: ${s.errorCode}`};this.setStatusComplete(s.result,n)},showSpinner:e,...o,onActionHandled:this.props.onActionHandled,onFormSubmit:this.onFormSubmit}):null}constructor(e){super(e),$s(this,"onFormSubmit",s=>{let n=new de({type:Re,message:s,subType:Ve.FINGERPRINT_DATA_SENT});this.props.onSubmitAnalytics(n)});let{token:r,notificationURL:o}=this.props;if(r){let s=ul({token:r,notificationURL:o});this.state={status:"init",fingerPrintData:s}}else this.state={fingerPrintData:{success:!1,error:We}},console.debug(`${It}: ${We}`)}};$s(er,"type","scheme"),$s(er,"defaultProps",{onComplete:()=>{},onError:()=>{},paymentData:"",showSpinner:!0,isMDFlow:!1});var Pe="v1",ut={makePayments:"620",submitPaymentDetails:"621",submitThreeDS2Fingerprint:"622",createOrder:"623"};function El({data:t}){J({path:`v1/submitThreeDS2Fingerprint?token=${this.props.clientKey}`,loadingContext:this.props.loadingContext,errorLevel:"fatal",errorCode:ut.submitThreeDS2Fingerprint},{...t}).then(e=>{let r;if(e.type==="completed"){let{details:s}=e;return e.details?this.onComplete({data:{details:s}}):(console.debug('Handled Error::callSubmit3DS2Fingerprint::FAILED:: no details object in a response indicating either a "frictionless" flow, or a "refused" response. resData=',e),r=new te({code:$.NO_DETAILS_FOR_FRICTIONLESS_OR_REFUSED,errorType:Q.apiError,message:`${go}: no details object in a response indicating either a "frictionless" flow, or a "refused" response`}),void this.submitAnalytics(r))}if(!e.action)return console.debug('Handled Error::callSubmit3DS2Fingerprint::FAILED:: no action object in a response indicating a "challenge". resData=',e),r=new te({code:$.NO_ACTION_FOR_CHALLENGE,errorType:Q.apiError,message:`${go}: no action object in a response indicating a "challenge" flow`}),void this.submitAnalytics(r);let o=this.props.elementRef??this;return o?e.action?.type==="threeDS2"?o.handleAction(e.action,Dt("challengeWindowSize").from(this.props)):e.action?.type==="redirect"?o.handleAction(e.action):void 0:(console.debug("Handled Error::callSubmit3DS2Fingerprint::FAILED:: no actionHandler"),r=new te({code:$.NO_COMPONENT_FOR_ACTION,errorType:Q.sdkError,message:`${go}: no component defined to handle the action response`}),void this.submitAnalytics(r))}).catch(e=>{this.handleError(e)})}function wr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var tr=class extends me{onComplete(e){super.onComplete(e),this.unmount()}render(){if(!ge(this.props.paymentData)){this.props.onError(new v(br,"No paymentData received. 3DS2 Fingerprint cannot proceed"));let e=new te({code:$.ACTION_IS_MISSING_PAYMENT_DATA,errorType:Q.apiError,message:`${It}: Missing 'paymentData' property from threeDS2 action`});return this.submitAnalytics(e),null}return f(er,{...this.props,onComplete:this.props.isMDFlow?this.onComplete:this.callSubmit3DS2Fingerprint,onSubmitAnalytics:this.submitAnalytics,isMDFlow:this.props.paymentData.length<15,onActionHandled:this.onActionHandled})}constructor(...e){super(...e),wr(this,"callSubmit3DS2Fingerprint",El.bind(this)),wr(this,"submitAnalytics",r=>{r instanceof ue&&r.type===Be||super.submitAnalytics(r)}),wr(this,"onActionHandled",r=>{let o=new de({type:Re,message:r.actionDescription,subType:Ve.FINGERPRINT_IFRAME_LOADED});this.submitAnalytics(o),super.onActionHandled(r)})}};wr(tr,"type",ee.threeDS2Fingerprint),wr(tr,"defaultProps",{dataKey:"fingerprintResult",type:yo});function bl({label:t=null,icon:e=null,payButton:r,onSubmit:o,amount:s=null,name:n,showPayButton:i,...c}){let{i18n:d}=nt(),[p,u]=ye("ready");if(this.setStatus=l=>{u(l)},i)return f(tt,null,r({...c,status:p,icon:e,classNameModifiers:["standalone"],label:t||(s&&{}.hasOwnProperty.call(s,"value")&&s.value===0?`${d.get("preauthorizeWith")} ${n}`:`${d.get("continueTo")} ${n}`),onClick:o}))}var Sl={IDR:1,JPY:1,KRW:1,VND:1,BYR:1,CVE:1,DJF:1,GHC:1,GNF:1,KMF:1,PYG:1,RWF:1,UGX:1,VUV:1,XAF:1,XOF:1,XPF:1,MRO:10,BHD:1e3,IQD:1e3,JOD:1e3,KWD:1e3,OMR:1e3,LYD:1e3,TND:1e3};var zs={RSD:{minimumFractionDigits:2},AFN:{minimumFractionDigits:2},ALL:{minimumFractionDigits:2},IRR:{minimumFractionDigits:2},LAK:{minimumFractionDigits:2},LBP:{minimumFractionDigits:2},MMK:{minimumFractionDigits:2},SOS:{minimumFractionDigits:2},SYP:{minimumFractionDigits:2},YER:{minimumFractionDigits:2},IQD:{minimumFractionDigits:3}};var Fd=t=>Sl[t]||100,kr=(t,e)=>{let r=Fd(e);return parseInt(String(t),10)/r},Rl=(t,e,r,o={})=>{let s=t.toString(),n=kr(s,r),i=e.replace("_","-"),c={style:"currency",currency:r,currencyDisplay:"symbol",...zs[r]?{...o,...zs[r]}:o};try{return n.toLocaleString(i,c)}catch{return s}};var Pl=({buttonStyle:t,buttonType:e,buttonLocale:r,onClick:o})=>f("apple-pay-button",{"data-testid":"apple-pay-button",buttonstyle:t,type:e,locale:r,onclick:o});function Tl(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var xo=class{begin(){return this.session.begin()}onvalidatemerchant(e,r){return new Promise((o,s)=>r(o,s,e.validationURL)).then(o=>{this.session.completeMerchantValidation(o)}).catch(o=>{console.error(o),this.session.abort(),this.options.onError(o)})}onpaymentauthorized(e,r){return new Promise((o,s)=>r(o,s,e)).then(o=>{this.session.completePayment(o)}).catch(o=>{this.session.completePayment(o)})}onpaymentmethodselected(e,r){return new Promise((o,s)=>r(o,s,e)).then(o=>{this.session.completePaymentMethodSelection(o)}).catch(o=>{this.session.completePaymentMethodSelection(o)})}onshippingcontactselected(e,r){return new Promise((o,s)=>r(o,s,e)).then(o=>{this.session.completeShippingContactSelection(o)}).catch(o=>{this.session.completeShippingContactSelection(o)})}onshippingmethodselected(e,r){return new Promise((o,s)=>r(o,s,e)).then(o=>{this.session.completeShippingMethodSelection(o)}).catch(o=>{this.session.completeShippingMethodSelection(o)})}oncancel(e,r){r(e)}constructor(e,r){Tl(this,"session",void 0),Tl(this,"options",void 0),this.options=r,this.session=new ApplePaySession(r.version,e),this.session.onvalidatemerchant=o=>{this.onvalidatemerchant(o,r.onValidateMerchant)},this.session.onpaymentauthorized=o=>{this.onpaymentauthorized(o,r.onPaymentAuthorized)},this.session.oncancel=o=>{this.oncancel(o,r.onCancel)},typeof r.onPaymentMethodSelected=="function"&&(this.session.onpaymentmethodselected=o=>{this.onpaymentmethodselected(o,r.onPaymentMethodSelected)}),typeof r.onShippingContactSelected=="function"&&(this.session.onshippingcontactselected=o=>{this.onshippingcontactselected(o,r.onShippingContactSelected)}),typeof r.onShippingMethodSelected=="function"&&(this.session.onshippingmethodselected=o=>{this.onshippingmethodselected(o,r.onShippingMethodSelected)})}};var Al={isExpress:!1,amount:{currency:"USD",value:0},totalPriceStatus:"final",initiative:"web",merchantCapabilities:["supports3DS"],supportedNetworks:["amex","discover","masterCard","visa"],buttonType:"plain",buttonColor:"black",onClick:t=>t()};var Dl=t=>{let{countryCode:e,companyName:r,amount:o,...s}=t,n=(i=>String(kr(i.value,i.currency)))(o);return e||console.warn("Apple Pay - Make sure to set the countryCode in the AdyenCheckout configuration or in the Checkout Session creation"),{countryCode:e,currencyCode:o.currency,total:{label:s.totalPriceLabel,amount:n,type:s.totalPriceStatus},lineItems:s.lineItems,shippingContactEditingMode:s.shippingContactEditingMode,shippingMethods:s.shippingMethods,shippingType:s.shippingType,recurringPaymentRequest:s.recurringPaymentRequest,merchantCapabilities:s.merchantCapabilities,supportedCountries:s.supportedCountries,supportedNetworks:s.supportedNetworks,requiredShippingContactFields:s.requiredShippingContactFields,requiredBillingContactFields:s.requiredBillingContactFields,billingContact:s.billingContact,shippingContact:s.shippingContact,applicationData:s.applicationData}};function Il(t){try{for(let e=t;e>0;e--)if(ApplePaySession?.supportsVersion(e))return e}catch(e){console.warn(e)}return null}function Gs(t,e){if(t)return{city:t.locality,country:t.countryCode,houseNumberOrName:"ZZ",postalCode:t.postalCode,street:t.addressLines?.join(" ").trim(),...t.administrativeArea&&{stateOrProvince:t.administrativeArea},...e&&{firstName:t.givenName,lastName:t.familyName}}}function xl(t){let e={mc:"masterCard",amex:"amex",visa:"visa",elodebit:"elo",elo:"elo",interac:"interac",discover:"discover",jcb:"jcb",electron:"electron",maestro:"maestro",girocard:"girocard",cartebancaire:"cartesBancaires",eftpos_australia:"eftpos"};return t.reduce((r,o)=>(e[o]&&!r.includes(e[o])&&r.push(e[o]),r),[])}var Md="https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js",wo=class{async load(){try{let e=new Kt(Md,"body",{crossOrigin:"anonymous"});return this.sdkLoadingPromise=e.load(),await this.sdkLoadingPromise,window?.ApplePaySession}catch(e){throw new v("SCRIPT_ERROR","ApplePaySDK failed to load",{cause:e})}}isSdkLoaded(){return this.sdkLoadingPromise===void 0?Promise.reject():this.sdkLoadingPromise}constructor(){var e,r,o;o=void 0,(r="sdkLoadingPromise")in(e=this)?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o}};var wl=()=>{if(typeof window>"u")return!1;try{return window.self!==window.top}catch{return!0}};function Nr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ot=class t extends me{formatProps(e){let r=e.brands?.length?xl(e.brands):e.supportedNetworks;return{...e,configuration:e.configuration,supportedNetworks:r,buttonLocale:e.buttonLocale??e.i18n?.locale,totalPriceLabel:e.totalPriceLabel||e.configuration?.merchantName,renderApplePayCodeAs:e.renderApplePayCodeAs??(wl()?"window":"modal")}}formatData(){let{applePayToken:e,billingAddress:r,deliveryAddress:o}=this.state,{isExpress:s}=this.props;return{paymentMethod:{type:t.type,applePayToken:e,...s&&{subtype:"express"}},...r&&{billingAddress:r},...o&&{deliveryAddress:o}}}submitAnalytics(e){if(e instanceof ue&&e.type===Be){let{isExpress:r,expressPage:o}=this.props,s=o&&Ro.includes(o);typeof r=="boolean"&&(e.isExpress=r),r===!0&&s&&(e.expressPage=o)}super.submitAnalytics(e)}get isValid(){return!0}async applePayCapabilities(e){let r=e||this.props.configuration.merchantId;try{return await this.sdkLoader.isSdkLoaded(),await ApplePaySession?.applePayCapabilities(r)}catch(o){throw new v("ERROR","Apple Pay: Error when requesting applePayCapabilities()",{cause:o})}}async isAvailable(){if(window.location.protocol!=="https:")return Promise.reject(new v("IMPLEMENTATION_ERROR","Trying to start an Apple Pay session from an insecure document"));try{return await this.sdkLoader.isSdkLoaded(),ApplePaySession?.canMakePayments()?Promise.resolve():Promise.reject(new v("ERROR","Apple Pay is not available on this device"))}catch(e){return Promise.reject(new v("ERROR","Apple Pay SDK failed to load",{cause:e}))}}defineApplePayVersionNumber(){window.location.protocol==="https:"&&(this.applePayVersionNumber=this.props.version||Il(14))}configureApplePayWebOptions(){if(window.ApplePayWebOptions){let{renderApplePayCodeAs:e,onApplePayCodeClose:r}=this.props;window.ApplePayWebOptions.set({renderApplePayCodeAs:e,...r&&{onApplePayCodeClose:r}})}}startSession(){let{onValidateMerchant:e,onPaymentMethodSelected:r,onShippingMethodSelected:o,onShippingContactSelected:s}=this.props,n=Dl({companyName:this.props.configuration.merchantName,countryCode:this.core.options.countryCode,...this.props}),i=new xo(n,{version:this.applePayVersionNumber,onError:c=>{this.handleError(new v("ERROR","ApplePay - Something went wrong on ApplePayService",{cause:c}))},onCancel:c=>{this.handleError(new v("CANCEL","ApplePay UI dismissed",{cause:c}))},onPaymentMethodSelected:r,onShippingMethodSelected:o,onShippingContactSelected:s,onValidateMerchant:e||this.validateMerchant,onPaymentAuthorized:(c,d,p)=>{let u=Gs(p.payment.billingContact),l=Gs(p.payment.shippingContact,!0);this.setState({applePayToken:btoa(JSON.stringify(p.payment.token.paymentData)),authorizedEvent:p,...u&&{billingAddress:u},...l&&{deliveryAddress:l}}),this.handleAuthorization().then(this.makePaymentsCall).then(Xe).then(Je).then(this.collectOrderTrackingDetailsIfNeeded).then(({paymentResponse:h,orderDetails:m})=>(c({status:ApplePaySession.STATUS_SUCCESS,...m&&{orderDetails:m}}),h)).then(h=>{this.handleResponse(h)}).catch(h=>{let m=h?.error?.applePayError;d({status:ApplePaySession.STATUS_FAILURE,errors:m?Array.isArray(m)?m:[m]:void 0});let y={...h,error:{applePayError:m}};this.handleFailedResult(y)})}});return new Promise((c,d)=>this.props.onClick(c,d)).then(()=>{i.begin()}).catch(()=>({}))}async handleAuthorization(){return new Promise((e,r)=>{this.props.onAuthorized||e();let{authorizedEvent:o,billingAddress:s,deliveryAddress:n}=this.state;this.props.onAuthorized({authorizedEvent:o,...s&&{billingAddress:s},...n&&{deliveryAddress:n}},{resolve:e,reject:r})}).catch(e=>{let r={error:{applePayError:e}};return Promise.reject(r)})}async collectOrderTrackingDetailsIfNeeded(e){return new Promise((r,o)=>{if(!this.props.onOrderTrackingRequest)return r();this.props.onOrderTrackingRequest(r,o)}).then(r=>({paymentResponse:e,...r&&{orderDetails:r}})).catch(()=>({paymentResponse:e}))}async validateMerchant(e,r){let{hostname:o}=window.location,{clientKey:s,configuration:n,loadingContext:i,initiative:c}=this.props,{merchantName:d,merchantId:p}=n,u={loadingContext:i,path:`v1/applePay/sessions?clientKey=${s}`},l={displayName:d,domainName:o,initiative:c,merchantIdentifier:p};try{let h=await J(u,l),m=pt.decode(h.data);m.success?e(JSON.parse(m.data)):r("Could not decode Apple Pay session")}catch{r("Could not get Apple Pay session")}}render(){return this.props.showPayButton?f(Pl,{buttonStyle:this.props.buttonColor,buttonType:this.props.buttonType,buttonLocale:this.props.buttonLocale,onClick:this.submit}):null}constructor(e,r){super(e,r),Nr(this,"sdkLoader",void 0),Nr(this,"applePayVersionNumber",void 0),Nr(this,"submit",()=>{if(this.props.isInstantPayment){let i=new ue({type:bo,target:So});this.submitAnalytics(i)}this.startSession()});let{isExpress:o,onShippingContactSelected:s,onShippingMethodSelected:n}=this.props;if(o===!1&&(s||n))throw new v("IMPLEMENTATION_ERROR",'ApplePay - You must set "isExpress" flag to "true" in order to use "onShippingContactSelected" and/or "onShippingMethodSelected" callbacks');this.startSession=this.startSession.bind(this),this.submit=this.submit.bind(this),this.validateMerchant=this.validateMerchant.bind(this),this.collectOrderTrackingDetailsIfNeeded=this.collectOrderTrackingDetailsIfNeeded.bind(this),this.handleAuthorization=this.handleAuthorization.bind(this),this.defineApplePayVersionNumber=this.defineApplePayVersionNumber.bind(this),this.configureApplePayWebOptions=this.configureApplePayWebOptions.bind(this),this.sdkLoader=new wo,this.sdkLoader.load().then(this.defineApplePayVersionNumber).then(this.configureApplePayWebOptions).catch(i=>{this.handleError(i)})}};Nr(Ot,"type",ee.applepay),Nr(Ot,"defaultProps",Al);var mt={API_VERSION:2,API_VERSION_MINOR:0,GATEWAY:"adyen",URL:"https://pay.google.com/gp/p/js/pay.js"};function kl({allowedAuthMethods:t,allowedCardNetworks:e,existingPaymentMethodRequired:r=!1}){return{apiVersion:mt.API_VERSION,apiVersionMinor:mt.API_VERSION_MINOR,allowedPaymentMethods:[{type:"CARD",parameters:{allowedAuthMethods:t,allowedCardNetworks:e},tokenizationSpecification:{type:"PAYMENT_GATEWAY",parameters:{}}}],existingPaymentMethodRequired:r}}function Ld({amount:t,countryCode:e="US",totalPriceStatus:r="FINAL",...o}){let s=String(kr(t.value,t.currency));return{countryCode:e,currencyCode:t.currency,totalPrice:s,totalPriceStatus:r,...o.transactionInfo}}function Ks({configuration:t,...e},r){return{apiVersion:mt.API_VERSION,apiVersionMinor:mt.API_VERSION_MINOR,transactionInfo:Ld({countryCode:r,...e}),merchantInfo:{merchantId:t.merchantId,merchantName:t.merchantName,...t.merchantOrigin?{merchantOrigin:t.merchantOrigin}:{},...t.authJwt?{authJwt:t.authJwt}:{}},allowedPaymentMethods:[{type:"CARD",tokenizationSpecification:{type:"PAYMENT_GATEWAY",parameters:{gateway:mt.GATEWAY,gatewayMerchantId:t.gatewayMerchantId}},parameters:{allowedAuthMethods:e.allowedAuthMethods,allowedCardNetworks:e.allowedCardNetworks,assuranceDetailsRequired:e.assuranceDetailsRequired,allowPrepaidCards:e.allowPrepaidCards,allowCreditCards:e.allowCreditCards,billingAddressRequired:e.billingAddressRequired,billingAddressParameters:e.billingAddressParameters}}],emailRequired:e.emailRequired,shippingAddressRequired:e.shippingAddressRequired,shippingAddressParameters:e.shippingAddressParameters,shippingOptionRequired:e.shippingOptionRequired,shippingOptionParameters:e.shippingOptionParameters,callbackIntents:e.callbackIntents}}function Nl(t="TEST"){switch(t.toLowerCase()){case"production":case"live":case"live-au":case"live-apse":case"live-us":case"live-in":return"PRODUCTION";default:return"TEST"}}function Ws(t,e){if(t)return{postalCode:t.postalCode,country:t.countryCode,street:[t.address1,t.address2,t.address3].join(" ").trim(),houseNumberOrName:"ZZ",city:t.locality||"",...t.administrativeArea&&{stateOrProvince:t.administrativeArea},...e&&{firstName:t.name}}}var Ud=["en","ar","bg","ca","cs","da","de","el","es","et","fi","fr","hr","id","it","ja","ko","ms","nl","no","pl","pt","ru","sk","sl","sr","sv","th","tr","uk","zh"];function Ol(t=""){let e=t.toLowerCase().substring(0,2);return Ud.includes(e)?e:null}var ko=class{async getGooglePaymentsClient(e){return window.google?.payments||await new Kt(mt.URL).load(),new google.payments.api.PaymentsClient(e)}isReadyToPay(e){return this.paymentsClient?this.paymentsClient.then(r=>r.isReadyToPay(kl(e))):Promise.reject(new Error("Google Pay is not available"))}prefetchPaymentData(e,r){if(!this.paymentsClient)throw new Error("Google Pay is not available");let o=Ks(e,r);this.paymentsClient.then(s=>s.prefetchPaymentData(o))}initiatePayment(e,r){if(!this.paymentsClient)throw new Error("Google Pay is not available");let o=Ks(e,r);return this.paymentsClient.then(s=>s.loadPaymentData(o))}constructor(e,r){var o,s,n;n=void 0,(s="paymentsClient")in(o=this)?Object.defineProperty(o,s,{value:n,enumerable:!0,configurable:!0,writable:!0}):o[s]=n;let i=Nl(e);this.paymentsClient=this.getGooglePaymentsClient({environment:i,paymentDataCallbacks:r})}};var Fl=t=>{let e=rt(void 0);return ze(()=>{let{onClick:r,buttonRadius:o,buttonColor:s,buttonType:n,buttonLocale:i,buttonSizeMode:c,buttonRootNode:d,paymentsClient:p}=t;p.then(u=>u.createButton({onClick:r,buttonType:n,buttonColor:s,buttonLocale:i,buttonSizeMode:c,buttonRootNode:d,...o!==void 0&&{buttonRadius:o}})).then(u=>{e.current&&e.current.appendChild(u)})},[t.buttonColor,t.buttonType,t.buttonLocale,t.buttonSizeMode,t.buttonRootNode,t.paymentsClient]),f("div",{"data-testid":"googlepay-button-container",className:"adyen-checkout__paywithgoogle",ref:e})};var Ml={isExpress:!1,existingPaymentMethodRequired:!1,buttonColor:"default",buttonType:"buy",buttonSizeMode:"fill",configuration:{gatewayMerchantId:"",merchantId:"",merchantName:""},amount:{value:0,currency:"USD"},totalPriceStatus:"FINAL",onClick:t=>t(),allowedAuthMethods:["PAN_ONLY","CRYPTOGRAM_3DS"],allowedCardNetworks:["AMEX","DISCOVER","JCB","MASTERCARD","VISA"],allowCreditCards:!0,allowPrepaidCards:!0,billingAddressRequired:!1,billingAddressParameters:void 0,assuranceDetailsRequired:!1,emailRequired:!1,shippingAddressRequired:!1,shippingAddressParameters:void 0,shippingOptionRequired:!1,shippingOptionParameters:void 0,callbackIntents:[]};function ht(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ft=class extends me{getPaymentMethodFromPaymentMethodsResponse(e){return this.core.paymentMethodsResponse.find(e||this.constructor.type)||this.core.paymentMethodsResponse.find(ee.paywithgoogle)}formatProps(e){let r=e.buttonSizeMode??(e.isDropin?"fill":"static"),o=Ol(e.buttonLocale??e.i18n?.locale),s=[...e.callbackIntents,"PAYMENT_AUTHORIZATION"];return{...e,configuration:e.configuration,buttonSizeMode:r,buttonLocale:o,callbackIntents:s}}formatData(){let{googlePayCardNetwork:e,googlePayToken:r,billingAddress:o,deliveryAddress:s}=this.state,{isExpress:n}=this.props;return{paymentMethod:{type:this.type,googlePayCardNetwork:e,googlePayToken:r,...n&&{subtype:"express"}},browserInfo:this.browserInfo,origin:!!window&&window.location.origin,...o&&{billingAddress:o},...s&&{deliveryAddress:s}}}submitAnalytics(e){if(e instanceof ue&&e.type===Be){let{isExpress:r,expressPage:o}=this.props,s=o&&Ro.includes(o);typeof r=="boolean"&&(e.isExpress=r),r===!0&&s&&(e.expressPage=o)}super.submitAnalytics(e)}showGooglePayPaymentSheet(){this.googlePay.initiatePayment(this.props,this.core.options.countryCode).catch(e=>{this.handleError(new v(e.statusCode==="CANCELED"?"CANCEL":"ERROR",e.toString(),{cause:e}))})}async handleAuthorization(){return new Promise((e,r)=>{this.props.onAuthorized||e();let{authorizedEvent:o,billingAddress:s,deliveryAddress:n}=this.state;this.props.onAuthorized({authorizedEvent:o,...s&&{billingAddress:s},...n&&{deliveryAddress:n}},{resolve:e,reject:r})}).catch(e=>{let r={error:{googlePayError:e}};return Promise.reject(r)})}get isValid(){return!0}async isAvailable(){return this.isReadyToPay().then(e=>{if(!e.result)throw new v("ERROR","GooglePay is not available");if(e.paymentMethodPresent===!1)throw new v("ERROR","GooglePay - No paymentMethodPresent");return Promise.resolve()}).catch(e=>Promise.reject(e))}get browserInfo(){return lt()}get icon(){return this.props.icon??this.resources.getImage()("googlepay")}render(){return this.props.showPayButton?f(Fl,{buttonColor:this.props.buttonColor,buttonType:this.props.buttonType,buttonSizeMode:this.props.buttonSizeMode,buttonLocale:this.props.buttonLocale,buttonRootNode:this.props.buttonRootNode,buttonRadius:this.props.buttonRadius,paymentsClient:this.googlePay.paymentsClient,onClick:this.submit}):null}constructor(e,r){super(e,r),ht(this,"googlePay",void 0),ht(this,"submit",()=>{if(this.props.isInstantPayment){let n=new ue({type:bo,target:So});this.submitAnalytics(n)}new Promise((n,i)=>this.props.onClick(n,i)).then(this.showGooglePayPaymentSheet).catch(()=>{})}),ht(this,"onPaymentAuthorized",async n=>{let i=Ws(n.paymentMethodData.info.billingAddress),c=Ws(n.shippingAddress,!0);return this.setState({authorizedEvent:n,googlePayToken:n.paymentMethodData.tokenizationData.token,googlePayCardNetwork:n.paymentMethodData.info.cardNetwork,...i&&{billingAddress:i},...c&&{deliveryAddress:c}}),new Promise(d=>{this.handleAuthorization().then(this.makePaymentsCall).then(Xe).then(Je).then(p=>(d({transactionState:"SUCCESS"}),p)).then(p=>{this.handleResponse(p)}).catch(p=>{this.setElementStatus("ready");let u=p?.error?.googlePayError,l=this.props.i18n.get("error.subtitle.payment"),h=typeof u=="string"?{intent:"PAYMENT_AUTHORIZATION",reason:"OTHER_ERROR",message:u||l}:{intent:u?.intent||"PAYMENT_AUTHORIZATION",reason:u?.reason||"OTHER_ERROR",message:u?.message||l};d({transactionState:"ERROR",error:h});let m={...p,error:{googlePayError:h}};this.handleFailedResult(m)})})}),ht(this,"isReadyToPay",()=>this.googlePay.isReadyToPay(this.props)),ht(this,"prefetch",()=>this.googlePay.prefetchPaymentData(this.props,this.core.options.countryCode)),this.handleAuthorization=this.handleAuthorization.bind(this),this.showGooglePayPaymentSheet=this.showGooglePayPaymentSheet.bind(this);let{isExpress:o,paymentDataCallbacks:s}=this.props;if(o===!1&&s?.onPaymentDataChanged)throw new v("IMPLEMENTATION_ERROR",'GooglePay - You must set "isExpress" flag to "true" in order to use "onPaymentDataChanged" callback');if(!this.props.configuration.merchantId)throw new v("IMPLEMENTATION_ERROR","GooglePay - Missing merchantId. Please ensure that it is correctly configured in your customer area.");this.googlePay=new ko(this.props.environment,{...o&&s?.onPaymentDataChanged&&{onPaymentDataChanged:s.onPaymentDataChanged},onPaymentAuthorized:this.onPaymentAuthorized})}};ht(ft,"type",ee.googlepay),ht(ft,"txVariants",[ee.googlepay,ee.paywithgoogle]),ht(ft,"defaultProps",Ml);var Zs=()=>{try{if(window.parent.location.href)return window.location!==window.parent.location}catch{return!1}};function Ll(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Or=class extends j{componentDidMount(){new Promise((e,r)=>{this.props.beforeRedirect(e,r,{url:this.props.url,method:this.props.method,...this.props.data?{data:this.props.data}:{}})}).then(()=>{this.props.onActionHandled?.({componentType:this.props.paymentMethodType,actionDescription:"performing-redirect"}),this.postForm?this.postForm.submit():this.props.redirectFromTopWhenInIframe&&Zs()?window.top.location.assign?.(this.props.url):window.location.assign(this.props.url)}).catch(()=>{this.props.onRedirectError()})}render({url:e,method:r,data:o={}}){return r==="POST"?f("form",{method:"post","data-testid":"redirect-shopper-form",action:e,style:{display:"none"},ref:s=>{this.postForm=s},...this.props.redirectFromTopWhenInIframe&&Zs()&&{target:"_top"}},Object.keys(o).map(s=>f("input",{type:"hidden",name:s,key:s,value:o[s]}))):null}constructor(...e){super(...e),Ll(this,"postForm",void 0)}};Ll(Or,"defaultProps",{beforeRedirect:t=>t(),onRedirectError:()=>{},method:"GET"});function qs(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var _t=class extends me{formatData(){return{paymentMethod:{type:this.type},browserInfo:this.browserInfo}}get isValid(){return!0}get browserInfo(){return lt()}render(){return this.props.url&&this.props.method?f(Or,{url:this.props.url,...this.props,onActionHandled:this.onActionHandled,onRedirectError:this.handleRedirectError}):this.props.showPayButton?f($t,{i18n:this.props.i18n,loadingContext:this.props.loadingContext,resources:this.resources},f(bl,{...this.props,showPayButton:this.props.showPayButton,name:this.displayName,onSubmit:this.submit,payButton:this.payButton,ref:e=>{this.componentRef=e}})):null}constructor(...e){super(...e),qs(this,"handleRedirectError",()=>{let r=new te({component:this.props.paymentMethodType,errorType:Q.redirect,code:zi.redirect});super.submitAnalytics(r)})}};qs(_t,"type",ee.redirect),qs(_t,"defaultProps",{type:_t.type});var Ul={test:"https://checkoutshopper-test.adyen.com/checkoutshopper/",live:"https://checkoutshopper-live.adyen.com/checkoutshopper/","live-us":"https://checkoutshopper-live-us.adyen.com/checkoutshopper/","live-au":"https://checkoutshopper-live-au.adyen.com/checkoutshopper/","live-apse":"https://checkoutshopper-live-apse.adyen.com/checkoutshopper/","live-in":"https://checkoutshopper-live-in.adyen.com/checkoutshopper/",fallback:"https://checkoutshopper-live.adyen.com/checkoutshopper/"},Xs={test:"https://checkoutshopper-test.cdn.adyen.com/checkoutshopper/",live:"https://checkoutshopper-live.cdn.adyen.com/checkoutshopper/","live-us":"https://checkoutshopper-live-us.cdn.adyen.com/checkoutshopper/","live-au":"https://checkoutshopper-live-au.cdn.adyen.com/checkoutshopper/","live-apse":"https://checkoutshopper-live-apse.cdn.adyen.com/checkoutshopper/","live-in":"https://checkoutshopper-live-in.cdn.adyen.com/checkoutshopper/",fallback:"https://checkoutshopper-live.cdn.adyen.com/checkoutshopper/"},Bl={test:"https://checkoutanalytics-test.adyen.com/checkoutanalytics/",live:"https://checkoutanalytics-live.adyen.com/checkoutanalytics/","live-us":"https://checkoutanalytics-live-us.adyen.com/checkoutanalytics/","live-au":"https://checkoutanalytics-live-au.adyen.com/checkoutanalytics/","live-apse":"https://checkoutanalytics-live-apse.adyen.com/checkoutanalytics/","live-in":"https://checkoutanalytics-live-in.adyen.com/checkoutanalytics/",fallback:"https://checkoutanalytics-live.adyen.com/checkoutanalytics/"};var No=(t,e,r)=>r||e[t?.toLowerCase()]||e.fallback,Vl=(t,e)=>({apiUrl:No(t,Ul,e?.api),analyticsUrl:No(t,Bl,e?.analytics),cdnImagesUrl:No(t,Xs,e?.cdn?.images),cdnTranslationsUrl:No(t,Xs,e?.cdn?.translations)});function Hl(t){return Object.keys(t).reduce((e,r)=>(Hi.includes(r)&&(e[r]=t[r]),e),{})}function Yl(t){let e=(r=>r)(["session","environment","_environmentUrls","showPayButton","clientKey","locale","translations","paymentMethodsResponse","amount","secondaryAmount","countryCode","allowPaymentMethods","removePaymentMethods","srConfig","analytics","risk","order","exposeLibraryMetadata","beforeRedirect","beforeSubmit","onPaymentCompleted","onPaymentFailed","onSubmit","onAdditionalDetails","onActionHandled","onChange","onError","onBalanceCheck","onOrderRequest","onPaymentMethodsRequest","onOrderCancel","onOrderUpdated","loadingContext","onEnterKeyPressed","afterAdditionalDetails"]);Object.keys(t).forEach(r=>{e.includes(r)||console.warn(`AdyenCheckout - Configuration property "${r}" is not a valid AdyenCheckout property. If it is a payment method configuration, make sure to pass it directly to the Component. If you are using Drop-in, make sure to pass it to "paymentMethodsConfiguration" object`)})}function Ft(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Oo=class{get(e,r){let o=Bi(this.translations,e,r);return o!==null?o:e}amount(e,r,o){return Rl(e,this.locale,r,o)}date(e,r={}){if(e===void 0)return"";let o={year:"numeric",month:"2-digit",day:"2-digit",...r};return new Date(e).toLocaleDateString(this.locale,o)}dateTime(e){return e===void 0?"":this.timeAndDateFormatter.format(new Date(e))}constructor(e){Ft(this,"locale",void 0),Ft(this,"languageCode",void 0),Ft(this,"translations",void 0),Ft(this,"customTranslations",void 0),Ft(this,"timeFormatOptions",{hour:"numeric",minute:"numeric"}),Ft(this,"timeAndDateFormatOptions",{year:"numeric",month:"2-digit",day:"2-digit",...this.timeFormatOptions}),Ft(this,"timeAndDateFormatter",void 0);let{locale:r,translations:o,customTranslations:s}=e;if(!r)throw new v("IMPLEMENTATION_ERROR",'Language: "locale" property is not defined');this.locale=r,this.languageCode=this.locale.split("-")[0],this.customTranslations=s||{},this.timeAndDateFormatter=Intl.DateTimeFormat(this.locale,this.timeAndDateFormatOptions),this.translations={...o,...!!this.customTranslations[this.locale]&&this.customTranslations[this.locale]}}};var jl="1.0.0",$l="1.0.0",Mt="deviceFingerprint";var zl={result:{type:Mt,value:"df-timedOut"},errorCode:"timeout"},Gl={UNKNOWN:"unknownError"},Js={timeout:"iframe loading timed out",wrongOrigin:"Result did not come from the expected origin",wrongDataType:"Result data was not of the expected type",missingProperty:"Result data did not contain the expected properties",unknownError:"An unknown error occurred"};function Qs(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Fo=class extends j{getDfpPromise(){return new Promise((e,r)=>{this.processMessageHandler=qt(this.postMessageDomain,e,r,Mt),window.addEventListener("message",this.processMessageHandler)})}componentDidMount(){this.deviceFingerPrintPromise=Jt(2e4,this.getDfpPromise(),zl),this.deviceFingerPrintPromise.promise.then(e=>{this.props.onCompleteFingerprint(e),window.removeEventListener("message",this.processMessageHandler)}).catch(e=>{this.props.onErrorFingerprint(e),window.removeEventListener("message",this.processMessageHandler)})}render({dfpURL:e}){return f("div",{className:"adyen-checkout-risk__device-fingerprint"},f(Ze,{name:"dfIframe",src:e,allow:"geolocation; microphone; camera;",title:"devicefingerprinting iframe"}))}constructor(e){super(e),Qs(this,"postMessageDomain",void 0),Qs(this,"processMessageHandler",void 0),Qs(this,"deviceFingerPrintPromise",void 0),this.postMessageDomain=Dr(this.props.loadingContext)||this.props.loadingContext}};var Kl=t=>({errorCode:t,message:Js[t]||Js[Gl.UNKNOWN],type:Mt});var Fr=class extends j{setStatusComplete(e){this.setState({status:"complete"},()=>{this.props.onComplete(e)})}render({loadingContext:e},{dfpURL:r}){return this.state.status==="retrievingFingerPrint"?f("div",{className:"adyen-checkout-risk__device-fingerprint--wrapper",style:{position:"absolute",width:0,height:0}},f(Fo,{loadingContext:e,dfpURL:r,onCompleteFingerprint:o=>{this.setStatusComplete(o)},onErrorFingerprint:o=>{this.props.onError(Kl(o.errorCode)),this.setStatusComplete(o.result)}})):null}constructor(e){super(e),e.clientKey&&(this.state={status:"retrievingFingerPrint",dfpURL:`${this.props.loadingContext}assets/html/${e.clientKey}/dfp.${$l}.html`})}},en,tn,rn;rn={onComplete:()=>{},onError:()=>{}},(tn="defaultProps")in(en=Fr)?Object.defineProperty(en,tn,{value:rn,enumerable:!0,configurable:!0,writable:!0}):en[tn]=rn;function rr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var or=class t extends qe{formatProps(e){return{...e,risk:{...t.defaultProps.risk,...e.risk}}}get isValid(){return this.state.isValid}get data(){if(this.isValid){let e={version:jl,...this.state.data};return pt.encode(JSON.stringify(e))}return!1}get enabled(){return this.props.risk.enabled}componentWillUnmount(){this.cleanUp()}render(){return f(Fr,{...this.props,loadingContext:this.props.loadingContext,onComplete:this.onComplete,onError:this.onError})}constructor(e,r){super(e,r),rr(this,"nodeRiskContainer",null),rr(this,"onComplete",s=>{let n={...this.state.data,[s.type]:s.value,persistentCookie:s.persistentCookie,components:s.components};this.setState({data:n,isValid:!0}),this.props.risk.onComplete(this.data),this.cleanUp()}),rr(this,"onError",s=>{this.props.risk.onError(s),this.cleanUp()}),rr(this,"cleanUp",()=>{this.nodeRiskContainer&&this.nodeRiskContainer.parentNode&&this.nodeRiskContainer.parentNode.removeChild(this.nodeRiskContainer)});let o={[Mt]:null};this.setState({data:o}),this.props.risk.enabled===!0&&(document.querySelector(this.props.risk.node)?(this.nodeRiskContainer=document.createElement("div"),document.querySelector(this.props.risk.node).appendChild(this.nodeRiskContainer),this.mount(this.nodeRiskContainer)):this.onError({message:"RiskModule node was not found"}))}};rr(or,"type","risk"),rr(or,"defaultProps",{risk:{enabled:!0,onComplete:()=>{},onError:()=>{},node:"body"}});function on(t){return!this.length||this.indexOf(t.type)>-1}function sn(t){return!this.length||this.indexOf(t.type)<0}function Wl(t){return!!t&&!!t.supportedShopperInteractions&&t.supportedShopperInteractions.includes("Ecommerce")}var Vd=["scheme","blik","twint","ach","cashapp","paybybank_AIS_DD","payto","paybybank_pix","eft_directdebit_CA"];function Zl(t){return!!t&&!!t.type&&Vd.includes(t.type)}var Hd=t=>({...t,storedPaymentMethodId:t.id,isStoredPaymentMethod:!0}),ql=(t,{allowPaymentMethods:e=[],removePaymentMethods:r=[]})=>t?t.filter(on,e).filter(sn,r):[],Xl=(t,{allowPaymentMethods:e=[],removePaymentMethods:r=[]})=>t?t.filter(Zl).filter(on,e).filter(sn,r).filter(Wl).map(Hd):[],Jl=t=>{if(typeof t=="string")throw new Error('paymentMethodsResponse was provided but of an incorrect type (should be an object but a string was provided).Try JSON.parse("{...}") your paymentMethodsResponse.');if(t instanceof Array)throw new Error("paymentMethodsResponse was provided but of an incorrect type (should be an object but an array was provided).Please check you are passing the whole response.");!t||t?.paymentMethods?.length||t?.storedPaymentMethods?.length||console.warn("paymentMethodsResponse was provided but no payment methods were found.")};function Ql(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Mo=class{mapCreatedComponentType(e){return e==="card"?"scheme":e}has(e){return!!this.paymentMethods.find(r=>r.type===this.mapCreatedComponentType(e))}find(e){return this.paymentMethods.find(r=>r.type===this.mapCreatedComponentType(e))}constructor(e,r={}){Ql(this,"paymentMethods",[]),Ql(this,"storedPaymentMethods",[]),Jl(e),this.paymentMethods=e?ql(e.paymentMethods,r):[],this.storedPaymentMethods=e?Xl(e.storedPaymentMethods,r):[]}};var nn=(t,e,r,o)=>{let s=e.getComponent(r);if(!s)throw Error(`Action Element of type ${r} not found in the registry`);return new s(t,{...o,id:`${r}-${Gt()}`})},Mr=t=>(e,r,o,s)=>{let n={...s,...o,onComplete:s.onAdditionalDetails,onError:s.onError,statusType:t,originalAction:o};return nn(e,r,o.paymentMethodType,n)},ec={redirect:(t,e,r,o)=>{let s={...o,...r,statusType:"redirect",originalAction:r};return nn(t,e,"redirect",s)},threeDS2:(t,e,r,o)=>{let s=r.subtype==="fingerprint"?"threeDS2DeviceFingerprint":"threeDS2Challenge",n=r.subtype==="fingerprint"||o.isMDFlow?r.paymentData:r.authorisationToken,i={core:t,token:r.token,paymentData:n,onActionHandled:o.onActionHandled,onComplete:o.isMDFlow?o.onComplete:o.onAdditionalDetails,onError:o.onError,isDropin:!!o.isDropin,loadingContext:o.loadingContext,clientKey:o.clientKey,paymentMethodType:o.paymentMethodType,challengeWindowSize:o.challengeWindowSize,isMDFlow:o.isMDFlow,modules:{analytics:o.modules?.analytics,resources:o.modules?.resources},...yl(r.subtype,o)};return nn(t,e,s,i)},voucher:Mr("custom"),qrCode:Mr("custom"),await:Mr("custom"),bankTransfer:Mr("custom"),sdk:Mr("custom")};function tc(t,e,r,o={}){let s=ec[r.type];if(s&&typeof s=="function")return s(t,e,r,o);throw new Error("Invalid Action")}function Lo(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var an=class{get length(){return Object.keys(this.storage).length}key(e){return Object.keys(this.storage)[e]}getItem(e){return this.storage[e]||null}setItem(e,r){return this.storage[e]=r}removeItem(e){delete this.storage[e]}clear(){this.storage={}}constructor(){Lo(this,"storage",void 0),this.storage={}}},sr=class{get(){try{return JSON.parse(this.storage.getItem(this.key))}catch{return null}}set(e){this.storage.setItem(this.key,JSON.stringify(e))}remove(){this.storage.removeItem(this.key)}clear(){this.storage.clear()}keyByIndex(e){return this.storage.key(e)}get length(){return this.storage.length}constructor(e,r){Lo(this,"prefix","adyen-checkout__"),Lo(this,"key",void 0),Lo(this,"storage",void 0);try{if(this.storage=r?window[r]:window.localStorage,!this.storage)throw new Error("storage does not exist")}catch{this.storage=new an}this.key=this.prefix+e}};var Yd='WARNING: Failed to retrieve "checkoutAttemptId". Consequently, analytics will not be available for this payment. The payment process, however, will not be affected.',rc=({analyticsContext:t,clientKey:e,locale:r,analyticsPath:o,bundleType:s})=>{let n,i={errorLevel:"fatal",loadingContext:t,path:`${o}?clientKey=${e}`};return c=>{let d={version:"6.18.0",channel:"Web",platform:"Web",buildType:s,locale:r,referrer:window.location.href,screenWidth:window.screen.width,...c};if(n)return n;if(!e)return Promise.reject("no-client-key");let p=new sr("checkout-attempt-id","sessionStorage"),u=p.get();return function(l){if(!l?.id)return!1;let h=Date.now()-9e5;return l.timestamp>h}(u)?Promise.resolve(u.id):(n=J(i,d).then(l=>{if(l?.checkoutAttemptId)return p.set({id:l.checkoutAttemptId,timestamp:Date.now()}),l.checkoutAttemptId}).catch(()=>Promise.reject(Yd)),n)}};var oc=({analyticsContext:t,clientKey:e,analyticsPath:r})=>{let o={channel:"Web",platform:"Web",info:[],errors:[],logs:[]};return{add:(s,n)=>{o[s].push(n)},run:s=>{let n=(i=>o.info.length||o.logs.length||o.errors.length?J({errorLevel:"silent",loadingContext:t,path:`${r}/${i}?clientKey=${e}`},o).then(()=>{}).catch(()=>{console.debug("### EventsQueue:::: send has failed")}):Promise.resolve(null))(s);return o.info=[],o.errors=[],o.logs=[],n},getQueue:()=>o}};var Lr=null,ln=null,sc=({locale:t,clientKey:e,analytics:r,amount:o,analyticsContext:s,bundleType:n})=>{let i={enabled:!0,checkoutAttemptId:null,analyticsData:{},...r},c=rc({analyticsContext:s,clientKey:e,locale:t,analyticsPath:Fs,bundleType:n}),d=oc({analyticsContext:s,clientKey:e,analyticsPath:Fs}),p=()=>Lr?d.run(Lr):Promise.resolve(null);return{setUp:async u=>{let{payload:l,enabled:h}=i,m=h?Us.all:Us.initial,y=tl(i.analyticsData);if(!Lr)try{Lr=await c({...u,...l&&{...l},...Object.keys(y).length&&{...y},level:m})}catch(E){console.warn("Fetching checkoutAttemptId failed."+(E?` Error=${E}`:""))}},getCheckoutAttemptId:()=>Lr,getEventsQueue:()=>d,getEnabled:()=>i.enabled,sendAnalytics:u=>i.enabled?(((l,h)=>{let m=l===Ne.info?l:`${l}s`;d.add(`${m}`,h),l===Ne.info&&(clearTimeout(ln),ln=setTimeout(()=>{p()},$i)),l!==Ne.log&&l!==Ne.error||(clearTimeout(ln),ji(p)())})(u.getEventCategory(),u),!0):!1}};function nc(t,e){let r=`${Pe}/sessions/${e.id}/payments?clientKey=${e.clientKey}`,o={sessionData:e.data,...t};return J({loadingContext:e.loadingContext,path:r,errorLevel:"fatal",errorCode:ut.makePayments},o)}function ac(t,e){let r=`${Pe}/sessions/${e.id}/paymentDetails?clientKey=${e.clientKey}`,o={...e.data&&{sessionData:e.data},...t};return J({loadingContext:e.loadingContext,path:r,errorLevel:"fatal",errorCode:ut.submitPaymentDetails},o)}function ic(t,e){let r=`${Pe}/sessions/${t.id}/setup?clientKey=${t.clientKey}`,o={browserInfo:e.browserInfo,sessionData:t.data,...e.order?{order:{orderData:e.order.orderData,pspReference:e.order.pspReference}}:{}};return J({loadingContext:t.loadingContext,path:r,errorLevel:"fatal"},o)}function lc(t,e){let r=`${Pe}/sessions/${e.id}/paymentMethodBalance?clientKey=${e.clientKey}`,o={sessionData:e.data,...t};return J({loadingContext:e.loadingContext,path:r,errorLevel:"fatal"},o)}function cc(t){let e=`${Pe}/sessions/${t.id}/orders?clientKey=${t.clientKey}`,r={sessionData:t.data};return J({loadingContext:t.loadingContext,path:e,errorLevel:"fatal",errorCode:ut.createOrder},r)}function dc(t){if(!t||!t.id)throw new v("IMPLEMENTATION_ERROR","Invalid session");let{shopperLocale:e,shopperEmail:r,telephoneNumber:o,id:s}=t;return{id:s,...t.sessionData?{sessionData:t.sessionData}:{},...e&&{shopperLocale:e},...r&&{shopperEmail:r},...o&&{telephoneNumber:o}}}function pc(t,e){let r=`${Pe}/sessions/${e.id}/orders/cancel?clientKey=${e.clientKey}`,o={sessionData:e.data,order:t};return J({loadingContext:e.loadingContext,path:r,errorLevel:"fatal"},o)}function Ur(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Uo=class{get shopperLocale(){return this.session.shopperLocale}get id(){return this.session.id}get data(){return this.session.sessionData}updateSessionData(e){this.session.sessionData=e,this.storeSession()}setupSession(e){let r={...e,browserInfo:lt()};return ic(this,r).then(o=>(o.configuration&&(this.configuration={...o.configuration}),o.sessionData&&this.updateSessionData(o.sessionData),o))}submitPayment(e){return nc(e,this).then(r=>(r.sessionData&&this.updateSessionData(r.sessionData),r))}submitDetails(e){return ac(e,this).then(r=>(r.sessionData&&this.updateSessionData(r.sessionData),r))}checkBalance(e){return lc(e,this).then(r=>(r.sessionData&&this.updateSessionData(r.sessionData),r))}createOrder(){return cc(this).then(e=>(e.sessionData&&this.updateSessionData(e.sessionData),e))}cancelOrder(e){return pc(e.order,this).then(r=>(r.sessionData&&this.updateSessionData(r.sessionData),r))}getStoredSession(){let e=this.storage.get();return this.id===e?.id?e:this.session}storeSession(){this.storage.set({id:this.session.id,sessionData:this.session.sessionData})}removeStoredSession(){this.storage.remove()}constructor(e,r,o){Ur(this,"session",void 0),Ur(this,"storage",void 0),Ur(this,"clientKey",void 0),Ur(this,"loadingContext",void 0),Ur(this,"configuration",void 0);let s=dc(e);if(!r)throw new Error("No clientKey available");if(!o)throw new Error("No loadingContext available");this.storage=new sr("session","localStorage"),this.clientKey=r,this.loadingContext=o,this.session=s,this.session.sessionData?this.storeSession():this.session=this.getStoredSession()}};function cn(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Bo=class{getImage(e={}){return this.getImageUrl({...e,resourceContext:this.resourceContext})}constructor(e){if(cn(this,"resourceContext",void 0),cn(this,"returnImage",({name:r,resourceContext:o,imageFolder:s="",parentFolder:n="",extension:i,size:c="",subFolder:d=""})=>`${o}images/${s}${d}${n}${r}${c}.${i}`),cn(this,"getImageUrl",({resourceContext:r,extension:o="svg",...s})=>n=>{let i={extension:o,resourceContext:r,imageFolder:"logos/",parentFolder:"",name:n,...s};return this.returnImage(i)}),!e)throw new v("IMPLEMENTATION_ERROR",'Resources module: "environmentsUrls.cdn" is not a valid URL');this.resourceContext=e}};function uc({setComponentRef:t}){let e=rt({});Object.keys(e.current).length||t?.(e.current);let[r,o]=ye(null);return e.current.setMessages=s=>{o(s)},r?f(tt,null,r.map(s=>f("div",{key:s,className:"adyen-checkout-sr-panel__msg"},s))):null}function je(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var nr=class extends qe{get enabled(){return this._enabled}get moveFocus(){return this._moveFocus}setAriaProps(e){let r=document.querySelector('[class^="adyen-checkout-sr-panel"]');for(let[o,s]of Object.entries(e))r.setAttribute(o,s);this.props={...this.props,ariaAttributes:{...this.props.ariaAttributes,...e}}}render(){return this.props.enabled?f("div",{className:this.showPanel?"adyen-checkout-sr-panel":"adyen-checkout-sr-panel--sr-only",role:"log",...this.props.ariaAttributes},f(uc,{setComponentRef:this.setComponentRef})):null}constructor(e,r){if(super(e,r),je(this,"srPanelContainer",null),je(this,"id",void 0),je(this,"showPanel",void 0),je(this,"_enabled",void 0),je(this,"_moveFocus",void 0),je(this,"componentRef",void 0),je(this,"setComponentRef",o=>{this.componentRef=o}),je(this,"setMessages",o=>{if(!this.props.enabled)return;let s=null;o&&(s=Array.isArray(o)?o:[o]),this.componentRef.setMessages(s)}),this.id=this.props.id,this.showPanel=!1,this._enabled=!1,this._moveFocus=this.props.moveFocus??!0,this.props.enabled){this._enabled=!0;let o=document.querySelector(this.props.node);if(!o)throw new Error("Component could not mount. Root node was not found.");{let s=document.getElementById(this.id);s&&o.removeChild(s),this.srPanelContainer=document.createElement("div"),this.srPanelContainer.className="sr-panel-holder",this.srPanelContainer.id=this.id,o.appendChild(this.srPanelContainer),this.mount(this.srPanelContainer)}}}};je(nr,"type","srPanel"),je(nr,"defaultProps",{enabled:!0,node:"body",showPanel:!1,id:"ariaLiveSRPanel",ariaAttributes:{"aria-relevant":"all","aria-live":"polite","aria-atomic":"true"}});function mc(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var jd={[ee.redirect]:_t,[ee.threeDS2Challenge]:Qt,[ee.threeDS2DeviceFingerprint]:tr},ar=new class{add(...t){this.componentsMap={...this.componentsMap,...this.createComponentsMap(t)}}getComponent(t){return this.componentsMap[t]||(this.supportedTxVariants.has(t)?void 0:_t)}createComponentsMap(t){return t.reduce((e,r)=>{var o;return typeof(o=r).type=="string"&&o.type?(r.type==="dropin"||[r.type,...r.txVariants].filter(s=>s).forEach(s=>{e={...e,[s]:r}}),e):(console.error("CoreRegistry: Attempt to register Class failed. The Class is not a valid UIElement"),e)},{})}constructor(){mc(this,"componentsMap",jd),mc(this,"supportedTxVariants",new Set(Object.values(ee)))}};var hc="en-US";async function fc(t,e,r){try{return await Os({loadingContext:t,errorLevel:"fatal",errorMessage:`Translations: Failed to fetch translations for locale "${r}"`,path:`sdk/${e}/translations/${r}.json`})}catch{return await Os({loadingContext:t,errorLevel:"fatal",errorMessage:`Translations: Couldn't fetch translation for locale "${r}" nor the fallback translation "en-US"`,path:`sdk/${e}/translations/en-US.json`})}}var _c={exposeLibraryMetadata:!0,showPayButton:!0};function fe(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var yt=class t{static setBundleType(e){t.metadata.bundleType=e}static register(...e){ar.add(...e)}register(...e){ar.add(...e)}getComponent(e){return ar.getComponent(e)}async initialize(){return await this.initializeCore(),this.validateCoreConfiguration(),await this.createCoreModules(),this}async initializeCore(){return this.session?this.session.setupSession(this.options).then(e=>{let{amount:r,shopperLocale:o,countryCode:s,paymentMethods:n,...i}=e;return this.setOptions({...i,amount:this.options.order?this.options.order.remainingAmount:r,locale:this.options.locale||o,countryCode:this.options.countryCode||s}),this.createPaymentMethodsList(n),this}).catch(e=>(this.options.onError&&this.options.onError(e),Promise.reject(e))):(this.createPaymentMethodsList(),Promise.resolve(this))}async fetchLocaleTranslations(){try{return await fc(this.cdnTranslationsUrl,t.metadata.version,this.options.locale)}catch(e){e instanceof v?this.options.onError?.(e):this.options.onError?.(new v("ERROR","Failed to fetch translation",{cause:e}))}}validateCoreConfiguration(){if(this.options.paymentMethodsConfiguration&&console.warn('WARNING: "paymentMethodsConfiguration" is supported only by Drop-in.'),!this.options.countryCode)throw new v(As,"You must specify a countryCode when initializing checkout.");this.options.locale||this.setOptions({locale:hc}),this.options.locale=ks(this.options.locale),this.options.translations=Ui(this.options.translations)}submitDetails(e){let r=null;this.options.onAdditionalDetails&&(r=new Promise((o,s)=>{this.options.onAdditionalDetails({data:e},void 0,{resolve:o,reject:s})})),this.session&&(r=this.session.submitDetails(e).catch(o=>(this.options.onError?.(o),Promise.reject(o)))),r?r.then(Xe).then(Je).then(this.afterAdditionalDetails).then(o=>{Wt(o),this.options.onPaymentCompleted?.(o)}).catch(o=>{o instanceof dt||(Wt(o),this.options.onPaymentFailed?.(o))}):this.options.onError?.(new v("IMPLEMENTATION_ERROR",'It can not submit the details. The callback "onAdditionalDetails" or the Session is not setup correctly.'))}createFromAction(e,r={}){if(!e||!e.type)throw R(e,"action")&&R(e,"resultCode")?new Error('createFromAction::Invalid Action - the passed action object itself has an "action" property and a "resultCode": have you passed in the whole response object by mistake?'):new Error('createFromAction::Invalid Action - the passed action object does not have a "type" property');if(e.type){let o=e.type===Re?`${e.type}${e.subtype}`:e.paymentMethodType,s=new de({type:Gi,subType:e.type,message:`${o} action was handled by the SDK`,component:o});this.modules.analytics.sendAnalytics(s);let n={...this.getCorePropsForComponent(),...r};return tc(this,ar,e,n)}return this.handleCreateError()}getCorePropsForComponent(){return{...Hl(this.options),core:this,i18n:this.modules.i18n,modules:this.modules,session:this.session,loadingContext:this.loadingContext,cdnContext:this.cdnImagesUrl,createFromAction:this.createFromAction}}storeElementReference(e){e&&this.components.push(e)}handleCreateError(e){let r=e?`${e?.name??"The passed payment method"} is not a valid Checkout Component. What was passed as a txVariant was: ${JSON.stringify(e)}. Check if this payment method is configured in the Backoffice or if the txVariant is a valid one`:"No Payment Method component was passed";throw new Error(r)}createPaymentMethodsList(e){this.paymentMethodsResponse=new Mo(this.options.paymentMethodsResponse||e,this.options)}async createCoreModules(){if(this.modules)return;let e=await this.fetchLocaleTranslations();this.modules=Object.freeze({risk:new or(this,{...this.options,loadingContext:this.loadingContext}),analytics:sc({loadingContext:this.loadingContext,analyticsContext:this.analyticsContext,clientKey:this.options.clientKey,locale:this.options.locale,analytics:this.options.analytics,amount:this.options.amount,bundleType:t.metadata.bundleType}),resources:new Bo(this.cdnImagesUrl),i18n:new Oo({locale:this.options.locale,translations:e,customTranslations:this.options.translations}),srPanel:new nr(this,{...this.options.srConfig})})}constructor(e){fe(this,"session",void 0),fe(this,"paymentMethodsResponse",void 0),fe(this,"modules",void 0),fe(this,"options",void 0),fe(this,"analyticsContext",void 0),fe(this,"loadingContext",void 0),fe(this,"cdnImagesUrl",void 0),fe(this,"cdnTranslationsUrl",void 0),fe(this,"components",[]),fe(this,"afterAdditionalDetails",c=>{if(this.options.afterAdditionalDetails&&c?.action){let d=this.createFromAction(c.action);return this.options.afterAdditionalDetails(d),Promise.reject(new dt("Handled by afterAdditionalDetails"))}return Promise.resolve(c)}),fe(this,"update",(c={})=>(this.setOptions(c),this.initialize().then(()=>(this.components.forEach(d=>{let p={...c,...this.session&&{session:this.session}};d.update(p)}),this)))),fe(this,"remove",c=>(this.components=this.components.filter(d=>d._id!==c._id),c.unmount(),this)),fe(this,"setOptions",c=>{this.options={...this.options,...c,locale:c?.locale||this.options?.locale}}),Yl(e),this.createFromAction=this.createFromAction.bind(this),this.setOptions({..._c,...e});let{apiUrl:r,analyticsUrl:o,cdnImagesUrl:s,cdnTranslationsUrl:n}=Vl(this.options.environment,this.options._environmentUrls);this.loadingContext=r,this.analyticsContext=o,this.cdnImagesUrl=s,this.cdnTranslationsUrl=n,this.session=this.options.session&&new Uo(this.options.session,this.options.clientKey,this.loadingContext);let i=this.options.clientKey?.substring(0,4);if((i==="test"||i==="live")&&!this.loadingContext.includes(i))throw new v("IMPLEMENTATION_ERROR",`Error: you are using a ${i} clientKey against the ${this.options._environmentUrls?.api||this.options.environment} environment`);i==="pub."&&console.debug(`The value you are passing as your "clientKey" looks like an originKey (${this.options.clientKey?.substring(0,12)}..). Although this is supported it is not the recommended way to integrate. To generate a clientKey, see the documentation (https://docs.adyen.com/development-resources/client-side-authentication/migrate-from-origin-key-to-client-key/) for more details.`),this.options.exposeLibraryMetadata&&(window.AdyenWebMetadata=t.metadata)}};fe(yt,"metadata",{version:"6.18.0",bundleType:"esm"}),fe(yt,"registry",ar);async function Ce(t){return await new yt(t).initialize()}Ce.register=(...t)=>{yt.register(...t)},Ce.setBundleType=t=>{yt.setBundleType(t)};var yc={"en-US":{"cards.title":"Card payment","cards.cardNumber":"Card number","cards.expiryDate":"Expiry date","cards.securityCode3Digits":"Security code","cards.securityCode3DigitsOptional":"Security code (optional)","cards.securityCode3DigitsInfo":"3-digit on the back of the card","cards.securityCode4DigitsInfo":"4-digit on the back of the card","cards.storePaymentMethod":"Store payment information","googlePay.title":"Google Pay","applePay.title":"Apple Pay","stored-cards.expiryDate":"Expiry date","stored-cards.securityCode3Digits":"Security code","stored-cards.securityCode3DigitsOptional":"Security code (optional)","stored-cards.securityCode3DigitsInfo":"3-digit on the back of the card","stored-cards.securityCode4DigitsInfo":"4-digit on the back of the card","stored-cards.removeStoredCard":"Remove","stored-cards.removeStoredCardQuestion":"Remove stored payment method?","stored-cards.removeStoredCardQuestionYesRemove":"Yes, remove","stored-cards.removeStoredCardQuestionCancel":"Cancel","success.paymentAuthorized":"Payment authorized","error.unknownError":"Unknown error occurred","error.failedToInitializeStraumurWebComponent":"Failed to initialize Straumur Web component","error.failedToInitializePaymentMethods":"Failed to initialize payment methods","error.failedToSubmitPayment":"Failed to submit payment","error.paymentFailed":"Payment failed","error.paymentUnsuccessful":"Payment unsuccessful","error.failedToSubmitPaymentDetails":"Failed to submit payment details","error.paymentDetailsFailed":"Payment details failed","error.googlePayNotAvailable":"Google Pay not available","error.applePayNotAvailable":"Apple Pay not available","error.failedToSubmitRemoveStoredPaymentCard":"Failed to remove stored payment card","error.failedToRemoveStoredPaymentCard":"Stored payment card was not removed"},"is-IS":{"cards.title":"Grei\xF0a me\xF0 korti","cards.cardNumber":"Kortan\xFAmer","cards.expiryDate":"Gildisdagur","cards.securityCode3Digits":"\xD6ryggisk\xF3\xF0i","cards.securityCode3DigitsOptional":"\xD6ryggisk\xF3\xF0i (valkv\xE6tt)","cards.securityCode3DigitsInfo":"3 t\xF6lustafir aftan \xE1 kortinu","cards.securityCode4DigitsInfo":"4 t\xF6lustafir aftan \xE1 kortinu","cards.storePaymentMethod":"Vista grei\xF0sluuppl\xFDsingar","googlePay.title":"Google Pay","applePay.title":"Apple Pay","stored-cards.expiryDate":"Gildisdagur","stored-cards.securityCode3Digits":"\xD6ryggisk\xF3\xF0i","stored-cards.securityCode3DigitsOptional":"\xD6ryggisk\xF3\xF0i (valkv\xE6tt)","stored-cards.securityCode3DigitsInfo":"3 t\xF6lustafir aftan \xE1 kortinu","stored-cards.securityCode4DigitsInfo":"4 t\xF6lustafir aftan \xE1 kortinu","stored-cards.removeStoredCard":"Fjarl\xE6gja","stored-cards.removeStoredCardQuestion":"Fjarl\xE6gja geymdan grei\xF0slum\xE1ta?","stored-cards.removeStoredCardQuestionYesRemove":"J\xE1, fjarl\xE6gja","stored-cards.removeStoredCardQuestionCancel":"H\xE6tta vi\xF0","success.paymentAuthorized":"Grei\xF0sla sam\xFEykkt","error.unknownError":"\xD3\xFEekkt villa kom upp","error.failedToInitializeStraumurWebComponent":"Mist\xF3kst a\xF0 s\xE6kja Straumur Web hluta","error.failedToInitializePaymentMethods":"Mist\xF3kst a\xF0 s\xE6kja grei\xF0slum\xE1ta","error.failedToSubmitPayment":"Mist\xF3kst a\xF0 senda grei\xF0slu","error.paymentFailed":"Grei\xF0sla mist\xF3kst","error.paymentUnsuccessful":"Grei\xF0sla ekki tekin","error.failedToSubmitPaymentDetails":"Mist\xF3kst a\xF0 senda grei\xF0sluuppl\xFDsingar","error.paymentDetailsFailed":"Mist\xF3kst a\xF0 s\xE6kja grei\xF0sluuppl\xFDsingar","error.googlePayNotAvailable":"Google Pay ekki \xED bo\xF0i","error.applePayNotAvailable":"Apple Pay ekki \xED bo\xF0i","error.failedToSubmitRemoveStoredPaymentCard":"Mist\xF3kst a\xF0 fjarl\xE6gja geymdan grei\xF0slum\xE1ta","error.failedToRemoveStoredPaymentCard":"Geymdur grei\xF0slum\xE1ti var ekki fjarl\xE6g\xF0ur"}};function V(t,e){return yc[t][e]||e}ce(`.straumur__tooltip__content{position:absolute;z-index:50;padding:var(--straumur__space-s);border-radius:var(--straumur__border-radius-s);right:40%;top:100%;width:max-content;color:var(--straumur__color-white);background-color:var(--straumur__color-primary);box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d}
|
|
7
|
-
`);var ir=({children:t,content:e})=>{let[r,o]=z(!1),s=ne(null);return a("div",{style:{position:"relative"}},a("div",{ref:s,onMouseEnter:()=>{o(!0)},onMouseLeave:()=>{o(!1)}},t),r&&s&&a("div",{className:"straumur__tooltip__content"},e))};var $d=()=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"26",viewBox:"0 0 24 24",fill:"none"},a("path",{d:"M24 11H0V7H24V11Z",fill:"#002649"}),a("path",{opacity:"0.4",d:"M21.3333 3C22.8042 3 24 4.19375 24 5.66667V7H0V5.66667C0 4.19375 1.19375 3 2.66667 3H21.3333ZM24 19C24 20.4708 22.8042 21.6667 21.3333 21.6667H2.66667C1.19375 21.6667 0 20.4708 0 19V11H24V19ZM4.66667 16.3333C4.3 16.3333 4 16.6333 4 17C4 17.3667 4.3 17.6667 4.66667 17.6667H7.33333C7.7 17.6667 8 17.3667 8 17C8 16.6333 7.7 16.3333 7.33333 16.3333H4.66667ZM10 17.6667H15.3333C15.7 17.6667 16 17.3667 16 17C16 16.6333 15.7 16.3333 15.3333 16.3333H10C9.63333 16.3333 9.33333 16.6333 9.33333 17C9.33333 17.3667 9.63333 17.6667 10 17.6667Z",fill:"#002649"})),gc=$d;var zd=()=>a("svg",{width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a("g",{"clip-path":"url(#clip0_10626_39119)"},a("path",{d:"M10.6641 7.5C11.3543 7.5 11.9141 6.94023 11.9141 6.25C11.9141 5.55977 11.3543 5 10.6641 5C9.97383 5 9.41406 5.55859 9.41406 6.25C9.41406 6.94141 9.97266 7.5 10.6641 7.5ZM12.2266 13.125H11.6016V9.6875C11.6016 9.17188 11.1836 8.75 10.6641 8.75H9.41406C8.89844 8.75 8.47656 9.17188 8.47656 9.6875C8.47656 10.2031 8.89844 10.625 9.41406 10.625H9.72656V13.125H9.10156C8.58594 13.125 8.16406 13.5469 8.16406 14.0625C8.16406 14.5781 8.58594 15 9.10156 15H12.2266C12.7441 15 13.1641 14.5801 13.1641 14.0625C13.1641 13.5449 12.7461 13.125 12.2266 13.125Z",fill:"#002649"}),a("path",{opacity:"0.4",d:"M10.6641 0C5.14062 0 0.664062 4.47656 0.664062 10C0.664062 15.5234 5.14062 20 10.6641 20C16.1875 20 20.6641 15.5234 20.6641 10C20.6641 4.47656 16.1875 0 10.6641 0ZM10.6641 5C11.3543 5 11.9141 5.55977 11.9141 6.25C11.9141 6.94023 11.3543 7.5 10.6641 7.5C9.97383 7.5 9.41406 6.94141 9.41406 6.25C9.41406 5.55859 9.97266 5 10.6641 5ZM12.2266 15H9.10156C8.58594 15 8.16406 14.582 8.16406 14.0625C8.16406 13.543 8.58398 13.125 9.10156 13.125H9.72656V10.625H9.41406C8.89648 10.625 8.47656 10.2051 8.47656 9.6875C8.47656 9.16992 8.89844 8.75 9.41406 8.75H10.6641C11.1816 8.75 11.6016 9.16992 11.6016 9.6875V13.125H12.2266C12.7441 13.125 13.1641 13.5449 13.1641 14.0625C13.1641 14.5801 12.7461 15 12.2266 15Z",fill:"#002649"})),a("defs",null,a("clipPath",{id:"clip0_10626_39119"},a("rect",{width:"20",height:"20",fill:"white",transform:"translate(0.664062)"})))),Vo=zd;var Gd=({opacity:t=1})=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"26",viewBox:"0 0 40 26",opacity:t},a("path",{fill:"#fff",d:"M0 0h40v26H0z"}),a("path",{fill:"#F06022",d:"M16.13 19.29h7.74V6.7h-7.74v12.58z"}),a("path",{fill:"#EA1D25",d:"M16.93 13A7.93 7.93 0 0 1 20 6.71a8.02 8.02 0 0 0-10.65.65 7.96 7.96 0 0 0 0 11.28 8.02 8.02 0 0 0 10.65.65A8.02 8.02 0 0 1 16.93 13"}),a("path",{fill:"#F79D1D",d:"M33 13c0 2.12-.84 4.15-2.34 5.65a8.1 8.1 0 0 1-10.66.64A8.05 8.05 0 0 0 23.07 13 7.96 7.96 0 0 0 20 6.71a8.02 8.02 0 0 1 10.66.64A7.93 7.93 0 0 1 33 13"})),vc=Gd;var Kd=({opacity:t=1})=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"26",fill:"none",viewBox:"0 0 40 26",opacity:t},a("path",{fill:"#fff",d:"M0 0h40v26H0z"}),a("path",{fill:"#1434CB",d:"m15.9 7.7-4.43 10.6h-2.9l-2.2-8.47c-.13-.52-.25-.71-.65-.93C5.05 8.55 3.96 8.2 3 8l.07-.32h4.67c.6 0 1.13.4 1.27 1.09l1.15 6.14 2.86-7.23h2.89Zm11.39 7.15c0-2.8-3.88-2.96-3.85-4.21 0-.38.37-.79 1.16-.9a5.2 5.2 0 0 1 2.71.48l.48-2.25a7.4 7.4 0 0 0-2.57-.47c-2.71 0-4.62 1.44-4.64 3.51-.02 1.53 1.36 2.38 2.4 2.9 1.08.51 1.44.85 1.43 1.31 0 .71-.85 1.03-1.64 1.04-1.39.02-2.19-.37-2.82-.67l-.5 2.33c.64.29 1.82.55 3.05.56 2.89 0 4.78-1.42 4.79-3.63Zm7.17 3.46H37L34.78 7.7h-2.34c-.53 0-.98.3-1.17.78l-4.12 9.84h2.88l.57-1.58h3.53l.33 1.58Zm-3.07-3.76 1.45-3.99.83 4H31.4ZM19.83 7.7l-2.27 10.62h-2.74L17.09 7.7h2.74Z"})),Cc=Kd;var Wd=({opacity:t=1})=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"26",fill:"none",viewBox:"0 0 40 26",opacity:t},a("path",{fill:"#fff",d:"M0 0h40v26H0z"}),a("path",{fill:"#7773B4",d:"M16.13 19.29h7.74V6.7h-7.74v12.58z"}),a("path",{fill:"#EA1D25",d:"M16.93 13A7.93 7.93 0 0 1 20 6.71a8.02 8.02 0 0 0-10.65.65 7.96 7.96 0 0 0 0 11.28 8.02 8.02 0 0 0 10.65.65A8.02 8.02 0 0 1 16.93 13"}),a("path",{fill:"#139FDA",d:"M33 13c0 2.12-.84 4.15-2.34 5.65a8.1 8.1 0 0 1-10.66.64A8.05 8.05 0 0 0 23.07 13 7.96 7.96 0 0 0 20 6.71a8.02 8.02 0 0 1 10.66.64A7.93 7.93 0 0 1 33 13"})),Ec=Wd;var Zd=({opacity:t=1})=>a("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 40 26",width:"40",height:"26",opacity:t},a("path",{fill:"#016FD0",d:"M0 26h40V0H0v26z"}),a("path",{fill:"#fff","fill-rule":"evenodd",d:"M30.69 13.63v1.64h-4.17v1.14h4.07v1.64h-4.07v1.12h4.17v1.66l3.38-3.6-3.38-3.6zm-1.1-6.14-1.4-3.19h-4l-4.1 9.32h3.33v8.27l10.28.01 1.61-1.8 1.63 1.8H40v-2.63l-1.92-2.06L40 15.16v-2.59l-1.93.01V7.6l-1.81 4.98H34.5l-1.86-5v5h-4.2l-.6-1.46h-3.3l-.6 1.46h-2.22l3.23-7.27V5.3h2.55l3.19 7.21V5.3l3.1.01 1.6 4.47 1.62-4.48H40v-1h-3.77l-.85 2.39-.85-2.39h-4.94v3.19zm-5.06 6.11v7.27h6.16v-.01h2.54l2.1-2.32 2.12 2.32H40v-.1l-3.34-3.53L40 13.65v-.05h-2.52l-2.1 2.3-2.08-2.3h-8.77zm.7-4.11.96-2.31.97 2.31h-1.93z"})),bc=Zd;var qd=({opacity:t=1})=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"26",fill:"none",viewBox:"0 0 40 26",opacity:t},a("g",{"clip-path":"url(#a)"},a("path",{fill:"#fff",d:"M0 0h40v26H0V0Z"}),a("path",{fill:"#fff",d:"M36.6 20.66a5.22 5.22 0 0 1-5.22 5.22H3V5.22A5.22 5.22 0 0 1 8.22 0H36.6v20.66Z"}),a("path",{fill:"url(#b)",d:"M27.36 15.36h2.15l.27-.02a.96.96 0 0 0 .76-.96 1 1 0 0 0-.76-.97c-.06-.02-.19-.02-.27-.02h-2.15v1.97Z"}),a("path",{fill:"url(#c)",d:"M29.27 1.75a3.74 3.74 0 0 0-3.74 3.73v3.89h5.28c.12 0 .26 0 .37.02 1.19.06 2.07.67 2.07 1.74 0 .84-.6 1.56-1.7 1.7v.05c1.2.08 2.13.76 2.13 1.8 0 1.13-1.03 1.87-2.38 1.87h-5.8v7.6H31a3.74 3.74 0 0 0 3.73-3.74V1.75h-5.46Z"}),a("path",{fill:"url(#d)",d:"M30.27 11.38c0-.5-.35-.82-.76-.89l-.2-.02h-1.95v1.81h1.95c.06 0 .18 0 .2-.02a.87.87 0 0 0 .76-.88Z"}),a("path",{fill:"url(#e)",d:"M8.6 1.75a3.74 3.74 0 0 0-3.73 3.73v9.22a7.4 7.4 0 0 0 3.22.85c1.3 0 2-.78 2-1.85V9.34h3.2v4.34c0 1.68-1.05 3.06-4.6 3.06-2.16 0-3.84-.47-3.84-.47v7.86h5.48a3.74 3.74 0 0 0 3.74-3.74V1.75H8.6Z"}),a("path",{fill:"url(#f)",d:"M18.94 1.75a3.74 3.74 0 0 0-3.74 3.73v4.9c.94-.8 2.59-1.32 5.24-1.2 1.41.06 2.93.45 2.93.45v1.58a7.1 7.1 0 0 0-2.83-.82c-2.01-.14-3.23.84-3.23 2.57 0 1.74 1.22 2.73 3.23 2.57a7.46 7.46 0 0 0 2.83-.82v1.58s-1.5.39-2.93.45c-2.65.12-4.3-.4-5.24-1.2v8.63h5.48a3.74 3.74 0 0 0 3.74-3.74V1.75h-5.48Z"})),a("defs",null,a("linearGradient",{id:"b",x1:"25.52",x2:"34.75",y1:"14.38",y2:"14.38",gradientUnits:"userSpaceOnUse"},a("stop",{offset:"0","stop-color":"#007940"}),a("stop",{offset:".23","stop-color":"#00873F"}),a("stop",{offset:".74","stop-color":"#40A737"}),a("stop",{offset:"1","stop-color":"#5CB531"})),a("linearGradient",{id:"c",x1:"25.52",x2:"34.75",y1:"12.94",y2:"12.94",gradientUnits:"userSpaceOnUse"},a("stop",{offset:"0","stop-color":"#007940"}),a("stop",{offset:".23","stop-color":"#00873F"}),a("stop",{offset:".74","stop-color":"#40A737"}),a("stop",{offset:"1","stop-color":"#5CB531"})),a("linearGradient",{id:"d",x1:"25.52",x2:"34.75",y1:"11.37",y2:"11.37",gradientUnits:"userSpaceOnUse"},a("stop",{offset:"0","stop-color":"#007940"}),a("stop",{offset:".23","stop-color":"#00873F"}),a("stop",{offset:".74","stop-color":"#40A737"}),a("stop",{offset:"1","stop-color":"#5CB531"})),a("linearGradient",{id:"e",x1:"4.86",x2:"14.24",y1:"12.94",y2:"12.94",gradientUnits:"userSpaceOnUse"},a("stop",{offset:"0","stop-color":"#1F286F"}),a("stop",{offset:".48","stop-color":"#004E94"}),a("stop",{offset:".83","stop-color":"#0066B1"}),a("stop",{offset:"1","stop-color":"#006FBC"})),a("linearGradient",{id:"f",x1:"15.15",x2:"24.25",y1:"12.94",y2:"12.94",gradientUnits:"userSpaceOnUse"},a("stop",{offset:"0","stop-color":"#6C2C2F"}),a("stop",{offset:".17","stop-color":"#882730"}),a("stop",{offset:".57","stop-color":"#BE1833"}),a("stop",{offset:".86","stop-color":"#DC0436"}),a("stop",{offset:"1","stop-color":"#E60039"})),a("clipPath",{id:"a"},a("path",{fill:"#fff",d:"M0 0h40v26H0z"})))),Sc=qd;var Xd=({opacity:t=1})=>a("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 40 26",width:"40",height:"26",opacity:t},a("path",{fill:"#fff",d:"M0 0h40v26H0z"}),a("g",{fill:"#1a1918"},a("path",{d:"M5.96 15.58c0-.56-.3-.52-.58-.53v-.16H7.2a2.28 2.28 0 0 1 2.5 2.2c0 .61-.36 2.17-2.57 2.17H5.38v-.16c.38-.04.56-.05.58-.48zm.61 2.94c0 .49.35.54.65.54a1.75 1.75 0 0 0 1.8-1.95 1.88 1.88 0 0 0-1.96-2.02c-.26 0-.37.02-.49.02zm3.36.58h.12c.17 0 .3 0 .3-.2v-1.7c0-.28-.1-.32-.33-.44v-.1l.67-.23a.22.22 0 0 1 .11-.03c.03 0 .05.04.05.09v2.4c0 .21.13.21.3.21h.11v.16H9.93zm.67-3.67a.3.3 0 0 1 0-.61.3.3 0 0 1 .3.3.31.31 0 0 1-.3.31zm1.26 1.8c0-.23-.07-.3-.36-.41v-.12a8.44 8.44 0 0 0 .82-.3c.02 0 .04.01.04.06v.4a1.83 1.83 0 0 1 1.08-.46c.53 0 .72.39.72.88v1.61c0 .21.14.21.31.21h.12v.16h-1.34v-.16h.11c.18 0 .3 0 .3-.2v-1.63c0-.36-.22-.53-.57-.53a1.66 1.66 0 0 0-.73.3v1.85c0 .21.14.21.31.21h.12v.16h-1.34v-.16h.1c.18 0 .3 0 .3-.2v-1.67m3.21.3a1.55 1.55 0 0 0 0 .37 1.05 1.05 0 0 0 .92 1.08 1.2 1.2 0 0 0 .85-.42l.08.09a1.47 1.47 0 0 1-1.15.7 1.26 1.26 0 0 1-1.2-1.36c0-1.23.83-1.6 1.27-1.6a1 1 0 0 1 1.05 1 .74.74 0 0 1 0 .1l-.06.04zm1.11-.2c.16 0 .18-.08.18-.16a.53.53 0 0 0-.55-.57c-.38 0-.64.28-.72.73zm.86 1.77h.17c.17 0 .3 0 .3-.2v-1.77c0-.2-.23-.23-.33-.28v-.1c.46-.19.7-.35.77-.35.03 0 .05.02.05.08v.56H18c.16-.24.42-.64.8-.64a.34.34 0 0 1 .36.33.3.3 0 0 1-.3.32c-.19 0-.19-.15-.4-.15a.53.53 0 0 0-.46.52v1.47c0 .21.12.21.3.21h.35v.16h-.88a26 26 0 0 0-.74 0zm2.41-.7a.83.83 0 0 0 .78.76.44.44 0 0 0 .51-.45c0-.74-1.36-.5-1.36-1.5a.86.86 0 0 1 .97-.81 1.64 1.64 0 0 1 .71.18l.04.64h-.14a.64.64 0 0 0-.68-.62.44.44 0 0 0-.49.41c0 .74 1.45.51 1.45 1.5 0 .4-.33.85-1.07.85a1.64 1.64 0 0 1-.77-.22l-.07-.72.12-.03m7.44-2.37h-.15A1.2 1.2 0 0 0 25.39 15a1.79 1.79 0 0 0-1.77 2 2.04 2.04 0 0 0 1.87 2.17 1.27 1.27 0 0 0 1.25-1.09l.15.04-.15.91a3.5 3.5 0 0 1-1.38.34A2.23 2.23 0 0 1 22.97 17a2.3 2.3 0 0 1 2.37-2.2 4.5 4.5 0 0 1 1.48.33l.06.9m.22 3.07h.13c.17 0 .3 0 .3-.2v-3.5c0-.4-.1-.42-.34-.49v-.1a3.96 3.96 0 0 0 .65-.27.66.66 0 0 1 .14-.07c.03 0 .05.04.05.1v4.32c0 .21.13.21.3.21h.12v.16H27.1zm4.02-.18c0 .11.07.12.18.12h.25v.12a6.33 6.33 0 0 0-.9.2l-.03-.02v-.5a1.69 1.69 0 0 1-1.11.52.68.68 0 0 1-.69-.75v-1.6c0-.17-.02-.32-.37-.35v-.12l.8-.05c.07 0 .07.05.07.18v1.62c0 .19 0 .73.55.73a1.4 1.4 0 0 0 .75-.38v-1.7c0-.12-.3-.18-.52-.25v-.11c.56-.04.91-.09.97-.09.05 0 .05.05.05.11zm1.25-2.07a1.58 1.58 0 0 1 .93-.45 1.22 1.22 0 0 1 1.16 1.31 1.58 1.58 0 0 1-1.5 1.65 1.84 1.84 0 0 1-.86-.22l-.19.14-.13-.07a7.37 7.37 0 0 0 .09-1.11v-2.7c0-.4-.1-.42-.33-.49v-.1a3.93 3.93 0 0 0 .64-.27.67.67 0 0 1 .14-.07c.04 0 .05.04.05.1zm0 1.7a.67.67 0 0 0 .64.64c.67 0 .95-.65.95-1.21a1.2 1.2 0 0 0-1-1.24.96.96 0 0 0-.6.3v1.51zM5.38 22.91h.04c.13 0 .26-.02.26-.2v-1.78c0-.18-.13-.2-.26-.2h-.04v-.1l.5.01.54-.01v.1h-.05c-.12 0-.25.02-.25.2v1.79c0 .17.13.19.25.19h.05v.1L5.88 23l-.5.01z"}),a("path",{d:"M6.42 23.03 5.88 23l-.5.02h-.02v-.14h.06c.13 0 .24 0 .24-.17v-1.8c0-.16-.11-.17-.24-.17h-.06v-.13h1.07v.13h-.06c-.13 0-.24.01-.24.18v1.79c0 .16.11.17.24.17h.06v.14zM6.4 23v-.08h-.03c-.12 0-.27-.02-.27-.2v-1.8c0-.18.15-.2.27-.2h.03v-.07h-1v.07h.03c.13 0 .27.02.27.2v1.8c0 .18-.14.2-.27.2H5.4V23l.49-.02.52.02zm2.35-.66h.01v-1.29a.28.28 0 0 0-.3-.32H8.4v-.1l.48.01.42-.01v.1h-.06c-.14 0-.3.03-.3.44v1.55a2.27 2.27 0 0 0 .02.34h-.13L7.07 21.1v1.41c0 .3.06.4.32.4h.06v.1L7 23l-.47.01v-.1h.05c.24 0 .3-.16.3-.43v-1.44a.3.3 0 0 0-.3-.3h-.05v-.11l.4.01.3-.01 1.51 1.71"}),a("path",{d:"M8.95 23.08h-.14l-1.73-1.94v1.37c0 .3.05.38.3.38h.08v.14h-.01L7 23l-.47.02h-.01v-.14h.06c.23 0 .3-.14.3-.41v-1.44a.3.3 0 0 0-.3-.3h-.06v-.12h.72l1.5 1.69v-1.26c0-.27-.19-.3-.29-.3h-.09v-.13h.94v.13h-.07c-.14 0-.28.01-.28.42v1.55a2.27 2.27 0 0 0 .02.34v.02zm-.13-.03h.11a2.3 2.3 0 0 1-.01-.33v-1.55c0-.41.17-.45.31-.45h.04v-.07H8.4v.07h.06a.3.3 0 0 1 .32.33v1.3h-.02v.01l-1.52-1.71h-.68v.07h.03a.32.32 0 0 1 .32.32v1.44c0 .27-.07.44-.32.45h-.03V23l.45-.02.42.02v-.07H7.4c-.27 0-.34-.12-.34-.42v-1.44l1.77 1.98zm-.07-.71.01-.01v.01zm0 0v-.01zM9.8 20.8c-.26 0-.27.06-.32.31h-.1l.04-.29a2.04 2.04 0 0 0 .02-.29h.08c.03.1.11.1.2.1h1.76c.1 0 .18 0 .18-.1h.09l-.04.28v.28l-.11.04c0-.13-.02-.33-.25-.33h-.56v1.82c0 .26.12.29.28.29h.07v.1l-.56-.01-.57.01v-.1h.06c.19 0 .28-.02.28-.29V20.8z"}),a("path",{d:"m11.14 23.03-.56-.02-.57.02h-.02v-.14h.08c.19 0 .26 0 .27-.27v-1.8H9.8v-.03h.57v1.83c0 .28-.11.3-.3.3h-.05V23l.56-.02.54.02v-.07h-.05c-.16 0-.3-.05-.3-.31v-1.83h.58c.23 0 .26.2.26.32l.08-.03a3.96 3.96 0 0 1 .04-.53h-.05c-.02.1-.11.1-.2.1H9.71c-.08 0-.17 0-.2-.1h-.06a2.04 2.04 0 0 1-.02.27c0 .1-.02.19-.04.28h.08c.04-.24.07-.32.33-.31v.03c-.26 0-.25.04-.3.3h-.14v-.01l.04-.3a1.93 1.93 0 0 0 .02-.28v-.01h.11c.03.1.09.1.18.1h1.77c.1 0 .16 0 .17-.1v-.01h.02l.1.02-.01.01-.04.28v.28h-.01l-.12.05v-.02c-.01-.13-.03-.31-.24-.31h-.55v1.8c0 .25.11.27.27.27h.08v.14zm.71-.12h.05c.12 0 .25-.02.25-.2v-1.78c0-.18-.13-.2-.25-.2h-.05v-.1l.85.01.87-.01.01.52-.1.03c-.02-.22-.06-.4-.42-.4h-.47v.9h.4c.2 0 .25-.12.27-.3h.1v.78l-.1.02c-.02-.2-.03-.33-.26-.33h-.4v.79c0 .22.19.22.4.22.41 0 .6-.03.7-.41l.1.02a7.7 7.7 0 0 0-.12.54l-.92-.01-.9.01v-.1"}),a("path",{d:"m13.68 23.03-.92-.02-.9.02h-.02v-.14h.06c.13 0 .24 0 .24-.17v-1.8c0-.16-.11-.17-.24-.17h-.06v-.13h1.75v.01a4.18 4.18 0 0 0 0 .52v.01l-.13.04v-.02c-.02-.22-.05-.38-.4-.38h-.46v.86h.4c.2 0 .23-.1.25-.29v-.01h.13v.01a8.08 8.08 0 0 0 0 .8h-.01l-.12.03v-.02c-.02-.2-.03-.32-.25-.32h-.4v.78c0 .2.18.2.4.2.42 0 .58-.02.68-.4v-.01h.02l.1.03v.01a7.8 7.8 0 0 0-.11.54v.02zm-.02-.03.11-.52-.06-.02c-.1.39-.3.42-.7.42-.22 0-.43 0-.44-.24v-.8H13c.24-.01.26.13.28.33l.07-.02a7.25 7.25 0 0 1 0-.76h-.07c-.02.18-.08.3-.29.3h-.42v-.92h.5c.35 0 .4.18.42.4l.07-.03a5.76 5.76 0 0 1 0-.5l-.86.02-.83-.01v.07h.03c.12 0 .27.02.27.2v1.8c0 .18-.15.2-.27.2h-.03V23l.89-.02zm.59-2c0-.26-.14-.27-.24-.27h-.06v-.1l.53.01.54-.01c.43 0 .81.12.81.6a.64.64 0 0 1-.47.6l.58.87a.38.38 0 0 0 .33.21v.1l-.33-.01-.32.01a9.45 9.45 0 0 1-.7-1.1h-.23v.73c0 .26.12.27.28.27h.06v.1l-.59-.01-.5.01v-.1h.07c.13 0 .24-.06.24-.18v-1.74zm.44.78h.16c.34 0 .53-.13.53-.53a.47.47 0 0 0-.5-.5 1.65 1.65 0 0 0-.2.02v1.01z"}),a("path",{d:"m16.27 23.03-.33-.02c-.1 0-.21.02-.33.01a9.54 9.54 0 0 1-.7-1.1h-.2v.72c0 .25.1.25.26.25h.07v.14h-.01l-.59-.02-.5.02v-.14H14c.12 0 .22-.05.23-.16v-1.74c0-.24-.13-.24-.23-.24h-.08v-.13h1.09c.43 0 .83.11.83.61a.65.65 0 0 1-.47.6l.57.87a.37.37 0 0 0 .32.2h.02v.13zm-1.58-1.14h.23a10.55 10.55 0 0 0 .7 1.1h.64v-.07a.39.39 0 0 1-.33-.2l-.6-.9h.02a.63.63 0 0 0 .47-.59c0-.47-.37-.58-.8-.58h-1.06v.07h.05c.1 0 .26.02.26.27v1.74c0 .13-.13.2-.26.2h-.05V23l.48-.02.57.02v-.07h-.04c-.16 0-.3-.02-.3-.3v-.74zm0-.1h-.02v-1.04h.01a1.63 1.63 0 0 1 .2-.01.48.48 0 0 1 .51.51c0 .4-.2.55-.54.55zm.16-.02c.34 0 .51-.12.51-.52a.45.45 0 0 0-.48-.48 1.33 1.33 0 0 0-.18.01v.99zm3.73.57h.01v-1.29a.28.28 0 0 0-.3-.32h-.07v-.1l.48.01.42-.01v.1h-.06c-.14 0-.3.03-.3.44v1.55a2.27 2.27 0 0 0 .02.34h-.13L16.9 21.1v1.41c0 .3.06.4.32.4h.06v.1l-.44-.01-.47.01v-.1h.05c.24 0 .3-.16.3-.43v-1.44a.3.3 0 0 0-.3-.3h-.05v-.11l.4.01.3-.01z"}),a("path",{d:"M18.78 23.08h-.14l-1.73-1.94v1.37c0 .3.05.38.3.38h.08v.14h-.01l-.44-.02-.47.02h-.01v-.14h.06c.23 0 .3-.14.3-.41v-1.44a.3.3 0 0 0-.3-.3h-.06v-.12h.71l1.5 1.69v-1.26c0-.27-.18-.3-.28-.3h-.09v-.13h.93v.13h-.07c-.14 0-.28.01-.28.42v1.55a2.15 2.15 0 0 0 .02.34v.02zm-.13-.03h.11a2.34 2.34 0 0 1-.01-.33v-1.55c0-.41.17-.45.31-.45h.04v-.07h-.87v.07h.06a.3.3 0 0 1 .32.33v1.3h-.02v.01l-1.52-1.71h-.68v.07h.03a.32.32 0 0 1 .32.32v1.44c0 .27-.07.44-.32.45h-.03V23l.45-.02.42.02v-.07h-.04c-.27 0-.34-.12-.34-.42v-1.44zm-.07-.71.01-.01v.01zm0 0v-.01zm1.08.18a1.38 1.38 0 0 0-.07.27c0 .1.14.12.25.12h.04v.1a7.72 7.72 0 0 0-.78 0v-.1h.02a.3.3 0 0 0 .3-.22l.54-1.57a2.87 2.87 0 0 0 .13-.42 1.73 1.73 0 0 0 .3-.15.08.08 0 0 1 .04 0 .02.02 0 0 1 .02 0l.03.1.63 1.78.12.34a.22.22 0 0 0 .23.14h.02v.1a9.66 9.66 0 0 0-.98 0v-.1h.03c.08 0 .22-.01.22-.1a1.1 1.1 0 0 0-.07-.25l-.14-.4h-.77l-.1.36zm.5-1.5-.32.96h.63l-.31-.97z"}),a("path",{d:"M21.48 23.03 21 23l-.51.02h-.02v-.14h.05c.08 0 .2-.01.2-.08a1.1 1.1 0 0 0-.07-.24l-.13-.39h-.75l-.1.35a1.41 1.41 0 0 0-.08.26c0 .08.13.1.24.1h.06v.14h-.02l-.41-.02-.37.02h-.01v-.14h.03a.3.3 0 0 0 .28-.2l.55-1.57a4.05 4.05 0 0 0 .13-.44 1.75 1.75 0 0 0 .31-.14.09.09 0 0 1 .03-.01.04.04 0 0 1 .04.02l.03.09.63 1.78c.04.12.08.25.13.35a.2.2 0 0 0 .2.12h.04v.14h-.01zM20.5 23l.5-.02.45.02v-.07a.23.23 0 0 1-.24-.15c-.05-.1-.09-.23-.13-.35l-.62-1.78-.03-.09h-.02a.08.08 0 0 0-.01 0 1.26 1.26 0 0 1-.3.14 2.83 2.83 0 0 1-.13.43l-.55 1.56a.32.32 0 0 1-.3.24h-.01V23l.35-.02.4.02v-.07h-.03c-.1 0-.26-.02-.27-.14a1.35 1.35 0 0 1 .08-.27h.01-.01l.11-.36h.8l.13.4a1.04 1.04 0 0 1 .07.25c0 .1-.15.11-.23.12h-.02zm-.7-1 .33-1h.03l.32 1zm.05-.04h.6l-.3-.91zm.28-.94h.01zm1.5-.22c-.26 0-.27.06-.32.31h-.1l.04-.29a2.1 2.1 0 0 0 .02-.29h.08c.03.1.11.1.2.1h1.76c.1 0 .18 0 .19-.1h.08l-.04.28v.28l-.1.04c-.02-.13-.03-.33-.26-.33h-.56v1.82c0 .26.12.29.28.29h.07v.1L22.4 23l-.57.01v-.1h.06c.19 0 .29-.02.29-.29V20.8h-.56"}),a("path",{d:"M22.97 23.03 22.4 23l-.57.02h-.02v-.14h.08c.19 0 .27 0 .27-.27v-1.8h-.54v-.03h.57v1.83c0 .28-.11.3-.3.3h-.05V23l.56-.02.54.02v-.07h-.05c-.16 0-.3-.05-.3-.31v-1.83h.58c.23 0 .26.2.26.32l.08-.03v-.27l.04-.26h-.05c-.02.1-.11.1-.2.1h-1.77c-.08 0-.17 0-.2-.1h-.06a2 2 0 0 1-.02.27c0 .1-.02.19-.04.28h.08c.04-.24.07-.32.33-.31v.03c-.26 0-.25.04-.3.3h-.14v-.01l.04-.29a1.98 1.98 0 0 0 .02-.29v-.01h.11c.03.1.1.1.18.1h1.77c.1 0 .17 0 .17-.1v-.01h.02l.1.02v.01l-.05.28v.28h-.01l-.12.05v-.02c-.01-.13-.03-.31-.24-.31h-.54v1.8c0 .25.1.27.26.27h.08v.14h-.01m.74-.12h.05c.12 0 .25-.02.25-.2v-1.78c0-.18-.13-.2-.25-.2h-.05v-.1l.5.01.54-.01v.1h-.05c-.12 0-.25.02-.25.2v1.79c0 .17.13.19.25.19h.05v.1L24.2 23l-.5.01z"}),a("path",{d:"M24.74 23.03 24.2 23l-.5.02h-.01v-.14h.06c.12 0 .24 0 .24-.17v-1.8c0-.16-.12-.17-.24-.17h-.06v-.13h1.07v.13h-.07c-.12 0-.23.01-.23.18v1.79c0 .16.1.17.23.17h.07v.14zm-.01-.03v-.07h-.04c-.12 0-.26-.03-.26-.21v-1.8c0-.18.14-.2.26-.2h.04v-.07H23.7v.07h.04c.12 0 .27.02.27.2v1.8c0 .18-.15.2-.27.2h-.03V23l.48-.02.53.02zm1.37-2.42a1.2 1.2 0 0 1 1.3 1.18 1.25 1.25 0 0 1-1.28 1.3 1.2 1.2 0 0 1-1.28-1.22 1.24 1.24 0 0 1 1.26-1.26m.05 2.33c.66 0 .78-.58.78-1.08s-.27-1.1-.84-1.1c-.6 0-.77.53-.77.99 0 .6.28 1.2.83 1.2"}),a("path",{d:"M24.83 21.84a1.26 1.26 0 0 1 1.27-1.28v.03a1.23 1.23 0 0 0-1.24 1.25 1.19 1.19 0 0 0 1.26 1.2 1.24 1.24 0 0 0 1.27-1.28 1.18 1.18 0 0 0-1.3-1.17v-.03a1.21 1.21 0 0 1 1.33 1.2 1.27 1.27 0 0 1-1.3 1.32 1.22 1.22 0 0 1-1.3-1.24m.48-.12c0-.46.18-1 .8-1 .57 0 .84.61.84 1.11s-.12 1.1-.79 1.1v-.03c.65 0 .76-.57.76-1.07s-.26-1.08-.82-1.09c-.58 0-.75.52-.76.98 0 .6.28 1.18.82 1.18v.03c-.56 0-.84-.6-.85-1.21m4.4.62v-1.29a.28.28 0 0 0-.3-.32h-.07v-.1l.48.01.42-.01v.1h-.05c-.15 0-.3.03-.3.44v1.55a2.2 2.2 0 0 0 .01.34h-.12L28 21.1v1.41c0 .3.06.4.32.4h.06v.1l-.44-.01-.46.01v-.1h.05c.23 0 .3-.16.3-.43v-1.44a.3.3 0 0 0-.3-.3h-.05v-.11l.39.01.3-.01 1.52 1.71"}),a("path",{d:"M29.9 23.08h-.15l-1.72-1.94v1.37c0 .3.05.38.3.38h.07v.14h-.01l-.44-.02-.46.02h-.02v-.14h.07c.22 0 .28-.14.29-.41v-1.44a.3.3 0 0 0-.3-.3h-.06v-.12h.72l1.5 1.69v-1.26c0-.27-.18-.3-.28-.3h-.1v-.13h.94v.13h-.06c-.14 0-.29.01-.3.42v1.55a2.26 2.26 0 0 0 .03.34v.02zm-.13-.03h.1a2.42 2.42 0 0 1-.01-.33v-1.55c0-.41.17-.45.32-.45h.03v-.07h-.86v.07h.06a.3.3 0 0 1 .3.33v1.3l-.01.01-1.52-1.71h-.68v.07h.03a.32.32 0 0 1 .33.32v1.44c0 .27-.08.44-.32.45h-.04V23l.45-.02.43.02v-.07h-.05c-.27 0-.33-.12-.33-.42v-1.44zm-.07-.71v-.01zm-.01 0v-.01zm1.09.18a1.43 1.43 0 0 0-.08.27c0 .1.14.12.26.12h.03v.1a7.71 7.71 0 0 0-.78 0v-.1h.02a.3.3 0 0 0 .3-.22l.55-1.57a2.79 2.79 0 0 0 .12-.42 1.75 1.75 0 0 0 .31-.15.07.07 0 0 1 .03 0 .02.02 0 0 1 .02 0l.03.1.63 1.78c.04.11.08.24.13.34a.22.22 0 0 0 .22.14h.02v.1a9.66 9.66 0 0 0-.98 0v-.1h.04c.08 0 .2-.01.2-.1a1.1 1.1 0 0 0-.06-.25l-.13-.4h-.78zm.5-1.5h-.01l-.32.96h.64l-.32-.97z"}),a("path",{d:"m32.59 23.03-.47-.02-.5.02h-.02v-.14h.05c.08 0 .2-.01.2-.08a1.06 1.06 0 0 0-.07-.24l-.13-.39h-.76l-.1.35a1.44 1.44 0 0 0-.07.26c0 .08.12.1.24.1H31v.14h-.02l-.4-.02-.38.02h-.01v-.14h.03a.3.3 0 0 0 .29-.2l.54-1.57a4.27 4.27 0 0 0 .14-.44 1.85 1.85 0 0 0 .3-.14.08.08 0 0 1 .04 0 .04.04 0 0 1 .04.01l.03.09.62 1.78c.04.12.08.25.13.35a.2.2 0 0 0 .2.12h.04v.14h-.01zm-.97-.03.5-.02.46.02v-.08h-.01a.23.23 0 0 1-.24-.14l-.12-.35-.63-1.78a3.61 3.61 0 0 1-.03-.09h-.01a.06.06 0 0 0-.02 0 1.3 1.3 0 0 1-.3.14 2.94 2.94 0 0 1-.13.43l-.55 1.56a.32.32 0 0 1-.3.24h-.01V23l.35-.02.4.02v-.07h-.02c-.11 0-.27-.02-.27-.14a1.42 1.42 0 0 1 .07-.27h.02-.02l.11-.36h.8l.13.4a1.07 1.07 0 0 1 .07.25c0 .1-.15.11-.22.12h-.03zm-.7-1 .34-1h.02l.33 1zm.05-.04h.6l-.3-.91zm2.48.72c0 .13.1.18.2.19a2.47 2.47 0 0 0 .45 0 .48.48 0 0 0 .33-.2.78.78 0 0 0 .1-.24h.1l-.12.58-.9-.01-.9.01v-.1h.05c.12 0 .25-.02.25-.23v-1.75c0-.18-.13-.2-.25-.2h-.05v-.1l.54.01.51-.01v.1h-.08c-.13 0-.23 0-.23.19z"}),a("path",{d:"m34.5 23.03-.9-.02-.9.02v-.14h.06c.12 0 .24 0 .24-.2v-1.76c0-.17-.12-.18-.24-.18h-.07v-.13h1.09v.13h-.1c-.13 0-.21 0-.22.17v1.76c0 .13.09.16.2.17l.18.01a2.46 2.46 0 0 0 .26-.01.48.48 0 0 0 .32-.18.77.77 0 0 0 .1-.24v-.01h.13v.02l-.13.58zm0-.03.11-.55h-.07a.77.77 0 0 1-.1.24.5.5 0 0 1-.34.19 2.6 2.6 0 0 1-.26.01h-.19c-.11-.02-.22-.07-.22-.21v-1.76c0-.2.12-.2.25-.2h.07v-.07h-1.03v.07h.04c.12 0 .27.02.27.2v1.76c0 .22-.15.24-.27.24h-.04V23l.89-.02.88.02zm.1-2.47a.36.36 0 1 1-.37.36.35.35 0 0 1 .36-.36zm0 .66a.3.3 0 1 0-.3-.3.29.29 0 0 0 .3.3zm-.19-.1v-.02c.05-.01.05 0 .05-.04v-.26c0-.04 0-.05-.05-.05v-.02h.19c.06 0 .12.03.12.1a.11.11 0 0 1-.09.1l.06.09a.38.38 0 0 0 .08.08v.01h-.07c-.03 0-.06-.07-.13-.16h-.04v.12c0 .02.01.02.06.03v.01zm.12-.2h.05c.04 0 .06-.03.06-.09s-.03-.08-.07-.08h-.04z"})),a("path",{fill:"#fff",d:"M13.33 8.58a5.77 5.77 0 1 1 5.76 5.78 5.77 5.77 0 0 1-5.76-5.78"}),a("path",{fill:"#154a78",d:"M22.58 8.47a3.48 3.48 0 0 0-2.23-3.24v6.48a3.48 3.48 0 0 0 2.23-3.24zm-4.7 3.24V5.23a3.47 3.47 0 0 0 0 6.48zM19.1 3a5.48 5.48 0 1 0 5.47 5.48A5.47 5.47 0 0 0 19.11 3zm0 11.48a5.99 5.99 0 0 1-6.03-5.94A5.9 5.9 0 0 1 19.1 2.5h1.55a6.1 6.1 0 0 1 6.24 6.03 6.22 6.22 0 0 1-6.24 5.94z"})),Rc=Xd;var Jd=({opacity:t=1})=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"26",fill:"none",viewBox:"0 0 40 26",opacity:t},a("path",{fill:"#fff",d:"M0 0h40v26H0z"}),a("g",{"clip-path":"url(#a)"},a("g",{"clip-path":"url(#b)"},a("path",{fill:"#000",d:"M3.5 19.56a1.6 1.6 0 0 1 1.54-1.6h.06a1.52 1.52 0 0 1 1.42.77l-.43.25a1.02 1.02 0 0 0-.99-.59 1.13 1.13 0 0 0-1.14 1.11v.03a1.05 1.05 0 0 0 .99 1.14h.1a.94.94 0 0 0 1.04-.83H5.01v-.43h1.51v1.66h-.46v-.49l.03-.12a1.08 1.08 0 0 1-1.08.64 1.49 1.49 0 0 1-1.51-1.48v-.06Zm3.58-1.79h.46v3.33h-.46v-3.33Zm.92 2.2a1.2 1.2 0 1 1 .74 1.11A1.19 1.19 0 0 1 8 19.96Zm1.91 0a.74.74 0 1 0-1.48.06.72.72 0 0 0 .74.7.74.74 0 0 0 .74-.77Zm1.36.8v.33h-.46v-3.36h.46v1.4a.98.98 0 0 1 .77-.38 1.19 1.19 0 0 1 0 2.38.9.9 0 0 1-.77-.37Zm1.48-.8a.75.75 0 1 0-1.5-.04v.03a.76.76 0 1 0 1.5 0Zm.8.55c0-.46.28-.65.9-.74.43-.06.58-.1.58-.25s-.12-.37-.46-.37a.54.54 0 0 0-.58.43l-.44-.18a1.01 1.01 0 0 1 1.02-.65c.59 0 .96.3.96.86v1.48h-.43v-.33a.75.75 0 0 1-.74.4c-.5 0-.8-.28-.8-.65Zm1.33.06a.5.5 0 0 0 .19-.4v-.19c0 .1-.16.13-.5.16-.4.06-.55.15-.55.34 0 .15.15.28.37.28.18 0 .35-.07.49-.19Zm1.14-2.8h.46v3.32h-.46v-3.33Zm2.04.24h.5l1.53 2.34v-2.34h.47v3.12h-.47l-1.57-2.41v2.4h-.46v-3.11Zm2.96 1.94a1.18 1.18 0 0 1 1.17-1.2h.03a1.14 1.14 0 0 1 1.17 1.11v.25h-1.94a.77.77 0 0 0 .96.58c.2-.05.37-.17.49-.34l.37.22a1.18 1.18 0 0 1-1.05.56 1.15 1.15 0 0 1-1.2-1.11v-.07Zm.46-.21h1.45a.67.67 0 0 0-.7-.56.7.7 0 0 0-.75.56Zm2.56.61v-1.14h-.46v-.4h.46v-.5l.46-.3v.8h.62v.4h-.65v1.14c0 .25.13.37.31.37.12 0 .24-.03.34-.09v.43a.82.82 0 0 1-.37.1c-.46 0-.71-.25-.71-.8Zm1.36-1.54h.46l.52 1.67.62-1.67h.43l.62 1.67.55-1.67h.47l-.8 2.28h-.44l-.61-1.66-.65 1.7h-.46l-.71-2.32Zm3.88 1.14a1.2 1.2 0 1 1 .74 1.12 1.19 1.19 0 0 1-.74-1.12Zm1.92 0a.74.74 0 1 0-1.48.07.72.72 0 0 0 .74.7.74.74 0 0 0 .74-.77Zm.89-1.14h.46v.4a.72.72 0 0 1 .65-.4h.19v.46h-.28c-.37 0-.56.16-.56.6v1.22h-.46v-2.28Zm2.59 1.24-.4.43v.58h-.46v-3.3h.46V20l1.08-1.17h.55l-.89.96.92 1.32h-.52l-.74-1.04ZM5.2 10.16H3.72v5.18H5.2c.66.03 1.32-.18 1.85-.59a2.56 2.56 0 0 0 .92-1.97c0-1.54-1.14-2.62-2.77-2.62Zm1.2 3.88c-.3.28-.74.4-1.39.4h-.28v-3.39h.28a1.88 1.88 0 0 1 1.39.43 1.73 1.73 0 0 1 .55 1.3c0 .48-.2.93-.55 1.26Zm2.03-3.88h1.02v5.18H8.43v-5.18Zm3.49 2c-.62-.22-.77-.37-.77-.65 0-.34.3-.58.74-.58a.97.97 0 0 1 .8.43l.53-.68a2.32 2.32 0 0 0-1.52-.59 1.52 1.52 0 0 0-1.6 1.42v.06c0 .71.34 1.08 1.26 1.42.25.08.49.18.71.31a.64.64 0 0 1 .31.53.75.75 0 0 1-.74.74h-.03a1.29 1.29 0 0 1-1.1-.68l-.66.61a2 2 0 0 0 1.8 1 1.68 1.68 0 0 0 1.78-1.7c-.03-.87-.37-1.24-1.51-1.64Zm1.82.59a2.66 2.66 0 0 0 2.65 2.68h.06c.44 0 .88-.1 1.27-.3v-1.18a1.54 1.54 0 0 1-1.2.55 1.69 1.69 0 0 1-1.73-1.63v-.15a1.72 1.72 0 0 1 1.66-1.8h.03a1.64 1.64 0 0 1 1.27.6v-1.15c-.38-.2-.8-.31-1.23-.3a2.69 2.69 0 0 0-2.78 2.68Zm11.97.9-1.4-3.5h-1.07l2.19 5.31h.52l2.25-5.3h-1.1l-1.4 3.48Zm2.96 1.69h2.83v-.87h-1.85v-1.41h1.8v-.87h-1.8v-1.14h1.85v-.9h-2.83v5.19Zm6.84-3.64c0-.96-.68-1.51-1.82-1.51h-1.48v5.18h1.02v-2.1h.12l1.4 2.07h1.23l-1.64-2.2a1.36 1.36 0 0 0 1.17-1.44Zm-2.03.86h-.31V11h.3c.62 0 .96.28.96.77.03.52-.3.8-.95.8Zm2.84-2.13c0-.09-.07-.15-.19-.15h-.15v.46h.12v-.15l.12.18h.13l-.13-.21c.06 0 .1-.06.1-.13Zm-.19.07-.03-.13h.03c.06 0 .1.03.1.06-.04.07-.07.07-.1.07Z"})),a("path",{fill:"#000",d:"M36.16 10.13a.4.4 0 0 0-.4.4.4.4 0 1 0 .8 0 .4.4 0 0 0-.4-.4Zm0 .74a.32.32 0 0 1-.34-.31.32.32 0 0 1 .65-.03.34.34 0 0 1-.3.34Z"}),a("path",{fill:"url(#c)",d:"M18.06 12.75a2.75 2.75 0 1 0 5.49 0 2.75 2.75 0 0 0-5.5 0Z"}),a("path",{fill:"url(#d)",d:"M18.06 12.75a2.75 2.75 0 1 0 5.49 0 2.75 2.75 0 0 0-5.5 0Z"}),a("mask",{id:"e",width:"6",height:"6",x:"18",y:"10",maskUnits:"userSpaceOnUse",style:"mask-type:luminance"},a("path",{fill:"#fff",d:"M18.06 12.75a2.74 2.74 0 1 0 5.49 0 2.74 2.74 0 0 0-5.5 0Z"})),a("g",{mask:"url(#e)"},a("path",{fill:"url(#f)",d:"M17.75 12.87a3.36 3.36 0 1 0 6.72 0 3.36 3.36 0 0 0-6.72 0Z"}))),a("g",{"clip-path":"url(#g)"},a("g",{"clip-path":"url(#h)"},a("path",{fill:"#000",d:"M3.5 19.56a1.6 1.6 0 0 1 1.54-1.6h.06a1.52 1.52 0 0 1 1.42.77l-.43.25a1.02 1.02 0 0 0-.99-.59 1.13 1.13 0 0 0-1.14 1.11v.03a1.05 1.05 0 0 0 .99 1.14h.1a.94.94 0 0 0 1.04-.83H5.01v-.43h1.51v1.66h-.46v-.49l.03-.12a1.08 1.08 0 0 1-1.08.64 1.49 1.49 0 0 1-1.51-1.48v-.06Zm3.58-1.79h.46v3.33h-.46v-3.33Zm.92 2.2a1.2 1.2 0 1 1 .74 1.11A1.19 1.19 0 0 1 8 19.96Zm1.91 0a.74.74 0 1 0-1.48.06.72.72 0 0 0 .74.7.74.74 0 0 0 .74-.77Zm1.36.8v.33h-.46v-3.36h.46v1.4a.98.98 0 0 1 .77-.38 1.19 1.19 0 0 1 0 2.38.9.9 0 0 1-.77-.37Zm1.48-.8a.75.75 0 1 0-1.5-.04v.03a.76.76 0 1 0 1.5 0Zm.8.55c0-.46.28-.65.9-.74.43-.06.58-.1.58-.25s-.12-.37-.46-.37a.54.54 0 0 0-.58.43l-.44-.18a1.01 1.01 0 0 1 1.02-.65c.59 0 .96.3.96.86v1.48h-.43v-.33a.75.75 0 0 1-.74.4c-.5 0-.8-.28-.8-.65Zm1.33.06a.5.5 0 0 0 .19-.4v-.19c0 .1-.16.13-.5.16-.4.06-.55.15-.55.34 0 .15.15.28.37.28.18 0 .35-.07.49-.19Zm1.14-2.8h.46v3.32h-.46v-3.33Zm2.04.24h.5l1.53 2.34v-2.34h.47v3.12h-.47l-1.57-2.41v2.4h-.46v-3.11Zm2.96 1.94a1.18 1.18 0 0 1 1.17-1.2h.03a1.14 1.14 0 0 1 1.17 1.11v.25h-1.94a.77.77 0 0 0 .96.58c.2-.05.37-.17.49-.34l.37.22a1.18 1.18 0 0 1-1.05.56 1.15 1.15 0 0 1-1.2-1.11v-.07Zm.46-.21h1.45a.67.67 0 0 0-.7-.56.7.7 0 0 0-.75.56Zm2.56.61v-1.14h-.46v-.4h.46v-.5l.46-.3v.8h.62v.4h-.65v1.14c0 .25.13.37.31.37.12 0 .24-.03.34-.09v.43a.82.82 0 0 1-.37.1c-.46 0-.71-.25-.71-.8Zm1.36-1.54h.46l.52 1.67.62-1.67h.43l.62 1.67.55-1.67h.47l-.8 2.28h-.44l-.61-1.66-.65 1.7h-.46l-.71-2.32Zm3.88 1.14a1.2 1.2 0 1 1 .74 1.12 1.19 1.19 0 0 1-.74-1.12Zm1.92 0a.74.74 0 1 0-1.48.07.72.72 0 0 0 .74.7.74.74 0 0 0 .74-.77Zm.89-1.14h.46v.4a.72.72 0 0 1 .65-.4h.19v.46h-.28c-.37 0-.56.16-.56.6v1.22h-.46v-2.28Zm2.59 1.24-.4.43v.58h-.46v-3.3h.46V20l1.08-1.17h.55l-.89.96.92 1.32h-.52l-.74-1.04ZM5.2 10.16H3.72v5.18H5.2c.66.03 1.32-.18 1.85-.59a2.56 2.56 0 0 0 .92-1.97c0-1.54-1.14-2.62-2.77-2.62Zm1.2 3.88c-.3.28-.74.4-1.39.4h-.28v-3.39h.28a1.88 1.88 0 0 1 1.39.43 1.73 1.73 0 0 1 .55 1.3c0 .48-.2.93-.55 1.26Zm2.03-3.88h1.02v5.18H8.43v-5.18Zm3.49 2c-.62-.22-.77-.37-.77-.65 0-.34.3-.58.74-.58a.97.97 0 0 1 .8.43l.53-.68a2.32 2.32 0 0 0-1.52-.59 1.52 1.52 0 0 0-1.6 1.42v.06c0 .71.34 1.08 1.26 1.42.25.08.49.18.71.31a.64.64 0 0 1 .31.53.75.75 0 0 1-.74.74h-.03a1.29 1.29 0 0 1-1.1-.68l-.66.61a2 2 0 0 0 1.8 1 1.68 1.68 0 0 0 1.78-1.7c-.03-.87-.37-1.24-1.51-1.64Zm1.82.59a2.66 2.66 0 0 0 2.65 2.68h.06c.44 0 .88-.1 1.27-.3v-1.18a1.54 1.54 0 0 1-1.2.55 1.69 1.69 0 0 1-1.73-1.63v-.15a1.72 1.72 0 0 1 1.66-1.8h.03a1.64 1.64 0 0 1 1.27.6v-1.15c-.38-.2-.8-.31-1.23-.3a2.69 2.69 0 0 0-2.78 2.68Zm11.97.9-1.4-3.5h-1.07l2.19 5.31h.52l2.25-5.3h-1.1l-1.4 3.48Zm2.96 1.69h2.83v-.87h-1.85v-1.41h1.8v-.87h-1.8v-1.14h1.85v-.9h-2.83v5.19Zm6.84-3.64c0-.96-.68-1.51-1.82-1.51h-1.48v5.18h1.02v-2.1h.12l1.4 2.07h1.23l-1.64-2.2a1.36 1.36 0 0 0 1.17-1.44Zm-2.03.86h-.31V11h.3c.62 0 .96.28.96.77.03.52-.3.8-.95.8Zm2.84-2.13c0-.09-.07-.15-.19-.15h-.15v.46h.12v-.15l.12.18h.13l-.13-.21c.06 0 .1-.06.1-.13Zm-.19.07-.03-.13h.03c.06 0 .1.03.1.06-.04.07-.07.07-.1.07Z"})),a("path",{fill:"#000",d:"M36.16 10.13a.4.4 0 0 0-.4.4.4.4 0 1 0 .8 0 .4.4 0 0 0-.4-.4Zm0 .74a.32.32 0 0 1-.34-.31.32.32 0 0 1 .65-.03.34.34 0 0 1-.3.34Z"}),a("path",{fill:"url(#i)",d:"M18.06 12.75a2.75 2.75 0 1 0 5.49 0 2.75 2.75 0 0 0-5.5 0Z"}),a("path",{fill:"url(#j)",d:"M18.06 12.75a2.75 2.75 0 1 0 5.49 0 2.75 2.75 0 0 0-5.5 0Z"}),a("mask",{id:"k",width:"6",height:"6",x:"18",y:"10",maskUnits:"userSpaceOnUse",style:"mask-type:luminance"},a("path",{fill:"#fff",d:"M18.06 12.75a2.74 2.74 0 1 0 5.49 0 2.74 2.74 0 0 0-5.5 0Z"})),a("g",{mask:"url(#k)"},a("path",{fill:"url(#l)",d:"M17.75 12.87a3.36 3.36 0 1 0 6.72 0 3.36 3.36 0 0 0-6.72 0Z"}))),a("defs",null,a("linearGradient",{id:"c",x1:"22.25",x2:"19.35",y1:"15.06",y2:"10.42",gradientUnits:"userSpaceOnUse"},a("stop",{offset:"0","stop-color":"#F59F00"}),a("stop",{offset:".19","stop-color":"#F49B00"}),a("stop",{offset:".37","stop-color":"#F29101"}),a("stop",{offset:".5","stop-color":"#F08302"}),a("stop",{offset:".6","stop-color":"#EE7905"}),a("stop",{offset:".76","stop-color":"#EC7008"}),a("stop",{offset:"1","stop-color":"#EC6D09"})),a("linearGradient",{id:"d",x1:"22.25",x2:"19.35",y1:"15.06",y2:"10.42",gradientUnits:"userSpaceOnUse"},a("stop",{offset:"0","stop-color":"#F3941E","stop-opacity":"0"}),a("stop",{offset:".04","stop-color":"#F48C1C","stop-opacity":".08"}),a("stop",{offset:".2","stop-color":"#F77314","stop-opacity":".32"}),a("stop",{offset:".35","stop-color":"#F95D0E","stop-opacity":".53"}),a("stop",{offset:".5","stop-color":"#FB4B09","stop-opacity":".7"}),a("stop",{offset:".64","stop-color":"#FD3D05","stop-opacity":".83"}),a("stop",{offset:".77","stop-color":"#FE3302","stop-opacity":".92"}),a("stop",{offset:".9","stop-color":"#FF2D01","stop-opacity":".98"}),a("stop",{offset:"1","stop-color":"#FF2B00"})),a("radialGradient",{id:"f",cx:"0",cy:"0",r:"1",gradientTransform:"rotate(4.24 -167.26 291.02) scale(3.3208)",gradientUnits:"userSpaceOnUse"},a("stop",{offset:"0","stop-color":"#F3941E","stop-opacity":"0"}),a("stop",{offset:".45","stop-color":"#EA8D1D","stop-opacity":".05"}),a("stop",{offset:".66","stop-color":"#CA7618","stop-opacity":".2"}),a("stop",{offset:".83","stop-color":"#924D10","stop-opacity":".48"}),a("stop",{offset:".96","stop-color":"#441304","stop-opacity":".87"}),a("stop",{offset:".99","stop-color":"#2F0401","stop-opacity":".97"})),a("linearGradient",{id:"i",x1:"22.25",x2:"19.35",y1:"15.06",y2:"10.42",gradientUnits:"userSpaceOnUse"},a("stop",{offset:"0","stop-color":"#F59F00"}),a("stop",{offset:".19","stop-color":"#F49B00"}),a("stop",{offset:".37","stop-color":"#F29101"}),a("stop",{offset:".5","stop-color":"#F08302"}),a("stop",{offset:".6","stop-color":"#EE7905"}),a("stop",{offset:".76","stop-color":"#EC7008"}),a("stop",{offset:"1","stop-color":"#EC6D09"})),a("linearGradient",{id:"j",x1:"22.25",x2:"19.35",y1:"15.06",y2:"10.42",gradientUnits:"userSpaceOnUse"},a("stop",{offset:"0","stop-color":"#F3941E","stop-opacity":"0"}),a("stop",{offset:".04","stop-color":"#F48C1C","stop-opacity":".08"}),a("stop",{offset:".2","stop-color":"#F77314","stop-opacity":".32"}),a("stop",{offset:".35","stop-color":"#F95D0E","stop-opacity":".53"}),a("stop",{offset:".5","stop-color":"#FB4B09","stop-opacity":".7"}),a("stop",{offset:".64","stop-color":"#FD3D05","stop-opacity":".83"}),a("stop",{offset:".77","stop-color":"#FE3302","stop-opacity":".92"}),a("stop",{offset:".9","stop-color":"#FF2D01","stop-opacity":".98"}),a("stop",{offset:"1","stop-color":"#FF2B00"})),a("radialGradient",{id:"l",cx:"0",cy:"0",r:"1",gradientTransform:"rotate(4.24 -167.26 291.02) scale(3.3208)",gradientUnits:"userSpaceOnUse"},a("stop",{offset:"0","stop-color":"#F3941E","stop-opacity":"0"}),a("stop",{offset:".45","stop-color":"#EA8D1D","stop-opacity":".05"}),a("stop",{offset:".66","stop-color":"#CA7618","stop-opacity":".2"}),a("stop",{offset:".83","stop-color":"#924D10","stop-opacity":".48"}),a("stop",{offset:".96","stop-color":"#441304","stop-opacity":".87"}),a("stop",{offset:".99","stop-color":"#2F0401","stop-opacity":".97"})),a("clipPath",{id:"a"},a("path",{fill:"#fff",d:"M0 0h33v5.55H0z",transform:"translate(3.5 10)"})),a("clipPath",{id:"b"},a("path",{fill:"#fff",d:"M0 0h33v5.86H0z",transform:"translate(3.5 10)"})),a("clipPath",{id:"g"},a("path",{fill:"#fff",d:"M0 0h33v5.55H0z",transform:"translate(3.5 10)"})),a("clipPath",{id:"h"},a("path",{fill:"#fff",d:"M0 0h33v5.86H0z",transform:"translate(3.5 10)"})))),Pc=Jd;var Qd=({opacity:t=1})=>a("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 40 26",width:"40",height:"26",opacity:t},a("rect",{width:"45.3",height:"27",x:"-3.3",y:"-.79",fill:"#fff",rx:"2.82"}),a("path",{fill:"#01798a",d:"M27.27-.79a4.06 4.06 0 0 0-3.6 2.8l-4.96 23.42a2.14 2.14 0 0 0 2 2.8h18.35a2.81 2.81 0 0 0 2.8-2.82V1.15A2.25 2.25 0 0 0 40-.8"}),a("rect",{width:"20.38",height:"29.02",x:"-4",y:"-.79",fill:"#dc1f2b",rx:"2.82"}),a("path",{fill:"#1a4580",d:"M24.37 2.02a3.98 3.98 0 0 1 3.48-2.8H14.18a3.97 3.97 0 0 0-3.5 2.8l-4.85 23.4a2.13 2.13 0 0 0 1.94 2.81h13.7a2.13 2.13 0 0 1-1.94-2.8z"}),a("path",{fill:"#fff",d:"M16.63 15.04h.18a.32.32 0 0 0 .32-.17l.46-.7h1.24l-.26.47h1.49l-.2.7H18.1a.82.82 0 0 1-.75.44h-.92zm-.2 1h3.25l-.21.77h-1.3l-.2.74h1.27l-.21.77h-1.27l-.3 1.09c-.07.18.02.26.29.24h1.03l-.19.71H16.6q-.57 0-.39-.65l.38-1.4h-.81l.2-.76h.82l.2-.74h-.78l.2-.76zm5.19-1.87-.06.45a2.37 2.37 0 0 1 1.18-.47h2.05l-.78 2.88q-.1.5-.84.5h-2.34l-.54 2.01c-.03.11.01.17.13.17h.46l-.17.62h-1.17q-.67 0-.56-.4l1.54-5.76zm1.74.81h-1.84l-.22.78a1.52 1.52 0 0 1 .82-.23h1.1zm-.67 1.8c.14.02.22-.03.22-.16l.12-.4h-1.84l-.16.57zm-1.24.93h1.06l-.02.47h.29c.14 0 .2-.05.2-.14l.1-.3h.87l-.11.44a.76.76 0 0 1-.8.57h-.56v.8c-.01.12.1.18.33.18h.53l-.17.63H21.9c-.36.02-.53-.15-.53-.52zM8.6 10.34a2.62 2.62 0 0 1-1 1.64 3.24 3.24 0 0 1-1.98.58 2.16 2.16 0 0 1-1.68-.59 1.54 1.54 0 0 1-.37-1.06 2.86 2.86 0 0 1 .06-.57l.87-4.2h1.3l-.85 4.15a1.35 1.35 0 0 0-.04.32.82.82 0 0 0 .16.52.89.89 0 0 0 .75.3 1.56 1.56 0 0 0 1-.3 1.37 1.37 0 0 0 .5-.84l.84-4.15h1.3zm5.47-1.65h1.02l-.8 3.74h-1.02zm.32-1.37h1.03l-.2.91H14.2l.19-.9M16 12.15a1.39 1.39 0 0 1-.41-1.05 2.45 2.45 0 0 1 .01-.25l.04-.27a2.55 2.55 0 0 1 .78-1.45 2.07 2.07 0 0 1 1.43-.54 1.5 1.5 0 0 1 1.1.39 1.4 1.4 0 0 1 .4 1.06 2.59 2.59 0 0 1-.02.26l-.05.28a2.48 2.48 0 0 1-.77 1.42 2.08 2.08 0 0 1-1.43.53 1.5 1.5 0 0 1-1.09-.38m1.95-.74a1.84 1.84 0 0 0 .38-.9.58.58 0 0 0 .03-.19 1.74 1.74 0 0 0 .01-.17.76.76 0 0 0-.17-.54.64.64 0 0 0-.5-.2.89.89 0 0 0-.7.3 1.9 1.9 0 0 0-.38.92l-.03.18a1.36 1.36 0 0 0-.01.17.75.75 0 0 0 .17.54.64.64 0 0 0 .5.18.9.9 0 0 0 .7-.3m8.02 3.67.25-.87h1.24l-.05.32a3.1 3.1 0 0 1 1.09-.32h1.54l-.25.87h-.24l-1.16 4.12h.24l-.23.82h-.24l-.1.36h-1.2l.1-.36h-2.38l.23-.82h.24l1.16-4.12zm1.34 0L27 16.2a5.13 5.13 0 0 1 1-.27c.1-.4.24-.85.24-.85zm-.46 1.64-.32 1.17a3.44 3.44 0 0 1 1.01-.33l.24-.84zm.23 2.48.24-.84h-.93l-.24.84zm3.01-5.05h1.17l.05.44c0 .11.06.16.2.16h.2l-.2.74h-.87c-.32.02-.5-.1-.5-.38zm-.34 1.59h3.79l-.23.79h-1.2l-.2.74h1.2l-.23.79h-1.34l-.3.46h.65l.16.93c.01.09.1.13.23.13h.2l-.2.77h-.73c-.37.02-.57-.1-.58-.38l-.18-.85-.6.9a.65.65 0 0 1-.65.36h-1.1l.22-.77h.34a.46.46 0 0 0 .36-.19l.94-1.36h-1.2l.22-.8h1.3l.21-.73h-1.3l.22-.8zM9.8 8.69h.92l-.1.54.12-.16a1.43 1.43 0 0 1 1.1-.48 1 1 0 0 1 .83.34 1.15 1.15 0 0 1 .14.95l-.5 2.56h-.95l.46-2.32a.74.74 0 0 0-.04-.53.44.44 0 0 0-.4-.17.88.88 0 0 0-.62.23 1.14 1.14 0 0 0-.34.63L10 12.44h-.94zm10.55 0h.92l-.1.54.13-.16a1.43 1.43 0 0 1 1.08-.48.99.99 0 0 1 .85.34 1.14 1.14 0 0 1 .13.95l-.5 2.56h-.95l.46-2.32a.75.75 0 0 0-.04-.53.45.45 0 0 0-.4-.17.89.89 0 0 0-.62.23 1.12 1.12 0 0 0-.33.63l-.43 2.16h-.94zm4.55-2.33h2.67a1.8 1.8 0 0 1 1.19.35 1.25 1.25 0 0 1 .4 1v.02a3.77 3.77 0 0 1-.06.59 2.38 2.38 0 0 1-.81 1.4 2.29 2.29 0 0 1-1.5.52h-1.44l-.44 2.2h-1.24zm.67 2.82h1.19a1.14 1.14 0 0 0 .73-.21 1.14 1.14 0 0 0 .36-.67l.03-.15v-.13a.52.52 0 0 0-.22-.47 1.35 1.35 0 0 0-.72-.15h-1zm9.15 3.98a5.91 5.91 0 0 1-.98 1.56 1.99 1.99 0 0 1-1.7.71l.08-.64c.89-.27 1.36-1.51 1.64-2.06l-.33-4.03.68-.01h.58l.06 2.53 1.07-2.53h1.09zM31.68 9l-.43.3a1.35 1.35 0 0 0-1.66-.21c-1.08.5-1.98 4.4 1 3.11l.17.2 1.17.04.77-3.54zm-.66 1.92c-.2.56-.61.94-.94.83-.33-.1-.45-.64-.26-1.2.19-.57.61-.94.94-.83.33.1.45.64.26 1.2"})),Tc=Qd;function dn(t){let e=()=>window.matchMedia(t).matches,[r,o]=z(e);return pe(()=>{let s=window.matchMedia(t),n=i=>o(i.matches);return o(s.matches),s.addEventListener("change",n),()=>{s.removeEventListener("change",n)}},[t]),r}function Ho({brands:t,brandHidden:e=[],limit:r=3}){let o=dn("(max-width: 380px)"),n=dn("(max-width: 335px)")?1:o?2:r,i=t.filter(c=>{let{brand:d}=c;return!e.some(u=>u.brand===d)});return a(le,null,i.map(({brand:c},d)=>d>=Math.min(r,n)?d===Math.min(r,n)?a(ir,{content:a("span",{style:{display:"flex",gap:"4px",overflow:"visible"}},i.slice(Math.min(r,n)).map(({brand:p})=>a(Ac,{key:p,brand:p})))},a("span",{key:c,className:"straumur__render-brand-icons__overflow"},"+",i.length-Math.min(r,n))):null:a(Ac,{key:c,brand:c})))}var Ac=({brand:t})=>{switch(t){case"visa":return a(Cc,null);case"mc":return a(vc,null);case"maestro":return a(Ec,null);case"amex":return a(bc,null);case"jcb":return a(Sc,null);case"diners":return a(Rc,null);case"discover":return a(Pc,null);case"cup":return a(Tc,null);default:return a("span",null,t)}};var ep=()=>a("svg",{width:"40",height:"40",viewBox:"0 0 40 40",xmlns:"http://www.w3.org/2000/svg",stroke:"#002649"},a("g",{fill:"none","fill-rule":"evenodd"},a("g",{transform:"translate(2 2)","stroke-width":"4"},a("circle",{"stroke-opacity":".3",cx:"18",cy:"18",r:"18"}),a("path",{d:"M36 18c0-9.94-8.06-18-18-18"},a("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"}))))),lr=ep;var tp=()=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"13",viewBox:"0 0 16 13",fill:"none"},a("path",{d:"M2 7L6 11L14 2",stroke:"#002649","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"})),Dc=tp;function rp({configuration:t,paymentMethods:e}){let r=ne(null),o=ne(),s=ne(),[n,i]=z(!0),[c,d]=z("required"),[p,u]=z(!1),l=ne(!1),[h,m]=z([]),[y,E]=z({encryptedCardNumber:{visible:!1},encryptedExpiryDate:{visible:!1},encryptedSecurityCode:{visible:!1}}),C=e.paymentMethods.paymentMethods?.some(S=>S.type==="scheme"),{activePaymentMethod:_,setActivePaymentMethod:g,isPaymentMethodInitialized:O,updatePaymentMethodInitialization:N,handleSuccess:b,handleError:P,setThreeDSecureActive:L,threeDSecureActive:H}=_e();if(!C||_!=="card"&&H)return null;let U=e.paymentMethods.paymentMethods.find(S=>S.type==="scheme").brands,F=async()=>{o.current=await Ce({clientKey:e.clientKey,environment:t.environment,amount:{value:e.minorUnitsAmount,currency:e.currency},locale:t.locale,countryCode:"IS",paymentMethodsResponse:e.paymentMethods,onSubmit:Wo,onAdditionalDetails:Zo,onError:Ko,onPaymentCompleted:qo,onPaymentFailed:Xo}),s.current=new Ye(o.current,{placeholders:t.placeholders,challengeWindowSize:"05",brands:U,onBrand:S=>{if(d(S.cvcPolicy),S.brand==="card"){m([]);return}m(U.filter(K=>K!==S.brand).map(K=>({brand:K})))},onConfigSuccess(){N("card",!0)},onValidationError:S=>{let K={encryptedCardNumber:{visible:!1,message:void 0},encryptedExpiryDate:{visible:!1,message:void 0},encryptedSecurityCode:{visible:!1,message:void 0}};S.filter(B=>B.error).forEach(B=>{K[B.fieldType].visible=!0,K[B.fieldType].message=B.errorI18n}),E(K)},onAllValid:S=>{i(!S.allValid)}}),r.current&&s.current.mount(r.current)};pe(()=>{_==="card"&&!O.card&&F()},[t,_]),pe(()=>{s.current&&O.card&&(F(),E({encryptedCardNumber:{visible:!1,message:void 0},encryptedExpiryDate:{visible:!1,message:void 0},encryptedSecurityCode:{visible:!1,message:void 0}}))},[t]);let M=()=>{g("card")};if(e.paymentMethods?.paymentMethods?.length===0)return null;let ie=U.map(S=>({brand:S,brandFullName:S}));function Go(S){u(S.currentTarget.checked)}function Ko(S,K){P("error.unknownError")}pe(()=>{l.current=p},[p]);async function Wo(S,K,B){let gt={...S.data,storePaymentMethod:l.current,sessionId:t.sessionId},Te=await Qe(t.environment,gt);if(!Te.ok){B.reject(),P("error.failedToSubmitPayment");return}let Ae=await Te.json();if(!Ae.resultCode){B.reject(),P("error.paymentFailed");return}let{resultCode:De,action:vt}=Ae;(De==="ChallengeShopper"||De==="IdentifyShopper")&&L(!0),B.resolve({resultCode:De,action:vt})}async function Zo(S,K,B){let gt={...S.data,sessionId:t.sessionId},Te=await Fe(t.environment,gt);if(!Te.ok){B.reject(),P("error.failedToSubmitPaymentDetails");return}let Ae=await Te.json();if(!Ae.resultCode){B.reject(),P("error.paymentDetailsFailed");return}let{resultCode:De,action:vt}=Ae;B.resolve({resultCode:De,action:vt})}function qo(S,K){S.resultCode==="Authorised"?b("success.paymentAuthorized"):P("error.paymentUnsuccessful"),t.onPaymentCompleted?.({resultCode:S.resultCode})}function Xo(S,K){S?(S.resultCode==="Authorised"?b("success.paymentAuthorized"):P("error.paymentUnsuccessful"),t.onPaymentFailed?.({resultCode:S.resultCode})):t.onPaymentFailed?.()}function Jo(){s.current&&s.current.submit()}return a("label",{className:"straumur__card-component"},a("input",{type:"radio",className:"straumur__card-component__radio-selector",checked:_==="card",onChange:M}),a("span",{className:"straumur__card-component__content"},a("span",{className:"straumur__card-component--circle"}),a(gc,null),a("span",{className:"straumur__card-component--text"},V(t.locale,"cards.title")),a("span",{className:"straumur__card-component--brands"},a(Ho,{brands:ie,brandHidden:h}))),a("div",{className:"straumur__card-component__expandable",ref:r,style:{height:H?"600px":"auto",minWidth:H?"350px":"auto"}},!O.card&&a("div",{className:"straumur__card-component__loading-text"},a(lr,null)),a("div",{className:"straumur__card-component__form",style:{opacity:O.card&&!H?1:0,position:O.card&&!H?"relative":"absolute",transition:"opacity 0.3s ease-in-out"}},a("div",{className:"straumur__card-component__form--wrapper"},a("label",{className:`straumur__card-component__form--wrapper--label ${y.encryptedCardNumber.visible?"straumur__card-component__form--wrapper--label--error":""}`},V(t.locale,"cards.cardNumber")),a("span",{className:`straumur__card-component__form--wrapper--input ${y.encryptedCardNumber.visible?"straumur__card-component__form--wrapper--input--error":""}`,"data-cse":"encryptedCardNumber"}),y.encryptedCardNumber.visible&&a("span",{className:"straumur__card-component__form--wrapper--error"},y.encryptedCardNumber.message)),a("div",{className:"straumur__card-component__form--field-wrapper"},a("div",{className:"straumur__card-component__form--wrapper"},a("label",{className:`straumur__card-component__form--wrapper--label ${y.encryptedExpiryDate.visible?"straumur__card-component__form--wrapper--label--error":""}`},V(t.locale,"cards.expiryDate")),a("span",{className:`straumur__card-component__form--wrapper--input ${y.encryptedExpiryDate.visible?"straumur__card-component__form--wrapper--input--error":""}`,"data-cse":"encryptedExpiryDate"}),y.encryptedExpiryDate.visible&&a("span",{className:"straumur__card-component__form--wrapper--error"},y.encryptedExpiryDate.message)),a("div",{className:"straumur__card-component__form--wrapper"},(c==="optional"||c==="required")&&a(le,null,a("label",{className:`straumur__card-component__form--wrapper--label ${y.encryptedSecurityCode.visible?"straumur__card-component__form--wrapper--label--error":""}`},c==="optional"?V(t.locale,"cards.securityCode3DigitsOptional"):V(t.locale,"cards.securityCode3Digits")),a("span",{className:`straumur__card-component__form--wrapper--input ${y.encryptedSecurityCode.visible?"straumur__card-component__form--wrapper--input--error":""}`,"data-cse":"encryptedSecurityCode"}),y.encryptedSecurityCode.visible&&a("span",{className:"straumur__card-component__form--wrapper--error"},y.encryptedSecurityCode.message),a("div",{className:"straumur__card-component__form--wrapper--label--info"},a(ir,{content:a("span",null,V(t.locale,"cards.securityCode3DigitsInfo"))},a(Vo,null)))))),e.enableStoreDetails==="AskForConsent"&&a("label",{className:"straumur__card-component__form--wrapper--label-checkbox"},a("div",{className:`straumur__card-component__form--wrapper--label-checkbox--checkmark ${p?"straumur__card-component__form--wrapper--label-checkbox--checkmark--checked":""}`},a("div",{className:`straumur__card-component__form--wrapper--label-checkbox--checkmark--icon ${p?"straumur__card-component__form--wrapper--label-checkbox--checkmark--icon--checked":""}`},a(Dc,null))),a("input",{type:"checkbox",className:"straumur__card-component__form--wrapper--label-checkbox--checkbox",checked:p,onChange:Go}),V(t.locale,"cards.storePaymentMethod")),a("button",{className:"straumur__card-component__submit-button",disabled:n,onClick:Jo},e.formattedAmount))))}var Ic=rp;ce(`.straumur__google-pay-component{position:relative;cursor:pointer;background:var(--straumur__color-white);border-radius:var(--straumur__border-radius-lg);transition:all .3s ease;padding:var(--straumur__space-xxlg) var(--straumur__space-5xlg)}.straumur__google-pay-component__radio-selector{position:absolute;opacity:0;cursor:pointer}.straumur__google-pay-component__content{display:flex;align-items:center;gap:var(--straumur__space-lg);transition:background-color .3s ease}.straumur__google-pay-component__radio-selector:checked+.straumur__google-pay-component__content{padding-bottom:var(--straumur__space-xxlg)}.straumur__google-pay-component--circle{width:var(--straumur__space-5xlg);height:var(--straumur__space-5xlg);border:1px solid var(--straumur__color-cosmos-blue-gamma);background:var(--straumur__color-secondary-gamma);border-radius:50%;position:relative;transition:all .3s ease}.straumur__google-pay-component__content:hover .straumur__google-pay-component--circle{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__google-pay-component--circle:after{content:"";position:absolute;width:100%;height:100%;border-radius:50%;top:50%;left:50%;transform:translate(-50%,-50%) scale(0);transition:transform .2s ease}.straumur__google-pay-component__radio-selector:checked+.straumur__google-pay-component__content .straumur__google-pay-component--circle{background:var(--straumur__color-blue-beta);border-color:var(--straumur__color-transparent)}.straumur__google-pay-component__radio-selector:checked+.straumur__google-pay-component__content .straumur__google-pay-component--circle:after{transform:translate(-50%,-50%) scale(1);background:var(--straumur__color-primary);height:var(--straumur__space-md);width:var(--straumur__space-md)}.straumur__google-pay-component--text{color:#213547;font-size:1rem;user-select:none}.straumur__google-pay-component__expandable{background:var(--straumur__color-white);max-height:0;overflow:hidden;transition:all .3s ease;opacity:0}.straumur__google-pay-component__radio-selector:checked~.straumur__google-pay-component__expandable{max-height:600px;opacity:1}.straumur__google-pay-component__expandable p{margin:0;color:#213547;font-size:.9rem}.adyen-checkout__paywithgoogle{height:var(--straumur__space-8xlg)}
|
|
8
|
-
`);var op=()=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"26",fill:"none",viewBox:"0 0 40 26"},a("path",{fill:"#fff",d:"M29.13 2.41H10.87C5.17 2.41.5 7.18.5 13.01a10.5 10.5 0 0 0 10.37 10.58h18.26c5.7 0 10.37-4.76 10.37-10.59 0-5.82-4.67-10.59-10.37-10.59Z"}),a("path",{fill:"#3C4043",d:"M29.13 3.27c1.28 0 2.52.26 3.7.77a9.6 9.6 0 0 1 5.08 5.19 9.78 9.78 0 0 1 0 7.55 9.83 9.83 0 0 1-5.08 5.18 9.26 9.26 0 0 1-3.7.77H10.87a9.24 9.24 0 0 1-3.7-.77 9.6 9.6 0 0 1-5.08-5.18 9.78 9.78 0 0 1 0-7.55 9.83 9.83 0 0 1 5.08-5.19 9.24 9.24 0 0 1 3.7-.77h18.26Zm0-.86H10.87C5.17 2.41.5 7.18.5 13.01a10.5 10.5 0 0 0 10.37 10.58h18.26c5.7 0 10.37-4.76 10.37-10.59 0-5.82-4.67-10.59-10.37-10.59Z"}),a("path",{fill:"#3C4043",d:"M19.1 13.75v3.2h-1v-7.9h2.64c.67 0 1.24.23 1.7.68.49.46.72 1.01.72 1.67a2.2 2.2 0 0 1-.71 1.68c-.46.45-1.03.67-1.7.67H19.1Zm0-3.73v2.76h1.66c.4 0 .73-.14.99-.4.26-.28.4-.6.4-.98 0-.36-.14-.68-.4-.95a1.28 1.28 0 0 0-.99-.42H19.1Zm6.67 1.35c.73 0 1.31.2 1.74.6.42.4.64.95.64 1.65v3.34h-.95v-.76h-.04a1.9 1.9 0 0 1-1.65.93 2.1 2.1 0 0 1-1.46-.53c-.4-.35-.6-.8-.6-1.32 0-.56.21-1 .63-1.34.41-.33.97-.5 1.66-.5.59 0 1.07.12 1.45.34v-.23c0-.36-.13-.65-.4-.9a1.4 1.4 0 0 0-.97-.37c-.56 0-1 .24-1.32.72l-.88-.56a2.42 2.42 0 0 1 2.15-1.07Zm-1.29 3.92c0 .27.11.5.33.67.22.17.48.26.78.26.42 0 .79-.16 1.12-.48.32-.31.49-.68.49-1.11a2.02 2.02 0 0 0-1.3-.38c-.4 0-.74.1-1.01.3a.9.9 0 0 0-.4.74Zm9.08-3.75-3.32 7.8h-1.02l1.23-2.73-2.19-5.07h1.09l1.57 3.89h.02l1.54-3.89h1.08Z"}),a("path",{fill:"#4285F4",d:"M15.14 13.1c0-.32-.03-.64-.09-.95h-4.17v1.75h2.4a2.1 2.1 0 0 1-.89 1.4v1.14h1.43a4.49 4.49 0 0 0 1.32-3.33Z"}),a("path",{fill:"#34A853",d:"M12.4 15.3a2.66 2.66 0 0 1-4-1.44H6.9v1.18a4.43 4.43 0 0 0 6.91 1.4l-1.43-1.13Z"}),a("path",{fill:"#FABB05",d:"M8.25 13c0-.3.05-.59.14-.86v-1.17H6.9a4.59 4.59 0 0 0 0 4.07l1.48-1.17a2.79 2.79 0 0 1-.14-.86Z"}),a("path",{fill:"#E94235",d:"M10.88 10.27c.66 0 1.24.23 1.7.68l1.27-1.3a4.22 4.22 0 0 0-2.97-1.18 4.44 4.44 0 0 0-3.97 2.5l1.48 1.17a2.66 2.66 0 0 1 2.5-1.87Z"})),xc=op;var Yo="CANCEL";function sp({configuration:t,paymentMethods:e}){let r=ne(null),o=ne(),s=ne(),{activePaymentMethod:n,setActivePaymentMethod:i,isPaymentMethodInitialized:c,updatePaymentMethodInitialization:d,handleSuccess:p,handleError:u,setThreeDSecureActive:l,threeDSecureActive:h}=_e(),m=async()=>{o.current=await Ce({clientKey:e.clientKey,environment:t.environment,locale:e.locale,countryCode:"IS",amount:{value:e.minorUnitsAmount,currency:e.currency},onError:
|
|
9
|
-
`);var np=()=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"26",fill:"none",viewBox:"0 0 40 26"},a("path",{fill:"#000",d:"M36.42 0H3.58a69.25 69.25 0 0 0-.75 0c-.25.01-.5.03-.76.07a2.51 2.51 0 0 0-1.32.7A2.43 2.43 0 0 0 .07 2.1 5.14 5.14 0 0 0 0 3.22v19.91c.01.25.03.51.07.76a2.6 2.6 0 0 0 .68 1.35 2.39 2.39 0 0 0 1.32.69 4.98 4.98 0 0 0 1.1.07h34a5 5 0 0 0 .76-.07 2.5 2.5 0 0 0 1.32-.7 2.44 2.44 0 0 0 .68-1.34 5.13 5.13 0 0 0 .07-1.11V2.87a6.5 6.5 0 0 0-.07-.76 2.58 2.58 0 0 0-.68-1.35 2.4 2.4 0 0 0-1.32-.69 4.96 4.96 0 0 0-1.1-.07h-.41Z"}),a("path",{fill:"#fff",d:"M36.42.87h.73c.2 0 .42.02.62.06a1.67 1.67 0 0 1 .88.44 1.58 1.58 0 0 1 .44.89 4.38 4.38 0 0 1 .06.97v19.55a14.67 14.67 0 0 1-.06.96 1.7 1.7 0 0 1-.44.89 1.54 1.54 0 0 1-.87.44 4.27 4.27 0 0 1-.96.06H2.85a3.7 3.7 0 0 1-.63-.06 1.66 1.66 0 0 1-.87-.45 1.56 1.56 0 0 1-.44-.88 4.35 4.35 0 0 1-.06-.97V2.9c.01-.2.02-.42.06-.63.03-.18.08-.34.16-.49A1.56 1.56 0 0 1 2.22.93a4.2 4.2 0 0 1 .96-.06h33.24"}),a("path",{fill:"#000",d:"M10.92 8.61c.34-.43.57-1 .51-1.59a2.21 2.21 0 0 0-1.99 2.3c.56.04 1.12-.3 1.48-.7Zm.51.81c-.82-.05-1.52.46-1.9.46-.4 0-1-.43-1.64-.42-.84 0-1.62.48-2.05 1.24-.88 1.52-.23 3.76.62 5 .42.6.92 1.27 1.58 1.25.62-.02.86-.4 1.62-.4.75 0 .97.4 1.63.39.69-.01 1.11-.61 1.53-1.22.47-.7.67-1.37.68-1.4-.01-.02-1.32-.52-1.33-2.02-.01-1.26 1.03-1.85 1.07-1.9a2.34 2.34 0 0 0-1.81-.98Zm7.11-1.7a2.87 2.87 0 0 1 3.02 3c0 1.8-1.27 3.03-3.06 3.03h-1.97v3.12h-1.42V7.72h3.43Zm-2 4.83h1.62c1.24 0 1.94-.66 1.94-1.82 0-1.15-.7-1.81-1.93-1.81h-1.64v3.63Zm5.39 2.43c0-1.17.9-1.89 2.48-1.98l1.83-.1v-.52c0-.74-.5-1.18-1.34-1.18-.8 0-1.3.38-1.41.97h-1.3c.08-1.2 1.1-2.09 2.76-2.09 1.62 0 2.65.86 2.65 2.2v4.6h-1.31v-1.1h-.04a2.38 2.38 0 0 1-2.1 1.2c-1.3 0-2.22-.8-2.22-2Zm4.3-.6v-.53l-1.64.1c-.82.06-1.28.42-1.28.99 0 .58.48.96 1.22.96.96 0 1.7-.66 1.7-1.52Zm2.61 4.95v-1.11c.1.03.33.03.44.03.64 0 .98-.27 1.19-.96l.12-.4-2.41-6.69h1.48l1.7 5.43h.02l1.69-5.43h1.44l-2.5 7.02c-.57 1.62-1.23 2.14-2.61 2.14a5.3 5.3 0 0 1-.56-.03Z"})),kc=np;function ap({configuration:t,paymentMethods:e}){let r=ne(null),o=ne(),s=ne(),{activePaymentMethod:n,setActivePaymentMethod:i,isPaymentMethodInitialized:c,updatePaymentMethodInitialization:d,handleSuccess:p,handleError:u,setThreeDSecureActive:l,threeDSecureActive:h}=_e(),m=async()=>{o.current=await Ce({clientKey:e.clientKey,environment:t.environment,locale:e.locale,countryCode:"IS",amount:{value:e.minorUnitsAmount,currency:e.currency},onError:E,onAdditionalDetails:_,onPaymentCompleted:g,onPaymentFailed:O});let b=e.paymentMethods.paymentMethods.find(L=>L.type==="applepay").configuration,P={amount:{value:e.minorUnitsAmount,currency:e.currency},environment:t.environment,onSubmit:C,configuration:{...b,merchantName:e.merchantName}};s.current=new Ot(o.current,P),s.current.isAvailable().then(()=>{s.current.mount(r.current),d("applepay",!0)}).catch(()=>{u("error.applePayNotAvailable")})};pe(()=>{n==="applepay"&&!c.applepay&&m()},[t,n]),pe(()=>{s.current&&c.applepay&&m()},[t]);let y=()=>{i("applepay")};function E(b,P){b.name!==Yo&&u("error.unknownError")}async function C(b,P,L){let H={...b.data,sessionId:t.sessionId},U=await Qe(t.environment,H);if(!U.ok){L.reject(),u("error.failedToSubmitPayment");return}let F=await U.json();if(!F.resultCode){L.reject(),u("error.paymentFailed");return}let{resultCode:M,action:ie}=F;(M==="ChallengeShopper"||M==="IdentifyShopper")&&l(!0),L.resolve({resultCode:M,action:ie})}async function _(b,P,L){let H={...b.data,sessionId:t.sessionId},U=await Fe(t.environment,H);if(!U.ok){L.reject(),u("error.failedToSubmitPaymentDetails");return}let F=await U.json();if(!F.resultCode){L.reject(),u("error.paymentDetailsFailed");return}let{resultCode:M,action:ie}=F;L.resolve({resultCode:M,action:ie})}function g(b,P){b.resultCode==="Authorised"?p("success.paymentAuthorized"):u("error.paymentUnsuccessful"),t.onPaymentCompleted?.({resultCode:b.resultCode})}function O(b,P){b?(b.resultCode==="Authorised"?p("success.paymentAuthorized"):u("error.paymentUnsuccessful"),t.onPaymentFailed?.({resultCode:b.resultCode})):t.onPaymentFailed?.()}return!e.paymentMethods.paymentMethods?.some(b=>b.type==="applepay")||n!=="applepay"&&h?null:a("label",{className:"straumur__apple-pay-component"},a("input",{type:"radio",className:"straumur__apple-pay-component__radio-selector",checked:n==="applepay",onChange:y}),a("span",{className:"straumur__apple-pay-component__content"},a("span",{className:"straumur__apple-pay-component--circle"}),a(kc,null),a("span",{className:"straumur__apple-pay-component--text"},V(t.locale,"applePay.title"))),a("div",{className:"straumur__apple-pay-component__expandable"},a("div",{ref:r,style:{height:h?"600px":"auto",minWidth:h?"350px":"auto"}})))}var Nc=ap;ce(`.straumur__stored-card-component{position:relative;background:var(--straumur__color-white);border-radius:var(--straumur__border-radius-lg);transition:all .3s ease;padding:var(--straumur__space-xxlg) var(--straumur__space-5xlg);cursor:pointer}.straumur__stored-card-component:has(.straumur__stored-card-component__radio-selector:checked){cursor:default}.straumur__stored-card-component__radio-selector{position:absolute;opacity:0}.straumur__stored-card-component__content{display:flex;align-items:center;gap:var(--straumur__space-lg);transition:background-color .3s ease}.straumur__stored-card-component__radio-selector:checked+.straumur__stored-card-component__content{padding-bottom:var(--straumur__space-xxlg);cursor:default}.straumur__stored-card-component--circle{width:var(--straumur__space-5xlg);height:var(--straumur__space-5xlg);border:1px solid var(--straumur__color-cosmos-blue-gamma);background:var(--straumur__color-secondary-gamma);border-radius:50%;position:relative;transition:all .3s ease}.straumur__stored-card-component__content:hover .straumur__stored-card-component--circle{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__stored-card-component--circle:after{content:"";position:absolute;width:100%;height:100%;border-radius:50%;top:50%;left:50%;transform:translate(-50%,-50%) scale(0);transition:transform .2s ease}.straumur__stored-card-component__radio-selector:checked+.straumur__stored-card-component__content .straumur__stored-card-component--circle{background:var(--straumur__color-blue-beta);border-color:var(--straumur__color-transparent)}.straumur__stored-card-component__radio-selector:checked+.straumur__stored-card-component__content .straumur__stored-card-component--circle:after{transform:translate(-50%,-50%) scale(1);background:var(--straumur__color-primary);height:var(--straumur__space-md);width:var(--straumur__space-md)}.straumur__stored-card-component--text{color:#213547;font-size:1rem;user-select:none}.straumur__stored-card-component--brands{display:flex;margin-left:auto;align-items:center;gap:var(--straumur__space-xxs)}.straumur__stored-card-component--brands>svg{transition:all .2s ease}.straumur__stored-card-component__remove-stored-card-button{margin-left:auto}.straumur__stored-card-component__remove-stored-card-button--text{color:#d03e00;text-decoration:none;background:none;border:none;cursor:pointer;transition:all .2s ease}.straumur__stored-card-component__remove-stored-card-button--text:disabled{cursor:not-allowed;color:#72889d}.straumur__stored-card-component__confirm-remove-stored-card{background-color:#fff7db;border-radius:var(--straumur__border-radius-s);max-height:0;overflow:hidden;transition:all .3s ease;opacity:0}.straumur__stored-card-component__confirm-remove-stored-card--expanded{padding:var(--straumur__space-xxlg);max-height:600px;opacity:1}.straumur__stored-card-component__confirm-remove-stored-card--header{display:flex;align-items:center;gap:var(--straumur__space-lg);color:#262b31;padding-bottom:var(--straumur__space-xxlg)}.straumur__stored-card-component__confirm-remove-stored-card--actions{display:flex;gap:var(--straumur__space-lg);justify-content:end}.straumur__stored-card-component__confirm-remove-stored-card--actions--button{color:#775d00;background:none;border:none;cursor:pointer;text-decoration:none;font-weight:700}.straumur__stored-card-component__expandable{background:var(--straumur__color-white);max-height:0;overflow:hidden;transition:all .3s ease;opacity:0}.straumur__stored-card-component__loading-text{display:flex;justify-content:center}.straumur__stored-card-component__radio-selector:checked~.straumur__stored-card-component__expandable{max-height:600px;opacity:1}.straumur__stored-card-component__form{display:flex;padding-top:var(--straumur__space-xxlg);flex-direction:column;gap:var(--straumur__space-5xlg)}.straumur__stored-card-component__form--wrapper{display:flex;flex-direction:column;justify-items:start;position:relative;width:100%}.straumur__stored-card-component__form--wrapper--error{color:var(--straumur__color-red-beta);font-size:12px}.straumur__stored-card-component__form--wrapper--label{transform:translate(10px) translateY(-50%);z-index:1;background:linear-gradient(to top,var(--straumur__color-secondary-gamma) 53%,var(--straumur__color-transparent) 50%);position:absolute;font-weight:500;font-size:14px;padding:0 var(--straumur__space-xxs)}.straumur__stored-card-component__form--wrapper--label--readonly{background:linear-gradient(to top,var(--straumur__color-gray-epsilon) 53%,var(--straumur__color-transparent) 50%)}.straumur__stored-card-component__form--wrapper--label--error{color:var(--straumur__color-red-beta);background:linear-gradient(to top,var(--straumur__color-red-gamma) 53%,var(--straumur__color-transparent) 50%);font-size:13px;font-weight:500}.straumur__stored-card-component__form--wrapper--label--info{position:absolute;top:33%;right:var(--straumur__space-md)}.straumur__stored-card-component__form--wrapper--input{background:var(--straumur__color-secondary-gamma);color:#00112c;display:flex;align-items:center;border:1px solid var(--straumur__color-transparent);border-radius:var(--straumur__border-radius-s);font-size:1rem;height:48px;outline:none;padding-left:var(--straumur__space-lg);transition:border .2s ease-out,box-shadow .2s ease-out;position:relative}.straumur__stored-card-component__form--wrapper--input--readonly{background-color:var(--straumur__color-gray-epsilon)}.straumur__stored-card-component__form--wrapper--input:hover{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__stored-card-component__form--wrapper--input--readonly:hover{border:1px solid var(--straumur__color-transparent)}.straumur__stored-card-component__form--wrapper--input--error{background:var(--straumur__color-red-gamma);border:1px solid var(--straumur__color-red-beta)}.straumur__stored-card-component__form--wrapper--input--error:hover{border:1px solid var(--straumur__color-red-beta)}.straumur__stored-card-component__form--field-wrapper{display:flex;width:100%;gap:var(--straumur__space-5xlg)}.straumur__stored-card-component__submit-button{background:var(--straumur__color-primary);border:none;border-radius:var(--straumur__border-radius-s);color:var(--straumur__color-white);cursor:pointer;font-size:1rem;height:40px;outline:none;padding:0 var(--straumur__space-xxlg);transition:background .2s ease-out;width:100%}.straumur__stored-card-component__submit-button:hover{background:var(--straumur__color-primary);border:1px solid #dbdee2}.straumur__stored-card-component__submit-button:disabled{background:#72889d;border:1px solid #dbdee2;cursor:not-allowed}
|
|
10
|
-
`);var ip=()=>a("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a("g",{"clip-path":"url(#clip0_10650_34968)"},a("path",{d:"M12.0011 15C12.6245 15 13.1261 14.4984 13.1261 13.875V7.875C13.1261 7.25391 12.6222 6.75 12.0433 6.75C11.4644 6.75 10.8761 7.25625 10.8761 7.875V13.875C10.8761 14.4984 11.3823 15 12.0011 15ZM12.0011 16.5516C11.1873 16.5516 10.5273 17.2116 10.5273 18.0253C10.5292 18.8391 11.1855 19.5 12.0011 19.5C12.8167 19.5 13.4748 18.84 13.4748 18.0262C13.473 17.2125 12.8167 16.5516 12.0011 16.5516Z",fill:"#DFAE00"}),a("path",{opacity:"0.4",d:"M23.7312 19.5469L13.7328 2.48438C12.9673 1.17188 11.0356 1.17188 10.2649 2.48438L0.271188 19.5469C-0.49803 20.8547 0.460048 22.5 2.00181 22.5H21.9987C23.5343 22.5 24.4953 20.8594 23.7312 19.5469ZM10.8734 7.875C10.8734 7.25391 11.3773 6.75 11.9984 6.75C12.6195 6.75 13.1234 7.25625 13.1234 7.875V13.875C13.1234 14.4961 12.6195 15 12.0406 15C11.4617 15 10.8734 14.4984 10.8734 13.875V7.875ZM11.9984 19.5C11.1846 19.5 10.5246 18.84 10.5246 18.0262C10.5246 17.2125 11.1842 16.5525 11.9984 16.5525C12.8126 16.5525 13.4721 17.2125 13.4721 18.0262C13.4703 18.8391 12.814 19.5 11.9984 19.5Z",fill:"#DFAE00"})),a("defs",null,a("clipPath",{id:"clip0_10650_34968"},a("rect",{width:"24",height:"24",fill:"white"})))),Oc=ip;function lp({configuration:t,paymentMethods:e,storedPaymentMethod:r,onStoredCardRemoved:o}){let s=ne(null),n=ne(),i=ne(),[c,d]=z(!0),[p,u]=z("required"),[l,h]=z(!1),[m,y]=z({encryptedSecurityCode:{visible:!1}}),{activePaymentMethod:
|
|
1
|
+
"use strict";var StraumurWeb=(()=>{var Qo=Object.defineProperty;var Yc=Object.getOwnPropertyDescriptor;var jc=Object.getOwnPropertyNames;var $c=Object.prototype.hasOwnProperty;var zc=(t,e)=>{for(var r in e)Qo(t,r,{get:e[r],enumerable:!0})},Gc=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of jc(e))!$c.call(t,s)&&s!==r&&Qo(t,s,{get:()=>e[s],enumerable:!(o=Yc(e,s))||o.enumerable});return t};var Kc=t=>Gc(Qo({},"__esModule",{value:!0}),t);var _p={};zc(_p,{StraumurCheckout:()=>Hc});var jr,Y,fn,Wc,Ct,un,_n,yn,gn,os,es,ts,vn,cr={},Cn=[],Zc=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,$r=Array.isArray;function $e(t,e){for(var r in e)t[r]=e[r];return t}function ss(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function a(t,e,r){var o,s,n,i={};for(n in e)n=="key"?o=e[n]:n=="ref"?s=e[n]:i[n]=e[n];if(arguments.length>2&&(i.children=arguments.length>3?jr.call(arguments,2):r),typeof t=="function"&&t.defaultProps!=null)for(n in t.defaultProps)i[n]==null&&(i[n]=t.defaultProps[n]);return Vr(t,i,o,s,null)}function Vr(t,e,r,o,s){var n={type:t,props:e,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:s??++fn,__i:-1,__u:0};return s==null&&Y.vnode!=null&&Y.vnode(n),n}function le(t){return t.children}function Hr(t,e){this.props=t,this.context=e}function Lt(t,e){if(e==null)return t.__?Lt(t.__,t.__i+1):null;for(var r;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null)return r.__e;return typeof t.type=="function"?Lt(t):null}function bn(t){var e,r;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null){t.__e=t.__c.base=r.__e;break}return bn(t)}}function rs(t){(!t.__d&&(t.__d=!0)&&Ct.push(t)&&!Yr.__r++||un!=Y.debounceRendering)&&((un=Y.debounceRendering)||_n)(Yr)}function Yr(){for(var t,e,r,o,s,n,i,c=1;Ct.length;)Ct.length>c&&Ct.sort(yn),t=Ct.shift(),c=Ct.length,t.__d&&(r=void 0,s=(o=(e=t).__v).__e,n=[],i=[],e.__P&&((r=$e({},o)).__v=o.__v+1,Y.vnode&&Y.vnode(r),ns(e.__P,r,o,e.__n,e.__P.namespaceURI,32&o.__u?[s]:null,n,s??Lt(o),!!(32&o.__u),i),r.__v=o.__v,r.__.__k[r.__i]=r,Rn(n,r,i),r.__e!=s&&bn(r)));Yr.__r=0}function En(t,e,r,o,s,n,i,c,d,p,u){var l,h,m,y,b,C,_=o&&o.__k||Cn,g=e.length;for(d=qc(r,e,_,d,g),l=0;l<g;l++)(m=r.__k[l])!=null&&(h=m.__i==-1?cr:_[m.__i]||cr,m.__i=l,C=ns(t,m,h,s,n,i,c,d,p,u),y=m.__e,m.ref&&h.ref!=m.ref&&(h.ref&&as(h.ref,null,m),u.push(m.ref,m.__c||y,m)),b==null&&y!=null&&(b=y),4&m.__u||h.__k===m.__k?d=Sn(m,d,t):typeof m.type=="function"&&C!==void 0?d=C:y&&(d=y.nextSibling),m.__u&=-7);return r.__e=b,d}function qc(t,e,r,o,s){var n,i,c,d,p,u=r.length,l=u,h=0;for(t.__k=new Array(s),n=0;n<s;n++)(i=e[n])!=null&&typeof i!="boolean"&&typeof i!="function"?(d=n+h,(i=t.__k[n]=typeof i=="string"||typeof i=="number"||typeof i=="bigint"||i.constructor==String?Vr(null,i,null,null,null):$r(i)?Vr(le,{children:i},null,null,null):i.constructor==null&&i.__b>0?Vr(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=t,i.__b=t.__b+1,c=null,(p=i.__i=Xc(i,r,d,l))!=-1&&(l--,(c=r[p])&&(c.__u|=2)),c==null||c.__v==null?(p==-1&&(s>u?h--:s<u&&h++),typeof i.type!="function"&&(i.__u|=4)):p!=d&&(p==d-1?h--:p==d+1?h++:(p>d?h--:h++,i.__u|=4))):t.__k[n]=null;if(l)for(n=0;n<u;n++)(c=r[n])!=null&&(2&c.__u)==0&&(c.__e==o&&(o=Lt(c)),Tn(c,c));return o}function Sn(t,e,r){var o,s;if(typeof t.type=="function"){for(o=t.__k,s=0;o&&s<o.length;s++)o[s]&&(o[s].__=t,e=Sn(o[s],e,r));return e}t.__e!=e&&(e&&t.type&&!r.contains(e)&&(e=Lt(t)),r.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Xc(t,e,r,o){var s,n,i=t.key,c=t.type,d=e[r];if(d===null&&t.key==null||d&&i==d.key&&c==d.type&&(2&d.__u)==0)return r;if(o>(d!=null&&(2&d.__u)==0?1:0))for(s=r-1,n=r+1;s>=0||n<e.length;){if(s>=0){if((d=e[s])&&(2&d.__u)==0&&i==d.key&&c==d.type)return s;s--}if(n<e.length){if((d=e[n])&&(2&d.__u)==0&&i==d.key&&c==d.type)return n;n++}}return-1}function mn(t,e,r){e[0]=="-"?t.setProperty(e,r??""):t[e]=r==null?"":typeof r!="number"||Zc.test(e)?r:r+"px"}function Br(t,e,r,o,s){var n;e:if(e=="style")if(typeof r=="string")t.style.cssText=r;else{if(typeof o=="string"&&(t.style.cssText=o=""),o)for(e in o)r&&e in r||mn(t.style,e,"");if(r)for(e in r)o&&r[e]==o[e]||mn(t.style,e,r[e])}else if(e[0]=="o"&&e[1]=="n")n=e!=(e=e.replace(gn,"$1")),e=e.toLowerCase()in t||e=="onFocusOut"||e=="onFocusIn"?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+n]=r,r?o?r.u=o.u:(r.u=os,t.addEventListener(e,n?ts:es,n)):t.removeEventListener(e,n?ts:es,n);else{if(s=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&r==1?"":r))}}function hn(t){return function(e){if(this.l){var r=this.l[e.type+t];if(e.t==null)e.t=os++;else if(e.t<r.u)return;return r(Y.event?Y.event(e):e)}}}function ns(t,e,r,o,s,n,i,c,d,p){var u,l,h,m,y,b,C,_,g,O,N,E,P,L,H,U,F,M=e.type;if(e.constructor!=null)return null;128&r.__u&&(d=!!(32&r.__u),n=[c=e.__e=r.__e]),(u=Y.__b)&&u(e);e:if(typeof M=="function")try{if(_=e.props,g="prototype"in M&&M.prototype.render,O=(u=M.contextType)&&o[u.__c],N=u?O?O.props.value:u.__:o,r.__c?C=(l=e.__c=r.__c).__=l.__E:(g?e.__c=l=new M(_,N):(e.__c=l=new Hr(_,N),l.constructor=M,l.render=Qc),O&&O.sub(l),l.props=_,l.state||(l.state={}),l.context=N,l.__n=o,h=l.__d=!0,l.__h=[],l._sb=[]),g&&l.__s==null&&(l.__s=l.state),g&&M.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=$e({},l.__s)),$e(l.__s,M.getDerivedStateFromProps(_,l.__s))),m=l.props,y=l.state,l.__v=e,h)g&&M.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),g&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(g&&M.getDerivedStateFromProps==null&&_!==m&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(_,N),!l.__e&&l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(_,l.__s,N)===!1||e.__v==r.__v){for(e.__v!=r.__v&&(l.props=_,l.state=l.__s,l.__d=!1),e.__e=r.__e,e.__k=r.__k,e.__k.some(function(ie){ie&&(ie.__=e)}),E=0;E<l._sb.length;E++)l.__h.push(l._sb[E]);l._sb=[],l.__h.length&&i.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(_,l.__s,N),g&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(m,y,b)})}if(l.context=N,l.props=_,l.__P=t,l.__e=!1,P=Y.__r,L=0,g){for(l.state=l.__s,l.__d=!1,P&&P(e),u=l.render(l.props,l.state,l.context),H=0;H<l._sb.length;H++)l.__h.push(l._sb[H]);l._sb=[]}else do l.__d=!1,P&&P(e),u=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++L<25);l.state=l.__s,l.getChildContext!=null&&(o=$e($e({},o),l.getChildContext())),g&&!h&&l.getSnapshotBeforeUpdate!=null&&(b=l.getSnapshotBeforeUpdate(m,y)),U=u,u!=null&&u.type===le&&u.key==null&&(U=Pn(u.props.children)),c=En(t,$r(U)?U:[U],e,r,o,s,n,i,c,d,p),l.base=e.__e,e.__u&=-161,l.__h.length&&i.push(l),C&&(l.__E=l.__=null)}catch(ie){if(e.__v=null,d||n!=null)if(ie.then){for(e.__u|=d?160:128;c&&c.nodeType==8&&c.nextSibling;)c=c.nextSibling;n[n.indexOf(c)]=null,e.__e=c}else for(F=n.length;F--;)ss(n[F]);else e.__e=r.__e,e.__k=r.__k;Y.__e(ie,e,r)}else n==null&&e.__v==r.__v?(e.__k=r.__k,e.__e=r.__e):c=e.__e=Jc(r.__e,e,r,o,s,n,i,d,p);return(u=Y.diffed)&&u(e),128&e.__u?void 0:c}function Rn(t,e,r){for(var o=0;o<r.length;o++)as(r[o],r[++o],r[++o]);Y.__c&&Y.__c(e,t),t.some(function(s){try{t=s.__h,s.__h=[],t.some(function(n){n.call(s)})}catch(n){Y.__e(n,s.__v)}})}function Pn(t){return typeof t!="object"||t==null||t.__b&&t.__b>0?t:$r(t)?t.map(Pn):$e({},t)}function Jc(t,e,r,o,s,n,i,c,d){var p,u,l,h,m,y,b,C=r.props,_=e.props,g=e.type;if(g=="svg"?s="http://www.w3.org/2000/svg":g=="math"?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),n!=null){for(p=0;p<n.length;p++)if((m=n[p])&&"setAttribute"in m==!!g&&(g?m.localName==g:m.nodeType==3)){t=m,n[p]=null;break}}if(t==null){if(g==null)return document.createTextNode(_);t=document.createElementNS(s,g,_.is&&_),c&&(Y.__m&&Y.__m(e,n),c=!1),n=null}if(g==null)C===_||c&&t.data==_||(t.data=_);else{if(n=n&&jr.call(t.childNodes),C=r.props||cr,!c&&n!=null)for(C={},p=0;p<t.attributes.length;p++)C[(m=t.attributes[p]).name]=m.value;for(p in C)if(m=C[p],p!="children"){if(p=="dangerouslySetInnerHTML")l=m;else if(!(p in _)){if(p=="value"&&"defaultValue"in _||p=="checked"&&"defaultChecked"in _)continue;Br(t,p,null,m,s)}}for(p in _)m=_[p],p=="children"?h=m:p=="dangerouslySetInnerHTML"?u=m:p=="value"?y=m:p=="checked"?b=m:c&&typeof m!="function"||C[p]===m||Br(t,p,m,C[p],s);if(u)c||l&&(u.__html==l.__html||u.__html==t.innerHTML)||(t.innerHTML=u.__html),e.__k=[];else if(l&&(t.innerHTML=""),En(e.type=="template"?t.content:t,$r(h)?h:[h],e,r,o,g=="foreignObject"?"http://www.w3.org/1999/xhtml":s,n,i,n?n[0]:r.__k&&Lt(r,0),c,d),n!=null)for(p=n.length;p--;)ss(n[p]);c||(p="value",g=="progress"&&y==null?t.removeAttribute("value"):y!=null&&(y!==t[p]||g=="progress"&&!y||g=="option"&&y!=C[p])&&Br(t,p,y,C[p],s),p="checked",b!=null&&b!=t[p]&&Br(t,p,b,C[p],s))}return t}function as(t,e,r){try{if(typeof t=="function"){var o=typeof t.__u=="function";o&&t.__u(),o&&e==null||(t.__u=t(e))}else t.current=e}catch(s){Y.__e(s,r)}}function Tn(t,e,r){var o,s;if(Y.unmount&&Y.unmount(t),(o=t.ref)&&(o.current&&o.current!=t.__e||as(o,null,e)),(o=t.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(n){Y.__e(n,e)}o.base=o.__P=null}if(o=t.__k)for(s=0;s<o.length;s++)o[s]&&Tn(o[s],e,r||typeof t.type!="function");r||ss(t.__e),t.__c=t.__=t.__e=void 0}function Qc(t,e,r){return this.constructor(t,r)}function Ut(t,e,r){var o,s,n,i;e==document&&(e=document.documentElement),Y.__&&Y.__(t,e),s=(o=typeof r=="function")?null:r&&r.__k||e.__k,n=[],i=[],ns(e,t=(!o&&r||e).__k=a(le,null,[t]),s||cr,cr,e.namespaceURI,!o&&r?[r]:s?null:e.firstChild?jr.call(e.childNodes):null,n,!o&&r?r:s?s.__e:e.firstChild,o,i),Rn(n,t,i)}function An(t){function e(r){var o,s;return this.getChildContext||(o=new Set,(s={})[e.__c]=this,this.getChildContext=function(){return s},this.componentWillUnmount=function(){o=null},this.shouldComponentUpdate=function(n){this.props.value!=n.value&&o.forEach(function(i){i.__e=!0,rs(i)})},this.sub=function(n){o.add(n);var i=n.componentWillUnmount;n.componentWillUnmount=function(){o&&o.delete(n),i&&i.call(n)}}),r.children}return e.__c="__cC"+vn++,e.__=t,e.Provider=e.__l=(e.Consumer=function(r,o){return r.children(o)}).contextType=e,e}jr=Cn.slice,Y={__e:function(t,e,r,o){for(var s,n,i;e=e.__;)if((s=e.__c)&&!s.__)try{if((n=s.constructor)&&n.getDerivedStateFromError!=null&&(s.setState(n.getDerivedStateFromError(t)),i=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(t,o||{}),i=s.__d),i)return s.__E=s}catch(c){t=c}throw t}},fn=0,Wc=function(t){return t!=null&&t.constructor==null},Hr.prototype.setState=function(t,e){var r;r=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=$e({},this.state),typeof t=="function"&&(t=t($e({},r),this.props)),t&&$e(r,t),t!=null&&this.__v&&(e&&this._sb.push(e),rs(this))},Hr.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),rs(this))},Hr.prototype.render=le,Ct=[],_n=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,yn=function(t,e){return t.__v.__b-e.__v.__b},Yr.__r=0,gn=/(PointerCapture)$|Capture$/i,os=0,es=hn(!1),ts=hn(!0),vn=0;function ce(t,{insertAt:e}={}){if(!t||typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",e==="top"&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}ce(`:root{--straumur__color-primary: #002649;--straumur__color-secondary: #72889d;--straumur__color-secondary-gamma: #eef0f2;--straumur__color-blue-beta: #bce6f3;--straumur__color-blue-gamma: #eff8fa;--straumur__color-red-beta: #d96666;--straumur__color-red-gamma: #fff8f5;--straumur__color-gray-epsilon: #e7e7e7;--straumur__color-cosmos-blue-delta: #cdd8e2;--straumur__color-cosmos-blue-gamma: #e6ebef;--straumur__color-white: #ffffff;--straumur__color-transparent: transparent;--straumur__border-radius-xxs: 4px;--straumur__border-radius-xs: 6px;--straumur__border-radius-s: 8px;--straumur__border-radius-md: 10px;--straumur__border-radius-lg: 12px;--straumur__border-radius-xlg: 14px;--straumur__border-radius-xxlg: 16px;--straumur__space-xxs: 4px;--straumur__space-xs: 6px;--straumur__space-s: 8px;--straumur__space-md: 10px;--straumur__space-lg: 12px;--straumur__space-xlg: 14px;--straumur__space-xxlg: 16px;--straumur__space-3xlg: 18px;--straumur__space-4xlg: 20px;--straumur__space-5xlg: 24px;--straumur__space-6xlg: 32px;--straumur__space-7xlg: 40px;--straumur__space-8xlg: 48px;--apple-pay-button-width: 100%;--apple-pay-button-height: 48px;--apple-pay-button-border-radius: 4px}.straumur__root-component{font-family:AkzidenzGroteskPro,sans-serif;max-width:440px;min-width:320px}.straumur__component *{font-family:inherit}.straumur__render-brand-icons__overflow{color:#72889d}.straumur__component{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:300px;background-color:var(--straumur__color-white);border-radius:var(--straumur__border-radius-xxlg)}.js-iframe{border:none;color-scheme:auto;height:100%;overflow:hidden;width:100%}.adyen-checkout__spinner{display:none!important}.adyen-checkout__spinner__wrapper:after{content:"";display:block;width:40px;height:40px;background:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40" stroke="%23002649"><g fill="none" fill-rule="evenodd"><g transform="translate(2 2)" stroke-width="4"><circle stroke-opacity=".3" cx="18" cy="18" r="18"/><path d="M36 18c0-9.94-8.06-18-18-18"><animateTransform attributeName="transform" type="rotate" from="0 18 18" to="360 18 18" dur="1s" repeatCount="indefinite"/></path></g></g></svg>') no-repeat center;background-size:contain;margin:auto}.adyen-checkout__threeds2__challenge.adyen-checkout__threeds2__challenge--05{background-color:transparent;display:block;height:inherit;min-height:400px;overflow:hidden;position:relative;width:100%}
|
|
2
|
+
`);var ed=()=>({STAGING_BASE_URL:"https://checkout-api.staging.straumur.is/api/v1/embeddedcheckout",PRODUCTION_BASE_URL:"https://greidslugatt.straumur.is/api/v1/embeddedcheckout",GET_PAYMENT_METHODS_URL:"payment-methods",POST_PAYMENT_URL:"payment",POST_DETAILS_URL:"details",POST_DISABLE_TOKEN_URL:"disable-token"}),bt=ed();function zr(t){switch(t){case"test":return bt.STAGING_BASE_URL;case"live":return bt.PRODUCTION_BASE_URL;default:throw new Error(`Unknown environment: ${t}`)}}function Dn(t,e){return fetch(`${zr(t)}/${bt.GET_PAYMENT_METHODS_URL}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}function Qe(t,e){return fetch(`${zr(t)}/${bt.POST_PAYMENT_URL}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}function Fe(t,e){return fetch(`${zr(t)}/${bt.POST_DETAILS_URL}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}function In(t,e){return fetch(`${zr(t)}/${bt.POST_DISABLE_TOKEN_URL}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function is(t,e){try{let r=await Dn(t,{sessionId:e});if(!r.ok){let s=r.headers.get("content-type"),n="error.failedToInitializePaymentMethods";return s&&s.includes("application/json")&&(n=(await r.json()).errorMessage),{resultCode:"Error",error:n}}return{resultCode:"Success",...await r.json()}}catch{return{resultCode:"Error",error:"error.failedToInitializePaymentMethods"}}}var Bt,q,ls,xn,Kr=0,Un=[],re=Y,wn=re.__b,kn=re.__r,Nn=re.diffed,On=re.__c,Fn=re.unmount,Mn=re.__;function Wr(t,e){re.__h&&re.__h(q,t,Kr||e),Kr=0;var r=q.__H||(q.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function z(t){return Kr=1,td(Hn,t)}function td(t,e,r){var o=Wr(Bt++,2);if(o.t=t,!o.__c&&(o.__=[r?r(e):Hn(void 0,e),function(c){var d=o.__N?o.__N[0]:o.__[0],p=o.t(d,c);d!==p&&(o.__N=[p,o.__[1]],o.__c.setState({}))}],o.__c=q,!q.__f)){var s=function(c,d,p){if(!o.__c.__H)return!0;var u=o.__c.__H.__.filter(function(h){return!!h.__c});if(u.every(function(h){return!h.__N}))return!n||n.call(this,c,d,p);var l=o.__c.props!==c;return u.forEach(function(h){if(h.__N){var m=h.__[0];h.__=h.__N,h.__N=void 0,m!==h.__[0]&&(l=!0)}}),n&&n.call(this,c,d,p)||l};q.__f=!0;var n=q.shouldComponentUpdate,i=q.componentWillUpdate;q.componentWillUpdate=function(c,d,p){if(this.__e){var u=n;n=void 0,s(c,d,p),n=u}i&&i.call(this,c,d,p)},q.shouldComponentUpdate=s}return o.__N||o.__}function pe(t,e){var r=Wr(Bt++,3);!re.__s&&Vn(r.__H,e)&&(r.__=t,r.u=e,q.__H.__h.push(r))}function ne(t){return Kr=5,rd(function(){return{current:t}},[])}function rd(t,e){var r=Wr(Bt++,7);return Vn(r.__H,e)&&(r.__=t(),r.__H=e,r.__h=t),r.__}function Bn(t){var e=q.context[t.__c],r=Wr(Bt++,9);return r.c=t,e?(r.__==null&&(r.__=!0,e.sub(q)),e.props.value):t.__}function od(){for(var t;t=Un.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Gr),t.__H.__h.forEach(cs),t.__H.__h=[]}catch(e){t.__H.__h=[],re.__e(e,t.__v)}}re.__b=function(t){q=null,wn&&wn(t)},re.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),Mn&&Mn(t,e)},re.__r=function(t){kn&&kn(t),Bt=0;var e=(q=t.__c).__H;e&&(ls===q?(e.__h=[],q.__h=[],e.__.forEach(function(r){r.__N&&(r.__=r.__N),r.u=r.__N=void 0})):(e.__h.forEach(Gr),e.__h.forEach(cs),e.__h=[],Bt=0)),ls=q},re.diffed=function(t){Nn&&Nn(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Un.push(e)!==1&&xn===re.requestAnimationFrame||((xn=re.requestAnimationFrame)||sd)(od)),e.__H.__.forEach(function(r){r.u&&(r.__H=r.u),r.u=void 0})),ls=q=null},re.__c=function(t,e){e.some(function(r){try{r.__h.forEach(Gr),r.__h=r.__h.filter(function(o){return!o.__||cs(o)})}catch(o){e.some(function(s){s.__h&&(s.__h=[])}),e=[],re.__e(o,r.__v)}}),On&&On(t,e)},re.unmount=function(t){Fn&&Fn(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.forEach(function(o){try{Gr(o)}catch(s){e=s}}),r.__H=void 0,e&&re.__e(e,r.__v))};var Ln=typeof requestAnimationFrame=="function";function sd(t){var e,r=function(){clearTimeout(o),Ln&&cancelAnimationFrame(e),setTimeout(t)},o=setTimeout(r,100);Ln&&(e=requestAnimationFrame(r))}function Gr(t){var e=q,r=t.__c;typeof r=="function"&&(t.__c=void 0,r()),q=e}function cs(t){var e=q;t.__c=t.__(),q=e}function Vn(t,e){return!t||t.length!==e.length||e.some(function(r,o){return r!==t[o]})}function Hn(t,e){return typeof e=="function"?e(t):e}ce(`.straumur__card-component{position:relative;cursor:pointer;background:var(--straumur__color-white);border-radius:var(--straumur__border-radius-lg);transition:all .3s ease;padding:var(--straumur__space-xxlg) var(--straumur__space-5xlg)}.straumur__card-component__radio-selector{position:absolute;opacity:0;cursor:pointer}.straumur__card-component__content{display:grid;grid-template-columns:26px 40px auto 1fr;align-items:center;gap:var(--straumur__space-lg);transition:background-color .3s ease}.straumur__card-component__radio-selector:checked+.straumur__card-component__content{padding-bottom:var(--straumur__space-xxlg)}.straumur__card-component--circle{width:var(--straumur__space-5xlg);height:var(--straumur__space-5xlg);border:1px solid var(--straumur__color-cosmos-blue-gamma);background:var(--straumur__color-secondary-gamma);border-radius:50%;position:relative;transition:all .3s ease}.straumur__card-component__content:hover .straumur__card-component--circle{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__card-component--circle:after{content:"";position:absolute;width:100%;height:100%;border-radius:50%;top:50%;left:50%;transform:translate(-50%,-50%) scale(0);transition:transform .2s ease}.straumur__card-component__radio-selector:checked+.straumur__card-component__content .straumur__card-component--circle{background:var(--straumur__color-blue-beta);border-color:var(--straumur__color-transparent)}.straumur__card-component__radio-selector:checked+.straumur__card-component__content .straumur__card-component--circle:after{transform:translate(-50%,-50%) scale(1);background:var(--straumur__color-primary);height:var(--straumur__space-md);width:var(--straumur__space-md)}.straumur__card-component--text{color:#213547;font-size:1rem;user-select:none}.straumur__card-component--brands{display:flex;margin-left:auto;align-items:center;gap:var(--straumur__space-xxs)}.straumur__card-component__expandable{background:var(--straumur__color-white);max-height:0;overflow:hidden;transition:all .3s ease;opacity:0}.straumur__card-component__loading-text{display:flex;justify-content:center}.straumur__card-component__radio-selector:checked~.straumur__card-component__expandable{max-height:600px;opacity:1}.straumur__card-component__form{display:flex;padding-top:var(--straumur__space-xxlg);flex-direction:column;gap:var(--straumur__space-5xlg)}.straumur__card-component__form--wrapper{display:flex;flex-direction:column;justify-items:start;position:relative;width:100%}.straumur__card-component__form--wrapper--error{color:var(--straumur__color-red-beta);font-size:12px}.straumur__card-component__form--wrapper--label{transform:translate(var(--straumur__space-md)) translateY(-50%);z-index:1;background:linear-gradient(to top,var(--straumur__color-secondary-gamma) 53%,var(--straumur__color-transparent) 50%);position:absolute;font-weight:500;font-size:14px;padding:0 var(--straumur__space-xxs)}.straumur__card-component__form--wrapper--label--error{color:var(--straumur__color-red-beta);background:linear-gradient(to top,var(--straumur__color-red-gamma) 53%,var(--straumur__color-transparent) 50%)}.straumur__card-component__form--wrapper--label--info{position:absolute;top:33%;right:var(--straumur__space-md)}.straumur__card-component__form--wrapper--input{background:var(--straumur__color-secondary-gamma);color:#00112c;display:block;font-family:inherit;border:1px solid var(--straumur__color-transparent);border-radius:var(--straumur__border-radius-s);font-size:1rem;height:48px;outline:none;padding-left:var(--straumur__space-lg);transition:border .2s ease-out,box-shadow .2s ease-out}.straumur__card-component__form--wrapper--input:hover{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__card-component__form--wrapper--input--error{background:var(--straumur__color-red-gamma);border:1px solid var(--straumur__color-red-beta)}.straumur__card-component__form--wrapper--input--error:hover{border:1px solid var(--straumur__color-red-beta)}.straumur__card-component__form--field-wrapper{display:flex;width:100%;gap:var(--straumur__space-5xlg)}.straumur__card-component__submit-button{background:var(--straumur__color-primary);border:none;border-radius:var(--straumur__border-radius-s);color:var(--straumur__color-white);cursor:pointer;font-size:1rem;height:40px;outline:none;padding:0 var(--straumur__space-xxlg);transition:background .2s ease-out;width:100%}.straumur__card-component__submit-button:hover{background:var(--straumur__color-primary);border:1px solid #dbdee2}.straumur__card-component__submit-button:disabled{background:#72889d;border:1px solid #dbdee2;cursor:not-allowed}.straumur__card-component__form--wrapper--label-checkbox{height:38px;display:flex;align-items:center;padding:8px;gap:var(--straumur__space-s);border-radius:var(--straumur__border-radius-s);cursor:pointer;user-select:none;transition:background-color .25s ease-in-out}.straumur__card-component__form--wrapper--label-checkbox:hover{background-color:var(--straumur__color-blue-gamma)}.straumur__card-component__form--wrapper--label-checkbox:hover .straumur__card-component__form--wrapper--label-checkbox--checkmark{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__card-component__form--wrapper--label-checkbox--checkmark{height:var(--straumur__space-5xlg);width:var(--straumur__space-5xlg);background-color:var(--straumur__color-secondary-gamma);border-radius:var(--straumur__border-radius-xxs);flex-shrink:0;border:1px solid var(--straumur__color-transparent);transition:all .2s ease-in}.straumur__card-component__form--wrapper--label-checkbox:hover .straumur__card-component__form--wrapper--label-checkbox--checkmark.straumur__card-component__form--wrapper--label-checkbox--checkmark--checked{border:1px solid var(--straumur__color-transparent)}.straumur__card-component__form--wrapper--label-checkbox--checkmark--checked{background-color:var(--straumur__color-blue-beta)}.straumur__card-component__form--wrapper--label-checkbox--checkmark--icon{height:100%;display:flex;justify-content:center;align-items:center;font-size:9px;opacity:0;visibility:hidden;transition:all .2s ease-in}.straumur__card-component__form--wrapper--label-checkbox--checkmark--icon--checked{opacity:1;visibility:visible}.straumur__card-component__form--wrapper--label-checkbox--checkbox{display:none}.js-iframe{border:none;color-scheme:auto;height:100%;overflow:hidden;width:100%}
|
|
3
|
+
`);var Yn=An(void 0),nd={card:!1,storedcard:!1,googlepay:!1,applepay:!1},jn=({children:t,initialValue:e})=>{let[r,o]=z(e),[s,n]=z(null),[i,c]=z(!1),[d,p]=z(nd),[u,l]=z({}),[h,m]=z(null),[y,b]=z(null),C=(N,E)=>{p(P=>({...P,[N]:E}))},_=(N,E)=>{l(P=>({...P,[N]:E}))},g=N=>{b(N)},O=N=>{m(N)};return a(Yn.Provider,{value:{activePaymentMethod:r,setActivePaymentMethod:o,activeStoredPaymentMethodId:s,setActiveStoredPaymentMethodId:n,isPaymentMethodInitialized:d,updatePaymentMethodInitialization:C,isStoredCardInitialized:u,updateStoredCardInitialization:_,handleSuccess:O,success:h,handleError:g,error:y,threeDSecureActive:i,setThreeDSecureActive:c}},t)},_e=()=>{let t=Bn(Yn);if(t===void 0)throw new Error("usePaymentMethodGroup must be used within a PaymentMethodGroup");return t};var Jr,W,Kn,Et,$n,Wn,ds,fs,ps,us,Zn,dr={},qn=[],ad=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Qr=Array.isArray;function et(t,e){for(var r in e)t[r]=e[r];return t}function Xn(t){var e=t.parentNode;e&&e.removeChild(t)}function f(t,e,r){var o,s,n,i={};for(n in e)n=="key"?o=e[n]:n=="ref"?s=e[n]:i[n]=e[n];if(arguments.length>2&&(i.children=arguments.length>3?Jr.call(arguments,2):r),typeof t=="function"&&t.defaultProps!=null)for(n in t.defaultProps)i[n]===void 0&&(i[n]=t.defaultProps[n]);return qr(t,i,o,s,null)}function qr(t,e,r,o,s){var n={type:t,props:e,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:s??++Kn,__i:-1,__u:0};return s==null&&W.vnode!=null&&W.vnode(n),n}function tt(t){return t.children}function j(t,e){this.props=t,this.context=e}function St(t,e){if(e==null)return t.__?St(t.__,t.__i+1):null;for(var r;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null)return r.__e;return typeof t.type=="function"?St(t):null}function Jn(t){var e,r;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null){t.__e=t.__c.base=r.__e;break}return Jn(t)}}function ms(t){(!t.__d&&(t.__d=!0)&&Et.push(t)&&!Xr.__r++||$n!==W.debounceRendering)&&(($n=W.debounceRendering)||Wn)(Xr)}function Xr(){var t,e,r,o,s,n,i,c;for(Et.sort(ds);t=Et.shift();)t.__d&&(e=Et.length,o=void 0,n=(s=(r=t).__v).__e,i=[],c=[],r.__P&&((o=et({},s)).__v=s.__v+1,W.vnode&&W.vnode(o),ys(r.__P,o,s,r.__n,r.__P.namespaceURI,32&s.__u?[n]:null,i,n??St(s),!!(32&s.__u),c),o.__v=s.__v,o.__.__k[o.__i]=o,ta(i,o,c),o.__e!=n&&Jn(o)),Et.length>e&&Et.sort(ds));Xr.__r=0}function Qn(t,e,r,o,s,n,i,c,d,p,u){var l,h,m,y,b,C=o&&o.__k||qn,_=e.length;for(r.__d=d,id(r,e,C),d=r.__d,l=0;l<_;l++)(m=r.__k[l])!=null&&typeof m!="boolean"&&typeof m!="function"&&(h=m.__i===-1?dr:C[m.__i]||dr,m.__i=l,ys(t,m,h,s,n,i,c,d,p,u),y=m.__e,m.ref&&h.ref!=m.ref&&(h.ref&&gs(h.ref,null,m),u.push(m.ref,m.__c||y,m)),b==null&&y!=null&&(b=y),65536&m.__u||h.__k===m.__k?(d&&typeof m.type=="string"&&!t.contains(d)&&(d=St(h)),d=ea(m,d,t)):typeof m.type=="function"&&m.__d!==void 0?d=m.__d:y&&(d=y.nextSibling),m.__d=void 0,m.__u&=-196609);r.__d=d,r.__e=b}function id(t,e,r){var o,s,n,i,c,d=e.length,p=r.length,u=p,l=0;for(t.__k=[],o=0;o<d;o++)i=o+l,(s=t.__k[o]=(s=e[o])==null||typeof s=="boolean"||typeof s=="function"?null:typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?qr(null,s,null,null,null):Qr(s)?qr(tt,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?qr(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s)!=null?(s.__=t,s.__b=t.__b+1,c=ld(s,r,i,u),s.__i=c,n=null,c!==-1&&(u--,(n=r[c])&&(n.__u|=131072)),n==null||n.__v===null?(c==-1&&l--,typeof s.type!="function"&&(s.__u|=65536)):c!==i&&(c==i-1?l=c-i:c==i+1?l++:c>i?u>d-i?l+=c-i:l--:c<i&&l++,c!==o+l&&(s.__u|=65536))):(n=r[i])&&n.key==null&&n.__e&&!(131072&n.__u)&&(n.__e==t.__d&&(t.__d=St(n)),hs(n,n,!1),r[i]=null,u--);if(u)for(o=0;o<p;o++)(n=r[o])!=null&&!(131072&n.__u)&&(n.__e==t.__d&&(t.__d=St(n)),hs(n,n))}function ea(t,e,r){var o,s;if(typeof t.type=="function"){for(o=t.__k,s=0;o&&s<o.length;s++)o[s]&&(o[s].__=t,e=ea(o[s],e,r));return e}t.__e!=e&&(r.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType===8);return e}function _s(t,e){return e=e||[],t==null||typeof t=="boolean"||(Qr(t)?t.some(function(r){_s(r,e)}):e.push(t)),e}function ld(t,e,r,o){var s=t.key,n=t.type,i=r-1,c=r+1,d=e[r];if(d===null||d&&s==d.key&&n===d.type&&!(131072&d.__u))return r;if(o>(d==null||131072&d.__u?0:1))for(;i>=0||c<e.length;){if(i>=0){if((d=e[i])&&!(131072&d.__u)&&s==d.key&&n===d.type)return i;i--}if(c<e.length){if((d=e[c])&&!(131072&d.__u)&&s==d.key&&n===d.type)return c;c++}}return-1}function zn(t,e,r){e[0]==="-"?t.setProperty(e,r??""):t[e]=r==null?"":typeof r!="number"||ad.test(e)?r:r+"px"}function Zr(t,e,r,o,s){var n;e:if(e==="style")if(typeof r=="string")t.style.cssText=r;else{if(typeof o=="string"&&(t.style.cssText=o=""),o)for(e in o)r&&e in r||zn(t.style,e,"");if(r)for(e in r)o&&r[e]===o[e]||zn(t.style,e,r[e])}else if(e[0]==="o"&&e[1]==="n")n=e!==(e=e.replace(/(PointerCapture)$|Capture$/i,"$1")),e=e.toLowerCase()in t||e==="onFocusOut"||e==="onFocusIn"?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+n]=r,r?o?r.u=o.u:(r.u=fs,t.addEventListener(e,n?us:ps,n)):t.removeEventListener(e,n?us:ps,n);else{if(s=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&e[4]!=="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&r==1?"":r))}}function Gn(t){return function(e){if(this.l){var r=this.l[e.type+t];if(e.t==null)e.t=fs++;else if(e.t<r.u)return;return r(W.event?W.event(e):e)}}}function ys(t,e,r,o,s,n,i,c,d,p){var u,l,h,m,y,b,C,_,g,O,N,E,P,L,H,U,F=e.type;if(e.constructor!==void 0)return null;128&r.__u&&(d=!!(32&r.__u),n=[c=e.__e=r.__e]),(u=W.__b)&&u(e);e:if(typeof F=="function")try{if(_=e.props,g="prototype"in F&&F.prototype.render,O=(u=F.contextType)&&o[u.__c],N=u?O?O.props.value:u.__:o,r.__c?C=(l=e.__c=r.__c).__=l.__E:(g?e.__c=l=new F(_,N):(e.__c=l=new j(_,N),l.constructor=F,l.render=dd),O&&O.sub(l),l.props=_,l.state||(l.state={}),l.context=N,l.__n=o,h=l.__d=!0,l.__h=[],l._sb=[]),g&&l.__s==null&&(l.__s=l.state),g&&F.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=et({},l.__s)),et(l.__s,F.getDerivedStateFromProps(_,l.__s))),m=l.props,y=l.state,l.__v=e,h)g&&F.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),g&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(g&&F.getDerivedStateFromProps==null&&_!==m&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(_,N),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(_,l.__s,N)===!1||e.__v===r.__v)){for(e.__v!==r.__v&&(l.props=_,l.state=l.__s,l.__d=!1),e.__e=r.__e,e.__k=r.__k,e.__k.forEach(function(M){M&&(M.__=e)}),E=0;E<l._sb.length;E++)l.__h.push(l._sb[E]);l._sb=[],l.__h.length&&i.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(_,l.__s,N),g&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(m,y,b)})}if(l.context=N,l.props=_,l.__P=t,l.__e=!1,P=W.__r,L=0,g){for(l.state=l.__s,l.__d=!1,P&&P(e),u=l.render(l.props,l.state,l.context),H=0;H<l._sb.length;H++)l.__h.push(l._sb[H]);l._sb=[]}else do l.__d=!1,P&&P(e),u=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++L<25);l.state=l.__s,l.getChildContext!=null&&(o=et(et({},o),l.getChildContext())),g&&!h&&l.getSnapshotBeforeUpdate!=null&&(b=l.getSnapshotBeforeUpdate(m,y)),Qn(t,Qr(U=u!=null&&u.type===tt&&u.key==null?u.props.children:u)?U:[U],e,r,o,s,n,i,c,d,p),l.base=e.__e,e.__u&=-161,l.__h.length&&i.push(l),C&&(l.__E=l.__=null)}catch(M){e.__v=null,d||n!=null?(e.__e=c,e.__u|=d?160:32,n[n.indexOf(c)]=null):(e.__e=r.__e,e.__k=r.__k),W.__e(M,e,r)}else n==null&&e.__v===r.__v?(e.__k=r.__k,e.__e=r.__e):e.__e=cd(r.__e,e,r,o,s,n,i,d,p);(u=W.diffed)&&u(e)}function ta(t,e,r){e.__d=void 0;for(var o=0;o<r.length;o++)gs(r[o],r[++o],r[++o]);W.__c&&W.__c(e,t),t.some(function(s){try{t=s.__h,s.__h=[],t.some(function(n){n.call(s)})}catch(n){W.__e(n,s.__v)}})}function cd(t,e,r,o,s,n,i,c,d){var p,u,l,h,m,y,b,C=r.props,_=e.props,g=e.type;if(g==="svg"?s="http://www.w3.org/2000/svg":g==="math"?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),n!=null){for(p=0;p<n.length;p++)if((m=n[p])&&"setAttribute"in m==!!g&&(g?m.localName===g:m.nodeType===3)){t=m,n[p]=null;break}}if(t==null){if(g===null)return document.createTextNode(_);t=document.createElementNS(s,g,_.is&&_),n=null,c=!1}if(g===null)C===_||c&&t.data===_||(t.data=_);else{if(n=n&&Jr.call(t.childNodes),C=r.props||dr,!c&&n!=null)for(C={},p=0;p<t.attributes.length;p++)C[(m=t.attributes[p]).name]=m.value;for(p in C)if(m=C[p],p!="children"){if(p=="dangerouslySetInnerHTML")l=m;else if(p!=="key"&&!(p in _)){if(p=="value"&&"defaultValue"in _||p=="checked"&&"defaultChecked"in _)continue;Zr(t,p,null,m,s)}}for(p in _)m=_[p],p=="children"?h=m:p=="dangerouslySetInnerHTML"?u=m:p=="value"?y=m:p=="checked"?b=m:p==="key"||c&&typeof m!="function"||C[p]===m||Zr(t,p,m,C[p],s);if(u)c||l&&(u.__html===l.__html||u.__html===t.innerHTML)||(t.innerHTML=u.__html),e.__k=[];else if(l&&(t.innerHTML=""),Qn(t,Qr(h)?h:[h],e,r,o,g==="foreignObject"?"http://www.w3.org/1999/xhtml":s,n,i,n?n[0]:r.__k&&St(r,0),c,d),n!=null)for(p=n.length;p--;)n[p]!=null&&Xn(n[p]);c||(p="value",y!==void 0&&(y!==t[p]||g==="progress"&&!y||g==="option"&&y!==C[p])&&Zr(t,p,y,C[p],s),p="checked",b!==void 0&&b!==t[p]&&Zr(t,p,b,C[p],s))}return t}function gs(t,e,r){try{typeof t=="function"?t(e):t.current=e}catch(o){W.__e(o,r)}}function hs(t,e,r){var o,s;if(W.unmount&&W.unmount(t),(o=t.ref)&&(o.current&&o.current!==t.__e||gs(o,null,e)),(o=t.__c)!=null){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(n){W.__e(n,e)}o.base=o.__P=null}if(o=t.__k)for(s=0;s<o.length;s++)o[s]&&hs(o[s],e,r||typeof t.type!="function");r||t.__e==null||Xn(t.__e),t.__c=t.__=t.__e=t.__d=void 0}function dd(t,e,r){return this.constructor(t,r)}function vs(t,e,r){var o,s,n;W.__&&W.__(t,e),o=e.__k,s=[],n=[],ys(e,t=e.__k=f(tt,null,[t]),o||dr,dr,e.namespaceURI,o?null:e.firstChild?Jr.call(e.childNodes):null,s,o?o.__e:e.firstChild,!1,n),ta(s,t,n)}function ra(t,e){var r={__c:e="__cC"+Zn++,__:t,Consumer:function(o,s){return o.children(s)},Provider:function(o){var s,n;return this.getChildContext||(s=[],(n={})[e]=this,this.getChildContext=function(){return n},this.componentWillUnmount=function(){s=null},this.shouldComponentUpdate=function(i){this.props.value!==i.value&&s.some(function(c){c.__e=!0,ms(c)})},this.sub=function(i){s.push(i);var c=i.componentWillUnmount;i.componentWillUnmount=function(){s&&s.splice(s.indexOf(i),1),c&&c.call(i)}}),o.children}};return r.Provider.__=r.Consumer.contextType=r}Jr=qn.slice,W={__e:function(t,e,r,o){for(var s,n,i;e=e.__;)if((s=e.__c)&&!s.__)try{if((n=s.constructor)&&n.getDerivedStateFromError!=null&&(s.setState(n.getDerivedStateFromError(t)),i=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(t,o||{}),i=s.__d),i)return s.__E=s}catch(c){t=c}throw t}},Kn=0,j.prototype.setState=function(t,e){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=et({},this.state),typeof t=="function"&&(t=t(et({},r),this.props)),t&&et(r,t),t!=null&&this.__v&&(e&&this._sb.push(e),ms(this))},j.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),ms(this))},j.prototype.render=tt,Et=[],Wn=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ds=function(t,e){return t.__v.__b-e.__v.__b},Xr.__r=0,fs=0,ps=Gn(!1),us=Gn(!0),Zn=0;var Vt,X,Cs,oa,pr=0,pa=[],oe=W,sa=oe.__b,na=oe.__r,aa=oe.diffed,ia=oe.__c,la=oe.unmount,ca=oe.__;function to(t,e){oe.__h&&oe.__h(X,t,pr||e),pr=0;var r=X.__H||(X.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function ye(t){return pr=1,pd(fa,t)}function pd(t,e,r){var o=to(Vt++,2);if(o.t=t,!o.__c&&(o.__=[r?r(e):fa(void 0,e),function(c){var d=o.__N?o.__N[0]:o.__[0],p=o.t(d,c);d!==p&&(o.__N=[p,o.__[1]],o.__c.setState({}))}],o.__c=X,!X.u)){var s=function(c,d,p){if(!o.__c.__H)return!0;var u=o.__c.__H.__.filter(function(h){return!!h.__c});if(u.every(function(h){return!h.__N}))return!n||n.call(this,c,d,p);var l=!1;return u.forEach(function(h){if(h.__N){var m=h.__[0];h.__=h.__N,h.__N=void 0,m!==h.__[0]&&(l=!0)}}),!(!l&&o.__c.props===c)&&(!n||n.call(this,c,d,p))};X.u=!0;var n=X.shouldComponentUpdate,i=X.componentWillUpdate;X.componentWillUpdate=function(c,d,p){if(this.__e){var u=n;n=void 0,s(c,d,p),n=u}i&&i.call(this,c,d,p)},X.shouldComponentUpdate=s}return o.__N||o.__}function ze(t,e){var r=to(Vt++,3);!oe.__s&&ha(r.__H,e)&&(r.__=t,r.i=e,X.__H.__h.push(r))}function rt(t){return pr=5,ro(function(){return{current:t}},[])}function ro(t,e){var r=to(Vt++,7);return ha(r.__H,e)&&(r.__=t(),r.__H=e,r.__h=t),r.__}function ua(t,e){return pr=8,ro(function(){return t},e)}function ma(t){var e=X.context[t.__c],r=to(Vt++,9);return r.c=t,e?(r.__==null&&(r.__=!0,e.sub(X)),e.props.value):t.__}function ud(){for(var t;t=pa.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(eo),t.__H.__h.forEach(bs),t.__H.__h=[]}catch(e){t.__H.__h=[],oe.__e(e,t.__v)}}oe.__b=function(t){X=null,sa&&sa(t)},oe.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),ca&&ca(t,e)},oe.__r=function(t){na&&na(t),Vt=0;var e=(X=t.__c).__H;e&&(Cs===X?(e.__h=[],X.__h=[],e.__.forEach(function(r){r.__N&&(r.__=r.__N),r.i=r.__N=void 0})):(e.__h.forEach(eo),e.__h.forEach(bs),e.__h=[],Vt=0)),Cs=X},oe.diffed=function(t){aa&&aa(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(pa.push(e)!==1&&oa===oe.requestAnimationFrame||((oa=oe.requestAnimationFrame)||md)(ud)),e.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.i=void 0})),Cs=X=null},oe.__c=function(t,e){e.some(function(r){try{r.__h.forEach(eo),r.__h=r.__h.filter(function(o){return!o.__||bs(o)})}catch(o){e.some(function(s){s.__h&&(s.__h=[])}),e=[],oe.__e(o,r.__v)}}),ia&&ia(t,e)},oe.unmount=function(t){la&&la(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.forEach(function(o){try{eo(o)}catch(s){e=s}}),r.__H=void 0,e&&oe.__e(e,r.__v))};var da=typeof requestAnimationFrame=="function";function md(t){var e,r=function(){clearTimeout(o),da&&cancelAnimationFrame(e),setTimeout(t)},o=setTimeout(r,100);da&&(e=requestAnimationFrame(r))}function eo(t){var e=X,r=t.__c;typeof r=="function"&&(t.__c=void 0,r()),X=e}function bs(t){var e=X;t.__c=t.__(),X=e}function ha(t,e){return!t||t.length!==e.length||e.some(function(r,o){return r!==t[o]})}function fa(t,e){return typeof e=="function"?e(t):e}var _a="encrypted",I="encryptedCardNumber",x="encryptedExpiryDate",k="encryptedExpiryMonth",A="encryptedExpiryYear",D="encryptedSecurityCode",he="encryptedPassword",ur="encryptedSecurityCode3digits",mr="encryptedSecurityCode4digits",hr="giftcard",ya="5.5.3",Rt=["amex","mc","visa"],ga=[hr],hd=[I,x,k,A,D,he],oo=hd,va=["bcmc"],Ca="required",so="optional",no="hidden",Me=Ca,fr=so,_r=no,Ie=Ca,yr=so,Pt=no,ba="data-cse",Ea="data-info",Sa="data-uid",Ra=["accel","pulse","star","nyce"];var Tt={[I]:"cardNumber",[x]:"expiryDate",[D]:"securityCode",[k]:"expiryMonth",[A]:"expiryYear",[he]:"password",[ur]:"securityCodeThreeDigits",[mr]:"securityCodeFourDigits"},Pa=6e3;var xe=(t,e)=>e.split(".").reduce((r,o)=>r&&r[o]?r[o]:void 0,t);var Ge="field.error.required";var ao="invalid.format.expects",Ta="creditCard.holderName.invalid",Aa="creditCard.taxNumber.invalid",Da="boleto.socialSecurityNumber.invalid",At=function(t){return t.CC_NUM="cc.num",t.CC_DAT="cc.dat",t.CC_MTH="cc.mth",t.CC_YR="cc.yr",t.CC_CVC="cc.cvc",t.KCP_PWD="kcp.pwd",t}({}),Ht=function(t){return t.ERROR_MSG_INCOMPLETE_FIELD="err.gen.9100",t.ERROR_MSG_INVALID_FIELD="err.gen.9101",t.ERROR_MSG_LUHN_CHECK_FAILED="cc.num.902",t.ERROR_MSG_EMPTY_PAN="cc.num.900",t.ERROR_MSG_UNSUPPORTED_CARD_ENTERED="cc.num.903",t.ERROR_MSG_INCORRECTLY_FILLED_PAN="cc.num.901",t.ERROR_MSG_CARD_TOO_OLD="cc.dat.912",t.ERROR_MSG_CARD_TOO_FAR_IN_FUTURE="cc.dat.913",t.ERROR_MSG_CARD_EXPIRES_TOO_SOON="cc.dat.914",t.ERROR_MSG_EMPTY_DATE="cc.dat.910",t.ERROR_MSG_INCORRECTLY_FILLED__DATE="cc.dat.911",t.ERROR_MSG_EMPTY_YEAR="cc.yr.917",t.ERROR_MSG_INCORRECTLY_FILLED_YEAR="cc.yr.918",t.ERROR_MSG_EMPTY_MONTH="cc.mth.915",t.ERROR_MSG_EMPTY_CVC="cc.cvc.920",t.ERROR_MSG_INCORRECTLY_FILLED_CVC="cc.cvc.921",t.ERROR_MSG_EMPTY_KCP_PWD="kcp.pwd.940",t.ERROR_MSG_INCORRECTLY_FILLED_KCP_PWD="kcp.pwd.941",t}({}),Ia={[I]:"cc.num.900",[x]:"cc.dat.910",[k]:"cc.mth.915",[A]:"cc.yr.917",[D]:"cc.cvc.920",[he]:"kcp.pwd.940"};var xa=t=>t?Array.prototype.slice.call(t.querySelectorAll('[data-cse*="encrypted"]')).map(e=>e.getAttribute("data-cse")):[],wa=(t,e)=>(e===x?(t[k]=!1,t[A]=!1):t[e]=!1,t),ka=(t,e)=>(r,o)=>{let s=e.valid[o]!==!0?((n,i)=>i!==1||n!==k&&n!==A?n:x)(o,t):null;return s=((n,i,c)=>{let{isFieldOfType:d,fieldIsValid:p}=c.reduce((m,y)=>(m.isFieldOfType||(m.isFieldOfType=n===y,m.fieldIsValid=!i.errors[y]),m),{isFieldOfType:!1,fieldIsValid:!1}),u=n===D?"cvcPolicy":"expiryDatePolicy",l=u==="cvcPolicy"?fr:yr,h=u==="cvcPolicy"?_r:Pt;return(i[u]===l||i[u]===h)&&p&&d?null:n})(s,e,[D,x,k,A]),s&&!r.includes(s)&&r.push(s),r},Na=(t,e,r)=>({rootNode:e,fieldType:t,error:xe(r,`errors.${t}`)||Ia[t],type:"card"});function w(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var io=class{constructor(e){w(this,"callbacks",void 0),w(this,"config",void 0),w(this,"props",void 0),w(this,"state",void 0),w(this,"validateForm",void 0),w(this,"handleBrandFromBinLookup",void 0),w(this,"callbacksHandler",void 0),w(this,"configHandler",void 0),w(this,"createCardSecuredFields",void 0),w(this,"createNonCardSecuredFields",void 0),w(this,"createSecuredFields",void 0),w(this,"destroySecuredFields",void 0),w(this,"handleIOSTouchEvents",void 0),w(this,"destroyTouchendListener",void 0),w(this,"destroyTouchstartListener",void 0),w(this,"handleBinValue",void 0),w(this,"handleEncryption",void 0),w(this,"handleFocus",void 0),w(this,"handleIframeConfigFeedback",void 0),w(this,"handleValidation",void 0),w(this,"handleSFShiftTab",void 0),w(this,"handleShiftTab",void 0),w(this,"isConfigured",void 0),w(this,"postMessageToAllIframes",void 0),w(this,"processAutoComplete",void 0),w(this,"processBrand",void 0),w(this,"sendBrandToCardSF",void 0),w(this,"sendExpiryDatePolicyToSF",void 0),w(this,"setFocusOnFrame",void 0),w(this,"setupSecuredField",void 0),w(this,"touchendListener",void 0),w(this,"touchstartListener",void 0),w(this,"hasGenuineTouchEvents",void 0),w(this,"encryptedAttrName",void 0),w(this,"hasRedundantCVCField",void 0),w(this,"isSingleBrandedCard",void 0),w(this,"securityCode",void 0),this.props=e,this.state={},this.config={},this.callbacks={}}};var Oa=Object.prototype.toString;function gr(t){return typeof t=="object"&&t!==null&&Object.prototype.toString.call(t)==="[object Array]"}function ge(t){return t!=null}function vr(t){return t!==!1&&ge(t)}function Es(t){return!!t&&typeof t=="object"}function Fa(t){return!vr(t)||!(!(typeof(e=t)=="number"||Es(e)&&Oa.call(e)==="[object Number]")||t!==0&&!Number.isNaN(t))||!(!gr(t)&&!function(r){return typeof r=="string"||Es(r)&&Oa.call(r)==="[object String]"}(t)||t.length!==0)||!(!Es(t)||Object.keys(t).length!==0);var e}function Dt(...t){let e=gr(t[0])?t[0]:t;return{from:r=>e.map(o=>o in r?{[o]:r[o]}:{}).reduce((o,s)=>({...o,...s}),{})}}function Ma(...t){let e=gr(t[0])?t[0]:t;return{from:r=>Dt(...Object.keys(r).filter(o=>!e.includes(o))).from(r)}}var La=t=>gr(t)&&t.length?t:Rt;var Cr=typeof window<"u"&&window.console&&window.console.error&&window.console.error.bind(window.console);typeof window<"u"&&window.console&&window.console.info&&window.console.info.bind(window.console);var lo=typeof window<"u"&&window.console&&window.console.log&&window.console.log.bind(window.console),be=typeof window<"u"&&window.console&&window.console.warn&&window.console.warn.bind(window.console);function Ua(t){this.config.cardGroupTypes=La(t.cardGroupTypes);let e=t.loadingContext;if(!e)return void be("WARNING Config :: no loadingContext has been specified!");var r;this.config.loadingContext=(r=e).charAt(r.length-1)==="/"?e:`${e}/`,this.config.isCreditCardType=ga.includes(t.type)===!1,this.config.iframeUIConfig=t.iframeUIConfig??{},this.config.autoFocus=!(t.autoFocus===!1||t.autoFocus==="false"),this.config.showWarnings=t.showWarnings===!0||t.showWarnings==="true",this.config.trimTrailingSeparator=!(t.trimTrailingSeparator===!1||t.trimTrailingSeparator==="false"),this.config.keypadFix=!(t.keypadFix===!1||t.keypadFix==="false"),this.config.legacyInputMode=t.legacyInputMode||null,this.config.minimumExpiryDate=t.minimumExpiryDate||null,this.config.sfLogAtStart=window._b$dl===!0;let o=this.config.isCreditCardType?"card":t.type,s=btoa(window.location.origin),n=`${o}${t.forceCompat||typeof window.TextEncoder!="function"?"Compat":""}`;this.config.iframeSrc=`${this.config.loadingContext}securedfields/${t.clientKey}/${ya}/securedFields.html?type=${n}&d=${s}`}var ve=()=>{};function Ba(t={}){this.callbacks.onLoad=t.onLoad?t.onLoad:ve,this.callbacks.onConfigSuccess=t.onConfigSuccess?t.onConfigSuccess:ve,this.callbacks.onFieldValid=t.onFieldValid?t.onFieldValid:ve,this.callbacks.onAllValid=t.onAllValid?t.onAllValid:ve,this.callbacks.onBrand=t.onBrand?t.onBrand:ve,this.callbacks.onError=t.onError?t.onError:ve,this.callbacks.onFocus=t.onFocus?t.onFocus:ve,this.callbacks.onBinValue=t.onBinValue?t.onBinValue:ve,this.callbacks.onAutoComplete=t.onAutoComplete?t.onAutoComplete:ve,this.callbacks.onAdditionalSFConfig=t.onAdditionalSFConfig?t.onAdditionalSFConfig:ve,this.callbacks.onAdditionalSFRemoved=t.onAdditionalSFRemoved?t.onAdditionalSFRemoved:ve,this.callbacks.onTouchstartIOS=t.onTouchstartIOS?t.onTouchstartIOS:ve,this.callbacks.onKeyPressed=t.onKeyPressed?t.onKeyPressed:ve}var Va=({fieldType:t,encryptedFieldName:e,uuid:r,isValid:o,txVariant:s,rootNode:n})=>({fieldType:t,encryptedFieldName:e,uid:r,valid:o,type:s,rootNode:n}),Ha=({fieldType:t,txVariant:e,rootNode:r})=>{let o=t===x,s=[],n=["encryptedExpiryMonth","encryptedExpiryYear"],i,c,d,p,u=o?2:1;for(i=0;i<u;i+=1){d=o?n[i]:t,c=`${e}-encrypted-${d}`,p=o?d:t;let l=Va({fieldType:t,encryptedFieldName:p,uuid:c,isValid:!1,txVariant:e,rootNode:r});s.push(l)}return s},Ya=({fieldType:t,txVariant:e,rootNode:r,encryptedObjArr:o})=>{let s,n,i,c,d,p=[];for(s=0;s<o.length;s+=1){i=o[s],c=i.encryptedFieldName,n=`${e}-encrypted-${c}`,d=i.blob;let u=Va({fieldType:t,encryptedFieldName:c,uuid:n,isValid:!0,txVariant:e,rootNode:r});u.blob=d,p.push(u)}return p};function R(t={},e){return Object.prototype.hasOwnProperty.call(t,e)}var co=(t,e,r,o,s)=>{if(!R(t,"error"))return null;let n=e,i={rootNode:o,fieldType:t.fieldType,error:null,type:null},c=t.error!=="";return c||n.hasError?(i.error=c?t.error:"",i.type=r,n.hasError=c,n.errorType=i.error,s(i),i):null};function ja(t){let e,r=t.fieldType;if(this.state.type==="card"&&R(t,"cvcPolicy")&&ge(t.cvcPolicy)&&R(this.state.securedFields,D)&&(this.state.securedFields[D].cvcPolicy=t.cvcPolicy),co(t,this.state.securedFields[r],this.state.type,this.props.rootNode,this.callbacks.onError),this.state.securedFields[r].isEncrypted){e=Ha({fieldType:r,txVariant:this.state.type,rootNode:this.props.rootNode}),r===I&&(e[0].endDigits="");for(let o=0,s=e.length;o<s;o+=1)this.callbacks.onFieldValid(e[o]);this.state.securedFields[r].isEncrypted=!1}this.validateForm(),R(t,"brand")&&this.processBrand(t)}var se=(t,e,r)=>{if(e){let o=JSON.stringify(t);e.postMessage(o,r)}};function ae(t,e){return t.securedFields[e]?.iframeContentWindow||null}function $a(t){let e=t.fieldType,r,o;this.config.autoFocus&&(t.type!=="year"&&e!==A||this.setFocusOnFrame(D),e===k&&this.setFocusOnFrame(A));let s=t[e];this.state.securedFields[e].isEncrypted=!0,co({error:"",fieldType:e},this.state.securedFields[e],this.state.type,this.props.rootNode,this.callbacks.onError);let n=Ya({fieldType:e,txVariant:this.state.type,rootNode:this.props.rootNode,encryptedObjArr:s});if(e===k&&R(this.state.securedFields,A)){let i={txVariant:this.state.type,code:t.code,blob:s[0].blob,fieldType:A,numKey:this.state.securedFields[A].numKey};se(i,ae(this.state,A),this.config.loadingContext)}for(e===I&&vr(t.endDigits)&&(n[0].endDigits=t.endDigits),e===I&&vr(t.issuerBin)&&(n[0].issuerBin=+t.issuerBin),e===x&&vr(t.expiryDate)&&(n[1].expiryDate=t.expiryDate),r=0,o=n.length;r<o;r+=1)this.callbacks.onFieldValid(n[r]);this.validateForm()}var po=(t,e)=>{let r=[];return t&&typeof t.querySelectorAll=="function"&&(r=[].slice.call(t.querySelectorAll(e))),r},we=(t,e)=>{if(t)return t.querySelector(e)},br=(t,e)=>{if(t)return t.getAttribute(e)},za=t=>{for(;t.firstChild;)t.removeChild(t.firstChild)};var Ss,T={__NO_BRAND:"noBrand",cards:[]};T.cards.push({cardType:"mc",startingRules:[51,52,53,54,55,22,23,24,25,26,27],permittedLengths:[16],pattern:/^(5[1-5][0-9]{0,14}|2[2-7][0-9]{0,14})$/,securityCode:"CVC"}),T.cards.push({cardType:"visadankort",startingRules:[4571],permittedLengths:[16],pattern:/^(4571)[0-9]{0,12}$/}),T.cards.push({cardType:"visa",startingRules:[4],permittedLengths:[13,16,19],pattern:/^4[0-9]{0,18}$/,securityCode:"CVV"}),T.cards.push({cardType:"amex",startingRules:[34,37],permittedLengths:[15],pattern:/^3[47][0-9]{0,13}$/,securityCode:"CID"}),T.cards.push({cardType:"diners",startingRules:[36],permittedLengths:[14,15,16,17,18,19],pattern:/^(36)[0-9]{0,12}$/}),T.cards.push({cardType:"maestrouk",startingRules:[6759],permittedLengths:[16,18,19],pattern:/^(6759)[0-9]{0,15}$/}),T.cards.push({cardType:"solo",startingRules:[6767],permittedLengths:[16,18,19],pattern:/^(6767)[0-9]{0,15}$/}),T.cards.push({cardType:"laser",startingRules:[6304,6706,677117,677120],permittedLengths:[16,17,18,19],pattern:/^(6304|6706|6709|6771)[0-9]{0,15}$/,cvcPolicy:"optional"}),T.cards.push({cardType:"discover",startingRules:[6011,644,645,646,647,648,649,65],permittedLengths:[16,17,18,19],pattern:/^(6011[0-9]{0,12}|(644|645|646|647|648|649)[0-9]{0,13}|65[0-9]{0,14})$/}),T.cards.push({cardType:"jcb",startingRules:[3528,3529,353,354,355,356,357,358],permittedLengths:[16,19],pattern:/^(352[8,9]{1}[0-9]{0,15}|35[4-8]{1}[0-9]{0,16})$/,securityCode:"CAV"}),T.cards.push({cardType:"bcmc",startingRules:[6703,479658,606005],permittedLengths:[16,17,18,19],pattern:/^((6703)[0-9]{0,15}|(479658|606005)[0-9]{0,13})$/,cvcPolicy:"hidden"}),T.cards.push({cardType:"bijcard",startingRules:[5100081],permittedLengths:[16],pattern:/^(5100081)[0-9]{0,9}$/}),T.cards.push({cardType:"dankort",startingRules:[5019],permittedLengths:[16],pattern:/^(5019)[0-9]{0,12}$/}),T.cards.push({cardType:"hipercard",startingRules:[606282],permittedLengths:[16],pattern:/^(606282)[0-9]{0,10}$/}),T.cards.push({cardType:"cup",startingRules:[62,81],permittedLengths:[14,15,16,17,18,19],pattern:/^(62|81)[0-9]{0,17}$/}),T.cards.push({cardType:"maestro",startingRules:[50,56,57,58,6],permittedLengths:[16,17,18,19],pattern:/^(5[0|6-8][0-9]{0,17}|6[0-9]{0,18})$/,cvcPolicy:"optional"}),T.cards.push({cardType:"elo",startingRules:[506699,50670,50671,50672,50673,50674,50675,50676,506770,506771,506772,506773,506774,506775,506776,506777,506778,401178,438935,451416,457631,457632,504175,627780,636297,636368],permittedLengths:[16],pattern:/^((((506699)|(506770)|(506771)|(506772)|(506773)|(506774)|(506775)|(506776)|(506777)|(506778)|(401178)|(438935)|(451416)|(457631)|(457632)|(504175)|(627780)|(636368)|(636297))[0-9]{0,10})|((50676)|(50675)|(50674)|(50673)|(50672)|(50671)|(50670))[0-9]{0,11})$/}),T.cards.push({cardType:"uatp",startingRules:[1],permittedLengths:[15],pattern:/^1[0-9]{0,14}$/,cvcPolicy:"optional"}),T.cards.push({cardType:"cartebancaire",startingRules:[4,5,6],permittedLengths:[16],pattern:/^[4-6][0-9]{0,15}$/}),T.cards.push({cardType:"visaalphabankbonus",startingRules:[450903],permittedLengths:[16],pattern:/^(450903)[0-9]{0,10}$/}),T.cards.push({cardType:"mcalphabankbonus",startingRules:[510099],permittedLengths:[16],pattern:/^(510099)[0-9]{0,10}$/}),T.cards.push({cardType:"hiper",startingRules:[637095,637568,637599,637609,637612],permittedLengths:[16],pattern:/^(637095|637568|637599|637609|637612)[0-9]{0,10}$/}),T.cards.push({cardType:"oasis",startingRules:[982616],permittedLengths:[16],pattern:/^(982616)[0-9]{0,10}$/,cvcPolicy:"optional"}),T.cards.push({cardType:"karenmillen",startingRules:[98261465],permittedLengths:[16],pattern:/^(98261465)[0-9]{0,8}$/,cvcPolicy:"optional"}),T.cards.push({cardType:"warehouse",startingRules:[982633],permittedLengths:[16],pattern:/^(982633)[0-9]{0,10}$/,cvcPolicy:"optional"}),T.cards.push({cardType:"mir",startingRules:[220],permittedLengths:[16,17,18,19],pattern:/^(220)[0-9]{0,16}$/}),T.cards.push({cardType:"codensa",startingRules:[590712],permittedLengths:[16],pattern:/^(590712)[0-9]{0,10}$/}),T.cards.push({cardType:"naranja",startingRules:[377798,377799,402917,402918,527571,527572,589562],permittedLengths:[16,17,18,19],pattern:/^(37|40|5[28])([279])\d*$/}),T.cards.push({cardType:"cabal",startingRules:[589657,600691,603522,6042,6043,636908],permittedLengths:[16,17,18,19],pattern:/^(58|6[03])([03469])\d*$/}),T.cards.push({cardType:"shopping",startingRules:[2799,589407,603488],permittedLengths:[16,17,18,19],pattern:/^(27|58|60)([39])\d*$/}),T.cards.push({cardType:"argencard",startingRules:[501],permittedLengths:[16,17,18,19],pattern:/^(50)(1)\d*$/}),T.cards.push({cardType:"troy",startingRules:[9792],permittedLengths:[16],pattern:/^(97)(9)\d*$/}),T.cards.push({cardType:"forbrugsforeningen",startingRules:[600722],permittedLengths:[16],pattern:/^(60)(0)\d*$/}),T.cards.push({cardType:"vpay",startingRules:[401,408,413,434,435,437,439,441,442,443,444,446,447,455,458,460,461,463,466,471,479,482,483,487],permittedLengths:[13,14,15,16,17,18,19],pattern:/^(40[1,8]|413|43[4,5]|44[1,2,3,4,6,7]|45[5,8]|46[0,1,3,6]|47[1,9]|48[2,3,7])[0-9]{0,16}$/}),T.cards.push({cardType:"rupay",startingRules:[508528],permittedLengths:[16],pattern:/^(100003|508(2|[5-9])|60(69|[7-8])|652(1[5-9]|[2-5][0-9]|8[5-9])|65300[3-4]|8172([0-1]|[3-5]|7|9)|817(3[3-8]|40[6-9]|410)|35380([0-2]|[5-6]|9))[0-9]{0,12}$/}),T.cards.push({cardType:"ticket",expiryDatePolicy:"hidden"});var Yt={detectCard:(t,e)=>{let r,o,s;if(e){if(r=T.cards.filter(n=>e.includes(n.cardType)).filter(n=>R(n,"pattern")&&t.match(n.pattern)),r.length){if(r.length===1)return r[0];for(o=0,s=r.length;o<s;o+=1)if(!r[o].longestRule){let n=r[o].startingRules.reduce((i,c)=>i>c?i:c);r[o].longestRule=String(n).length}return r.reduce((n,i)=>n.longestRule>=i.longestRule?n:i)}return{cardType:T.__NO_BRAND}}return{cardType:T.__NO_BRAND}},detectCardLength:(t,e)=>{let r,o,s=0,n=!1,i=e,c=t.cardType!==T.__NO_BRAND?t.permittedLengths[t.permittedLengths.length-1]:0;if(c&&i>c&&(s=i.length-c,s>0&&(i=i.substring(0,i.length-s),o=i)),t.permittedLengths.forEach(d=>{i.length===d&&(n=!0)}),i.length===c){let d=Math.floor(i.length/4);r=c+(i.length%4>0?d:d-1),t.cardType.toLowerCase()==="amex"&&(r=c+2)}return{shortenedNewValue:o,maxLength:r,reachedValidLength:n}},getShortestPermittedCardLength:()=>{if(!Ss){let t=[];T.cards.forEach(e=>{t=t.concat(e.permittedLengths??[])}),Ss=Math.min.apply(null,t)}return Ss},getCardByBrand:t=>T.cards.filter(e=>e.cardType===t)[0],isGenericCardType:t=>{if(!t)throw new Error("Error: isGenericCardType: type param has not been specified");return t==="card"||t==="scheme"},__NO_BRAND:T.__NO_BRAND,allCards:T.cards};function Ga({src:t,title:e="iframe element",policy:r="origin"}){let o=document.createElement("iframe");o.setAttribute("src",t),o.classList.add("js-iframe"),e===""||e.trim().length===0||e==="none"?o.setAttribute("role","presentation"):o.setAttribute("title",e),o.setAttribute("allowtransparency","true"),o.setAttribute("referrerpolicy",r);let s=document.createTextNode("<p>Your browser does not support iframes.</p>");return o.appendChild(s),o}var Ke=(t,e,r,o=!1)=>!(!t||typeof t.addEventListener!="function")&&(t.addEventListener(e,r,o),!0),ot=(t,e,r,o=!1)=>!(!t||typeof t.removeEventListener!="function")&&(t.removeEventListener(e,r,o),!0);var Ka=(t,e,r)=>{let o=t.origin,s=e.indexOf("/checkoutshopper/"),n=s>-1?e.substring(0,s):e,i=n.length-1;return n.charAt(i)==="/"&&(n=n.substring(0,i)),o===n||(r&&be(`WARNING postMessageValidation: postMessage listener for iframe::origin mismatch!
|
|
4
|
+
Received message with origin:`,o,"but the only allowed origin for messages to CSF is",n,"### event.data=",t.data),!1)},Wa=t=>t.data&&t.data.type&&typeof t.data.type=="string"&&t.data.type.indexOf("webpack")>-1,Za=t=>t.data&&typeof t.data=="string"&&t.data.indexOf("cvox")>-1;function qa(){if(!window.crypto)return 4294967296*Math.random()|0;let t=new Uint32Array(1);return window.crypto.getRandomValues(t),t[0]}function Rs(t,e){let r=typeof t;return t&&e&&r==="object"&&r===typeof e?Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(o=>Rs(t[o],e[o])):t===e}function Le(...t){let e=t,r=e.shift();return function(...o){return r.apply(this,e.concat(o))}}function G(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var uo=class{constructor(){G(this,"sfConfig",void 0),G(this,"loadingContext",void 0),G(this,"holderEl",void 0),G(this,"iframeRef",void 0),G(this,"loadToConfigTimeout",void 0),G(this,"_isValid",void 0),G(this,"_iframeContentWindow",void 0),G(this,"_numKey",void 0),G(this,"_isEncrypted",void 0),G(this,"_hasError",void 0),G(this,"_errorType",void 0),G(this,"_cvcPolicy",void 0),G(this,"_expiryDatePolicy",void 0),G(this,"_iframeOnLoadListener",void 0),G(this,"_postMessageListener",void 0),G(this,"onIframeLoadedCallback",void 0),G(this,"onConfigCallback",void 0),G(this,"onEncryptionCallback",void 0),G(this,"onValidationCallback",void 0),G(this,"onFocusCallback",void 0),G(this,"onBinValueCallback",void 0),G(this,"onTouchstartCallback",void 0),G(this,"onShiftTabCallback",void 0),G(this,"onAutoCompleteCallback",void 0),G(this,"onKeyPressedCallback",void 0),this.sfConfig={}}};var fd=(t,e)=>Object.values(Ht).reduce((r,o)=>(o.includes(e)&&(r[o]=t.get(o)),r),{}),Xa=(t,e,r)=>{let o={...t},s=_d(r);return o.error=fd(e,s),o},Ja=(t,e)=>{let r=t;for(let[o,s]of Object.entries(e))if(s===t){r=o;break}return r?.toLowerCase().replace(/[_.\s]/g,"-")},_d=t=>{let e;switch(t){case I:e=At.CC_NUM;break;case x:e=At.CC_DAT;break;case k:e=At.CC_MTH;break;case A:e=At.CC_YR;break;case D:e=At.CC_CVC;break;case he:e=At.KCP_PWD}return e};var Qa=(t,e,r,o)=>{let s={...t},n={};switch(r){case"ach":case hr:break;default:if(o===D)n[ur]=e.get("creditCard.securityCode.contextualText.3digits"),n[mr]=e.get("creditCard.securityCode.contextualText.4digits");else{let i=`creditCard.${Tt[o]}.contextualText`,c=e.get(i);c!==i&&(n[o]=c)}}return Object.keys(n).length&&(s.contextualTexts=n),s};function ei(t,e,r,o){let s=["ach","giftcard"].includes(t)?t:"creditCard",n=r.get(`${s}.${e}.aria.iframeTitle`),i=r.get(`${s}.${Tt[e]}.label`),c=r.locale,d=Xa({iframeTitle:n,label:i},r,e);return o&&(d=Qa(d,r,t,e)),{...c&&{lang:c},[e]:d}}function ti(t,e,r){return t===hr?{[e]:r[Tt[e]]??""}:e===D?{[ur]:r.securityCodeThreeDigits??"",[mr]:r.securityCodeFourDigits??""}:{[e]:r[Tt[e]]??""}}var mo=class extends uo{init(e,r,o,s){let n=ei(this.sfConfig.txVariant,this.sfConfig.fieldType,e,s);this.sfConfig.iframeUIConfig.ariaConfig=n,this.sfConfig.iframeUIConfig.placeholders=ti(this.sfConfig.txVariant,this.sfConfig.fieldType,o);let i={src:r,title:n[this.sfConfig.fieldType].iframeTitle,policy:"origin"},c=Ga(i);this.holderEl.appendChild(c);let d=we(this.holderEl,".js-iframe");return d&&(this.iframeContentWindow=d.contentWindow,this.iframeOnLoadListener=this.iframeOnLoadListenerFn,Ke(d,"load",this.iframeOnLoadListener,!1)),this.iframeRef=d,this}iframeOnLoadListenerFn(){this.postMessageListener=this.postMessageListenerFn,Ke(window,"message",this.postMessageListener,!1);let e={...this.sfConfig,numKey:this.numKey};window._b$dl&&console.log("### SecuredField:::: onIframeLoaded:: created configObj=",e),se(e,this.iframeContentWindow,this.loadingContext),this.onIframeLoadedCallback()}postMessageListenerFn(e){if(!Ka(e,this.loadingContext,this.sfConfig.showWarnings))return;let r;try{r=JSON.parse(e.data)}catch{return Wa(e)?void(this.sfConfig.showWarnings&&lo("### SecuredField::postMessageListenerFn:: PARSE FAIL - WEBPACK")):Za(e)?void(this.sfConfig.showWarnings&&lo("### SecuredField::postMessageListenerFn:: PARSE FAIL - CHROMEVOX")):void(this.sfConfig.showWarnings&&lo("### SecuredField::postMessageListenerFn:: PARSE FAIL - UNKNOWN REASON: event.data=",e.data))}if(R(r,"action")&&R(r,"numKey"))if(this.numKey===r.numKey)switch(r.action){case"encryption":this.isValid=!0,this.onEncryptionCallback(r);break;case"config":window._b$dl&&console.log("### SecuredField::postMessageListenerFn:: configured - calling onConfigCallback",r.fieldType),this.onConfigCallback(r);break;case"focus":this.onFocusCallback(r);break;case"binValue":this.onBinValueCallback(r);break;case"touch":this.onTouchstartCallback(r);break;case"shifttab":this.onShiftTabCallback(r);break;case"autoComplete":this.onAutoCompleteCallback(r);break;case"enterKeyPressed":this.onKeyPressedCallback(r);break;default:this.isValid=!1,this.onValidationCallback(r)}else this.sfConfig.showWarnings&&be("WARNING SecuredField :: postMessage listener for iframe :: data mismatch! (Probably a message from an unrelated securedField)");else this.sfConfig.showWarnings&&be("WARNING SecuredField :: postMessage listener for iframe :: data mismatch!")}destroy(){ot(window,"message",this.postMessageListener,!1),ot(this.iframeRef,"load",this.iframeOnLoadListener,!1),this.iframeContentWindow=null,za(this.holderEl)}isOptionalOrHidden(){if(this.sfConfig.fieldType===x||this.sfConfig.fieldType===k||this.sfConfig.fieldType===A)switch(this.expiryDatePolicy){case Pt:return!0;case yr:return!this.hasError;default:return!1}if(this.sfConfig.fieldType===D)switch(this.cvcPolicy){case _r:return!0;case fr:return!this.hasError;default:return!1}return!1}onIframeLoaded(e){return this.onIframeLoadedCallback=e,this}onEncryption(e){return this.onEncryptionCallback=e,this}onValidation(e){return this.onValidationCallback=e,this}onConfig(e){return this.onConfigCallback=e,this}onFocus(e){return this.onFocusCallback=e,this}onBinValue(e){return this.onBinValueCallback=e,this}onTouchstart(e){return this.onTouchstartCallback=e,this}onShiftTab(e){return this.onShiftTabCallback=e,this}onAutoComplete(e){return this.onAutoCompleteCallback=e,this}onKeyPressed(e){return this.onKeyPressedCallback=e,this}get errorType(){return this._errorType}set errorType(e){this._errorType=e}get hasError(){return this._hasError}set hasError(e){this._hasError=e}get isValid(){if(this.sfConfig.fieldType===D)switch(this.cvcPolicy){case _r:return!0;case fr:return!this.hasError;default:return this._isValid}if(this.sfConfig.fieldType===x||this.sfConfig.fieldType===k||this.sfConfig.fieldType===A)switch(this.expiryDatePolicy){case Pt:return!0;case yr:return!this.hasError;default:return this._isValid}return this._isValid}set isValid(e){this._isValid=e}get cvcPolicy(){return this._cvcPolicy}set cvcPolicy(e){this.sfConfig.fieldType===D&&e!==this.cvcPolicy&&(this._cvcPolicy=e,this.hasError&&this.errorType==="isValidated"&&(this.hasError=!1))}get expiryDatePolicy(){return this._expiryDatePolicy}set expiryDatePolicy(e){this.sfConfig.fieldType!==x&&this.sfConfig.fieldType!==k&&this.sfConfig.fieldType!==A||e!==this.expiryDatePolicy&&(this._expiryDatePolicy=e,this.hasError&&this.errorType==="isValidated"&&(this.hasError=!1))}get iframeContentWindow(){return this._iframeContentWindow}set iframeContentWindow(e){this._iframeContentWindow=e}get isEncrypted(){return this._isEncrypted}set isEncrypted(e){this._isEncrypted=e}get numKey(){return this._numKey}set numKey(e){this._numKey=e}get iframeOnLoadListener(){return this._iframeOnLoadListener}set iframeOnLoadListener(e){this._iframeOnLoadListener=e.bind(this)}get postMessageListener(){return this._postMessageListener}set postMessageListener(e){this._postMessageListener=e.bind(this)}constructor(e,r){super();let o=Ma(["loadingContext","holderEl","iframeSrc","showContextualElement","placeholders"]).from(e);this.sfConfig={...o,iframeUIConfig:{...o.iframeUIConfig}};let{iframeSrc:s,placeholders:n,showContextualElement:i}=e;return this.loadingContext=e.loadingContext,this.holderEl=e.holderEl,this.isValid=!1,this.iframeContentWindow=null,this.numKey=qa(),this.isEncrypted=!1,this.hasError=!1,this.errorType="",this.cvcPolicy=e.cvcPolicy,this.expiryDatePolicy=e.expiryDatePolicy,this.init(r,s,n,i)}};function Ps(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ts="NETWORK_ERROR",yd="CANCEL",As="IMPLEMENTATION_ERROR",Er="API_ERROR",Sr="ERROR",gd="SCRIPT_ERROR",vd="SDK_ERROR",v=class t extends Error{constructor(e,r,o){super(r),Ps(this,"cause",void 0),Ps(this,"options",void 0),this.name=t.errorTypes[e],this.options=o||{},this.cause=this.options.cause}};Ps(v,"errorTypes",{NETWORK_ERROR:Ts,CANCEL:yd,IMPLEMENTATION_ERROR:As,API_ERROR:Er,ERROR:Sr,SCRIPT_ERROR:gd,SDK_ERROR:vd});function ri(){this.encryptedAttrName=ba;let t=po(this.props.rootNode,`[${this.encryptedAttrName}]`).filter(o=>{let s=br(o,this.encryptedAttrName),n=oo.includes(s);return n||console.warn(`WARNING: '${s}' is not a valid type for the '${this.encryptedAttrName}' attribute. A SecuredField will not be created for this element.`),n}),e=Me,r=Ie;return this.config.isCreditCardType?(this.isSingleBrandedCard=!1,this.securityCode="",this.createCardSecuredFields(t,e,r),t.length):(this.createNonCardSecuredFields(t),t.length)}async function oi(t){for(let e=0;e<t.length;e++){let r=t[e];await this.setupSecuredField(r).catch(o=>{window._b$dl&&console.log("Secured fields setup failure. e=",o)})}}async function si(t,e,r){let o=this.state.type;if(o==="card"&&this.config.cardGroupTypes.length===1&&(o=this.config.cardGroupTypes[0],this.state.type=o),this.isSingleBrandedCard=o!=="card",this.isSingleBrandedCard){let s=Yt.getCardByBrand(o);ge(s)?(e=s.cvcPolicy||Me,r=s.expiryDatePolicy||Ie,this.securityCode=s.securityCode):this.state.type="unrecognised-single-brand"}for(let s=0;s<t.length;s++){let n=t[s];window._b$dl&&console.log(`
|
|
5
|
+
About to set up securedField:`,n),await this.setupSecuredField(n,e,r).catch(i=>{window._b$dl&&console.log("Secured fields setup failure. e=",i)}),window._b$dl&&console.log("Finished setting up securedField:",n)}if(window._b$dl&&console.log("Finished setting up all securedFields"),this.isSingleBrandedCard){let s={type:this.state.type,rootNode:this.props.rootNode,brand:o,cvcPolicy:e,expiryDatePolicy:r,cvcText:this.securityCode};setTimeout(()=>{this.callbacks.onBrand(s)},0)}}function ni(t,e,r){return new Promise((o,s)=>{let n=br(t,this.encryptedAttrName);n===A&&(this.state.hasSeparateDateFields=!0);let i={fieldType:n,extraFieldData:br(t,Ea),uid:br(t,Sa),cvcPolicy:e,holderEl:t,expiryDatePolicy:r,txVariant:this.state.type,cardGroupTypes:this.config.cardGroupTypes,iframeUIConfig:this.config.iframeUIConfig,sfLogAtStart:this.config.sfLogAtStart,trimTrailingSeparator:this.config.trimTrailingSeparator,isCreditCardType:this.config.isCreditCardType,iframeSrc:this.config.iframeSrc,loadingContext:this.config.loadingContext,showWarnings:this.config.showWarnings,legacyInputMode:this.config.legacyInputMode,minimumExpiryDate:this.config.minimumExpiryDate,maskSecurityCode:this.props.maskSecurityCode,exposeExpiryDate:this.props.exposeExpiryDate,disableIOSArrowKeys:this.props.shouldDisableIOSArrowKeys,implementationType:this.props.implementationType,showContextualElement:this.props.showContextualElement,placeholders:this.props.placeholders},c=new mo(i,this.props.i18n).onIframeLoaded(()=>{if(this.state.iframeCount+=1,window._b$dl&&console.log("### createSecuredFields::onIframeLoaded:: this.state.iframeCount=",this.state.iframeCount),this.state.iframeCount>this.state.numIframes)throw this.destroySecuredFields(),new v("ERROR",`One or more securedFields has just loaded new content. This should never happen. securedFields have been removed.
|
|
6
|
+
iframe load count=${this.state.iframeCount}. Expected count:${this.state.numIframes}`);if(c.loadToConfigTimeout=setTimeout(()=>{s({type:i.fieldType,failReason:"sf took too long to config"})},Pa),this.state.iframeCount===this.state.originalNumIframes){let d={iframesLoaded:!0};this.callbacks.onLoad(d)}}).onConfig(d=>{this.handleIframeConfigFeedback(d),clearTimeout(c.loadToConfigTimeout),c.loadToConfigTimeout=null,o(d)}).onFocus(d=>{this.handleFocus(d)}).onBinValue(d=>{this.handleBinValue(d)}).onTouchstart(d=>{this.props.shouldDisableIOSArrowKeys&&(this.hasGenuineTouchEvents||d.hasGenuineTouchEvents)&&this.callbacks.onTouchstartIOS({fieldType:d.fieldType}),(d.hasGenuineTouchEvents||this.hasGenuineTouchEvents)&&this.postMessageToAllIframes({fieldType:d.fieldType,fieldClick:!0})}).onShiftTab(d=>{this.handleSFShiftTab(d.fieldType)}).onEncryption(d=>{this.handleEncryption(d)}).onValidation(d=>{this.handleValidation(d)}).onAutoComplete(d=>{this.processAutoComplete(d)}).onKeyPressed(d=>{let{numKey:p,...u}=d;this.callbacks.onKeyPressed(u)});this.state.securedFields[n]=c})}var Cd=typeof navigator<"u"&&function(){let t=navigator.userAgent,e=t.indexOf("MSIE ");if(e>0)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(t.indexOf("Trident/")>0){let o=t.indexOf("rv:");return parseInt(t.substring(o+3,t.indexOf(".",o)),10)}let r=t.indexOf("Edge/");return r>0&&parseInt(t.substring(r+5,t.indexOf(".",r)),10)}(),ke={__IS_IE:Cd,__IS_IOS:typeof navigator<"u"&&/iphone|ipod|ipad/i.test(navigator.userAgent),__IS_FIREFOX:typeof navigator<"u"&&/(firefox)/i.test(navigator.userAgent)};var jt={touchendListener:function(t){let e=t.target;if(e instanceof HTMLInputElement||HTMLTextAreaElement&&e instanceof HTMLTextAreaElement){let o=e.value,s="selectionStart"in(r=e)?r.selectionStart:0,n=!1;s===o.length&&(s-=1,n=!0),e.value=o;try{e.setSelectionRange&&(e.focus(),e.setSelectionRange(s,s),n&&(s+=1,setTimeout(()=>{e.setSelectionRange(s,s)},0)))}catch{}}else if(this.config.keypadFix){let o=this.props.rootNode,s=document.createElement("input");s.style.width="1px",s.style.height="1px",s.style.opacity="0",s.style.fontSize="18px",o.appendChild(s),s.focus(),o.removeChild(s)}var r;this.destroyTouchendListener(),this.state.registerFieldForIos=!1,this.postMessageToAllIframes({fieldType:"webInternalElement",fieldClick:!0})},touchstartListener:function(t){this.hasGenuineTouchEvents=!0;let e=t.target;if(e instanceof HTMLInputElement||e instanceof HTMLSpanElement){this.postMessageToAllIframes({fieldType:"webInternalElement",checkoutTouchEvent:!0});let r=e.getAttribute("name")??e.getAttribute("data-id");this.callbacks.onTouchstartIOS?.({fieldType:"webInternalElement",name:r})}},handleTouchend:function(){let t=we(document,"body");t.style.cursor="pointer",Ke(t,"touchend",this.touchendListener),this.state.registerFieldForIos=!0},destroyTouchendListener:function(){if(!ke.__IS_IOS)return!1;let t=we(document,"body");return t.style.cursor="auto",ot(t,"touchend",this.touchendListener),!0},destroyTouchstartListener:function(){return!!ke.__IS_IOS&&(ot(document,"touchstart",this.touchstartListener),!0)}};var st=(t,e,r)=>((o,s=!0)=>{let n=Array.prototype.slice.call(po(document,"*[data-cse], a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), object, embed, *[tabindex], *[contenteditable]")),i=[];n.forEach(d=>{let p=d.getAttribute("tabindex"),u=!p||parseInt(p,10)>=0,l=d.getBoundingClientRect(),h=l.width>0&&l.height>0;u&&h&&i.push(d)});let c=((d,p)=>{for(let u=0;u<d.length;u+=1)if(p(d[u]))return u;return-1})(i,d=>d===o||o.contains(d));return i[c+(s?-1:1)]})(we(e,`[data-cse=${t}]`),r),ai=t=>{t&&(t.focus(),t.blur(),t.focus())};function ii(t,e,r,o){let s,n;switch(t){case I:s=st(I,e);break;case x:case k:n=I;break;case A:n=k;break;case D:o===1?s=st(D,e):n=r?A:x}return{fieldToFocus:n,additionalField:s}}function li(t,e){let r,o;switch(t){case I:r=st(I,e);break;case D:o=I}return{fieldToFocus:o,additionalField:r}}function ci(t,e,r){let o,s;switch(t){case I:o=st(I,e);break;case x:case k:s=I;break;case A:s=k;break;case D:s=r?A:x;break;case he:o=st(t,e)}return{fieldToFocus:s,additionalField:o}}var Ds={handleShiftTab:function(t){let e;this.state.type==="giftcard"?e=li(t,this.props.rootNode):e=this.state.isKCP?ci(t,this.props.rootNode,this.state.hasSeparateDateFields):ii(t,this.props.rootNode,this.state.hasSeparateDateFields,this.state.numIframes);let r=e.fieldToFocus,o=e.additionalField;r?this.setFocusOnFrame(r,!1):o&&ai(o)},handleSFShiftTab:function(t){(ke.__IS_FIREFOX||ke.__IS_IE&&ke.__IS_IE<=11)&&this.handleShiftTab(t)}};function di(t){if(R(this.state.securedFields,I)){let e={txVariant:this.state.type,...t,fieldType:I,numKey:this.state.securedFields[I].numKey};se(e,ae(this.state,I),this.config.loadingContext)}}function pi(t){(R(this.state.securedFields,k)&&R(this.state.securedFields,A)?[k,A]:[x]).forEach(e=>{let r={txVariant:this.state.type,...t,fieldType:e,numKey:this.state.securedFields[e].numKey};se(r,ae(this.state,e),this.config.loadingContext)})}function ui(t,e){let r=this.state.type==="card";if(!t||!Object.keys(t).length)return r?(this.sendBrandToCardSF({brand:"reset"}),this.sendExpiryDatePolicyToSF({expiryDatePolicy:Ie})):e&&this.processBrand({...e,fieldType:I}),void(this.state.type==="card"&&R(this.state.securedFields,x)&&(this.state.securedFields[x].expiryDatePolicy=Ie));let o=t.supportedBrands[0],s=o.brand,n=o.expiryDatePolicy??(o.showExpiryDate===!0?Ie:Pt),i={brand:s,cvcPolicy:o.cvcPolicy,expiryDatePolicy:n,cvcText:"Security code",showSocialSecurityNumber:o.showSocialSecurityNumber??!1,fieldType:I};if(this.processBrand(i),r){let c={brand:s,enableLuhnCheck:t.supportedBrands[0].enableLuhnCheck!==!1,...o?.panLength&&!t.isDualBrandSelection&&{panLength:o?.panLength}};this.sendBrandToCardSF(c),this.sendExpiryDatePolicyToSF({expiryDatePolicy:n})}R(this.state.securedFields,D)&&(this.state.securedFields[D].cvcPolicy=o.cvcPolicy),R(this.state.securedFields,x)?this.state.securedFields[x].expiryDatePolicy=n:R(this.state.securedFields,k)&&R(this.state.securedFields,A)&&(this.state.securedFields[k].expiryDatePolicy=n,this.state.securedFields[A].expiryDatePolicy=n),this.validateForm()}function mi({csfState:t,csfConfig:e},r,o){if(!R(t.securedFields,r))return;let s={txVariant:t.type,fieldType:r,focus:!0,numKey:t.securedFields[r].numKey};se(s,ae(t,r),e.loadingContext)}function hi({csfState:t,csfConfig:e},r){let o=Object.keys(r||{});return o.length?(Object.keys(t.securedFields).forEach(s=>{let n={txVariant:t.type,fieldType:s,numKey:t.securedFields[s].numKey};o.forEach(i=>{n[i]=r[i]}),se(n,ae(t,s),e.loadingContext)}),!0):!1}function fi({csfState:t,csfConfig:e,csfProps:r,csfCallbacks:o},s){if(s.fieldType===I){let c={brand:s.brand,cvcPolicy:s.cvcPolicy,expiryDatePolicy:s.expiryDatePolicy,showSocialSecurityNumber:s.showSocialSecurityNumber},d=(n=c,i=t.brand,!Rs(n,i));if(!d)return null;let p=t.type==="card"||t.type==="bcmc";if(p&&d&&(t.brand=c,R(t.securedFields,D))){let l={txVariant:t.type,brand:c.brand,fieldType:D,cvcPolicy:s.cvcPolicy,numKey:t.securedFields[D].numKey};se(l,ae(t,D),e.loadingContext)}let u=p?Dt(["brand","cvcPolicy","cvcText","expiryDatePolicy","showSocialSecurityNumber"]).from(s):null;if(u&&u.brand){let l=u;l.type=t.type,l.rootNode=r.rootNode,o.onBrand(l)}return!0}var n,i;return!1}function _i({csfState:t,csfConfig:e,csfCallbacks:r},o){if(o.name==="cc-name"){let s={...o};delete s.numKey;let n=s;return r.onAutoComplete(n),!0}if(o.name==="cc-exp"){let s=o.value.replace(/[^0-9]/gi,"/").split("/");if(s.length!==2)return!1;s[0].length===1&&(s[0]=`0${s[0]}`);let n=s[0],i=s[1];if(!((i?.length===4||i?.length===2)&&!isNaN(parseInt(i))))return!1;let c=i.slice(-2),d=`${n}/${c}`;if(R(t.securedFields,x)){let p={txVariant:t.type,fieldType:x,autoComplete:d,numKey:t.securedFields[x].numKey};return se(p,ae(t,x),e.loadingContext),!0}if(R(t.securedFields,k)){let p={txVariant:t.type,fieldType:k,autoComplete:n,numKey:t.securedFields[k].numKey};se(p,ae(t,k),e.loadingContext)}return R(t.securedFields,A)&&setTimeout(()=>{let p={txVariant:t.type,fieldType:A,autoComplete:c,numKey:t.securedFields[A].numKey};se(p,ae(t,A),e.loadingContext)},0),!0}return!1}function yi({csfState:t,csfProps:e,csfCallbacks:r},o,s){let n={...s};delete n.numKey,n.rootNode=e.rootNode,n.type=t.type;let i=n.fieldType;n.focus?t.currentFocusObject!==i&&(t.currentFocusObject=i,ke.__IS_IOS&&!t.registerFieldForIos&&o()):t.currentFocusObject===i&&(t.currentFocusObject=null);let c=n;c.currentFocusObject=t.currentFocusObject,r.onFocus(c)}function gi({csfState:t,csfCallbacks:e},r,o){if(t.iframeConfigCount+=1,window._b$dl&&console.log("### handleIframeConfigFeedback::csfState.iframeConfigCount:: ",t.iframeConfigCount,"who=",o.fieldType),t.isConfigured){let s={additionalIframeConfigured:!0,fieldType:o.fieldType,type:t.type};e.onAdditionalSFConfig(s)}else if(t.iframeConfigCount===t.originalNumIframes)return r(),!0;return!1}function vi({csfState:t,csfConfig:e,csfProps:r,csfCallbacks:o},s){t.isConfigured=!0;let n={iframesConfigured:!0,type:t.type,rootNode:r.rootNode};if(o.onConfigSuccess(n),t.numIframes===1&&e.isCreditCardType){if(t.type==="card")return Cr("ERROR: Payment method with a single secured field - but 'brands' has not been set to an array containing the specific card brand"),!1;let i=Yt.getCardByBrand(t.type);i&&(i.cvcPolicy??Me)!==Me&&s()}return!0}function Ci({csfState:t,csfProps:e,csfCallbacks:r}){let o=(i=>{let c=Object.keys(i);for(let d=0,p=c.length;d<p;d+=1)if(!i[c[d]].isValid)return!1;return!0})(t.securedFields),s=o!==t.allValid;if(t.allValid=o,!o&&!s)return;let n={allValid:o,type:t.type,rootNode:e.rootNode};r.onAllValid(n)}function bi({csfState:t,csfCallbacks:e},r){let{binValue:o,encryptedBin:s,uuid:n}=r,i={binValue:o,type:t.type};s&&(i.encryptedBin=s,i.uuid=n),e.onBinValue(i)}function Ei(){this.postMessageToAllIframes({destroy:!0}),Object.keys(this.state.securedFields).forEach(t=>{let e=this.state.securedFields[t];e&&e.destroy(),this.state.securedFields[t]=null}),this.destroyTouchendListener(),this.destroyTouchstartListener(),this.state.securedFields={}}var Rr=(t="You cannot use secured fields")=>{be(`${t} - they are not yet configured. Use the 'onConfigSuccess' callback to know when this has happened.`)},ho=class extends io{init(){this.configHandler(this.props),this.callbacksHandler(this.props.callbacks);let e=this.createSecuredFields();this.state.numIframes=this.state.originalNumIframes=e,this.state.isKCP=!!this.props.isKCP,ke.__IS_IOS&&this.props.shouldDisableIOSArrowKeys&&(this.hasGenuineTouchEvents=!1,Ke(document,"touchstart",this.touchstartListener))}createReturnObject(){return{updateStyles:e=>{this.state.isConfigured?this.postMessageToAllIframes({styleObject:e}):be("You cannot update the secured fields styling - they are not yet configured. Use the 'onConfigSuccess' callback to know when this has happened.")},setFocusOnFrame:e=>{this.state.isConfigured?this.setFocusOnFrame(e):Rr("You cannot set focus on any secured field")},isValidated:(e,r)=>{if(this.state.isConfigured){if(R(this.state.securedFields,e)){this.state.securedFields[e].hasError=!0,this.state.securedFields[e].errorType===""&&(this.state.securedFields[e].errorType="isValidated");let o={txVariant:this.state.type,fieldType:e,externalValidation:!0,code:r,numKey:this.state.securedFields[e].numKey};se(o,ae(this.state,e),this.config.loadingContext)}}else Rr("You cannot set validated on any secured field")},hasUnsupportedCard:(e,r)=>{if(this.state.isConfigured){if(R(this.state.securedFields,e)){this.state.securedFields[e].hasError=!!r,this.state.securedFields[e].errorType=r;let o={txVariant:this.state.type,fieldType:e,unsupportedCard:!!r,code:r,numKey:this.state.securedFields[e].numKey};se(o,ae(this.state,e),this.config.loadingContext)}}else Rr("You cannot set hasUnsupportedCard on any secured field")},destroy:()=>{this.state.isConfigured?this.destroySecuredFields():Rr("You cannot destroy secured fields")},brandsFromBinLookup:(e,r)=>{if(!this.config.isCreditCardType)return null;this.state.isConfigured?this.handleBrandFromBinLookup(e,r):Rr("You cannot set pass brands to secured fields")},addSecuredField:e=>{let r=we(this.props.rootNode,`[data-cse="${e}"]`);r&&(this.state.numIframes+=1,this.setupSecuredField(r))},removeSecuredField:e=>{if(this.state.securedFields[e]){this.state.securedFields[e].destroy(),delete this.state.securedFields[e],this.state.numIframes-=1,this.state.iframeCount-=1;let r={additionalIframeRemoved:!0,fieldType:e,type:this.state.type};this.callbacks.onAdditionalSFRemoved(r)}},setKCPStatus:e=>{this.state.isKCP=e},sfIsOptionalOrHidden:e=>this.state.securedFields[e].isOptionalOrHidden()}}constructor(e){super(e),this.state={type:this.props.type,brand:this.props.type!=="card"?{brand:this.props.type,cvcPolicy:"required"}:{brand:null,cvcPolicy:"required"},allValid:void 0,numIframes:0,originalNumIframes:0,iframeCount:0,iframeConfigCount:0,isConfigured:!1,hasSeparateDateFields:!1,currentFocusObject:null,registerFieldForIos:!1,securedFields:{},isKCP:!1};let r={csfState:this.state,csfConfig:this.config,csfProps:this.props,csfCallbacks:this.callbacks};this.configHandler=Ua,this.callbacksHandler=Ba,this.validateForm=Le(Ci,r),this.isConfigured=Le(vi,r,this.validateForm),this.handleIframeConfigFeedback=Le(gi,r,this.isConfigured),this.processBrand=Le(fi,r),this.handleValidation=ja,this.handleEncryption=$a,this.createSecuredFields=ri,this.createNonCardSecuredFields=oi,this.createCardSecuredFields=si,this.setupSecuredField=ni,this.postMessageToAllIframes=Le(hi,r),this.handleIOSTouchEvents=jt.handleTouchend.bind(this),this.touchendListener=jt.touchendListener.bind(this),this.destroyTouchendListener=jt.destroyTouchendListener.bind(this),this.touchstartListener=jt.touchstartListener.bind(this),this.destroyTouchstartListener=jt.destroyTouchstartListener.bind(this),this.setFocusOnFrame=Le(mi,r),this.handleFocus=Le(yi,r,this.handleIOSTouchEvents),this.handleSFShiftTab=Ds.handleSFShiftTab,this.handleShiftTab=Ds.handleShiftTab,this.destroySecuredFields=Ei,this.processAutoComplete=Le(_i,r),this.handleBinValue=Le(bi,r),this.handleBrandFromBinLookup=ui,this.sendBrandToCardSF=di,this.sendExpiryDatePolicyToSF=pi,this.init()}};var Si=t=>{if(!t)throw new Error("No securedFields configuration object defined");let e={...t};try{let o=Yt.isGenericCardType(e.type);e.type=o?"card":e.type}catch{e.type="card"}if(!R(e,"rootNode"))return Cr('ERROR: SecuredFields configuration object is missing a "rootNode" property');if(Fa(e.clientKey))return be('WARNING: AdyenCheckout configuration object is missing a "clientKey" property.');let r=bd(e.rootNode);return r?(e.rootNode=r,new ho(e).createReturnObject()):Cr(`ERROR: SecuredFields cannot find a valid rootNode element for ${e.type}`)},bd=t=>{let e;return typeof t=="object"&&(e=t),typeof t!="string"||(e=we(document,t),e)?e:null};var Ri=t=>t.replace(/([a-z])([A-Z])/g,"$1_$2").toLowerCase();var fo=(t,e)=>{let r=t==="card"?"nocard":t||"nocard",o={type:r,extension:"svg"};return e.getImage(o)(r)},Pi=t=>{let e=Ri(t);return oo.includes(t)&&(e=e.substring(_a.length+1)),e};function _o(t,e,r,o){return(e!==so&&e!==no||r[t]!==0)&&o[t]}var Ee={handleFocus:function(t){this.numCharsInField[t.fieldType]=t.numChars,this.props.onFocus(t)},handleOnAllValid:function(t){return!this.state.detectedUnsupportedBrands&&(this.setState({isSfpValid:t.allValid},()=>{this.props.onChange(this.state,{event:"handleOnAllValid"}),this.props.onAllValid(t)}),!0)},handleOnAutoComplete:function(t){this.setState({autoCompleteName:t.value},()=>{this.props.onChange(this.state,{event:"handleOnAutoComplete",fieldType:t.fieldType}),this.setState({autoCompleteName:null})}),this.props.onAutoComplete(t)},handleOnFieldValid:function(t){return(!this.state.detectedUnsupportedBrands||t.fieldType!==I)&&(this.setState(e=>({data:{...e.data,[t.encryptedFieldName]:t.blob},valid:{...e.valid,[t.encryptedFieldName]:t.valid},errors:{...e.errors,[t.fieldType]:e.errors[t.fieldType]??!1}}),()=>{this.props.onChange(this.state,{event:"handleOnFieldValid",fieldType:t.fieldType}),this.props.onFieldValid(t)}),!0)},handleOnLoad:function(t){clearTimeout(this.csfLoadFailTimeout),this.csfLoadFailTimeout=null,this.props.onLoad(t),this.csfConfigFailTimeout=setTimeout(()=>{this.state.status!=="ready"&&(this.setState({status:"csfConfigFailure"}),this.props.onError(new v("ERROR","secured fields have failed to configure")))},this.csfConfigFailTimeoutMS)},handleOnConfigSuccess:function(t){clearTimeout(this.csfConfigFailTimeout),this.csfConfigFailTimeout=null,this.setState({status:"ready"},()=>{this.props.onConfigSuccess(t)})},handleOnBrand:function(t){this.setState(e=>{let r=_o(D,t.cvcPolicy,this.numCharsInField,e.errors),o=this.numDateFields===1?_o(x,t.expiryDatePolicy,this.numCharsInField,e.errors):null,s=this.numDateFields===2?_o(k,t.expiryDatePolicy,this.numCharsInField,e.errors):null,n=this.numDateFields===2?_o(A,t.expiryDatePolicy,this.numCharsInField,e.errors):null;return{brand:t.brand,cvcPolicy:t.cvcPolicy??Me,showSocialSecurityNumber:t.showSocialSecurityNumber,errors:{...e.errors,...ge(r)&&{[D]:r},...ge(o)&&{[x]:o},...ge(s)&&{[k]:s},...ge(n)&&{[A]:n}},expiryDatePolicy:t.expiryDatePolicy??Ie}},()=>{this.props.onChange(this.state,{event:"handleOnBrand"});let e=this.props.brandsConfiguration[t.brand]?.icon??fo(t.brand,this.props.resources);this.props.onBrand({...t,brandImageUrl:e})})},handleOnError:function(t,e=null){let r=t.error;return this.setState(o=>({errors:{...o.errors,[t.fieldType]:r||!1},...e&&{data:{...o.data,[I]:void 0}},...e&&{valid:{...o.valid,[I]:!1}},...e&&{isSfpValid:!1}}),()=>{this.props.onChange(this.state,{event:"handleOnError",fieldType:t.fieldType})}),!0},handleOnNoDataRequired:function(){this.setState({status:"ready"},()=>this.props.onChange({isSfpValid:!0}))},handleOnTouchstartIOS:function(t){this.props.disableIOSArrowKeys?.(t)},handleKeyPressed:function(t){if(t.action==="enterKeyPressed"){let e=new KeyboardEvent("keypress",{bubbles:!0,cancelable:!0,key:"Enter",code:"Enter"});this.props.handleKeyPress?.(e)}}};var Ti={type:"card",keypadFix:!0,rootNode:null,loadingContext:null,brands:[],showWarnings:!1,autoFocus:!0,trimTrailingSeparator:!0,onChange:()=>{},onLoad:()=>{},onConfigSuccess:()=>{},onAllValid:()=>{},onFieldValid:()=>{},onBrand:()=>{},onError:()=>{},onBinValue:()=>{},onFocus:()=>{},onAutoComplete:()=>{},handleKeyPress:()=>{},styles:{}};function Z(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Pr=class extends j{componentDidMount(){this.props.rootNode&&this.setRootNode(this.props.rootNode);let e=xa(this.rootNode),r=e.reduce(wa,{});this.setState({valid:r}),e.forEach(o=>{this.numCharsInField[o]=0}),this.numDateFields=e.filter(o=>o.match(/Expiry/)).length,e.length?(this.destroy(),this.initializeCSF(this.rootNode)):this.handleOnNoDataRequired()}componentDidUpdate(){this.checkForKCPFields(),this.props.onStateUpdate?.(this.state)}componentWillUnmount(){this.csf=null,clearTimeout(this.csfLoadFailTimeout),clearTimeout(this.csfConfigFailTimeout)}initializeCSF(e){let r=this.props.loadingContext,o={rootNode:e,type:this.props.type,clientKey:this.props.clientKey,cardGroupTypes:this.props.brands,autoFocus:this.props.autoFocus,trimTrailingSeparator:this.props.trimTrailingSeparator,loadingContext:r,keypadFix:this.props.keypadFix,showWarnings:this.props.showWarnings,iframeUIConfig:{sfStyles:this.props.styles},i18n:this.props.i18n,callbacks:{onLoad:this.handleOnLoad,onConfigSuccess:this.handleOnConfigSuccess,onFieldValid:this.handleOnFieldValid,onAllValid:this.handleOnAllValid,onBrand:this.handleOnBrand,onError:this.handleOnError,onFocus:this.handleFocus,onBinValue:this.props.onBinValue,onAutoComplete:this.handleOnAutoComplete,onAdditionalSFConfig:this.props.onAdditionalSFConfig,onAdditionalSFRemoved:this.props.onAdditionalSFRemoved,onTouchstartIOS:this.handleOnTouchstartIOS,onKeyPressed:this.handleKeyPressed},isKCP:this.state.hasKoreanFields,legacyInputMode:this.props.legacyInputMode,minimumExpiryDate:this.props.minimumExpiryDate,implementationType:this.props.implementationType||"components",forceCompat:this.props.forceCompat,maskSecurityCode:this.props.maskSecurityCode,exposeExpiryDate:this.props.exposeExpiryDate,shouldDisableIOSArrowKeys:!!this.props.disableIOSArrowKeys,placeholders:this.props.placeholders??{},showContextualElement:this.props.showContextualElement};this.csf=Si(o),this.csfLoadFailTimeout=setTimeout(()=>{this.state.status!=="ready"&&(this.setState({status:"csfLoadFailure"}),this.props.onError(new v("ERROR","secured field iframes have failed to load")))},this.csfLoadFailTimeoutMS)}checkForKCPFields(){let e=!1;if(this.props.koreanAuthenticationRequired&&(e=this.issuingCountryCode?this.issuingCountryCode==="kr":this.props.countryCode==="kr"),this.state.hasKoreanFields&&!e){let r=o=>({data:{...o.data,[he]:void 0},valid:{...o.valid,[he]:!1},errors:{...o.errors,[he]:!1},hasKoreanFields:!1});this.setState(r,()=>{this.props.onChange(this.state)}),this.csf.removeSecuredField(he),this.csf.setKCPStatus(!1)}if(!this.state.hasKoreanFields&&e){let r=o=>({valid:{...o.valid,[he]:!1},hasKoreanFields:!0,isSfpValid:!1});this.setState(r,()=>{this.props.onChange(this.state)}),this.csf.addSecuredField(he),this.csf.setKCPStatus(!0)}}getChildContext(){return{i18n:this.props.i18n}}handleUnsupportedCard(e){let r=!!e.error;return r&&this.setState({detectedUnsupportedBrands:e.detectedBrands}),e.rootNode=this.rootNode,this.handleOnError(e,r),this.csf&&this.csf.hasUnsupportedCard(I,e.error),r}setFocusOn(e){this.csf&&this.csf.setFocusOnFrame(e)}updateStyles(e){this.csf&&this.csf.updateStyles(e)}sfIsOptionalOrHidden(e){return this.csf.sfIsOptionalOrHidden(e)}destroy(){this.csf&&this.csf.destroy()}showValidation(){let{numDateFields:e,state:r}=this;Object.keys(r.valid).reduce(ka(e,r),[]).forEach(o=>{let s=Na(o,this.rootNode,r);this.handleOnError(s,!!r.detectedUnsupportedBrands),this.csf&&this.csf.isValidated&&this.csf.isValidated(o,s.error)})}mapErrorsToValidationRuleResult(){return Object.keys(this.state.errors).reduce((e,r)=>{let o=this.state.errors[r];return e[r]=o?{isValid:!1,errorMessage:Ja(o,Ht),errorI18n:this.props.i18n.get(o),error:o,rootNode:this.rootNode,...this.state.detectedUnsupportedBrands&&{detectedBrands:this.state.detectedUnsupportedBrands}}:null,e},{})}processBinLookupResponse(e,r){if(this.state.detectedUnsupportedBrands&&(this.setState(n=>({errors:{...n.errors,[I]:!1},detectedUnsupportedBrands:null})),this.csf&&e)){let n={type:"card",fieldType:"encryptedCardNumber",error:""};this.handleUnsupportedCard(n)}this.issuingCountryCode=e?.issuingCountryCode?.toLowerCase();let o=r?.brand,s=o&&va.includes(r.brand);s&&this.setState(r,()=>{this.props.onChange(this.state)}),this.csf&&this.csf.brandsFromBinLookup(e,s?r:null)}render(e,r){return e.render({setRootNode:this.setRootNode,setFocusOn:this.setFocusOn},r)}constructor(e){super(e),Z(this,"csfLoadFailTimeout",void 0),Z(this,"csfLoadFailTimeoutMS",void 0),Z(this,"csfConfigFailTimeout",void 0),Z(this,"csfConfigFailTimeoutMS",void 0),Z(this,"numCharsInField",void 0),Z(this,"rootNode",void 0),Z(this,"numDateFields",void 0),Z(this,"csf",void 0),Z(this,"handleOnLoad",void 0),Z(this,"handleOnConfigSuccess",void 0),Z(this,"handleOnFieldValid",void 0),Z(this,"handleOnAllValid",void 0),Z(this,"handleOnBrand",void 0),Z(this,"handleFocus",void 0),Z(this,"handleOnError",void 0),Z(this,"handleOnAutoComplete",void 0),Z(this,"handleOnNoDataRequired",void 0),Z(this,"handleOnTouchstartIOS",void 0),Z(this,"handleKeyPressed",void 0),Z(this,"state",void 0),Z(this,"props",void 0),Z(this,"issuingCountryCode",void 0),Z(this,"setRootNode",o=>{this.rootNode=o});let r={status:"loading",brand:e.type,errors:{},valid:{},data:{},cvcPolicy:Me,expiryDatePolicy:Ie,isSfpValid:!1,hasKoreanFields:e.hasKoreanFields};this.state=r,this.csfLoadFailTimeout=null,this.csfLoadFailTimeoutMS=3e4,this.csfConfigFailTimeout=null,this.csfConfigFailTimeoutMS=15e3,this.numCharsInField={},this.handleOnLoad=Ee.handleOnLoad.bind(this),this.handleOnConfigSuccess=Ee.handleOnConfigSuccess.bind(this),this.handleOnFieldValid=Ee.handleOnFieldValid.bind(this),this.handleOnAllValid=Ee.handleOnAllValid.bind(this),this.handleOnBrand=Ee.handleOnBrand.bind(this),this.handleFocus=Ee.handleFocus.bind(this),this.handleOnError=Ee.handleOnError.bind(this),this.handleOnNoDataRequired=Ee.handleOnNoDataRequired.bind(this),this.handleOnAutoComplete=Ee.handleOnAutoComplete.bind(this),this.handleOnTouchstartIOS=Ee.handleOnTouchstartIOS.bind(this),this.handleKeyPressed=Ee.handleKeyPressed.bind(this),this.processBinLookupResponse=this.processBinLookupResponse.bind(this),this.setFocusOn=this.setFocusOn.bind(this),this.updateStyles=this.updateStyles.bind(this),this.handleUnsupportedCard=this.handleUnsupportedCard.bind(this),this.showValidation=this.showValidation.bind(this),this.destroy=this.destroy.bind(this)}};Z(Pr,"defaultProps",Ti);function Ai(t){let[e,r]=t;return{dualBrandSelectElements:[{id:e.brand,brandObject:e},{id:r.brand,brandObject:r}],selectedBrandValue:e.brand,leadBrand:e}}var Ed=(t,e)=>t.reduce((r,o)=>r||e.includes(o.brand),!1),Di=t=>t.map(e=>({...e})),Sd=(t,e="mc",r="visa")=>{let o=Di(t);return o[0].brand!==e&&o[0].brand!==r&&o.reverse(),o.length=1,o};function Ii(t,e,r,o={}){let{type:s,cvcPolicy:n}=t,{sfp:i}=e,{dualBrandSelectElements:c,setDualBrandSelectElements:d,setSelectedBrandValue:p,issuingCountryCode:u,setIssuingCountryCode:l}=r;return{processBinLookup:(h,m)=>{let y=h?.issuingCountryCode?h.issuingCountryCode.toLowerCase():null;if(l(y),!h||!Object.keys(h).length){d([]),p("");let b=m&&s!=="card"?s:null;return i.current.processBinLookupResponse(h,{brand:b,cvcPolicy:n}),void(o.current=0)}if(h.supportedBrands?.length){let b=Ed(h.supportedBrands,Ra),C=b?Sd(h.supportedBrands):Di(h.supportedBrands);if(C.length>1){let _=Ai(C);d(_.dualBrandSelectElements),p(_.selectedBrandValue),i.current.processBinLookupResponse({issuingCountryCode:h.issuingCountryCode,supportedBrands:[_.leadBrand]}),_.leadBrand.panLength>0&&(o.current=_.leadBrand.panLength)}else d([]),p(""),b||p(C[0].brand),i.current.processBinLookupResponse({issuingCountryCode:h.issuingCountryCode,supportedBrands:C}),C[0].panLength>0&&(o.current=C[0].panLength)}},handleDualBrandSelection:h=>{let m=h;if(h instanceof Event){let b=h.target;m=b.getAttribute("data-value")||b.getAttribute("value")}let y=[];m&&(y=c.reduce((b,C)=>(C.brandObject.brand===m&&b.push(C.brandObject),b),[]),y.length&&(p(m),i.current.processBinLookupResponse({issuingCountryCode:u,supportedBrands:y,isDualBrandSelection:!0})))}}}var xi=ra(void 0),$t=({i18n:t,loadingContext:e,resources:r,children:o})=>(ze(()=>{t&&e&&r||console.warn(`CoreProvider - WARNING core provider is missing:${t?"":"i18n"} ${e?"":"loadingContext"} ${r?"":"resources"}`)},[t,e,r]),f(xi.Provider,{value:{i18n:t,loadingContext:e,resources:r}},_s(o))),nt=()=>{let t=ma(xi);if(t===void 0)throw new Error('"useCoreContext" must be used within a CoreProvider');return t};function wi(){let{resources:t}=nt();return ua(e=>t?.getImage(e),[])}var yo="threeDS2Fingerprint",It="3DS2Fingerprint_Error",go="callSubmit3DS2Fingerprint_Response",vo="threeDS2Challenge",Se="3DS2Challenge_Error",Re="threeDS2",at="3DS2",We='Missing "token" property from threeDS2 action',Co="02";var xt="timeout",ki={result:{transStatus:"U"},type:"challengeResult",errorCode:xt},Ni={result:{threeDSCompInd:"N"},type:"fingerPrintResult",errorCode:xt},Is={"01":["250px","400px"],"02":["390px","400px"],"03":["500px","600px"],"04":["600px","400px"],"05":["100%","100%"]};var zt=(t,e=!1)=>{let r;try{r=new URL(t)}catch{return!1}return e&&r.protocol==="http:"||r.protocol==="https:"};function Oi(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var xs={exports:{}};var Fi;function Mi(){return Fi||(Fi=1,t=xs,function(){var e={}.hasOwnProperty;function r(){for(var n="",i=0;i<arguments.length;i++){var c=arguments[i];c&&(n=s(n,o(c)))}return n}function o(n){if(typeof n=="string"||typeof n=="number")return n;if(typeof n!="object")return"";if(Array.isArray(n))return r.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var i="";for(var c in n)e.call(n,c)&&n[c]&&(i=s(i,c));return i}function s(n,i){return i?n?n+" "+i:n+i:n}t.exports?(r.default=r,t.exports=r):window.classNames=r}()),xs.exports;var t}var Ue=Oi(Mi());var wt=({inline:t=!1,size:e="large"})=>f("div",{"data-testid":"spinner",className:"adyen-checkout__spinner__wrapper "+(t?"adyen-checkout__spinner__wrapper--inline":"")},f("div",{className:`adyen-checkout__spinner adyen-checkout__spinner--${e}`}));function Gt(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=16*Math.random()|0;return(t=="x"?e:3&e|8).toString(16)})}function Li(t){let{backgroundUrl:e="",className:r="",classNameModifiers:o=[],src:s="",alt:n="",showOnError:i=!1}=t,[c,d]=ye(!1),p=rt(null),u=()=>{d(!0)},l=Ue([r],"adyen-checkout__image",{"adyen-checkout__image--loaded":c},...o.map(h=>`adyen-checkout__image--${h}`));return ze(()=>{let h=e?new Image:p.current;h.src=e||s,h.onload=u,d(!!h.complete)},[]),e?f("div",{"data-testid":"background",style:{backgroundUrl:e},...t,className:l}):f("img",{...t,alt:n,ref:p,className:l,onError:()=>{d(i)}})}function ks(t){let e=t.replace("_","-"),r=new RegExp("([a-z]{2})([-])([A-Z]{2})");if(r.test(e))return e;let[o,s]=e.split("-");if(o.length!==2)throw new v("IMPLEMENTATION_ERROR",`Locale '${t}' does not match the expected format`);if(!s)return o.toLowerCase();let n=[o.toLowerCase(),s.toUpperCase()].join("-");if(r.test(n))return n;throw new v("IMPLEMENTATION_ERROR",`Locale '${t}' does not match the expected format`)}function Ui(t={}){return Object.keys(t).reduce((e,r)=>(e[ks(r)]=t[r],e),{})}var ws=(t,e)=>t.replace(/%{(\w+)}/g,(r,o)=>e[o]||""),Bi=(t,e,r={values:{},count:0})=>{let o=`${e}__plural`,s=n=>`${e}__${n}`;return Object.prototype.hasOwnProperty.call(t,s(r.count))?ws(t[s(r.count)],r.values):Object.prototype.hasOwnProperty.call(t,o)&&r.count>1?ws(t[o],r.values):Object.prototype.hasOwnProperty.call(t,e)?ws(t[e],r.values):null};var Vi="https://checkoutshopper-live.adyen.com/checkoutshopper/",Hi=["amount","secondaryAmount","countryCode","environment","_environmentUrls","loadingContext","i18n","modules","order","session","clientKey","showPayButton","redirectFromTopWhenInIframe","onPaymentCompleted","onPaymentFailed","beforeRedirect","beforeSubmit","onSubmit","onActionHandled","onAdditionalDetails","onChange","onEnterKeyPressed","onError","onBalanceCheck","onOrderCancel","onOrderRequest","onOrderUpdated","onPaymentMethodsRequest"];function Yi(t,e){let{headers:r=[],errorLevel:o="warn",errorCode:s,loadingContext:n=Vi,method:i="GET",path:c,timeout:d=6e4}=t,p={method:i,mode:"cors",cache:"default",credentials:"same-origin",headers:{Accept:"application/json, text/plain, */*","Content-Type":i==="POST"?"application/json":"text/plain",...r},redirect:"follow",referrerPolicy:"no-referrer-when-downgrade",...AbortSignal?.timeout&&{signal:AbortSignal?.timeout(d)},...e&&{body:JSON.stringify(e)}},u=`${n}${c}`;return fetch(u,p).then(async l=>{let h=await l.json();if(l.ok)return h;if(function(m){return m&&m.errorCode&&m.errorType&&m.message&&m.status}(h))return void Ns({message:h.message,level:o,cause:h,code:s});Ns({message:t.errorMessage||`Service at ${u} is not available`,level:o,cause:h,code:s})}).catch(l=>{if(l instanceof v)throw l;Ns({message:t.errorMessage||`Call to ${u} failed. Error= ${l}`,level:o,cause:l,code:s})})}function Ns({message:t,level:e,cause:r,code:o}){switch(e){case"silent":break;case"info":case"warn":case"error":console[e](t);break;default:throw new v("NETWORK_ERROR",t,{cause:r,code:o})}}function Os(t,e){return Yi({...t,method:"GET"},e)}function J(t,e){return Yi({...t,method:"POST"},e)}var ji=(t,e=300)=>{let r;return function(...o){clearTimeout(r),r=setTimeout(()=>t.apply(this,o),e)}};function bo(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Tr=class extends j{render(){let{classNameModifiers:e=[],disabled:r,href:o,icon:s,inline:n,label:i,ariaLabel:c,status:d,variant:p,buttonRef:u}=this.props,{completed:l}=this.state,{i18n:h}=nt(),m=s?f("img",{className:"adyen-checkout__button__icon",src:s,alt:"","aria-hidden":"true"}):"",y=[...e,...p!=="primary"?[p]:[],...n?["inline"]:[],...l?["completed"]:[],...d==="loading"||d==="redirect"?["loading"]:[]],b=Ue(["adyen-checkout__button",...y.map(g=>`adyen-checkout__button--${g}`)]),C={loading:f("span",{className:"adyen-checkout__button__content"},f(wt,{size:"medium",inline:!0}),f("span",{className:"adyen-checkout__button__text--sr-only"},h.get("loading"))),redirect:f("span",{className:"adyen-checkout__button__content"},f(wt,{size:"medium",inline:!0}),h.get("payButton.redirecting")),default:f("span",{className:"adyen-checkout__button__content"},m,f("span",{className:"adyen-checkout__button__text"},i))},_=C[d]||C.default;return o?f("a",{className:b,href:o,disabled:r,target:this.props.target,rel:this.props.rel},_):f("button",{ref:u,className:b,type:"button",disabled:r,onClick:this.onClick,onKeyDown:this.onKeyDown,"aria-label":c},_,d!=="loading"&&d!=="redirect"&&this.props.children)}constructor(...e){super(...e),bo(this,"onClick",r=>{r.preventDefault(),this.props.disabled||this.props.onClick(r,{complete:this.complete})}),bo(this,"complete",(r=1e3)=>{this.setState({completed:!0}),setTimeout(()=>{this.setState({completed:!1})},r)}),bo(this,"onKeyDown",r=>{this.props.onKeyDown?.(r)})}};bo(Tr,"defaultProps",{status:"default",variant:"primary",disabled:!1,label:"",inline:!1,target:"_self",onClick:()=>{}});var Fs="v3/analytics",$i=1e4;var Ne={log:"log",error:"error",info:"info"},Q={network:"Network",apiError:"ApiError",sdkError:"SdkError",redirect:"Redirect"},zi={redirect:"600"},e1=function(t){return t.clicked="clicked",t.rendered="rendered",t}({}),Gi="action",Ms="submit",Eo="selected",Be="rendered";var Ki="validationError",Wi="focus",Zi="unfocus";var So="instant_payment_button";var $=function(t){return t.ACTION_IS_MISSING_PAYMENT_DATA="700",t.ACTION_IS_MISSING_TOKEN="701",t.TOKEN_IS_MISSING_THREEDSMETHODURL="702",t.TOKEN_IS_MISSING_OTHER_PROPS="703",t.TOKEN_DECODE_OR_PARSING_FAILED="704",t.THREEDS2_TIMEOUT="705",t.TOKEN_IS_MISSING_ACSURL="800",t.NO_TRANSSTATUS="801",t.NO_DETAILS_FOR_FRICTIONLESS_OR_REFUSED="802",t.NO_COMPONENT_FOR_ACTION="803",t.NO_ACTION_FOR_CHALLENGE="804",t.CHALLENGE_RESOLVED_WITHOUT_RESULT_PROP="805",t}({}),Ve=function(t){return t.FINGERPRINT_DATA_SENT="fingerprintDataSentWeb",t.FINGERPRINT_IFRAME_LOADED="fingerprintIframeLoaded",t.FINGERPRINT_COMPLETED="fingerprintCompleted",t.CHALLENGE_DATA_SENT="challengeDataSentWeb",t.CHALLENGE_IFRAME_LOADED="challengeIframeLoaded",t.CHALLENGE_COMPLETED="challengeCompleted",t}({}),Ls={[Ta]:"925",[Aa]:"942",[Da]:"926",[`${Ge}.country`]:"930",[`${Ge}.street`]:"931",[`${Ge}.house_number_or_name`]:"932",[`${Ge}.postal_code`]:"933",[`${Ge}.city`]:"935",[`${Ge}.state_or_province`]:"936",[`${ao}.postal_code`]:"934"},Ro=["cart","minicart","pdp","checkout"],qi=["applicationInfo","checkoutAttemptId"],Xi="fetch-checkoutAttemptId-failed",Us={all:"all",initial:"initial"};var Ji=t=>t.replace(/[^0-9]/g,"");var Qi=()=>Date.now(),el=(t,e)=>{if(t===Ge||t===ao)return Ls[`${t}.${e}`]??t;let r=Ls[t]??t;return isNaN(Number(r))&&(r=Ji(r)),r},tl=t=>Object.keys(t).reduce((e,r)=>(qi.includes(r)&&(e[r]=t[r]),e),{});function Bs(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var it=class{constructor(){Bs(this,"timestamp",void 0),Bs(this,"id",void 0),Bs(this,"component",void 0),this.id=Gt(),this.timestamp=String(Qi())}};function He(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ue=class extends it{getEventCategory(){return Ne.info}constructor(e){return super(),He(this,"type",void 0),He(this,"target",void 0),He(this,"issuer",void 0),He(this,"isExpress",void 0),He(this,"expressPage",void 0),He(this,"isStoredPaymentMethod",void 0),He(this,"brand",void 0),He(this,"validationErrorCode",void 0),He(this,"validationErrorMessage",void 0),He(this,"configData",void 0),this.component=e.component,this.type=e.type,this.target=e.target,this.issuer=e.issuer,this.isExpress=e.isExpress,this.isStoredPaymentMethod=e.isStoredPaymentMethod,this.isExpress=e.isExpress,this.expressPage=e.expressPage,this.brand=e.brand,this.validationErrorCode=e.validationErrorCode,this.validationErrorMessage=e.validationErrorMessage,this.configData=e.configData,this.type===Ki&&(this.validationErrorCode=el(this.validationErrorCode,this.target)),this}};function lt(){let t=xe(window,"screen.colorDepth")||"",e=xe(window,"screen.height")||"",r=xe(window,"screen.width")||"",o=xe(window,"navigator.userAgent")||"";return{acceptHeader:"*/*",colorDepth:t,language:xe(window,"navigator.language")||"en",javaEnabled:!1,screenHeight:e,screenWidth:r,userAgent:o,timeZoneOffset:new Date().getTimezoneOffset()}}var rl=t=>{let e=null;return r=>{if(t.props.doBinLookup!==!1){if(r.encryptedBin&&t.props.clientKey)e=r.uuid,J({loadingContext:t.props.loadingContext,path:`v3/bin/binLookup?token=${t.props.clientKey}`},{type:t.props.brand,supportedBrands:t.props.brands||Rt,encryptedBin:r.encryptedBin,requestId:r.uuid}).then(o=>{if(o?.requestId===e)if(o.brands?.length){let s=o.brands.reduce((n,i)=>(n.detectedBrands.push(i.brand),n.paymentMethodVariants.push(i.paymentMethodVariant),i.supported===!0&&n.supportedBrands.push(i),n),{supportedBrands:[],detectedBrands:[],paymentMethodVariants:[]});if(s.supportedBrands.length)return t.processBinLookupResponse({issuingCountryCode:o.issuingCountryCode,supportedBrands:s.supportedBrands,...o.showSocialSecurityNumber?{showSocialSecurityNumber:o.showSocialSecurityNumber}:{}}),void t.onBinLookup({type:r.type,detectedBrands:s.detectedBrands,supportedBrands:s.supportedBrands.map(n=>n.brand),paymentMethodVariants:s.paymentMethodVariants,supportedBrandsRaw:s.supportedBrands,brands:t.props.brands||Rt,issuingCountryCode:o.issuingCountryCode});if(s.detectedBrands.length){let n={type:"card",fieldType:"encryptedCardNumber",error:Ht.ERROR_MSG_UNSUPPORTED_CARD_ENTERED,detectedBrands:s.detectedBrands};return t.handleUnsupportedCard(n),void t.onBinLookup({type:r.type,detectedBrands:s.detectedBrands,supportedBrands:null,paymentMethodVariants:s.paymentMethodVariants,brands:t.props.brands||Rt})}}else t.onBinLookup({type:r.type,detectedBrands:null,supportedBrands:null,paymentMethodVariants:null,brands:t.props.brands||Rt}),t.processBinLookupResponse({},!0);else o?.requestId||t.props.onError(o||{errorType:"binLookup",message:"unknownError"})});else if(e){t.processBinLookupResponse(null,!0),e=null;let o={type:"card",fieldType:"encryptedCardNumber",error:""};t.handleUnsupportedCard(o),t.onBinLookup({isReset:!0})}t.props.onBinValue&&t.props.onBinValue(r)}else t.props.onBinValue&&t.props.onBinValue(r)}};function ct(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Kt=class{constructor(e,r="body",o={},s={}){ct(this,"src",void 0),ct(this,"node",void 0),ct(this,"attributes",void 0),ct(this,"dataAttributes",void 0),ct(this,"isScriptLoadCalled",!1),ct(this,"script",void 0),ct(this,"load",()=>{if(!this.isScriptLoadCalled)return new Promise((n,i)=>{let c=()=>{this.script.setAttribute("data-script-loaded","true"),n()},d=u=>{this.remove(),i(new v("SCRIPT_ERROR",`Unable to load script ${this.src}. Message: ${u.message}`,{cause:u.error}))};this.isScriptLoadCalled=!0;let p=document.querySelector(this.node);if(this.script=p.querySelector(`script[src="${this.src}"]`),this.script&&this.script.getAttribute("data-script-loaded"))n();else{if(this.script)return this.script.addEventListener("load",c),void this.script.addEventListener("error",d);this.script=document.createElement("script"),Object.assign(this.script,this.attributes),Object.assign(this.script.dataset,this.dataAttributes),this.script.src=this.src,this.script.async=!0,this.script.addEventListener("load",c),this.script.addEventListener("error",d),p.appendChild(this.script)}})}),ct(this,"remove",()=>this.script.parentNode&&this.script.parentNode.removeChild(this.script)),this.src=e,this.node=r,this.attributes=o,this.dataAttributes=s}};var Pd=(t,e)=>e?.value&&e?.currency?t.amount(e.value,e.currency,{currencyDisplay:e.currencyDisplay||"symbol"}):"",ol=(t,e)=>`${t.get("payButton")} ${Pd(t,e)}`,sl=(t,e)=>{let r=e&&e?.value&&e?.currency?t.amount(e.value,e.currency,{currencyDisplay:e.currencyDisplay||"symbol"}):"";return`${r.length?"/ ":""}${r}`};var nl=({label:t})=>f("span",{className:"checkout-secondary-button__text"},t);var al=({amount:t,secondaryAmount:e,classNameModifiers:r=[],label:o,...s})=>{let{i18n:n}=nt(),i=t&&{}.hasOwnProperty.call(t,"value")&&t.value===0,c=i?n.get("confirmPreauthorization"):ol(n,t),d=!i&&!o&&t&&e&&Object.keys(e).length?sl(n,e):null;return f(Tr,{...s,disabled:s.disabled||s.status==="loading",classNameModifiers:[...r,"pay"],label:o||c},d&&f(nl,{label:d}))};function il(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ze=class extends j{iframeOnLoad(){this.props.callback&&typeof this.props.callback=="function"&&this.props.callback(this.iframeEl.contentWindow)}componentDidMount(){this.iframeEl.addEventListener?this.iframeEl.addEventListener("load",this.iframeOnLoad.bind(this),!1):this.iframeEl.attachEvent?this.iframeEl.attachEvent("onload",this.iframeOnLoad.bind(this)):this.iframeEl.onload=this.iframeOnLoad.bind(this)}componentWillUnmount(){this.iframeEl.removeEventListener?this.iframeEl.removeEventListener("load",this.iframeOnLoad.bind(this),!1):this.iframeEl.detachEvent?this.iframeEl.detachEvent("onload",this.iframeOnLoad.bind(this)):this.iframeEl.onload=null}render({name:e,src:r,width:o,height:s,minWidth:n,minHeight:i,allow:c,title:d,classNameModifiers:p}){let u=p.filter(l=>!!l);return f("iframe",{ref:l=>{this.iframeEl=l},allow:c,className:Ue("adyen-checkout__iframe",`adyen-checkout__iframe--${e}`,u.length&&p.map(l=>`adyen-checkout__iframe--${e}-${l}`)),name:e,src:r,width:o,height:s,frameBorder:"0",title:d,referrerpolicy:"origin","min-width":n,"min-height":i})}constructor(...e){super(...e),il(this,"iframeEl",void 0)}};il(Ze,"defaultProps",{width:"0",height:"0",minWidth:"0",minHeight:"0",src:null,allow:null,title:"components iframe",classNameModifiers:[]});var ee=function(t){return t.address="address",t.bankTransfer_IBAN="bankTransfer_IBAN",t.bankTransfer_BE="bankTransfer_BE",t.bankTransfer_NL="bankTransfer_NL",t.bankTransfer_PL="bankTransfer_PL",t.bankTransfer_FR="bankTransfer_FR",t.bankTransfer_CH="bankTransfer_CH",t.bankTransfer_IE="bankTransfer_IE",t.bankTransfer_GB="bankTransfer_GB",t.bankTransfer_DE="bankTransfer_DE",t.donation="donation",t.personal_details="personal_details",t.dropin="dropin",t.bcmc="bcmc",t.card="card",t.scheme="scheme",t.storedCard="storedCard",t.customCard="customcard",t.threeDS2Challenge="threeDS2Challenge",t.threeDS2Fingerprint="threeDS2Fingerprint",t.threeDS2DeviceFingerprint="threeDS2DeviceFingerprint",t.ach="ach",t.directdebit_GB="directdebit_GB",t.sepadirectdebit="sepadirectdebit",t.eft_directdebit_CA="eft_directdebit_CA",t.affirm="affirm",t.afterpay="afterpay",t.afterpay_default="afterpay_default",t.afterpay_b2b="afterpay_b2b",t.atome="atome",t.facilypay_3x="facilypay_3x",t.facilypay_4x="facilypay_4x",t.facilypay_6x="facilypay_6x",t.facilypay_10x="facilypay_10x",t.facilypay_12x="facilypay_12x",t.ratepay="ratepay",t.ratepay_directdebit="ratepay_directdebit",t.amazonpay="amazonpay",t.applepay="applepay",t.cashapp="cashapp",t.clicktopay="clicktopay",t.googlepay="googlepay",t.paypal="paypal",t.fastlane="fastlane",t.paywithgoogle="paywithgoogle",t.boletobancario="boletobancario",t.boletobancario_itau="boletobancario_itau",t.boletobancario_santander="boletobancario_santander",t.primeiropay_boleto="primeiropay_boleto",t.doku="doku",t.doku_alfamart="doku_alfamart",t.doku_permata_lite_atm="doku_permata_lite_atm",t.doku_indomaret="doku_indomaret",t.doku_atm_mandiri_va="doku_atm_mandiri_va",t.doku_sinarmas_va="doku_sinarmas_va",t.doku_mandiri_va="doku_mandiri_va",t.doku_cimb_va="doku_cimb_va",t.doku_danamon_va="doku_danamon_va",t.doku_bri_va="doku_bri_va",t.doku_bni_va="doku_bni_va",t.doku_bca_va="doku_bca_va",t.doku_wallet="doku_wallet",t.oxxo="oxxo",t.billdesk_online="billdesk_online",t.billdesk_wallet="billdesk_wallet",t.dotpay="dotpay",t.eps="eps",t.molpay_ebanking_fpx_MY="molpay_ebanking_fpx_MY",t.molpay_ebanking_TH="molpay_ebanking_TH",t.molpay_ebanking_VN="molpay_ebanking_VN",t.onlineBanking_CZ="onlineBanking_CZ",t.onlinebanking_IN="onlinebanking_IN",t.onlineBanking_PL="onlineBanking_PL",t.onlineBanking_SK="onlineBanking_SK",t.paybybank="paybybank",t.payu_IN_cashcard="payu_IN_cashcard",t.payu_IN_nb="payu_IN_nb",t.wallet_IN="wallet_IN",t.dragonpay="dragonpay",t.dragonpay_ebanking="dragonpay_ebanking",t.dragonpay_otc_banking="dragonpay_otc_banking",t.dragonpay_otc_non_banking="dragonpay_otc_non_banking",t.dragonpay_otc_philippines="dragonpay_otc_philippines",t.econtext="econtext",t.econtext_atm="econtext_atm",t.econtext_online="econtext_online",t.econtext_seven_eleven="econtext_seven_eleven",t.econtext_stores="econtext_stores",t.giropay="giropay",t.multibanco="multibanco",t.redirect="redirect",t.twint="twint",t.vipps="vipps",t.trustly="trustly",t.paybybank_AIS_DD="paybybank_AIS_DD",t.riverty="riverty",t.paybybank_pix="paybybank_pix",t.klarna="klarna",t.klarna_account="klarna_account",t.klarna_paynow="klarna_paynow",t.klarna_b2b="klarna_b2b",t.bcmc_mobile="bcmc_mobile",t.bcmc_mobile_QR="bcmc_mobile_QR",t.pix="pix",t.swish="swish",t.wechatpay="wechatpay",t.wechatpayQR="wechatpayQR",t.promptpay="promptpay",t.paynow="paynow",t.duitnow="duitnow",t.blik="blik",t.mbway="mbway",t.ancv="ancv",t.payto="payto",t.upi="upi",t.upi_qr="upi_qr",t.upi_collect="upi_collect",t.upi_intent="upi_intent",t.giftcard="giftcard",t.mealVoucher_FR="mealVoucher_FR",t.mealVoucher_FR_natixis="mealVoucher_FR_natixis",t.mealVoucher_FR_sodexo="mealVoucher_FR_sodexo",t.mealVoucher_FR_groupeup="mealVoucher_FR_groupeup",t}({});function kt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var qe=class{buildElementProps(e){this.props=this.formatProps({...this.constructor.defaultProps,...e})}formatProps(e){return e}formatData(){return{}}setUpAnalytics(e){return null}submitAnalytics(e){return null}handleKeyPress(e){return null}setState(e){this.state={...this.state,...e}}get data(){let e=xe(this.props,"modules.risk.data"),r=xe(this.props,"modules.analytics.getCheckoutAttemptId")?.()??Xi,o=this.state.order||this.props.order,s=this.formatData();return s.paymentMethod&&r&&(s.paymentMethod.checkoutAttemptId=r),{...e&&{riskData:{clientData:e}},...o&&{order:{orderData:o.orderData,pspReference:o.pspReference}},...s,clientStateDataIndicator:!0}}activate(){}render(){throw new Error("Payment method cannot be rendered.")}mount(e){let r=typeof e=="string"?document.querySelector(e):e;if(!r)throw new Error("Component could not mount. Root node was not found.");let o=!this._node;return this._node&&this.unmount(),this._node=r,Ke(this._node,"keypress",this.handleKeyPress,!1),this._component=this.render(),vs(this._component,r),o&&this.props.modules&&this.props.modules.analytics&&this.setUpAnalytics({containerWidth:r&&r.offsetWidth,component:this.props.isDropin?"dropin":this.constructor.analyticsType??this.constructor.type,flavor:this.props.isDropin?"dropin":"components"}).then(()=>{if(!this.props.isDropin){let s=new ue({type:Be});this.submitAnalytics(s)}}),this}update(e){return this.props=this.formatProps({...this.props,...e}),this.state={},this.unmount().mount(this._node)}unmount(){return ot(this._node,"keypress",this.handleKeyPress),this._node&&vs(null,this._node),this}remove(){this.unmount(),this.core&&this.core.remove(this)}constructor(e,r){if(kt(this,"_id",`${this.constructor.type}-${Gt()}`),kt(this,"core",void 0),kt(this,"props",void 0),kt(this,"state",{}),kt(this,"_component",void 0),kt(this,"_node",null),!function(s){return!!s&&typeof s.initialize=="function"&&typeof s.createFromAction=="function"}(e))throw new v("IMPLEMENTATION_ERROR",`Trying to initialise the component '${this.constructor.type}' without a reference to an instance of AdyenCheckout`);this.core=e,this.buildElementProps(r),this.handleKeyPress=this.handleKeyPress.bind(this)}};kt(qe,"defaultProps",{});var Td=["action","resultCode","sessionData","order","sessionResult","donationToken","error"];function Xe(t){let e=[],r=Object.keys(t).reduce((o,s)=>(Td.includes(s)?o[s]=t[s]:e.push(s),o),{});return e.length&&console.warn(`The following properties should not be passed to the client: ${e.join(", ")}`),r}function Wt(t){t&&(delete t.order,delete t.action,t.donationToken&&t.donationToken.length!==0||delete t.donationToken)}function Je(t){return["Cancelled","Error","Refused"].includes(t.resultCode)?Promise.reject(t):Promise.resolve(t)}function Po(t){return t?typeof t.activePaymentMethod=="object"&&typeof t.closeActivePaymentMethod=="function":!1}function ll(t,e){return t==="FI"&&e?{openFirstPaymentMethod:!1,openFirstStoredPaymentMethod:!1}:{}}var dt=class extends Error{constructor(e){super(e)}};function Ar(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var de=class extends it{getEventCategory(){return Ne.log}constructor(e){return super(),Ar(this,"type",void 0),Ar(this,"message",void 0),Ar(this,"subType",void 0),Ar(this,"result",void 0),Ar(this,"target",void 0),this.type=e.type,this.message=e.message,this.subType=e.subType,this.result=e.result,this.target=e.target,this.component=e.component,this}};function Vs(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var te=class extends it{getEventCategory(){return Ne.error}constructor(e){return super(),Vs(this,"code",void 0),Vs(this,"errorType",void 0),Vs(this,"message",void 0),this.code=e.code,this.errorType=e.errorType,this.message=e.message,this.component=e.component,this}};function Oe(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var me=class extends qe{buildElementProps(e){let r={showPayButton:!0,...this.core.getCorePropsForComponent(),...e?.isStoredPaymentMethod?{}:this.getPaymentMethodFromPaymentMethodsResponse(e?.type),...e},o=Po(this);this.props=this.formatProps({...this.constructor.defaultProps,...ll(this.core.options.countryCode,o),...r})}getPaymentMethodFromPaymentMethodsResponse(e){return this.core.paymentMethodsResponse.find(e||this.constructor.type)}storeElementRefOnCore(e){e?.isDropin||this.core.storeElementReference(this)}isAvailable(){return Promise.resolve()}setState(e){this.state={...this.state,...e},this.onChange()}showValidation(){return this.componentRef&&this.componentRef.showValidation&&this.componentRef.showValidation(),this}setElementStatus(e,r){return this.elementRef?.setStatus(e,r),this}setStatus(e,r){return this.componentRef?.setStatus&&this.componentRef.setStatus(e,r),this}onChange(){this.props.onChange?.({data:this.data,isValid:this.isValid,errors:this.state.errors,valid:this.state.valid},this.elementRef)}setUpAnalytics(e){let r=this.props.session?.id;return this.props.modules.analytics.setUp({...e,...r&&{sessionId:r}})}submitAnalytics(e){try{e.component=this.getComponent(e),this.props.modules.analytics.sendAnalytics(e)}catch(r){console.warn("Failed to submit the analytics event. Error:",r)}}getComponent({component:e}){return e||(this.constructor.analyticsType?this.constructor.analyticsType:this.constructor.type==="scheme"||this.constructor.type==="bcmc"?this.constructor.type:this.type)}submit(){this.isValid?this.makePaymentsCall().then(Xe).then(Je).then(this.handleResponse).catch(e=>{e instanceof dt?this.setElementStatus("ready"):this.handleFailedResult(e)}):this.showValidation()}makePaymentsCall(){if(this.setElementStatus("loading"),this.props.onSubmit)return this.submitUsingAdvancedFlow();if(this.core.session)return(this.props.beforeSubmit?new Promise((e,r)=>this.props.beforeSubmit(this.data,this.elementRef,{resolve:e,reject:()=>r(new dt("beforeSubmitRejected"))})):Promise.resolve(this.data)).then(this.submitUsingSessionsFlow);this.handleError(new v("IMPLEMENTATION_ERROR",'It can not perform /payments call. Callback "onSubmit" is missing or Checkout session is not available'))}async submitUsingAdvancedFlow(){return new Promise((e,r)=>{let o=new de({type:Ms,message:"Shopper clicked pay"});this.submitAnalytics(o),this.props.onSubmit({data:this.data,isValid:this.isValid},this.elementRef,{resolve:e,reject:r})})}async submitUsingSessionsFlow(e){let r=new de({type:Ms,message:"Shopper clicked pay"});this.submitAnalytics(r);try{return await this.core.session.submitPayment(e)}catch(o){return o instanceof v?this.handleError(o):this.handleError(new v("ERROR","Error when making /payments call",{cause:o})),Promise.reject(o)}}onComplete(e){this.props.onComplete&&this.props.onComplete(e,this.elementRef)}handleAdditionalDetails(e){this.makeAdditionalDetailsCall(e).then(Xe).then(Je).then(this.handleResponse).catch(this.handleFailedResult)}makeAdditionalDetailsCall(e){return this.props.onAdditionalDetails?new Promise((r,o)=>{this.props.onAdditionalDetails(e,this.elementRef,{resolve:r,reject:o})}):this.core.session?this.submitAdditionalDetailsUsingSessionsFlow(e.data):void this.handleError(new v("IMPLEMENTATION_ERROR",'It can not perform /payments/details call. Callback "onAdditionalDetails" is missing or Checkout session is not available'))}async submitAdditionalDetailsUsingSessionsFlow(e){try{return await this.core.session.submitDetails(e)}catch(r){return r instanceof v?this.handleError(r):this.handleError(new v("ERROR","Error when making /details call",{cause:r})),Promise.reject(r)}}handleAction(e,r={}){if(!e||!e.type)throw R(e,"action")&&R(e,"resultCode")?new Error('handleAction::Invalid Action - the passed action object itself has an "action" property and a "resultCode": have you passed in the whole response object by mistake?'):new Error('handleAction::Invalid Action - the passed action object does not have a "type" property');let o=this.core.createFromAction(e,{...this.elementRef.props,...r,onAdditionalDetails:this.handleAdditionalDetails});return o?(this.unmount(),o.mount(this._node)):null}onActionHandled(e){this.props?.onActionHandled?.({originalAction:this.props.originalAction,...e})}handleResponse(e){e.action?this.elementRef.handleAction(e.action):e.order?.remainingAmount?.value>0?this.handleOrder(e):this.handleSuccessResult(e)}handleKeyPress(e){e.key!=="Enter"&&e.code!=="Enter"||(e.preventDefault(),this.onEnterKeyPressed(document?.activeElement,this))}onEnterKeyPressed(e,r){this.props.onEnterKeyPressed?this.props.onEnterKeyPressed(e,r):(e.blur(),this.submit())}updateParent(e={}){return this.elementRef.core.update(e)}get isValid(){return!1}get icon(){let e=this.props.paymentMethodType||this.type;return this.props.icon??this.resources.getImage()(e)}get displayName(){let e=this.core.paymentMethodsResponse?.paymentMethods?.find(r=>r.type===this.type);return this.props.name||e?.name||this.type}get accessibleName(){return this.displayName}get additionalInfo(){return null}get type(){return this.props.type||this.constructor.type}async handleAdvanceFlowPaymentMethodsUpdate(e,r){return new Promise((o,s)=>{if(!this.props.onPaymentMethodsRequest)return o();this.props.onPaymentMethodsRequest({...e&&{order:{orderData:e.orderData,pspReference:e.pspReference}},locale:this.core.options.locale},{resolve:o,reject:s})}).catch(o=>{this.handleError(new v("IMPLEMENTATION_ERROR","Something failed during payment methods update or onPaymentMethodsRequest was not implemented",{cause:o}))}).then(o=>this.core.update({...o&&{paymentMethodsResponse:o},order:e,amount:e?e.remainingAmount:r}))}constructor(e,r){super(e,r),Oe(this,"componentRef",void 0),Oe(this,"resources",void 0),Oe(this,"elementRef",void 0),Oe(this,"handleError",o=>{if(this.setElementStatus("ready"),o.name===Ts&&o.options.code){let s=new te({errorType:Q.apiError,code:o.options.code});this.submitAnalytics(s)}this.props.onError&&this.props.onError(o,this.elementRef)}),Oe(this,"handleOrder",o=>{let{order:s}=o;(this.core.session?this.core.update({order:s}):this.handleAdvanceFlowPaymentMethodsUpdate(s)).then(()=>{this.props.onOrderUpdated?.({order:s})})}),Oe(this,"handleFailedResult",o=>{Po(this.elementRef)&&this.elementRef.displayFinalAnimation("error"),Wt(o),this.props.onPaymentFailed?.(o,this.elementRef)}),Oe(this,"handleSuccessResult",o=>{Po(this.elementRef)&&this.elementRef.displayFinalAnimation("success"),Wt(o),this.props.onPaymentCompleted?.(o,this.elementRef)}),Oe(this,"setComponentRef",o=>{this.componentRef=o}),Oe(this,"payButton",o=>f(al,{...o,amount:this.props.amount,secondaryAmount:this.props.secondaryAmount,onClick:this.submit})),this.core.register(this.constructor),this.submit=this.submit.bind(this),this.setState=this.setState.bind(this),this.onComplete=this.onComplete.bind(this),this.handleAction=this.handleAction.bind(this),this.handleOrder=this.handleOrder.bind(this),this.handleAdditionalDetails=this.handleAdditionalDetails.bind(this),this.handleResponse=this.handleResponse.bind(this),this.setElementStatus=this.setElementStatus.bind(this),this.submitAnalytics=this.submitAnalytics.bind(this),this.makePaymentsCall=this.makePaymentsCall.bind(this),this.makeAdditionalDetailsCall=this.makeAdditionalDetailsCall.bind(this),this.submitUsingSessionsFlow=this.submitUsingSessionsFlow.bind(this),this.elementRef=r&&r.elementRef||this,this.resources=this.props.modules?this.props.modules.resources:void 0,this.storeElementRefOnCore(this.props),this.onEnterKeyPressed=this.onEnterKeyPressed.bind(this),this.onActionHandled=this.onActionHandled.bind(this)}};Oe(me,"type",void 0),Oe(me,"txVariants",[]);function Hs(t){let e=rt(null),[r,o]=ye({}),[s,n]=ye({}),[i,c]=ye({}),[d,p]=ye(!1),[u,l]=ye(null),[h,m]=ye([]),[y,b]=ye(""),C=ro(()=>Ii(t,{sfp:e},{dualBrandSelectElements:h,setDualBrandSelectElements:m,setSelectedBrandValue:b,issuingCountryCode:u,setIssuingCountryCode:l}),[h,u]);return this.processBinLookupResponse=(_,g)=>{C.processBinLookup(_,g)},this.dualBrandingChangeHandler=C.handleDualBrandSelection,ze(()=>(this.setFocusOn=e.current.setFocusOn,this.updateStyles=e.current.updateStyles,this.showValidation=e.current.showValidation,this.handleUnsupportedCard=e.current.handleUnsupportedCard,()=>{e.current.destroy()}),[]),ze(()=>{let _=e.current.mapErrorsToValidationRuleResult(),g={...r,..._};if(t.onChange({data:i,valid:s,errors:g,isValid:d,selectedBrandValue:y}),Object.keys(g).length){let O=Object.entries(g).map(([N,E])=>({fieldType:N,...E||{error:"",rootNode:this.props.rootNode}}));this.props.onValidationError?.(O)}},[i,s,r,y]),f(Pr,{ref:e,...Ad(t),type:t.brand,onChange:_=>{c({...i,..._.data}),o({...r,..._.errors}),n({...s,..._.valid}),p(_.isSfpValid)},render:()=>null})}Hs.defaultProps={onChange:()=>{},onError:()=>{},onValidationError:()=>{}};var Ad=t=>({autoFocus:t.autoFocus,brands:t.brands,brandsConfiguration:t.brandsConfiguration,clientKey:t.clientKey,forceCompat:t.forceCompat,i18n:t.i18n,implementationType:t.implementationType,keypadFix:t.keypadFix,legacyInputMode:t.legacyInputMode,loadingContext:t.loadingContext,minimumExpiryDate:t.minimumExpiryDate,onAdditionalSFConfig:t.onAdditionalSFConfig,onAdditionalSFRemoved:t.onAdditionalSFRemoved,onAllValid:t.onAllValid,onAutoComplete:t.onAutoComplete,onBinValue:t.onBinValue,onBrand:t.onBrand,onConfigSuccess:t.onConfigSuccess,handleKeyPress:t.handleKeyPress,onError:t.onError,onFieldValid:t.onFieldValid,onFocus:t.onFocus,onLoad:t.onLoad,rootNode:t.rootNode,showWarnings:t.showWarnings,styles:t.styles,trimTrailingSeparator:t.trimTrailingSeparator,resources:t.resources,maskSecurityCode:t.maskSecurityCode,placeholders:t.placeholders});function Nt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ye=class extends me{formatProps(e){return{...e,type:ee.customCard}}formatData(){let e=this.state.selectedBrandValue;return{paymentMethod:{type:"scheme",...this.state.data,...e&&{brand:e}},browserInfo:this.browserInfo,origin:!!window&&window.location.origin}}updateStyles(e){return this.componentRef?.updateStyles&&this.componentRef.updateStyles(e),this}setFocusOn(e){return this.componentRef?.setFocusOn&&this.componentRef.setFocusOn(e),this}processBinLookupResponse(e){return this.componentRef?.processBinLookupResponse&&this.componentRef.processBinLookupResponse(e),this}dualBrandingChangeHandler(e){return this.componentRef?.dualBrandingChangeHandler&&this.componentRef.dualBrandingChangeHandler(e),this}handleUnsupportedCard(e){return this.componentRef?.handleUnsupportedCard&&this.componentRef.handleUnsupportedCard(e),this}onBinLookup(e){let r={...e};r.rootNode=this._node,r.isReset||(r.supportedBrandsRaw=e.supportedBrandsRaw?.map(o=>(o.brandImageUrl=this.props.brandsConfiguration[o.brand]?.icon??fo(o.brand,this.resources),o))),this.props.onBinLookup(r)}get isValid(){return!!this.state.isValid}get browserInfo(){return lt()}render(){return f($t,{i18n:this.props.i18n,loadingContext:this.props.loadingContext,resources:this.resources},f(Hs,{ref:e=>{this.componentRef=e},...this.props,...this.state,handleKeyPress:this.handleKeyPress,rootNode:this._node,onChange:this.setState,onBinValue:this.onBinValue,implementationType:"custom",resources:this.resources,brand:this.brand,onFocus:this.onFocus}))}constructor(...e){super(...e),Nt(this,"brand",ee.card),Nt(this,"onBinValue",rl(this)),Nt(this,"onFocus",r=>{let o=new ue({type:r.focus===!0?Wi:Zi,target:Pi(r.fieldType)});this.submitAnalytics(o),this.props.onFocus?.(r)}),Nt(this,"onEnterKeyPressed",(r,o)=>{this.props.onEnterKeyPressed?.(r,o)})}};Nt(Ye,"type",ee.customCard),Nt(Ye,"analyticsType","custom-scheme"),Nt(Ye,"defaultProps",{onBinLookup:()=>{},brandsConfiguration:{}});var Zt=class extends j{componentDidMount(){this.formEl.submit(),this.props.onFormSubmit(`${this.props.inputName} sent`)}render({name:e,action:r,target:o,inputName:s,inputValue:n}){return f("form",{ref:i=>{this.formEl=i},method:"POST",className:Ue(["adyen-checkout__threeds2__form",`adyen-checkout__threeds2__form--${e}`]),name:e,action:r,target:o,style:{display:"none"}},f("input",{name:s,value:n}))}constructor(...e){var r,o,s;super(...e),s=void 0,(o="formEl")in(r=this)?Object.defineProperty(r,o,{value:s,enumerable:!0,configurable:!0,writable:!0}):r[o]=s}};var qt=(t,e,r,o)=>s=>{let n={};if((s.origin||s.originalEvent?.origin)!==t)return"Message was not sent from the expected domain";if(typeof s.data!="string")return"Event data was not of type string";if(!s.data.length)return"Invalid event data string";try{let i=JSON.parse(s.data);if(!R(i,"type")||i.type!==o)return"Event data was not of expected type";e(i)}catch{return n.type=`${o}-JSON-parse-error`,n.comment="failed to JSON parse event.data",n.extraInfo=`event.data = ${s.data}`,n.eventDataRaw=s.data,console.debug("get-process-message-handler::CATCH::Un-parseable JSON:: parseErrorObj=",n),!1}return!0};var Dr=t=>{let e=/^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/.exec(t);if(!e)return null;let[,r,o,s,n]=e;return r&&o&&s?`${r}:${o}${s}${n?`:${n}`:""}`:null};var Dd="not base64",Id="malformed URI sequence",pt={decode:t=>{if(!pt.isBase64(t))return{success:!1,error:Dd};try{return{success:!0,data:(e=t,decodeURIComponent(Array.prototype.map.call(window.atob(e),r=>`%${`00${r.charCodeAt(0).toString(16)}`.slice(-2)}`).join("")))}}catch{return{success:!1,error:Id}}var e},encode:t=>window.btoa(t),isBase64:t=>{if(!t||t.length%4)return!1;try{return window.btoa(window.atob(t))===t}catch{return!1}}};var Xt=t=>"success"in t&&!t.success,cl=t=>{let e=pt.decode(t);if(e.success)try{return JSON.parse(e.data)}catch{return{success:!1,error:"Could not JSON parse token"}}return e},To=t=>{if(!t||!Object.keys(t).length)throw new Error("No (populated) data object to encode");return pt.encode(JSON.stringify(t))},dl=t=>{let e=t.length===1?`0${t}`:t;return Object.prototype.hasOwnProperty.call(Is,e)?e:Co},xd=t=>Is[dl(t)],pl=({token:t,size:e})=>{let r=cl(t);if(Xt(r))return r;let{acsTransID:o,acsURL:s,messageVersion:n,threeDSNotificationURL:i,threeDSServerTransID:c}=r,d=Dr(i);return{acsURL:s,cReqData:{acsTransID:o,messageVersion:n,threeDSServerTransID:c,messageType:"CReq",challengeWindowSize:dl(e)},iframeSizeArr:xd(e),postMessageDomain:d}},ul=({token:t,notificationURL:e})=>{let r=cl(t);if(Xt(r))return r;let{threeDSMethodNotificationURL:o,threeDSMethodUrl:s,threeDSServerTransID:n}=r,i=e||o;return{threeDSServerTransID:n,threeDSMethodURL:s,threeDSMethodNotificationURL:i,postMessageDomain:Dr(i)}},ml=(t,e,r)=>({data:{[t]:To({threeDSCompInd:e.threeDSCompInd}),paymentData:r}}),hl=(t,e,r)=>({data:{details:{"threeds2.fingerprint":To(e)},paymentData:r}}),fl=(t,e,r)=>({data:{details:{[t]:To({transStatus:e,authorisationToken:r})}}}),_l=(t,e,r)=>({data:{details:{"threeds2.challengeResult":To({transStatus:e})},paymentData:r}}),Ao=t=>{let e=window.btoa(t).split("=")[0];return e=e.replace(/\+/g,"-"),e=e.replace(/\//g,"_"),e},wd=["elementRef"],kd=["createFromAction","onAdditionalDetails"],yl=(t,e)=>{if(t==="fingerprint"){let r=e.elementRef?wd:kd,o=Dt(r).from(e);return o.showSpinner=!e.isDropin,o.statusType="loading",o}return{statusType:"custom",i18n:e.i18n}};var Jt=(t,e,r)=>{let o;return{promise:new Promise((s,n)=>{o=setTimeout(()=>{n(r)},t),e.then(i=>{clearTimeout(o),s(i)}).catch(i=>{clearTimeout(o),n(i)})}),cancel:()=>{clearTimeout(o)}}};function Ys(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var gl="threeDSIframe",Do=class extends j{get3DS2ChallengePromise(){return new Promise((e,r)=>{this.processMessageHandler=qt(this.props.postMessageDomain,e,r,"challengeResult"),window.addEventListener("message",this.processMessageHandler)})}componentDidMount(){this.challengePromise=Jt(6e5,this.get3DS2ChallengePromise(),ki),this.challengePromise.promise.then(e=>{window.removeEventListener("message",this.processMessageHandler),this.props.onCompleteChallenge(e)}).catch(e=>{window.removeEventListener("message",this.processMessageHandler),this.props.onErrorChallenge(e)})}componentWillUnmount(){this.challengePromise&&this.challengePromise.cancel(),window.removeEventListener("message",this.processMessageHandler)}render({acsURL:e,cReqData:r,iframeSizeArr:o,onFormSubmit:s},{base64URLencodedData:n,status:i}){let[c,d]=o;return f("div",{className:Ue(["adyen-checkout__threeds2__challenge",`adyen-checkout__threeds2__challenge--${r.challengeWindowSize}`])},i!=="iframeLoaded"&&f(wt,null),f(Ze,{name:gl,width:c,height:d,callback:this.iframeCallback}),f(Zt,{name:"cReqForm",action:e,target:gl,inputName:"creq",inputValue:n,onFormSubmit:s}))}constructor(e){super(e),Ys(this,"processMessageHandler",void 0),Ys(this,"challengePromise",void 0),Ys(this,"iframeCallback",()=>{this.setState({status:"iframeLoaded"}),this.state.status==="init"&&this.props.onActionHandled?.({componentType:"3DS2Challenge",actionDescription:`${at} challenge iframe loaded`})});let r=JSON.stringify(this.props.cReqData),o=Ao(r);this.state={base64URLencodedData:o,status:"init"}}};function vl(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ir=class extends j{componentDidMount(){if(Xt(this.state.challengeData)){let e=this.state.challengeData.error,r=e.indexOf(We)>-1?$.ACTION_IS_MISSING_TOKEN:$.TOKEN_DECODE_OR_PARSING_FAILED;this.setError({errorInfo:e.indexOf(We)>-1?`${$.ACTION_IS_MISSING_TOKEN}: ${this.props.i18n.get("err.gen.9102")}`:`${$.TOKEN_DECODE_OR_PARSING_FAILED}: ${this.props.i18n.get("err.gen.9102")}`},!0);let o=new te({code:r,errorType:Q.apiError,message:`${Se}: ${e}`});this.props.onSubmitAnalytics(o),console.debug("### PrepareChallenge3DS2::exiting:: no challengeData")}else{let e=this.props.environment==="test"&&this.props._environmentUrls?.api?.includes("http://localhost:8080"),{acsURL:r}=this.state.challengeData;if(!zt(r,e)){this.setError({errorInfo:`${$.TOKEN_IS_MISSING_ACSURL}: ${this.props.i18n.get("err.gen.9102")}`},!0);let i=new te({code:$.TOKEN_IS_MISSING_ACSURL,errorType:Q.apiError,message:`${Se}: Decoded token is missing a valid acsURL property`});return this.props.onSubmitAnalytics(i),void console.debug("### PrepareChallenge3DS2::exiting:: no valid acsURL")}let{acsTransID:o,messageVersion:s,threeDSServerTransID:n}=this.state.challengeData.cReqData;if(!o||!s||!n){this.setError({errorInfo:`${$.TOKEN_IS_MISSING_OTHER_PROPS}: ${this.props.i18n.get("err.gen.9102")}`},!0);let i=new te({code:$.TOKEN_IS_MISSING_OTHER_PROPS,errorType:Q.apiError,message:`${Se}: Decoded token is missing one or more of the following properties (acsTransID | messageVersion | threeDSServerTransID)`});return this.props.onSubmitAnalytics(i),void console.debug("### PrepareChallenge3DS2::exiting:: missing one or more of the following properties (acsTransID | messageVersion | threeDSServerTransID)")}this.setState({status:"performingChallenge"})}}setStatusComplete(e,r=null){this.setState({status:"complete"},()=>{let o=(this.props.isMDFlow?_l:fl)(this.props.dataKey,e.transStatus,this.props.paymentData),s;r&&console.debug("### PrepareChallenge3DS2::errorCodeObject::",r);let n=r||e;if(n.errorCode){let c={code:n.errorCode==="timeout"?$.THREEDS2_TIMEOUT:$.NO_TRANSSTATUS,errorType:n.errorCode==="timeout"?Q.network:Q.apiError};s=new te({message:n.message,...c}),this.props.onSubmitAnalytics(s)}let i;switch(e?.transStatus){case"Y":i="success";break;case"N":i="failed";break;case"U":i=r?"timeout":"cancelled"}e?.errorCode&&(i="noTransStatus"),s=new de({type:Re,message:`${at} challenge has completed`,subType:Ve.CHALLENGE_COMPLETED,result:i}),this.props.onSubmitAnalytics(s),this.props.onComplete(o)})}setError(e,r){this.setState({status:"error",errorInfo:e.errorInfo}),r&&this.props.onError(new v(Sr,e.errorInfo,{cause:e.errorObj}))}render(e,{challengeData:r}){let o=wi();return this.state.status==="performingChallenge"?f(Do,{onCompleteChallenge:s=>{let n=null;if(R(s.result,"errorCode")&&s.result.errorCode.length&&(n={errorCode:s.result.errorCode,message:`${Se}: ${s.result.errorDescription?s.result.errorDescription:"no transStatus could be retrieved"}`},this.props.isMDFlow&&this.props.onError(new v(Sr,`${Se}: ${s.result.errorDescription?s.result.errorDescription:"no transStatus could be retrieved"}`,{cause:s.result.errorCode}))),!s.result){this.setError({errorInfo:`${Se}: ${this.props.i18n.get("3ds.chal.805",{values:{result:'"result"'}})}`,errorObj:s},!0);let i=new te({code:$.CHALLENGE_RESOLVED_WITHOUT_RESULT_PROP,errorType:Q.apiError,message:`${Se}: challenge resolved without a "result" object`});return this.props.onSubmitAnalytics(i),void console.debug('### PrepareChallenge3DS2::exiting:: challenge resolved without a "result" object')}this.setStatusComplete(s.result,n)},onErrorChallenge:s=>{if(R(s,"errorCode")){let n={errorCode:s.errorCode,message:`${vo}: ${s.errorCode}`};return this.props.isMDFlow&&this.props.onError(new v(Sr,`${Se}: '3DS2 challenge timed out'`,{cause:s.errorCode})),void this.setStatusComplete(s.result,n)}},...r,onActionHandled:this.props.onActionHandled,onFormSubmit:this.onFormSubmit}):this.state.status==="error"?f("div",{className:"adyen-checkout__threeds2-challenge-error"},f(Li,{className:"adyen-checkout__status__icon adyen-checkout__status__icon--error",src:o({imageFolder:"components/"})("error"),alt:""}),f("div",{className:"adyen-checkout__status__text"},this.state.errorInfo?this.state.errorInfo:this.props.i18n.get("error.message.unknown"))):null}constructor(e){if(super(e),vl(this,"onFormSubmit",r=>{let o=new de({type:Re,message:r,subType:Ve.CHALLENGE_DATA_SENT});this.props.onSubmitAnalytics(o)}),this.props.token){let r=pl({token:this.props.token,size:this.props.challengeWindowSize||this.props.size});this.state={status:"init",challengeData:r}}else this.state={challengeData:{success:!1,error:We}},console.debug(`${Se}: ${We}`)}};vl(Ir,"defaultProps",{onComplete:()=>{},onError:()=>{},isMDFlow:!1});function Io(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Qt=class extends me{onComplete(e){e&&super.onComplete(e),this.unmount()}render(){if(!ge(this.props.paymentData)){let e=R(this.props,"isMDFlow")?"paymentData":"authorisationToken";this.props.onError(new v(Er,`No ${e} received. 3DS2 Challenge cannot proceed`));let r=new te({code:$.ACTION_IS_MISSING_PAYMENT_DATA,errorType:Q.apiError,message:`${Se}: Missing 'paymentData' property from threeDS2 action`});return this.submitAnalytics(r),null}return f($t,{i18n:this.props.i18n,loadingContext:this.props.loadingContext,resources:this.resources},f(Ir,{...this.props,onComplete:this.onComplete,onSubmitAnalytics:this.submitAnalytics,isMDFlow:this.props.paymentData.length<15,onActionHandled:this.onActionHandled}))}constructor(...e){super(...e),Io(this,"submitAnalytics",r=>{r instanceof ue&&r.type===Be||super.submitAnalytics(r)}),Io(this,"onActionHandled",r=>{let o=new de({type:Re,message:r.actionDescription,subType:Ve.CHALLENGE_IFRAME_LOADED});this.submitAnalytics(o),super.onActionHandled(r)})}};Io(Qt,"type",ee.threeDS2Challenge),Io(Qt,"defaultProps",{dataKey:"threeDSResult",size:Co,type:vo});function js(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Cl="threeDSMethodIframe",xr=class extends j{get3DS2MethodPromise(){return new Promise((e,r)=>{this.processMessageHandler=qt(this.props.postMessageDomain,e,r,"fingerPrintResult"),window.addEventListener("message",this.processMessageHandler)})}componentDidMount(){this.fingerPrintPromise=Jt(1e4,this.get3DS2MethodPromise(),Ni),this.fingerPrintPromise.promise.then(e=>{window.removeEventListener("message",this.processMessageHandler),this.props.onCompleteFingerprint(e)}).catch(e=>{window.removeEventListener("message",this.processMessageHandler),this.props.onErrorFingerprint(e)})}componentWillUnmount(){this.fingerPrintPromise&&this.fingerPrintPromise.cancel(),window.removeEventListener("message",this.processMessageHandler)}render({threeDSMethodURL:e,onActionHandled:r,onFormSubmit:o},{base64URLencodedData:s}){return f("div",{className:"adyen-checkout__3ds2-device-fingerprint"},this.props.showSpinner&&f(wt,null),f("div",{style:{display:"none"}},f(Ze,{name:Cl,callback:()=>{r?.({componentType:"3DS2Fingerprint",actionDescription:`${at} fingerprint iframe loaded`})}}),f(Zt,{name:"threeDSMethodForm",action:e,target:Cl,inputName:"threeDSMethodData",inputValue:s,onFormSubmit:o})))}constructor(e){super(e),js(this,"processMessageHandler",void 0),js(this,"fingerPrintPromise",void 0);let{threeDSServerTransID:r,threeDSMethodNotificationURL:o}=this.props,s=JSON.stringify({threeDSServerTransID:r,threeDSMethodNotificationURL:o}),n=Ao(s);this.state={base64URLencodedData:n}}};js(xr,"defaultProps",{showSpinner:!0});function $s(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var er=class extends j{componentDidMount(){if(Xt(this.state.fingerPrintData)){let e=this.state.fingerPrintData.error,r=e.indexOf(We)>-1?$.ACTION_IS_MISSING_TOKEN:$.TOKEN_DECODE_OR_PARSING_FAILED;this.setStatusComplete({threeDSCompInd:"N"},{errorCode:r,message:`${It}: ${e}`}),console.debug("### PrepareFingerprint3DS2:: token does not exist or could not be base64 decoded &/or JSON.parsed")}else{let e=this.props.environment==="test"&&this.props._environmentUrls?.api?.includes("http://localhost:8080"),{threeDSMethodURL:r,threeDSMethodNotificationURL:o,postMessageDomain:s,threeDSServerTransID:n}=this.state.fingerPrintData;if(!zt(r,e))return this.setStatusComplete({threeDSCompInd:"U"},{errorCode:$.TOKEN_IS_MISSING_THREEDSMETHODURL,message:`${It}: Decoded token is missing a valid threeDSMethodURL property`}),void console.debug("### PrepareFingerprint3DS2::exiting:: no valid threeDSMethodURL");let i=zt(o,e),c=zt(s,e),d=n?.length;if(!i||!c||!d)return this.setStatusComplete({threeDSCompInd:"N"},{errorCode:$.TOKEN_IS_MISSING_OTHER_PROPS,message:`${It}: Decoded token is missing one or more of the following properties (threeDSMethodNotificationURL | postMessageDomain | threeDSServerTransID)`}),void console.debug("### PrepareFingerprint3DS2::exiting:: Decoded token is missing one or more of the following properties (threeDSMethodNotificationURL | postMessageDomain | threeDSServerTransID)");this.setState({status:"retrievingFingerPrint"})}}setStatusComplete(e,r=null){this.setState({status:"complete"},()=>{let o=(this.props.isMDFlow?hl:ml)(this.props.dataKey,e,this.props.paymentData),s,n=r||e;if(n.errorCode){let c={code:n.errorCode===xt?$.THREEDS2_TIMEOUT:n.errorCode,errorType:n.errorCode===xt?Q.network:Q.apiError};s=new te({message:n.message,...c}),this.props.onSubmitAnalytics(s)}let i;switch(e?.threeDSCompInd){case"Y":i="success";break;case"N":i=r?r.errorCode===xt?xt:"failedInternal":"failed";break;case"U":i="noThreeDSMethodURL"}s=new de({type:Re,message:`${at} fingerprinting has completed`,subType:Ve.FINGERPRINT_COMPLETED,result:i}),this.props.onSubmitAnalytics(s),this.props.onComplete(o)})}render({showSpinner:e},{status:r,fingerPrintData:o}){return r==="retrievingFingerPrint"?f(xr,{onCompleteFingerprint:s=>{this.setStatusComplete(s.result)},onErrorFingerprint:s=>{let n={errorCode:s.errorCode,message:`${yo}: ${s.errorCode}`};this.setStatusComplete(s.result,n)},showSpinner:e,...o,onActionHandled:this.props.onActionHandled,onFormSubmit:this.onFormSubmit}):null}constructor(e){super(e),$s(this,"onFormSubmit",s=>{let n=new de({type:Re,message:s,subType:Ve.FINGERPRINT_DATA_SENT});this.props.onSubmitAnalytics(n)});let{token:r,notificationURL:o}=this.props;if(r){let s=ul({token:r,notificationURL:o});this.state={status:"init",fingerPrintData:s}}else this.state={fingerPrintData:{success:!1,error:We}},console.debug(`${It}: ${We}`)}};$s(er,"type","scheme"),$s(er,"defaultProps",{onComplete:()=>{},onError:()=>{},paymentData:"",showSpinner:!0,isMDFlow:!1});var Pe="v1",ut={makePayments:"620",submitPaymentDetails:"621",submitThreeDS2Fingerprint:"622",createOrder:"623"};function bl({data:t}){J({path:`v1/submitThreeDS2Fingerprint?token=${this.props.clientKey}`,loadingContext:this.props.loadingContext,errorLevel:"fatal",errorCode:ut.submitThreeDS2Fingerprint},{...t}).then(e=>{let r;if(e.type==="completed"){let{details:s}=e;return e.details?this.onComplete({data:{details:s}}):(console.debug('Handled Error::callSubmit3DS2Fingerprint::FAILED:: no details object in a response indicating either a "frictionless" flow, or a "refused" response. resData=',e),r=new te({code:$.NO_DETAILS_FOR_FRICTIONLESS_OR_REFUSED,errorType:Q.apiError,message:`${go}: no details object in a response indicating either a "frictionless" flow, or a "refused" response`}),void this.submitAnalytics(r))}if(!e.action)return console.debug('Handled Error::callSubmit3DS2Fingerprint::FAILED:: no action object in a response indicating a "challenge". resData=',e),r=new te({code:$.NO_ACTION_FOR_CHALLENGE,errorType:Q.apiError,message:`${go}: no action object in a response indicating a "challenge" flow`}),void this.submitAnalytics(r);let o=this.props.elementRef??this;return o?e.action?.type==="threeDS2"?o.handleAction(e.action,Dt("challengeWindowSize").from(this.props)):e.action?.type==="redirect"?o.handleAction(e.action):void 0:(console.debug("Handled Error::callSubmit3DS2Fingerprint::FAILED:: no actionHandler"),r=new te({code:$.NO_COMPONENT_FOR_ACTION,errorType:Q.sdkError,message:`${go}: no component defined to handle the action response`}),void this.submitAnalytics(r))}).catch(e=>{this.handleError(e)})}function wr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var tr=class extends me{onComplete(e){super.onComplete(e),this.unmount()}render(){if(!ge(this.props.paymentData)){this.props.onError(new v(Er,"No paymentData received. 3DS2 Fingerprint cannot proceed"));let e=new te({code:$.ACTION_IS_MISSING_PAYMENT_DATA,errorType:Q.apiError,message:`${It}: Missing 'paymentData' property from threeDS2 action`});return this.submitAnalytics(e),null}return f(er,{...this.props,onComplete:this.props.isMDFlow?this.onComplete:this.callSubmit3DS2Fingerprint,onSubmitAnalytics:this.submitAnalytics,isMDFlow:this.props.paymentData.length<15,onActionHandled:this.onActionHandled})}constructor(...e){super(...e),wr(this,"callSubmit3DS2Fingerprint",bl.bind(this)),wr(this,"submitAnalytics",r=>{r instanceof ue&&r.type===Be||super.submitAnalytics(r)}),wr(this,"onActionHandled",r=>{let o=new de({type:Re,message:r.actionDescription,subType:Ve.FINGERPRINT_IFRAME_LOADED});this.submitAnalytics(o),super.onActionHandled(r)})}};wr(tr,"type",ee.threeDS2Fingerprint),wr(tr,"defaultProps",{dataKey:"fingerprintResult",type:yo});function El({label:t=null,icon:e=null,payButton:r,onSubmit:o,amount:s=null,name:n,showPayButton:i,...c}){let{i18n:d}=nt(),[p,u]=ye("ready");if(this.setStatus=l=>{u(l)},i)return f(tt,null,r({...c,status:p,icon:e,classNameModifiers:["standalone"],label:t||(s&&{}.hasOwnProperty.call(s,"value")&&s.value===0?`${d.get("preauthorizeWith")} ${n}`:`${d.get("continueTo")} ${n}`),onClick:o}))}var Sl={IDR:1,JPY:1,KRW:1,VND:1,BYR:1,CVE:1,DJF:1,GHC:1,GNF:1,KMF:1,PYG:1,RWF:1,UGX:1,VUV:1,XAF:1,XOF:1,XPF:1,MRO:10,BHD:1e3,IQD:1e3,JOD:1e3,KWD:1e3,OMR:1e3,LYD:1e3,TND:1e3};var zs={RSD:{minimumFractionDigits:2},AFN:{minimumFractionDigits:2},ALL:{minimumFractionDigits:2},IRR:{minimumFractionDigits:2},LAK:{minimumFractionDigits:2},LBP:{minimumFractionDigits:2},MMK:{minimumFractionDigits:2},SOS:{minimumFractionDigits:2},SYP:{minimumFractionDigits:2},YER:{minimumFractionDigits:2},IQD:{minimumFractionDigits:3}};var Fd=t=>Sl[t]||100,kr=(t,e)=>{let r=Fd(e);return parseInt(String(t),10)/r},Rl=(t,e,r,o={})=>{let s=t.toString(),n=kr(s,r),i=e.replace("_","-"),c={style:"currency",currency:r,currencyDisplay:"symbol",...zs[r]?{...o,...zs[r]}:o};try{return n.toLocaleString(i,c)}catch{return s}};var Pl=({buttonStyle:t,buttonType:e,buttonLocale:r,onClick:o})=>f("apple-pay-button",{"data-testid":"apple-pay-button",buttonstyle:t,type:e,locale:r,onclick:o});function Tl(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var xo=class{begin(){return this.session.begin()}onvalidatemerchant(e,r){return new Promise((o,s)=>r(o,s,e.validationURL)).then(o=>{this.session.completeMerchantValidation(o)}).catch(o=>{console.error(o),this.session.abort(),this.options.onError(o)})}onpaymentauthorized(e,r){return new Promise((o,s)=>r(o,s,e)).then(o=>{this.session.completePayment(o)}).catch(o=>{this.session.completePayment(o)})}onpaymentmethodselected(e,r){return new Promise((o,s)=>r(o,s,e)).then(o=>{this.session.completePaymentMethodSelection(o)}).catch(o=>{this.session.completePaymentMethodSelection(o)})}onshippingcontactselected(e,r){return new Promise((o,s)=>r(o,s,e)).then(o=>{this.session.completeShippingContactSelection(o)}).catch(o=>{this.session.completeShippingContactSelection(o)})}onshippingmethodselected(e,r){return new Promise((o,s)=>r(o,s,e)).then(o=>{this.session.completeShippingMethodSelection(o)}).catch(o=>{this.session.completeShippingMethodSelection(o)})}oncancel(e,r){r(e)}constructor(e,r){Tl(this,"session",void 0),Tl(this,"options",void 0),this.options=r,this.session=new ApplePaySession(r.version,e),this.session.onvalidatemerchant=o=>{this.onvalidatemerchant(o,r.onValidateMerchant)},this.session.onpaymentauthorized=o=>{this.onpaymentauthorized(o,r.onPaymentAuthorized)},this.session.oncancel=o=>{this.oncancel(o,r.onCancel)},typeof r.onPaymentMethodSelected=="function"&&(this.session.onpaymentmethodselected=o=>{this.onpaymentmethodselected(o,r.onPaymentMethodSelected)}),typeof r.onShippingContactSelected=="function"&&(this.session.onshippingcontactselected=o=>{this.onshippingcontactselected(o,r.onShippingContactSelected)}),typeof r.onShippingMethodSelected=="function"&&(this.session.onshippingmethodselected=o=>{this.onshippingmethodselected(o,r.onShippingMethodSelected)})}};var Al={isExpress:!1,amount:{currency:"USD",value:0},totalPriceStatus:"final",initiative:"web",merchantCapabilities:["supports3DS"],supportedNetworks:["amex","discover","masterCard","visa"],buttonType:"plain",buttonColor:"black",onClick:t=>t()};var Dl=t=>{let{countryCode:e,companyName:r,amount:o,...s}=t,n=(i=>String(kr(i.value,i.currency)))(o);return e||console.warn("Apple Pay - Make sure to set the countryCode in the AdyenCheckout configuration or in the Checkout Session creation"),{countryCode:e,currencyCode:o.currency,total:{label:s.totalPriceLabel,amount:n,type:s.totalPriceStatus},lineItems:s.lineItems,shippingContactEditingMode:s.shippingContactEditingMode,shippingMethods:s.shippingMethods,shippingType:s.shippingType,recurringPaymentRequest:s.recurringPaymentRequest,merchantCapabilities:s.merchantCapabilities,supportedCountries:s.supportedCountries,supportedNetworks:s.supportedNetworks,requiredShippingContactFields:s.requiredShippingContactFields,requiredBillingContactFields:s.requiredBillingContactFields,billingContact:s.billingContact,shippingContact:s.shippingContact,applicationData:s.applicationData}};function Il(t){try{for(let e=t;e>0;e--)if(ApplePaySession?.supportsVersion(e))return e}catch(e){console.warn(e)}return null}function Gs(t,e){if(t)return{city:t.locality,country:t.countryCode,houseNumberOrName:"ZZ",postalCode:t.postalCode,street:t.addressLines?.join(" ").trim(),...t.administrativeArea&&{stateOrProvince:t.administrativeArea},...e&&{firstName:t.givenName,lastName:t.familyName}}}function xl(t){let e={mc:"masterCard",amex:"amex",visa:"visa",elodebit:"elo",elo:"elo",interac:"interac",discover:"discover",jcb:"jcb",electron:"electron",maestro:"maestro",girocard:"girocard",cartebancaire:"cartesBancaires",eftpos_australia:"eftpos"};return t.reduce((r,o)=>(e[o]&&!r.includes(e[o])&&r.push(e[o]),r),[])}var Md="https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js",wo=class{async load(){try{let e=new Kt(Md,"body",{crossOrigin:"anonymous"});return this.sdkLoadingPromise=e.load(),await this.sdkLoadingPromise,window?.ApplePaySession}catch(e){throw new v("SCRIPT_ERROR","ApplePaySDK failed to load",{cause:e})}}isSdkLoaded(){return this.sdkLoadingPromise===void 0?Promise.reject():this.sdkLoadingPromise}constructor(){var e,r,o;o=void 0,(r="sdkLoadingPromise")in(e=this)?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o}};var wl=()=>{if(typeof window>"u")return!1;try{return window.self!==window.top}catch{return!0}};function Nr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ot=class t extends me{formatProps(e){let r=e.brands?.length?xl(e.brands):e.supportedNetworks;return{...e,configuration:e.configuration,supportedNetworks:r,buttonLocale:e.buttonLocale??e.i18n?.locale,totalPriceLabel:e.totalPriceLabel||e.configuration?.merchantName,renderApplePayCodeAs:e.renderApplePayCodeAs??(wl()?"window":"modal")}}formatData(){let{applePayToken:e,billingAddress:r,deliveryAddress:o}=this.state,{isExpress:s}=this.props;return{paymentMethod:{type:t.type,applePayToken:e,...s&&{subtype:"express"}},...r&&{billingAddress:r},...o&&{deliveryAddress:o}}}submitAnalytics(e){if(e instanceof ue&&e.type===Be){let{isExpress:r,expressPage:o}=this.props,s=o&&Ro.includes(o);typeof r=="boolean"&&(e.isExpress=r),r===!0&&s&&(e.expressPage=o)}super.submitAnalytics(e)}get isValid(){return!0}async applePayCapabilities(e){let r=e||this.props.configuration.merchantId;try{return await this.sdkLoader.isSdkLoaded(),await ApplePaySession?.applePayCapabilities(r)}catch(o){throw new v("ERROR","Apple Pay: Error when requesting applePayCapabilities()",{cause:o})}}async isAvailable(){if(window.location.protocol!=="https:")return Promise.reject(new v("IMPLEMENTATION_ERROR","Trying to start an Apple Pay session from an insecure document"));try{return await this.sdkLoader.isSdkLoaded(),ApplePaySession?.canMakePayments()?Promise.resolve():Promise.reject(new v("ERROR","Apple Pay is not available on this device"))}catch(e){return Promise.reject(new v("ERROR","Apple Pay SDK failed to load",{cause:e}))}}defineApplePayVersionNumber(){window.location.protocol==="https:"&&(this.applePayVersionNumber=this.props.version||Il(14))}configureApplePayWebOptions(){if(window.ApplePayWebOptions){let{renderApplePayCodeAs:e,onApplePayCodeClose:r}=this.props;window.ApplePayWebOptions.set({renderApplePayCodeAs:e,...r&&{onApplePayCodeClose:r}})}}startSession(){let{onValidateMerchant:e,onPaymentMethodSelected:r,onShippingMethodSelected:o,onShippingContactSelected:s}=this.props,n=Dl({companyName:this.props.configuration.merchantName,countryCode:this.core.options.countryCode,...this.props}),i=new xo(n,{version:this.applePayVersionNumber,onError:c=>{this.handleError(new v("ERROR","ApplePay - Something went wrong on ApplePayService",{cause:c}))},onCancel:c=>{this.handleError(new v("CANCEL","ApplePay UI dismissed",{cause:c}))},onPaymentMethodSelected:r,onShippingMethodSelected:o,onShippingContactSelected:s,onValidateMerchant:e||this.validateMerchant,onPaymentAuthorized:(c,d,p)=>{let u=Gs(p.payment.billingContact),l=Gs(p.payment.shippingContact,!0);this.setState({applePayToken:btoa(JSON.stringify(p.payment.token.paymentData)),authorizedEvent:p,...u&&{billingAddress:u},...l&&{deliveryAddress:l}}),this.handleAuthorization().then(this.makePaymentsCall).then(Xe).then(Je).then(this.collectOrderTrackingDetailsIfNeeded).then(({paymentResponse:h,orderDetails:m})=>(c({status:ApplePaySession.STATUS_SUCCESS,...m&&{orderDetails:m}}),h)).then(h=>{this.handleResponse(h)}).catch(h=>{let m=h?.error?.applePayError;d({status:ApplePaySession.STATUS_FAILURE,errors:m?Array.isArray(m)?m:[m]:void 0});let y={...h,error:{applePayError:m}};this.handleFailedResult(y)})}});return new Promise((c,d)=>this.props.onClick(c,d)).then(()=>{i.begin()}).catch(()=>({}))}async handleAuthorization(){return new Promise((e,r)=>{this.props.onAuthorized||e();let{authorizedEvent:o,billingAddress:s,deliveryAddress:n}=this.state;this.props.onAuthorized({authorizedEvent:o,...s&&{billingAddress:s},...n&&{deliveryAddress:n}},{resolve:e,reject:r})}).catch(e=>{let r={error:{applePayError:e}};return Promise.reject(r)})}async collectOrderTrackingDetailsIfNeeded(e){return new Promise((r,o)=>{if(!this.props.onOrderTrackingRequest)return r();this.props.onOrderTrackingRequest(r,o)}).then(r=>({paymentResponse:e,...r&&{orderDetails:r}})).catch(()=>({paymentResponse:e}))}async validateMerchant(e,r){let{hostname:o}=window.location,{clientKey:s,configuration:n,loadingContext:i,initiative:c}=this.props,{merchantName:d,merchantId:p}=n,u={loadingContext:i,path:`v1/applePay/sessions?clientKey=${s}`},l={displayName:d,domainName:o,initiative:c,merchantIdentifier:p};try{let h=await J(u,l),m=pt.decode(h.data);m.success?e(JSON.parse(m.data)):r("Could not decode Apple Pay session")}catch{r("Could not get Apple Pay session")}}render(){return this.props.showPayButton?f(Pl,{buttonStyle:this.props.buttonColor,buttonType:this.props.buttonType,buttonLocale:this.props.buttonLocale,onClick:this.submit}):null}constructor(e,r){super(e,r),Nr(this,"sdkLoader",void 0),Nr(this,"applePayVersionNumber",void 0),Nr(this,"submit",()=>{if(this.props.isInstantPayment){let i=new ue({type:Eo,target:So});this.submitAnalytics(i)}this.startSession()});let{isExpress:o,onShippingContactSelected:s,onShippingMethodSelected:n}=this.props;if(o===!1&&(s||n))throw new v("IMPLEMENTATION_ERROR",'ApplePay - You must set "isExpress" flag to "true" in order to use "onShippingContactSelected" and/or "onShippingMethodSelected" callbacks');this.startSession=this.startSession.bind(this),this.submit=this.submit.bind(this),this.validateMerchant=this.validateMerchant.bind(this),this.collectOrderTrackingDetailsIfNeeded=this.collectOrderTrackingDetailsIfNeeded.bind(this),this.handleAuthorization=this.handleAuthorization.bind(this),this.defineApplePayVersionNumber=this.defineApplePayVersionNumber.bind(this),this.configureApplePayWebOptions=this.configureApplePayWebOptions.bind(this),this.sdkLoader=new wo,this.sdkLoader.load().then(this.defineApplePayVersionNumber).then(this.configureApplePayWebOptions).catch(i=>{this.handleError(i)})}};Nr(Ot,"type",ee.applepay),Nr(Ot,"defaultProps",Al);var mt={API_VERSION:2,API_VERSION_MINOR:0,GATEWAY:"adyen",URL:"https://pay.google.com/gp/p/js/pay.js"};function kl({allowedAuthMethods:t,allowedCardNetworks:e,existingPaymentMethodRequired:r=!1}){return{apiVersion:mt.API_VERSION,apiVersionMinor:mt.API_VERSION_MINOR,allowedPaymentMethods:[{type:"CARD",parameters:{allowedAuthMethods:t,allowedCardNetworks:e},tokenizationSpecification:{type:"PAYMENT_GATEWAY",parameters:{}}}],existingPaymentMethodRequired:r}}function Ld({amount:t,countryCode:e="US",totalPriceStatus:r="FINAL",...o}){let s=String(kr(t.value,t.currency));return{countryCode:e,currencyCode:t.currency,totalPrice:s,totalPriceStatus:r,...o.transactionInfo}}function Ks({configuration:t,...e},r){return{apiVersion:mt.API_VERSION,apiVersionMinor:mt.API_VERSION_MINOR,transactionInfo:Ld({countryCode:r,...e}),merchantInfo:{merchantId:t.merchantId,merchantName:t.merchantName,...t.merchantOrigin?{merchantOrigin:t.merchantOrigin}:{},...t.authJwt?{authJwt:t.authJwt}:{}},allowedPaymentMethods:[{type:"CARD",tokenizationSpecification:{type:"PAYMENT_GATEWAY",parameters:{gateway:mt.GATEWAY,gatewayMerchantId:t.gatewayMerchantId}},parameters:{allowedAuthMethods:e.allowedAuthMethods,allowedCardNetworks:e.allowedCardNetworks,assuranceDetailsRequired:e.assuranceDetailsRequired,allowPrepaidCards:e.allowPrepaidCards,allowCreditCards:e.allowCreditCards,billingAddressRequired:e.billingAddressRequired,billingAddressParameters:e.billingAddressParameters}}],emailRequired:e.emailRequired,shippingAddressRequired:e.shippingAddressRequired,shippingAddressParameters:e.shippingAddressParameters,shippingOptionRequired:e.shippingOptionRequired,shippingOptionParameters:e.shippingOptionParameters,callbackIntents:e.callbackIntents}}function Nl(t="TEST"){switch(t.toLowerCase()){case"production":case"live":case"live-au":case"live-apse":case"live-us":case"live-in":return"PRODUCTION";default:return"TEST"}}function Ws(t,e){if(t)return{postalCode:t.postalCode,country:t.countryCode,street:[t.address1,t.address2,t.address3].join(" ").trim(),houseNumberOrName:"ZZ",city:t.locality||"",...t.administrativeArea&&{stateOrProvince:t.administrativeArea},...e&&{firstName:t.name}}}var Ud=["en","ar","bg","ca","cs","da","de","el","es","et","fi","fr","hr","id","it","ja","ko","ms","nl","no","pl","pt","ru","sk","sl","sr","sv","th","tr","uk","zh"];function Ol(t=""){let e=t.toLowerCase().substring(0,2);return Ud.includes(e)?e:null}var ko=class{async getGooglePaymentsClient(e){return window.google?.payments||await new Kt(mt.URL).load(),new google.payments.api.PaymentsClient(e)}isReadyToPay(e){return this.paymentsClient?this.paymentsClient.then(r=>r.isReadyToPay(kl(e))):Promise.reject(new Error("Google Pay is not available"))}prefetchPaymentData(e,r){if(!this.paymentsClient)throw new Error("Google Pay is not available");let o=Ks(e,r);this.paymentsClient.then(s=>s.prefetchPaymentData(o))}initiatePayment(e,r){if(!this.paymentsClient)throw new Error("Google Pay is not available");let o=Ks(e,r);return this.paymentsClient.then(s=>s.loadPaymentData(o))}constructor(e,r){var o,s,n;n=void 0,(s="paymentsClient")in(o=this)?Object.defineProperty(o,s,{value:n,enumerable:!0,configurable:!0,writable:!0}):o[s]=n;let i=Nl(e);this.paymentsClient=this.getGooglePaymentsClient({environment:i,paymentDataCallbacks:r})}};var Fl=t=>{let e=rt(void 0);return ze(()=>{let{onClick:r,buttonRadius:o,buttonColor:s,buttonType:n,buttonLocale:i,buttonSizeMode:c,buttonRootNode:d,paymentsClient:p}=t;p.then(u=>u.createButton({onClick:r,buttonType:n,buttonColor:s,buttonLocale:i,buttonSizeMode:c,buttonRootNode:d,...o!==void 0&&{buttonRadius:o}})).then(u=>{e.current&&e.current.appendChild(u)})},[t.buttonColor,t.buttonType,t.buttonLocale,t.buttonSizeMode,t.buttonRootNode,t.paymentsClient]),f("div",{"data-testid":"googlepay-button-container",className:"adyen-checkout__paywithgoogle",ref:e})};var Ml={isExpress:!1,existingPaymentMethodRequired:!1,buttonColor:"default",buttonType:"buy",buttonSizeMode:"fill",configuration:{gatewayMerchantId:"",merchantId:"",merchantName:""},amount:{value:0,currency:"USD"},totalPriceStatus:"FINAL",onClick:t=>t(),allowedAuthMethods:["PAN_ONLY","CRYPTOGRAM_3DS"],allowedCardNetworks:["AMEX","DISCOVER","JCB","MASTERCARD","VISA"],allowCreditCards:!0,allowPrepaidCards:!0,billingAddressRequired:!1,billingAddressParameters:void 0,assuranceDetailsRequired:!1,emailRequired:!1,shippingAddressRequired:!1,shippingAddressParameters:void 0,shippingOptionRequired:!1,shippingOptionParameters:void 0,callbackIntents:[]};function ht(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ft=class extends me{getPaymentMethodFromPaymentMethodsResponse(e){return this.core.paymentMethodsResponse.find(e||this.constructor.type)||this.core.paymentMethodsResponse.find(ee.paywithgoogle)}formatProps(e){let r=e.buttonSizeMode??(e.isDropin?"fill":"static"),o=Ol(e.buttonLocale??e.i18n?.locale),s=[...e.callbackIntents,"PAYMENT_AUTHORIZATION"];return{...e,configuration:e.configuration,buttonSizeMode:r,buttonLocale:o,callbackIntents:s}}formatData(){let{googlePayCardNetwork:e,googlePayToken:r,billingAddress:o,deliveryAddress:s}=this.state,{isExpress:n}=this.props;return{paymentMethod:{type:this.type,googlePayCardNetwork:e,googlePayToken:r,...n&&{subtype:"express"}},browserInfo:this.browserInfo,origin:!!window&&window.location.origin,...o&&{billingAddress:o},...s&&{deliveryAddress:s}}}submitAnalytics(e){if(e instanceof ue&&e.type===Be){let{isExpress:r,expressPage:o}=this.props,s=o&&Ro.includes(o);typeof r=="boolean"&&(e.isExpress=r),r===!0&&s&&(e.expressPage=o)}super.submitAnalytics(e)}showGooglePayPaymentSheet(){this.googlePay.initiatePayment(this.props,this.core.options.countryCode).catch(e=>{this.handleError(new v(e.statusCode==="CANCELED"?"CANCEL":"ERROR",e.toString(),{cause:e}))})}async handleAuthorization(){return new Promise((e,r)=>{this.props.onAuthorized||e();let{authorizedEvent:o,billingAddress:s,deliveryAddress:n}=this.state;this.props.onAuthorized({authorizedEvent:o,...s&&{billingAddress:s},...n&&{deliveryAddress:n}},{resolve:e,reject:r})}).catch(e=>{let r={error:{googlePayError:e}};return Promise.reject(r)})}get isValid(){return!0}async isAvailable(){return this.isReadyToPay().then(e=>{if(!e.result)throw new v("ERROR","GooglePay is not available");if(e.paymentMethodPresent===!1)throw new v("ERROR","GooglePay - No paymentMethodPresent");return Promise.resolve()}).catch(e=>Promise.reject(e))}get browserInfo(){return lt()}get icon(){return this.props.icon??this.resources.getImage()("googlepay")}render(){return this.props.showPayButton?f(Fl,{buttonColor:this.props.buttonColor,buttonType:this.props.buttonType,buttonSizeMode:this.props.buttonSizeMode,buttonLocale:this.props.buttonLocale,buttonRootNode:this.props.buttonRootNode,buttonRadius:this.props.buttonRadius,paymentsClient:this.googlePay.paymentsClient,onClick:this.submit}):null}constructor(e,r){super(e,r),ht(this,"googlePay",void 0),ht(this,"submit",()=>{if(this.props.isInstantPayment){let n=new ue({type:Eo,target:So});this.submitAnalytics(n)}new Promise((n,i)=>this.props.onClick(n,i)).then(this.showGooglePayPaymentSheet).catch(()=>{})}),ht(this,"onPaymentAuthorized",async n=>{let i=Ws(n.paymentMethodData.info.billingAddress),c=Ws(n.shippingAddress,!0);return this.setState({authorizedEvent:n,googlePayToken:n.paymentMethodData.tokenizationData.token,googlePayCardNetwork:n.paymentMethodData.info.cardNetwork,...i&&{billingAddress:i},...c&&{deliveryAddress:c}}),new Promise(d=>{this.handleAuthorization().then(this.makePaymentsCall).then(Xe).then(Je).then(p=>(d({transactionState:"SUCCESS"}),p)).then(p=>{this.handleResponse(p)}).catch(p=>{this.setElementStatus("ready");let u=p?.error?.googlePayError,l=this.props.i18n.get("error.subtitle.payment"),h=typeof u=="string"?{intent:"PAYMENT_AUTHORIZATION",reason:"OTHER_ERROR",message:u||l}:{intent:u?.intent||"PAYMENT_AUTHORIZATION",reason:u?.reason||"OTHER_ERROR",message:u?.message||l};d({transactionState:"ERROR",error:h});let m={...p,error:{googlePayError:h}};this.handleFailedResult(m)})})}),ht(this,"isReadyToPay",()=>this.googlePay.isReadyToPay(this.props)),ht(this,"prefetch",()=>this.googlePay.prefetchPaymentData(this.props,this.core.options.countryCode)),this.handleAuthorization=this.handleAuthorization.bind(this),this.showGooglePayPaymentSheet=this.showGooglePayPaymentSheet.bind(this);let{isExpress:o,paymentDataCallbacks:s}=this.props;if(o===!1&&s?.onPaymentDataChanged)throw new v("IMPLEMENTATION_ERROR",'GooglePay - You must set "isExpress" flag to "true" in order to use "onPaymentDataChanged" callback');if(!this.props.configuration.merchantId)throw new v("IMPLEMENTATION_ERROR","GooglePay - Missing merchantId. Please ensure that it is correctly configured in your customer area.");this.googlePay=new ko(this.props.environment,{...o&&s?.onPaymentDataChanged&&{onPaymentDataChanged:s.onPaymentDataChanged},onPaymentAuthorized:this.onPaymentAuthorized})}};ht(ft,"type",ee.googlepay),ht(ft,"txVariants",[ee.googlepay,ee.paywithgoogle]),ht(ft,"defaultProps",Ml);var Zs=()=>{try{if(window.parent.location.href)return window.location!==window.parent.location}catch{return!1}};function Ll(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Or=class extends j{componentDidMount(){new Promise((e,r)=>{this.props.beforeRedirect(e,r,{url:this.props.url,method:this.props.method,...this.props.data?{data:this.props.data}:{}})}).then(()=>{this.props.onActionHandled?.({componentType:this.props.paymentMethodType,actionDescription:"performing-redirect"}),this.postForm?this.postForm.submit():this.props.redirectFromTopWhenInIframe&&Zs()?window.top.location.assign?.(this.props.url):window.location.assign(this.props.url)}).catch(()=>{this.props.onRedirectError()})}render({url:e,method:r,data:o={}}){return r==="POST"?f("form",{method:"post","data-testid":"redirect-shopper-form",action:e,style:{display:"none"},ref:s=>{this.postForm=s},...this.props.redirectFromTopWhenInIframe&&Zs()&&{target:"_top"}},Object.keys(o).map(s=>f("input",{type:"hidden",name:s,key:s,value:o[s]}))):null}constructor(...e){super(...e),Ll(this,"postForm",void 0)}};Ll(Or,"defaultProps",{beforeRedirect:t=>t(),onRedirectError:()=>{},method:"GET"});function qs(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var _t=class extends me{formatData(){return{paymentMethod:{type:this.type},browserInfo:this.browserInfo}}get isValid(){return!0}get browserInfo(){return lt()}render(){return this.props.url&&this.props.method?f(Or,{url:this.props.url,...this.props,onActionHandled:this.onActionHandled,onRedirectError:this.handleRedirectError}):this.props.showPayButton?f($t,{i18n:this.props.i18n,loadingContext:this.props.loadingContext,resources:this.resources},f(El,{...this.props,showPayButton:this.props.showPayButton,name:this.displayName,onSubmit:this.submit,payButton:this.payButton,ref:e=>{this.componentRef=e}})):null}constructor(...e){super(...e),qs(this,"handleRedirectError",()=>{let r=new te({component:this.props.paymentMethodType,errorType:Q.redirect,code:zi.redirect});super.submitAnalytics(r)})}};qs(_t,"type",ee.redirect),qs(_t,"defaultProps",{type:_t.type});var Ul={test:"https://checkoutshopper-test.adyen.com/checkoutshopper/",live:"https://checkoutshopper-live.adyen.com/checkoutshopper/","live-us":"https://checkoutshopper-live-us.adyen.com/checkoutshopper/","live-au":"https://checkoutshopper-live-au.adyen.com/checkoutshopper/","live-apse":"https://checkoutshopper-live-apse.adyen.com/checkoutshopper/","live-in":"https://checkoutshopper-live-in.adyen.com/checkoutshopper/",fallback:"https://checkoutshopper-live.adyen.com/checkoutshopper/"},Xs={test:"https://checkoutshopper-test.cdn.adyen.com/checkoutshopper/",live:"https://checkoutshopper-live.cdn.adyen.com/checkoutshopper/","live-us":"https://checkoutshopper-live-us.cdn.adyen.com/checkoutshopper/","live-au":"https://checkoutshopper-live-au.cdn.adyen.com/checkoutshopper/","live-apse":"https://checkoutshopper-live-apse.cdn.adyen.com/checkoutshopper/","live-in":"https://checkoutshopper-live-in.cdn.adyen.com/checkoutshopper/",fallback:"https://checkoutshopper-live.cdn.adyen.com/checkoutshopper/"},Bl={test:"https://checkoutanalytics-test.adyen.com/checkoutanalytics/",live:"https://checkoutanalytics-live.adyen.com/checkoutanalytics/","live-us":"https://checkoutanalytics-live-us.adyen.com/checkoutanalytics/","live-au":"https://checkoutanalytics-live-au.adyen.com/checkoutanalytics/","live-apse":"https://checkoutanalytics-live-apse.adyen.com/checkoutanalytics/","live-in":"https://checkoutanalytics-live-in.adyen.com/checkoutanalytics/",fallback:"https://checkoutanalytics-live.adyen.com/checkoutanalytics/"};var No=(t,e,r)=>r||e[t?.toLowerCase()]||e.fallback,Vl=(t,e)=>({apiUrl:No(t,Ul,e?.api),analyticsUrl:No(t,Bl,e?.analytics),cdnImagesUrl:No(t,Xs,e?.cdn?.images),cdnTranslationsUrl:No(t,Xs,e?.cdn?.translations)});function Hl(t){return Object.keys(t).reduce((e,r)=>(Hi.includes(r)&&(e[r]=t[r]),e),{})}function Yl(t){let e=(r=>r)(["session","environment","_environmentUrls","showPayButton","clientKey","locale","translations","paymentMethodsResponse","amount","secondaryAmount","countryCode","allowPaymentMethods","removePaymentMethods","srConfig","analytics","risk","order","exposeLibraryMetadata","beforeRedirect","beforeSubmit","onPaymentCompleted","onPaymentFailed","onSubmit","onAdditionalDetails","onActionHandled","onChange","onError","onBalanceCheck","onOrderRequest","onPaymentMethodsRequest","onOrderCancel","onOrderUpdated","loadingContext","onEnterKeyPressed","afterAdditionalDetails"]);Object.keys(t).forEach(r=>{e.includes(r)||console.warn(`AdyenCheckout - Configuration property "${r}" is not a valid AdyenCheckout property. If it is a payment method configuration, make sure to pass it directly to the Component. If you are using Drop-in, make sure to pass it to "paymentMethodsConfiguration" object`)})}function Ft(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Oo=class{get(e,r){let o=Bi(this.translations,e,r);return o!==null?o:e}amount(e,r,o){return Rl(e,this.locale,r,o)}date(e,r={}){if(e===void 0)return"";let o={year:"numeric",month:"2-digit",day:"2-digit",...r};return new Date(e).toLocaleDateString(this.locale,o)}dateTime(e){return e===void 0?"":this.timeAndDateFormatter.format(new Date(e))}constructor(e){Ft(this,"locale",void 0),Ft(this,"languageCode",void 0),Ft(this,"translations",void 0),Ft(this,"customTranslations",void 0),Ft(this,"timeFormatOptions",{hour:"numeric",minute:"numeric"}),Ft(this,"timeAndDateFormatOptions",{year:"numeric",month:"2-digit",day:"2-digit",...this.timeFormatOptions}),Ft(this,"timeAndDateFormatter",void 0);let{locale:r,translations:o,customTranslations:s}=e;if(!r)throw new v("IMPLEMENTATION_ERROR",'Language: "locale" property is not defined');this.locale=r,this.languageCode=this.locale.split("-")[0],this.customTranslations=s||{},this.timeAndDateFormatter=Intl.DateTimeFormat(this.locale,this.timeAndDateFormatOptions),this.translations={...o,...!!this.customTranslations[this.locale]&&this.customTranslations[this.locale]}}};var jl="1.0.0",$l="1.0.0",Mt="deviceFingerprint";var zl={result:{type:Mt,value:"df-timedOut"},errorCode:"timeout"},Gl={UNKNOWN:"unknownError"},Js={timeout:"iframe loading timed out",wrongOrigin:"Result did not come from the expected origin",wrongDataType:"Result data was not of the expected type",missingProperty:"Result data did not contain the expected properties",unknownError:"An unknown error occurred"};function Qs(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Fo=class extends j{getDfpPromise(){return new Promise((e,r)=>{this.processMessageHandler=qt(this.postMessageDomain,e,r,Mt),window.addEventListener("message",this.processMessageHandler)})}componentDidMount(){this.deviceFingerPrintPromise=Jt(2e4,this.getDfpPromise(),zl),this.deviceFingerPrintPromise.promise.then(e=>{this.props.onCompleteFingerprint(e),window.removeEventListener("message",this.processMessageHandler)}).catch(e=>{this.props.onErrorFingerprint(e),window.removeEventListener("message",this.processMessageHandler)})}render({dfpURL:e}){return f("div",{className:"adyen-checkout-risk__device-fingerprint"},f(Ze,{name:"dfIframe",src:e,allow:"geolocation; microphone; camera;",title:"devicefingerprinting iframe"}))}constructor(e){super(e),Qs(this,"postMessageDomain",void 0),Qs(this,"processMessageHandler",void 0),Qs(this,"deviceFingerPrintPromise",void 0),this.postMessageDomain=Dr(this.props.loadingContext)||this.props.loadingContext}};var Kl=t=>({errorCode:t,message:Js[t]||Js[Gl.UNKNOWN],type:Mt});var Fr=class extends j{setStatusComplete(e){this.setState({status:"complete"},()=>{this.props.onComplete(e)})}render({loadingContext:e},{dfpURL:r}){return this.state.status==="retrievingFingerPrint"?f("div",{className:"adyen-checkout-risk__device-fingerprint--wrapper",style:{position:"absolute",width:0,height:0}},f(Fo,{loadingContext:e,dfpURL:r,onCompleteFingerprint:o=>{this.setStatusComplete(o)},onErrorFingerprint:o=>{this.props.onError(Kl(o.errorCode)),this.setStatusComplete(o.result)}})):null}constructor(e){super(e),e.clientKey&&(this.state={status:"retrievingFingerPrint",dfpURL:`${this.props.loadingContext}assets/html/${e.clientKey}/dfp.${$l}.html`})}},en,tn,rn;rn={onComplete:()=>{},onError:()=>{}},(tn="defaultProps")in(en=Fr)?Object.defineProperty(en,tn,{value:rn,enumerable:!0,configurable:!0,writable:!0}):en[tn]=rn;function rr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var or=class t extends qe{formatProps(e){return{...e,risk:{...t.defaultProps.risk,...e.risk}}}get isValid(){return this.state.isValid}get data(){if(this.isValid){let e={version:jl,...this.state.data};return pt.encode(JSON.stringify(e))}return!1}get enabled(){return this.props.risk.enabled}componentWillUnmount(){this.cleanUp()}render(){return f(Fr,{...this.props,loadingContext:this.props.loadingContext,onComplete:this.onComplete,onError:this.onError})}constructor(e,r){super(e,r),rr(this,"nodeRiskContainer",null),rr(this,"onComplete",s=>{let n={...this.state.data,[s.type]:s.value,persistentCookie:s.persistentCookie,components:s.components};this.setState({data:n,isValid:!0}),this.props.risk.onComplete(this.data),this.cleanUp()}),rr(this,"onError",s=>{this.props.risk.onError(s),this.cleanUp()}),rr(this,"cleanUp",()=>{this.nodeRiskContainer&&this.nodeRiskContainer.parentNode&&this.nodeRiskContainer.parentNode.removeChild(this.nodeRiskContainer)});let o={[Mt]:null};this.setState({data:o}),this.props.risk.enabled===!0&&(document.querySelector(this.props.risk.node)?(this.nodeRiskContainer=document.createElement("div"),document.querySelector(this.props.risk.node).appendChild(this.nodeRiskContainer),this.mount(this.nodeRiskContainer)):this.onError({message:"RiskModule node was not found"}))}};rr(or,"type","risk"),rr(or,"defaultProps",{risk:{enabled:!0,onComplete:()=>{},onError:()=>{},node:"body"}});function on(t){return!this.length||this.indexOf(t.type)>-1}function sn(t){return!this.length||this.indexOf(t.type)<0}function Wl(t){return!!t&&!!t.supportedShopperInteractions&&t.supportedShopperInteractions.includes("Ecommerce")}var Vd=["scheme","blik","twint","ach","cashapp","paybybank_AIS_DD","payto","paybybank_pix","eft_directdebit_CA"];function Zl(t){return!!t&&!!t.type&&Vd.includes(t.type)}var Hd=t=>({...t,storedPaymentMethodId:t.id,isStoredPaymentMethod:!0}),ql=(t,{allowPaymentMethods:e=[],removePaymentMethods:r=[]})=>t?t.filter(on,e).filter(sn,r):[],Xl=(t,{allowPaymentMethods:e=[],removePaymentMethods:r=[]})=>t?t.filter(Zl).filter(on,e).filter(sn,r).filter(Wl).map(Hd):[],Jl=t=>{if(typeof t=="string")throw new Error('paymentMethodsResponse was provided but of an incorrect type (should be an object but a string was provided).Try JSON.parse("{...}") your paymentMethodsResponse.');if(t instanceof Array)throw new Error("paymentMethodsResponse was provided but of an incorrect type (should be an object but an array was provided).Please check you are passing the whole response.");!t||t?.paymentMethods?.length||t?.storedPaymentMethods?.length||console.warn("paymentMethodsResponse was provided but no payment methods were found.")};function Ql(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Mo=class{mapCreatedComponentType(e){return e==="card"?"scheme":e}has(e){return!!this.paymentMethods.find(r=>r.type===this.mapCreatedComponentType(e))}find(e){return this.paymentMethods.find(r=>r.type===this.mapCreatedComponentType(e))}constructor(e,r={}){Ql(this,"paymentMethods",[]),Ql(this,"storedPaymentMethods",[]),Jl(e),this.paymentMethods=e?ql(e.paymentMethods,r):[],this.storedPaymentMethods=e?Xl(e.storedPaymentMethods,r):[]}};var nn=(t,e,r,o)=>{let s=e.getComponent(r);if(!s)throw Error(`Action Element of type ${r} not found in the registry`);return new s(t,{...o,id:`${r}-${Gt()}`})},Mr=t=>(e,r,o,s)=>{let n={...s,...o,onComplete:s.onAdditionalDetails,onError:s.onError,statusType:t,originalAction:o};return nn(e,r,o.paymentMethodType,n)},ec={redirect:(t,e,r,o)=>{let s={...o,...r,statusType:"redirect",originalAction:r};return nn(t,e,"redirect",s)},threeDS2:(t,e,r,o)=>{let s=r.subtype==="fingerprint"?"threeDS2DeviceFingerprint":"threeDS2Challenge",n=r.subtype==="fingerprint"||o.isMDFlow?r.paymentData:r.authorisationToken,i={core:t,token:r.token,paymentData:n,onActionHandled:o.onActionHandled,onComplete:o.isMDFlow?o.onComplete:o.onAdditionalDetails,onError:o.onError,isDropin:!!o.isDropin,loadingContext:o.loadingContext,clientKey:o.clientKey,paymentMethodType:o.paymentMethodType,challengeWindowSize:o.challengeWindowSize,isMDFlow:o.isMDFlow,modules:{analytics:o.modules?.analytics,resources:o.modules?.resources},...yl(r.subtype,o)};return nn(t,e,s,i)},voucher:Mr("custom"),qrCode:Mr("custom"),await:Mr("custom"),bankTransfer:Mr("custom"),sdk:Mr("custom")};function tc(t,e,r,o={}){let s=ec[r.type];if(s&&typeof s=="function")return s(t,e,r,o);throw new Error("Invalid Action")}function Lo(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var an=class{get length(){return Object.keys(this.storage).length}key(e){return Object.keys(this.storage)[e]}getItem(e){return this.storage[e]||null}setItem(e,r){return this.storage[e]=r}removeItem(e){delete this.storage[e]}clear(){this.storage={}}constructor(){Lo(this,"storage",void 0),this.storage={}}},sr=class{get(){try{return JSON.parse(this.storage.getItem(this.key))}catch{return null}}set(e){this.storage.setItem(this.key,JSON.stringify(e))}remove(){this.storage.removeItem(this.key)}clear(){this.storage.clear()}keyByIndex(e){return this.storage.key(e)}get length(){return this.storage.length}constructor(e,r){Lo(this,"prefix","adyen-checkout__"),Lo(this,"key",void 0),Lo(this,"storage",void 0);try{if(this.storage=r?window[r]:window.localStorage,!this.storage)throw new Error("storage does not exist")}catch{this.storage=new an}this.key=this.prefix+e}};var Yd='WARNING: Failed to retrieve "checkoutAttemptId". Consequently, analytics will not be available for this payment. The payment process, however, will not be affected.',rc=({analyticsContext:t,clientKey:e,locale:r,analyticsPath:o,bundleType:s})=>{let n,i={errorLevel:"fatal",loadingContext:t,path:`${o}?clientKey=${e}`};return c=>{let d={version:"6.18.0",channel:"Web",platform:"Web",buildType:s,locale:r,referrer:window.location.href,screenWidth:window.screen.width,...c};if(n)return n;if(!e)return Promise.reject("no-client-key");let p=new sr("checkout-attempt-id","sessionStorage"),u=p.get();return function(l){if(!l?.id)return!1;let h=Date.now()-9e5;return l.timestamp>h}(u)?Promise.resolve(u.id):(n=J(i,d).then(l=>{if(l?.checkoutAttemptId)return p.set({id:l.checkoutAttemptId,timestamp:Date.now()}),l.checkoutAttemptId}).catch(()=>Promise.reject(Yd)),n)}};var oc=({analyticsContext:t,clientKey:e,analyticsPath:r})=>{let o={channel:"Web",platform:"Web",info:[],errors:[],logs:[]};return{add:(s,n)=>{o[s].push(n)},run:s=>{let n=(i=>o.info.length||o.logs.length||o.errors.length?J({errorLevel:"silent",loadingContext:t,path:`${r}/${i}?clientKey=${e}`},o).then(()=>{}).catch(()=>{console.debug("### EventsQueue:::: send has failed")}):Promise.resolve(null))(s);return o.info=[],o.errors=[],o.logs=[],n},getQueue:()=>o}};var Lr=null,ln=null,sc=({locale:t,clientKey:e,analytics:r,amount:o,analyticsContext:s,bundleType:n})=>{let i={enabled:!0,checkoutAttemptId:null,analyticsData:{},...r},c=rc({analyticsContext:s,clientKey:e,locale:t,analyticsPath:Fs,bundleType:n}),d=oc({analyticsContext:s,clientKey:e,analyticsPath:Fs}),p=()=>Lr?d.run(Lr):Promise.resolve(null);return{setUp:async u=>{let{payload:l,enabled:h}=i,m=h?Us.all:Us.initial,y=tl(i.analyticsData);if(!Lr)try{Lr=await c({...u,...l&&{...l},...Object.keys(y).length&&{...y},level:m})}catch(b){console.warn("Fetching checkoutAttemptId failed."+(b?` Error=${b}`:""))}},getCheckoutAttemptId:()=>Lr,getEventsQueue:()=>d,getEnabled:()=>i.enabled,sendAnalytics:u=>i.enabled?(((l,h)=>{let m=l===Ne.info?l:`${l}s`;d.add(`${m}`,h),l===Ne.info&&(clearTimeout(ln),ln=setTimeout(()=>{p()},$i)),l!==Ne.log&&l!==Ne.error||(clearTimeout(ln),ji(p)())})(u.getEventCategory(),u),!0):!1}};function nc(t,e){let r=`${Pe}/sessions/${e.id}/payments?clientKey=${e.clientKey}`,o={sessionData:e.data,...t};return J({loadingContext:e.loadingContext,path:r,errorLevel:"fatal",errorCode:ut.makePayments},o)}function ac(t,e){let r=`${Pe}/sessions/${e.id}/paymentDetails?clientKey=${e.clientKey}`,o={...e.data&&{sessionData:e.data},...t};return J({loadingContext:e.loadingContext,path:r,errorLevel:"fatal",errorCode:ut.submitPaymentDetails},o)}function ic(t,e){let r=`${Pe}/sessions/${t.id}/setup?clientKey=${t.clientKey}`,o={browserInfo:e.browserInfo,sessionData:t.data,...e.order?{order:{orderData:e.order.orderData,pspReference:e.order.pspReference}}:{}};return J({loadingContext:t.loadingContext,path:r,errorLevel:"fatal"},o)}function lc(t,e){let r=`${Pe}/sessions/${e.id}/paymentMethodBalance?clientKey=${e.clientKey}`,o={sessionData:e.data,...t};return J({loadingContext:e.loadingContext,path:r,errorLevel:"fatal"},o)}function cc(t){let e=`${Pe}/sessions/${t.id}/orders?clientKey=${t.clientKey}`,r={sessionData:t.data};return J({loadingContext:t.loadingContext,path:e,errorLevel:"fatal",errorCode:ut.createOrder},r)}function dc(t){if(!t||!t.id)throw new v("IMPLEMENTATION_ERROR","Invalid session");let{shopperLocale:e,shopperEmail:r,telephoneNumber:o,id:s}=t;return{id:s,...t.sessionData?{sessionData:t.sessionData}:{},...e&&{shopperLocale:e},...r&&{shopperEmail:r},...o&&{telephoneNumber:o}}}function pc(t,e){let r=`${Pe}/sessions/${e.id}/orders/cancel?clientKey=${e.clientKey}`,o={sessionData:e.data,order:t};return J({loadingContext:e.loadingContext,path:r,errorLevel:"fatal"},o)}function Ur(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Uo=class{get shopperLocale(){return this.session.shopperLocale}get id(){return this.session.id}get data(){return this.session.sessionData}updateSessionData(e){this.session.sessionData=e,this.storeSession()}setupSession(e){let r={...e,browserInfo:lt()};return ic(this,r).then(o=>(o.configuration&&(this.configuration={...o.configuration}),o.sessionData&&this.updateSessionData(o.sessionData),o))}submitPayment(e){return nc(e,this).then(r=>(r.sessionData&&this.updateSessionData(r.sessionData),r))}submitDetails(e){return ac(e,this).then(r=>(r.sessionData&&this.updateSessionData(r.sessionData),r))}checkBalance(e){return lc(e,this).then(r=>(r.sessionData&&this.updateSessionData(r.sessionData),r))}createOrder(){return cc(this).then(e=>(e.sessionData&&this.updateSessionData(e.sessionData),e))}cancelOrder(e){return pc(e.order,this).then(r=>(r.sessionData&&this.updateSessionData(r.sessionData),r))}getStoredSession(){let e=this.storage.get();return this.id===e?.id?e:this.session}storeSession(){this.storage.set({id:this.session.id,sessionData:this.session.sessionData})}removeStoredSession(){this.storage.remove()}constructor(e,r,o){Ur(this,"session",void 0),Ur(this,"storage",void 0),Ur(this,"clientKey",void 0),Ur(this,"loadingContext",void 0),Ur(this,"configuration",void 0);let s=dc(e);if(!r)throw new Error("No clientKey available");if(!o)throw new Error("No loadingContext available");this.storage=new sr("session","localStorage"),this.clientKey=r,this.loadingContext=o,this.session=s,this.session.sessionData?this.storeSession():this.session=this.getStoredSession()}};function cn(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Bo=class{getImage(e={}){return this.getImageUrl({...e,resourceContext:this.resourceContext})}constructor(e){if(cn(this,"resourceContext",void 0),cn(this,"returnImage",({name:r,resourceContext:o,imageFolder:s="",parentFolder:n="",extension:i,size:c="",subFolder:d=""})=>`${o}images/${s}${d}${n}${r}${c}.${i}`),cn(this,"getImageUrl",({resourceContext:r,extension:o="svg",...s})=>n=>{let i={extension:o,resourceContext:r,imageFolder:"logos/",parentFolder:"",name:n,...s};return this.returnImage(i)}),!e)throw new v("IMPLEMENTATION_ERROR",'Resources module: "environmentsUrls.cdn" is not a valid URL');this.resourceContext=e}};function uc({setComponentRef:t}){let e=rt({});Object.keys(e.current).length||t?.(e.current);let[r,o]=ye(null);return e.current.setMessages=s=>{o(s)},r?f(tt,null,r.map(s=>f("div",{key:s,className:"adyen-checkout-sr-panel__msg"},s))):null}function je(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var nr=class extends qe{get enabled(){return this._enabled}get moveFocus(){return this._moveFocus}setAriaProps(e){let r=document.querySelector('[class^="adyen-checkout-sr-panel"]');for(let[o,s]of Object.entries(e))r.setAttribute(o,s);this.props={...this.props,ariaAttributes:{...this.props.ariaAttributes,...e}}}render(){return this.props.enabled?f("div",{className:this.showPanel?"adyen-checkout-sr-panel":"adyen-checkout-sr-panel--sr-only",role:"log",...this.props.ariaAttributes},f(uc,{setComponentRef:this.setComponentRef})):null}constructor(e,r){if(super(e,r),je(this,"srPanelContainer",null),je(this,"id",void 0),je(this,"showPanel",void 0),je(this,"_enabled",void 0),je(this,"_moveFocus",void 0),je(this,"componentRef",void 0),je(this,"setComponentRef",o=>{this.componentRef=o}),je(this,"setMessages",o=>{if(!this.props.enabled)return;let s=null;o&&(s=Array.isArray(o)?o:[o]),this.componentRef.setMessages(s)}),this.id=this.props.id,this.showPanel=!1,this._enabled=!1,this._moveFocus=this.props.moveFocus??!0,this.props.enabled){this._enabled=!0;let o=document.querySelector(this.props.node);if(!o)throw new Error("Component could not mount. Root node was not found.");{let s=document.getElementById(this.id);s&&o.removeChild(s),this.srPanelContainer=document.createElement("div"),this.srPanelContainer.className="sr-panel-holder",this.srPanelContainer.id=this.id,o.appendChild(this.srPanelContainer),this.mount(this.srPanelContainer)}}}};je(nr,"type","srPanel"),je(nr,"defaultProps",{enabled:!0,node:"body",showPanel:!1,id:"ariaLiveSRPanel",ariaAttributes:{"aria-relevant":"all","aria-live":"polite","aria-atomic":"true"}});function mc(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var jd={[ee.redirect]:_t,[ee.threeDS2Challenge]:Qt,[ee.threeDS2DeviceFingerprint]:tr},ar=new class{add(...t){this.componentsMap={...this.componentsMap,...this.createComponentsMap(t)}}getComponent(t){return this.componentsMap[t]||(this.supportedTxVariants.has(t)?void 0:_t)}createComponentsMap(t){return t.reduce((e,r)=>{var o;return typeof(o=r).type=="string"&&o.type?(r.type==="dropin"||[r.type,...r.txVariants].filter(s=>s).forEach(s=>{e={...e,[s]:r}}),e):(console.error("CoreRegistry: Attempt to register Class failed. The Class is not a valid UIElement"),e)},{})}constructor(){mc(this,"componentsMap",jd),mc(this,"supportedTxVariants",new Set(Object.values(ee)))}};var hc="en-US";async function fc(t,e,r){try{return await Os({loadingContext:t,errorLevel:"fatal",errorMessage:`Translations: Failed to fetch translations for locale "${r}"`,path:`sdk/${e}/translations/${r}.json`})}catch{return await Os({loadingContext:t,errorLevel:"fatal",errorMessage:`Translations: Couldn't fetch translation for locale "${r}" nor the fallback translation "en-US"`,path:`sdk/${e}/translations/en-US.json`})}}var _c={exposeLibraryMetadata:!0,showPayButton:!0};function fe(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var yt=class t{static setBundleType(e){t.metadata.bundleType=e}static register(...e){ar.add(...e)}register(...e){ar.add(...e)}getComponent(e){return ar.getComponent(e)}async initialize(){return await this.initializeCore(),this.validateCoreConfiguration(),await this.createCoreModules(),this}async initializeCore(){return this.session?this.session.setupSession(this.options).then(e=>{let{amount:r,shopperLocale:o,countryCode:s,paymentMethods:n,...i}=e;return this.setOptions({...i,amount:this.options.order?this.options.order.remainingAmount:r,locale:this.options.locale||o,countryCode:this.options.countryCode||s}),this.createPaymentMethodsList(n),this}).catch(e=>(this.options.onError&&this.options.onError(e),Promise.reject(e))):(this.createPaymentMethodsList(),Promise.resolve(this))}async fetchLocaleTranslations(){try{return await fc(this.cdnTranslationsUrl,t.metadata.version,this.options.locale)}catch(e){e instanceof v?this.options.onError?.(e):this.options.onError?.(new v("ERROR","Failed to fetch translation",{cause:e}))}}validateCoreConfiguration(){if(this.options.paymentMethodsConfiguration&&console.warn('WARNING: "paymentMethodsConfiguration" is supported only by Drop-in.'),!this.options.countryCode)throw new v(As,"You must specify a countryCode when initializing checkout.");this.options.locale||this.setOptions({locale:hc}),this.options.locale=ks(this.options.locale),this.options.translations=Ui(this.options.translations)}submitDetails(e){let r=null;this.options.onAdditionalDetails&&(r=new Promise((o,s)=>{this.options.onAdditionalDetails({data:e},void 0,{resolve:o,reject:s})})),this.session&&(r=this.session.submitDetails(e).catch(o=>(this.options.onError?.(o),Promise.reject(o)))),r?r.then(Xe).then(Je).then(this.afterAdditionalDetails).then(o=>{Wt(o),this.options.onPaymentCompleted?.(o)}).catch(o=>{o instanceof dt||(Wt(o),this.options.onPaymentFailed?.(o))}):this.options.onError?.(new v("IMPLEMENTATION_ERROR",'It can not submit the details. The callback "onAdditionalDetails" or the Session is not setup correctly.'))}createFromAction(e,r={}){if(!e||!e.type)throw R(e,"action")&&R(e,"resultCode")?new Error('createFromAction::Invalid Action - the passed action object itself has an "action" property and a "resultCode": have you passed in the whole response object by mistake?'):new Error('createFromAction::Invalid Action - the passed action object does not have a "type" property');if(e.type){let o=e.type===Re?`${e.type}${e.subtype}`:e.paymentMethodType,s=new de({type:Gi,subType:e.type,message:`${o} action was handled by the SDK`,component:o});this.modules.analytics.sendAnalytics(s);let n={...this.getCorePropsForComponent(),...r};return tc(this,ar,e,n)}return this.handleCreateError()}getCorePropsForComponent(){return{...Hl(this.options),core:this,i18n:this.modules.i18n,modules:this.modules,session:this.session,loadingContext:this.loadingContext,cdnContext:this.cdnImagesUrl,createFromAction:this.createFromAction}}storeElementReference(e){e&&this.components.push(e)}handleCreateError(e){let r=e?`${e?.name??"The passed payment method"} is not a valid Checkout Component. What was passed as a txVariant was: ${JSON.stringify(e)}. Check if this payment method is configured in the Backoffice or if the txVariant is a valid one`:"No Payment Method component was passed";throw new Error(r)}createPaymentMethodsList(e){this.paymentMethodsResponse=new Mo(this.options.paymentMethodsResponse||e,this.options)}async createCoreModules(){if(this.modules)return;let e=await this.fetchLocaleTranslations();this.modules=Object.freeze({risk:new or(this,{...this.options,loadingContext:this.loadingContext}),analytics:sc({loadingContext:this.loadingContext,analyticsContext:this.analyticsContext,clientKey:this.options.clientKey,locale:this.options.locale,analytics:this.options.analytics,amount:this.options.amount,bundleType:t.metadata.bundleType}),resources:new Bo(this.cdnImagesUrl),i18n:new Oo({locale:this.options.locale,translations:e,customTranslations:this.options.translations}),srPanel:new nr(this,{...this.options.srConfig})})}constructor(e){fe(this,"session",void 0),fe(this,"paymentMethodsResponse",void 0),fe(this,"modules",void 0),fe(this,"options",void 0),fe(this,"analyticsContext",void 0),fe(this,"loadingContext",void 0),fe(this,"cdnImagesUrl",void 0),fe(this,"cdnTranslationsUrl",void 0),fe(this,"components",[]),fe(this,"afterAdditionalDetails",c=>{if(this.options.afterAdditionalDetails&&c?.action){let d=this.createFromAction(c.action);return this.options.afterAdditionalDetails(d),Promise.reject(new dt("Handled by afterAdditionalDetails"))}return Promise.resolve(c)}),fe(this,"update",(c={})=>(this.setOptions(c),this.initialize().then(()=>(this.components.forEach(d=>{let p={...c,...this.session&&{session:this.session}};d.update(p)}),this)))),fe(this,"remove",c=>(this.components=this.components.filter(d=>d._id!==c._id),c.unmount(),this)),fe(this,"setOptions",c=>{this.options={...this.options,...c,locale:c?.locale||this.options?.locale}}),Yl(e),this.createFromAction=this.createFromAction.bind(this),this.setOptions({..._c,...e});let{apiUrl:r,analyticsUrl:o,cdnImagesUrl:s,cdnTranslationsUrl:n}=Vl(this.options.environment,this.options._environmentUrls);this.loadingContext=r,this.analyticsContext=o,this.cdnImagesUrl=s,this.cdnTranslationsUrl=n,this.session=this.options.session&&new Uo(this.options.session,this.options.clientKey,this.loadingContext);let i=this.options.clientKey?.substring(0,4);if((i==="test"||i==="live")&&!this.loadingContext.includes(i))throw new v("IMPLEMENTATION_ERROR",`Error: you are using a ${i} clientKey against the ${this.options._environmentUrls?.api||this.options.environment} environment`);i==="pub."&&console.debug(`The value you are passing as your "clientKey" looks like an originKey (${this.options.clientKey?.substring(0,12)}..). Although this is supported it is not the recommended way to integrate. To generate a clientKey, see the documentation (https://docs.adyen.com/development-resources/client-side-authentication/migrate-from-origin-key-to-client-key/) for more details.`),this.options.exposeLibraryMetadata&&(window.AdyenWebMetadata=t.metadata)}};fe(yt,"metadata",{version:"6.18.0",bundleType:"esm"}),fe(yt,"registry",ar);async function Ce(t){return await new yt(t).initialize()}Ce.register=(...t)=>{yt.register(...t)},Ce.setBundleType=t=>{yt.setBundleType(t)};var yc={"en-US":{"cards.title":"Card payment","cards.cardNumber":"Card number","cards.expiryDate":"Expiry date","cards.securityCode3Digits":"Security code","cards.securityCode3DigitsOptional":"Security code (optional)","cards.securityCode3DigitsInfo":"3-digit on the back of the card","cards.securityCode4DigitsInfo":"4-digit on the back of the card","cards.storePaymentMethod":"Store payment information","googlePay.title":"Google Pay","applePay.title":"Apple Pay","stored-cards.expiryDate":"Expiry date","stored-cards.securityCode3Digits":"Security code","stored-cards.securityCode3DigitsOptional":"Security code (optional)","stored-cards.securityCode3DigitsInfo":"3-digit on the back of the card","stored-cards.securityCode4DigitsInfo":"4-digit on the back of the card","stored-cards.removeStoredCard":"Remove","stored-cards.removeStoredCardQuestion":"Remove stored payment method?","stored-cards.removeStoredCardQuestionYesRemove":"Yes, remove","stored-cards.removeStoredCardQuestionCancel":"Cancel","success.paymentAuthorized":"Payment authorized","error.unknownError":"Unknown error occurred","error.failedToInitializeStraumurWebComponent":"Failed to initialize Straumur Web component","error.failedToInitializePaymentMethods":"Failed to initialize payment methods","error.failedToSubmitPayment":"Failed to submit payment","error.paymentFailed":"Payment failed","error.paymentUnsuccessful":"Payment unsuccessful","error.failedToSubmitPaymentDetails":"Failed to submit payment details","error.paymentDetailsFailed":"Payment details failed","error.googlePayNotAvailable":"Google Pay not available","error.applePayNotAvailable":"Apple Pay not available","error.failedToSubmitRemoveStoredPaymentCard":"Failed to remove stored payment card","error.failedToRemoveStoredPaymentCard":"Stored payment card was not removed"},"is-IS":{"cards.title":"Grei\xF0a me\xF0 korti","cards.cardNumber":"Kortan\xFAmer","cards.expiryDate":"Gildisdagur","cards.securityCode3Digits":"\xD6ryggisk\xF3\xF0i","cards.securityCode3DigitsOptional":"\xD6ryggisk\xF3\xF0i (valkv\xE6tt)","cards.securityCode3DigitsInfo":"3 t\xF6lustafir aftan \xE1 kortinu","cards.securityCode4DigitsInfo":"4 t\xF6lustafir aftan \xE1 kortinu","cards.storePaymentMethod":"Vista grei\xF0sluuppl\xFDsingar","googlePay.title":"Google Pay","applePay.title":"Apple Pay","stored-cards.expiryDate":"Gildisdagur","stored-cards.securityCode3Digits":"\xD6ryggisk\xF3\xF0i","stored-cards.securityCode3DigitsOptional":"\xD6ryggisk\xF3\xF0i (valkv\xE6tt)","stored-cards.securityCode3DigitsInfo":"3 t\xF6lustafir aftan \xE1 kortinu","stored-cards.securityCode4DigitsInfo":"4 t\xF6lustafir aftan \xE1 kortinu","stored-cards.removeStoredCard":"Fjarl\xE6gja","stored-cards.removeStoredCardQuestion":"Fjarl\xE6gja geymdan grei\xF0slum\xE1ta?","stored-cards.removeStoredCardQuestionYesRemove":"J\xE1, fjarl\xE6gja","stored-cards.removeStoredCardQuestionCancel":"H\xE6tta vi\xF0","success.paymentAuthorized":"Grei\xF0sla sam\xFEykkt","error.unknownError":"\xD3\xFEekkt villa kom upp","error.failedToInitializeStraumurWebComponent":"Mist\xF3kst a\xF0 s\xE6kja Straumur Web hluta","error.failedToInitializePaymentMethods":"Mist\xF3kst a\xF0 s\xE6kja grei\xF0slum\xE1ta","error.failedToSubmitPayment":"Mist\xF3kst a\xF0 senda grei\xF0slu","error.paymentFailed":"Grei\xF0sla mist\xF3kst","error.paymentUnsuccessful":"Grei\xF0sla ekki tekin","error.failedToSubmitPaymentDetails":"Mist\xF3kst a\xF0 senda grei\xF0sluuppl\xFDsingar","error.paymentDetailsFailed":"Mist\xF3kst a\xF0 s\xE6kja grei\xF0sluuppl\xFDsingar","error.googlePayNotAvailable":"Google Pay ekki \xED bo\xF0i","error.applePayNotAvailable":"Apple Pay ekki \xED bo\xF0i","error.failedToSubmitRemoveStoredPaymentCard":"Mist\xF3kst a\xF0 fjarl\xE6gja geymdan grei\xF0slum\xE1ta","error.failedToRemoveStoredPaymentCard":"Geymdur grei\xF0slum\xE1ti var ekki fjarl\xE6g\xF0ur"}};function V(t,e){return yc[t][e]||e}ce(`.straumur__tooltip__content{position:absolute;z-index:50;padding:var(--straumur__space-s);border-radius:var(--straumur__border-radius-s);right:40%;top:100%;width:max-content;color:var(--straumur__color-white);background-color:var(--straumur__color-primary);box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -2px #0000000d}
|
|
7
|
+
`);var ir=({children:t,content:e})=>{let[r,o]=z(!1),s=ne(null);return a("div",{style:{position:"relative"}},a("div",{ref:s,onMouseEnter:()=>{o(!0)},onMouseLeave:()=>{o(!1)}},t),r&&s&&a("div",{className:"straumur__tooltip__content"},e))};var $d=()=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"26",viewBox:"0 0 24 24",fill:"none"},a("path",{d:"M24 11H0V7H24V11Z",fill:"#002649"}),a("path",{opacity:"0.4",d:"M21.3333 3C22.8042 3 24 4.19375 24 5.66667V7H0V5.66667C0 4.19375 1.19375 3 2.66667 3H21.3333ZM24 19C24 20.4708 22.8042 21.6667 21.3333 21.6667H2.66667C1.19375 21.6667 0 20.4708 0 19V11H24V19ZM4.66667 16.3333C4.3 16.3333 4 16.6333 4 17C4 17.3667 4.3 17.6667 4.66667 17.6667H7.33333C7.7 17.6667 8 17.3667 8 17C8 16.6333 7.7 16.3333 7.33333 16.3333H4.66667ZM10 17.6667H15.3333C15.7 17.6667 16 17.3667 16 17C16 16.6333 15.7 16.3333 15.3333 16.3333H10C9.63333 16.3333 9.33333 16.6333 9.33333 17C9.33333 17.3667 9.63333 17.6667 10 17.6667Z",fill:"#002649"})),gc=$d;var zd=()=>a("svg",{width:"21",height:"20",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a("g",{"clip-path":"url(#clip0_10626_39119)"},a("path",{d:"M10.6641 7.5C11.3543 7.5 11.9141 6.94023 11.9141 6.25C11.9141 5.55977 11.3543 5 10.6641 5C9.97383 5 9.41406 5.55859 9.41406 6.25C9.41406 6.94141 9.97266 7.5 10.6641 7.5ZM12.2266 13.125H11.6016V9.6875C11.6016 9.17188 11.1836 8.75 10.6641 8.75H9.41406C8.89844 8.75 8.47656 9.17188 8.47656 9.6875C8.47656 10.2031 8.89844 10.625 9.41406 10.625H9.72656V13.125H9.10156C8.58594 13.125 8.16406 13.5469 8.16406 14.0625C8.16406 14.5781 8.58594 15 9.10156 15H12.2266C12.7441 15 13.1641 14.5801 13.1641 14.0625C13.1641 13.5449 12.7461 13.125 12.2266 13.125Z",fill:"#002649"}),a("path",{opacity:"0.4",d:"M10.6641 0C5.14062 0 0.664062 4.47656 0.664062 10C0.664062 15.5234 5.14062 20 10.6641 20C16.1875 20 20.6641 15.5234 20.6641 10C20.6641 4.47656 16.1875 0 10.6641 0ZM10.6641 5C11.3543 5 11.9141 5.55977 11.9141 6.25C11.9141 6.94023 11.3543 7.5 10.6641 7.5C9.97383 7.5 9.41406 6.94141 9.41406 6.25C9.41406 5.55859 9.97266 5 10.6641 5ZM12.2266 15H9.10156C8.58594 15 8.16406 14.582 8.16406 14.0625C8.16406 13.543 8.58398 13.125 9.10156 13.125H9.72656V10.625H9.41406C8.89648 10.625 8.47656 10.2051 8.47656 9.6875C8.47656 9.16992 8.89844 8.75 9.41406 8.75H10.6641C11.1816 8.75 11.6016 9.16992 11.6016 9.6875V13.125H12.2266C12.7441 13.125 13.1641 13.5449 13.1641 14.0625C13.1641 14.5801 12.7461 15 12.2266 15Z",fill:"#002649"})),a("defs",null,a("clipPath",{id:"clip0_10626_39119"},a("rect",{width:"20",height:"20",fill:"white",transform:"translate(0.664062)"})))),Vo=zd;var Gd=({opacity:t=1})=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"26",viewBox:"0 0 40 26",opacity:t},a("path",{fill:"#fff",d:"M0 0h40v26H0z"}),a("path",{fill:"#F06022",d:"M16.13 19.29h7.74V6.7h-7.74v12.58z"}),a("path",{fill:"#EA1D25",d:"M16.93 13A7.93 7.93 0 0 1 20 6.71a8.02 8.02 0 0 0-10.65.65 7.96 7.96 0 0 0 0 11.28 8.02 8.02 0 0 0 10.65.65A8.02 8.02 0 0 1 16.93 13"}),a("path",{fill:"#F79D1D",d:"M33 13c0 2.12-.84 4.15-2.34 5.65a8.1 8.1 0 0 1-10.66.64A8.05 8.05 0 0 0 23.07 13 7.96 7.96 0 0 0 20 6.71a8.02 8.02 0 0 1 10.66.64A7.93 7.93 0 0 1 33 13"})),vc=Gd;var Kd=({opacity:t=1})=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"26",fill:"none",viewBox:"0 0 40 26",opacity:t},a("path",{fill:"#fff",d:"M0 0h40v26H0z"}),a("path",{fill:"#1434CB",d:"m15.9 7.7-4.43 10.6h-2.9l-2.2-8.47c-.13-.52-.25-.71-.65-.93C5.05 8.55 3.96 8.2 3 8l.07-.32h4.67c.6 0 1.13.4 1.27 1.09l1.15 6.14 2.86-7.23h2.89Zm11.39 7.15c0-2.8-3.88-2.96-3.85-4.21 0-.38.37-.79 1.16-.9a5.2 5.2 0 0 1 2.71.48l.48-2.25a7.4 7.4 0 0 0-2.57-.47c-2.71 0-4.62 1.44-4.64 3.51-.02 1.53 1.36 2.38 2.4 2.9 1.08.51 1.44.85 1.43 1.31 0 .71-.85 1.03-1.64 1.04-1.39.02-2.19-.37-2.82-.67l-.5 2.33c.64.29 1.82.55 3.05.56 2.89 0 4.78-1.42 4.79-3.63Zm7.17 3.46H37L34.78 7.7h-2.34c-.53 0-.98.3-1.17.78l-4.12 9.84h2.88l.57-1.58h3.53l.33 1.58Zm-3.07-3.76 1.45-3.99.83 4H31.4ZM19.83 7.7l-2.27 10.62h-2.74L17.09 7.7h2.74Z"})),Cc=Kd;var Wd=({opacity:t=1})=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"26",fill:"none",viewBox:"0 0 40 26",opacity:t},a("path",{fill:"#fff",d:"M0 0h40v26H0z"}),a("path",{fill:"#7773B4",d:"M16.13 19.29h7.74V6.7h-7.74v12.58z"}),a("path",{fill:"#EA1D25",d:"M16.93 13A7.93 7.93 0 0 1 20 6.71a8.02 8.02 0 0 0-10.65.65 7.96 7.96 0 0 0 0 11.28 8.02 8.02 0 0 0 10.65.65A8.02 8.02 0 0 1 16.93 13"}),a("path",{fill:"#139FDA",d:"M33 13c0 2.12-.84 4.15-2.34 5.65a8.1 8.1 0 0 1-10.66.64A8.05 8.05 0 0 0 23.07 13 7.96 7.96 0 0 0 20 6.71a8.02 8.02 0 0 1 10.66.64A7.93 7.93 0 0 1 33 13"})),bc=Wd;var Zd=({opacity:t=1})=>a("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 40 26",width:"40",height:"26",opacity:t},a("path",{fill:"#016FD0",d:"M0 26h40V0H0v26z"}),a("path",{fill:"#fff","fill-rule":"evenodd",d:"M30.69 13.63v1.64h-4.17v1.14h4.07v1.64h-4.07v1.12h4.17v1.66l3.38-3.6-3.38-3.6zm-1.1-6.14-1.4-3.19h-4l-4.1 9.32h3.33v8.27l10.28.01 1.61-1.8 1.63 1.8H40v-2.63l-1.92-2.06L40 15.16v-2.59l-1.93.01V7.6l-1.81 4.98H34.5l-1.86-5v5h-4.2l-.6-1.46h-3.3l-.6 1.46h-2.22l3.23-7.27V5.3h2.55l3.19 7.21V5.3l3.1.01 1.6 4.47 1.62-4.48H40v-1h-3.77l-.85 2.39-.85-2.39h-4.94v3.19zm-5.06 6.11v7.27h6.16v-.01h2.54l2.1-2.32 2.12 2.32H40v-.1l-3.34-3.53L40 13.65v-.05h-2.52l-2.1 2.3-2.08-2.3h-8.77zm.7-4.11.96-2.31.97 2.31h-1.93z"})),Ec=Zd;var qd=({opacity:t=1})=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"26",fill:"none",viewBox:"0 0 40 26",opacity:t},a("g",{"clip-path":"url(#a)"},a("path",{fill:"#fff",d:"M0 0h40v26H0V0Z"}),a("path",{fill:"#fff",d:"M36.6 20.66a5.22 5.22 0 0 1-5.22 5.22H3V5.22A5.22 5.22 0 0 1 8.22 0H36.6v20.66Z"}),a("path",{fill:"url(#b)",d:"M27.36 15.36h2.15l.27-.02a.96.96 0 0 0 .76-.96 1 1 0 0 0-.76-.97c-.06-.02-.19-.02-.27-.02h-2.15v1.97Z"}),a("path",{fill:"url(#c)",d:"M29.27 1.75a3.74 3.74 0 0 0-3.74 3.73v3.89h5.28c.12 0 .26 0 .37.02 1.19.06 2.07.67 2.07 1.74 0 .84-.6 1.56-1.7 1.7v.05c1.2.08 2.13.76 2.13 1.8 0 1.13-1.03 1.87-2.38 1.87h-5.8v7.6H31a3.74 3.74 0 0 0 3.73-3.74V1.75h-5.46Z"}),a("path",{fill:"url(#d)",d:"M30.27 11.38c0-.5-.35-.82-.76-.89l-.2-.02h-1.95v1.81h1.95c.06 0 .18 0 .2-.02a.87.87 0 0 0 .76-.88Z"}),a("path",{fill:"url(#e)",d:"M8.6 1.75a3.74 3.74 0 0 0-3.73 3.73v9.22a7.4 7.4 0 0 0 3.22.85c1.3 0 2-.78 2-1.85V9.34h3.2v4.34c0 1.68-1.05 3.06-4.6 3.06-2.16 0-3.84-.47-3.84-.47v7.86h5.48a3.74 3.74 0 0 0 3.74-3.74V1.75H8.6Z"}),a("path",{fill:"url(#f)",d:"M18.94 1.75a3.74 3.74 0 0 0-3.74 3.73v4.9c.94-.8 2.59-1.32 5.24-1.2 1.41.06 2.93.45 2.93.45v1.58a7.1 7.1 0 0 0-2.83-.82c-2.01-.14-3.23.84-3.23 2.57 0 1.74 1.22 2.73 3.23 2.57a7.46 7.46 0 0 0 2.83-.82v1.58s-1.5.39-2.93.45c-2.65.12-4.3-.4-5.24-1.2v8.63h5.48a3.74 3.74 0 0 0 3.74-3.74V1.75h-5.48Z"})),a("defs",null,a("linearGradient",{id:"b",x1:"25.52",x2:"34.75",y1:"14.38",y2:"14.38",gradientUnits:"userSpaceOnUse"},a("stop",{offset:"0","stop-color":"#007940"}),a("stop",{offset:".23","stop-color":"#00873F"}),a("stop",{offset:".74","stop-color":"#40A737"}),a("stop",{offset:"1","stop-color":"#5CB531"})),a("linearGradient",{id:"c",x1:"25.52",x2:"34.75",y1:"12.94",y2:"12.94",gradientUnits:"userSpaceOnUse"},a("stop",{offset:"0","stop-color":"#007940"}),a("stop",{offset:".23","stop-color":"#00873F"}),a("stop",{offset:".74","stop-color":"#40A737"}),a("stop",{offset:"1","stop-color":"#5CB531"})),a("linearGradient",{id:"d",x1:"25.52",x2:"34.75",y1:"11.37",y2:"11.37",gradientUnits:"userSpaceOnUse"},a("stop",{offset:"0","stop-color":"#007940"}),a("stop",{offset:".23","stop-color":"#00873F"}),a("stop",{offset:".74","stop-color":"#40A737"}),a("stop",{offset:"1","stop-color":"#5CB531"})),a("linearGradient",{id:"e",x1:"4.86",x2:"14.24",y1:"12.94",y2:"12.94",gradientUnits:"userSpaceOnUse"},a("stop",{offset:"0","stop-color":"#1F286F"}),a("stop",{offset:".48","stop-color":"#004E94"}),a("stop",{offset:".83","stop-color":"#0066B1"}),a("stop",{offset:"1","stop-color":"#006FBC"})),a("linearGradient",{id:"f",x1:"15.15",x2:"24.25",y1:"12.94",y2:"12.94",gradientUnits:"userSpaceOnUse"},a("stop",{offset:"0","stop-color":"#6C2C2F"}),a("stop",{offset:".17","stop-color":"#882730"}),a("stop",{offset:".57","stop-color":"#BE1833"}),a("stop",{offset:".86","stop-color":"#DC0436"}),a("stop",{offset:"1","stop-color":"#E60039"})),a("clipPath",{id:"a"},a("path",{fill:"#fff",d:"M0 0h40v26H0z"})))),Sc=qd;var Xd=({opacity:t=1})=>a("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 40 26",width:"40",height:"26",opacity:t},a("path",{fill:"#fff",d:"M0 0h40v26H0z"}),a("g",{fill:"#1a1918"},a("path",{d:"M5.96 15.58c0-.56-.3-.52-.58-.53v-.16H7.2a2.28 2.28 0 0 1 2.5 2.2c0 .61-.36 2.17-2.57 2.17H5.38v-.16c.38-.04.56-.05.58-.48zm.61 2.94c0 .49.35.54.65.54a1.75 1.75 0 0 0 1.8-1.95 1.88 1.88 0 0 0-1.96-2.02c-.26 0-.37.02-.49.02zm3.36.58h.12c.17 0 .3 0 .3-.2v-1.7c0-.28-.1-.32-.33-.44v-.1l.67-.23a.22.22 0 0 1 .11-.03c.03 0 .05.04.05.09v2.4c0 .21.13.21.3.21h.11v.16H9.93zm.67-3.67a.3.3 0 0 1 0-.61.3.3 0 0 1 .3.3.31.31 0 0 1-.3.31zm1.26 1.8c0-.23-.07-.3-.36-.41v-.12a8.44 8.44 0 0 0 .82-.3c.02 0 .04.01.04.06v.4a1.83 1.83 0 0 1 1.08-.46c.53 0 .72.39.72.88v1.61c0 .21.14.21.31.21h.12v.16h-1.34v-.16h.11c.18 0 .3 0 .3-.2v-1.63c0-.36-.22-.53-.57-.53a1.66 1.66 0 0 0-.73.3v1.85c0 .21.14.21.31.21h.12v.16h-1.34v-.16h.1c.18 0 .3 0 .3-.2v-1.67m3.21.3a1.55 1.55 0 0 0 0 .37 1.05 1.05 0 0 0 .92 1.08 1.2 1.2 0 0 0 .85-.42l.08.09a1.47 1.47 0 0 1-1.15.7 1.26 1.26 0 0 1-1.2-1.36c0-1.23.83-1.6 1.27-1.6a1 1 0 0 1 1.05 1 .74.74 0 0 1 0 .1l-.06.04zm1.11-.2c.16 0 .18-.08.18-.16a.53.53 0 0 0-.55-.57c-.38 0-.64.28-.72.73zm.86 1.77h.17c.17 0 .3 0 .3-.2v-1.77c0-.2-.23-.23-.33-.28v-.1c.46-.19.7-.35.77-.35.03 0 .05.02.05.08v.56H18c.16-.24.42-.64.8-.64a.34.34 0 0 1 .36.33.3.3 0 0 1-.3.32c-.19 0-.19-.15-.4-.15a.53.53 0 0 0-.46.52v1.47c0 .21.12.21.3.21h.35v.16h-.88a26 26 0 0 0-.74 0zm2.41-.7a.83.83 0 0 0 .78.76.44.44 0 0 0 .51-.45c0-.74-1.36-.5-1.36-1.5a.86.86 0 0 1 .97-.81 1.64 1.64 0 0 1 .71.18l.04.64h-.14a.64.64 0 0 0-.68-.62.44.44 0 0 0-.49.41c0 .74 1.45.51 1.45 1.5 0 .4-.33.85-1.07.85a1.64 1.64 0 0 1-.77-.22l-.07-.72.12-.03m7.44-2.37h-.15A1.2 1.2 0 0 0 25.39 15a1.79 1.79 0 0 0-1.77 2 2.04 2.04 0 0 0 1.87 2.17 1.27 1.27 0 0 0 1.25-1.09l.15.04-.15.91a3.5 3.5 0 0 1-1.38.34A2.23 2.23 0 0 1 22.97 17a2.3 2.3 0 0 1 2.37-2.2 4.5 4.5 0 0 1 1.48.33l.06.9m.22 3.07h.13c.17 0 .3 0 .3-.2v-3.5c0-.4-.1-.42-.34-.49v-.1a3.96 3.96 0 0 0 .65-.27.66.66 0 0 1 .14-.07c.03 0 .05.04.05.1v4.32c0 .21.13.21.3.21h.12v.16H27.1zm4.02-.18c0 .11.07.12.18.12h.25v.12a6.33 6.33 0 0 0-.9.2l-.03-.02v-.5a1.69 1.69 0 0 1-1.11.52.68.68 0 0 1-.69-.75v-1.6c0-.17-.02-.32-.37-.35v-.12l.8-.05c.07 0 .07.05.07.18v1.62c0 .19 0 .73.55.73a1.4 1.4 0 0 0 .75-.38v-1.7c0-.12-.3-.18-.52-.25v-.11c.56-.04.91-.09.97-.09.05 0 .05.05.05.11zm1.25-2.07a1.58 1.58 0 0 1 .93-.45 1.22 1.22 0 0 1 1.16 1.31 1.58 1.58 0 0 1-1.5 1.65 1.84 1.84 0 0 1-.86-.22l-.19.14-.13-.07a7.37 7.37 0 0 0 .09-1.11v-2.7c0-.4-.1-.42-.33-.49v-.1a3.93 3.93 0 0 0 .64-.27.67.67 0 0 1 .14-.07c.04 0 .05.04.05.1zm0 1.7a.67.67 0 0 0 .64.64c.67 0 .95-.65.95-1.21a1.2 1.2 0 0 0-1-1.24.96.96 0 0 0-.6.3v1.51zM5.38 22.91h.04c.13 0 .26-.02.26-.2v-1.78c0-.18-.13-.2-.26-.2h-.04v-.1l.5.01.54-.01v.1h-.05c-.12 0-.25.02-.25.2v1.79c0 .17.13.19.25.19h.05v.1L5.88 23l-.5.01z"}),a("path",{d:"M6.42 23.03 5.88 23l-.5.02h-.02v-.14h.06c.13 0 .24 0 .24-.17v-1.8c0-.16-.11-.17-.24-.17h-.06v-.13h1.07v.13h-.06c-.13 0-.24.01-.24.18v1.79c0 .16.11.17.24.17h.06v.14zM6.4 23v-.08h-.03c-.12 0-.27-.02-.27-.2v-1.8c0-.18.15-.2.27-.2h.03v-.07h-1v.07h.03c.13 0 .27.02.27.2v1.8c0 .18-.14.2-.27.2H5.4V23l.49-.02.52.02zm2.35-.66h.01v-1.29a.28.28 0 0 0-.3-.32H8.4v-.1l.48.01.42-.01v.1h-.06c-.14 0-.3.03-.3.44v1.55a2.27 2.27 0 0 0 .02.34h-.13L7.07 21.1v1.41c0 .3.06.4.32.4h.06v.1L7 23l-.47.01v-.1h.05c.24 0 .3-.16.3-.43v-1.44a.3.3 0 0 0-.3-.3h-.05v-.11l.4.01.3-.01 1.51 1.71"}),a("path",{d:"M8.95 23.08h-.14l-1.73-1.94v1.37c0 .3.05.38.3.38h.08v.14h-.01L7 23l-.47.02h-.01v-.14h.06c.23 0 .3-.14.3-.41v-1.44a.3.3 0 0 0-.3-.3h-.06v-.12h.72l1.5 1.69v-1.26c0-.27-.19-.3-.29-.3h-.09v-.13h.94v.13h-.07c-.14 0-.28.01-.28.42v1.55a2.27 2.27 0 0 0 .02.34v.02zm-.13-.03h.11a2.3 2.3 0 0 1-.01-.33v-1.55c0-.41.17-.45.31-.45h.04v-.07H8.4v.07h.06a.3.3 0 0 1 .32.33v1.3h-.02v.01l-1.52-1.71h-.68v.07h.03a.32.32 0 0 1 .32.32v1.44c0 .27-.07.44-.32.45h-.03V23l.45-.02.42.02v-.07H7.4c-.27 0-.34-.12-.34-.42v-1.44l1.77 1.98zm-.07-.71.01-.01v.01zm0 0v-.01zM9.8 20.8c-.26 0-.27.06-.32.31h-.1l.04-.29a2.04 2.04 0 0 0 .02-.29h.08c.03.1.11.1.2.1h1.76c.1 0 .18 0 .18-.1h.09l-.04.28v.28l-.11.04c0-.13-.02-.33-.25-.33h-.56v1.82c0 .26.12.29.28.29h.07v.1l-.56-.01-.57.01v-.1h.06c.19 0 .28-.02.28-.29V20.8z"}),a("path",{d:"m11.14 23.03-.56-.02-.57.02h-.02v-.14h.08c.19 0 .26 0 .27-.27v-1.8H9.8v-.03h.57v1.83c0 .28-.11.3-.3.3h-.05V23l.56-.02.54.02v-.07h-.05c-.16 0-.3-.05-.3-.31v-1.83h.58c.23 0 .26.2.26.32l.08-.03a3.96 3.96 0 0 1 .04-.53h-.05c-.02.1-.11.1-.2.1H9.71c-.08 0-.17 0-.2-.1h-.06a2.04 2.04 0 0 1-.02.27c0 .1-.02.19-.04.28h.08c.04-.24.07-.32.33-.31v.03c-.26 0-.25.04-.3.3h-.14v-.01l.04-.3a1.93 1.93 0 0 0 .02-.28v-.01h.11c.03.1.09.1.18.1h1.77c.1 0 .16 0 .17-.1v-.01h.02l.1.02-.01.01-.04.28v.28h-.01l-.12.05v-.02c-.01-.13-.03-.31-.24-.31h-.55v1.8c0 .25.11.27.27.27h.08v.14zm.71-.12h.05c.12 0 .25-.02.25-.2v-1.78c0-.18-.13-.2-.25-.2h-.05v-.1l.85.01.87-.01.01.52-.1.03c-.02-.22-.06-.4-.42-.4h-.47v.9h.4c.2 0 .25-.12.27-.3h.1v.78l-.1.02c-.02-.2-.03-.33-.26-.33h-.4v.79c0 .22.19.22.4.22.41 0 .6-.03.7-.41l.1.02a7.7 7.7 0 0 0-.12.54l-.92-.01-.9.01v-.1"}),a("path",{d:"m13.68 23.03-.92-.02-.9.02h-.02v-.14h.06c.13 0 .24 0 .24-.17v-1.8c0-.16-.11-.17-.24-.17h-.06v-.13h1.75v.01a4.18 4.18 0 0 0 0 .52v.01l-.13.04v-.02c-.02-.22-.05-.38-.4-.38h-.46v.86h.4c.2 0 .23-.1.25-.29v-.01h.13v.01a8.08 8.08 0 0 0 0 .8h-.01l-.12.03v-.02c-.02-.2-.03-.32-.25-.32h-.4v.78c0 .2.18.2.4.2.42 0 .58-.02.68-.4v-.01h.02l.1.03v.01a7.8 7.8 0 0 0-.11.54v.02zm-.02-.03.11-.52-.06-.02c-.1.39-.3.42-.7.42-.22 0-.43 0-.44-.24v-.8H13c.24-.01.26.13.28.33l.07-.02a7.25 7.25 0 0 1 0-.76h-.07c-.02.18-.08.3-.29.3h-.42v-.92h.5c.35 0 .4.18.42.4l.07-.03a5.76 5.76 0 0 1 0-.5l-.86.02-.83-.01v.07h.03c.12 0 .27.02.27.2v1.8c0 .18-.15.2-.27.2h-.03V23l.89-.02zm.59-2c0-.26-.14-.27-.24-.27h-.06v-.1l.53.01.54-.01c.43 0 .81.12.81.6a.64.64 0 0 1-.47.6l.58.87a.38.38 0 0 0 .33.21v.1l-.33-.01-.32.01a9.45 9.45 0 0 1-.7-1.1h-.23v.73c0 .26.12.27.28.27h.06v.1l-.59-.01-.5.01v-.1h.07c.13 0 .24-.06.24-.18v-1.74zm.44.78h.16c.34 0 .53-.13.53-.53a.47.47 0 0 0-.5-.5 1.65 1.65 0 0 0-.2.02v1.01z"}),a("path",{d:"m16.27 23.03-.33-.02c-.1 0-.21.02-.33.01a9.54 9.54 0 0 1-.7-1.1h-.2v.72c0 .25.1.25.26.25h.07v.14h-.01l-.59-.02-.5.02v-.14H14c.12 0 .22-.05.23-.16v-1.74c0-.24-.13-.24-.23-.24h-.08v-.13h1.09c.43 0 .83.11.83.61a.65.65 0 0 1-.47.6l.57.87a.37.37 0 0 0 .32.2h.02v.13zm-1.58-1.14h.23a10.55 10.55 0 0 0 .7 1.1h.64v-.07a.39.39 0 0 1-.33-.2l-.6-.9h.02a.63.63 0 0 0 .47-.59c0-.47-.37-.58-.8-.58h-1.06v.07h.05c.1 0 .26.02.26.27v1.74c0 .13-.13.2-.26.2h-.05V23l.48-.02.57.02v-.07h-.04c-.16 0-.3-.02-.3-.3v-.74zm0-.1h-.02v-1.04h.01a1.63 1.63 0 0 1 .2-.01.48.48 0 0 1 .51.51c0 .4-.2.55-.54.55zm.16-.02c.34 0 .51-.12.51-.52a.45.45 0 0 0-.48-.48 1.33 1.33 0 0 0-.18.01v.99zm3.73.57h.01v-1.29a.28.28 0 0 0-.3-.32h-.07v-.1l.48.01.42-.01v.1h-.06c-.14 0-.3.03-.3.44v1.55a2.27 2.27 0 0 0 .02.34h-.13L16.9 21.1v1.41c0 .3.06.4.32.4h.06v.1l-.44-.01-.47.01v-.1h.05c.24 0 .3-.16.3-.43v-1.44a.3.3 0 0 0-.3-.3h-.05v-.11l.4.01.3-.01z"}),a("path",{d:"M18.78 23.08h-.14l-1.73-1.94v1.37c0 .3.05.38.3.38h.08v.14h-.01l-.44-.02-.47.02h-.01v-.14h.06c.23 0 .3-.14.3-.41v-1.44a.3.3 0 0 0-.3-.3h-.06v-.12h.71l1.5 1.69v-1.26c0-.27-.18-.3-.28-.3h-.09v-.13h.93v.13h-.07c-.14 0-.28.01-.28.42v1.55a2.15 2.15 0 0 0 .02.34v.02zm-.13-.03h.11a2.34 2.34 0 0 1-.01-.33v-1.55c0-.41.17-.45.31-.45h.04v-.07h-.87v.07h.06a.3.3 0 0 1 .32.33v1.3h-.02v.01l-1.52-1.71h-.68v.07h.03a.32.32 0 0 1 .32.32v1.44c0 .27-.07.44-.32.45h-.03V23l.45-.02.42.02v-.07h-.04c-.27 0-.34-.12-.34-.42v-1.44zm-.07-.71.01-.01v.01zm0 0v-.01zm1.08.18a1.38 1.38 0 0 0-.07.27c0 .1.14.12.25.12h.04v.1a7.72 7.72 0 0 0-.78 0v-.1h.02a.3.3 0 0 0 .3-.22l.54-1.57a2.87 2.87 0 0 0 .13-.42 1.73 1.73 0 0 0 .3-.15.08.08 0 0 1 .04 0 .02.02 0 0 1 .02 0l.03.1.63 1.78.12.34a.22.22 0 0 0 .23.14h.02v.1a9.66 9.66 0 0 0-.98 0v-.1h.03c.08 0 .22-.01.22-.1a1.1 1.1 0 0 0-.07-.25l-.14-.4h-.77l-.1.36zm.5-1.5-.32.96h.63l-.31-.97z"}),a("path",{d:"M21.48 23.03 21 23l-.51.02h-.02v-.14h.05c.08 0 .2-.01.2-.08a1.1 1.1 0 0 0-.07-.24l-.13-.39h-.75l-.1.35a1.41 1.41 0 0 0-.08.26c0 .08.13.1.24.1h.06v.14h-.02l-.41-.02-.37.02h-.01v-.14h.03a.3.3 0 0 0 .28-.2l.55-1.57a4.05 4.05 0 0 0 .13-.44 1.75 1.75 0 0 0 .31-.14.09.09 0 0 1 .03-.01.04.04 0 0 1 .04.02l.03.09.63 1.78c.04.12.08.25.13.35a.2.2 0 0 0 .2.12h.04v.14h-.01zM20.5 23l.5-.02.45.02v-.07a.23.23 0 0 1-.24-.15c-.05-.1-.09-.23-.13-.35l-.62-1.78-.03-.09h-.02a.08.08 0 0 0-.01 0 1.26 1.26 0 0 1-.3.14 2.83 2.83 0 0 1-.13.43l-.55 1.56a.32.32 0 0 1-.3.24h-.01V23l.35-.02.4.02v-.07h-.03c-.1 0-.26-.02-.27-.14a1.35 1.35 0 0 1 .08-.27h.01-.01l.11-.36h.8l.13.4a1.04 1.04 0 0 1 .07.25c0 .1-.15.11-.23.12h-.02zm-.7-1 .33-1h.03l.32 1zm.05-.04h.6l-.3-.91zm.28-.94h.01zm1.5-.22c-.26 0-.27.06-.32.31h-.1l.04-.29a2.1 2.1 0 0 0 .02-.29h.08c.03.1.11.1.2.1h1.76c.1 0 .18 0 .19-.1h.08l-.04.28v.28l-.1.04c-.02-.13-.03-.33-.26-.33h-.56v1.82c0 .26.12.29.28.29h.07v.1L22.4 23l-.57.01v-.1h.06c.19 0 .29-.02.29-.29V20.8h-.56"}),a("path",{d:"M22.97 23.03 22.4 23l-.57.02h-.02v-.14h.08c.19 0 .27 0 .27-.27v-1.8h-.54v-.03h.57v1.83c0 .28-.11.3-.3.3h-.05V23l.56-.02.54.02v-.07h-.05c-.16 0-.3-.05-.3-.31v-1.83h.58c.23 0 .26.2.26.32l.08-.03v-.27l.04-.26h-.05c-.02.1-.11.1-.2.1h-1.77c-.08 0-.17 0-.2-.1h-.06a2 2 0 0 1-.02.27c0 .1-.02.19-.04.28h.08c.04-.24.07-.32.33-.31v.03c-.26 0-.25.04-.3.3h-.14v-.01l.04-.29a1.98 1.98 0 0 0 .02-.29v-.01h.11c.03.1.1.1.18.1h1.77c.1 0 .17 0 .17-.1v-.01h.02l.1.02v.01l-.05.28v.28h-.01l-.12.05v-.02c-.01-.13-.03-.31-.24-.31h-.54v1.8c0 .25.1.27.26.27h.08v.14h-.01m.74-.12h.05c.12 0 .25-.02.25-.2v-1.78c0-.18-.13-.2-.25-.2h-.05v-.1l.5.01.54-.01v.1h-.05c-.12 0-.25.02-.25.2v1.79c0 .17.13.19.25.19h.05v.1L24.2 23l-.5.01z"}),a("path",{d:"M24.74 23.03 24.2 23l-.5.02h-.01v-.14h.06c.12 0 .24 0 .24-.17v-1.8c0-.16-.12-.17-.24-.17h-.06v-.13h1.07v.13h-.07c-.12 0-.23.01-.23.18v1.79c0 .16.1.17.23.17h.07v.14zm-.01-.03v-.07h-.04c-.12 0-.26-.03-.26-.21v-1.8c0-.18.14-.2.26-.2h.04v-.07H23.7v.07h.04c.12 0 .27.02.27.2v1.8c0 .18-.15.2-.27.2h-.03V23l.48-.02.53.02zm1.37-2.42a1.2 1.2 0 0 1 1.3 1.18 1.25 1.25 0 0 1-1.28 1.3 1.2 1.2 0 0 1-1.28-1.22 1.24 1.24 0 0 1 1.26-1.26m.05 2.33c.66 0 .78-.58.78-1.08s-.27-1.1-.84-1.1c-.6 0-.77.53-.77.99 0 .6.28 1.2.83 1.2"}),a("path",{d:"M24.83 21.84a1.26 1.26 0 0 1 1.27-1.28v.03a1.23 1.23 0 0 0-1.24 1.25 1.19 1.19 0 0 0 1.26 1.2 1.24 1.24 0 0 0 1.27-1.28 1.18 1.18 0 0 0-1.3-1.17v-.03a1.21 1.21 0 0 1 1.33 1.2 1.27 1.27 0 0 1-1.3 1.32 1.22 1.22 0 0 1-1.3-1.24m.48-.12c0-.46.18-1 .8-1 .57 0 .84.61.84 1.11s-.12 1.1-.79 1.1v-.03c.65 0 .76-.57.76-1.07s-.26-1.08-.82-1.09c-.58 0-.75.52-.76.98 0 .6.28 1.18.82 1.18v.03c-.56 0-.84-.6-.85-1.21m4.4.62v-1.29a.28.28 0 0 0-.3-.32h-.07v-.1l.48.01.42-.01v.1h-.05c-.15 0-.3.03-.3.44v1.55a2.2 2.2 0 0 0 .01.34h-.12L28 21.1v1.41c0 .3.06.4.32.4h.06v.1l-.44-.01-.46.01v-.1h.05c.23 0 .3-.16.3-.43v-1.44a.3.3 0 0 0-.3-.3h-.05v-.11l.39.01.3-.01 1.52 1.71"}),a("path",{d:"M29.9 23.08h-.15l-1.72-1.94v1.37c0 .3.05.38.3.38h.07v.14h-.01l-.44-.02-.46.02h-.02v-.14h.07c.22 0 .28-.14.29-.41v-1.44a.3.3 0 0 0-.3-.3h-.06v-.12h.72l1.5 1.69v-1.26c0-.27-.18-.3-.28-.3h-.1v-.13h.94v.13h-.06c-.14 0-.29.01-.3.42v1.55a2.26 2.26 0 0 0 .03.34v.02zm-.13-.03h.1a2.42 2.42 0 0 1-.01-.33v-1.55c0-.41.17-.45.32-.45h.03v-.07h-.86v.07h.06a.3.3 0 0 1 .3.33v1.3l-.01.01-1.52-1.71h-.68v.07h.03a.32.32 0 0 1 .33.32v1.44c0 .27-.08.44-.32.45h-.04V23l.45-.02.43.02v-.07h-.05c-.27 0-.33-.12-.33-.42v-1.44zm-.07-.71v-.01zm-.01 0v-.01zm1.09.18a1.43 1.43 0 0 0-.08.27c0 .1.14.12.26.12h.03v.1a7.71 7.71 0 0 0-.78 0v-.1h.02a.3.3 0 0 0 .3-.22l.55-1.57a2.79 2.79 0 0 0 .12-.42 1.75 1.75 0 0 0 .31-.15.07.07 0 0 1 .03 0 .02.02 0 0 1 .02 0l.03.1.63 1.78c.04.11.08.24.13.34a.22.22 0 0 0 .22.14h.02v.1a9.66 9.66 0 0 0-.98 0v-.1h.04c.08 0 .2-.01.2-.1a1.1 1.1 0 0 0-.06-.25l-.13-.4h-.78zm.5-1.5h-.01l-.32.96h.64l-.32-.97z"}),a("path",{d:"m32.59 23.03-.47-.02-.5.02h-.02v-.14h.05c.08 0 .2-.01.2-.08a1.06 1.06 0 0 0-.07-.24l-.13-.39h-.76l-.1.35a1.44 1.44 0 0 0-.07.26c0 .08.12.1.24.1H31v.14h-.02l-.4-.02-.38.02h-.01v-.14h.03a.3.3 0 0 0 .29-.2l.54-1.57a4.27 4.27 0 0 0 .14-.44 1.85 1.85 0 0 0 .3-.14.08.08 0 0 1 .04 0 .04.04 0 0 1 .04.01l.03.09.62 1.78c.04.12.08.25.13.35a.2.2 0 0 0 .2.12h.04v.14h-.01zm-.97-.03.5-.02.46.02v-.08h-.01a.23.23 0 0 1-.24-.14l-.12-.35-.63-1.78a3.61 3.61 0 0 1-.03-.09h-.01a.06.06 0 0 0-.02 0 1.3 1.3 0 0 1-.3.14 2.94 2.94 0 0 1-.13.43l-.55 1.56a.32.32 0 0 1-.3.24h-.01V23l.35-.02.4.02v-.07h-.02c-.11 0-.27-.02-.27-.14a1.42 1.42 0 0 1 .07-.27h.02-.02l.11-.36h.8l.13.4a1.07 1.07 0 0 1 .07.25c0 .1-.15.11-.22.12h-.03zm-.7-1 .34-1h.02l.33 1zm.05-.04h.6l-.3-.91zm2.48.72c0 .13.1.18.2.19a2.47 2.47 0 0 0 .45 0 .48.48 0 0 0 .33-.2.78.78 0 0 0 .1-.24h.1l-.12.58-.9-.01-.9.01v-.1h.05c.12 0 .25-.02.25-.23v-1.75c0-.18-.13-.2-.25-.2h-.05v-.1l.54.01.51-.01v.1h-.08c-.13 0-.23 0-.23.19z"}),a("path",{d:"m34.5 23.03-.9-.02-.9.02v-.14h.06c.12 0 .24 0 .24-.2v-1.76c0-.17-.12-.18-.24-.18h-.07v-.13h1.09v.13h-.1c-.13 0-.21 0-.22.17v1.76c0 .13.09.16.2.17l.18.01a2.46 2.46 0 0 0 .26-.01.48.48 0 0 0 .32-.18.77.77 0 0 0 .1-.24v-.01h.13v.02l-.13.58zm0-.03.11-.55h-.07a.77.77 0 0 1-.1.24.5.5 0 0 1-.34.19 2.6 2.6 0 0 1-.26.01h-.19c-.11-.02-.22-.07-.22-.21v-1.76c0-.2.12-.2.25-.2h.07v-.07h-1.03v.07h.04c.12 0 .27.02.27.2v1.76c0 .22-.15.24-.27.24h-.04V23l.89-.02.88.02zm.1-2.47a.36.36 0 1 1-.37.36.35.35 0 0 1 .36-.36zm0 .66a.3.3 0 1 0-.3-.3.29.29 0 0 0 .3.3zm-.19-.1v-.02c.05-.01.05 0 .05-.04v-.26c0-.04 0-.05-.05-.05v-.02h.19c.06 0 .12.03.12.1a.11.11 0 0 1-.09.1l.06.09a.38.38 0 0 0 .08.08v.01h-.07c-.03 0-.06-.07-.13-.16h-.04v.12c0 .02.01.02.06.03v.01zm.12-.2h.05c.04 0 .06-.03.06-.09s-.03-.08-.07-.08h-.04z"})),a("path",{fill:"#fff",d:"M13.33 8.58a5.77 5.77 0 1 1 5.76 5.78 5.77 5.77 0 0 1-5.76-5.78"}),a("path",{fill:"#154a78",d:"M22.58 8.47a3.48 3.48 0 0 0-2.23-3.24v6.48a3.48 3.48 0 0 0 2.23-3.24zm-4.7 3.24V5.23a3.47 3.47 0 0 0 0 6.48zM19.1 3a5.48 5.48 0 1 0 5.47 5.48A5.47 5.47 0 0 0 19.11 3zm0 11.48a5.99 5.99 0 0 1-6.03-5.94A5.9 5.9 0 0 1 19.1 2.5h1.55a6.1 6.1 0 0 1 6.24 6.03 6.22 6.22 0 0 1-6.24 5.94z"})),Rc=Xd;var Jd=({opacity:t=1})=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"26",fill:"none",viewBox:"0 0 40 26",opacity:t},a("path",{fill:"#fff",d:"M0 0h40v26H0z"}),a("g",{"clip-path":"url(#a)"},a("g",{"clip-path":"url(#b)"},a("path",{fill:"#000",d:"M3.5 19.56a1.6 1.6 0 0 1 1.54-1.6h.06a1.52 1.52 0 0 1 1.42.77l-.43.25a1.02 1.02 0 0 0-.99-.59 1.13 1.13 0 0 0-1.14 1.11v.03a1.05 1.05 0 0 0 .99 1.14h.1a.94.94 0 0 0 1.04-.83H5.01v-.43h1.51v1.66h-.46v-.49l.03-.12a1.08 1.08 0 0 1-1.08.64 1.49 1.49 0 0 1-1.51-1.48v-.06Zm3.58-1.79h.46v3.33h-.46v-3.33Zm.92 2.2a1.2 1.2 0 1 1 .74 1.11A1.19 1.19 0 0 1 8 19.96Zm1.91 0a.74.74 0 1 0-1.48.06.72.72 0 0 0 .74.7.74.74 0 0 0 .74-.77Zm1.36.8v.33h-.46v-3.36h.46v1.4a.98.98 0 0 1 .77-.38 1.19 1.19 0 0 1 0 2.38.9.9 0 0 1-.77-.37Zm1.48-.8a.75.75 0 1 0-1.5-.04v.03a.76.76 0 1 0 1.5 0Zm.8.55c0-.46.28-.65.9-.74.43-.06.58-.1.58-.25s-.12-.37-.46-.37a.54.54 0 0 0-.58.43l-.44-.18a1.01 1.01 0 0 1 1.02-.65c.59 0 .96.3.96.86v1.48h-.43v-.33a.75.75 0 0 1-.74.4c-.5 0-.8-.28-.8-.65Zm1.33.06a.5.5 0 0 0 .19-.4v-.19c0 .1-.16.13-.5.16-.4.06-.55.15-.55.34 0 .15.15.28.37.28.18 0 .35-.07.49-.19Zm1.14-2.8h.46v3.32h-.46v-3.33Zm2.04.24h.5l1.53 2.34v-2.34h.47v3.12h-.47l-1.57-2.41v2.4h-.46v-3.11Zm2.96 1.94a1.18 1.18 0 0 1 1.17-1.2h.03a1.14 1.14 0 0 1 1.17 1.11v.25h-1.94a.77.77 0 0 0 .96.58c.2-.05.37-.17.49-.34l.37.22a1.18 1.18 0 0 1-1.05.56 1.15 1.15 0 0 1-1.2-1.11v-.07Zm.46-.21h1.45a.67.67 0 0 0-.7-.56.7.7 0 0 0-.75.56Zm2.56.61v-1.14h-.46v-.4h.46v-.5l.46-.3v.8h.62v.4h-.65v1.14c0 .25.13.37.31.37.12 0 .24-.03.34-.09v.43a.82.82 0 0 1-.37.1c-.46 0-.71-.25-.71-.8Zm1.36-1.54h.46l.52 1.67.62-1.67h.43l.62 1.67.55-1.67h.47l-.8 2.28h-.44l-.61-1.66-.65 1.7h-.46l-.71-2.32Zm3.88 1.14a1.2 1.2 0 1 1 .74 1.12 1.19 1.19 0 0 1-.74-1.12Zm1.92 0a.74.74 0 1 0-1.48.07.72.72 0 0 0 .74.7.74.74 0 0 0 .74-.77Zm.89-1.14h.46v.4a.72.72 0 0 1 .65-.4h.19v.46h-.28c-.37 0-.56.16-.56.6v1.22h-.46v-2.28Zm2.59 1.24-.4.43v.58h-.46v-3.3h.46V20l1.08-1.17h.55l-.89.96.92 1.32h-.52l-.74-1.04ZM5.2 10.16H3.72v5.18H5.2c.66.03 1.32-.18 1.85-.59a2.56 2.56 0 0 0 .92-1.97c0-1.54-1.14-2.62-2.77-2.62Zm1.2 3.88c-.3.28-.74.4-1.39.4h-.28v-3.39h.28a1.88 1.88 0 0 1 1.39.43 1.73 1.73 0 0 1 .55 1.3c0 .48-.2.93-.55 1.26Zm2.03-3.88h1.02v5.18H8.43v-5.18Zm3.49 2c-.62-.22-.77-.37-.77-.65 0-.34.3-.58.74-.58a.97.97 0 0 1 .8.43l.53-.68a2.32 2.32 0 0 0-1.52-.59 1.52 1.52 0 0 0-1.6 1.42v.06c0 .71.34 1.08 1.26 1.42.25.08.49.18.71.31a.64.64 0 0 1 .31.53.75.75 0 0 1-.74.74h-.03a1.29 1.29 0 0 1-1.1-.68l-.66.61a2 2 0 0 0 1.8 1 1.68 1.68 0 0 0 1.78-1.7c-.03-.87-.37-1.24-1.51-1.64Zm1.82.59a2.66 2.66 0 0 0 2.65 2.68h.06c.44 0 .88-.1 1.27-.3v-1.18a1.54 1.54 0 0 1-1.2.55 1.69 1.69 0 0 1-1.73-1.63v-.15a1.72 1.72 0 0 1 1.66-1.8h.03a1.64 1.64 0 0 1 1.27.6v-1.15c-.38-.2-.8-.31-1.23-.3a2.69 2.69 0 0 0-2.78 2.68Zm11.97.9-1.4-3.5h-1.07l2.19 5.31h.52l2.25-5.3h-1.1l-1.4 3.48Zm2.96 1.69h2.83v-.87h-1.85v-1.41h1.8v-.87h-1.8v-1.14h1.85v-.9h-2.83v5.19Zm6.84-3.64c0-.96-.68-1.51-1.82-1.51h-1.48v5.18h1.02v-2.1h.12l1.4 2.07h1.23l-1.64-2.2a1.36 1.36 0 0 0 1.17-1.44Zm-2.03.86h-.31V11h.3c.62 0 .96.28.96.77.03.52-.3.8-.95.8Zm2.84-2.13c0-.09-.07-.15-.19-.15h-.15v.46h.12v-.15l.12.18h.13l-.13-.21c.06 0 .1-.06.1-.13Zm-.19.07-.03-.13h.03c.06 0 .1.03.1.06-.04.07-.07.07-.1.07Z"})),a("path",{fill:"#000",d:"M36.16 10.13a.4.4 0 0 0-.4.4.4.4 0 1 0 .8 0 .4.4 0 0 0-.4-.4Zm0 .74a.32.32 0 0 1-.34-.31.32.32 0 0 1 .65-.03.34.34 0 0 1-.3.34Z"}),a("path",{fill:"url(#c)",d:"M18.06 12.75a2.75 2.75 0 1 0 5.49 0 2.75 2.75 0 0 0-5.5 0Z"}),a("path",{fill:"url(#d)",d:"M18.06 12.75a2.75 2.75 0 1 0 5.49 0 2.75 2.75 0 0 0-5.5 0Z"}),a("mask",{id:"e",width:"6",height:"6",x:"18",y:"10",maskUnits:"userSpaceOnUse",style:"mask-type:luminance"},a("path",{fill:"#fff",d:"M18.06 12.75a2.74 2.74 0 1 0 5.49 0 2.74 2.74 0 0 0-5.5 0Z"})),a("g",{mask:"url(#e)"},a("path",{fill:"url(#f)",d:"M17.75 12.87a3.36 3.36 0 1 0 6.72 0 3.36 3.36 0 0 0-6.72 0Z"}))),a("g",{"clip-path":"url(#g)"},a("g",{"clip-path":"url(#h)"},a("path",{fill:"#000",d:"M3.5 19.56a1.6 1.6 0 0 1 1.54-1.6h.06a1.52 1.52 0 0 1 1.42.77l-.43.25a1.02 1.02 0 0 0-.99-.59 1.13 1.13 0 0 0-1.14 1.11v.03a1.05 1.05 0 0 0 .99 1.14h.1a.94.94 0 0 0 1.04-.83H5.01v-.43h1.51v1.66h-.46v-.49l.03-.12a1.08 1.08 0 0 1-1.08.64 1.49 1.49 0 0 1-1.51-1.48v-.06Zm3.58-1.79h.46v3.33h-.46v-3.33Zm.92 2.2a1.2 1.2 0 1 1 .74 1.11A1.19 1.19 0 0 1 8 19.96Zm1.91 0a.74.74 0 1 0-1.48.06.72.72 0 0 0 .74.7.74.74 0 0 0 .74-.77Zm1.36.8v.33h-.46v-3.36h.46v1.4a.98.98 0 0 1 .77-.38 1.19 1.19 0 0 1 0 2.38.9.9 0 0 1-.77-.37Zm1.48-.8a.75.75 0 1 0-1.5-.04v.03a.76.76 0 1 0 1.5 0Zm.8.55c0-.46.28-.65.9-.74.43-.06.58-.1.58-.25s-.12-.37-.46-.37a.54.54 0 0 0-.58.43l-.44-.18a1.01 1.01 0 0 1 1.02-.65c.59 0 .96.3.96.86v1.48h-.43v-.33a.75.75 0 0 1-.74.4c-.5 0-.8-.28-.8-.65Zm1.33.06a.5.5 0 0 0 .19-.4v-.19c0 .1-.16.13-.5.16-.4.06-.55.15-.55.34 0 .15.15.28.37.28.18 0 .35-.07.49-.19Zm1.14-2.8h.46v3.32h-.46v-3.33Zm2.04.24h.5l1.53 2.34v-2.34h.47v3.12h-.47l-1.57-2.41v2.4h-.46v-3.11Zm2.96 1.94a1.18 1.18 0 0 1 1.17-1.2h.03a1.14 1.14 0 0 1 1.17 1.11v.25h-1.94a.77.77 0 0 0 .96.58c.2-.05.37-.17.49-.34l.37.22a1.18 1.18 0 0 1-1.05.56 1.15 1.15 0 0 1-1.2-1.11v-.07Zm.46-.21h1.45a.67.67 0 0 0-.7-.56.7.7 0 0 0-.75.56Zm2.56.61v-1.14h-.46v-.4h.46v-.5l.46-.3v.8h.62v.4h-.65v1.14c0 .25.13.37.31.37.12 0 .24-.03.34-.09v.43a.82.82 0 0 1-.37.1c-.46 0-.71-.25-.71-.8Zm1.36-1.54h.46l.52 1.67.62-1.67h.43l.62 1.67.55-1.67h.47l-.8 2.28h-.44l-.61-1.66-.65 1.7h-.46l-.71-2.32Zm3.88 1.14a1.2 1.2 0 1 1 .74 1.12 1.19 1.19 0 0 1-.74-1.12Zm1.92 0a.74.74 0 1 0-1.48.07.72.72 0 0 0 .74.7.74.74 0 0 0 .74-.77Zm.89-1.14h.46v.4a.72.72 0 0 1 .65-.4h.19v.46h-.28c-.37 0-.56.16-.56.6v1.22h-.46v-2.28Zm2.59 1.24-.4.43v.58h-.46v-3.3h.46V20l1.08-1.17h.55l-.89.96.92 1.32h-.52l-.74-1.04ZM5.2 10.16H3.72v5.18H5.2c.66.03 1.32-.18 1.85-.59a2.56 2.56 0 0 0 .92-1.97c0-1.54-1.14-2.62-2.77-2.62Zm1.2 3.88c-.3.28-.74.4-1.39.4h-.28v-3.39h.28a1.88 1.88 0 0 1 1.39.43 1.73 1.73 0 0 1 .55 1.3c0 .48-.2.93-.55 1.26Zm2.03-3.88h1.02v5.18H8.43v-5.18Zm3.49 2c-.62-.22-.77-.37-.77-.65 0-.34.3-.58.74-.58a.97.97 0 0 1 .8.43l.53-.68a2.32 2.32 0 0 0-1.52-.59 1.52 1.52 0 0 0-1.6 1.42v.06c0 .71.34 1.08 1.26 1.42.25.08.49.18.71.31a.64.64 0 0 1 .31.53.75.75 0 0 1-.74.74h-.03a1.29 1.29 0 0 1-1.1-.68l-.66.61a2 2 0 0 0 1.8 1 1.68 1.68 0 0 0 1.78-1.7c-.03-.87-.37-1.24-1.51-1.64Zm1.82.59a2.66 2.66 0 0 0 2.65 2.68h.06c.44 0 .88-.1 1.27-.3v-1.18a1.54 1.54 0 0 1-1.2.55 1.69 1.69 0 0 1-1.73-1.63v-.15a1.72 1.72 0 0 1 1.66-1.8h.03a1.64 1.64 0 0 1 1.27.6v-1.15c-.38-.2-.8-.31-1.23-.3a2.69 2.69 0 0 0-2.78 2.68Zm11.97.9-1.4-3.5h-1.07l2.19 5.31h.52l2.25-5.3h-1.1l-1.4 3.48Zm2.96 1.69h2.83v-.87h-1.85v-1.41h1.8v-.87h-1.8v-1.14h1.85v-.9h-2.83v5.19Zm6.84-3.64c0-.96-.68-1.51-1.82-1.51h-1.48v5.18h1.02v-2.1h.12l1.4 2.07h1.23l-1.64-2.2a1.36 1.36 0 0 0 1.17-1.44Zm-2.03.86h-.31V11h.3c.62 0 .96.28.96.77.03.52-.3.8-.95.8Zm2.84-2.13c0-.09-.07-.15-.19-.15h-.15v.46h.12v-.15l.12.18h.13l-.13-.21c.06 0 .1-.06.1-.13Zm-.19.07-.03-.13h.03c.06 0 .1.03.1.06-.04.07-.07.07-.1.07Z"})),a("path",{fill:"#000",d:"M36.16 10.13a.4.4 0 0 0-.4.4.4.4 0 1 0 .8 0 .4.4 0 0 0-.4-.4Zm0 .74a.32.32 0 0 1-.34-.31.32.32 0 0 1 .65-.03.34.34 0 0 1-.3.34Z"}),a("path",{fill:"url(#i)",d:"M18.06 12.75a2.75 2.75 0 1 0 5.49 0 2.75 2.75 0 0 0-5.5 0Z"}),a("path",{fill:"url(#j)",d:"M18.06 12.75a2.75 2.75 0 1 0 5.49 0 2.75 2.75 0 0 0-5.5 0Z"}),a("mask",{id:"k",width:"6",height:"6",x:"18",y:"10",maskUnits:"userSpaceOnUse",style:"mask-type:luminance"},a("path",{fill:"#fff",d:"M18.06 12.75a2.74 2.74 0 1 0 5.49 0 2.74 2.74 0 0 0-5.5 0Z"})),a("g",{mask:"url(#k)"},a("path",{fill:"url(#l)",d:"M17.75 12.87a3.36 3.36 0 1 0 6.72 0 3.36 3.36 0 0 0-6.72 0Z"}))),a("defs",null,a("linearGradient",{id:"c",x1:"22.25",x2:"19.35",y1:"15.06",y2:"10.42",gradientUnits:"userSpaceOnUse"},a("stop",{offset:"0","stop-color":"#F59F00"}),a("stop",{offset:".19","stop-color":"#F49B00"}),a("stop",{offset:".37","stop-color":"#F29101"}),a("stop",{offset:".5","stop-color":"#F08302"}),a("stop",{offset:".6","stop-color":"#EE7905"}),a("stop",{offset:".76","stop-color":"#EC7008"}),a("stop",{offset:"1","stop-color":"#EC6D09"})),a("linearGradient",{id:"d",x1:"22.25",x2:"19.35",y1:"15.06",y2:"10.42",gradientUnits:"userSpaceOnUse"},a("stop",{offset:"0","stop-color":"#F3941E","stop-opacity":"0"}),a("stop",{offset:".04","stop-color":"#F48C1C","stop-opacity":".08"}),a("stop",{offset:".2","stop-color":"#F77314","stop-opacity":".32"}),a("stop",{offset:".35","stop-color":"#F95D0E","stop-opacity":".53"}),a("stop",{offset:".5","stop-color":"#FB4B09","stop-opacity":".7"}),a("stop",{offset:".64","stop-color":"#FD3D05","stop-opacity":".83"}),a("stop",{offset:".77","stop-color":"#FE3302","stop-opacity":".92"}),a("stop",{offset:".9","stop-color":"#FF2D01","stop-opacity":".98"}),a("stop",{offset:"1","stop-color":"#FF2B00"})),a("radialGradient",{id:"f",cx:"0",cy:"0",r:"1",gradientTransform:"rotate(4.24 -167.26 291.02) scale(3.3208)",gradientUnits:"userSpaceOnUse"},a("stop",{offset:"0","stop-color":"#F3941E","stop-opacity":"0"}),a("stop",{offset:".45","stop-color":"#EA8D1D","stop-opacity":".05"}),a("stop",{offset:".66","stop-color":"#CA7618","stop-opacity":".2"}),a("stop",{offset:".83","stop-color":"#924D10","stop-opacity":".48"}),a("stop",{offset:".96","stop-color":"#441304","stop-opacity":".87"}),a("stop",{offset:".99","stop-color":"#2F0401","stop-opacity":".97"})),a("linearGradient",{id:"i",x1:"22.25",x2:"19.35",y1:"15.06",y2:"10.42",gradientUnits:"userSpaceOnUse"},a("stop",{offset:"0","stop-color":"#F59F00"}),a("stop",{offset:".19","stop-color":"#F49B00"}),a("stop",{offset:".37","stop-color":"#F29101"}),a("stop",{offset:".5","stop-color":"#F08302"}),a("stop",{offset:".6","stop-color":"#EE7905"}),a("stop",{offset:".76","stop-color":"#EC7008"}),a("stop",{offset:"1","stop-color":"#EC6D09"})),a("linearGradient",{id:"j",x1:"22.25",x2:"19.35",y1:"15.06",y2:"10.42",gradientUnits:"userSpaceOnUse"},a("stop",{offset:"0","stop-color":"#F3941E","stop-opacity":"0"}),a("stop",{offset:".04","stop-color":"#F48C1C","stop-opacity":".08"}),a("stop",{offset:".2","stop-color":"#F77314","stop-opacity":".32"}),a("stop",{offset:".35","stop-color":"#F95D0E","stop-opacity":".53"}),a("stop",{offset:".5","stop-color":"#FB4B09","stop-opacity":".7"}),a("stop",{offset:".64","stop-color":"#FD3D05","stop-opacity":".83"}),a("stop",{offset:".77","stop-color":"#FE3302","stop-opacity":".92"}),a("stop",{offset:".9","stop-color":"#FF2D01","stop-opacity":".98"}),a("stop",{offset:"1","stop-color":"#FF2B00"})),a("radialGradient",{id:"l",cx:"0",cy:"0",r:"1",gradientTransform:"rotate(4.24 -167.26 291.02) scale(3.3208)",gradientUnits:"userSpaceOnUse"},a("stop",{offset:"0","stop-color":"#F3941E","stop-opacity":"0"}),a("stop",{offset:".45","stop-color":"#EA8D1D","stop-opacity":".05"}),a("stop",{offset:".66","stop-color":"#CA7618","stop-opacity":".2"}),a("stop",{offset:".83","stop-color":"#924D10","stop-opacity":".48"}),a("stop",{offset:".96","stop-color":"#441304","stop-opacity":".87"}),a("stop",{offset:".99","stop-color":"#2F0401","stop-opacity":".97"})),a("clipPath",{id:"a"},a("path",{fill:"#fff",d:"M0 0h33v5.55H0z",transform:"translate(3.5 10)"})),a("clipPath",{id:"b"},a("path",{fill:"#fff",d:"M0 0h33v5.86H0z",transform:"translate(3.5 10)"})),a("clipPath",{id:"g"},a("path",{fill:"#fff",d:"M0 0h33v5.55H0z",transform:"translate(3.5 10)"})),a("clipPath",{id:"h"},a("path",{fill:"#fff",d:"M0 0h33v5.86H0z",transform:"translate(3.5 10)"})))),Pc=Jd;var Qd=({opacity:t=1})=>a("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 40 26",width:"40",height:"26",opacity:t},a("rect",{width:"45.3",height:"27",x:"-3.3",y:"-.79",fill:"#fff",rx:"2.82"}),a("path",{fill:"#01798a",d:"M27.27-.79a4.06 4.06 0 0 0-3.6 2.8l-4.96 23.42a2.14 2.14 0 0 0 2 2.8h18.35a2.81 2.81 0 0 0 2.8-2.82V1.15A2.25 2.25 0 0 0 40-.8"}),a("rect",{width:"20.38",height:"29.02",x:"-4",y:"-.79",fill:"#dc1f2b",rx:"2.82"}),a("path",{fill:"#1a4580",d:"M24.37 2.02a3.98 3.98 0 0 1 3.48-2.8H14.18a3.97 3.97 0 0 0-3.5 2.8l-4.85 23.4a2.13 2.13 0 0 0 1.94 2.81h13.7a2.13 2.13 0 0 1-1.94-2.8z"}),a("path",{fill:"#fff",d:"M16.63 15.04h.18a.32.32 0 0 0 .32-.17l.46-.7h1.24l-.26.47h1.49l-.2.7H18.1a.82.82 0 0 1-.75.44h-.92zm-.2 1h3.25l-.21.77h-1.3l-.2.74h1.27l-.21.77h-1.27l-.3 1.09c-.07.18.02.26.29.24h1.03l-.19.71H16.6q-.57 0-.39-.65l.38-1.4h-.81l.2-.76h.82l.2-.74h-.78l.2-.76zm5.19-1.87-.06.45a2.37 2.37 0 0 1 1.18-.47h2.05l-.78 2.88q-.1.5-.84.5h-2.34l-.54 2.01c-.03.11.01.17.13.17h.46l-.17.62h-1.17q-.67 0-.56-.4l1.54-5.76zm1.74.81h-1.84l-.22.78a1.52 1.52 0 0 1 .82-.23h1.1zm-.67 1.8c.14.02.22-.03.22-.16l.12-.4h-1.84l-.16.57zm-1.24.93h1.06l-.02.47h.29c.14 0 .2-.05.2-.14l.1-.3h.87l-.11.44a.76.76 0 0 1-.8.57h-.56v.8c-.01.12.1.18.33.18h.53l-.17.63H21.9c-.36.02-.53-.15-.53-.52zM8.6 10.34a2.62 2.62 0 0 1-1 1.64 3.24 3.24 0 0 1-1.98.58 2.16 2.16 0 0 1-1.68-.59 1.54 1.54 0 0 1-.37-1.06 2.86 2.86 0 0 1 .06-.57l.87-4.2h1.3l-.85 4.15a1.35 1.35 0 0 0-.04.32.82.82 0 0 0 .16.52.89.89 0 0 0 .75.3 1.56 1.56 0 0 0 1-.3 1.37 1.37 0 0 0 .5-.84l.84-4.15h1.3zm5.47-1.65h1.02l-.8 3.74h-1.02zm.32-1.37h1.03l-.2.91H14.2l.19-.9M16 12.15a1.39 1.39 0 0 1-.41-1.05 2.45 2.45 0 0 1 .01-.25l.04-.27a2.55 2.55 0 0 1 .78-1.45 2.07 2.07 0 0 1 1.43-.54 1.5 1.5 0 0 1 1.1.39 1.4 1.4 0 0 1 .4 1.06 2.59 2.59 0 0 1-.02.26l-.05.28a2.48 2.48 0 0 1-.77 1.42 2.08 2.08 0 0 1-1.43.53 1.5 1.5 0 0 1-1.09-.38m1.95-.74a1.84 1.84 0 0 0 .38-.9.58.58 0 0 0 .03-.19 1.74 1.74 0 0 0 .01-.17.76.76 0 0 0-.17-.54.64.64 0 0 0-.5-.2.89.89 0 0 0-.7.3 1.9 1.9 0 0 0-.38.92l-.03.18a1.36 1.36 0 0 0-.01.17.75.75 0 0 0 .17.54.64.64 0 0 0 .5.18.9.9 0 0 0 .7-.3m8.02 3.67.25-.87h1.24l-.05.32a3.1 3.1 0 0 1 1.09-.32h1.54l-.25.87h-.24l-1.16 4.12h.24l-.23.82h-.24l-.1.36h-1.2l.1-.36h-2.38l.23-.82h.24l1.16-4.12zm1.34 0L27 16.2a5.13 5.13 0 0 1 1-.27c.1-.4.24-.85.24-.85zm-.46 1.64-.32 1.17a3.44 3.44 0 0 1 1.01-.33l.24-.84zm.23 2.48.24-.84h-.93l-.24.84zm3.01-5.05h1.17l.05.44c0 .11.06.16.2.16h.2l-.2.74h-.87c-.32.02-.5-.1-.5-.38zm-.34 1.59h3.79l-.23.79h-1.2l-.2.74h1.2l-.23.79h-1.34l-.3.46h.65l.16.93c.01.09.1.13.23.13h.2l-.2.77h-.73c-.37.02-.57-.1-.58-.38l-.18-.85-.6.9a.65.65 0 0 1-.65.36h-1.1l.22-.77h.34a.46.46 0 0 0 .36-.19l.94-1.36h-1.2l.22-.8h1.3l.21-.73h-1.3l.22-.8zM9.8 8.69h.92l-.1.54.12-.16a1.43 1.43 0 0 1 1.1-.48 1 1 0 0 1 .83.34 1.15 1.15 0 0 1 .14.95l-.5 2.56h-.95l.46-2.32a.74.74 0 0 0-.04-.53.44.44 0 0 0-.4-.17.88.88 0 0 0-.62.23 1.14 1.14 0 0 0-.34.63L10 12.44h-.94zm10.55 0h.92l-.1.54.13-.16a1.43 1.43 0 0 1 1.08-.48.99.99 0 0 1 .85.34 1.14 1.14 0 0 1 .13.95l-.5 2.56h-.95l.46-2.32a.75.75 0 0 0-.04-.53.45.45 0 0 0-.4-.17.89.89 0 0 0-.62.23 1.12 1.12 0 0 0-.33.63l-.43 2.16h-.94zm4.55-2.33h2.67a1.8 1.8 0 0 1 1.19.35 1.25 1.25 0 0 1 .4 1v.02a3.77 3.77 0 0 1-.06.59 2.38 2.38 0 0 1-.81 1.4 2.29 2.29 0 0 1-1.5.52h-1.44l-.44 2.2h-1.24zm.67 2.82h1.19a1.14 1.14 0 0 0 .73-.21 1.14 1.14 0 0 0 .36-.67l.03-.15v-.13a.52.52 0 0 0-.22-.47 1.35 1.35 0 0 0-.72-.15h-1zm9.15 3.98a5.91 5.91 0 0 1-.98 1.56 1.99 1.99 0 0 1-1.7.71l.08-.64c.89-.27 1.36-1.51 1.64-2.06l-.33-4.03.68-.01h.58l.06 2.53 1.07-2.53h1.09zM31.68 9l-.43.3a1.35 1.35 0 0 0-1.66-.21c-1.08.5-1.98 4.4 1 3.11l.17.2 1.17.04.77-3.54zm-.66 1.92c-.2.56-.61.94-.94.83-.33-.1-.45-.64-.26-1.2.19-.57.61-.94.94-.83.33.1.45.64.26 1.2"})),Tc=Qd;function dn(t){let e=()=>window.matchMedia(t).matches,[r,o]=z(e);return pe(()=>{let s=window.matchMedia(t),n=i=>o(i.matches);return o(s.matches),s.addEventListener("change",n),()=>{s.removeEventListener("change",n)}},[t]),r}function Ho({brands:t,brandHidden:e=[],limit:r=3}){let o=dn("(max-width: 380px)"),n=dn("(max-width: 335px)")?1:o?2:r,i=t.filter(c=>{let{brand:d}=c;return!e.some(u=>u.brand===d)});return a(le,null,i.map(({brand:c},d)=>d>=Math.min(r,n)?d===Math.min(r,n)?a(ir,{content:a("span",{style:{display:"flex",gap:"4px",overflow:"visible"}},i.slice(Math.min(r,n)).map(({brand:p})=>a(Ac,{key:p,brand:p})))},a("span",{key:c,className:"straumur__render-brand-icons__overflow"},"+",i.length-Math.min(r,n))):null:a(Ac,{key:c,brand:c})))}var Ac=({brand:t})=>{switch(t){case"visa":return a(Cc,null);case"mc":return a(vc,null);case"maestro":return a(bc,null);case"amex":return a(Ec,null);case"jcb":return a(Sc,null);case"diners":return a(Rc,null);case"discover":return a(Pc,null);case"cup":return a(Tc,null);default:return a("span",null,t)}};var ep=()=>a("svg",{width:"40",height:"40",viewBox:"0 0 40 40",xmlns:"http://www.w3.org/2000/svg",stroke:"#002649"},a("g",{fill:"none","fill-rule":"evenodd"},a("g",{transform:"translate(2 2)","stroke-width":"4"},a("circle",{"stroke-opacity":".3",cx:"18",cy:"18",r:"18"}),a("path",{d:"M36 18c0-9.94-8.06-18-18-18"},a("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"}))))),lr=ep;var tp=()=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"13",viewBox:"0 0 16 13",fill:"none"},a("path",{d:"M2 7L6 11L14 2",stroke:"#002649","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"})),Dc=tp;function rp({configuration:t,paymentMethods:e}){let r=ne(null),o=ne(),s=ne(),[n,i]=z(!0),[c,d]=z("required"),[p,u]=z(!1),l=ne(!1),[h,m]=z([]),[y,b]=z({encryptedCardNumber:{visible:!1},encryptedExpiryDate:{visible:!1},encryptedSecurityCode:{visible:!1}}),C=e.paymentMethods.paymentMethods?.some(S=>S.type==="scheme"),{activePaymentMethod:_,setActivePaymentMethod:g,isPaymentMethodInitialized:O,updatePaymentMethodInitialization:N,handleSuccess:E,handleError:P,setThreeDSecureActive:L,threeDSecureActive:H}=_e();if(!C||_!=="card"&&H)return null;let U=e.paymentMethods.paymentMethods.find(S=>S.type==="scheme").brands,F=async()=>{o.current=await Ce({clientKey:e.clientKey,environment:t.environment,amount:{value:e.minorUnitsAmount,currency:e.currency},locale:t.locale,countryCode:"IS",paymentMethodsResponse:e.paymentMethods,onSubmit:Wo,onAdditionalDetails:Zo,onError:Ko,onPaymentCompleted:qo,onPaymentFailed:Xo}),s.current=new Ye(o.current,{placeholders:t.placeholders,challengeWindowSize:"05",brands:U,onBrand:S=>{if(d(S.cvcPolicy),S.brand==="card"){m([]);return}m(U.filter(K=>K!==S.brand).map(K=>({brand:K})))},onConfigSuccess(){N("card",!0)},onValidationError:S=>{let K={encryptedCardNumber:{visible:!1,message:void 0},encryptedExpiryDate:{visible:!1,message:void 0},encryptedSecurityCode:{visible:!1,message:void 0}};S.filter(B=>B.error).forEach(B=>{K[B.fieldType].visible=!0,K[B.fieldType].message=B.errorI18n}),b(K)},onAllValid:S=>{i(!S.allValid)}}),r.current&&s.current.mount(r.current)};pe(()=>{_==="card"&&!O.card&&F()},[t,_]),pe(()=>{s.current&&O.card&&(F(),b({encryptedCardNumber:{visible:!1,message:void 0},encryptedExpiryDate:{visible:!1,message:void 0},encryptedSecurityCode:{visible:!1,message:void 0}}))},[t]);let M=()=>{g("card")};if(e.paymentMethods?.paymentMethods?.length===0)return null;let ie=U.map(S=>({brand:S,brandFullName:S}));function Go(S){u(S.currentTarget.checked)}function Ko(S,K){P("error.unknownError")}pe(()=>{l.current=p},[p]);async function Wo(S,K,B){let gt={...S.data,storePaymentMethod:l.current,sessionId:t.sessionId},Te=await Qe(t.environment,gt);if(!Te.ok){B.reject(),P("error.failedToSubmitPayment");return}let Ae=await Te.json();if(!Ae.resultCode){B.reject(),P("error.paymentFailed");return}let{resultCode:De,action:vt}=Ae;(De==="ChallengeShopper"||De==="IdentifyShopper")&&L(!0),B.resolve({resultCode:De,action:vt})}async function Zo(S,K,B){let gt={...S.data,sessionId:t.sessionId},Te=await Fe(t.environment,gt);if(!Te.ok){B.reject(),P("error.failedToSubmitPaymentDetails");return}let Ae=await Te.json();if(!Ae.resultCode){B.reject(),P("error.paymentDetailsFailed");return}let{resultCode:De,action:vt}=Ae;B.resolve({resultCode:De,action:vt})}function qo(S,K){S.resultCode==="Authorised"?E("success.paymentAuthorized"):P("error.paymentUnsuccessful"),t.onPaymentCompleted?.({resultCode:S.resultCode})}function Xo(S,K){S?(S.resultCode==="Authorised"?E("success.paymentAuthorized"):P("error.paymentUnsuccessful"),t.onPaymentFailed?.({resultCode:S.resultCode})):t.onPaymentFailed?.()}function Jo(){s.current&&s.current.submit()}return a("label",{className:"straumur__card-component"},a("input",{type:"radio",className:"straumur__card-component__radio-selector",checked:_==="card",onChange:M}),a("span",{className:"straumur__card-component__content"},a("span",{className:"straumur__card-component--circle"}),a(gc,null),a("span",{className:"straumur__card-component--text"},V(t.locale,"cards.title")),a("span",{className:"straumur__card-component--brands"},a(Ho,{brands:ie,brandHidden:h}))),a("div",{className:"straumur__card-component__expandable",ref:r,style:{height:H?"600px":"auto",minWidth:H?"350px":"auto"}},!O.card&&a("div",{className:"straumur__card-component__loading-text"},a(lr,null)),a("div",{className:"straumur__card-component__form",style:{opacity:O.card&&!H?1:0,position:O.card&&!H?"relative":"absolute",transition:"opacity 0.3s ease-in-out"}},a("div",{className:"straumur__card-component__form--wrapper"},a("label",{className:`straumur__card-component__form--wrapper--label ${y.encryptedCardNumber.visible?"straumur__card-component__form--wrapper--label--error":""}`},V(t.locale,"cards.cardNumber")),a("span",{className:`straumur__card-component__form--wrapper--input ${y.encryptedCardNumber.visible?"straumur__card-component__form--wrapper--input--error":""}`,"data-cse":"encryptedCardNumber"}),y.encryptedCardNumber.visible&&a("span",{className:"straumur__card-component__form--wrapper--error"},y.encryptedCardNumber.message)),a("div",{className:"straumur__card-component__form--field-wrapper"},a("div",{className:"straumur__card-component__form--wrapper"},a("label",{className:`straumur__card-component__form--wrapper--label ${y.encryptedExpiryDate.visible?"straumur__card-component__form--wrapper--label--error":""}`},V(t.locale,"cards.expiryDate")),a("span",{className:`straumur__card-component__form--wrapper--input ${y.encryptedExpiryDate.visible?"straumur__card-component__form--wrapper--input--error":""}`,"data-cse":"encryptedExpiryDate"}),y.encryptedExpiryDate.visible&&a("span",{className:"straumur__card-component__form--wrapper--error"},y.encryptedExpiryDate.message)),a("div",{className:"straumur__card-component__form--wrapper"},(c==="optional"||c==="required")&&a(le,null,a("label",{className:`straumur__card-component__form--wrapper--label ${y.encryptedSecurityCode.visible?"straumur__card-component__form--wrapper--label--error":""}`},c==="optional"?V(t.locale,"cards.securityCode3DigitsOptional"):V(t.locale,"cards.securityCode3Digits")),a("span",{className:`straumur__card-component__form--wrapper--input ${y.encryptedSecurityCode.visible?"straumur__card-component__form--wrapper--input--error":""}`,"data-cse":"encryptedSecurityCode"}),y.encryptedSecurityCode.visible&&a("span",{className:"straumur__card-component__form--wrapper--error"},y.encryptedSecurityCode.message),a("div",{className:"straumur__card-component__form--wrapper--label--info"},a(ir,{content:a("span",null,V(t.locale,"cards.securityCode3DigitsInfo"))},a(Vo,null)))))),e.enableStoreDetails==="AskForConsent"&&a("label",{className:"straumur__card-component__form--wrapper--label-checkbox"},a("div",{className:`straumur__card-component__form--wrapper--label-checkbox--checkmark ${p?"straumur__card-component__form--wrapper--label-checkbox--checkmark--checked":""}`},a("div",{className:`straumur__card-component__form--wrapper--label-checkbox--checkmark--icon ${p?"straumur__card-component__form--wrapper--label-checkbox--checkmark--icon--checked":""}`},a(Dc,null))),a("input",{type:"checkbox",className:"straumur__card-component__form--wrapper--label-checkbox--checkbox",checked:p,onChange:Go}),V(t.locale,"cards.storePaymentMethod")),a("button",{className:"straumur__card-component__submit-button",disabled:n,onClick:Jo},e.formattedAmount))))}var Ic=rp;ce(`.straumur__google-pay-component{position:relative;cursor:pointer;background:var(--straumur__color-white);border-radius:var(--straumur__border-radius-lg);transition:all .3s ease;padding:var(--straumur__space-xxlg) var(--straumur__space-5xlg)}.straumur__google-pay-component__radio-selector{position:absolute;opacity:0;cursor:pointer}.straumur__google-pay-component__content{display:flex;align-items:center;gap:var(--straumur__space-lg);transition:background-color .3s ease}.straumur__google-pay-component__radio-selector:checked+.straumur__google-pay-component__content{padding-bottom:var(--straumur__space-xxlg)}.straumur__google-pay-component--circle{width:var(--straumur__space-5xlg);height:var(--straumur__space-5xlg);border:1px solid var(--straumur__color-cosmos-blue-gamma);background:var(--straumur__color-secondary-gamma);border-radius:50%;position:relative;transition:all .3s ease}.straumur__google-pay-component__content:hover .straumur__google-pay-component--circle{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__google-pay-component--circle:after{content:"";position:absolute;width:100%;height:100%;border-radius:50%;top:50%;left:50%;transform:translate(-50%,-50%) scale(0);transition:transform .2s ease}.straumur__google-pay-component__radio-selector:checked+.straumur__google-pay-component__content .straumur__google-pay-component--circle{background:var(--straumur__color-blue-beta);border-color:var(--straumur__color-transparent)}.straumur__google-pay-component__radio-selector:checked+.straumur__google-pay-component__content .straumur__google-pay-component--circle:after{transform:translate(-50%,-50%) scale(1);background:var(--straumur__color-primary);height:var(--straumur__space-md);width:var(--straumur__space-md)}.straumur__google-pay-component--text{color:#213547;font-size:1rem;user-select:none}.straumur__google-pay-component__expandable{background:var(--straumur__color-white);max-height:0;overflow:hidden;transition:all .3s ease;opacity:0}.straumur__google-pay-component__radio-selector:checked~.straumur__google-pay-component__expandable{max-height:600px;opacity:1}.straumur__google-pay-component__expandable p{margin:0;color:#213547;font-size:.9rem}.adyen-checkout__paywithgoogle{height:var(--straumur__space-8xlg)}
|
|
8
|
+
`);var op=()=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"26",fill:"none",viewBox:"0 0 40 26"},a("path",{fill:"#fff",d:"M29.13 2.41H10.87C5.17 2.41.5 7.18.5 13.01a10.5 10.5 0 0 0 10.37 10.58h18.26c5.7 0 10.37-4.76 10.37-10.59 0-5.82-4.67-10.59-10.37-10.59Z"}),a("path",{fill:"#3C4043",d:"M29.13 3.27c1.28 0 2.52.26 3.7.77a9.6 9.6 0 0 1 5.08 5.19 9.78 9.78 0 0 1 0 7.55 9.83 9.83 0 0 1-5.08 5.18 9.26 9.26 0 0 1-3.7.77H10.87a9.24 9.24 0 0 1-3.7-.77 9.6 9.6 0 0 1-5.08-5.18 9.78 9.78 0 0 1 0-7.55 9.83 9.83 0 0 1 5.08-5.19 9.24 9.24 0 0 1 3.7-.77h18.26Zm0-.86H10.87C5.17 2.41.5 7.18.5 13.01a10.5 10.5 0 0 0 10.37 10.58h18.26c5.7 0 10.37-4.76 10.37-10.59 0-5.82-4.67-10.59-10.37-10.59Z"}),a("path",{fill:"#3C4043",d:"M19.1 13.75v3.2h-1v-7.9h2.64c.67 0 1.24.23 1.7.68.49.46.72 1.01.72 1.67a2.2 2.2 0 0 1-.71 1.68c-.46.45-1.03.67-1.7.67H19.1Zm0-3.73v2.76h1.66c.4 0 .73-.14.99-.4.26-.28.4-.6.4-.98 0-.36-.14-.68-.4-.95a1.28 1.28 0 0 0-.99-.42H19.1Zm6.67 1.35c.73 0 1.31.2 1.74.6.42.4.64.95.64 1.65v3.34h-.95v-.76h-.04a1.9 1.9 0 0 1-1.65.93 2.1 2.1 0 0 1-1.46-.53c-.4-.35-.6-.8-.6-1.32 0-.56.21-1 .63-1.34.41-.33.97-.5 1.66-.5.59 0 1.07.12 1.45.34v-.23c0-.36-.13-.65-.4-.9a1.4 1.4 0 0 0-.97-.37c-.56 0-1 .24-1.32.72l-.88-.56a2.42 2.42 0 0 1 2.15-1.07Zm-1.29 3.92c0 .27.11.5.33.67.22.17.48.26.78.26.42 0 .79-.16 1.12-.48.32-.31.49-.68.49-1.11a2.02 2.02 0 0 0-1.3-.38c-.4 0-.74.1-1.01.3a.9.9 0 0 0-.4.74Zm9.08-3.75-3.32 7.8h-1.02l1.23-2.73-2.19-5.07h1.09l1.57 3.89h.02l1.54-3.89h1.08Z"}),a("path",{fill:"#4285F4",d:"M15.14 13.1c0-.32-.03-.64-.09-.95h-4.17v1.75h2.4a2.1 2.1 0 0 1-.89 1.4v1.14h1.43a4.49 4.49 0 0 0 1.32-3.33Z"}),a("path",{fill:"#34A853",d:"M12.4 15.3a2.66 2.66 0 0 1-4-1.44H6.9v1.18a4.43 4.43 0 0 0 6.91 1.4l-1.43-1.13Z"}),a("path",{fill:"#FABB05",d:"M8.25 13c0-.3.05-.59.14-.86v-1.17H6.9a4.59 4.59 0 0 0 0 4.07l1.48-1.17a2.79 2.79 0 0 1-.14-.86Z"}),a("path",{fill:"#E94235",d:"M10.88 10.27c.66 0 1.24.23 1.7.68l1.27-1.3a4.22 4.22 0 0 0-2.97-1.18 4.44 4.44 0 0 0-3.97 2.5l1.48 1.17a2.66 2.66 0 0 1 2.5-1.87Z"})),xc=op;var Yo="CANCEL";function sp({configuration:t,paymentMethods:e}){let r=ne(null),o=ne(),s=ne(),{activePaymentMethod:n,setActivePaymentMethod:i,isPaymentMethodInitialized:c,updatePaymentMethodInitialization:d,handleSuccess:p,handleError:u,setThreeDSecureActive:l,threeDSecureActive:h}=_e(),m=async()=>{o.current=await Ce({clientKey:e.clientKey,environment:t.environment,locale:e.locale,countryCode:"IS",amount:{value:e.minorUnitsAmount,currency:e.currency},onError:b,onAdditionalDetails:_,onPaymentCompleted:g,onPaymentFailed:O});let E=e.paymentMethods.paymentMethods.find(L=>L.type==="googlepay").configuration,P={amount:{value:e.minorUnitsAmount,currency:e.currency},challengeWindowSize:"05",countryCode:"IS",environment:t.environment,onSubmit:C,configuration:{...E,merchantName:e.merchantName}};s.current=new ft(o.current,P),s.current.isAvailable().then(()=>{s.current.mount(r.current),d("googlepay",!0)}).catch(()=>{u("error.googlePayNotAvailable")})};pe(()=>{n==="googlepay"&&!c.googlepay&&m()},[t,n]),pe(()=>{s.current&&c.googlepay&&m()},[t]);let y=()=>{i("googlepay")};function b(E,P){E.name!==Yo&&u("error.unknownError")}async function C(E,P,L){let H={...E.data,sessionId:t.sessionId},U=await Qe(t.environment,H);if(!U.ok){L.reject(),u("error.failedToSubmitPayment");return}let F=await U.json();if(!F.resultCode){L.reject(),u("error.paymentFailed");return}let{resultCode:M,action:ie}=F;(M==="ChallengeShopper"||M==="IdentifyShopper")&&l(!0),L.resolve({resultCode:M,action:ie})}async function _(E,P,L){let H={...E.data,sessionId:t.sessionId},U=await Fe(t.environment,H);if(!U.ok){L.reject(),u("error.failedToSubmitPaymentDetails");return}let F=await U.json();if(!F.resultCode){L.reject(),u("error.paymentDetailsFailed");return}let{resultCode:M,action:ie}=F;L.resolve({resultCode:M,action:ie})}function g(E,P){E.resultCode==="Authorised"?p("success.paymentAuthorized"):u("error.paymentUnsuccessful"),t.onPaymentCompleted?.({resultCode:E.resultCode})}function O(E,P){E?(E.resultCode==="Authorised"?p("success.paymentAuthorized"):u("error.paymentUnsuccessful"),t.onPaymentFailed?.({resultCode:E.resultCode})):t.onPaymentFailed?.()}return!e.paymentMethods.paymentMethods?.some(E=>E.type==="googlepay")||n!=="googlepay"&&h?null:a("label",{className:"straumur__google-pay-component"},a("input",{type:"radio",className:"straumur__google-pay-component__radio-selector",checked:n==="googlepay",onChange:y}),a("span",{className:"straumur__google-pay-component__content"},a("span",{className:"straumur__google-pay-component--circle"}),a(xc,null),a("span",{className:"straumur__google-pay-component--text"},V(t.locale,"googlePay.title"))),a("div",{className:"straumur__google-pay-component__expandable"},a("div",{ref:r,style:{height:h?"600px":"auto",minWidth:h?"350px":"auto"}})))}var wc=sp;ce(`.straumur__apple-pay-component{position:relative;cursor:pointer;background:var(--straumur__color-white);border-radius:var(--straumur__border-radius-lg);transition:all .3s ease;padding:var(--straumur__space-xxlg) var(--straumur__space-5xlg)}.straumur__apple-pay-component__radio-selector{position:absolute;opacity:0;cursor:pointer}.straumur__apple-pay-component__content{display:flex;align-items:center;gap:var(--straumur__space-lg);transition:background-color .3s ease}.straumur__apple-pay-component__radio-selector:checked+.straumur__apple-pay-component__content{padding-bottom:var(--straumur__space-xxlg)}.straumur__apple-pay-component--circle{width:var(--straumur__space-5xlg);height:var(--straumur__space-5xlg);border:1px solid var(--straumur__color-cosmos-blue-gamma);background:var(--straumur__color-secondary-gamma);border-radius:50%;position:relative;transition:all .3s ease}.straumur__apple-pay-component__content:hover .straumur__apple-pay-component--circle{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__apple-pay-component--circle:after{content:"";position:absolute;width:100%;height:100%;border-radius:50%;top:50%;left:50%;transform:translate(-50%,-50%) scale(0);transition:transform .2s ease}.straumur__apple-pay-component__radio-selector:checked+.straumur__apple-pay-component__content .straumur__apple-pay-component--circle{background:var(--straumur__color-blue-beta);border-color:var(--straumur__color-transparent)}.straumur__apple-pay-component__radio-selector:checked+.straumur__apple-pay-component__content .straumur__apple-pay-component--circle:after{transform:translate(-50%,-50%) scale(1);background:var(--straumur__color-primary);height:var(--straumur__space-md);width:var(--straumur__space-md)}.straumur__apple-pay-component--text{color:#213547;font-size:1rem;user-select:none}.straumur__apple-pay-component__expandable{background:var(--straumur__color-white);max-height:0;overflow:hidden;transition:all .3s ease;opacity:0}.straumur__apple-pay-component__radio-selector:checked~.straumur__apple-pay-component__expandable{max-height:600px;opacity:1}.straumur__apple-pay-component__expandable p{margin:0;color:#213547;font-size:.9rem}
|
|
9
|
+
`);var np=()=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"26",fill:"none",viewBox:"0 0 40 26"},a("path",{fill:"#000",d:"M36.42 0H3.58a69.25 69.25 0 0 0-.75 0c-.25.01-.5.03-.76.07a2.51 2.51 0 0 0-1.32.7A2.43 2.43 0 0 0 .07 2.1 5.14 5.14 0 0 0 0 3.22v19.91c.01.25.03.51.07.76a2.6 2.6 0 0 0 .68 1.35 2.39 2.39 0 0 0 1.32.69 4.98 4.98 0 0 0 1.1.07h34a5 5 0 0 0 .76-.07 2.5 2.5 0 0 0 1.32-.7 2.44 2.44 0 0 0 .68-1.34 5.13 5.13 0 0 0 .07-1.11V2.87a6.5 6.5 0 0 0-.07-.76 2.58 2.58 0 0 0-.68-1.35 2.4 2.4 0 0 0-1.32-.69 4.96 4.96 0 0 0-1.1-.07h-.41Z"}),a("path",{fill:"#fff",d:"M36.42.87h.73c.2 0 .42.02.62.06a1.67 1.67 0 0 1 .88.44 1.58 1.58 0 0 1 .44.89 4.38 4.38 0 0 1 .06.97v19.55a14.67 14.67 0 0 1-.06.96 1.7 1.7 0 0 1-.44.89 1.54 1.54 0 0 1-.87.44 4.27 4.27 0 0 1-.96.06H2.85a3.7 3.7 0 0 1-.63-.06 1.66 1.66 0 0 1-.87-.45 1.56 1.56 0 0 1-.44-.88 4.35 4.35 0 0 1-.06-.97V2.9c.01-.2.02-.42.06-.63.03-.18.08-.34.16-.49A1.56 1.56 0 0 1 2.22.93a4.2 4.2 0 0 1 .96-.06h33.24"}),a("path",{fill:"#000",d:"M10.92 8.61c.34-.43.57-1 .51-1.59a2.21 2.21 0 0 0-1.99 2.3c.56.04 1.12-.3 1.48-.7Zm.51.81c-.82-.05-1.52.46-1.9.46-.4 0-1-.43-1.64-.42-.84 0-1.62.48-2.05 1.24-.88 1.52-.23 3.76.62 5 .42.6.92 1.27 1.58 1.25.62-.02.86-.4 1.62-.4.75 0 .97.4 1.63.39.69-.01 1.11-.61 1.53-1.22.47-.7.67-1.37.68-1.4-.01-.02-1.32-.52-1.33-2.02-.01-1.26 1.03-1.85 1.07-1.9a2.34 2.34 0 0 0-1.81-.98Zm7.11-1.7a2.87 2.87 0 0 1 3.02 3c0 1.8-1.27 3.03-3.06 3.03h-1.97v3.12h-1.42V7.72h3.43Zm-2 4.83h1.62c1.24 0 1.94-.66 1.94-1.82 0-1.15-.7-1.81-1.93-1.81h-1.64v3.63Zm5.39 2.43c0-1.17.9-1.89 2.48-1.98l1.83-.1v-.52c0-.74-.5-1.18-1.34-1.18-.8 0-1.3.38-1.41.97h-1.3c.08-1.2 1.1-2.09 2.76-2.09 1.62 0 2.65.86 2.65 2.2v4.6h-1.31v-1.1h-.04a2.38 2.38 0 0 1-2.1 1.2c-1.3 0-2.22-.8-2.22-2Zm4.3-.6v-.53l-1.64.1c-.82.06-1.28.42-1.28.99 0 .58.48.96 1.22.96.96 0 1.7-.66 1.7-1.52Zm2.61 4.95v-1.11c.1.03.33.03.44.03.64 0 .98-.27 1.19-.96l.12-.4-2.41-6.69h1.48l1.7 5.43h.02l1.69-5.43h1.44l-2.5 7.02c-.57 1.62-1.23 2.14-2.61 2.14a5.3 5.3 0 0 1-.56-.03Z"})),kc=np;function ap({configuration:t,paymentMethods:e}){let r=ne(null),o=ne(),s=ne(),{activePaymentMethod:n,setActivePaymentMethod:i,isPaymentMethodInitialized:c,updatePaymentMethodInitialization:d,handleSuccess:p,handleError:u,setThreeDSecureActive:l,threeDSecureActive:h}=_e(),m=async()=>{o.current=await Ce({clientKey:e.clientKey,environment:t.environment,locale:e.locale,countryCode:"IS",amount:{value:e.minorUnitsAmount,currency:e.currency},onError:b,onAdditionalDetails:_,onPaymentCompleted:g,onPaymentFailed:O});let E=e.paymentMethods.paymentMethods.find(L=>L.type==="applepay").configuration,P={amount:{value:e.minorUnitsAmount,currency:e.currency},environment:t.environment,onSubmit:C,configuration:{...E,merchantName:e.merchantName}};s.current=new Ot(o.current,P),s.current.isAvailable().then(()=>{s.current.mount(r.current),d("applepay",!0)}).catch(()=>{u("error.applePayNotAvailable")})};pe(()=>{n==="applepay"&&!c.applepay&&m()},[t,n]),pe(()=>{s.current&&c.applepay&&m()},[t]);let y=()=>{i("applepay")};function b(E,P){E.name!==Yo&&u("error.unknownError")}async function C(E,P,L){let H={...E.data,sessionId:t.sessionId},U=await Qe(t.environment,H);if(!U.ok){L.reject(),u("error.failedToSubmitPayment");return}let F=await U.json();if(!F.resultCode){L.reject(),u("error.paymentFailed");return}let{resultCode:M,action:ie}=F;(M==="ChallengeShopper"||M==="IdentifyShopper")&&l(!0),L.resolve({resultCode:M,action:ie})}async function _(E,P,L){let H={...E.data,sessionId:t.sessionId},U=await Fe(t.environment,H);if(!U.ok){L.reject(),u("error.failedToSubmitPaymentDetails");return}let F=await U.json();if(!F.resultCode){L.reject(),u("error.paymentDetailsFailed");return}let{resultCode:M,action:ie}=F;L.resolve({resultCode:M,action:ie})}function g(E,P){E.resultCode==="Authorised"?p("success.paymentAuthorized"):u("error.paymentUnsuccessful"),t.onPaymentCompleted?.({resultCode:E.resultCode})}function O(E,P){E?(E.resultCode==="Authorised"?p("success.paymentAuthorized"):u("error.paymentUnsuccessful"),t.onPaymentFailed?.({resultCode:E.resultCode})):t.onPaymentFailed?.()}return!e.paymentMethods.paymentMethods?.some(E=>E.type==="applepay")||n!=="applepay"&&h?null:a("label",{className:"straumur__apple-pay-component"},a("input",{type:"radio",className:"straumur__apple-pay-component__radio-selector",checked:n==="applepay",onChange:y}),a("span",{className:"straumur__apple-pay-component__content"},a("span",{className:"straumur__apple-pay-component--circle"}),a(kc,null),a("span",{className:"straumur__apple-pay-component--text"},V(t.locale,"applePay.title"))),a("div",{className:"straumur__apple-pay-component__expandable"},a("div",{ref:r,style:{height:h?"600px":"auto",minWidth:h?"350px":"auto"}})))}var Nc=ap;ce(`.straumur__stored-card-component{position:relative;background:var(--straumur__color-white);border-radius:var(--straumur__border-radius-lg);transition:all .3s ease;padding:var(--straumur__space-xxlg) var(--straumur__space-5xlg);cursor:pointer}.straumur__stored-card-component:has(.straumur__stored-card-component__radio-selector:checked){cursor:default}.straumur__stored-card-component__radio-selector{position:absolute;opacity:0}.straumur__stored-card-component__content{display:flex;align-items:center;gap:var(--straumur__space-lg);transition:background-color .3s ease}.straumur__stored-card-component__radio-selector:checked+.straumur__stored-card-component__content{padding-bottom:var(--straumur__space-xxlg);cursor:default}.straumur__stored-card-component--circle{width:var(--straumur__space-5xlg);height:var(--straumur__space-5xlg);border:1px solid var(--straumur__color-cosmos-blue-gamma);background:var(--straumur__color-secondary-gamma);border-radius:50%;position:relative;transition:all .3s ease}.straumur__stored-card-component__content:hover .straumur__stored-card-component--circle{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__stored-card-component--circle:after{content:"";position:absolute;width:100%;height:100%;border-radius:50%;top:50%;left:50%;transform:translate(-50%,-50%) scale(0);transition:transform .2s ease}.straumur__stored-card-component__radio-selector:checked+.straumur__stored-card-component__content .straumur__stored-card-component--circle{background:var(--straumur__color-blue-beta);border-color:var(--straumur__color-transparent)}.straumur__stored-card-component__radio-selector:checked+.straumur__stored-card-component__content .straumur__stored-card-component--circle:after{transform:translate(-50%,-50%) scale(1);background:var(--straumur__color-primary);height:var(--straumur__space-md);width:var(--straumur__space-md)}.straumur__stored-card-component--text{color:#213547;font-size:1rem;user-select:none}.straumur__stored-card-component--brands{display:flex;margin-left:auto;align-items:center;gap:var(--straumur__space-xxs)}.straumur__stored-card-component--brands>svg{transition:all .2s ease}.straumur__stored-card-component__remove-stored-card-button{margin-left:auto}.straumur__stored-card-component__remove-stored-card-button--text{color:#d03e00;text-decoration:none;background:none;border:none;cursor:pointer;transition:all .2s ease}.straumur__stored-card-component__remove-stored-card-button--text:disabled{cursor:not-allowed;color:#72889d}.straumur__stored-card-component__confirm-remove-stored-card{background-color:#fff7db;border-radius:var(--straumur__border-radius-s);max-height:0;overflow:hidden;transition:all .3s ease;opacity:0}.straumur__stored-card-component__confirm-remove-stored-card--expanded{padding:var(--straumur__space-xxlg);max-height:600px;opacity:1}.straumur__stored-card-component__confirm-remove-stored-card--header{display:flex;align-items:center;gap:var(--straumur__space-lg);color:#262b31;padding-bottom:var(--straumur__space-xxlg)}.straumur__stored-card-component__confirm-remove-stored-card--actions{display:flex;gap:var(--straumur__space-lg);justify-content:end}.straumur__stored-card-component__confirm-remove-stored-card--actions--button{color:#775d00;background:none;border:none;cursor:pointer;text-decoration:none;font-weight:700}.straumur__stored-card-component__expandable{background:var(--straumur__color-white);max-height:0;overflow:hidden;transition:all .3s ease;opacity:0}.straumur__stored-card-component__loading-text{display:flex;justify-content:center}.straumur__stored-card-component__radio-selector:checked~.straumur__stored-card-component__expandable{max-height:600px;opacity:1}.straumur__stored-card-component__form{display:flex;padding-top:var(--straumur__space-xxlg);flex-direction:column;gap:var(--straumur__space-5xlg)}.straumur__stored-card-component__form--wrapper{display:flex;flex-direction:column;justify-items:start;position:relative;width:100%}.straumur__stored-card-component__form--wrapper--error{color:var(--straumur__color-red-beta);font-size:12px}.straumur__stored-card-component__form--wrapper--label{transform:translate(10px) translateY(-50%);z-index:1;background:linear-gradient(to top,var(--straumur__color-secondary-gamma) 53%,var(--straumur__color-transparent) 50%);position:absolute;font-weight:500;font-size:14px;padding:0 var(--straumur__space-xxs)}.straumur__stored-card-component__form--wrapper--label--readonly{background:linear-gradient(to top,var(--straumur__color-gray-epsilon) 53%,var(--straumur__color-transparent) 50%)}.straumur__stored-card-component__form--wrapper--label--error{color:var(--straumur__color-red-beta);background:linear-gradient(to top,var(--straumur__color-red-gamma) 53%,var(--straumur__color-transparent) 50%);font-size:13px;font-weight:500}.straumur__stored-card-component__form--wrapper--label--info{position:absolute;top:33%;right:var(--straumur__space-md)}.straumur__stored-card-component__form--wrapper--input{background:var(--straumur__color-secondary-gamma);color:#00112c;display:flex;align-items:center;border:1px solid var(--straumur__color-transparent);border-radius:var(--straumur__border-radius-s);font-size:1rem;height:48px;outline:none;padding-left:var(--straumur__space-lg);transition:border .2s ease-out,box-shadow .2s ease-out;position:relative}.straumur__stored-card-component__form--wrapper--input--readonly{background-color:var(--straumur__color-gray-epsilon)}.straumur__stored-card-component__form--wrapper--input:hover{border:1px solid var(--straumur__color-cosmos-blue-delta)}.straumur__stored-card-component__form--wrapper--input--readonly:hover{border:1px solid var(--straumur__color-transparent)}.straumur__stored-card-component__form--wrapper--input--error{background:var(--straumur__color-red-gamma);border:1px solid var(--straumur__color-red-beta)}.straumur__stored-card-component__form--wrapper--input--error:hover{border:1px solid var(--straumur__color-red-beta)}.straumur__stored-card-component__form--field-wrapper{display:flex;width:100%;gap:var(--straumur__space-5xlg)}.straumur__stored-card-component__submit-button{background:var(--straumur__color-primary);border:none;border-radius:var(--straumur__border-radius-s);color:var(--straumur__color-white);cursor:pointer;font-size:1rem;height:40px;outline:none;padding:0 var(--straumur__space-xxlg);transition:background .2s ease-out;width:100%}.straumur__stored-card-component__submit-button:hover{background:var(--straumur__color-primary);border:1px solid #dbdee2}.straumur__stored-card-component__submit-button:disabled{background:#72889d;border:1px solid #dbdee2;cursor:not-allowed}
|
|
10
|
+
`);var ip=()=>a("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a("g",{"clip-path":"url(#clip0_10650_34968)"},a("path",{d:"M12.0011 15C12.6245 15 13.1261 14.4984 13.1261 13.875V7.875C13.1261 7.25391 12.6222 6.75 12.0433 6.75C11.4644 6.75 10.8761 7.25625 10.8761 7.875V13.875C10.8761 14.4984 11.3823 15 12.0011 15ZM12.0011 16.5516C11.1873 16.5516 10.5273 17.2116 10.5273 18.0253C10.5292 18.8391 11.1855 19.5 12.0011 19.5C12.8167 19.5 13.4748 18.84 13.4748 18.0262C13.473 17.2125 12.8167 16.5516 12.0011 16.5516Z",fill:"#DFAE00"}),a("path",{opacity:"0.4",d:"M23.7312 19.5469L13.7328 2.48438C12.9673 1.17188 11.0356 1.17188 10.2649 2.48438L0.271188 19.5469C-0.49803 20.8547 0.460048 22.5 2.00181 22.5H21.9987C23.5343 22.5 24.4953 20.8594 23.7312 19.5469ZM10.8734 7.875C10.8734 7.25391 11.3773 6.75 11.9984 6.75C12.6195 6.75 13.1234 7.25625 13.1234 7.875V13.875C13.1234 14.4961 12.6195 15 12.0406 15C11.4617 15 10.8734 14.4984 10.8734 13.875V7.875ZM11.9984 19.5C11.1846 19.5 10.5246 18.84 10.5246 18.0262C10.5246 17.2125 11.1842 16.5525 11.9984 16.5525C12.8126 16.5525 13.4721 17.2125 13.4721 18.0262C13.4703 18.8391 12.814 19.5 11.9984 19.5Z",fill:"#DFAE00"})),a("defs",null,a("clipPath",{id:"clip0_10650_34968"},a("rect",{width:"24",height:"24",fill:"white"})))),Oc=ip;function lp({configuration:t,paymentMethods:e,storedPaymentMethod:r,onStoredCardRemoved:o}){let s=ne(null),n=ne(),i=ne(),[c,d]=z(!0),[p,u]=z("required"),[l,h]=z(!1),[m,y]=z({encryptedSecurityCode:{visible:!1}}),{activePaymentMethod:b,setActivePaymentMethod:C,activeStoredPaymentMethodId:_,setActiveStoredPaymentMethodId:g,isStoredCardInitialized:O,updateStoredCardInitialization:N,handleSuccess:E,handleError:P,setThreeDSecureActive:L,threeDSecureActive:H}=_e(),U=async()=>{n.current=await Ce({clientKey:e.clientKey,environment:t.environment,locale:t.locale,countryCode:"IS",amount:{value:e.minorUnitsAmount,currency:e.currency},paymentMethodsResponse:e.paymentMethods,onError:Ko,onPaymentCompleted:qo,onPaymentFailed:Xo}),i.current=new Ye(n.current,{brands:[r.brand],onSubmit:Wo,onAdditionalDetails:Zo,onConfigSuccess(){N(r.id,!0)},onBrand:S=>{u(S.cvcPolicy)},onValidationError:S=>{let K={encryptedSecurityCode:{visible:!1,message:void 0}};S.filter(B=>B.error).forEach(B=>{K[B.fieldType].visible=!0,K[B.fieldType].message=B.errorI18n}),y(K)},onAllValid:S=>{d(!S.allValid)},placeholders:t.placeholders,challengeWindowSize:"05"}),s.current&&i.current.mount(s.current)};pe(()=>{b==="storedcard"&&_===r.id&&!O[_]&&U()},[t,b,_]),pe(()=>{i.current&&O[_]&&(U(),y({encryptedSecurityCode:{visible:!1,message:void 0}}))},[t]),pe(()=>{h(!1)},[b,_]);function F(){C("storedcard"),g(r.id)}function M(){h(!0)}function ie(){h(!1)}async function Go(){let S={storedPaymentMethodId:r.id,sessionId:t.sessionId},K=await In(t.environment,S);if(!K.ok){P("error.failedToSubmitRemoveStoredPaymentCard");return}if(!(await K.json()).success){P("error.failedToRemoveStoredPaymentCard");return}o(r.id)}function Ko(S,K){P("error.unknownError")}async function Wo(S,K,B){let gt={...S.data,sessionId:t.sessionId,paymentMethod:{...S.data.paymentMethod,storedPaymentMethodId:r.id}},Te=await Qe(t.environment,gt);if(!Te.ok){B.reject(),P("error.failedToSubmitPayment");return}let Ae=await Te.json();if(!Ae.resultCode){B.reject(),P("error.paymentFailed");return}let{resultCode:De,action:vt}=Ae;(De==="ChallengeShopper"||De==="IdentifyShopper")&&L(!0),B.resolve({resultCode:De,action:vt})}async function Zo(S,K,B){let gt={...S.data,sessionId:t.sessionId},Te=await Fe(t.environment,gt);if(!Te.ok){B.reject(),P("error.failedToSubmitPaymentDetails");return}let Ae=await Te.json();if(!Ae.resultCode){B.reject(),P("error.paymentDetailsFailed");return}let{resultCode:De,action:vt}=Ae;B.resolve({resultCode:De,action:vt})}function qo(S,K){S.resultCode==="Authorised"?E("success.paymentAuthorized"):P("error.paymentUnsuccessful"),t.onPaymentCompleted?.({resultCode:S.resultCode})}function Xo(S,K){S?(S.resultCode==="Authorised"?E("success.paymentAuthorized"):P("error.paymentUnsuccessful"),t.onPaymentFailed?.({resultCode:S.resultCode})):t.onPaymentFailed?.()}function Jo(){i.current&&i.current.submit()}return a("label",{className:"straumur__stored-card-component"},a("input",{type:"radio",className:"straumur__stored-card-component__radio-selector",checked:b==="storedcard"&&_===r.id,onChange:F}),a("span",{className:"straumur__stored-card-component__content"},a("span",{className:"straumur__stored-card-component--circle"}),a(Ho,{brands:[{brand:r.brand,brandFullName:r.name}]}),a("span",{className:"straumur__stored-card-component--text"},"\u2022\u2022\u2022\u2022 ",r.lastFour),b==="storedcard"&&_===r.id&&O[r.id]&&a("div",{className:"straumur__stored-card-component__remove-stored-card-button"},a("button",{onClick:M,className:"straumur__stored-card-component__remove-stored-card-button--text",disabled:l},V(t.locale,"stored-cards.removeStoredCard")))),a("div",{className:`straumur__stored-card-component__confirm-remove-stored-card ${l?"straumur__stored-card-component__confirm-remove-stored-card--expanded":""}`},a("div",{className:"straumur__stored-card-component__confirm-remove-stored-card--header"},a(Oc,null),a("span",{className:"straumur__stored-card-component__confirm-remove-stored-card--header--title"},V(t.locale,"stored-cards.removeStoredCardQuestion"))),a("div",{className:"straumur__stored-card-component__confirm-remove-stored-card--actions"},a("button",{className:"straumur__stored-card-component__confirm-remove-stored-card--actions--button",onClick:Go},V(t.locale,"stored-cards.removeStoredCardQuestionYesRemove")),a("button",{className:"straumur__stored-card-component__confirm-remove-stored-card--actions--button",onClick:ie},V(t.locale,"stored-cards.removeStoredCardQuestionCancel")))),a("div",{className:"straumur__stored-card-component__expandable",ref:s,style:{height:H?"600px":"auto",minWidth:H?"350px":"auto"}},!O[r.id]&&a("div",{className:"straumur__stored-card-component__loading-text"},a(lr,null)),a("div",{className:"straumur__stored-card-component__form",style:{opacity:O[r.id]?1:0,position:O[r.id]?"relative":"absolute",transition:"opacity 0.3s ease-in-out"}},a("div",{className:"straumur__stored-card-component__form--field-wrapper"},a("div",{className:"straumur__stored-card-component__form--wrapper"},a("label",{className:"straumur__stored-card-component__form--wrapper--label straumur__stored-card-component__form--wrapper--label--readonly"},V(t.locale,"stored-cards.expiryDate")),a("span",{className:"straumur__stored-card-component__form--wrapper--input straumur__stored-card-component__form--wrapper--input--readonly"},r.expiryMonth,"/",r.expiryYear)),a("div",{className:"straumur__stored-card-component__form--wrapper"},(p==="optional"||p==="required")&&a(le,null,a("label",{className:`straumur__stored-card-component__form--wrapper--label ${m.encryptedSecurityCode.visible?"straumur__stored-card-component__form--wrapper--label--error":""}`},p==="optional"?V(t.locale,"stored-cards.securityCode3DigitsOptional"):V(t.locale,"stored-cards.securityCode3Digits")),a("span",{className:`straumur__stored-card-component__form--wrapper--input ${m.encryptedSecurityCode.visible?"straumur__stored-card-component__form--wrapper--input--error":""}`,"data-cse":"encryptedSecurityCode"},a("div",{className:"straumur__stored-card-component__form--wrapper--label--info"},a(ir,{content:V(t.locale,"stored-cards.securityCode3DigitsInfo")},a(Vo,null))))),m.encryptedSecurityCode.visible&&a("span",{className:"straumur__stored-card-component__form--wrapper--error"},m.encryptedSecurityCode.message))),a("button",{className:"straumur__stored-card-component__submit-button",disabled:c,onClick:Jo},e.formattedAmount))))}var Fc=lp;function cp({configuration:t,paymentMethods:e}){let[r,o]=z(e.paymentMethods.storedPaymentMethods??[]),{activePaymentMethod:s,threeDSecureActive:n}=_e();if(!r||r?.length===0||s!=="storedcard"&&n)return null;function i(c){o(d=>d.filter(p=>p.id!==c))}return a(le,null,r?.map(c=>a(Fc,{key:c.id,configuration:t,storedPaymentMethod:c,paymentMethods:e,onStoredCardRemoved:i})))}var Mc=cp;ce(`.straumur__payment-method-group{display:flex;flex-direction:column;gap:var(--straumur__space-xxlg);width:100%}
|
|
11
11
|
`);function dp({children:t,initialValue:e}){return a(jn,{initialValue:e},a("div",{className:"straumur__payment-method-group"},t))}var Lc=dp;ce(`.straumur__result-component{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:300px;background-color:var(--straumur__color-white);border-radius:16px}
|
|
12
12
|
`);var pp=()=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"120",height:"120",viewBox:"0 0 120 120"},a("circle",{cx:"60",cy:"60",r:"50",fill:"none",stroke:"#5b8206","stroke-width":"5","stroke-dasharray":"314","stroke-dashoffset":"314"},a("animate",{attributeName:"stroke-dashoffset",from:"314",to:"0",dur:"1s",fill:"freeze"})),a("g",{transform:"translate(60,60)"},a("path",{d:"M-25 5 L-5 25 L25 -15",fill:"none",stroke:"#5b8206","stroke-width":"6","stroke-linecap":"round","stroke-linejoin":"round","stroke-dasharray":"100","stroke-dashoffset":"100"},a("animate",{attributeName:"stroke-dashoffset",from:"100",to:"0",dur:"0.5s",begin:"1s",fill:"freeze"}),a("animateTransform",{attributeName:"transform",type:"scale",from:"1 1",to:"1.2 1.2",begin:"1.5s",dur:"0.2s",fill:"freeze",additive:"sum"}),a("animateTransform",{attributeName:"transform",type:"scale",from:"1.2 1.2",to:"1 1",begin:"1.7s",dur:"0.2s",fill:"freeze",additive:"sum"})))),jo=pp;var up=()=>a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"120",height:"120",viewBox:"0 0 120 120"},a("circle",{cx:"60",cy:"60",r:"50",fill:"none",stroke:"#d03e00","stroke-width":"5","stroke-dasharray":"314","stroke-dashoffset":"314"},a("animate",{attributeName:"stroke-dashoffset",from:"314",to:"0",dur:"1s",fill:"freeze"})),a("g",{transform:"translate(60,60)"},a("g",{id:"crossGroup"},a("line",{x1:"-20",y1:"-20",x2:"20",y2:"20",stroke:"#d03e00","stroke-width":"6","stroke-linecap":"round","stroke-dasharray":"57","stroke-dashoffset":"57"},a("animate",{attributeName:"stroke-dashoffset",from:"57",to:"0",dur:"0.3s",begin:"1s",fill:"freeze"})),a("line",{x1:"20",y1:"-20",x2:"-20",y2:"20",stroke:"#d03e00","stroke-width":"6","stroke-linecap":"round","stroke-dasharray":"57","stroke-dashoffset":"57"},a("animate",{attributeName:"stroke-dashoffset",from:"57",to:"0",dur:"0.3s",begin:"1.3s",fill:"freeze"}))))),$o=up;function mp({configuration:t}){let{error:e,success:r}=_e();return!e&&!r?null:a("div",{className:"straumur__result-component"},e&&a(le,null,a($o,null),a("p",{className:"straumur__result-component__error--message"},V(t.locale,e))),r&&a(le,null,a(jo,null),a("p",{className:"straumur__result-component__success--message"},V(t.locale,r))))}var Uc=mp;function hp({children:t}){let{error:e,success:r}=_e();return e||r?null:a(le,null,t)}var Bc=hp;function fp({configuration:t,paymentMethods:e}){return a(Lc,{initialValue:null},a(Bc,null,a(Mc,{configuration:t,paymentMethods:e}),a(Ic,{configuration:t,paymentMethods:e}),a(wc,{configuration:t,paymentMethods:e}),a(Nc,{configuration:t,paymentMethods:e})),a(Uc,{configuration:t}))}var Vc=fp;var pn=class{configuration;paymentMethods=null;mountElement=null;constructor(e){this.configuration={...e,locale:r(e.locale)};function r(o){switch(o){case"is":return"is-IS";case"en":return"en-US";default:return"is-IS"}}}async mount(e){try{if(this.mountElement=typeof e=="string"?document.querySelector(e):e,!this.mountElement){this.handleError("error.failedToInitializeStraumurWebComponent");return}Ut(a(zo,null,a("div",{className:"straumur__component"},a(lr,null))),this.mountElement);let r=await is(this.configuration.environment,this.configuration.sessionId);if(r.resultCode==="Error"){this.handleError(r.error);return}this.paymentMethods=r,this.configuration.locale=this.configuration.locale||this.paymentMethods.locale,this.renderComponent()}catch{}}renderComponent(){this.mountElement&&Ut(a(zo,null,a(Vc,{configuration:this.configuration,paymentMethods:this.paymentMethods})),this.mountElement)}updateConfig(e){this.configuration={...this.configuration,...e},this.mountElement&&this.renderComponent()}handleSuccess(e){Ut(a(zo,null,a("div",{className:"straumur__component"},a(jo,null),a("p",null,V(this.configuration.locale,e)))),this.mountElement)}async submitDetails(e){let r=await is(this.configuration.environment,this.configuration.sessionId);if(r.resultCode==="Error"){this.handleError(r.error);return}(await Ce({environment:this.configuration.environment,clientKey:r.clientKey,paymentMethodsResponse:r.paymentMethods,countryCode:"IS",onAdditionalDetails:this.handleOnSubmitAdditionalData})).submitDetails({details:{redirectResult:e}})}async handleOnSubmitAdditionalData(e,r,o){let s={...e.data,sessionId:this.configuration.sessionId},n=await Fe(this.configuration.environment,s);if(!n.ok){o.reject(),this.handleError("error.failedToSubmitPaymentDetails");return}let i=await n.json();if(!i.resultCode){o.reject(),this.handleError("error.paymentDetailsFailed");return}let{resultCode:c,action:d}=i;o.resolve({resultCode:c,action:d}),c==="Authorised"?this.handleSuccess("success.paymentAuthorized"):this.handleError("error.paymentUnsuccessful")}setLanguage(e){this.updateConfig({locale:e})}destroy(){this.mountElement&&(Ut(null,this.mountElement),this.mountElement=null)}handleError(e){Ut(a(zo,null,a("div",{className:"straumur__component"},a($o,null),a("p",null,V(this.configuration.locale,e)))),this.mountElement)}},Hc=pn;function zo({children:t}){return a("div",{className:"straumur__root-component"},t)}return Kc(_p);})();
|
|
13
13
|
/*! Bundled license information:
|