@adyen/adyen-platform-experience-web
Version:

1 lines • 326 kB
JavaScript
"use strict";var J0=Object.defineProperty;var Sc=e=>{throw TypeError(e)};var e2=(e,t,n)=>t in e?J0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var B=(e,t,n)=>e2(e,typeof t!="symbol"?t+"":t,n),di=(e,t,n)=>t.has(e)||Sc("Cannot "+n);var p=(e,t,n)=>(di(e,t,"read from private field"),n?n.call(e):t.get(e)),w=(e,t,n)=>t.has(e)?Sc("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),b=(e,t,n,r)=>(di(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),H=(e,t,n)=>(di(e,t,"access private method"),n);var En=(e,t,n,r)=>({set _(s){b(e,t,s,n)},get _(){return p(e,t,r)}});const F=require("classnames"),Oi="test",t2=e=>{var t;return(t=e==null?void 0:e.replace)==null?void 0:t.call(e,/([^\/])$/,"$1/")},n2=e=>e==null?void 0:e.replace(/^([^\/])/,"/$1"),r2=(()=>{const e={test:"https://platform-components-external-test.adyen.com/platform-components-external/api/",live:"https://platform-components-external-live.adyen.com/platform-components-external/api/"};return t=>e[t??Oi]||e[Oi]})(),Gn=Function.prototype.bind.bind(Function.prototype.call),s2=async()=>{},Ho=e=>e,te=()=>{},o2=Gn(Object.prototype.toString),i2=e=>o2(e).slice(8,-1),Ql=e=>(Object.keys(e).forEach(t=>{const n=e[t];n&&typeof n=="object"&&!Object.isFrozen(n)&&Ql(n)}),Object.freeze(e)),bi=e=>e===!!e,Q=e=>typeof e=="function",po=e=>e===null,Ne=e=>e==null,Ur=e=>typeof e=="number",Go=e=>i2(e)==="Object",yt=e=>typeof e=="string",a2=e=>typeof e=="symbol",Z=e=>e===void 0,St=(e,t,n)=>(Math.min(e,n)!==e&&([e,n]=[n,e]),Math.max(e,Math.min(t,n))),is=e=>!a2(e)&&e===~~e,Fn=e=>Ur(e)&&1/e===0,Jl=(e,t)=>{if(Number.isInteger(e)&&Number.isInteger(t))return e+Math.floor((t-e)/2);throw TypeError(`Expects 2 integer values: [${e}, ${t}]`)},Fs=(e,t)=>(e%t+t)%t,Rc="abort",c2="signal is aborted without reason",Xn=(e,t=e)=>bi(e)?e:!!t,xe=e=>e===!0,$t=e=>e!==!1,l2=e=>!1,Ii=e=>!0,G=(e,t=!1)=>({writable:xe(t),enumerable:!0,value:e}),ue=(e,t=!0)=>({enumerable:$t(t),get:e}),Bt=Gn(Object.prototype.hasOwnProperty),Yn=(e,t)=>e===t||!(e===e||t===t);if(!Bt(AbortSignal.prototype,"reason"))try{Object.defineProperty(AbortSignal.prototype,"reason",{...ue(function(){return this.aborted?as():void 0},!0),configurable:!0})}catch{}Bt(AbortSignal.prototype,"throwIfAborted")||(AbortSignal.prototype.throwIfAborted=function(){if(this.aborted)throw this.reason??as()});const as=(e=c2)=>new DOMException(e,"AbortError"),eu=(e,t)=>{if(!Yn(e.reason,t))try{Object.defineProperty(e,"reason",G(t))}catch{}return e},u2=(e=as())=>{if("abort"in AbortSignal)return AbortSignal.abort(e);const t=new AbortController,n=Z(e)?as():e,{signal:r}=t;return t.abort(n),eu(r,n),r},Yo=e=>{if("any"in AbortSignal)return AbortSignal.any(e);let t=new Set,n=new AbortController;const{signal:r}=n;let s=function(){t.forEach(o=>o.removeEventListener(Rc,s)),t.clear();const i=(this==null?void 0:this.reason)??as();n.abort(i),eu(r,i),n=t=s=void 0};e:{const i=Symbol("<NIL_EXCEPTION>");let o=i;t:{try{for(const c of e){if(!xs(c))throw new TypeError("Failed to convert value to 'AbortSignal'");if(c.aborted)break t;t.add(c)}}catch(c){o=c;break t}t.forEach(c=>c.addEventListener(Rc,s));break e}if(s.call(r),o!==i)throw o}return r},xs=e=>e instanceof AbortSignal,de=Object.freeze([]),U=Object.freeze(Object.create(null)),Pr=Promise.resolve();Promise.race(de);const fn=function(e,...t){return new Promise(n=>n(e.call(this,...t)))},d2=(e,t,n)=>{let r=t.get(e);return Z(r)&&Q(n)&&(Z(r=n(e,t))||t.set(e,r)),r},Vr=(e,t=de)=>{const n=`${e||""}`.trim(),r=n?n.split(/(?:\s*,\s*)+/).filter(Ho):de;return r.length?r:t},qr=(e,t,n)=>e.includes(t)?t:Ne(t)?e[0]:e.includes(n)?n:e[0],Oc=Gn(Array.prototype.some),tu=function e(t,n,r=new Set){for(const s of n)Array.isArray(s)?e(t,s,r):(t&&r.delete(s),r.add(s));return r};Gn(tu,void 0,!1);Gn(tu,void 0,!0);const nu=(...e)=>{const[t]=e,r=(e.length>=2?new Date(...e):t instanceof Date?t:new Date(yt(t)||Number.isFinite(t)?t:void 0)).getTime();return Number.isFinite(r)?r:void 0},Mr=(()=>{let e=Date.now();return(t="adyen-pe")=>`${t}-${++e}`})(),aa=(()=>{const e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";return()=>e.replace(/[xy]/g,t=>{const n=Math.random()*16|0;return(t=="x"?n:n&3|8).toString(16)})})(),cs=(e,t=U)=>Go(e)?e:cs(t,U),Wr=Gn(Object.create,void 0),J=Gn(Wr,void 0,null),jo=(e=U)=>Object.freeze({...e,defineProperty:Ii,set:Ii}),h2=e=>e&&(e==null?void 0:e.length)>0?`${e[0].toUpperCase()}${e.slice(1)}`:e,Di=e=>Ne(e)||yt(e)&&/^\s*$/.test(e),f2="/setup",m2=xe(void 0),bc=(()=>{let e=0;if(Number.isFinite(e)&&(e=Math.max(0,~~e)))return e})();class ki extends Error{constructor(n,r,s,i){super(s);B(this,"type");B(this,"errorCode");B(this,"requestId");this.type=n,this.name=n,this.errorCode=i,this.requestId=r}}const p2=/^[^]*?filename[^;\n]*=\s*(?:UTF-\d['"]*)?(?:(['"])([^]*?)\1|([^;\n]*))?[^]*?$/;var _o=(e=>(e.NETWORK_ERROR="NETWORK_ERROR",e.CANCEL="CANCEL",e.IMPLEMENTATION_ERROR="IMPLEMENTATION_ERROR",e.ERROR="ERROR",e.EXPIRED_TOKEN="EXPIRED_TOKEN",e))(_o||{});const _2=e=>{switch(e){case 401:return"EXPIRED_TOKEN";default:return"NETWORK_ERROR"}},y2=e=>{var t;return(t=e.headers.get("Content-Type"))==null?void 0:t.split(";",1)[0]},g2=e=>{const n=(e.headers.get("Content-Disposition")??"").replace(p2,"$2$3");return decodeURIComponent(n)},T2=e=>{const{headers:t=[],method:n="GET"}=e;return{method:n,mode:"cors",cache:"default",credentials:"same-origin",headers:{Accept:"application/json, text/plain, */*","Content-Type":e.contentType??"application/json",...t,"SDK-Version":"1.5.0"},redirect:"follow",signal:e.signal,referrerPolicy:"no-referrer-when-downgrade",...n==="POST"&&e.body&&{body:JSON.stringify(e.body)}}};function A2({message:e,level:t,errorCode:n,type:r="NETWORK_ERROR",requestId:s}){switch(t){case"silent":break;case"info":case"warn":console[t](e);break;case"error":default:throw new ki(r,s,e,n)}}function E2(e){return e&&e.errorCode&&e.type&&(e.detail||e.invalidFields)&&e.status}function N2(e){const t=new URLSearchParams;for(const n of Object.keys(e)){const r=e[n];Ne(r)||(Array.isArray(r)?r.forEach(s=>t.append(n,s)):t.set(n,String(r)))}return t}const ru=e=>{let t,n,r;const s=()=>{if(Z(t))return;const u=t.abort.bind(t);t=void 0,u()},i=()=>(r=new Promise((u,l)=>{if(n.addEventListener("abort",function h(){n.removeEventListener("abort",h),l(e)}),n.aborted)throw e}),r.catch(te),r),o=()=>(Z(t)&&(t=new AbortController,n=t.signal,r=i()),c),c=J({abort:G(s),promise:ue(()=>r),reason:G(e),refresh:G(o),signal:ue(()=>n)});return o()},su=()=>{let e,t,n;const r=()=>{const i=n??te,o=new Promise((c,u)=>{n=c,t=u});return i(e=o),s},s=J({promise:ue(()=>e),refresh:G(r),reject:G(i=>t(i)),resolve:G(i=>n(i))});return r()},Bs=e=>{const t=ru(),n=su();let r;return Object.defineProperties(function(...i){Z(r)?n.refresh():t.abort();const o=fn.call(this,e,t.refresh().signal,...i);return(async()=>{let c=r===(r=o);try{const u=await o.finally(()=>{c=r===o,c&&(r=void 0)});c&&n.resolve(u)}catch(u){c&&n.reject(u)}})(),o},{abort:G(t.abort),promise:ue(()=>n.promise),refresh:G(()=>void n.refresh())})};class v2{constructor(t){B(this,"_endpoints",U);B(this,"_extraConfig",U);B(this,"_revokeEndpointsProxy",te);B(this,"_beforeHttp",async()=>{await this._refreshPromisor.promise.catch(te)});B(this,"_refreshPromisor",Bs((t,n)=>{const r=xs(n)?Yo([n,t]):t;return this._fetchSetupEndpoint(r)}));this._session=t;let n;this.refresh=r=>(this._refreshPromisor(r).catch(te),n??(n=this._refreshPromisor.promise.finally(()=>n=void 0).then(({endpoints:s,...i})=>{this._resetEndpoints(),{proxy:this._endpoints,revoke:this._revokeEndpointsProxy}=this._getEndpointsProxy(s),this._extraConfig=Ql(i)})))}get endpoints(){return this._endpoints}get extraConfig(){return this._extraConfig}_fetchSetupEndpoint(t){return this._session.http(null,{method:"POST",path:f2,errorLevel:"fatal",loadingContext:this.loadingContext,signal:t})}_getEndpointsProxy(t){const n=new Set(Object.keys(t)),r=J();return Proxy.revocable(U,jo({get:(s,i,o)=>n.has(i)?(r[i]??(r[i]=(()=>{const{method:c="GET",url:u}=t[i];if(!Z(u||void 0))return(...l)=>{const h=this._getHttpOptions(c,u,...l);return this._session.http(this._beforeHttp,h)}})()),r[i]):Reflect.get(s,i,o)}))}_getHttpOptions(t,n,...r){const{loadingContext:s}=this,[i,o]=r,{path:c,query:u}=cs(o),l=u&&N2(u);if(Go(c))for(const h of Object.keys(c))n=n.replace(`{${h}}`,c[h]);return{loadingContext:s,...i,method:t,params:l,path:n}}_resetEndpoints(){this._revokeEndpointsProxy(),this._revokeEndpointsProxy=te,this._endpoints=U}}const ou=Symbol("Error<SESSION_EXPIRED>"),C2=Symbol("Error<SESSION_FACTORY_UNAVAILABLE>"),S2=Symbol("Error<SESSION_HTTP_UNAVAILABLE>"),R2=Symbol("Error<SESSION_INVALID>"),iu=Symbol("Error<SESSION_REFRESH_ABORTED>"),zo="_sessionExpired",au="_sessionReady",O2="_sessionRefreshed",b2="_sessionRefreshingEnd",I2="_sessionRefreshingStart",cu="_session.deadline",lu="_session.ready",uu="_session.refreshingEnd",du="_session.refreshingStart",D2=async e=>{const{specification:t}=e.context,n=await fn(async()=>{const r=t.autoRefresh;return Q(r)?r.call(t,e.session):r}).catch(l2);return xe(n)},k2=e=>{let t=e.context.emitter.on(zo,()=>s(!1)),n,r=Bs(async(c,u=!1)=>{n=c;const l=xe(u)||await D2(e);n===c&&l&&e.pending&&!e.refreshing&&e.refresh(n).catch(te)}),s=(c=!1)=>{e.refreshing||r(c)},i=()=>{t(),r.abort(),r=n=t=void 0,s=i=te};return Object.defineProperties((c=!1)=>s(c),{destruct:ue(()=>i,!1)})},Ic=1e3,L2=2147483647,w2=(e,t=Ic,n=!1)=>{var h;let r=new AbortController,s=St(0,~~t,L2),i=xe(n);Number.isFinite(s)||(s=Ic);const o=((h=document.timeline)==null?void 0:h.currentTime)??performance.now(),c=()=>{r==null||r.abort(),r=void 0},u=d=>{!r||r.signal.aborted||(l(d),e(d))},l=d=>{let m=0;if(!i){const f=d-o,_=Math.round(f/s)*s;m=o+_+s-performance.now()}setTimeout(()=>requestAnimationFrame(u),m)};return l(o),i=!1,J({cancel:G(c),delay:G(t),signal:G(r.signal)})},P2=e=>{const t={},n=Object.getOwnPropertyDescriptors(e);for(const r of Object.keys(e)){const{get:s,value:i}=n[r];t[r]=ue(s||(Q(i)?i.bind(e):()=>i))}return J(t)},M2=()=>{const e={idle:null,resume:null},t={};for(const n of Object.keys(e))t[n]={get:()=>e[n]??te,set:r=>{Ne(r)?e[n]=null:Q(r)&&r!==e[n]&&(e[n]=r)}};return J(t)},hu=Symbol("<<UNSUBSCRIBE>>"),jn=e=>e===hu,$s=e=>{let t;const n=P2(e),r=M2(),s=new Map,i=new WeakMap,o=()=>Object.freeze({...n}),c=()=>s.size===0,u=h=>{if(c())return;if(jn(h)){const m=[];return s.forEach((f,_)=>{m.push(_);const y=i.get(_);for(;f--;)y==null||y()}),m.forEach(f=>f(h)),!0}const d=t;t=o();for(const m of Object.keys(t))if(!Yn(t[m],d[m]))return s.forEach((f,_)=>_(t)),!0;return!1},l=h=>{if(!Q(h))return te;const d=d2(h,i,()=>{let f=()=>{const _=s.get(h)||0;_===1?(f=void 0,s.delete(h),i.delete(h),c()&&(t=void 0,r.idle())):_>1&&s.set(h,_-1)};return()=>{f==null||f()}}),m=c();return s.set(h,(s.get(h)||0)+1),m&&(t=o(),r.resume()),h(t),d};return J({idle:ue(c),on:G(r),cancelSubscriptions:G(()=>u(hu)),requestNotification:G(()=>u()),snapshot:ue(()=>t??o()),subscribe:G(l)})},ca=(()=>{let e;const{cancelSubscriptions:t,requestNotification:n,subscribe:r,on:s}=$s({now:()=>Date.now()});return s.resume=()=>{e=w2(n,1e3,!1)},s.idle=()=>{e==null||e.cancel(),e=void 0},J({cancelSubscriptions:G(t),subscribe:G(r)})})(),la=()=>{const e=new class extends EventTarget{},t=(r,...s)=>{const[i]=s;s.length&&Z(i)&&console.warn("Unexpected value `undefined` provided for event detail.\n Turn off this warning by doing either of the following:\n (1) omit the optional event detail parameter.\n (2) explicitly pass `null` for the event detail parameter (instead of `undefined`).\n");const o=new CustomEvent(r,J({bubbles:G(!1),cancelable:G(!1),detail:G(i??null)}));return e.dispatchEvent(o)},n=(r,s)=>{if(!Q(s))return te;const i=o=>s.call(null,J({detail:G(o.detail),timeStamp:G(o.timeStamp),type:G(o.type)}));return e.addEventListener(r,i),()=>e.removeEventListener(r,i)};return J({emit:G(t),on:G(n)})},F2=(e,t)=>{let n,r=1/0,s,i;const o=ru(),c=la(),u=()=>{n==null||n.removeEventListener("abort",u),r=1/0,i==null||i(),o.refresh(),c.emit(cu)},l=Bs(async(d,m)=>{s=d;const f=await fn(()=>{const y=t.deadline;return Q(y)?y.call(t,m,d):y}).catch(te);if(s!==d)return;const _=(Array.isArray(f)?f:[f]).filter(y=>y||y===0);if(_.length>0){let y=!1,T=new Set;for(const g of _)if(xs(g)){if(y=g.aborted)break;T.add(g)}else if(r=Math.min(r,nu(g)??1/0),y=r<=Date.now())break;y||(y=T.size<1&&!Number.isFinite(r)),y?n??(n=u2()):(n=Yo([...T,o.signal]),n.addEventListener("abort",u),h()),_.length=0,T.clear()}else n=void 0}),h=()=>{if(!Number.isFinite(r))return;let d=ca.subscribe(m=>{if(jn(m))return u();m.now>=r&&o.abort()});i=()=>{d==null||d(),d=i=void 0}};return J({elapse:G(o.abort),elapsed:ue(()=>n&&n.aborted),on:G(c.on),refresh:G(l.bind(void 0)),signal:ue(()=>o.signal)})},x2=(e,t)=>{let n=!1,r,s,i=!0,o;const c=Symbol("<next_session>"),u=la();function l(f){var _;try{(_=t.assert)==null||_.call(t,f)}catch{throw R2}}function h(f){if(!Q(f))throw C2}const d=Bs((f,_)=>{if(!s)s=f;else return m(xs(_)?Yo([_,f]):f)}),m=async f=>{let _=c;try{n=!1,s=f,i&&await(r??(r=(async()=>{await Pr,i=!1,u.emit(du)})())),h(t.onRefresh),_=await fn(()=>t.onRefresh(o,f)).finally(()=>{if(f.aborted)throw iu})}finally{if(s===f)try{_!==c&&(l(_),o=_,u.emit(lu))}finally{r=void 0,i=!0,u.emit(uu)}}};return e.on(zo,()=>n=!r),d(),J({context:G(J({emitter:G(e),specification:G(t)})),on:G(u.on),pending:ue(()=>n),promise:ue(()=>d.promise),refresh:G(d.bind(void 0)),refreshing:ue(()=>!!r),session:ue(()=>o),signal:ue(()=>s)})};class B2{constructor(t){B(this,"_session");B(this,"_autofresh");B(this,"_deadline");B(this,"_refresher");B(this,"_eventEmitter",la());this._specification=t,this._deadline=F2(this._eventEmitter,this._specification),this._refresher=x2(this._eventEmitter,this._specification),this._autofresh=k2(this._refresher),this._deadline.on(cu,()=>this._eventEmitter.emit(zo)),this._refresher.on(du,()=>this._eventEmitter.emit(I2)),this._refresher.on(uu,()=>this._eventEmitter.emit(b2)),this._refresher.on(lu,()=>{this._session=this._refresher.session,this._deadline.refresh(this._session).finally(()=>this._eventEmitter.emit(O2)),this._eventEmitter.emit(au)}),this.http=this._sessionHttp.bind(this),this.on=this._eventEmitter.on,this.refresh=this._refresher.refresh}get isExpired(){return this._deadline.elapsed}get refreshing(){return this._refresher.refreshing}_assertSessionHttp(t){if(!Q(t))throw S2}async _sessionHttp(t,...n){for(this._autofresh(!0);;)try{await this._refresher.promise.catch(te);const{signal:r}=this._deadline;return await(t==null?void 0:t(this._session,r,...n)),this._assertSessionHttp(this._specification.http),await this._specification.http(this._session,r,...n)}catch(r){if(r!==ou)throw r;if(this._refresher.pending)continue;this._deadline.elapse()}}}const $2="v1",hi=(e,t)=>{try{e==null||e(t)}catch{throw t}};async function U2(e){const{errorLevel:t,loadingContext:n="",path:r}=e,s=T2(e),i=new URL(`${t2(n)}${$2}${n2(r)}`);return e.params&&e.params.forEach((o,c)=>{const u=decodeURIComponent(o);u&&i.searchParams.append(c,u)}),(async()=>{let o=!1;const c={level:t};try{const u=await fetch(i,s);if(u.ok){if(u.status===204)return null;try{switch(y2(u)){case"application/json":return await u.json();default:const d=await u.blob(),m=g2(u);return{blob:d,filename:m}}}catch(h){throw o=!0,h}}c.type=_2(u.status);const l=await u.json();c.message=e.errorMessage||`Service at ${i} not available`,c.errorCode=String(l.status),c.requestId=l==null?void 0:l.requestId,E2(l)&&(c.message=l.detail,c.errorCode=l.errorCode,c.status=l.status),hi(e.errorHandler,c)}catch(u){if(o)throw hi(e.errorHandler,u),u;hi(e.errorHandler,u),c.message=e.errorMessage||`Call to ${i} failed. Error: ${u}`}A2(c)})()}class W2{constructor(t){B(this,"assert",t=>{if(Go(t)){const n=yt(t.id)?t.id.trim():void 0,r=yt(t.token)?t.token.trim():void 0;if(n&&r)return}throw void 0});B(this,"deadline",t=>{const n=[];let r,s;try{({iat:r,exp:s}=JSON.parse(atob(t==null?void 0:t.token.split(".")[1]))),n.push(s)}catch{r=Date.now()}if(!Z(bc)){const i=new Date(r);n.push(i.setMilliseconds(i.getMilliseconds()+bc))}return n});B(this,"http",async(t,n,r)=>{const{headers:s,signal:i,...o}=r;try{const c={...o,headers:{...s,...t&&{Authorization:`Bearer ${t.token}`}},errorHandler:this._errorHandler,signal:xs(i)?Yo([n,i]):n};return await U2(c)}catch(c){throw(c==null?void 0:c.type)===_o.EXPIRED_TOKEN?ou:c}});this.onSessionCreate=t,this._errorHandler=this._errorHandler.bind(this),Object.defineProperties(this,{autoRefresh:G(m2),onRefresh:G((n,r)=>this.onSessionCreate(r))})}_errorHandler(t){try{this.errorHandler&&this.errorHandler(t)}catch{}throw t}}const Zr=Symbol("<<NO_ERR>>");function H2(e){/* istanbul ignore if -- @preserve */if(e===Zr)throw new TypeError("Illegal error")}const G2=()=>{let e=Zr;const t=()=>{e=Zr},n=r=>{H2(r),e=r};return J({error:ue(()=>e===Zr?void 0:e),hasError:ue(()=>e!==Zr),reset:G(t),set:G(n)})};class Y2{constructor(){B(this,"_canSkipSessionRefresh",!1);B(this,"_refreshPromisorSignal");B(this,"_sessionIsFrozen",!1);B(this,"_errorContainer",G2());B(this,"_specification",new W2);B(this,"_sessionContext",new B2(this._specification));B(this,"_setupContext",new v2(this._sessionContext));B(this,"_refreshPromisor",Bs(async(t,n=!1)=>{let r=!this._refreshPromisorSignal,s=this._refreshPromisorSignal===(this._refreshPromisorSignal=t);const i=xe(n)&&this._canSkipSessionRefresh;r&&(r=!1,this._errorContainer.reset(),this._onAuthStateChanged());try{await(i?this._setupContext:this._sessionContext).refresh(t).finally(()=>s=this._refreshPromisorSignal===t)}catch(o){if(!s)return;!t.aborted&&(i||o!==iu)&&this._errorContainer.set(o),r=!i}finally{(r||i&&s)&&(this._refreshPromisorSignal=void 0,this._onAuthStateChanged())}}));B(this,"_watchlist",$s({endpoints:()=>this._setupContext.endpoints,extraConfig:()=>this._setupContext.extraConfig,hasError:()=>this._errorContainer.hasError,isExpired:()=>this._sessionContext.isExpired,isFrozen:()=>this._sessionIsFrozen,refreshing:()=>!!this._refreshPromisorSignal}));B(this,"freeze",()=>{this._sessionIsFrozen=!0,this._watchlist.on.resume=void 0,this._watchlist.cancelSubscriptions()});B(this,"http",this._sessionContext.http.bind(this._sessionContext,null));B(this,"refresh",this._refresh.bind(this));B(this,"subscribe",this._watchlist.subscribe);this._watchlist.on.resume=()=>{const t=[this._sessionContext.on(zo,()=>{this._canSkipSessionRefresh=!1,this._onAuthStateChanged()}),this._sessionContext.on(au,()=>{this._refresh(this._canSkipSessionRefresh=!0)})];this._watchlist.on.idle=()=>{this._watchlist.on.idle=void 0,t.forEach(n=>n()),t.length=0},!this.context.refreshing&&$t(this.context.isExpired)&&this._refresh()}}get context(){return this._watchlist.snapshot}set loadingContext(t){this._setupContext.loadingContext=t}set errorHandler(t){this._specification.errorHandler=t}set onSessionCreate(t){this._specification.onSessionCreate!==t&&(this._specification.onSessionCreate=t,this._refreshPromisorSignal&&Q(this._specification.onSessionCreate)&&(this._canSkipSessionRefresh=!1,this._refresh()))}_onAuthStateChanged(){this._watchlist.requestNotification()}_refresh(t=!1){this._refreshPromisor(t)}}const j2="Account",z2="Account Balance",q2="Account description",K2="Account ID",V2="Additions",Z2="Adjustments",X2="Amount",Q2="and",J2="Apply",eh="Back",th="Balance account",nh="Balance account ID",rh="Booked",sh="Captured",oh="Category",ih="Chargebacks",ah="Close",ch="Contact support",lh="Contact support for help.",uh="Contact support for help and share error code %{requestId}",dh="Copied",hh="Copy",fh="Corrections",mh="Currency",ph="Date",_h="Date range",yh="Description",gh="Dismiss",Th="Download",Ah="Downloading",Eh="Email",Nh="Entity was not found",vh="Transaction not found for the specified Account Holder",Ch="Fees",Sh="File",Rh="Filter bar",Oh="From",bh="Full",Ih="Funds captured",Dh="Go back",kh="Grant issued",Lh="Grant repayments",wh="Hide content",Ph="ID",Mh="Incomplete field",Fh="In progress",xh="Loading",Bh="max",$h="min",Uh="Mobile",Wh="Net payout",Hh="Next Payouts",Gh="No data",Yh="No negative numbers allowed",jh="No payouts found",zh="No reports found",qh="No transactions found",Kh="Other",Vh="Paginated navigation",Zh="Partial",Xh="Payment ID",Qh="Payment method",Jh="Payout Details",ef="Payout information is generated each day at midnight, UTC time.",tf="Payouts",nf="Pending",rf="Please come back later.",sf="Please, reach out to support for assistance.",of="Reach out to support",af="Reference ID",cf="Refresh",lf="Refunds",uf="Refund payment",df="We couldn’t process the refund. Try again later.",hf="Something went wrong.",ff="Your customer will receive the money in a maximum of 40 days. When the refund is successful you will see a new Refund transaction on your list.",mf="Refund is sent!",pf="Amount to refund",_f="Refunds can take up to 40 days depending on the payment method. Fees are included.",yf="Refund %{amount}",gf="Reason for refund",Tf="Reference",Af="Remaining amount",Ef="Report",Nf="Reports are generated each day at midnight, UTC time.",vf="Reports",Cf="Reset",Sf="Reversed",Rf="Something went wrong.",Of="Something went wrong. Try refreshing the page or come back later.",bf="Status",If="Structured list",Df="Subtractions",kf="Sum of same-day payouts",Lf="Tabs",wf="The error code is %{requestId}",Pf="There are no results",Mf="The request is missing required fields or contains invalid data.",Ff="There was an unexpected error",xf="The selected balance account is incorrect",Bf="Timezone",$f="To",Uf="Total incoming",Wf="Total outgoing",Hf="To value should be equal or greater than the From value",Gf="Transaction details",Yf="Transactions",jf="Transactions overview",zf="Transaction type",qf="Transfers",Kf="Try a different search or reset your filters, and we’ll try again.",Vf="Try refreshing the page or come back later.",Zf="Amount",Xf="Type",Qf="Value",Jf="We couldn't load the payouts overview.",e1="We couldn't load the reports overview.",t1="We couldn't load the transactions overview.",n1="We couldn't load your balance accounts.",r1="We couldn't load your payouts.",s1="We couldn't load your reports.",o1="We couldn't load your transactions.",i1={account:j2,accountBalance:z2,accountDescription:q2,accountID:K2,additions:V2,adjustments:Z2,amount:X2,and:Q2,apply:J2,back:eh,balanceAccount:th,balanceAccountId:nh,Booked:rh,"button.clearAll":"Clear all","calendar.controls":"Calendar navigation controls","calendar.nextMonth":"Next month","calendar.previousMonth":"Previous month","calendar.timezone":"Timezone is set on: GMT%{offset} (%{time})","capital.accountIsInactive":"Your account is inactive","capital.actionNeeded":"Action needed","capital.annualPercentageRate":"Annual percentage rate","capital.annualPercentageRateIsTheCostOfBorrowingForALoan":"Annual Percentage Rate is the cost of borrowing for a loan under a credit agreement expressed as an annual rate on the principal","capital.bankAccountDetails":"Bank account details","capital.bankAccountIban":"IBAN","capital.bankAccountNumber":"Account number","capital.bankCountryOrRegion":"Country/region","capital.bankRoutingNumber":"Routing number","capital.bankSortCode":"Sort code","capital.businessFinancing":"Business financing","capital.businessFinancingOffer":"Business financing offer","capital.businessFinancingSummary":"Business financing summary","capital.closed":"Closed","capital.couldNotContinueWithTheOffer":"We couldn't continue with the offer.","capital.couldNotLoadFinancialOffers":"We couldn't load financial offers.","capital.dailyRepaymentRate":"Daily repayment rate","capital.daysAndDaysLeft":"%{days} days (%{daysLeft} days left)","capital.expectedRepaymentPeriod":"Expected repayment period","capital.failed":"Failed","capital.fees":"Fees","capital.fullyRepaid":"Fully repaid","capital.goToTermsAndConditions":"Go to Terms & Conditions","capital.grantID":"Grant ID","capital.howMuchMoneyDoYouNeed":"How much money do you need?","capital.inProgress":"In progress","capital.legalSubtitleAU":"Adyen Capital is provided by Adyen Australia Pty Limited.","capital.legalSubtitleCA":"Adyen Capital is provided by Adyen Canada Ltd.","capital.legalSubtitleEU":"Loans are issued by Adyen N.V.","capital.legalSubtitleGB":"Loans are issued by Adyen N.V. represented by its London Branch.","capital.legalSubtitleUS":"Loans are issued by Adyen N.V. San Francisco Branch and subject to credit approval.","capital.maximumRepaymentPeriod":"Maximum repayment period","capital.minimumRepaymentToRepayTheFinancingOnTime":"Minimum repayment every %{days} days to repay the financing on time","capital.needSomeExtraMoney":"Need some extra money?","capital.offerLegalNoticeDescriptionUS":"If your application for business credit is denied, you have the right to a written statement of the specific reasons for the denial. To obtain the statement, please contact Adyen's Credit Support Team by emailing %{email} within 60 days from the date you are notified of our decision. We will send you a written statement of reasons for the denial within 30 days of receiving your request for the statement. %{break} The Federal Equal Credit Opportunity Act prohibits creditors from discriminating against credit applicants on the basis of race, color, religion, national origin, sex, marital status, age (provided that the applicant has the legal capacity to enter into a binding contract), because all or part of the applicant's income derives from any public assistance program, or because the applicant has in good faith exercised any right under the Consumer Credit Protection Act. The federal agency that administers compliance with this law concerning this creditor is the Office of the Comptroller of the Currency (OCC), Customer Assistance Group, PO Box 53570, Houston, TX 77052.","capital.offerLegalNoticeTitleUS":"Creditor: Adyen N.V. – San Francisco Branch %{break} 505 Brannan Street, San Francisco, CA 94107.","capital.oneMonth":"1 month","capital.pending":"Pending","capital.primaryAccount":"Primary account","capital.remaining":"Remaining","capital.remainingAmount":"Remaining amount","capital.remainingFees":"Remaining fees","capital.repaid":"Repaid","capital.repaidAmount":"Repaid amount","capital.repaidFees":"Repaid fees","capital.repaymentBalanceInfo":"Your current remaining amount, including fees, is %{amount}","capital.repaymentThreshold":"Repayment threshold","capital.requestedFunds":"Requested funds","capital.requestFunds":"Request funds","capital.requesting":"Requesting","capital.reviewOffer":"Review offer","capital.revoked":"Revoked","capital.seeNewOffer":"See new offer","capital.seeOptions":"See options","capital.sendRepayment":"Send repayment","capital.sendRepaymentNotice":"The additional repayment bank transfer made towards your loan could take 2-3 business days for it to be reflected on your loan account.","capital.sendRepaymentSubtitle":"Transfer money to this bank account to repay back part of your loan or the entirety of it.","capital.signTermsAndConditionsToReceiveFunds":"Sign the Terms & Conditions to receive your funds.","capital.signTheTermsToReceiveYourFunds":"Sign the terms to receive your funds","capital.termEnds":"Term ends: ","capital.thereIsNoPrimaryAccountConfigured":"There is no primary account configured","capital.thisOfferExpiresOn":"This offer expires on %{date}.","capital.totalFees":"Total fees","capital.totalRepaymentAmount":"Total repayment amount","capital.unsupportedRegionDescription":"Business financing isn’t available in your region yet, but check back here for an offer.","capital.unsupportedRegionTitle":"Stay tuned!","capital.weCouldNotContinueWithTheOffer":"We couldn't continue with the offer.","capital.weCouldNotContinueWithTheOfferContactSupportForHelp":"We couldn't continue with the offer. Contact support for help.","capital.weCouldNotLoadFinancialOffers":"We couldn't load financial offers.","capital.weCouldNotProcessThisRequestTryAgain":"We couldn't process this request. Try again with a new offer.","capital.weReceivedYourRequestAndWeAreWorkingOnItNowCheckBackSoon":"We received your request and we’re working on it now. Check back soon for the next steps.","capital.writtenOff":"Written off","capital.xDays":"%{days} days","capital.xMonths":"%{months} months","capital.xPercent":"%{percentage}%","capital.youAcceptedButThenReturnedTheseFunds":"You accepted but then returned these funds","capital.youAcceptedTheseFundsButDidNotRepayThem":"You accepted these funds but did not repay them","capital.youAreRequestingFundingOf":"You’re requesting funding of","capital.youHaveBeenPrequalifiedForBusinessFinancingUpToX.part1":"You have been pre-qualified for business financing","capital.youHaveBeenPrequalifiedForBusinessFinancingUpToX.part2":" up to %{amount}.","capital.yourRequestedFundsWere":"Your requested funds were: ","capital.youShouldGetTheFundsWithinOneBusinessDay":"You should get the funds within one business day","capital.youWillNeedToRepayAMinimumOfXEveryXDaysToPayOffTheFunds":"You will need to repay a minimum of %{amount} every %{days} days to fully pay off the funds by %{date}.","capital.youWillSoonQualifyForAFinancialOffer":"You will soon qualify for a financial offer!",capture:sh,category:oh,chargeback:ih,closeIconLabel:ah,contactSupport:ch,contactSupportForHelp:lh,contactSupportForHelpAndShareErrorCode:uh,copied:dh,copy:hh,correction:fh,currency:mh,date:ph,dateRange:_h,default:"Default",description:yh,dismiss:gh,download:Th,downloading:Ah,email:Eh,entityWasNotFound:Nh,entityWasNotFoundDetail:vh,"error.pleaseTryAgainLater":"Please try again later.","error.somethingWentWrongWithDownload":"Something went wrong with the download","expandableCard.collapse":"Collapse","expandableCard.expand":"Expand",export:"Export",fee:Ch,file:Sh,"filter.date.since":"Since %{date}","filter.date.until":"Until %{date}",filterBar:Rh,"filterPlaceholder.category":"Type","filterPlaceholder.currency":"Currency","filterPlaceholder.status":"Status",from:Oh,full:bh,fundsCaptured:Ih,goBack:Dh,grantIssued:kh,grantRepayment:Lh,hideContent:wh,id:Ph,incompleteField:Mh,inProgress:Fh,"inputError.disallowedFileType":"File type not accepted","inputError.fileRequired":"File required","inputError.tooManyFiles":"Too many files","inputError.veryLargeFile":"File size exceeds the maximum file size",loading:xh,max:Bh,min:$h,mobile:Uh,netPayout:Wh,nextPayouts:Hh,noData:Gh,noNegativeNumbersAllowed:Yh,noPayoutsFound:jh,noReportsFound:zh,noTransactionsFound:qh,other:Kh,paginatedNavigation:Vh,"pagination.nextPage":"Next page","pagination.previousPage":"Previous page","pagination.showing":"Showing",partial:Zh,paymentId:Xh,paymentMethod:Qh,payoutDetails:Jh,payoutsNotice:ef,payoutsTitle:tf,Pending:nf,pleaseComeBackLater:rf,pleaseReachOutToSupportForAssistance:sf,"rangePreset.custom":"Custom","rangePreset.last30Days":"Last 30 days","rangePreset.last7Days":"Last 7 days","rangePreset.lastMonth":"Last month","rangePreset.lastWeek":"Last week","rangePreset.thisMonth":"This month","rangePreset.thisWeek":"This week","rangePreset.yearToDate":"Year to date",reachOutToSupport:of,referenceID:af,refresh:cf,refund:lf,"refund.amountAlreadyRefunded":"You already refunded %{amount}","refund.amountFailed":"The refund for %{amount} has failed. It is not currently possible to refund this amount. Please contact support.","refund.amountInProgress":"The partial refund of %{amount} is being processed.","refund.fee":"Fee","refund.fullAmountFailed":"It is not possible to refund this payment. Please contact support.","refund.fullAmountRefunded":"The full amount has been refunded back to the customer","refund.goToPayment":"Go to payment","refund.maximumRefundable":"You can only refund a maximum of %{amount}","refund.onlyRefundable":"You can only refund %{amount}","refund.originalAmount":"Original Amount","refund.originalPayment":"Original Payment","refund.paymentPspReference":"Payment PSP Reference","refund.pspReference":"PSP Reference","refund.refundFee":"Refund Fee","refund.refundPspReference":"Refund PSP Reference","refund.returnToRefund":"Return to refund","refund.theRefundIsBeingProcessed":"The refund is being processed.",refundAction:uf,refundActionErrorSubtitle:df,refundActionErrorTitle:hf,refundActionSuccessSubtitle:ff,refundActionSuccessTitle:mf,refundAmount:pf,"refundAmount.excess":"You cannot exceed the available amount of %{amount}","refundAmount.required":"Enter a refund amount","refunded.full":"Fully refunded","refunded.partial":"Partially refunded",refundNotice:_f,refundPayment:yf,refundReason:gf,"refundReason.duplicate":"Duplicate","refundReason.fraudulent":"Fraudulent","refundReason.issue_with_item_sold":"Issue with item sold","refundReason.other":"Other","refundReason.requested_by_customer":"Requested by customer",refundReference:Tf,"refundReference.placeholder":"Enter the reference here",remainingAmount:Af,report:Ef,"reportsError.tooManyDownloads":"We couldn't download all the files. Please try again later.",reportsNotice:Nf,reportsTitle:vf,"reportType.payout":"Payout",reset:Cf,Reversed:Sf,"select.filter.placeholder":"Placeholder","select.noOptionsFound":"No options match this search",somethingWentWrong:Rf,somethingWentWrongTryRefreshingOrComeBackLater:Of,status:bf,structuredList:If,subtractions:Df,sumOfSameDayPayouts:kf,tabs:Lf,theErrorCodeIs:wf,thereAreNoResults:Pf,theRequestIsMissingRequiredFieldsOrContainsInvalidData:Mf,thereWasAnUnexpectedError:Ff,theSelectedBalanceAccountIsIncorrect:xf,timezone:Bf,to:$f,"tooltip.ATM":"Money withdrawn at an ATM","tooltip.Capital":"Money from an incoming loan grant or outgoing loan repayment","tooltip.Chargeback":"Money returned to a customer after a disputed transaction","tooltip.Correction":"Adjustments to your funds, including transaction reversals and deposit corrections","tooltip.Fee":"Transaction costs and payment method fees","tooltip.Other":"Transactions not in another category, usually an adjustment","tooltip.Payment":"Money received to your account from a sales transaction","tooltip.Refund":"Money sent back to a customer from a refunded transaction","tooltip.totalIncoming":"All money received into your account based on the selected filters","tooltip.totalOutgoing":"All fees, refunds, payouts, and other charges based on the selected filters","tooltip.Transfer":"Money moved between your account and another account",totalIncoming:Uf,totalOutgoing:Wf,toValueShouldBeGreaterThanTheFromValue:Hf,transactionDetails:Gf,transactions:Yf,transactionsOverviewTitle:jf,transactionType:zf,transfer:qf,tryDifferentSearchOrResetYourFiltersAndWeWillTryAgain:Kf,tryRefreshingThePageOrComeBackLater:Vf,txAmount:Zf,"txType.ATM":"ATM","txType.Capital":"Capital","txType.Chargeback":"Chargeback","txType.Correction":"Correction","txType.Fee":"Fee","txType.Other":"Other","txType.Payment":"Payment","txType.Refund":"Refund","txType.Transfer":"Transfer",type:Xf,"uploadedFile.remove":"Delete %{filename} file","uploadFile.browse":"Browse files",value:Qf,weCouldNotLoadThePayoutsOverview:Jf,weCouldNotLoadTheReportsOverview:e1,weCouldNotLoadTheTransactionsOverview:t1,weCouldNotLoadYourBalanceAccounts:n1,weCouldNotLoadYourPayouts:r1,weCouldNotLoadYourReports:s1,weCouldNotLoadYourTransactions:o1},a1={...i1},Ut=e=>e.then(({default:t})=>t),fu={da_DK:()=>Ut(Promise.resolve().then(()=>require("./da-DK-qSZWEjaU.cjs")))},mu={de_DE:()=>Ut(Promise.resolve().then(()=>require("./de-DE-Dngq7NwF.cjs")))},pu={es_ES:()=>Ut(Promise.resolve().then(()=>require("./es-ES-Bjddx94n.cjs")))},_u={fi_FI:()=>Ut(Promise.resolve().then(()=>require("./fi-FI-CNpmToDG.cjs")))},yu={fr_FR:()=>Ut(Promise.resolve().then(()=>require("./fr-FR-CUUHB8JU.cjs")))},gu={it_IT:()=>Ut(Promise.resolve().then(()=>require("./it-IT-B-E80zCo.cjs")))},Tu={nl_NL:()=>Ut(Promise.resolve().then(()=>require("./nl-NL--CGhOJhH.cjs")))},Au={no_NO:()=>Ut(Promise.resolve().then(()=>require("./no-NO-D0UNXgzr.cjs")))},Eu={pt_BR:()=>Ut(Promise.resolve().then(()=>require("./pt-BR-Du4cDUgf.cjs")))},Nu={sv_SE:()=>Ut(Promise.resolve().then(()=>require("./sv-SE-C92aO-iv.cjs")))},yo={en_US:a1},ua={...fu,...mu,...yo,...pu,..._u,...yu,...gu,...Tu,...Au,...Eu,...Nu},Sn="en-US",vu=ua.en_US,da={year:"numeric",month:"2-digit",day:"2-digit"},c1=["constructor","i18n","watch","preferredTranslations"],Cu=e=>[...new Set(Object.keys(e).map(t=>t.replace(/_/g,"-")).sort())],l1=Cu(ua),Su={AED:"د.إ",AFN:"؋",ALL:"L",ANG:"ƒ",AOA:"Kz",ARS:"$",AUD:"$",AWG:"ƒ",AZN:"₼",BAM:"KM",BBD:"$",BDT:"৳",BGN:"лв",BHD:".د.ب",BIF:"FBu",BMD:"$",BND:"$",BOB:"Bs.",BRL:"R$",BSD:"$",BTC:"฿",BTN:"Nu.",BWP:"P",BYR:"p.",BYN:"Br",BZD:"BZ$",CAD:"$",CDF:"FC",CHF:"Fr.",CLP:"$",CNY:"¥",COP:"$",CRC:"₡",CUC:"$",CUP:"₱",CVE:"$",CZK:"Kč",DJF:"Fdj",DKK:"kr",DOP:"RD$",DZD:"دج",EEK:"kr",EGP:"£",ERN:"Nfk",ETB:"Br",EUR:"€",FJD:"$",FKP:"£",GBP:"£",GEL:"₾",GGP:"£",GHC:"₵",GHS:"GH₵",GIP:"£",GMD:"D",GNF:"FG",GTQ:"Q",GYD:"$",HKD:"$",HNL:"L",HRK:"kn",HTG:"G",HUF:"Ft",IDR:"Rp",ILS:"₪",IMP:"£",INR:"₹",IQD:"ع.د",IRR:"﷼",ISK:"kr",JEP:"£",JMD:"J$",JPY:"¥",KES:"KSh",KGS:"лв",KHR:"៛",KMF:"CF",KPW:"₩",KRW:"₩",KYD:"$",KZT:"₸",LAK:"₭",LBP:"£",LKR:"₨",LRD:"$",LSL:"M",LTL:"Lt",LVL:"Ls",MAD:"MAD",MDL:"lei",MGA:"Ar",MKD:"ден",MMK:"K",MNT:"₮",MOP:"MOP$",MUR:"₨",MVR:"Rf",MWK:"MK",MXN:"$",MYR:"RM",MZN:"MT",NAD:"$",NGN:"₦",NIO:"C$",NOK:"kr",NPR:"₨",NZD:"$",OMR:"﷼",PAB:"B/.",PEN:"S/.",PGK:"K",PHP:"₱",PKR:"₨",PLN:"zł",PYG:"Gs",QAR:"﷼",RMB:"¥",RON:"lei",RSD:"Дин.",RUB:"₽",RWF:"R₣",SAR:"﷼",SBD:"$",SCR:"₨",SDG:"ج.س.",SEK:"kr",SGD:"$",SHP:"£",SLL:"Le",SOS:"S",SRD:"$",SSP:"£",STD:"Db",SVC:"$",SYP:"£",SZL:"E",THB:"฿",TJS:"SM",TMT:"T",TND:"د.ت",TOP:"T$",TRL:"₤",TRY:"₺",TTD:"TT$",TVD:"$",TWD:"NT$",TZS:"TSh",UAH:"₴",UGX:"USh",USD:"$",UYU:"$U",UZS:"лв",VEF:"Bs",VND:"₫",VUV:"VT",WST:"WS$",XAF:"FCFA",XBT:"Ƀ",XCD:"$",XOF:"CFA",XPF:"₣",YER:"﷼",ZAR:"R",ZWD:"Z$"},u1={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},Ru=e=>u1[e]||100,d1=e=>!!Su[e],Ou=e=>d1(e)?Su[e]:null,bu=(e,t)=>{const n=Ru(t);return parseInt(String(e),10)/n},h1=(e,t,n,r=!1,s={})=>{const i=e.toString(),o=bu(i,n),c=t.replace("_","-"),u={style:"currency",currency:n,currencyDisplay:"symbol",...s};try{return r?f1(c,u,o):o.toLocaleString(c,u)}catch{return i}},f1=(e,t,n)=>Intl.NumberFormat(e,t).formatToParts(n).filter(r=>r.type!=="currency").reduce((r,s)=>r+s.value,"").trim(),m1=/GMT(?:[-+](?:0?\d|1[0-4])(?::?[0-5]\d)?)?$/,{BASE_FORMAT_OPTIONS:Iu,BASE_LOCALE:qo,SYSTEM_TIMEZONE:Zs,SYSTEM_TIMEZONE_FORMATTER:nr}=(()=>{const e="en-US",t="2-digit",n="numeric",o=Object.freeze({year:n,month:"short",day:n,hour:t,minute:t,second:t,fractionalSecondDigits:3,timeZoneName:"longOffset"});let c,u;try{u=new Intl.DateTimeFormat(e,o),c=u.resolvedOptions().timeZone}catch{c=void 0}return{BASE_FORMAT_OPTIONS:o,BASE_LOCALE:e,SYSTEM_TIMEZONE:c,SYSTEM_TIMEZONE_FORMATTER:u}})(),p1=/\+(?=-)|([+-]00:00)/g,_1=/(^\D?)(\d)$/,y1=([e,t])=>(Math.abs(e*60)+t)*(e<0?-1:1),g1=e=>Object.freeze([Math.floor(e/60),Fs(e,60)]),T1=e=>parseInt(e,10)||0,A1=e=>`GMT+${g1(e).map(r=>`${r}`.replace(_1,"$10$2")).join(":")}`.replace(p1,""),Li=e=>{var n;const t=((n=e==null?void 0:e.match(m1))==null?void 0:n[0].replace("GMT","").split(":",2).map(T1))??de;return y1(t.concat(0,0).slice(0,2))},E1=(e,t=nr)=>{const n=Li(nr==null?void 0:nr.format(e));return Li(t==null?void 0:t.format(e))-n},Du=(e,t,n=1)=>{const{offset:r,timestamp:s}=e(t);return s-r*n*6e4},Ft=(e,t)=>Du(e,t,1),Xt=(e,t)=>Du(e,t,-1),Us=(()=>{let e,t;Z(Zs)||(e=function(){return this.TIMEZONE},t=function(r){if(Ne(r))this.TIMEZONE=Zs,this.formatter=nr;else try{const s=new Intl.DateTimeFormat(qo,{...Iu,timeZone:r}),i=s.resolvedOptions().timeZone;if(this.TIMEZONE===i)return;this.TIMEZONE=i,this.formatter=s}catch{}});function n(...r){if(r.length===0)return n.call(this,Date.now());const s=r[0],i=new Date(s).getTime(),o=this.formatter??nr;return Object.freeze({formatted:o==null?void 0:o.format(i),offset:E1(i,o),timestamp:i})}return()=>{const r={TIMEZONE:Zs},s=t==null?void 0:t.bind(r),i=J({current:{get:e==null?void 0:e.bind(r),set:s},system:{value:Zs}});return Object.defineProperties(n.bind(r),{tz:{get:()=>i,set:s}})}})(),N1={values:U,count:0},v1=/^[a-z]{2}-[A-Z]{2}$/,go=e=>e.substring(0,2).toLowerCase();function C1(e,t){if(!e)return null;const n=go(e);return t.find(r=>go(r)===n)||null}function ha(e){const t=e.replace("_","-");if(v1.test(t))return t;const[n,r]=t.split("-");if(!n||!r)return null;const s=`${n.toLowerCase()}-${r.toUpperCase()}`;return s.length===5?s:null}function fa(e,t){const n=e.trim();if(!n||n.length<1||n.length>5)return Sn;const r=ha(n);return r&&t.includes(r)?r:C1(r??n,t)}function S1(e=U,t){return e===U?e:Object.keys(e).reduce((n,r)=>{const s=ha(r)||fa(r,t);return s&&e[r]&&(n[s]=e[r]),n},{})}const fi=(e,t)=>{if(Q(t)){const n=new Map;let r=-1;return e.replace(/%{(\w+)}/g,(s,i)=>{let o=n.get(i)??-1;const c=t(i,++r,++o)??"";return n.set(i,o),c})}return e.replace(/%{(\w+)}/g,(n,r)=>(t==null?void 0:t[r])??"")},Dc=(e,t,n=N1)=>{const r=n.count??0,s=`${t}__${r}`;if(Bt(e,s)&&e[s])return fi(e[s],n.values);const i=`${t}__plural`;return Bt(e,i)&&r>1&&e[i]?fi(e[i],n.values):Bt(e,t)&&e[t]?fi(e[t],n.values):null},R1=async(e,t=U,n=U)=>{const r=fa(e,Object.keys(t))||Sn,s=t[r];return{...vu,...await(Q(s)?s():s)??U,...cs(n==null?void 0:n[e])}};function O1(){let e=this.locale,t=e,n=[...this.supportedLocales];return J({load:{value:r=>R1(e,this.preferredTranslations,r)},locale:{get:()=>e,set:r=>{t=r,e=ha(r)||fa(r,n)||Sn}},supportedLocales:{get:()=>n,set(r){n=r,this.locale=t}}})}function b1(){var t;const e={};for(const[n,r]of Object.entries(Object.getOwnPropertyDescriptors(Ko.prototype)))c1.includes(n)||(Q(r.get)?e[n]={get:r.get.bind(this),...n==="timezone"&&{set:(t=r.set)==null?void 0:t.bind(this)}}:Q(r.value)?e[n]={value:r.value.bind(this)}:e[n]={get:()=>this[n]});return e}var kt,ys,dr,gs,hr,fr,Yt,Ts,bn,In,mr,pr,As,wi;class Ko{constructor(t=Sn,n){w(this,As);w(this,kt,Sn);w(this,ys,go(p(this,kt)));w(this,dr,[Sn]);w(this,gs,p(this,dr));w(this,hr);w(this,fr,vu);w(this,Yt,O1.call(this));w(this,Ts,Pr);w(this,bn);w(this,In);w(this,mr,$s({timestamp:()=>performance.now()}));w(this,pr,Us());B(this,"watch",p(this,mr).subscribe.bind(void 0));B(this,"i18n",J(b1.call(this)));B(this,"preferredTranslations");this.watch(te),this.preferredTranslations=Object.freeze((n==null?void 0:n.reduce((r,s)=>({...r,...s}),yo))??{...yo}),b(this,dr,Cu(this.preferredTranslations)),this.locale=t}get customTranslations(){return p(this,hr)??{}}set customTranslations(t){let n,r=[...p(this,dr)];if(!Ne(t)){n=S1(t,l1);const s=Object.keys(n);r=[...r,...s].sort().filter((i,o,c)=>c.indexOf(i)===o)}p(this,Yt).supportedLocales=r,H(this,As,wi).call(this,n)}get languageCode(){return p(this,ys)}get lastRefreshTimestamp(){return p(this,mr).snapshot.timestamp}get locale(){return p(this,kt)}set locale(t){if(Ne(t))this.locale=Sn;else{if(p(this,Yt).locale=t,p(this,kt)===p(this,Yt).locale)return;H(this,As,wi).call(this,p(this,hr))}}get ready(){return p(this,Ts)}get supportedLocales(){return p(this,gs)}get timezone(){return p(this,pr).tz.current}set timezone(t){p(this,pr).tz=t}get(t,n){const r=Dc(p(this,fr),t,n);return po(r)?t:r}has(t,n){return!!Dc(p(this,fr),t,n)}amount(t,n,r){const{hideCurrency:s,...i}=r||{},o=h1(t,p(this,kt),n,s,{...i,currencyDisplay:"symbol",signDisplay:"never"});return t<0?`- ${o}`:o}date(t,n={}){const r={...da,timeZone:p(this,pr).tz.current,...n};return new Date(t).toLocaleDateString(p(this,kt),r)}fullDate(t){return this.date(t,{month:"short",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}}kt=new WeakMap,ys=new WeakMap,dr=new WeakMap,gs=new WeakMap,hr=new WeakMap,fr=new WeakMap,Yt=new WeakMap,Ts=new WeakMap,bn=new WeakMap,In=new WeakMap,mr=new WeakMap,pr=new WeakMap,As=new WeakSet,wi=function(t){Z(p(this,In))&&b(this,Ts,new Promise(s=>{b(this,In,()=>{s(p(this,bn)),b(this,bn,b(this,In,void 0))})}));const n=()=>{var s;p(this,bn)===r&&((s=p(this,In))==null||s.call(this))},r=b(this,bn,(async()=>{b(this,fr,await p(this,Yt).load(t)),b(this,kt,p(this,Yt).locale),b(this,gs,Object.freeze(p(this,Yt).supportedLocales)),b(this,hr,t),b(this,ys,go(p(this,kt))),p(this,mr).requestNotification()})());r.then(n).catch(s=>{n(),console.error(s)})};class ma{constructor(t){B(this,"components",[]);B(this,"options");B(this,"localization");B(this,"loadingContext");B(this,"session",new Y2);B(this,"onError");B(this,"update",async(t=U)=>(this.setOptions(t),await this.initialize(),this.components.forEach(n=>{n.props.core===this&&n.update(this.getPropsForComponent(this.options))}),this));B(this,"remove",t=>(this.components=this.components.filter(n=>n._id!==t._id),t.unmount(),this));B(this,"registerComponent",t=>{t.props.core===this&&this.components.push(t)});B(this,"setOptions",t=>{var n,r;return this.options={...this.options,...t},this.localization.locale=(n=this.options)==null?void 0:n.locale,this.localization.customTranslations=(r=this.options)==null?void 0:r.translations,this.session.loadingContext=this.loadingContext,this.session.onSessionCreate=this.options.onSessionCreate,this});this.options={environment:Oi,...t},this.localization=new Ko(t.locale,t.availableTranslations),this.loadingContext=r2(this.options.environment),this.setOptions(t)}async initialize(){return Promise.all([this.localization.ready]).then(()=>this)}getPropsForComponent(t){return{...t}}}B(ma,"version","1.5.0");var Ws,re,ku,Lu,vn,kc,wu,Pu,Mu,pa,Pi,Mi,Fu,ls={},xu=[],I1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Hs=Array.isArray;function xt(e,t){for(var n in t)e[n]=t[n];return e}function _a(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Fr(e,t,n){var r,s,i,o={};for(i in t)i=="key"?r=t[i]:i=="ref"?s=t[i]:o[i]=t[i];if(arguments.length>2&&(o.children=arguments.length>3?Ws.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)o[i]===void 0&&(o[i]=e.defaultProps[i]);return rs(e,o,r,s,null)}function rs(e,t,n,r,s){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:s??++ku,__i:-1,__u:0};return s==null&&re.vnode!=null&&re.vnode(i),i}function D1(){return{current:null}}function K(e){return e.children}function Jt(e,t){this.props=e,this.context=t}function xr(e,t){if(t==null)return e.__?xr(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?xr(e):null}function Bu(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Bu(e)}}function Fi(e){(!e.__d&&(e.__d=!0)&&vn.push(e)&&!To.__r++||kc!==re.debounceRendering)&&((kc=re.debounceRendering)||wu)(To)}function To(){for(var e,t,n,r,s,i,o,c=1;vn.length;)vn.length>c&&vn.sort(Pu),e=vn.shift(),c=vn.length,e.__d&&(n=void 0,s=(r=(t=e).__v).__e,i=[],o=[],t.__P&&((n=xt({},r)).__v=r.__v+1,re.vnode&&re.vnode(n),ya(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[s]:null,i,s??xr(r),!!(32&r.__u),o),n.__v=r.__v,n.__.__k[n.__i]=n,Wu(i,n,o),n.__e!=s&&Bu(n)));To.__r=0}function $u(e,t,n,r,s,i,o,c,u,l,h){var d,m,f,_,y,T,g=r&&r.__k||xu,E=t.length;for(u=k1(n,t,g,u,E),d=0;d<E;d++)(f=n.__k[d])!=null&&(m=f.__i===-1?ls:g[f.__i]||ls,f.__i=d,T=ya(e,f,m,s,i,o,c,u,l,h),_=f.__e,f.ref&&m.ref!=f.ref&&(m.ref&&ga(m.ref,null,f),h.push(f.ref,f.__c||_,f)),y==null&&_!=null&&(y=_),4&f.__u||m.__k===f.__k?u=Uu(f,u,e):typeof f.type=="function"&&T!==void 0?u=T:_&&(u=_.nextSibling),f.__u&=-7);return n.__e=y,u}function k1(e,t,n,r,s){var i,o,c,u,l,h=n.length,d=h,m=0;for(e.__k=new Array(s),i=0;i<s;i++)(o=t[i])!=null&&typeof o!="boolean"&&typeof o!="function"?(u=i+m,(o=e.__k[i]=typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?rs(null,o,null,null,null):Hs(o)?rs(K,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?rs(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o).__=e,o.__b=e.__b+1,c=null,(l=o.__i=L1(o,n,u,d))!==-1&&(d--,(c=n[l])&&(c.__u|=2)),c==null||c.__v===null?(l==-1&&(s>h?m--:s<h&&m++),typeof o.type!="function"&&(o.__u|=4)):l!=u&&(l==u-1?m--:l==u+1?m++:(l>u?m--:m++,o.__u|=4))):e.__k[i]=null;if(d)for(i=0;i<h;i++)(c=n[i])!=null&&(2&c.__u)==0&&(c.__e==r&&(r=xr(c)),Gu(c,c));return r}function Uu(e,t,n){var r,s;if(typeof e.type=="function"){for(r=e.__k,s=0;r&&s<r.length;s++)r[s]&&(r[s].__=e,t=Uu(r[s],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=xr(e)),n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function gn(e,t){return t=t||[],e==null||typeof e=="boolean"||(Hs(e)?e.some(function(n){gn(n,t)}):t.push(e)),t}function L1(e,t,n,r){var s,i,o=e.key,c=e.type,u=t[n];if(u===null&&e.key==null||u&&o==u.key&&c===u.type&&(2&u.__u)==0)return n;if(r>(u!=null&&(2&u.__u)==0?1:0))for(s=n-1,i=n+1;s>=0||i<t.length;){if(s>=0){if((u=t[s])&&(2&u.__u)==0&&o==u.key&&c===u.type)return s;s--}if(i<t.length){if((u=t[i])&&(2&u.__u)==0&&o==u.key&&c===u.type)return i;i++}}return-1}function Lc(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||I1.test(t)?n:n+"px"}function Xs(e,t,n,r,s){var i;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Lc(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Lc(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(Mu,"$1")),t=t.toLowerCase()in e||t=="onFocusOut"||t=="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.t=r.t:(n.t=pa,e.addEventListener(t,i?Mi:Pi,i)):e.removeEventListener(t,i?Mi:Pi,i);else{if(s=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function wc(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.u==null)t.u=pa++;else if(t.u<n.t)return;return n(re.event?re.event(t):t)}}}function ya(e,t,n,r,s,i,o,c,u,l){var h,d,m,f,_,y,T,g,E,R,N,D,v,O,S,M,P,z=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(u=!!(32&n