PageSourceSearch

https://editioncollector.fr/_next/static/chunks/pages/profil/[slug]/editer/password-be99ffd045a21e0d.js

js editioncollector.fr collected 2026-10-02 17:50:27 UTC 12,827 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r=(new e.Error).stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="70580cfc-7949-4729-a895-a32ba48c9972",e._sentryDebugIdIdentifier="sentry-dbid-70580cfc-7949-4729-a895-a32ba48c9972")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3732],{74689:function(e,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/profil/[slug]/editer/password",function(){return t(46072)}])},78556:function(e,r,t){"use strict";t.d(r,{Z:function(){return m}});var n=t(85893),s=t(13077),o=(0,s.Z)((0,n.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff"),a=(0,s.Z)((0,n.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility"),i=t(6897),l=t(94143),c=t(36307),u=t(95611),d=t(52857),p=t(12283),f=t(67294);function m(e){let{error:r=!1,fullWidth:t,helperText:s,label:m,...v}=e,[h,x]=(0,f.useState)(!1);return(0,n.jsxs)(i.Z,{error:r,fullWidth:t,variant:"outlined",sx:{marginY:2},children:[m?(0,n.jsx)(l.Z,{htmlFor:"outlined-adornment-password",children:m}):null,(0,n.jsx)(c.Z,{id:"outlined-adornment-password",endAdornment:(0,n.jsx)(u.Z,{position:"end",children:(0,n.jsx)(d.Z,{"aria-label":"toggle password visibility",edge:"end",onClick:()=>x(e=>!e),onMouseDown:e=>{e.preventDefault()},children:h?(0,n.jsx)(o,{}):(0,n.jsx)(a,{})})}),label:m,type:h?"text":"password",...v}),s?(0,n.jsx)(p.Z,{children:s}):null]})}},25453:function(e,r,t){"use strict";t.d(r,{Z:function(){return v}});var n=t(85893),s=t(43093),o=t(58858),a=t(2803),i=t(39815),l=t(61730),c=t(18745),u=t(60990),d=t(38368),p=t(28907),f=t(93191);let m={color:"grey.500",fontWeight:600,fontSize:"15px",textAlign:"left"};function v(e){let{value:r}=e,t=(0,l.Z)((0,c.Z)().breakpoints.down("md")),{data:v}=(0,f.bT)();return(0,n.jsx)(u.Z,{sx:{width:{xs:1,md:1/6},borderRadius:{xs:"10px 10px 0 0 ",md:"10px 0 0 10px"},backgroundColor:"grey.100"},children:(0,n.jsxs)(d.Z,{allowScrollButtonsMobile:!0,variant:t?"scrollable":"standard",orientation:t?"horizontal":"vertical",value:r,children:[(0,n.jsx)(p.Z,{href:"/profil/".concat(null==v?void 0:v.slug,"/editer"),sx:m,icon:(0,n.jsx)(i.Z,{}),iconPosition:"start",label:"Mon profil",value:""}),(0,n.jsx)(p.Z,{href:"/profil/".concat(null==v?void 0:v.slug,"/editer/password"),sx:m,icon:(0,n.jsx)(o.Z,{}),iconPosition:"start",label:"Mot de passe",value:"password"}),(0,n.jsx)(p.Z,{href:"/profil/".concat(null==v?void 0:v.slug,"/editer/email"),sx:m,icon:(0,n.jsx)(s.Z,{}),iconPosition:"start",label:"Adresse email",value:"email"}),(0,n.jsx)(p.Z,{href:"/profil/".concat(null==v?void 0:v.slug,"/editer/notifications"),sx:m,icon:(0,n.jsx)(a.Z,{}),iconPosition:"start",label:"Notifications",value:"notifications"})]})})}},10575:function(e,r,t){"use strict";t.d(r,{Z:function(){return i}});var n=t(85893),s=t(61730),o=t(18745),a=t(60990);function i(e){let{columnProps:r,rowProps:t,...i}=e,l=(0,s.Z)((0,o.Z)().breakpoints.down("md"));return(0,n.jsx)(a.Z,{display:"flex",flexDirection:l?"column":"row",...i,...l?r:t,sx:{...i.sx,...l?null==r?void 0:r.sx:null==t?void 0:t.sx}})}},86580:function(e,r,t){"use strict";t.d(r,{Z:function(){return s}});var n=t(93191);function s(e){return(0,n.bT)(e)}},86216:function(e,r,t){"use strict";t.d(r,{Z:function(){return a}});var n=t(11163),s=t(67294),o=t(93191);function a(){let e=(0,n.useRouter)(),{data:r,isLoading:t}=(0,o.rS)();(0,s.useEffect)(()=>{t||r||e.push("/connexion?to=".concat(encodeURIComponent(e.asPath)))},[r,t])}},43093:function(e,r,t){"use strict";var n=t(64836);r.Z=void 0;var s=n(t(33651)),o=t(85893);r.Z=(0,s.default)((0,o.jsx)("path",{d:"M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2zm-2 0-8 5-8-5zm0 12H4V8l8 5 8-5z"}),"EmailOutlined")},58858:function(e,r,t){"use strict";var n=t(64836);r.Z=void 0;var s=n(t(33651)),o=t(85893);r.Z=(0,s.default)((0,o.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2M9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9zm9 14H6V10h12zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2"}),"LockOutlined")},2803:function(e,r,t){"use strict";var n=t(64836);r.Z=void 0;var s=n(t(33651)),o=t(85893);r.Z=(0,s.default)((0,o.jsx)("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2m6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5z"}),"NotificationsNoneOutlined")},39815:function(e,r,t){"use strict";var n=t(64836);r.Z=void 0;var s=n(t(33651)),o=t(85893);r.Z=(0,s.default)((0,o.jsx)("path",{d:"M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4"}),"PersonOutlineOutlined")},16441:function(e,r,t){"use strict";var n=t(13077),s=t(85893);r.Z=(0,n.Z)((0,s.jsx)("path",{d:"M22 24H2v-4h20zM13.06 5.19l3.75 3.75L7.75 18H4v-3.75zm4.82 2.68-3.75-3.75 1.83-1.83c.39-.39 1.02-.39 1.41 0l2.34 2.34c.39.39.39 1.02 0 1.41z"}),"BorderColor")},4798:function(e,r,t){"use strict";var n=t(13077),s=t(85893);r.Z=(0,n.Z)((0,s.jsx)("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 14H4V8l8 5 8-5zm-8-7L4 6h16z"}),"MailOutline")},55895:function(e,r,t){"use strict";t.d(r,{Z:function(){return w}});var n=t(63366),s=t(87462),o=t(67294),a=t(90512),i=t(94780),l=t(77527),c=t(44001),u=t(13077),d=t(85893),p=(0,u.Z)((0,d.jsx)("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}
1),"Person"),f=t(1588),m=t(34867);function v(e){return(0,m.ZP)("MuiAvatar",e)}(0,f.Z)("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);var h=t(39583);let x=["alt","children","className","component","slots","slotProps","imgProps","sizes","src","srcSet","variant"],Z=e=>{let{classes:r,variant:t,colorDefault:n}=e;return(0,i.Z)({root:["root",t,n&&"colorDefault"],img:["img"],fallback:["fallback"]},v,r)},g=(0,l.ZP)("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,r)=>{let{ownerState:t}=e;return[r.root,r[t.variant],t.colorDefault&&r.colorDefault]}})(e=>{let{theme:r}=e;return{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:r.typography.fontFamily,fontSize:r.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(r.vars||r).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:(0,s.Z)({color:(r.vars||r).palette.background.default},r.vars?{backgroundColor:r.vars.palette.Avatar.defaultBg}:(0,s.Z)({backgroundColor:r.palette.grey[400]},r.applyStyles("dark",{backgroundColor:r.palette.grey[600]})))}]}}),j=(0,l.ZP)("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,r)=>r.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),b=(0,l.ZP)(p,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,r)=>r.fallback})({width:"75%",height:"75%"});var w=o.forwardRef(function(e,r){let t=(0,c.i)({props:e,name:"MuiAvatar"}),{alt:i,children:l,className:u,component:p="div",slots:f={},slotProps:m={},imgProps:v,sizes:w,src:y,srcSet:_,variant:M="circular"}=t,C=(0,n.Z)(t,x),S=null,k=function(e){let{crossOrigin:r,referrerPolicy:t,src:n,srcSet:s}=e,[a,i]=o.useState(!1);return o.useEffect(()=>{if(!n&&!s)return;i(!1);let e=!0,o=new Image;return o.onload=()=>{e&&i("loaded")},o.onerror=()=>{e&&i("error")},o.crossOrigin=r,o.referrerPolicy=t,o.src=n,s&&(o.srcset=s),()=>{e=!1}},[r,t,n,s]),a}((0,s.Z)({},v,{src:y,srcSet:_})),z=y||_,P=z&&"error"!==k,N=(0,s.Z)({},t,{colorDefault:!P,component:p,variant:M}),R=Z(N),[A,D]=(0,h.Z)("img",{className:R.img,elementType:j,externalForwardedProps:{slots:f,slotProps:{img:(0,s.Z)({},v,m.img)}},additionalProps:{alt:i,src:y,srcSet:_,sizes:w},ownerState:N});return S=P?(0,d.jsx)(A,(0,s.Z)({},D)):l||0===l?l:z&&i?i[0]:(0,d.jsx)(b,{ownerState:N,className:R.fallback}),(0,d.jsx)(g,(0,s.Z)({as:p,ownerState:N,className:(0,a.Z)(R.root,u),ref:r},C,{children:S}))})},92037:function(e,r,t){"use strict";t.d(r,{Z:function(){return a}});var n=t(66381),s=t(50568),o=t(7298);function a(e,r){(0,s.Z)(2,arguments);var t=(0,n.Z)(e),a=(0,n.Z)(r),i=(0,o.Z)(t,a),l=Math.abs(function(e,r){(0,s.Z)(2,arguments);var t=(0,n.Z)(e),o=(0,n.Z)(r);return t.getFullYear()-o.getFullYear()}(t,a));t.setFullYear(1584),a.setFullYear(1584);var c=(0,o.Z)(t,a)===-i,u=i*(l-Number(c));return 0===u?0:u}},46072:function(e,r,t){"use strict";t.r(r),t.d(r,{__N_SSP:function(){return S},default:function(){return k}});var n=t(85893),s=t(60990),o=t(84925),a=t(44723),i=t(96788),l=t(56912),c=t(84166),u=t(4336),d=t(85945),p=t(48228),f=t(20512),m=t(9008),v=t.n(m),h=t(67294),x=t(74231),Z=t(93191),g=t(8240),j=t(78556),b=t(25453),w=t(3443),y=t(10575),_=t(86580),M=t(86216),C=t(98923),S=!0;function k(){(0,M.Z)();let{data:e}=(0,Z.rS)(),{data:r}=(0,_.Z)(),[t,m]=(0,h.useState)(!1),[S,k]=(0,h.useState)(""),[z,P]=(0,h.useState)(!1),N=(0,d.NL)(),R=(0,p.D)({mutationFn:async r=>await C.Z.user.changePassword(e,r),onSuccess:()=>{N.invalidateQueries(["me"])}});return r?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(v(),{children:(0,n.jsx)("title",{children:"Editer mon profil - Changer de mot de passe"})}),(0,n.jsx)(w.Z,{user:r}),(0,n.jsx)(g.Z,{slug:r.slug,value:0}),(0,n.jsxs)(y.Z,{sx:{width:"95%",margin:"40px auto",borderRadius:"10px"},children:[(0,n.jsx)(b.Z,{value:"password"}),(0,n.jsx)(s.Z,{sx:{width:{xs:1,md:5/6},borderRadius:{xs:"0 0 10px 10px",md:" 0 10px 10px 0"},backgroundColor:"#FFF"},children:(0,n.jsxs)(s.Z,{sx:{padding:"35px 50px "},children:[(0,n.jsx)(o.Z,{anchorOrigin:{vertical:"top",horizontal:"center"},open:t,autoHideDuration:6e3,onClose:()=>{m(!t),k("")},children:(0,n.jsx)(a.Z,{severity:z?"success":"error",children:S})}),(0,n.jsx)(i.Z,{variant:"h2",children:"Changer de mot de passe"}),(0,n.jsx)(l.Z,{sx:{margin:"25px 0"}}),(0,n.jsx)(f.J9,{onSubmit:async(e,r)=>{let{setSubmitting:n,setStatus:s,setErrors:o,resetForm:a}=r;try{s({success:!0}
1),k("Votre mot de passe \xe0 bien \xe9t\xe9 modifi\xe9."),m(!t),R.mutate(e),a(),P(!0)}catch(e){P(!1),k("Un probl\xe8me est survenu."),m(!t),s({success:!1}),n(!1)}},initialValues:{current_password:"",password:"",password_confirmation:""},validateOnChange:!1,validationSchema:x.Ry({current_password:x.Z_().required().min(8),password:x.Z_().required("Le mot de passe est requis").min(8,"Le mot de passe doit inclure au moins 8 caract\xe8res").matches(/^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*#?&\/\\])[A-Za-z\d@$!%*#?&\/\\]{8,}$/,"Le mot de passe doit contenir au moins un chiffre, une lettre minuscule, une lettre majuscule et un caract\xe8re sp\xe9cial parmi @ $ ! % * # ? & / \\"),password_confirmation:x.Z_().required("La confirmation du mot de passe est requise").min(8,"La confirmation du mot de passe doit inclure au moins 8 caract\xe8res").oneOf([x.iH("password"),null],"La confirmation du mot de passe doit \xeatre identique au mot de passe")}),children:e=>{let{errors:r,handleChange:t}=e;return(0,n.jsxs)(f.l0,{children:[(0,n.jsxs)(c.Z,{gap:2,margin:"25px 0",children:[(0,n.jsx)(j.Z,{name:"current_password",placeholder:"Ancien mot de passe",label:"Ancien mot de passe",error:!!r.current_password,helperText:r.current_password,onChange:t,required:!0,fullWidth:!0}),(0,n.jsx)(j.Z,{name:"password",placeholder:"Nouveau mot de passe",label:"Nouveau mot de passe",error:!!r.password,helperText:r.password,onChange:t,required:!0,fullWidth:!0}),(0,n.jsx)(j.Z,{name:"password_confirmation",placeholder:"Confirmation nouveau mot de passe",label:"Confirmation nouveau mot de passe",error:!!r.password_confirmation,helperText:r.password_confirmation,onChange:t,required:!0,fullWidth:!0})]}),(0,n.jsx)(s.Z,{display:"flex",justifyContent:"center",marginTop:10,children:(0,n.jsx)(u.Z,{type:"submit",variant:"outlined",children:"Soumettre"})})]})}})]})})]})]}):null}}},function(e){e.O(0,[4275,1873,939,4288,4135,2888,9774,179],function(){return e(e.s=74689)}),_N_E=e.O()}]);

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.