1"use strict";(globalThis.__LOADABLE_LOADED_CHUNKS__||=[]).push([[5470],{92517(e,n,s){s.d(n,{A:()=>v});var o=s(76998),r=s(13761),t=s(49113),a=s(80369),i=s(88743),l=s.n(i),c=s(23236),d=s(13978),m=s(18320),p=s(68713),h=s(23446);function u(e){const{anchors:n,fields:{password:s,username:o}={}}=e;return(0,h.jsxs)("div",{className:"c-login-form-vertical",children:[(0,h.jsx)("div",{className:"form-control",children:(0,h.jsx)(p.A,{type:"email",name:"username",label:o+" *",validate:[m.mw,m.Rp]})}),(0,h.jsx)("div",{className:"form-control",children:(0,h.jsx)(p.A,{type:"password",name:"password",label:s+" *",validate:[m.mw],showPasswordBtn:!0})}),n&&(0,h.jsx)("div",{className:"form-anchor",children:n})]})}function g(e){const{heading:n,anchors:s,fields:{username:o,password:r}={}}=e;return(0,h.jsxs)("div",{className:"c-login-form-horizontal",children:[n&&(0,h.jsx)("h1",{className:"c-login-form-horizontal__heading",children:n}),(0,h.jsxs)("div",{className:"c-login-form-horizontal__wrapper",children:[(0,h.jsx)("div",{className:"c-login-form-horizontal__field",children:(0,h.jsx)(p.A,{type:"email",name:"username",label:o+" *",validate:[m.mw,m.Rp]})}),(0,h.jsxs)("div",{className:"c-login-form-horizontal__field",children:[(0,h.jsx)(p.A,{type:"password",name:"password",label:r+" *",validate:[m.mw]}),s&&(0,h.jsx)("div",{className:"form-anchor",children:s})]})]})]})}var f=s(31088);const x={VERTICAL:"vertical",HORIZONTAL:"horizontal"};class w extends o.Component{constructor(){super(...arguments),this.submitAction=e=>{const{username:n,password:s}=e;return d.A.login({username:n,password:s})},this.onSubmit=e=>{const{t:n,onSuccess:s}=this.props,{token:o,error:r,errorCode:t}=e;if(o)return d.A.setToken(e),f.A.ga4UserLogin("User login to Partnering ONE ","partnering_one_log_in_form_id",n("component.login.pone.heading")),void((0,c.Tn)(s)?s(e):this.redirectToProvidedPage());if(r){let e=r;switch(t){case"USER_NOT_FOUND":case"CREDENTIALS_DOESNT_MATCH":e=n("component.login.errors.account-not-found");break;case"PASSWORD_RESET_REQUIRED":e=n("component.login.errors.password-expired")}return{_error:e}}}}redirectToProvidedPage(){const{redirectToOnSuccess:e,pageConfig:{sitePath:n}={}}=this.props;if(e)document.location.replace(decodeURIComponent(e));else{const e=(l().parse(document.location.search.slice(1)).redirectUrl||"").toString();e?document.location.replace(decodeURIComponent((0,c.kN)(e,{noCache:!0}))):document.location.replace("/"+n+"/")}}render(){const{formConfig:{textContent:{title:e,customTitle:n,titleSentenceCase:s,callToActionLabel:o,alternativeProposition:r,anchors:t,fields:a={}}={}}={},isClearSubmitCtaMargin:i=!1,formViewType:l=x.VERTICAL}=this.props;return(0,h.jsx)(m.Ay,{form:"loginForm",heading:e,headingSentenceCase:s,callToAction:o,alternativeProposition:r,onSubmit:this.onSubmit,submitAction:this.submitAction,isClearSubmitCtaMargin:i,children:x.HORIZONTAL===l?(0,h.jsx)(g,{heading:n,anchors:t,fields:a}):x.VERTICAL===l?(0,h.jsx)(u,{anchors:t,fields:a}):null})}}const v=(0,a.C)()((0,r.Ng)(function(e){return{pageConfig:e.pageConfig}})((0,t.y)(w)))},68713(e,n,s){s.d(n,{M:()=>m,A:()=>c});var o=s(76998),r=s(34156),t=s.n(r),a=s(4077),i=s(23446);const l=e=>{const{input:n,type:s,label:r,placeholder:a,showStrengthBar:l,showPasswordBtn:c,meta:{touched:d,error:p}}=e,[h,u]=(0,o.useState)(!1),g=t()("c-redux-form-input",{[`c-redux-form-input--type-${s}`]:s,"c-redux-form-input--error":d&&p}),f=t()("c-redux-form-input__input",{"c-redux-form-input__input--with-btn":c});return(0,i.jsxs)("div",{className:g,children:[(0,i.jsxs)("label",{htmlFor:n.name,className:"c-redux-form-input__label",children:[(0,i.jsx)("span",{children:r}),d&&p&&(0,i.jsx)("span",{className:"c-redux-form-input__error",children:p})]}),(0,i.jsxs)("div",{className:f,children:[(0,i.jsx)("input",{...n,type:h?"text":s,placeholder:a}),c&&(0,i.jsx)("div",{className:"c-redux-form-input__show-password-btn",onClick:()=>{u(!h)},children:(0,i.jsx)("span",{children:h?"Hide":"Show"})})]}),l&&(0,i.jsx)(m,{password:n.value})]})};function c(e){const{type:n,name:s,label:o,placeholder:r,className:t,validate:c,showStrengthBar:d,showPasswordBtn:m}=e;return(0,i.jsx)(a.A,{type:n,name:s,validate:c,component:l,label:o,placeholder:r,className:t,showStrengthBar:d&&"password"===n,showPasswordBtn:m&&"password"===n})}var d=s(28519);function m(e){let{password:n=""}=e;const s=n.length>=d.A.passwordLength,o=/[A-Z]/.test(n),r=/[a-z]/.test(n),t=/[\d]/.test(n);return(0,i.jsxs)("div",{className:"c-password-strength-bar",children:[(0,i.jsxs)("span",{className:"c-password-strength-bar__text",children:["Minimum requirements for a ",(0,i.jsx)("strong",{children:"strong"})," password:"]}),(0,i.jsxs)("ul",{children:[(0,i.jsx)("li",{className:s?"valid":"invalid",children:"8 characters"}),(0,i.jsx)("li",{className:o?"valid":"invalid",children:"1 uppercase"}),(0,i.jsx)("li",{className:r?"valid":"invalid",children:"1 lowercase"}),(0,i.jsx)("li",{className:t?"valid":"invalid",children:"1 number"})]})]})}},18320(e,n,s){s.d(n,{C5:()=>w,Ay:()=>g,Rp:()=>v,wJ:()=>x,mw:()=>f});var o=s(28519),r=s(76998),t=s(81528),a=s(27325),i=s(34156),l=s.n(i),c=s(23236),d=s(90349),m=s(92675),p=s(44847),h=s(23446);class u extends r.Component{constructor(){super(...arguments),this.state={loading:!1},this.submitHandler=e=>{this.setState({loading:!0});let n=200;return this.props.submitAction(e).then(e=>(n=e.status,e.json())).then(e=>{let s;if(this.setState({loading:!1}),(0,c.Tn)(this.props.onSubmit)&&(s=this.props.onSubmit(e,n)),s&&Object.keys(s).length)throw new t.n(s);const{error:o,errors:r={}}=e;if(o||Object.keys(r).length>0)throw new t.n({...r,_error:o})})}}render(){const{form:e,error:n,heading:s,headingSentenceCase:o,subHeading:r,callToAction:t,alternativeProposition:a,handleSubmit:i,isClearSubmitCtaMargin:c,children:u}=this.props,g=l()("form-submit",{"form-submit--no-margin":c}),{loading:f}=this.state;return(0,h.jsxs)("form",{name:e,onSubmit:i(this.submitHandler),noValidate:!0,autoComplete:"off",className:"c-redux-form-wrapper",children:[s&&(0,h.jsx)(d.A,{small:!0,text:s,sentenceCase:o}),r&&(0,h.jsx)(m.A,{style:{marginBottom:"20px"},text:r}),u,n&&t&&(0,h.jsx)("div",{className:"form-error",children:n}
1),t&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(p.Ay,{type:"submit",size:"submit",mode:"black",label:t,loading:f,className:g}),a&&(0,h.jsx)("div",{className:"form-alt-proposition",children:a})]})]})}}const g=(0,a.A)()(u);function f(e){return e||"number"===typeof e?void 0:"Required"}function x(e){return o.A.isPassword(e)?void 0:"Password is not strong enough"}function w(e,n){return e===n.password?void 0:"Confirm password doesn't match password"}function v(e){return o.A.isEmail(e)?void 0:"Please enter a valid email address"}},8954(e,n,s){s.r(n),s.d(n,{LoginView:()=>h});var o=s(76998),r=s(13761),t=s(80369),a=s(16277),i=s(36753),l=s(66395),c=s(44847),d=s(92517),m=s(13978),p=s(23446);function h(e){const{siteHeader:{data:{partneringOneEventId:n,partneringOneEventUrl:s}={}}={},pageConfig:{sitePath:r}={},t:t}=e,h={textContent:{title:t("component.login.pone.heading"),titleSentenceCase:!0,callToActionLabel:t("component.login.pone.cta"),fields:{username:t("component.login.pone.fields.username"),password:t("component.login.pone.fields.password")},anchors:(0,p.jsx)(p.Fragment,{children:(0,p.jsx)(c.Ay,{type:"link",to:"/pone/forgotten-password/",sitePath:!0,label:t("component.login.pone.forgotten-password")})})}},u=(0,o.useCallback)(async e=>{let{token:o}=e;if(o){try{await m.A.getPOneToken(o)}catch(t){console.error(t)}(0,a.A)().then(e=>{const o=e.includes(n)?s:"/"+r+"/";document.location.replace(o)})}},[r,n,s]);return(0,p.jsx)(i.A,{helmet:{title:t("component.login.pone.heading")},style:{background:"linear-gradient(180deg, #EFEFEF 0%, #FFFFFF 100%)"},children:(0,p.jsx)(l.A,{section:{type:"login"},children:(0,p.jsx)("div",{className:"container",children:(0,p.jsx)("div",{className:"row",children:(0,p.jsx)("div",{className:"col-xs-12 col-sm-7",children:(0,p.jsx)(d.A,{formConfig:h,onSuccess:u,isPartneringOne:!0})})})})})})}const u=(0,r.Ng)(function(e){return{siteHeader:e.siteHeader,pageConfig:e.pageConfig}})((0,t.C)()(h));s.d(n,["default",0,u])}}]); 2//# sourceMappingURL=P1LoginView.d7b4c737.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.