https://www.switzerland-sothebysrealty.ch/_next/static/chunks/page…/mot-de-passe-7b0ab9e6eb377947.js
1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6329],{7490:(e,r,t)=>{"use strict";t.d(r,{v:()=>n});var s=t(48901);function n(e,r,t){let n=+(0,s.a)(e,null==t?void 0:t.in),[a,l]=[+(0,s.a)(r.start,null==t?void 0:t.in),+(0,s.a)(r.end,null==t?void 0:t.in)].sort((e,r)=>e-r);return n>=a&&n<=l}},17063:(e,r,t)=>{"use strict";t.d(r,{A:()=>m});var s=t(37876),n=t(14232),a=t(69241),l=t(48230),o=t.n(l),i=t(14e3),c=t(91592),d=t(83776),u=t(48220),p=t(41407);let m=()=>{var e,r;let[t,l]=(0,n.useState)(!1),{t:m}=(0,u.gN)("client_space_menu"),f=(0,i.usePathname)(),h=(e=>{let r=new Set;return e.filter(e=>!r.has(e.label)&&(r.add(e.label),!0))})(m("menu",{returnObjects:!0}));return(0,s.jsxs)("div",{className:"relative text-blue-700",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between h-6 pl-2 pr-3 bg-gray-100 border-t border-b border-gray-200 lg:hidden",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)(d.A,{className:"mb-0.5 text-[20px]",name:null==(e=h.find(e=>e.href===f))?void 0:e.icon}),(0,s.jsx)("div",{className:"font-medium no-underline max-lg:text-lg",children:null==(r=h.find(e=>e.href===f))?void 0:r.label})]}),(0,s.jsx)("button",{type:"button",className:"flex items-center justify-center cursor-pointer size-3",onClick:()=>l(!t),children:(0,s.jsx)(d.A,{className:"text-h2",name:"burger"})})]}),(0,s.jsxs)("div",{className:(0,a.A)(t?"block":"hidden","max-lg:absolute top-0 left-0 w-full h-screen z-100 bg-gray-100 border-t border-gray-200 lg:flex justify-between lg:h-6 xxl:px-5 items-center lg:border-b"),children:[(0,s.jsx)("button",{type:"button",className:"absolute cursor-pointer top-3 right-3 lg:hidden",onClick:()=>l(!1),children:(0,s.jsx)(d.A,{className:"text-lg",name:"close"})}),(0,s.jsx)("nav",{children:(0,s.jsx)("ul",{className:"flex flex-col pl-2 pr-3 list-none max-lg:py-3 gap-3 lg:flex-row lg:gap-4",children:h.map((e,r)=>{let t=f===e.href;return(0,s.jsx)("li",{className:(0,a.A)(t?"text-han-blue-700":"text-blue-700","max-lg:text-lg font-medium lg:relative"),children:(0,s.jsxs)(o(),{className:(0,a.A)("flex items-center no-underline gap-1 h-full",t&&'lg:after:absolute lg:after:content-[""] lg:after:w-full lg:after:h-[1px] lg:after:bg-blue-700 lg:after:bottom-[-16px] lg:after:left-0'),href:e.href,children:[(0,s.jsx)(d.A,{className:"mb-0.5 text-[20px]",name:e.icon}),e.label]})},r)})})}),(0,s.jsx)("button",{className:(0,a.A)(p.x6.secondary,"font-medium lg:text-sm px-2 py-[6px] max-xxl:mx-2"),onClick:()=>(0,c.CI)(),children:m("logout")})]})]})}},47082:(e,r,t)=>{"use strict";t.d(r,{A:()=>u});var s=t(54978),n=t(35968),a=t(94229),l=t(55167),o=t(19756),i=function(){function e(e,r){this.xf=r,this.f=e}return e.prototype["@@transducer/init"]=o.A.init,e.prototype["@@transducer/result"]=o.A.result,e.prototype["@@transducer/step"]=function(e,r){return this.xf["@@transducer/step"](e,this.f(r))},e}(),c=t(91417),d=t(3508);let u=(0,n.A)((0,a.A)(["fantasy-land/map","map"],function(e){return function(r){return new i(e,r)}},function(e,r){switch(Object.prototype.toString.call(r)){case"[object Function]":return(0,c.A)(r.length,function(){return e.call(this,r.apply(this,arguments))});case"[object Object]":return(0,s.A)(function(t,s){return t[s]=e(r[s]),t},{},(0,d.A)(r));default:return(0,l.A)(e,r)}}))},50599:(e,r,t)=>{"use strict";t.d(r,{A:()=>s.A});var s=t(17063)},51060:(e,r,t)=>{"use strict";t.d(r,{x:()=>a});var s=t(47185),n=t(48901);function a(e,r){var t,a;let l=(0,n.a)(e,null==r?void 0:r.in);if(isNaN(+l))throw RangeError("Invalid time value");let o=null!=(t=null==r?void 0:r.format)?t:"extended",i=null!=(a=null==r?void 0:r.representation)?a:"complete",c="",d="",u="extended"===o?"-":"";if("time"!==i){let e=(0,s.F)(l.getDate(),2),r=(0,s.F)(l.getMonth()+1,2),t=(0,s.F)(l.getFullYear(),4);c="".concat(t).concat(u).concat(r).concat(u).concat(e)}if("date"!==i){let e=l.getTimezoneOffset();if(0!==e){let r=Math.abs(e),t=(0,s.F)(Math.trunc(r/60),2),n=(0,s.F)(r%60,2);d="".concat(e<0?"+":"-").concat(t,":").concat(n)}else d="Z";let r=(0,s.F)(l.getHours(),2),t=(0,s.F)(l.getMinutes(),2),n=(0,s.F)(l.getSeconds(),2),a=""===c?"":"T",i=[r,t,n].join("extended"===o?":":"");
1c="".concat(c).concat(a).concat(i).concat(d)}return c}},58473:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>h});var s=t(37876),n=t(14232),a=t(88992),l=t(69241),o=t(91592),i=t(59688),c=t(59230),d=t(48220),u=t(82740),p=t(79610),m=t(80312),f=t(41407);let h=()=>{let{t:e}=(0,d.gN)("password_management"),{register:r,handleSubmit:t,watch:h,reset:g,formState:{errors:x}}=(0,a.mN)(),{data:b}=(0,o.wV)(),[w,j]=(0,n.useState)(!1),v=h("new_password"),y=async r=>{j(!0);try{var t;let s=await (0,m.A)("/users/me/password",{method:"PUT",token:null==b||null==(t=b.user)?void 0:t.token,body:JSON.stringify({currentPassword:r.old_password,newPassword:r.new_password})});if(s.ok)i.oR.success(e("toast.success")),g();else{let r=await s.json();"Current password invalid"===r.error?i.oR.error(e("toast.current_password_invalid")):"Password recently changed, action forbidden"===r.error?i.oR.error(e("toast.password_recently_changed")):i.oR.error(r.error||e("toast.error"))}}catch(r){i.oR.error(e("toast.error"))}finally{j(!1)}};return(0,s.jsx)(u.A,{children:(0,s.jsxs)(p.A,{children:[(0,s.jsx)("h2",{className:"mb-4 font-medium text-h2",children:e("title")}),(0,s.jsxs)("form",{onSubmit:t(y),children:[(0,s.jsxs)("div",{className:"flex flex-col gap-4 max-w-[560px]",children:[(0,s.jsx)(c.GG,{type:"password",name:"old_password",label:e("old_password"),placeholder:e("input_placeholder"),register:r,registerOptions:{required:e("errors.old_password_required")},error:x.old_password}),(0,s.jsx)(c.GG,{type:"password",name:"new_password",label:e("new_password"),placeholder:e("input_placeholder"),register:r,registerOptions:{required:e("errors.new_password_required"),minLength:{value:8,message:e("errors.password_length")}},error:x.new_password}),(0,s.jsx)(c.GG,{type:"password",name:"confirm_password",label:e("confirm_password"),placeholder:e("input_placeholder"),register:r,registerOptions:{required:e("errors.confirm_password_required"),validate:r=>r===v||e("errors.passwords_dont_match")},error:x.confirm_password})]}),(0,s.jsx)("button",{type:"submit",disabled:w,className:(0,l.A)("mt-4",f.x6.primary,w&&"opacity-50 cursor-not-allowed "),children:w?e("loading"):e("submit")})]})]})})}},67629:(e,r,t)=>{"use strict";t.d(r,{A:()=>s});let s=(0,t(24749).A)(function(e){return e})},76546:(e,r,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/espace-client/mot-de-passe",function(){return t(58473)}])},79610:(e,r,t)=>{"use strict";t.d(r,{A:()=>u});var s=t(37876);t(14232);var n=t(50599),a=t(69241),l=t(48230),o=t.n(l),i=t(14e3),c=t(48220);let d=e=>{let{children:r}=e,{t}=(0,c.gN)("templates.profil_layout"),n=(0,i.usePathname)();return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("main",{className:"container",children:[(0,s.jsx)("h1",{className:"pb-4 mt-5 mb-4 font-medium border-b border-gray-200 lg:pb-5 lg:mt-7 lg:mb-5",children:t("title")}),(0,s.jsxs)("div",{className:"lg:grid grid-cols-4 gap-4 lg:mb-7",children:[(0,s.jsx)("nav",{className:"lg:col-span-1",children:(0,s.jsx)("ul",{className:"flex flex-col pb-4 border-b border-gray-200 gap-1 lg:border-b-0 lg:pb-0",children:t("menu",{returnObjects:!0}).map((e,r)=>(0,s.jsx)("li",{className:"list-none",children:(0,s.jsx)(o(),{className:(0,a.A)(" no-underline hover:text-blue-700 max-lg:text-lg",n===e.href?"font-medium text-blue-700":"font-normal text-gray-500"),href:e.href,children:e.label})},r))})}),(0,s.jsx)("div",{className:"mt-4 mb-5 lg:col-span-3 lg:m-0",children:r})]})]})})},u=e=>{let{children:r}=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.A,{}),(0,s.jsx)(d,{children:r})]})}},80289:(e,r,t)=>{"use strict";t.d(r,{A:()=>l});var s=t(35968);let n=Number.isInteger||function(e){return(0|e)===e};var a=t(14819);let l=(0,s.A)(function(e,r){if(null!=r)return n(e)?(0,a.A)(e,r):r[e]})},80312:(e,r,t)=>{"use strict";t.d(r,{A:()=>a});var s=t(41176),n=t(30360);let a=async function(e){let{method:r="GET",token:t,body:a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l="https://client-space.swsir-tech.ch";if(!l||""===l.trim())return console.warn("[MyCardis API] API URL not configured, skipping request to:",e),new Response(JSON.stringify({success:!0,message:"Skipped in dev mode"}),{status:200,headers:{"Content-Type":"application/json"}});try{return await fetch("".concat(l).concat(e),{method:r,headers:{"Content-Type":"application/json",Authorization:(0,s.A)(t)?"Bearer ".concat(t):(0,n.eJ)()},body:a})}catch(r){return console.error("[MyCardis API] Fetch failed for:",e,r),new Response(JSON.stringify({success:!1,error:"API not available in dev mode"}),{status:503,headers:{"Content-Type":"application/json"}})}}},83153:(e,r,t)=>{"use strict";t.d(r,{A:()=>s});let s=(0,t(35968).A)(function(e,r){return Array.prototype.slice.call(r,0).sort(function(r,t){var s=e(r),n=e(t);return s<n?-1:+(s>n)})})}},e=>{e.O(0,[6701,1215,6934,1052,4e3,8992,8275,8487,4188,2740,636,6593,8792],()=>e(e.s=76546)),_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.