PageSourceSearch

https://my-account.stwater.co.uk/_next/static/chunks/pages/reset-password/[uidb64]/[token]-5df1fbff34a59f65.js

js stwater.co.uk collected 2026-10-02 03:42:26 UTC 7,035 bytes, 2 lines download raw bytes

1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="5ef33df0-0c17-4232-abbd-b467c103805c",e._sentryDebugIdIdentifier="sentry-dbid-5ef33df0-0c17-4232-abbd-b467c103805c")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6744],{5811:(e,n,i)=>{"use strict";i.r(n),i.d(n,{default:()=>D});var a=i(6029),t=i(55729),r=i(81278),s=i(84680),d=i(62074),o=i(44718),l=i(21941),c=i(45329),u=i(92015),f=i(9922),h=i(84475),m=i(76445),p=i.n(m),w=i(64192),x=i(94188),v=i(68433),g=i(34970),b=i(9921),j=i(96963),k=i(12549),S=i(90120),y=i(58441);let P=l.Ik().shape({newPassword:(0,y.CD)(),newPasswordConfirm:l.Yj().oneOf([l.KR("newPassword")],f.Fp).required(f.VU)}),E=({isLoading:e,error:n})=>{let{setFieldError:i}=(0,d.j7)(),[r,o]=(0,t.useState)(""),l=(0,t.useMemo)(()=>(0,j.q)(r),[r]),f=n?.response?.errors?.[0]?.extensions,h=f?.validationErrors,m=Array.isArray(h)?h[0]?.code:"",p=n&&!m;return(0,x.J)({featureFlag:k.T.MagicLinkOnly,redirectPath:S.b.LOGIN.path}),(0,t.useEffect)(()=>{m&&i("newPassword",u.UU[m]||u.JF)},[m,i]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(s.BJ,{direction:"vertical",gap:"sm",children:[(0,a.jsx)(c.Ui,{id:"newPassword",name:"newPassword",label:"New Password",setPasswordValue:o}),(0,a.jsxs)(s.BJ,{direction:"vertical",gap:"xs",children:[(0,a.jsx)(s.o5,{id:"reset-password-requirements-label",children:"Must include:"}),(0,a.jsx)("div",{"aria-labelledby":"reset-password-requirements-label",children:(0,a.jsx)(s.mc,{component:"ul",paddingLeft:"none",children:l.map((e,n)=>(0,a.jsx)(b.x,{label:e.label,checked:e.checked},n))})}),(0,a.jsx)(s.bv,{hidden:!0,children:(0,a.jsx)("div",{role:"status","aria-live":"polite","aria-atomic":"true",children:r?`Password requirements: ${l.map(e=>`${e.label}: ${e.checked?"met":"not met"}`).join(", ")}`:""})})]})]}),(0,a.jsx)(c.Ui,{id:"newPasswordConfirm",name:"newPasswordConfirm",label:"Confirm Password"}),(0,a.jsx)(g.A,{}),p&&(0,a.jsx)(c.Fc,{severity:"error",children:(0,a.jsxs)(s.o5,{children:["Sorry, it looks like your password link has expired. To get a new link, click"," ",(0,a.jsx)(c.LV,{href:S.b.FORGOTTEN_PASSWORD.path,children:"here"})]})}),(0,a.jsx)(c.Jh,{loading:e,children:"Create password"})]})},_=()=>{let{push:e,query:n,isReady:i}=(0,r.useRouter)(),{mutate:l,isPending:u,error:f,isSuccess:m}=(0,h.hQ)({mutation:()=>p(),validateFn:e=>w.oW.validate(e)}),[x,v]=(0,t.useState)(""),[g,b]=(0,t.useState)("");return((0,t.useEffect)(()=>{i&&(n.uidb64&&n.token||e(S.b.HOME.path),v(n.uidb64),b(n.token))},[n,i,e]),(0,t.useEffect)(()=>{m&&e(`${S.b.RESET_PASSWORD_SUCCESS.path}`)},[m,e]),g&&x)?(0,a.jsx)(s.mc,{component:"section",marginBottom:"lg",marginX:"auto",maxWidth:"lg",padding:"md",paddingY:"xxl",children:(0,a.jsx)(d.l1,{initialValues:{newPassword:"",newPasswordConfirm:""},validationSchema:P,onSubmit:({newPassword:e})=>{l({input:{newPassword:e,userId:x,token:g}})},children:(0,a.jsx)(c.s2,{children:(0,a.jsx)(c.MG,{children:(0,a.jsxs)(s.BJ,{direction:"vertical",gap:"lg",children:[(0,a.jsx)(s.o5,{variant:"h1",textAlign:"center",children:"Create new password"}),(0,a.jsx)(E,{isLoading:u,...f instanceof o.MZ&&{error:f}})]})})})})}):(0,a.jsx)(N,{})},N=()=>(0,a.jsx)(s.mc,{marginBottom:"lg",marginX:"auto",maxWidth:"lg",padding:"md",paddingY:"xxl",children:(0,a.jsx)(c.MG,{children:(0,a.jsxs)(s.BJ,{direction:"vertical",gap:"xl",children:[(0,a.jsx)(s.BJ,{direction:"vertical",alignItems:"center",children:(0,a.jsx)(c.Xd,{})}),(0,a.jsxs)(s.BJ,{direction:"vertical",gap:"md",children:[(0,a.jsx)(c.hE,{}),(0,a.jsxs)(s.BJ,{direction:"vertical",gap:"md",children:[(0,a.jsx)(c.Jz,{}),(0,a.jsx)(c.Jz,{}),(0,a.jsx)(c.Jz,{})]})]}),(0,a.jsxs)(s.BJ,{direction:"vertical",gap:"lg",children:[(0,a.jsx)(c.hE,{}),(0,a.jsx)(c.O9,{})]})]})})});_.getLayout=e=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(v.default,{title:S.b.RESET_PASSWORD.title}),e]});let D=_},34970:(e,n,i)=>{"use strict";i.d(n,{A:()=>s});var a=i(6029),t=i(84680),r=i(29143);let s=()=>
1{let e=r.env.NEXT_PUBLIC_TERMS_AND_CONDITIONS,n="https://www.stwater.co.uk/help-and-contact/legal/privacy/";return e||n?(0,a.jsxs)(t.BJ,{direction:"vertical",gap:"xs",children:[e&&(0,a.jsxs)(t.o5,{variant:"body2",children:["By creating a password, you agree to our"," ",(0,a.jsx)(t.N_,{href:e,target:"_blank",children:"terms and conditions"})]}),n&&(0,a.jsxs)(t.o5,{variant:"body2",children:["For more information on how we process your personal data, please see our"," ",(0,a.jsx)(t.N_,{href:n,target:"_blank",children:"Privacy Notice"})]})]}):null}},76445:e=>{var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ResetPassword"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ResetUserPasswordInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"resetUserPassword"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"userId"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:112}};n.loc.source={body:"mutation ResetPassword($input: ResetUserPasswordInput!) {\n  resetUserPassword(input: $input) {\n    userId\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var i={};function a(e,n){for(var i=0;i<e.definitions.length;i++){var a=e.definitions[i];if(a.name&&a.name.value==n)return a}}n.definitions.forEach(function(e){if(e.name){var n=new Set;!function e(n,i){if("FragmentSpread"===n.kind)i.add(n.name.value);else if("VariableDefinition"===n.kind){var a=n.type;"NamedType"===a.kind&&i.add(a.name.value)}n.selectionSet&&n.selectionSet.selections.forEach(function(n){e(n,i)}),n.variableDefinitions&&n.variableDefinitions.forEach(function(n){e(n,i)}),n.definitions&&n.definitions.forEach(function(n){e(n,i)})}(e,n),i[e.name.value]=n}}),e.exports=n,e.exports.ResetPassword=function(e,n){var t={kind:e.kind,definitions:[a(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var r=i[n]||new Set,s=new Set,d=new Set;for(r.forEach(function(e){d.add(e)});d.size>0;){var o=d;d=new Set,o.forEach(function(e){s.has(e)||(s.add(e),(i[e]||new Set).forEach(function(e){d.add(e)}))})}return s.forEach(function(n){var i=a(e,n);i&&t.definitions.push(i)}),t}(n,"ResetPassword")},83253:(e,n,i)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/reset-password/[uidb64]/[token]",function(){return i(5811)}])},94188:(e,n,i)=>{"use strict";i.d(n,{J:()=>s});var a=i(55729),t=i(81278),r=i(14572);let s=({featureFlag:e,redirectPath:n})=>{let{push:i}=(0,t.useRouter)(),s=(0,r.V)(e);(0,a.useEffect)(()=>{s&&i(n)},[s,i,n])}}},e=>{e.O(0,[636,6593,8792],()=>e(e.s=83253)),_N_E=e.O()}]);
2//# sourceMappingURL=[token]-5df1fbff34a59f65.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.