@crystaldesign/products-component 24.15.0-beta.39 → 24.15.0-beta.40

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.
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see 266.products-component.umd.min.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkCrystaldesignProductsComponent=self.webpackChunkCrystaldesignProductsComponent||[]).push([[266],{6266:(e,t,n)=>{n.r(t),n.d(t,{default:()=>E});var r=n(7363),a=n(6308),o=n(4658),i=n(4988),s=n(747),l=n.n(s),u=n(523),c=n(9420),d=n(9534),h=n(8623),v=n(3096),g=n(7995),p=n(789),w=n(5515),x=n.n(w),f=n(7514);function OpenId(){var e,t,n,r=(0,a.KH)(),o=r.configurationStore,i=r.authorizationStore,s=(0,p.$G)().t,l=null===(e=i.state)||void 0===e?void 0:e.loginMethods;return(0,f.jsxs)(f.Fragment,{children:[(null==l?void 0:l.google)&&(0,f.jsxs)(g.Z,{className:x()(u.FI,u.lk),onClick:function onClick(){var e;return i.openOAuthLogin("google",i.state.organizationId,null===(e=i.state)||void 0===e?void 0:e.invitationId)},children:[(0,f.jsx)("div",{}),s("auth.login.google")]}),(null==l?void 0:l.microsoft)&&(0,f.jsxs)(g.Z,{className:x()(u.FI,u.Eg),onClick:function onClick(){var e;return i.openOAuthLogin("microsoft",i.state.organizationId,null===(e=i.state)||void 0===e?void 0:e.invitationId)},children:[(0,f.jsx)("div",{}),s("auth.login.microsoft")]}),(null==l?void 0:l.generic)&&(0,f.jsxs)(g.Z,{className:u.FI,style:{backgroundColor:null!==(t=l.generic.backgroundColor)&&void 0!==t?t:o.theme.palette.secondary.main,color:null!==(n=l.generic.color)&&void 0!==n?n:o.theme.palette.secondary.contrastText},onClick:function onClick(){var e;return i.openOAuthLogin("genericOpenId",i.state.organizationId,null===(e=i.state)||void 0===e?void 0:e.invitationId)},children:[(0,f.jsx)("div",{style:l.generic.logo?{backgroundImage:"url(".concat(l.generic.logo,")")}:{}}),s("auth.login.generic")]})]})}var j=n(4680),m=(0,j.jl)("Framework","Login");const y=(0,c.Pi)((function Login(){var e,t,n,s,c=(0,a.KH)(),w=c.authorizationStore,x=c.authorizationHandler,j=(0,r.useState)("enter"),y=(0,i.Z)(j,2),M=y[0],k=y[1],C=(0,r.useState)(null!==(e=null===(t=w.state)||void 0===t?void 0:t.email)&&void 0!==e?e:""),L=(0,i.Z)(C,2),N=L[0],I=L[1],S=(0,r.useState)(""),Z=(0,i.Z)(S,2),E=Z[0],z=Z[1],D=(0,r.useState)(""),b=(0,i.Z)(D,2),P=b[0],_=b[1],A=(0,r.useState)(!1),T=(0,i.Z)(A,2),O=T[0],F=T[1],U=(0,r.useState)(w.state.invitationId),R=(0,i.Z)(U,2),G=R[0],K=R[1],H=(0,r.useState)("LOGIN"==(null===(n=w.state)||void 0===n?void 0:n.type)?w.state.error:void 0),$=(0,i.Z)(H,2),V=$[0],Q=$[1],W=(0,p.$G)().t,Y=function(){var e=(0,o.Z)(l().mark((function _callee(){var e,t;return l().wrap((function _callee$(n){for(;;)switch(n.prev=n.next){case 0:if(n.prev=0,G){n.next=6;break}return n.next=4,x.getInvitationValue("id",N);case 4:(e=n.sent)&&(e.isNewUser&&(w.close(),w.showRegister(void 0,N,!!e.useotp)),K(!0),e.useotp&&F(!0));case 6:return n.next=8,x.fetchLoginProvider({email:N});case 8:"standard"==(t=n.sent).provider?k("login"):w.openOAuthLogin(t.provider,w.state.organizationId,w.state.invitationId),n.next=16;break;case 12:n.prev=12,n.t0=n.catch(0),m.error(new d.GE("Error while fetching login provider",{cause:n.t0})),Q("auth.error.password");case 16:case"end":return n.stop()}}),_callee,null,[[0,12]])})));return function onContinue(){return e.apply(this,arguments)}}(),B=function(){var e=(0,o.Z)(l().mark((function _callee2(){return l().wrap((function _callee2$(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,h.fl)(w.login(N,E,!1,w.state.organizationId,w.state.invitationId,P));case 3:I(""),z(""),Q(void 0),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),m.error(new d.GE("Error while logging in",{cause:e.t0})),Q(G?"auth.error.passwordotp":"auth.error.password");case 12:case"end":return e.stop()}}),_callee2,null,[[0,8]])})));return function onLogin(){return e.apply(this,arguments)}}(),q=function(){var e=(0,o.Z)(l().mark((function _callee3(){return l().wrap((function _callee3$(e){for(;;)switch(e.prev=e.next){case 0:w.showRequestNewPassword(N);case 1:case"end":return e.stop()}}),_callee3)})));return function resetPassword(){return e.apply(this,arguments)}}(),J="enter"==M&&0==N.length||"enter"!=M&&0==E.length;O&&!J&&(J=0==P.length);var X=null===(s=w.state)||void 0===s?void 0:s.loginMethods;return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("h1",{children:W("auth.title.login")}),(0,f.jsx)("p",{children:W("auth.text.login","")}),!!V&&(0,f.jsxs)("div",{className:u.vU,children:[(0,f.jsx)("span",{}),(0,f.jsx)("div",{id:"loginerrortext",children:W(V)})]}),(0,f.jsx)(OpenId,{}),((null==X?void 0:X.generic)||(null==X?void 0:X.google)||(null==X?void 0:X.microsoft))&&X.standard&&(0,f.jsx)("div",{className:u.kr,children:"or"}),(null==X?void 0:X.standard)&&(0,f.jsxs)(f.Fragment,{children:["enter"==M&&(0,f.jsxs)("form",{children:[(0,f.jsx)(v.Z,{id:"username",value:N,autoComplete:"username",autoFocus:!0,placeholder:W("auth.input.email"),onChange:function onChange(e){return I(e.target.value)},onKeyPress:function onKeyPress(e){return"Enter"==e.key&&Y()}}),(0,f.jsx)(v.Z,{value:E,id:"password",type:"password",autoComplete:"current-password",hidden:!0,autoFocus:!0,placeholder:W("auth.input.password"),onChange:function onChange(e){return z(e.target.value)},onKeyPress:function onKeyPress(e){return"Enter"==e.key&&B()}})]}),"login"==M&&(0,f.jsxs)("form",{children:[O&&(0,f.jsx)(v.Z,{value:P,type:"text",autoFocus:!0,placeholder:W("auth.input.otp"),onChange:function onChange(e){return _(e.target.value)}}),(0,f.jsx)("label",{className:u.TL,onClick:function reset(){k("enter"),I(""),z(""),Q(void 0)},children:(0,f.jsx)(v.Z,{value:N,readOnly:!0,placeholder:W("auth.input.email")})}),(0,f.jsx)(v.Z,{value:E,type:"password",id:"password",autoFocus:!0,placeholder:W("auth.input.password"),onChange:function onChange(e){return z(e.target.value)},onKeyPress:function onKeyPress(e){return"Enter"==e.key&&B()}}),(0,f.jsx)("div",{className:u.p4,style:{textAlign:"right"},onClick:q,children:W("auth.button.forgotpassword")})]}),(0,f.jsx)(g.Z,{id:"submit",disabled:J,onClick:"enter"==M?Y:B,children:W("enter"==M?"auth.button.continue":"auth.button.login")})]})]})}));var M=(0,j.jl)("Framework","RequestNewPassword");function RequestNewPassword(e){var t=e.initEmail,n=(0,a.KH)(),s=n.authorizationStore,c=n.apiHandler,h=n.loadingAndErrorStore,w=(0,r.useState)(t),x=(0,i.Z)(w,2),j=x[0],m=x[1],y=(0,r.useState)(!1),k=(0,i.Z)(y,2),C=k[0],L=k[1],N=(0,r.useState)(),I=(0,i.Z)(N,2),S=I[0],Z=I[1],E=(0,r.useState)(),z=(0,i.Z)(E,2),D=z[0],b=z[1],P=(0,p.$G)().t,_=function(){var e=(0,o.Z)(l().mark((function _callee(){return l().wrap((function _callee$(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,b(!0),h.toggleLoading("SendPassword"),e.next=5,c.sendPasswordRecoveryMail({email:j});case 5:b(!1),h.toggleLoading("SendPassword"),L(!0),Z(void 0),e.next=17;break;case 11:e.prev=11,e.t0=e.catch(0),M.error(new d.GE("Error while sending password recovery mail",{cause:e.t0})),Z("auth.error.resetpassword"),b(!1),h.toggleLoading("SendPassword");case 17:case"end":return e.stop()}}),_callee,null,[[0,11]])})));return function resetPassword(){return e.apply(this,arguments)}}();return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("h1",{children:P("auth.title.resetpassword")}),(0,f.jsx)("p",{children:P("auth.info.resetdescription")}),!!S&&(0,f.jsxs)("div",{className:u.vU,children:[(0,f.jsx)("span",{}),(0,f.jsx)("div",{children:P(S)})]}),C&&(0,f.jsxs)("div",{className:u.Vp,children:[(0,f.jsx)("span",{}),(0,f.jsx)("div",{children:P("auth.info.resetpassword")})]}),!C&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(v.Z,{value:j,autoFocus:!0,placeholder:P("auth.input.email"),onChange:function onChange(e){return m(e.target.value)},onKeyPress:function onKeyPress(e){return"Enter"==e.key&&_()}}),(0,f.jsx)(g.Z,{disabled:0==j.length,onClick:_,children:P("auth.button.resetpassword")})]}),C&&(0,f.jsx)(g.Z,{disabled:D,onClick:function toLogin(){s.close(),s.showLogin()},children:P("auth.button.login")})]})}function Errormessage(e){var t=e.hasError,n=e.authErrorsg,r=(0,p.$G)().t;return(0,f.jsxs)("div",{className:u.vU,children:[(0,f.jsx)("span",{}),"INVALID"==t&&(0,f.jsx)("div",{children:r("auth.error.verifypassword")}),"SERVER"==t&&(0,f.jsx)("div",{children:n})]})}var k=(0,j.jl)("Framework","cfhange-password");function ChangePassword(e){var t,n=e.token,s=(0,a.KH)(),c=s.configurationStore,h=s.authorizationStore,w=s.apiHandler,x=(s.loadingAndErrorStore,(0,r.useState)("")),j=(0,i.Z)(x,2),m=j[0],y=j[1],M=(0,r.useState)(""),C=(0,i.Z)(M,2),L=C[0],N=C[1],I=(0,r.useState)(!1),S=(0,i.Z)(I,2),Z=S[0],E=S[1],z=(0,r.useState)(),D=(0,i.Z)(z,2),b=D[0],P=D[1],_=(0,r.useState)(""),A=(0,i.Z)(_,2),T=A[0],O=A[1],F=(0,r.useRef)(null),U=(0,p.$G)().t;(0,r.useEffect)((function(){m===L&&P(void 0)}),[m,L]);var R=function(){var e=(0,o.Z)(l().mark((function _callee(){return l().wrap((function _callee$(e){for(;;)switch(e.prev=e.next){case 0:if(O(U("auth.error.verifypasswordserver")),!(m.length<8||m!==L)){e.next=4;break}return P("INVALID"),e.abrupt("return");case 4:return e.prev=4,e.next=7,w.resetPassword({password:m,token:n});case 7:E(!0),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(4),G(e.t0);case 13:case"end":return e.stop()}}),_callee,null,[[4,10]])})));return function resetPassword(){return e.apply(this,arguments)}}(),G=function handleError(e){if(e instanceof d.GE){if("AUTH_0003"===e.name)O(U("auth.error.verifypasswordtokenerror",{errormsg:U("auth.error.tokenexpired")}));else O(U("auth.error.verifypasswordserver",e.message));k.error(e)}k.error(new d.GE("Error while resetting password",{cause:e})),P("SERVER")};return"SERVER"===b?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(Errormessage,{hasError:b,authErrorsg:T}),(0,f.jsx)(g.Z,{onClick:function onClickRequestNewPassword(){h.showRequestNewPassword("")},children:U("auth.button.resetpassword")})]}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("h1",{children:U("auth.title.verifypassword")}),Z&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)("div",{className:u.Vp,children:[(0,f.jsx)("span",{}),(0,f.jsx)("div",{children:U("auth.info.verifypassword")})]}),(null===(t=c.authentication.resetPassword)||void 0===t?void 0:t.returnToLogin)&&(0,f.jsx)(g.Z,{onClick:function goToLogin(){h.close(),h.showLogin()},children:U("auth.button.login")})]}),!Z&&(0,f.jsxs)(f.Fragment,{children:[b&&(0,f.jsx)(Errormessage,{hasError:b,authErrorsg:T}),(0,f.jsxs)("form",{children:[(0,f.jsx)(v.Z,{value:m,autoFocus:!0,placeholder:U("auth.input.password"),type:"password",autoComplete:"new-password",onChange:function onChange(e){return y(e.target.value)},onKeyPress:function onKeyPress(e){var t;return"Enter"==e.key&&(null===(t=F.current)||void 0===t?void 0:t.focus())}}),(0,f.jsx)(v.Z,{ref:F,value:L,placeholder:U("auth.input.verifypassword"),type:"password",autoComplete:"new-password",onChange:function onChange(e){return N(e.target.value)},onKeyPress:function onKeyPress(e){return"Enter"==e.key&&R()}})]}),(0,f.jsx)(g.Z,{disabled:!m||!L,onClick:R,children:U("auth.button.save")})]})]})}var C=n(5019);function WelcomeScreen(e){var t=e.isNewUser,n=e.invitationId,s=e.invitationOrgId,c=(0,a.KH)(),d=c.authorizationStore,h=c.authorizationHandler,v=(0,r.useState)(""),w=(0,i.Z)(v,2),x=w[0],j=w[1],m=(0,p.$G)().t,y=(0,r.useState)(""),M=(0,i.Z)(y,2),k=M[0],C=M[1];(0,r.useEffect)((function(){function _getInvitation(){return(_getInvitation=(0,o.Z)(l().mark((function _callee(){var e,t;return l().wrap((function _callee$(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,h.getInvitationValue("user-check",null===(e=d.state)||void 0===e?void 0:e.invitationId);case 2:return(t=n.sent)?C(t.exists):j("Invitation not found"),n.abrupt("return");case 5:case"end":return n.stop()}}),_callee)})))).apply(this,arguments)}!function getInvitation(){return _getInvitation.apply(this,arguments)}()}),[n]);var L=function(){var e=(0,o.Z)(l().mark((function _callee2(){var e;return l().wrap((function _callee2$(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,checkInvitation();case 2:(e=t.sent)&&(d.close(),d.showLogin(void 0,void 0,s,n,e));case 4:case"end":return t.stop()}}),_callee2)})));return function toLogin(){return e.apply(this,arguments)}}(),N=function(){var e=(0,o.Z)(l().mark((function _callee3(){var e;return l().wrap((function _callee3$(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,checkInvitation();case 2:(e=t.sent)&&(d.close(),d.showRegister(n,e));case 4:case"end":return t.stop()}}),_callee3)})));return function toRegister(){return e.apply(this,arguments)}}();function checkInvitation(){return _checkInvitation.apply(this,arguments)}function _checkInvitation(){return _checkInvitation=(0,o.Z)(l().mark((function _callee4(){var e,t,n;return l().wrap((function _callee4$(r){for(;;)switch(r.prev=r.next){case 0:return t=null===(e=d.state)||void 0===e?void 0:e.invitationId,r.next=3,h.getInvitationValue("email",t);case 3:if(!(n=r.sent)){r.next=8;break}return r.abrupt("return",n.email);case 8:return j("Invitation not found"),r.abrupt("return",void 0);case 10:case"end":return r.stop()}}),_callee4)}))),_checkInvitation.apply(this,arguments)}return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("h1",{children:m("auth.title.welcome")}),(0,f.jsx)("p",{children:m("auth.info.welcomedescription")}),x&&(0,f.jsxs)("div",{className:u.vU,children:[(0,f.jsx)("span",{}),(0,f.jsx)("div",{children:m(x)})]}),t&&!k&&!x&&(0,f.jsx)(g.Z,{onClick:N,children:m("auth.title.register")}),k&&!x&&(0,f.jsx)(g.Z,{onClick:L,children:m("auth.button.login")})]})}var L=n(5282),N=n(5113),I=(0,j.jl)("Framework","Register");const S=(0,c.Pi)((function Register(){var e,t,n,s,c,w,x=(0,a.KH)(),j=x.authorizationStore,m=x.configurationStore,y=(0,p.$G)().t,M=(0,r.useState)(null!==(e=null===(t=j.state)||void 0===t?void 0:t.email)&&void 0!==e?e:""),k=(0,i.Z)(M,2),C=k[0],S=k[1],Z=(0,r.useState)(""),E=(0,i.Z)(Z,2),z=E[0],D=E[1],b=(0,r.useState)(""),P=(0,i.Z)(b,2),_=P[0],A=P[1],T=(0,r.useState)(""),O=(0,i.Z)(T,2),F=O[0],U=O[1],R=(0,r.useState)(""),G=(0,i.Z)(R,2),K=G[0],H=G[1],$=(0,r.useState)(""),V=(0,i.Z)($,2),Q=V[0],W=V[1],Y=(0,r.useState)(""),B=(0,i.Z)(Y,2),q=B[0],J=B[1],X=(0,r.useState)(!1),ee=(0,i.Z)(X,2),te=ee[0],ne=ee[1],re=function(){var e=(0,o.Z)(l().mark((function _callee(){var e;return l().wrap((function _callee$(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,(0,h.fl)(j.register(C,z,K,F,null===(e=j.state)||void 0===e?void 0:e.invitationId,ae?q:void 0));case 3:S(""),D(""),A(""),H(""),U(""),t.next=14;break;case 10:t.prev=10,t.t0=t.catch(0),W("auth.error.invitationotp"),I.error(new d.GE("Error while registering",{cause:t.t0}));case 14:case"end":return t.stop()}}),_callee,null,[[0,10]])})));return function onRegister(){return e.apply(this,arguments)}}(),ae=null===(n=j.state)||void 0===n?void 0:n.useOtp,oe=function validPassword(){return ae?null!=q&&""!==q&&z==_&&""!=z&&null!=z&&te:z==_&&""!=z&&null!=z&&te},ie=null===(s=j.state)||void 0===s?void 0:s.loginMethods;return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("h1",{children:y("auth.title.register")}),(0,f.jsx)("p",{children:y("auth.text.register","")}),!!Q&&(0,f.jsxs)("div",{className:u.vU,children:[(0,f.jsx)("span",{}),(0,f.jsx)("div",{children:y(Q)})]}),(0,f.jsx)(OpenId,{}),((null==ie?void 0:ie.generic)||(null==ie?void 0:ie.google)||(null==ie?void 0:ie.microsoft))&&ie.standard&&(0,f.jsx)("div",{className:u.kr,children:"or"}),(null==ie?void 0:ie.standard)&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)("form",{children:[ae&&(0,f.jsx)(v.Z,{type:"text",value:q,placeholder:y("auth.input.otp"),onChange:function onChange(e){return J(e.target.value)}}),(0,f.jsx)(v.Z,{value:K,autoFocus:!0,placeholder:y("backoffice.form.userdetails.items.name"),onChange:function onChange(e){return H(e.target.value)}}),(0,f.jsx)(v.Z,{value:F,autoFocus:!0,placeholder:y("backoffice.form.userdetails.items.familyName"),onChange:function onChange(e){return U(e.target.value)}}),(0,f.jsx)(v.Z,{value:C,autoComplete:"email",autoFocus:!0,placeholder:y("auth.input.email"),disabled:!0}),(0,f.jsx)(v.Z,{value:z,type:"password",autoFocus:!0,placeholder:y("auth.input.password"),onChange:function onChange(e){return D(e.target.value)}}),(0,f.jsx)(v.Z,{value:_,type:"password",autoFocus:!0,placeholder:y("auth.input.repeatpassword"),onChange:function onChange(e){return A(e.target.value)}}),(0,f.jsxs)("div",{style:{display:"flex",gap:5,alignItems:"center"},children:[(0,f.jsx)(N.Z,{name:"checkAGB",checked:te,onClick:function onClick(){return ne(!te)}}),(0,f.jsxs)("div",{style:{display:"flex",flexDirection:"column",fontSize:9},children:[(0,f.jsx)("span",{children:y("auth.acceptprivacyandagb")}),(0,f.jsxs)("span",{children:[(0,f.jsx)("a",{target:"_blank",href:null!==(c=m.navigation.tosUrl)&&void 0!==c?c:"https://www.diva-portal.de/agb",children:y("auth.GeneralTerms")}),", ",(0,f.jsx)("a",{target:"_blank",href:null!==(w=m.navigation.privacyUrl)&&void 0!==w?w:"https://www.diva-portal.de/datenschutz",children:y("auth.privacypolicy")})]})]})]}),(0,f.jsx)(L.Z,{style:{color:"#FF8C00",marginTop:10,fontSize:14},hidden:oe(),children:y("auth.input.passwordsnotmatch")})]}),(0,f.jsx)(g.Z,{disabled:!oe(),onClick:oe()?re:void 0,children:y("auth.input.login")})]})]})}));var Z=(0,c.Pi)((function(){var e,t=(0,a.KH)().authorizationStore;switch(null===(e=t.state)||void 0===e?void 0:e.type){case"LOGIN":return(0,f.jsx)(y,{});case"REQUEST_NEW_PASSWORD":return(0,f.jsx)(RequestNewPassword,{initEmail:t.state.email});case"CHANGE_PASSWORD":return(0,f.jsx)(ChangePassword,{token:t.state.token});case"WELCOME":return(0,f.jsx)(WelcomeScreen,{isNewUser:t.state.isNewUser,invitationId:t.state.invitationId,invitationOrgId:t.state.invitationOrgId});case"REGISTER":return(0,f.jsx)(S,{});case"INVITATION_EXPIRED":return(0,f.jsx)("h1",{children:"Abgelaufen"});default:return(0,f.jsx)(f.Fragment,{})}}));const E=(0,c.Pi)((function Auth(){var e,t,n,o=(0,a.KH)(),i=o.authorizationStore,s=o.configurationStore,l=o.dataStore,c=(o.authorizationHandler,(0,r.useMemo)((function(){var e,t,n,r="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciICB2aWV3Qm94PSIwIDAgMTAwMCAyOTMuNjUiPjxwYXRoIGQ9Ik0yNTAuODksMTQ3LjNjLTMuMTgtNzQtMzAuNC0xNDMuMTgtMTQxLjczLTE0My4xOEwwLDQuMjZBMzA3Ljg2LDMwNy44NiwwLDAsMSwyNi4xMiw2MC43aDc0LjJjNTIuODYsMCw3NiwyNS42OCw3OC42MSw4NS4yOSwyLjY2LDYxLjgxLTE4LjI5LDg3LjkyLTcxLjE1LDg3LjkySDc5LjJsLTQ2LjcxLjUyYTI4Ny4yOSwyODcuMjksMCwwLDEtMjAsNTMuODhoMTA5YzExMS4zMiwwLDEzMi42Ny02NywxMjkuNDgtMTQxTTMwNi44NCwyODloNzEuMjNWMGEzMDAuMDcsMzAwLjA3LDAsMCwxLTcxLjIzLDI1LjkyWm0zMTguOC42Mkw3MjYuNTkuODVhMzAwLDMwMCwwLDAsMS04My42NSwzMi4yNEw1NzcuMTEsMjI0LDUxMS4yOSwzMy4wOUEzMDAsMzAwLDAsMCwxLDQyNy42NC44NWwxMDEsMjg4Ljc2Wm0zNzQuMzYsNEw4OTkuMDUsNC45MUg4MDJMNzc1LjE0LDgxLjc0LDcwMS4wNSwyOTMuNjVBMzAwLjMyLDMwMC4zMiwwLDAsMSw3ODUsMjYxLjM1bDYuNzktMjEsMTkuMTQtNTcuNTRMODUwLjUyLDYybDQwLjA3LDEyMC44NSwxOC43LDU3LjU0LDcsMjFBMzAwLjIsMzAwLjIsMCwwLDEsMTAwMCwyOTMuNjUiIGZpbGw9IiNiM2IzYjMiLz48L3N2Zz4=";if(null!==(e=l.organization)&&void 0!==e&&e.logoUrl)r=null===(n=l.organization)||void 0===n?void 0:n.logoUrl;else if(null!==(t=s.navigation)&&void 0!==t&&t.logoUrl){var a;r=null===(a=s.navigation)||void 0===a?void 0:a.logoUrl}return r}),[null===(e=s.navigation)||void 0===e?void 0:e.logoUrl,null===(t=l.organization)||void 0===t?void 0:t.logoUrl]));return null==i.state?(0,f.jsx)(f.Fragment,{}):(0,f.jsxs)("div",{className:u.I8,children:[(0,f.jsxs)("div",{className:u.NB,children:[(0,f.jsx)("div",{className:u.tn,style:{height:null!==(n=s.configuration.loginLogoHeight)&&void 0!==n?n:50,backgroundImage:"url(".concat(c,")")}}),(0,f.jsx)(Z,{})]}),s.authentication.contentBox&&(0,f.jsx)("div",{style:{width:"calc(100% - 400px)",height:"100%",position:"relative",overflow:"hidden"},children:(0,f.jsx)(C.p,{settings:{contentBoxProps:(0,h.ZN)(s.authentication.contentBox.props)}})})]})}))}}]);
2
+ "use strict";(self.webpackChunkCrystaldesignProductsComponent=self.webpackChunkCrystaldesignProductsComponent||[]).push([[266],{6266:(e,t,n)=>{n.r(t),n.d(t,{default:()=>z});var r=n(7363),a=n(6308),o=n(4658),i=n(4988),s=n(747),l=n.n(s),u=n(523),c=n(9420),d=n(9534),h=n(8623),v=n(3096),g=n(7995),p=n(789),w=n(5515),x=n.n(w),f=n(7514);function OpenId(){var e,t,n,r=(0,a.KH)(),o=r.configurationStore,i=r.authorizationStore,s=(0,p.$G)().t,l=null===(e=i.state)||void 0===e?void 0:e.loginMethods;return(0,f.jsxs)(f.Fragment,{children:[(null==l?void 0:l.google)&&(0,f.jsxs)(g.Z,{className:x()(u.FI,u.lk),onClick:function onClick(){var e;return i.openOAuthLogin("google",i.state.organizationId,null===(e=i.state)||void 0===e?void 0:e.invitationId)},children:[(0,f.jsx)("div",{}),s("auth.login.google")]}),(null==l?void 0:l.microsoft)&&(0,f.jsxs)(g.Z,{className:x()(u.FI,u.Eg),onClick:function onClick(){var e;return i.openOAuthLogin("microsoft",i.state.organizationId,null===(e=i.state)||void 0===e?void 0:e.invitationId)},children:[(0,f.jsx)("div",{}),s("auth.login.microsoft")]}),(null==l?void 0:l.generic)&&(0,f.jsxs)(g.Z,{className:u.FI,style:{backgroundColor:null!==(t=l.generic.backgroundColor)&&void 0!==t?t:o.theme.palette.secondary.main,color:null!==(n=l.generic.color)&&void 0!==n?n:o.theme.palette.secondary.contrastText},onClick:function onClick(){var e;return i.openOAuthLogin("genericOpenId",i.state.organizationId,null===(e=i.state)||void 0===e?void 0:e.invitationId)},children:[(0,f.jsx)("div",{style:l.generic.logo?{backgroundImage:"url(".concat(l.generic.logo,")")}:{}}),s("auth.login.generic")]})]})}var j=n(4680),m=(0,j.jl)("Framework","Login");const y=(0,c.Pi)((function Login(){var e,t,n,s,c=(0,a.KH)(),w=c.authorizationStore,x=c.authorizationHandler,j=(0,r.useState)("enter"),y=(0,i.Z)(j,2),k=y[0],M=y[1],C=(0,r.useState)(null!==(e=null===(t=w.state)||void 0===t?void 0:t.email)&&void 0!==e?e:""),L=(0,i.Z)(C,2),N=L[0],I=L[1],S=(0,r.useState)(""),Z=(0,i.Z)(S,2),E=Z[0],z=Z[1],D=(0,r.useState)(""),b=(0,i.Z)(D,2),P=b[0],_=b[1],A=(0,r.useState)(!1),T=(0,i.Z)(A,2),O=T[0],F=T[1],U=(0,r.useState)(w.state.invitationId),R=(0,i.Z)(U,2),G=R[0],K=R[1],H=(0,r.useState)("LOGIN"==(null===(n=w.state)||void 0===n?void 0:n.type)?w.state.error:void 0),$=(0,i.Z)(H,2),V=$[0],Q=$[1],W=(0,p.$G)().t,Y=function(){var e=(0,o.Z)(l().mark((function _callee(){var e,t;return l().wrap((function _callee$(n){for(;;)switch(n.prev=n.next){case 0:if(n.prev=0,G){n.next=6;break}return n.next=4,x.getInvitationValue("id",N);case 4:(e=n.sent)&&(e.isNewUser&&(w.close(),w.showRegister(void 0,N,!!e.useotp)),K(!0),e.useotp&&F(!0));case 6:return n.next=8,x.fetchLoginProvider({email:N});case 8:"standard"==(t=n.sent).provider?M("login"):w.openOAuthLogin(t.provider,w.state.organizationId,w.state.invitationId),n.next=16;break;case 12:n.prev=12,n.t0=n.catch(0),m.error(new d.GE("Error while fetching login provider",{cause:n.t0})),Q("auth.error.password");case 16:case"end":return n.stop()}}),_callee,null,[[0,12]])})));return function onContinue(){return e.apply(this,arguments)}}(),B=function(){var e=(0,o.Z)(l().mark((function _callee2(){return l().wrap((function _callee2$(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,h.fl)(w.login(N,E,!1,w.state.organizationId,w.state.invitationId,P));case 3:I(""),z(""),Q(void 0),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(0),m.error(new d.GE("Error while logging in",{cause:e.t0})),Q(G?"auth.error.passwordotp":"auth.error.password");case 12:case"end":return e.stop()}}),_callee2,null,[[0,8]])})));return function onLogin(){return e.apply(this,arguments)}}(),q=function(){var e=(0,o.Z)(l().mark((function _callee3(){return l().wrap((function _callee3$(e){for(;;)switch(e.prev=e.next){case 0:w.showRequestNewPassword(N);case 1:case"end":return e.stop()}}),_callee3)})));return function resetPassword(){return e.apply(this,arguments)}}(),J="enter"==k&&0==N.length||"enter"!=k&&0==E.length;O&&!J&&(J=0==P.length);var X=null===(s=w.state)||void 0===s?void 0:s.loginMethods;return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("h1",{children:W("auth.title.login")}),(0,f.jsx)("p",{children:W("auth.text.login","")}),!!V&&(0,f.jsxs)("div",{className:u.vU,children:[(0,f.jsx)("span",{}),(0,f.jsx)("div",{id:"loginerrortext",children:W(V)})]}),(0,f.jsx)(OpenId,{}),((null==X?void 0:X.generic)||(null==X?void 0:X.google)||(null==X?void 0:X.microsoft))&&X.standard&&(0,f.jsx)("div",{className:u.kr,children:"or"}),(null==X?void 0:X.standard)&&(0,f.jsxs)(f.Fragment,{children:["enter"==k&&(0,f.jsxs)("form",{children:[(0,f.jsx)(v.Z,{id:"username",value:N,autoComplete:"username",autoFocus:!0,placeholder:W("auth.input.email"),onChange:function onChange(e){return I(e.target.value)},onKeyPress:function onKeyPress(e){return"Enter"==e.key&&Y()}}),(0,f.jsx)(v.Z,{value:E,id:"password",type:"password",autoComplete:"current-password",hidden:!0,autoFocus:!0,placeholder:W("auth.input.password"),onChange:function onChange(e){return z(e.target.value)},onKeyPress:function onKeyPress(e){return"Enter"==e.key&&B()}})]}),"login"==k&&(0,f.jsxs)("form",{children:[O&&(0,f.jsx)(v.Z,{value:P,type:"text",autoFocus:!0,placeholder:W("auth.input.otp"),onChange:function onChange(e){return _(e.target.value)}}),(0,f.jsx)("label",{className:u.TL,onClick:function reset(){M("enter"),I(""),z(""),Q(void 0)},children:(0,f.jsx)(v.Z,{value:N,readOnly:!0,placeholder:W("auth.input.email")})}),(0,f.jsx)(v.Z,{value:E,type:"password",id:"password",autoFocus:!0,placeholder:W("auth.input.password"),onChange:function onChange(e){return z(e.target.value)},onKeyPress:function onKeyPress(e){return"Enter"==e.key&&B()}}),(0,f.jsx)("div",{className:u.p4,style:{textAlign:"right"},onClick:q,children:W("auth.button.forgotpassword")})]}),(0,f.jsx)(g.Z,{id:"submit",disabled:J,onClick:"enter"==k?Y:B,children:W("enter"==k?"auth.button.continue":"auth.button.login")})]})]})}));var k=(0,j.jl)("Framework","RequestNewPassword");function RequestNewPassword(e){var t=e.initEmail,n=(0,a.KH)(),s=n.authorizationStore,c=n.apiHandler,h=n.loadingAndErrorStore,w=(0,r.useState)(t),x=(0,i.Z)(w,2),j=x[0],m=x[1],y=(0,r.useState)(!1),M=(0,i.Z)(y,2),C=M[0],L=M[1],N=(0,r.useState)(),I=(0,i.Z)(N,2),S=I[0],Z=I[1],E=(0,r.useState)(),z=(0,i.Z)(E,2),D=z[0],b=z[1],P=(0,p.$G)().t,_=function(){var e=(0,o.Z)(l().mark((function _callee(){return l().wrap((function _callee$(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,b(!0),h.toggleLoading("SendPassword"),e.next=5,c.sendPasswordRecoveryMail({email:j});case 5:b(!1),h.toggleLoading("SendPassword"),L(!0),Z(void 0),e.next=17;break;case 11:e.prev=11,e.t0=e.catch(0),k.error(new d.GE("Error while sending password recovery mail",{cause:e.t0})),Z("auth.error.resetpassword"),b(!1),h.toggleLoading("SendPassword");case 17:case"end":return e.stop()}}),_callee,null,[[0,11]])})));return function resetPassword(){return e.apply(this,arguments)}}();return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("h1",{children:P("auth.title.resetpassword")}),(0,f.jsx)("p",{children:P("auth.info.resetdescription")}),!!S&&(0,f.jsxs)("div",{className:u.vU,children:[(0,f.jsx)("span",{}),(0,f.jsx)("div",{children:P(S)})]}),C&&(0,f.jsxs)("div",{className:u.Vp,children:[(0,f.jsx)("span",{}),(0,f.jsx)("div",{children:P("auth.info.resetpassword")})]}),!C&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(v.Z,{value:j,autoFocus:!0,placeholder:P("auth.input.email"),onChange:function onChange(e){return m(e.target.value)},onKeyPress:function onKeyPress(e){return"Enter"==e.key&&_()}}),(0,f.jsx)(g.Z,{disabled:0==j.length,onClick:_,children:P("auth.button.resetpassword")})]}),C&&(0,f.jsx)(g.Z,{disabled:D,onClick:function toLogin(){s.close(),s.showLogin()},children:P("auth.button.login")})]})}function Errormessage(e){var t=e.hasError,n=e.authErrorsg,r=(0,p.$G)().t;return(0,f.jsxs)("div",{className:u.vU,children:[(0,f.jsx)("span",{}),"INVALID"==t&&(0,f.jsx)("div",{children:r("auth.error.verifypassword")}),"SERVER"==t&&(0,f.jsx)("div",{children:n})]})}var M=(0,j.jl)("Framework","cfhange-password");function ChangePassword(e){var t,n=e.token,s=(0,a.KH)(),c=s.configurationStore,h=s.authorizationStore,w=s.apiHandler,x=(s.loadingAndErrorStore,(0,r.useState)("")),j=(0,i.Z)(x,2),m=j[0],y=j[1],k=(0,r.useState)(""),C=(0,i.Z)(k,2),L=C[0],N=C[1],I=(0,r.useState)(!1),S=(0,i.Z)(I,2),Z=S[0],E=S[1],z=(0,r.useState)(),D=(0,i.Z)(z,2),b=D[0],P=D[1],_=(0,r.useState)(""),A=(0,i.Z)(_,2),T=A[0],O=A[1],F=(0,r.useRef)(null),U=(0,p.$G)().t;(0,r.useEffect)((function(){m===L&&P(void 0)}),[m,L]);var R=function(){var e=(0,o.Z)(l().mark((function _callee(){return l().wrap((function _callee$(e){for(;;)switch(e.prev=e.next){case 0:if(O(U("auth.error.verifypasswordserver")),!(m.length<8||m!==L)){e.next=4;break}return P("INVALID"),e.abrupt("return");case 4:return e.prev=4,e.next=7,w.resetPassword({password:m,token:n});case 7:E(!0),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(4),G(e.t0);case 13:case"end":return e.stop()}}),_callee,null,[[4,10]])})));return function resetPassword(){return e.apply(this,arguments)}}(),G=function handleError(e){if(e instanceof d.GE){if("AUTH_0003"===e.name)O(U("auth.error.verifypasswordtokenerror",{errormsg:U("auth.error.tokenexpired")}));else O(U("auth.error.verifypasswordserver",e.message));M.error(e)}M.error(new d.GE("Error while resetting password",{cause:e})),P("SERVER")};return"SERVER"===b?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(Errormessage,{hasError:b,authErrorsg:T}),(0,f.jsx)(g.Z,{onClick:function onClickRequestNewPassword(){h.showRequestNewPassword("")},children:U("auth.button.resetpassword")})]}):(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("h1",{children:U("auth.title.verifypassword")}),Z&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)("div",{className:u.Vp,children:[(0,f.jsx)("span",{}),(0,f.jsx)("div",{children:U("auth.info.verifypassword")})]}),(null===(t=c.authentication.resetPassword)||void 0===t?void 0:t.returnToLogin)&&(0,f.jsx)(g.Z,{onClick:function goToLogin(){h.close(),h.showLogin()},children:U("auth.button.login")})]}),!Z&&(0,f.jsxs)(f.Fragment,{children:[b&&(0,f.jsx)(Errormessage,{hasError:b,authErrorsg:T}),(0,f.jsxs)("form",{children:[(0,f.jsx)(v.Z,{value:m,autoFocus:!0,placeholder:U("auth.input.password"),type:"password",autoComplete:"new-password",onChange:function onChange(e){return y(e.target.value)},onKeyPress:function onKeyPress(e){var t;return"Enter"==e.key&&(null===(t=F.current)||void 0===t?void 0:t.focus())}}),(0,f.jsx)(v.Z,{ref:F,value:L,placeholder:U("auth.input.verifypassword"),type:"password",autoComplete:"new-password",onChange:function onChange(e){return N(e.target.value)},onKeyPress:function onKeyPress(e){return"Enter"==e.key&&R()}})]}),(0,f.jsx)(g.Z,{disabled:!m||!L,onClick:R,children:U("auth.button.save")})]})]})}var C=n(5019);function WelcomeScreen(e){var t=e.isNewUser,n=e.invitationId,s=e.invitationOrgId,c=(0,a.KH)(),d=c.authorizationStore,h=c.authorizationHandler,v=(0,r.useState)(""),w=(0,i.Z)(v,2),x=w[0],j=w[1],m=(0,p.$G)().t,y=(0,r.useState)(""),k=(0,i.Z)(y,2),M=k[0],C=k[1];(0,r.useEffect)((function(){function _getInvitation(){return(_getInvitation=(0,o.Z)(l().mark((function _callee(){var e,t;return l().wrap((function _callee$(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,h.getInvitationValue("user-check",null===(e=d.state)||void 0===e?void 0:e.invitationId);case 2:return(t=n.sent)?C(t.exists):j("Invitation not found"),n.abrupt("return");case 5:case"end":return n.stop()}}),_callee)})))).apply(this,arguments)}!function getInvitation(){return _getInvitation.apply(this,arguments)}()}),[n]);var L=function(){var e=(0,o.Z)(l().mark((function _callee2(){var e;return l().wrap((function _callee2$(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,checkInvitation();case 2:(e=t.sent)&&(d.close(),d.showLogin(void 0,void 0,s,n,e));case 4:case"end":return t.stop()}}),_callee2)})));return function toLogin(){return e.apply(this,arguments)}}(),N=function(){var e=(0,o.Z)(l().mark((function _callee3(){var e;return l().wrap((function _callee3$(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,checkInvitation();case 2:(e=t.sent)&&(d.close(),d.showRegister(n,e));case 4:case"end":return t.stop()}}),_callee3)})));return function toRegister(){return e.apply(this,arguments)}}();function checkInvitation(){return _checkInvitation.apply(this,arguments)}function _checkInvitation(){return _checkInvitation=(0,o.Z)(l().mark((function _callee4(){var e,t,n;return l().wrap((function _callee4$(r){for(;;)switch(r.prev=r.next){case 0:return t=null===(e=d.state)||void 0===e?void 0:e.invitationId,r.next=3,h.getInvitationValue("email",t);case 3:if(!(n=r.sent)){r.next=8;break}return r.abrupt("return",n.email);case 8:return j("Invitation not found"),r.abrupt("return",void 0);case 10:case"end":return r.stop()}}),_callee4)}))),_checkInvitation.apply(this,arguments)}return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("h1",{children:m("auth.title.welcome")}),(0,f.jsx)("p",{children:m("auth.info.welcomedescription")}),x&&(0,f.jsxs)("div",{className:u.vU,children:[(0,f.jsx)("span",{}),(0,f.jsx)("div",{children:m(x)})]}),t&&!M&&!x&&(0,f.jsx)(g.Z,{onClick:N,children:m("auth.title.register")}),M&&!x&&(0,f.jsx)(g.Z,{onClick:L,children:m("auth.button.login")})]})}var L=n(5282),N=n(5113),I=(0,j.jl)("Framework","Register");const S=(0,c.Pi)((function Register(){var e,t,n,s,c,w,x=(0,a.KH)(),j=x.authorizationStore,m=x.configurationStore,y=(0,p.$G)().t,k=(0,r.useState)(null!==(e=null===(t=j.state)||void 0===t?void 0:t.email)&&void 0!==e?e:""),M=(0,i.Z)(k,2),C=M[0],S=M[1],Z=(0,r.useState)(""),E=(0,i.Z)(Z,2),z=E[0],D=E[1],b=(0,r.useState)(""),P=(0,i.Z)(b,2),_=P[0],A=P[1],T=(0,r.useState)(""),O=(0,i.Z)(T,2),F=O[0],U=O[1],R=(0,r.useState)(""),G=(0,i.Z)(R,2),K=G[0],H=G[1],$=(0,r.useState)(""),V=(0,i.Z)($,2),Q=V[0],W=V[1],Y=(0,r.useState)(""),B=(0,i.Z)(Y,2),q=B[0],J=B[1],X=(0,r.useState)(!1),ee=(0,i.Z)(X,2),te=ee[0],ne=ee[1],re=function(){var e=(0,o.Z)(l().mark((function _callee(){var e;return l().wrap((function _callee$(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,(0,h.fl)(j.register(C,z,K,F,null===(e=j.state)||void 0===e?void 0:e.invitationId,ae?q:void 0));case 3:S(""),D(""),A(""),H(""),U(""),t.next=14;break;case 10:t.prev=10,t.t0=t.catch(0),W("auth.error.invitationotp"),I.error(new d.GE("Error while registering",{cause:t.t0}));case 14:case"end":return t.stop()}}),_callee,null,[[0,10]])})));return function onRegister(){return e.apply(this,arguments)}}(),ae=null===(n=j.state)||void 0===n?void 0:n.useOtp,oe=function validPassword(){return ae?null!=q&&""!==q&&z==_&&""!=z&&null!=z&&te:z==_&&""!=z&&null!=z&&te},ie=null===(s=j.state)||void 0===s?void 0:s.loginMethods;return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("h1",{children:y("auth.title.register")}),(0,f.jsx)("p",{children:y("auth.text.register","")}),!!Q&&(0,f.jsxs)("div",{className:u.vU,children:[(0,f.jsx)("span",{}),(0,f.jsx)("div",{children:y(Q)})]}),(0,f.jsx)(OpenId,{}),((null==ie?void 0:ie.generic)||(null==ie?void 0:ie.google)||(null==ie?void 0:ie.microsoft))&&ie.standard&&(0,f.jsx)("div",{className:u.kr,children:"or"}),(null==ie?void 0:ie.standard)&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)("form",{children:[ae&&(0,f.jsx)(v.Z,{type:"text",value:q,placeholder:y("auth.input.otp"),onChange:function onChange(e){return J(e.target.value)}}),(0,f.jsx)(v.Z,{value:K,autoFocus:!0,placeholder:y("backoffice.form.userdetails.items.name"),onChange:function onChange(e){return H(e.target.value)}}),(0,f.jsx)(v.Z,{value:F,autoFocus:!0,placeholder:y("backoffice.form.userdetails.items.familyName"),onChange:function onChange(e){return U(e.target.value)}}),(0,f.jsx)(v.Z,{value:C,autoComplete:"email",autoFocus:!0,placeholder:y("auth.input.email"),disabled:!0}),(0,f.jsx)(v.Z,{value:z,type:"password",autoFocus:!0,placeholder:y("auth.input.password"),onChange:function onChange(e){return D(e.target.value)}}),(0,f.jsx)(v.Z,{value:_,type:"password",autoFocus:!0,placeholder:y("auth.input.repeatpassword"),onChange:function onChange(e){return A(e.target.value)}}),(0,f.jsxs)("div",{style:{display:"flex",gap:5,alignItems:"center"},children:[(0,f.jsx)(N.Z,{name:"checkAGB",checked:te,onClick:function onClick(){return ne(!te)}}),(0,f.jsxs)("div",{style:{display:"flex",flexDirection:"column",fontSize:9},children:[(0,f.jsx)("span",{children:y("auth.acceptprivacyandagb")}),(0,f.jsxs)("span",{children:[(0,f.jsx)("a",{target:"_blank",href:null!==(c=m.navigation.tosUrl)&&void 0!==c?c:"https://www.diva-portal.de/agb",children:y("auth.GeneralTerms")}),", ",(0,f.jsx)("a",{target:"_blank",href:null!==(w=m.navigation.privacyUrl)&&void 0!==w?w:"https://www.diva-portal.de/datenschutz",children:y("auth.privacypolicy")})]})]})]}),(0,f.jsx)(L.Z,{style:{color:"#FF8C00",marginTop:10,fontSize:14},hidden:oe(),children:y("auth.input.passwordsnotmatch")})]}),(0,f.jsx)(g.Z,{disabled:!oe(),onClick:oe()?re:void 0,children:y("auth.input.login")})]})]})}));var Z=n(4376);var E=(0,c.Pi)((function(){var e,t=(0,a.KH)().authorizationStore;switch(null===(e=t.state)||void 0===e?void 0:e.type){case"LOGIN":return(0,f.jsx)(y,{});case"REQUEST_NEW_PASSWORD":return(0,f.jsx)(RequestNewPassword,{initEmail:t.state.email});case"CHANGE_PASSWORD":return(0,f.jsx)(ChangePassword,{token:t.state.token});case"WELCOME":return(0,f.jsx)(WelcomeScreen,{isNewUser:t.state.isNewUser,invitationId:t.state.invitationId,invitationOrgId:t.state.invitationOrgId});case"REGISTER":return(0,f.jsx)(S,{});case"INVITATION_EXPIRED":return(0,f.jsx)("h1",{children:"Abgelaufen"});default:return(0,f.jsx)(f.Fragment,{})}}));const z=(0,c.Pi)((function Auth(){var e,t,n,o,i=(0,a.KH)(),s=i.authorizationStore,l=i.configurationStore,c=i.dataStore,d=(0,r.useMemo)((function(){var e,t,n,r="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciICB2aWV3Qm94PSIwIDAgMTAwMCAyOTMuNjUiPjxwYXRoIGQ9Ik0yNTAuODksMTQ3LjNjLTMuMTgtNzQtMzAuNC0xNDMuMTgtMTQxLjczLTE0My4xOEwwLDQuMjZBMzA3Ljg2LDMwNy44NiwwLDAsMSwyNi4xMiw2MC43aDc0LjJjNTIuODYsMCw3NiwyNS42OCw3OC42MSw4NS4yOSwyLjY2LDYxLjgxLTE4LjI5LDg3LjkyLTcxLjE1LDg3LjkySDc5LjJsLTQ2LjcxLjUyYTI4Ny4yOSwyODcuMjksMCwwLDEtMjAsNTMuODhoMTA5YzExMS4zMiwwLDEzMi42Ny02NywxMjkuNDgtMTQxTTMwNi44NCwyODloNzEuMjNWMGEzMDAuMDcsMzAwLjA3LDAsMCwxLTcxLjIzLDI1LjkyWm0zMTguOC42Mkw3MjYuNTkuODVhMzAwLDMwMCwwLDAsMS04My42NSwzMi4yNEw1NzcuMTEsMjI0LDUxMS4yOSwzMy4wOUEzMDAsMzAwLDAsMCwxLDQyNy42NC44NWwxMDEsMjg4Ljc2Wm0zNzQuMzYsNEw4OTkuMDUsNC45MUg4MDJMNzc1LjE0LDgxLjc0LDcwMS4wNSwyOTMuNjVBMzAwLjMyLDMwMC4zMiwwLDAsMSw3ODUsMjYxLjM1bDYuNzktMjEsMTkuMTQtNTcuNTRMODUwLjUyLDYybDQwLjA3LDEyMC44NSwxOC43LDU3LjU0LDcsMjFBMzAwLjIsMzAwLjIsMCwwLDEsMTAwMCwyOTMuNjUiIGZpbGw9IiNiM2IzYjMiLz48L3N2Zz4=";if(null!==(e=c.organization)&&void 0!==e&&e.logoUrl)r=null===(n=c.organization)||void 0===n?void 0:n.logoUrl;else if(null!==(t=l.navigation)&&void 0!==t&&t.logoUrl){var a;r=null===(a=l.navigation)||void 0===a?void 0:a.logoUrl}return r}),[null===(e=l.navigation)||void 0===e?void 0:e.logoUrl,null===(t=c.organization)||void 0===t?void 0:t.logoUrl]);return null==s.state?(0,f.jsx)(f.Fragment,{}):(0,f.jsxs)("div",{className:u.I8,children:[(null==l||null===(n=l.navigation)||void 0===n?void 0:n.showSnow)&&(0,f.jsx)(Z.Z,{color:"#a7b6eb",speed:[0,2.5],wind:[-1,.5],snowflakeCount:300,radius:[.5,2],style:{zIndex:1e3}}),(0,f.jsxs)("div",{className:u.NB,children:[(0,f.jsx)("div",{className:u.tn,style:{height:null!==(o=l.configuration.loginLogoHeight)&&void 0!==o?o:50,backgroundImage:"url(".concat(d,")")}}),(0,f.jsx)(E,{})]}),l.authentication.contentBox&&(0,f.jsx)("div",{style:{width:"calc(100% - 400px)",height:"100%",position:"relative",overflow:"hidden"},children:(0,f.jsx)(C.p,{settings:{contentBoxProps:(0,h.ZN)(l.authentication.contentBox.props)}})})]})}))}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 806.products-component.umd.min.js.LICENSE.txt */
2
+ (self.webpackChunkCrystaldesignProductsComponent=self.webpackChunkCrystaldesignProductsComponent||[]).push([[806],{5113:(e,t,n)=>{"use strict";n.d(t,{Z:()=>P});var a=n(7363),r=n(7726),o=n(4062),s=n(9074),i=n(1522),c=n(1684),l=n(7843);const d=function useControlled({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=a.useRef(void 0!==e),[s,i]=a.useState(t);return[o?e:s,a.useCallback((e=>{o||i(e)}),[])]};const u=a.createContext(void 0);var f=n(189),h=n(3966),p=n(431);function getSwitchBaseUtilityClass(e){return(0,p.ZP)("PrivateSwitchBase",e)}(0,h.Z)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);var m=n(7514);const g=(0,l.ZP)(f.Z)({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>"start"===e&&"small"!==t.size,style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>"end"===e&&"small"!==t.size,style:{marginRight:-12}}]}),w=(0,l.ZP)("input",{shouldForwardProp:c.Z})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),v=a.forwardRef((function SwitchBase(e,t){const{autoFocus:n,checked:s,checkedIcon:c,className:l,defaultChecked:f,disabled:h,disableFocusRipple:p=!1,edge:v=!1,icon:y,id:k,inputProps:b,inputRef:S,name:C,onBlur:x,onChange:z,onFocus:R,readOnly:F,required:Z=!1,tabIndex:M,type:E,value:P,...O}=e,[I,j]=d({controlled:s,default:Boolean(f),name:"SwitchBase",state:"checked"}),q=function useFormControl(){return a.useContext(u)}();let B=h;q&&void 0===B&&(B=q.disabled);const $="checkbox"===E||"radio"===E,T={...e,checked:I,disabled:B,disableFocusRipple:p,edge:v},L=(e=>{const{classes:t,checked:n,disabled:a,edge:r}=e,s={root:["root",n&&"checked",a&&"disabled",r&&`edge${(0,i.Z)(r)}`],input:["input"]};return(0,o.Z)(s,getSwitchBaseUtilityClass,t)})(T);return(0,m.jsxs)(g,{component:"span",className:(0,r.Z)(L.root,l),centerRipple:!0,focusRipple:!p,disabled:B,tabIndex:null,role:void 0,onFocus:e=>{R&&R(e),q&&q.onFocus&&q.onFocus(e)},onBlur:e=>{x&&x(e),q&&q.onBlur&&q.onBlur(e)},ownerState:T,ref:t,...O,children:[(0,m.jsx)(w,{autoFocus:n,checked:s,defaultChecked:f,className:L.input,disabled:B,id:$?k:void 0,name:C,onChange:e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;j(t),z&&z(e,t)},readOnly:F,ref:S,required:Z,ownerState:T,tabIndex:M,type:E,..."checkbox"===E&&void 0===P?{}:{value:P},...b}),I?c:y]})}));var y=n(6177);const k=(0,y.Z)((0,m.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),b=(0,y.Z)((0,m.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),S=(0,y.Z)((0,m.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function getCheckboxUtilityClass(e){return(0,p.ZP)("MuiCheckbox",e)}const C=(0,h.Z)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]);var x=n(518),z=n(8981),R=n(2893);const F=(0,l.ZP)(v,{shouldForwardProp:e=>(0,c.Z)(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${(0,i.Z)(n.size)}`],"default"!==n.color&&t[`color${(0,i.Z)(n.color)}`]]}})((0,x.Z)((({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.Fq)(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter((0,z.Z)()).map((([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,s.Fq)(e.palette[t].main,e.palette.action.hoverOpacity)}}}))),...Object.entries(e.palette).filter((0,z.Z)()).map((([t])=>({props:{color:t},style:{[`&.${C.checked}, &.${C.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${C.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}))),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]})))),Z=(0,m.jsx)(b,{}),M=(0,m.jsx)(k,{}),E=(0,m.jsx)(S,{}),P=a.forwardRef((function Checkbox(e,t){const n=(0,R.i)({props:e,name:"MuiCheckbox"}),{checkedIcon:s=Z,color:c="primary",icon:l=M,indeterminate:d=!1,indeterminateIcon:u=E,inputProps:f,size:h="medium",disableRipple:p=!1,className:g,...w}=n,v=d?u:l,y=d?u:s,k={...n,disableRipple:p,color:c,indeterminate:d,size:h},b=(e=>{const{classes:t,indeterminate:n,color:a,size:r}=e,s={root:["root",n&&"indeterminate",`color${(0,i.Z)(a)}`,`size${(0,i.Z)(r)}`]},c=(0,o.Z)(s,getCheckboxUtilityClass,t);return{...t,...c}})(k);return(0,m.jsx)(F,{type:"checkbox",inputProps:{"data-indeterminate":d,...f},icon:a.cloneElement(v,{fontSize:v.props.fontSize??h}),checkedIcon:a.cloneElement(y,{fontSize:y.props.fontSize??h}),ownerState:k,ref:t,className:(0,r.Z)(b.root,g),disableRipple:p,...w,classes:b})}))},8942:(e,t,n)=>{var a=n(5108),r="undefined"!=typeof Element,o="function"==typeof Map,s="function"==typeof Set,i="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function equal(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var n,a,c,l;if(Array.isArray(e)){if((n=e.length)!=t.length)return!1;for(a=n;0!=a--;)if(!equal(e[a],t[a]))return!1;return!0}if(o&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(l=e.entries();!(a=l.next()).done;)if(!t.has(a.value[0]))return!1;for(l=e.entries();!(a=l.next()).done;)if(!equal(a.value[1],t.get(a.value[0])))return!1;return!0}if(s&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(l=e.entries();!(a=l.next()).done;)if(!t.has(a.value[0]))return!1;return!0}if(i&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if((n=e.length)!=t.length)return!1;for(a=n;0!=a--;)if(e[a]!==t[a])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"==typeof e.valueOf&&"function"==typeof t.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&"function"==typeof e.toString&&"function"==typeof t.toString)return e.toString()===t.toString();if((n=(c=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(a=n;0!=a--;)if(!Object.prototype.hasOwnProperty.call(t,c[a]))return!1;if(r&&e instanceof Element)return!1;for(a=n;0!=a--;)if(("_owner"!==c[a]&&"__v"!==c[a]&&"__o"!==c[a]||!e.$$typeof)&&!equal(e[c[a]],t[c[a]]))return!1;return!0}return e!=e&&t!=t}e.exports=function isEqual(e,t){try{return equal(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return a.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}},4376:(e,t,n)=>{"use strict";n.d(t,{Z:()=>lib_Snowfall});var a=n(7363),r=n(8942);function random(e,t){const n=Math.random()*(t-e+1)+e;return Number.isInteger(e)&&Number.isInteger(t)?Math.floor(n):n}function lerp(e,t,n){return(1-n)*e+n*t}function getSize(e){return e?{height:e.offsetHeight,width:e.offsetWidth}:{height:0,width:0}}const o=2*Math.PI,s={color:"#dee4fd",radius:[.5,3],speed:[1,3],wind:[-.5,2],changeFrequency:200,rotationSpeed:[-1,1],opacity:[1,1]};class Snowflake{static createSnowflakes(e,t,n){if(!e)return[];const a=[];for(let r=0;r<t;r++)a.push(new Snowflake(e,n));return a}constructor(e,t={}){this.updateConfig(t);const{radius:n,wind:a,speed:r,rotationSpeed:o,opacity:s}=this.config;this.params={x:random(0,e.offsetWidth),y:random(-e.offsetHeight,0),rotation:random(0,360),radius:random(...n),speed:random(...r),wind:random(...a),rotationSpeed:random(...o),nextSpeed:random(...r),nextWind:random(...a),nextRotationSpeed:random(...o),opacity:random(...s)},this.framesSinceLastUpdate=0}selectImage(){this.config.images&&this.config.images.length>0?this.image=function randomElement(e){return e[Math.floor(Math.random()*e.length)]}(this.config.images):this.image=void 0}updateConfig(e){const t=this.config;this.config={...s,...e},this.config.changeFrequency=random(this.config.changeFrequency,1.5*this.config.changeFrequency),this.params&&!r(this.config.radius,null==t?void 0:t.radius)&&(this.params.radius=random(...this.config.radius)),r(this.config.images,null==t?void 0:t.images)||this.selectImage()}updateTargetParams(){this.params.nextSpeed=random(...this.config.speed),this.params.nextWind=random(...this.config.wind),this.image&&(this.params.nextRotationSpeed=random(...this.config.rotationSpeed))}update(e,t,n=1){const{x:a,y:r,rotation:o,rotationSpeed:s,nextRotationSpeed:i,wind:c,speed:l,nextWind:d,nextSpeed:u,radius:f}=this.params;this.params.x=(a+c*n)%(e+2*f),this.params.x>e+f&&(this.params.x=-f),this.params.y=(r+l*n)%(t+2*f),this.params.y>t+f&&(this.params.y=-f),this.image&&(this.params.rotation=(o+s)%360),this.params.speed=lerp(l,u,.01),this.params.wind=lerp(c,d,.01),this.params.rotationSpeed=lerp(s,i,.01),this.framesSinceLastUpdate++>this.config.changeFrequency&&(this.updateTargetParams(),this.framesSinceLastUpdate=0)}getImageOffscreenCanvas(e,t){var n,a;if(e instanceof HTMLImageElement&&e.loading)return e;let r=Snowflake.offscreenCanvases.get(e);if(r||(r={},Snowflake.offscreenCanvases.set(e,r)),!(t in r)){const a=document.createElement("canvas");a.width=t,a.height=t,null===(n=a.getContext("2d"))||void 0===n||n.drawImage(e,0,0,t,t),r[t]=a}return null!==(a=r[t])&&void 0!==a?a:e}drawCircle(e){e.moveTo(this.params.x,this.params.y),e.arc(this.params.x,this.params.y,this.params.radius,0,o)}drawImage(e){const{x:t,y:n,rotation:a,radius:r}=this.params,o=a*Math.PI/180,s=Math.cos(o),i=Math.sin(o);1!==this.params.opacity&&(e.save(),e.globalAlpha=this.params.opacity),e.setTransform(s,i,-i,s,t,n);const c=this.getImageOffscreenCanvas(this.image,r);e.drawImage(c,-r/2,-r/2,r,r),1!==this.params.opacity&&e.restore()}}Snowflake.offscreenCanvases=new WeakMap;const i=Snowflake,c={pointerEvents:"none",backgroundColor:"transparent",position:"absolute",top:0,left:0,width:"100%",height:"100%"};var l,d,__classPrivateFieldGet=function(e,t,n,a){if("a"===n&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?a:"a"===n?a.call(e):a?a.value:t.get(e)},__classPrivateFieldSet=function(e,t,n,a,r){if("m"===a)throw new TypeError("Private method is not writable");if("a"===a&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===a?r.call(e,n):r?r.value=n:t.set(e,n),n};class SnowfallCanvas{get ctx(){return __classPrivateFieldGet(this,l,"f")}get canvas(){return __classPrivateFieldGet(this,d,"f")}set canvas(e){__classPrivateFieldSet(this,d,e,"f"),__classPrivateFieldSet(this,l,e.getContext("2d"),"f")}constructor(e,t){this.lastUpdate=Date.now(),this.snowflakes=[],l.set(this,void 0),d.set(this,void 0),__classPrivateFieldSet(this,d,e,"f"),__classPrivateFieldSet(this,l,e.getContext("2d"),"f"),this.config={snowflakeCount:150,...s,...t},this.snowflakes=[],this.snowflakes=i.createSnowflakes(e,t.snowflakeCount||150,t),this.play()}updateConfig(e){this.config={...this.config,...e};const t=this.config.snowflakeCount-this.snowflakes.length;t>0&&(this.snowflakes=[...this.snowflakes,...i.createSnowflakes(this.canvas,t,e)]),t<0&&(this.snowflakes=this.snowflakes.slice(0,this.config.snowflakeCount));for(const e of this.snowflakes)e.updateConfig(this.config)}render(e=1){const{ctx:t,canvas:n,snowflakes:a}=this;if(!t||!n)return;const{offsetWidth:r,offsetHeight:o}=n;for(const t of a)t.update(r,o,e);if(t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,r,o),this.config.images&&this.config.images.length>0)for(const e of a)e.drawImage(t);else{t.beginPath();for(const e of a)e.drawCircle(t);t.fillStyle=this.config.color,t.fill()}}loop(){const e=Date.now(),t=Date.now()-this.lastUpdate;this.lastUpdate=e;const n=t/16.666666666666668;this.render(n),this.animationFrame=requestAnimationFrame((()=>this.loop()))}play(){this.loop()}pause(){this.animationFrame&&(cancelAnimationFrame(this.animationFrame),this.animationFrame=void 0)}}l=new WeakMap,d=new WeakMap;function useDeepMemo(e){const[t,n]=(0,a.useState)(e);return function useDeepCompareEffect(e,t){const n=(0,a.useRef)(t);return r(t,n.current)||(n.current=t),(0,a.useEffect)(e,n.current)}((()=>n(e)),[e]),t}const lib_Snowfall=({color:e=s.color,changeFrequency:t=s.changeFrequency,radius:n=s.radius,speed:r=s.speed,wind:o=s.wind,rotationSpeed:i=s.rotationSpeed,opacity:l=s.opacity,snowflakeCount:d=150,images:u,style:f}={})=>{const h=(p=f,(0,a.useMemo)((()=>({...c,...p||{}})),[p]));var p;const m=(0,a.useRef)(null),g=(e=>{const[t,n]=(0,a.useState)(getSize(e.current)),r=(0,a.useCallback)((()=>{e.current&&n(getSize(e.current))}),[e]);return(0,a.useEffect)((()=>{const{ResizeObserver:t}=window;if(e.current){if(r(),"function"==typeof t){const n=new t(r);return n.observe(e.current),()=>n.disconnect()}return window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)}}),[e,r]),t})(m),w=useDeepMemo({color:e,changeFrequency:t,radius:n,speed:r,wind:o,rotationSpeed:i,images:u,snowflakeCount:d,opacity:l}),v=(0,a.useRef)(w),y=(0,a.useRef)();return(0,a.useEffect)((()=>(!y.current&&m.current&&(y.current=new SnowfallCanvas(m.current,v.current)),()=>{var e;null===(e=y.current)||void 0===e||e.pause(),y.current=void 0})),[]),(0,a.useEffect)((()=>{y.current&&y.current.updateConfig(w)}),[w]),a.createElement("canvas",{ref:m,height:g.height,width:g.width,style:h,"data-testid":"SnowfallCanvas"})}}}]);
@@ -0,0 +1 @@
1
+ /*! filename:806 */