@everymatrix/merkurbetsdk-login-wc 1.1.25 → 1.1.26
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/build-login-wc.js
CHANGED
|
@@ -192,7 +192,7 @@ Try combining more events to unlock bigger rewards!`,Rpe=(e={},r={})=>{if(l&&i==
|
|
|
192
192
|
data-[state=checked]:bg-checkbox-selected data-[state=checked]:text-icon-checkbox-selected
|
|
193
193
|
focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20
|
|
194
194
|
aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 border-none outline-none
|
|
195
|
-
focus-visible:ring-sm disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-checkbox-hover`,r),...x,children:go(vx,{"data-slot":"checkbox-indicator",className:"checkbox__indicator flex items-center justify-center text-text-button-primary transition-none",children:go(qi,{className:"checkbox__icon size-3"})})}),!!n&&Du("div",{className:"flex gap-2 items-center text-text-default",children:[o&&typeof n=="string"?go(fo,{id:b,htmlFor:v,className:ge("checkbox__label__inner__html inline text-sm font-normal leading-snug [&_a]:underline [&_a]:text-text-brand",g),dangerouslySetInnerHTML:{__html:`${fH(n)} ${_?"*":""}`}}):Du(fo,{id:b,htmlFor:v,className:ge("checkbox__label text-sm font-normal leading-snug",g),children:[n,_?"*":""]}),!!p&&Du(_a,{children:[go(xa,{asChild:!0,children:go(co,{className:"size-3 cursor-pointer text-text-default"})}),go(va,{children:go(ba,{side:"top",sideOffset:6,align:"center",className:"p-3",children:go("span",{className:"font-medium text-sm text-text-default",children:p})})})]})]})]})},LH=gYe});import{jsx as wH,jsxs as _Ye}from"react/jsx-runtime";var hYe,yx,CH=f(()=>{"use strict";a();kH();ox();Pn();wr();Iu();hYe=e=>{let{consent:r,control:t,keySuffix:n}=e,o=Cu(r.id),u=r.friendlyName||r.description,p=(n?wu(`${r.tagCode}${n}`):void 0)??wu(r.tagCode)??u,{field:g,fieldState:{error:_}}=t6({name:o,control:t,defaultValue:!1,rules:r.mustAccept?{validate:x=>x===!0||Te.mustBeAccepted({label:r.friendlyName})}:void 0});return _Ye("div",{className:"flex flex-col gap-1 col-span-2",children:[wH(LH,{labelClassName:"[&_a]:underline",shouldRenderLabelAsHtml:!0,id:`${nx}${o}`,checked:g.value??!1,onCheckedChange:g.onChange,onBlur:g.onBlur,ref:g.ref,label:p,required:r.mustAccept}),wH("p",{className:"[&_a]:underline text-sm text-text-error mt-0.5 min-h-5",dangerouslySetInnerHTML:_?.message?{__html:_.message}:void 0})]})},yx=hYe});var IH=f(()=>{"use strict";a();CH()});import{useState as xYe}from"react";import{jsx as No,jsxs as Sx}from"react/jsx-runtime";var bYe,Lx,TH=f(()=>{"use strict";a();as();z6();h_();Gc();$a();Gn();Pn();wr();Z6();Iu();IH();bYe=e=>{let{sessionId:r,isSubmitting:t,onSubmit:n,keySuffix:o}=e,[u,p]=xYe(""),g=Hc(),{data:_,isLoading:x,isError:b,error:v}=Ho({...ca(g.getConsents(r)),staleTime:0}),y=G6(_),w=bu({mode:"onBlur",defaultValues:{}}),{control:L,trigger:k,getValues:I,formState:M}=w,P=async O=>{if(O.preventDefault(),t)return;p("");let A=H6(y);if(!await k(A,{shouldFocus:!0})){requestAnimationFrame(()=>V6(A,M.errors));return}let Q=W6(y,I());try{await n(Q)}catch(V){p(V instanceof er?V.message:Te.generalError())}};return x?Sx("div",{className:"flex flex-col gap-2 w-full",children:[No(bs,{className:"h-6 w-full"}),No(bs,{className:"h-6 w-full"}),No(bs,{className:"h-6 w-2/3"})]}):Sx("form",{id:"consents-form",className:"flex flex-col flex-1 min-h-0 gap-3",onSubmit:O=>{P(O)},children:[Sx("div",{"data-allow-touch-move":!0,className:"flex flex-col flex-1 min-h-0 overflow-y-auto pr-1 gap-y-1",children:[No("slot",{name:"consents-above"}),y.map(O=>No(yx,{consent:O,control:L,keySuffix:o},O.id))]}),No("div",{className:"mt-2 flex-none",children:No(Ln,{form:"consents-form",type:"submit",variant:"primary",text:Te.consentsSubmitButton(),isLoading:t,disabled:t,className:"w-full"})}),(u||b)&&No("p",{className:"text-sm text-text-error mt-0.5",children:u||v?.message})]})},Lx=bYe});var MH=f(()=>{"use strict";a();TH()});import{useState as PH}from"react";import{Fragment as RH,jsx as Qr,jsxs as Cs}from"react/jsx-runtime";var vYe,AH,EH=f(()=>{"use strict";a();Ri();xo();Rh();Rq();h_();Gc();$a();gn();Gn();wr();$6();U6();MH();vYe=e=>{let{isOpen:r,cardId:t,onStepChange:n,onClickInsideForm:o,onLoginSuccess:u,onLoginFail:p,onRecoverCard:g,onResetPin:_,portalContainer:x}=e,[b,v]=PH(!1),[y,w]=PH(null),L=Zo(),k=Hc(),I=Pq(),{data:M}=Ho(ca(k.loginMethods(sc.RETAIL))),{mutateAsync:P,isPending:O}=Ws(I.gm2Login().asOptions()),{mutateAsync:A,isPending:N}=Ws(I.updateConsentsLogin(y?.sessionId).asOptions()),Q=se=>!!se.sessionBlockers?.includes(SC.HAS_TO_SET_CONSENTS),V=async({cardId:se,pin:ae})=>{let B=M?.[0]?.method||$g.CARD;v(!0);try{let D=await L.fetchQuery({...ca(k.getLoginCardToken({cardId:se,pin:ae})),staleTime:0}),z=await P({token:D.token,method:B,loginChannel:Ng.RETAIL});if(Q(z)){w({sessionId:z.sessionId,token:D.token,method:B});return}u(z)}catch(D){throw p(D),D}finally{v(!1)}},q=async se=>{if(!y)throw new er(Te.generalError());let{token:ae,method:B}=y;try{await A(se);let D=await P({token:ae,method:B,loginChannel:Ng.RETAIL});if(Q(D))throw new er(Te.generalError());w(null),u(D)}catch(D){throw p(D),D}};return Qr(vh,{open:r,onOpenChange:()=>{w(null),n(null)},children:Qr(Th,{shouldCloseOnClickOutside:!1,portalContainer:x,style:y?{gridTemplateRows:"auto minmax(0, 1fr)"}:void 0,children:y?Cs(RH,{children:[Cs(Ac,{children:[Qr(Ec,{children:Te.consentsTitle()}),Qr(Rc,{className:"text-text-subtle",children:Te.consentsDescription()})]}),Qr("div",{className:"flex min-h-0 flex-col overflow-hidden",children:Qr(Lx,{sessionId:y.sessionId,isSubmitting:N||O,onSubmit:q,keySuffix:N6})})]}):Cs(RH,{children:[Cs(Ac,{children:[Qr(Ec,{children:Te.login()}),Cs(Rc,{className:"text-text-subtle",children:[" ",Te.dontHaveAccount()," ",Qr("span",{onClick:()=>n(yC.REGISTER),className:"text-text-primary cursor-pointer font-medium",children:Te.signUpHere()})]})]}),Qr(O6,{onClickInsideForm:o,cardId:t,onSubmit:V,isLoading:b,onResetPin:_}),g?Qr("span",{onClick:g,className:"text-text-primary cursor-pointer font-medium text-sm mt-3 text-center",children:Te.cardRecoveryEntryLink()}):null]})})})},AH=vYe});var OH={};ro(OH,{default:()=>SYe});import{jsx as DH}from"react/jsx-runtime";var yYe,SYe,$H=f(()=>{"use strict";a();gd();EH();yYe=e=>DH(Av,{locals:e.locals,dehydratedState:e.dehydratedState,children:DH(AH,{...e})}),SYe=yYe});a();import LYe,{Suspense as kYe,useCallback as wYe,useState as CYe}from"react";import{getThemeStyleSheet as IYe}from"@everymatrix/merkurbetsdk-theme";a();Bo();import{useEffect as db,useMemo as qu,useState as iW}from"react";a();m();var As="da";ob(()=>As);nb(e=>{As=e});function cb(e){As=e?Ia(e):"da"}function ub(){return As}m();var sW="prod",fb=e=>{let[r,t]=iW(null),n=qu(()=>{if(!(typeof d>"u"))return d[e.environment??sW]},[e.environment]),o=e.nwaOrigin||n?.api?.nwaOrigin,u=qu(()=>{if(o)return{...n,api:{...n?.api,nwaOrigin:o},app:{...n?.app,analytics:n?.app?.analytics??{providers:[]},...e.defaultCurrency?{defaultCurrency:e.defaultCurrency}:{},...e.stepsCount?{registerConfig:{...n?.app?.registerConfig,steps:{...n?.app?.registerConfig?.steps,count:e.stepsCount}}}:{}}}},[n,o,e.defaultCurrency,e.stepsCount]),p=qu(()=>Ia(e.language),[e.language]);return db(()=>{u&&Fx(u)},[u]),db(()=>{cb(p),t(ub())},[p]),{canRenderComponent:!!(u&&r===p),readyLocale:r}};a();import gb from"react";import{createRoot as hW}from"react-dom/client";a();var lW={stringify:e=>e?"true":"false",parse:e=>/^[ty1-9]/i.test(e)},cW={stringify:e=>e.name,parse:(e,r,t)=>{let n=(()=>{if(typeof window<"u"&&e in window)return window[e];if(typeof global<"u"&&e in global)return global[e]})();return typeof n=="function"?n.bind(t):void 0}},uW={stringify:e=>JSON.stringify(e),parse:e=>JSON.parse(e)};function dW(e){return e.replace(/([a-z0-9])([A-Z])/g,(r,t,n)=>`${t}-${n.toLowerCase()}`)}function fW(e){return e.replace(/[-:]([a-z])/g,(r,t)=>`${t.toUpperCase()}`)}var pb=Symbol.for("r2wc.bound"),pW={parse:(e,r,t)=>{let n=fW(r),o=t;if(typeof o<"u"&&n in o&&typeof o[n]<"u"){let u=o[n];return pb in o[n]||(u=u.bind(o),Object.defineProperty(u,pb,{value:!0})),u}else return}},mW={stringify:e=>`${e}`,parse:e=>parseFloat(e)},gW={stringify:e=>e,parse:e=>e},Vu={string:gW,number:mW,boolean:lW,function:cW,method:pW,json:uW},Es=Symbol.for("r2wc.render"),Ds=Symbol.for("r2wc.connected"),jo=Symbol.for("r2wc.context"),Nr=Symbol.for("r2wc.props");function mb(e,r,t){r.props||(r.props=e.propTypes?Object.keys(e.propTypes):[]),r.events||(r.events=[]);let n=Array.isArray(r.props)?r.props.slice():Object.keys(r.props),o=Array.isArray(r.events)?r.events.slice():Object.keys(r.events),u={},p={},g={},_={};for(let b of n){u[b]=Array.isArray(r.props)?"string":r.props[b];let v=dW(b);g[b]=v,_[v]=b}for(let b of o)p[b]=Array.isArray(r.events)?{}:r.events[b];class x extends HTMLElement{static get observedAttributes(){return Object.keys(_)}[Ds]=!0;[jo];[Nr]={};container;constructor(){super(),r.shadow?this.container=this.attachShadow({mode:r.shadow}):this.container=this,this[Nr].container=this.container;for(let v of n){let y=g[v],w=this.getAttribute(y),L=u[v],k=L?Vu[L]:null;k?.parse&&(w||L==="method")&&(this[Nr][v]=k.parse(w,y,this))}for(let v of o)this[Nr][v]=y=>{let w=v.replace(/^on/,"").toLowerCase();this.dispatchEvent(new CustomEvent(w,{detail:y,...p[v]}))}}connectedCallback(){this[Ds]=!0,this[Es]()}disconnectedCallback(){this[Ds]=!1,this[jo]&&t.unmount(this[jo]),delete this[jo]}attributeChangedCallback(v,y,w){let L=_[v],k=u[L],I=k?Vu[k]:null;L in u&&I?.parse&&(w||k==="method")&&(this[Nr][L]=I.parse(w,v,this),this[Es]())}[Es](){this[Ds]&&(this[jo]?t.update(this[jo],this[Nr]):this[jo]=t.mount(this.container,e,this[Nr]))}}for(let b of n){let v=g[b],y=u[b];Object.defineProperty(x.prototype,b,{enumerable:!0,configurable:!0,get(){return this[Nr][b]},set(w){this[Nr][b]=w;let L=y?Vu[y]:null;if(L?.stringify){let k=L.stringify(w,v,this);this.getAttribute(v)!==k&&(k==null?this.removeAttribute(v):this.setAttribute(v,k))}else b in u&&L?.parse&&(w||y==="method")&&(this[Nr][b]=L.parse(w,v,this)),this[Es]()}})}return x}function _W(e,r,t){let n=hW(e),o=gb.createElement(r,t);return n.render(o),{root:n,ReactComponent:r}}function xW({root:e,ReactComponent:r},t){let n=gb.createElement(r,t);e.render(n)}function bW({root:e}){e.unmount()}function hb(e,r={}){return mb(e,r,{mount:_W,update:xW,unmount:bW})}import{jsx as wx,jsxs as PYe}from"react/jsx-runtime";var TYe=LYe.lazy(()=>Promise.resolve().then(()=>($H(),OH)));function MYe(e){let{canRenderComponent:r,readyLocale:t}=fb({nwaOrigin:e.nwaOrigin,language:e.language,environment:e.environment}),[n,o]=CYe(null),u=wYe(p=>{o(p)},[]);return r?PYe("div",{className:"login-wc-root",children:[wx("div",{ref:u,className:"login-wc-root__portal-container","data-login-portal-container":"1"}),n&&wx(kYe,{fallback:null,children:wx(TYe,{isOpen:e.isOpen,locals:{origin:window.location.origin,isDesktop:!0},cardId:e.cardId,onStepChange:e.onStepChange,onLoginSuccess:e.onLoginSuccess,onLoginFail:e.onLoginFail,onClickInsideForm:e.onClickInsideForm,onResetPin:e.onResetPin,onRecoverCard:e.onRecoverCard,portalContainer:n},t)})]}):null}var kx=hb(MYe,{shadow:"open",props:{isOpen:"boolean",cardId:"string",nwaOrigin:"string",language:"string",environment:"string"},events:{onStepChange:{bubbles:!0,composed:!0},onLoginSuccess:{bubbles:!0,composed:!0},onLoginFail:{bubbles:!0,composed:!0},onClickInsideForm:{bubbles:!0,composed:!0},onResetPin:{bubbles:!0,composed:!0},onRecoverCard:{bubbles:!0,composed:!0}}}),Cx=class extends kx{connectedCallback(){if(this.shadowRoot){let r=IYe();this.shadowRoot.adoptedStyleSheets.includes(r)||(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,r])}kx.prototype.connectedCallback?.call(this)}disconnectedCallback(){kx.prototype.disconnectedCallback?.call(this)}};customElements.get("merkurbetsdk-login-wc")||customElements.define("merkurbetsdk-login-wc",Cx);
|
|
195
|
+
focus-visible:ring-sm disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-checkbox-hover`,r),...x,children:go(vx,{"data-slot":"checkbox-indicator",className:"checkbox__indicator flex items-center justify-center text-text-button-primary transition-none",children:go(qi,{className:"checkbox__icon size-3"})})}),!!n&&Du("div",{className:"flex gap-2 items-center text-text-default",children:[o&&typeof n=="string"?go(fo,{id:b,htmlFor:v,className:ge("checkbox__label__inner__html inline text-sm font-normal leading-snug [&_a]:underline [&_a]:text-text-brand",g),dangerouslySetInnerHTML:{__html:`${fH(n)} ${_?"*":""}`}}):Du(fo,{id:b,htmlFor:v,className:ge("checkbox__label text-sm font-normal leading-snug",g),children:[n,_?"*":""]}),!!p&&Du(_a,{children:[go(xa,{asChild:!0,children:go(co,{className:"size-3 cursor-pointer text-text-default"})}),go(va,{children:go(ba,{side:"top",sideOffset:6,align:"center",className:"p-3",children:go("span",{className:"font-medium text-sm text-text-default",children:p})})})]})]})]})},LH=gYe});import{jsx as wH,jsxs as _Ye}from"react/jsx-runtime";var hYe,yx,CH=f(()=>{"use strict";a();kH();ox();Pn();wr();Iu();hYe=e=>{let{consent:r,control:t,keySuffix:n}=e,o=Cu(r.id),u=r.friendlyName||r.description,p=(n?wu(`${r.tagCode}${n}`):void 0)??wu(r.tagCode)??u,{field:g,fieldState:{error:_}}=t6({name:o,control:t,defaultValue:!1,rules:r.mustAccept?{validate:x=>x===!0||Te.mustBeAccepted({label:r.friendlyName})}:void 0});return _Ye("div",{className:"flex flex-col gap-1 col-span-2",children:[wH(LH,{labelClassName:"[&_a]:underline",shouldRenderLabelAsHtml:!0,id:`${nx}${o}`,checked:g.value??!1,onCheckedChange:g.onChange,onBlur:g.onBlur,ref:g.ref,label:p,required:r.mustAccept}),wH("p",{className:"[&_a]:underline text-sm text-text-error mt-0.5 min-h-5",dangerouslySetInnerHTML:_?.message?{__html:_.message}:void 0})]})},yx=hYe});var IH=f(()=>{"use strict";a();CH()});import{useState as xYe}from"react";import{jsx as No,jsxs as Sx}from"react/jsx-runtime";var bYe,Lx,TH=f(()=>{"use strict";a();as();z6();h_();Gc();$a();Gn();Pn();wr();Z6();Iu();IH();bYe=e=>{let{sessionId:r,isSubmitting:t,onSubmit:n,keySuffix:o}=e,[u,p]=xYe(""),g=Hc(),{data:_,isLoading:x,isError:b,error:v}=Ho({...ca(g.getConsents(r)),staleTime:0}),y=G6(_),w=bu({mode:"onBlur",defaultValues:{}}),{control:L,trigger:k,getValues:I,formState:M}=w,P=async O=>{if(O.preventDefault(),t)return;p("");let A=H6(y);if(!await k(A,{shouldFocus:!0})){requestAnimationFrame(()=>V6(A,M.errors));return}let Q=W6(y,I());try{await n(Q)}catch(V){p(V instanceof er?V.message:Te.generalError())}};return x?Sx("div",{className:"flex flex-col gap-2 w-full",children:[No(bs,{className:"h-6 w-full"}),No(bs,{className:"h-6 w-full"}),No(bs,{className:"h-6 w-2/3"})]}):Sx("form",{id:"consents-form",className:"flex flex-col flex-1 min-h-0 gap-3",onSubmit:O=>{P(O)},children:[Sx("div",{"data-allow-touch-move":!0,className:"flex flex-col flex-1 min-h-0 overflow-y-auto pr-1 gap-y-1",children:[No("slot",{name:"consents-above"}),y.map(O=>No(yx,{consent:O,control:L,keySuffix:o},O.id))]}),No("div",{className:"mt-2 flex-none",children:No(Ln,{form:"consents-form",type:"submit",variant:"primary",text:Te.consentsSubmitButton(),isLoading:t,disabled:t,className:"w-full"})}),(u||b)&&No("p",{className:"text-sm text-text-error mt-0.5",children:u||v?.message})]})},Lx=bYe});var MH=f(()=>{"use strict";a();TH()});import{useState as PH}from"react";import{Fragment as RH,jsx as Qr,jsxs as Cs}from"react/jsx-runtime";var vYe,AH,EH=f(()=>{"use strict";a();Ri();xo();Rh();Rq();h_();Gc();$a();gn();Gn();wr();$6();U6();MH();vYe=e=>{let{isOpen:r,cardId:t,onStepChange:n,onClickInsideForm:o,onLoginSuccess:u,onLoginFail:p,onRecoverCard:g,onResetPin:_,portalContainer:x}=e,[b,v]=PH(!1),[y,w]=PH(null),L=Zo(),k=Hc(),I=Pq(),{data:M}=Ho(ca(k.loginMethods(sc.RETAIL))),{mutateAsync:P,isPending:O}=Ws(I.gm2Login().asOptions()),{mutateAsync:A,isPending:N}=Ws(I.updateConsentsLogin(y?.sessionId).asOptions()),Q=se=>!!se.sessionBlockers?.includes(SC.HAS_TO_SET_CONSENTS),V=async({cardId:se,pin:ae})=>{let B=M?.[0]?.method||$g.CARD;v(!0);try{let D=await L.fetchQuery({...ca(k.getLoginCardToken({cardId:se,pin:ae})),staleTime:0}),z=await P({token:D.token,method:B,loginChannel:Ng.RETAIL});if(Q(z)){w({sessionId:z.sessionId,token:D.token,method:B});return}u(z)}catch(D){throw p(D),D}finally{v(!1)}},q=async se=>{if(!y)throw new er(Te.generalError());let{token:ae,method:B}=y;try{await A(se);let D=await P({token:ae,method:B,loginChannel:Ng.RETAIL});if(Q(D))throw new er(Te.generalError());w(null),u(D)}catch(D){throw p(D),D}};return Qr(vh,{modal:!1,open:r,onOpenChange:()=>{w(null),n(null)},children:Qr(Th,{shouldCloseOnClickOutside:!1,portalContainer:x,style:y?{gridTemplateRows:"auto minmax(0, 1fr)"}:void 0,children:y?Cs(RH,{children:[Cs(Ac,{children:[Qr(Ec,{children:Te.consentsTitle()}),Qr(Rc,{className:"text-text-subtle",children:Te.consentsDescription()})]}),Qr("div",{className:"flex min-h-0 flex-col overflow-hidden",children:Qr(Lx,{sessionId:y.sessionId,isSubmitting:N||O,onSubmit:q,keySuffix:N6})})]}):Cs(RH,{children:[Cs(Ac,{children:[Qr(Ec,{children:Te.login()}),Cs(Rc,{className:"text-text-subtle",children:[" ",Te.dontHaveAccount()," ",Qr("span",{onClick:()=>n(yC.REGISTER),className:"text-text-primary cursor-pointer font-medium",children:Te.signUpHere()})]})]}),Qr(O6,{onClickInsideForm:o,cardId:t,onSubmit:V,isLoading:b,onResetPin:_}),g?Qr("span",{onClick:g,className:"text-text-primary cursor-pointer font-medium text-sm mt-3 text-center",children:Te.cardRecoveryEntryLink()}):null]})})})},AH=vYe});var OH={};ro(OH,{default:()=>SYe});import{jsx as DH}from"react/jsx-runtime";var yYe,SYe,$H=f(()=>{"use strict";a();gd();EH();yYe=e=>DH(Av,{locals:e.locals,dehydratedState:e.dehydratedState,children:DH(AH,{...e})}),SYe=yYe});a();import LYe,{Suspense as kYe,useCallback as wYe,useState as CYe}from"react";import{getThemeStyleSheet as IYe}from"@everymatrix/merkurbetsdk-theme";a();Bo();import{useEffect as db,useMemo as qu,useState as iW}from"react";a();m();var As="da";ob(()=>As);nb(e=>{As=e});function cb(e){As=e?Ia(e):"da"}function ub(){return As}m();var sW="prod",fb=e=>{let[r,t]=iW(null),n=qu(()=>{if(!(typeof d>"u"))return d[e.environment??sW]},[e.environment]),o=e.nwaOrigin||n?.api?.nwaOrigin,u=qu(()=>{if(o)return{...n,api:{...n?.api,nwaOrigin:o},app:{...n?.app,analytics:n?.app?.analytics??{providers:[]},...e.defaultCurrency?{defaultCurrency:e.defaultCurrency}:{},...e.stepsCount?{registerConfig:{...n?.app?.registerConfig,steps:{...n?.app?.registerConfig?.steps,count:e.stepsCount}}}:{}}}},[n,o,e.defaultCurrency,e.stepsCount]),p=qu(()=>Ia(e.language),[e.language]);return db(()=>{u&&Fx(u)},[u]),db(()=>{cb(p),t(ub())},[p]),{canRenderComponent:!!(u&&r===p),readyLocale:r}};a();import gb from"react";import{createRoot as hW}from"react-dom/client";a();var lW={stringify:e=>e?"true":"false",parse:e=>/^[ty1-9]/i.test(e)},cW={stringify:e=>e.name,parse:(e,r,t)=>{let n=(()=>{if(typeof window<"u"&&e in window)return window[e];if(typeof global<"u"&&e in global)return global[e]})();return typeof n=="function"?n.bind(t):void 0}},uW={stringify:e=>JSON.stringify(e),parse:e=>JSON.parse(e)};function dW(e){return e.replace(/([a-z0-9])([A-Z])/g,(r,t,n)=>`${t}-${n.toLowerCase()}`)}function fW(e){return e.replace(/[-:]([a-z])/g,(r,t)=>`${t.toUpperCase()}`)}var pb=Symbol.for("r2wc.bound"),pW={parse:(e,r,t)=>{let n=fW(r),o=t;if(typeof o<"u"&&n in o&&typeof o[n]<"u"){let u=o[n];return pb in o[n]||(u=u.bind(o),Object.defineProperty(u,pb,{value:!0})),u}else return}},mW={stringify:e=>`${e}`,parse:e=>parseFloat(e)},gW={stringify:e=>e,parse:e=>e},Vu={string:gW,number:mW,boolean:lW,function:cW,method:pW,json:uW},Es=Symbol.for("r2wc.render"),Ds=Symbol.for("r2wc.connected"),jo=Symbol.for("r2wc.context"),Nr=Symbol.for("r2wc.props");function mb(e,r,t){r.props||(r.props=e.propTypes?Object.keys(e.propTypes):[]),r.events||(r.events=[]);let n=Array.isArray(r.props)?r.props.slice():Object.keys(r.props),o=Array.isArray(r.events)?r.events.slice():Object.keys(r.events),u={},p={},g={},_={};for(let b of n){u[b]=Array.isArray(r.props)?"string":r.props[b];let v=dW(b);g[b]=v,_[v]=b}for(let b of o)p[b]=Array.isArray(r.events)?{}:r.events[b];class x extends HTMLElement{static get observedAttributes(){return Object.keys(_)}[Ds]=!0;[jo];[Nr]={};container;constructor(){super(),r.shadow?this.container=this.attachShadow({mode:r.shadow}):this.container=this,this[Nr].container=this.container;for(let v of n){let y=g[v],w=this.getAttribute(y),L=u[v],k=L?Vu[L]:null;k?.parse&&(w||L==="method")&&(this[Nr][v]=k.parse(w,y,this))}for(let v of o)this[Nr][v]=y=>{let w=v.replace(/^on/,"").toLowerCase();this.dispatchEvent(new CustomEvent(w,{detail:y,...p[v]}))}}connectedCallback(){this[Ds]=!0,this[Es]()}disconnectedCallback(){this[Ds]=!1,this[jo]&&t.unmount(this[jo]),delete this[jo]}attributeChangedCallback(v,y,w){let L=_[v],k=u[L],I=k?Vu[k]:null;L in u&&I?.parse&&(w||k==="method")&&(this[Nr][L]=I.parse(w,v,this),this[Es]())}[Es](){this[Ds]&&(this[jo]?t.update(this[jo],this[Nr]):this[jo]=t.mount(this.container,e,this[Nr]))}}for(let b of n){let v=g[b],y=u[b];Object.defineProperty(x.prototype,b,{enumerable:!0,configurable:!0,get(){return this[Nr][b]},set(w){this[Nr][b]=w;let L=y?Vu[y]:null;if(L?.stringify){let k=L.stringify(w,v,this);this.getAttribute(v)!==k&&(k==null?this.removeAttribute(v):this.setAttribute(v,k))}else b in u&&L?.parse&&(w||y==="method")&&(this[Nr][b]=L.parse(w,v,this)),this[Es]()}})}return x}function _W(e,r,t){let n=hW(e),o=gb.createElement(r,t);return n.render(o),{root:n,ReactComponent:r}}function xW({root:e,ReactComponent:r},t){let n=gb.createElement(r,t);e.render(n)}function bW({root:e}){e.unmount()}function hb(e,r={}){return mb(e,r,{mount:_W,update:xW,unmount:bW})}import{jsx as wx,jsxs as PYe}from"react/jsx-runtime";var TYe=LYe.lazy(()=>Promise.resolve().then(()=>($H(),OH)));function MYe(e){let{canRenderComponent:r,readyLocale:t}=fb({nwaOrigin:e.nwaOrigin,language:e.language,environment:e.environment}),[n,o]=CYe(null),u=wYe(p=>{o(p)},[]);return r?PYe("div",{className:"login-wc-root",children:[wx("div",{ref:u,className:"login-wc-root__portal-container","data-login-portal-container":"1"}),n&&wx(kYe,{fallback:null,children:wx(TYe,{isOpen:e.isOpen,locals:{origin:window.location.origin,isDesktop:!0},cardId:e.cardId,onStepChange:e.onStepChange,onLoginSuccess:e.onLoginSuccess,onLoginFail:e.onLoginFail,onClickInsideForm:e.onClickInsideForm,onResetPin:e.onResetPin,onRecoverCard:e.onRecoverCard,portalContainer:n},t)})]}):null}var kx=hb(MYe,{shadow:"open",props:{isOpen:"boolean",cardId:"string",nwaOrigin:"string",language:"string",environment:"string"},events:{onStepChange:{bubbles:!0,composed:!0},onLoginSuccess:{bubbles:!0,composed:!0},onLoginFail:{bubbles:!0,composed:!0},onClickInsideForm:{bubbles:!0,composed:!0},onResetPin:{bubbles:!0,composed:!0},onRecoverCard:{bubbles:!0,composed:!0}}}),Cx=class extends kx{connectedCallback(){if(this.shadowRoot){let r=IYe();this.shadowRoot.adoptedStyleSheets.includes(r)||(this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,r])}kx.prototype.connectedCallback?.call(this)}disconnectedCallback(){kx.prototype.disconnectedCallback?.call(this)}};customElements.get("merkurbetsdk-login-wc")||customElements.define("merkurbetsdk-login-wc",Cx);
|
|
196
196
|
/*! Bundled license information:
|
|
197
197
|
|
|
198
198
|
tslib/tslib.es6.js:
|
package/dist/meta-login-wc.json
CHANGED
|
@@ -72673,7 +72673,7 @@
|
|
|
72673
72673
|
"format": "esm"
|
|
72674
72674
|
},
|
|
72675
72675
|
"../../libs/frameworks/src/react/features/auth/components/retail-login/retail-login.tsx": {
|
|
72676
|
-
"bytes":
|
|
72676
|
+
"bytes": 6795,
|
|
72677
72677
|
"imports": [
|
|
72678
72678
|
{
|
|
72679
72679
|
"path": "react",
|
|
@@ -77676,7 +77676,7 @@
|
|
|
77676
77676
|
"bytesInOutput": 38
|
|
77677
77677
|
},
|
|
77678
77678
|
"../../libs/frameworks/src/react/features/auth/components/retail-login/retail-login.tsx": {
|
|
77679
|
-
"bytesInOutput":
|
|
77679
|
+
"bytesInOutput": 2185
|
|
77680
77680
|
},
|
|
77681
77681
|
"../../libs/frameworks/src/react/features/auth/components/retail-login/retail-login.island.tsx": {
|
|
77682
77682
|
"bytesInOutput": 224
|
|
@@ -77697,7 +77697,7 @@
|
|
|
77697
77697
|
"bytesInOutput": 2649
|
|
77698
77698
|
}
|
|
77699
77699
|
},
|
|
77700
|
-
"bytes":
|
|
77700
|
+
"bytes": 958491
|
|
77701
77701
|
}
|
|
77702
77702
|
}
|
|
77703
77703
|
}
|