1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9753],{79753:function(e,r,t){t.r(r),t.d(r,{default:function(){return Z}});var n=t(2526),o=t(68895),i=t(50195),s=t.n(i),a=t(13979),c=t(45144),l=t(88891),d=t(2256),u=t(81093),p=t(89618),f=t(35669),h=t(15790),y=t(62398),x=t(38313),m=t(41103),v=t(84177),b=t(50100),w=t(29277),j=function(){return(0,w.jsxs)("svg",{width:"96",height:"96",viewBox:"0 0 96 96",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,w.jsx)("path",{d:"M80 88H16C11.582 88 8 84.418 8 80V38.166C8 35.554 9.274 33.11 11.412 31.614L48 6L84.588 31.614C86.726 33.11 88 35.554 88 38.166V80C88 84.418 84.418 88 80 88Z",fill:"#828282"}),(0,w.jsx)("path",{d:"M24 28H72V72H24V28Z",fill:"white"}),(0,w.jsx)("path",{d:"M80 88H16C11.582 88 8 84.418 8 80V40L48 66L88 40V80C88 84.418 84.418 88 80 88Z",fill:"#E0E0E0"}),(0,w.jsx)("path",{d:"M30 38H66V42H30V38ZM30 46H54V50H30V46Z",fill:"#54B2E7"})]})},g=t(4936),O=t(65949);function E(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function P(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?E(Object(t),!0).forEach((function(r){(0,o.Z)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):E(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var k=function(e,r){var t,n=e.elements.namedItem(r);return n&&null!==(t=n.value)&&void 0!==t?t:""},_=function(e){var r=(0,p.Z)().translate,t=(0,O.ZP)().handleError,i=(0,l.useState)(!1),a=i[0],c=i[1],d=(0,l.useState)({}),u=d[0],f=d[1],y=function(e){var t=e.errors.reduce((function(e,t){return P(P({},e),{},(0,o.Z)({},t.field,function(e){if(!e.constraints){var t="Invalid"===e.code?"invalidFieldValue":"somethingGoesWrong";return r(t)}var n=Object.keys(e.constraints);return r("validationError:".concat(n[0]))||r("somethingGoesWrong")}(t)))}),{});f(t)},j=function(){var r=(0,n.Z)(s().mark((function r(n){var o,i,a;return s().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n.preventDefault(),o=n.target,i={email:k(o,"email"),token:e.token,password:k(o,"password"),repeatedPassword:k(o,"repeatedPassword")},c(!0),r.prev=4,r.next=7,h.rQ.post("/account/confirm_reset_password",i);case 7:if(!r.sent.succeeded){r.next=11;break}return e.onSuccessfulReset(),r.abrupt("return");case 11:r.next=20;break;case 13:if(r.prev=13,r.t0=r.catch(4),a=r.t0.body,!(0,h.k0)(a)){r.next=19;break}return y(a),r.abrupt("return");case 19:t(r.t0);case 20:c(!1);case 21:case"end":return r.stop()}}
1),r,null,[[4,13]])})));return function(e){return r.apply(this,arguments)}}();return(0,w.jsxs)("form",{onSubmit:j,children:[(0,w.jsx)(x.eR,{children:r("pleaseCreateNewPasswordForAccount")}),(0,w.jsxs)(m.Z,{children:[(0,w.jsx)(v.Z,{isInvalid:"email"in u,type:"text",name:"email",placeholder:r("email")}),"email"in u&&(0,w.jsx)(g.Bc,{children:u.email})]}),(0,w.jsxs)(m.Z,{children:[(0,w.jsx)(v.Z,{isInvalid:"password"in u,type:"password",name:"password",placeholder:r("password")}),"password"in u&&(0,w.jsx)(g.Bc,{children:u.password})]}),(0,w.jsxs)(m.Z,{children:[(0,w.jsx)(v.Z,{isInvalid:"repeatedPassword"in u,type:"password",name:"repeatedPassword",placeholder:r("passwordOneMoreTime")}),"repeatedPassword"in u&&(0,w.jsx)(g.Bc,{children:u.repeatedPassword})]}),(0,w.jsx)(x.B9,{children:(0,w.jsx)(m.Z,{children:(0,w.jsx)(b.Z,{type:"submit",disabled:a,shouldFitContainer:!0,children:r("changePassword")})})})]})};function I(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function R(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?I(Object(t),!0).forEach((function(r){(0,o.Z)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):I(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var Z=function(){var e,r,t=(0,p.Z)().translate,o=(0,c.useRouter)(),i=o.query.token&&o.query.token.length>0?o.query.token:null,g=(0,u.Z)().state,O=(0,l.useState)({email:null!==(e=null===(r=g.user)||void 0===r?void 0:r.email)&&void 0!==e?e:"",token:i,state:i?"restorePassword":"enterEmail",error:void 0}),E=O[0],P=O[1],k=function(){P(R(R({},E),{},{state:"emailSent",error:void 0}))},I=function(){var e=(0,n.Z)(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(P(R(R({},E),{},{error:f.HN.test(E.email)?void 0:t("incorrectEmail")})),f.HN.test(E.email)){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,P(R(R({},E),{},{error:void 0})),e.next=6,h.rQ.post("/account/reset_password",{email:E.email,locale:o.locale});case 6:k(),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),P(R(R({},E),{},{error:t("somethingGoesWrong")}));case 12:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),Z=function(e){"Enter"===e.key&&k()};return(0,l.useEffect)((function(){window.addEventListener("keydown",Z)}),[]),(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(d.default,{children:(0,w.jsx)("title",{children:t("passwordReset")})}),(0,w.jsxs)(y.Z,{small:!0,children:[(0,w.jsx)(x.XK,{children:t("passwordReset")}),E.error&&(0,w.jsx)(m.Z,{children:(0,w.jsx)(x.Es,{children:E.error})}),"enterEmail"===E.state&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(x.eR,{children:t("enterEmailAddressForRegisteredAccount")}),(0,w.jsx)(m.Z,{children:(0,w.jsx)(v.Z,{onKeyPress:function(e){"Enter"===e.key&&k()},onChange:function(e){P(R(R({},E),{},{email:e.currentTarget.value}))},name:"email",value:E.email,placeholder:t("email"),isInvalid:!!E.error,autoFocus:!0})}),(0,w.jsx)(m.Z,{children:(0,w.jsx)(b.Z,{onClick:I,shouldFitContainer:!0,children:t("resetThePassword")})})]}),"emailSent"===E.state&&(0,w.jsx)(w.Fragment,{children:(0,w.jsxs)(x.fK,{children:[(0,w.jsx)(j,{}),(0,w.jsxs)("p",{children:[t("weWillSendLinkForResetOn"),(0,w.jsx)("br",{}),(0,w.jsx)("b",{children:E.email})]})]})}),"restorePassword"===E.state&&(0,w.jsx)(_,{onSuccessfulReset:function(){return P((function(e){return R(R({},e),{},{state:"successfully-reset"})}))},token:E.token}),"successfully-reset"===E.state&&(0,w.jsx)(w.Fragment,{children:(0,w.jsxs)(x.eR,{children:[t("successfulResetPassword"),(0,w.jsx)("br",{}),(0,w.jsx)(a.default,{href:"/login",as:"/login",passHref:!0,children:(0,w.jsx)("a",{children:t("pleaseLogin")})})]})})]})]})}},42409:function(e,r,t){t.r(r),t.d(r,{ToastContext:function(){return k},default:function(){return _}});var n=t(68895),o=t(9347),i=t(88891),s=t(961),a=t(15331),c=(0,s.keyframes)(["from{opacity:0;transform:translateX(50%);}to{opacity:1;transform:none;}"]),l=(0,s.keyframes)(["from{opacity:1;transform:none;}to{opacity:0;transform:translateX(50%);}"]),d=(0,s.keyframes)(["12.5%{clip-path:polygon(50% 0%,100% 0,100% 100%,0 100%,0 100%,0 0,0 0,50% 50%,50% 50%);}25%{clip-path:polygon(50% 0%,100% 0,100% 100%,0 100%,0 100%,0 50%,0 50%,50% 50%,50% 50%);}37.5%{clip-path:polygon(50% 0%,100% 0,100% 100%,0 100%,0 100%,0 100%,0 100%,50% 50%,50% 50%);}50%{clip-path:polygon(50% 0%,100% 0,100% 100%,50% 100%,50% 100%,50% 100%,50% 100%,50% 50%,50% 50%);}62.5%{clip-path:polygon(50% 0%,100% 0,100% 100%,100% 100%,100% 100%,100% 100%,100% 100%,50% 50%,50% 50%);}
175%{clip-path:polygon(50% 0%,100% 0,100% 50%,100% 50%,100% 50%,100% 50%,100% 50%,50% 50%,50% 50%);}87.5%{clip-path:polygon(50% 0%,100% 0,100% 0,100% 0,100% 0,100% 0,100% 0,50% 50%,50% 50%);}100%{clip-path:polygon(50% 0%,50% 0,50% 0,50% 0,50% 0,50% 0,50% 0,50% 50%,50% 50%);}"]),u=s.default.div.withConfig({displayName:"styled__ToastHeader",componentId:"sc-1n5aq9k-0"})(["font-weight:500;font-size:14px;line-height:24px;padding:16px 16px 0 16px;"]),p=s.default.div.withConfig({displayName:"styled__ToastWrapper",componentId:"sc-1n5aq9k-1"})(["position:relative;background-color:",";border-radius:8px;overflow:hidden;animation:400ms "," linear forwards;box-shadow:0px 0px 16px rgba(0,0,0,0.1);","{color:",";}&.close{animation:400ms "," linear forwards;}&:not(:last-child){margin-bottom:12px;}"],a.ZP.backgrounds.lighter,(function(e){return e.close?l:c}),u,(function(e){return a.ZP.colors[e.status]}),l),f=s.default.div.withConfig({displayName:"styled__ToastMessage",componentId:"sc-1n5aq9k-2"})(["padding:4px 16px 16px 16px;font-size:13px;line-height:16px;"]),h=s.default.div.withConfig({displayName:"styled__ToastRoot",componentId:"sc-1n5aq9k-3"})(["position:fixed;bottom:16px;right:16px;width:320px;z-index:5000;","{width:calc(100% - 32px);}"],a.ZP.medias.mobileMedia),y=s.default.div.withConfig({displayName:"styled__ToastCloseWrapper",componentId:"sc-1n5aq9k-4"})(["width:24px;height:24px;position:absolute;right:16px;top:16px;"]),x=s.default.div.withConfig({displayName:"styled__ToastClose",componentId:"sc-1n5aq9k-5"})(["width:",";height:",";position:absolute;right:",";top:",";display:flex;align-items:center;justify-content:center;cursor:pointer;border-radius:24px;border:",";z-index:4;svg{width:16px;height:16px;}"],(function(e){return e.fullSize?"18px":"24px"}),(function(e){return e.fullSize?"18px":"24px"}),(function(e){return e.fullSize?"3px":"0"}),(function(e){return e.fullSize?"3px":"0"}),(function(e){return e.fullSize?"none":"1px solid ".concat(a.ZP.borderColor.default)})),m=s.default.div.withConfig({displayName:"styled__ToastCircle",componentId:"sc-1n5aq9k-6"})(["width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;position:relative;"]),v=s.default.div.withConfig({displayName:"styled__ToastOuter",componentId:"sc-1n5aq9k-7"})(["width:24px;height:24px;position:absolute;top:0;left:0;border-radius:50%;background-color:#E79708;clip-path:polygon(50% 0%,100% 0,100% 100%,0 100%,0 100%,0 0,50% 0,50% 50%,50% 50%);animation:"," ","ms linear forwards;z-index:2;"],d,(function(e){return e.timeout})),b=s.default.div.withConfig({displayName:"styled__ToastInner",componentId:"sc-1n5aq9k-8"})(["width:18px;height:18px;position:absolute;top:3px;left:3px;border-radius:50%;&:before{content:'';width:24px;height:24px;position:absolute;top:-3px;left:-3px;background-color:",";border-radius:50%;z-index:0;}&:after{content:'';width:18px;height:18px;position:absolute;top:0;left:0;background-color:",";border-radius:50%;z-index:3;}"],a.ZP.borderColor.second,a.ZP.colors.white),w=t(98748),j=t(92282),g=t(29277),O=function(e){var r,t,n=e.message,o=e.header,s=e.type,a=e.id,c=e.timeout,l=void 0===c?1e4:c,d=e.withCloseButton,h=void 0===d||d,O=e.withToastCircle,E=void 0===O||O,P=(0,w.Z)(),k=(0,i.useState)(!1),_=k[0],I=k[1];(0,i.useEffect)((function(){return clearTimeout(r),clearTimeout(t),t=window.setTimeout((function(){I(!0)}),l-400),r=window.setTimeout((function(){P.remove(a)}),l),function(){clearTimeout(r),clearTimeout(t)}}),[a]);return(0,g.jsxs)(p,{id:a,status:s,close:_,children:[o&&(0,g.jsx)(u,{children:o}),h&&(0,g.jsxs)(y,{children:[(0,g.jsx)(x,{onClick:function(){I(!0),setTimeout((function(){P.remove(a)}),400)},fullSize:E,children:(0,g.jsx)(j.Z,{})}),E&&(0,g.jsxs)(m,{children:[(0,g.jsx)(v,{timeout:l-400}),(0,g.jsx)(b,{})]})]}),n&&(0,g.jsx)(f,{children:n})]})};function E(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}var P=function(e,r){switch(r.type){case"add-toast":return[].concat((0,o.Z)(e),[r.toast]);case"remove-toast":return(0,o.Z)(e.filter((function(e){return e.id!==r.toastId})));default:return e}},k=i.createContext({state:[],dispatch:{}}),_=function(e){var r=e.children,t=(0,i.useReducer)(P,[]),o=t[0],s=t[1];return(0,g.jsxs)(k.Provider,{value:{state:o,dispatch:s},children:[r,(0,g.jsx)(h,{children:o.map((function(e){return(0,g.jsx)(O,function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};
1r%2?E(Object(t),!0).forEach((function(r){(0,n.Z)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):E(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}({},e),e.id)}))})]})}},92282:function(e,r,t){t(88891);var n=t(29277);r.Z=function(){return(0,n.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:[(0,n.jsx)("path",{d:"M6 6L18 18",stroke:"currentColor",strokeWidth:"2"}),(0,n.jsx)("path",{d:"M6 18L18 6",stroke:"currentColor",strokeWidth:"2"})]})}},65949:function(e,r,t){t.d(r,{Zk:function(){return w}});var n=t(2526),o=t(68895),i=t(50195),s=t.n(i),a=t(88891),c=t(98748),l=t(89618);function d(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}var u="INVALID_EMAIL",p="ALREADY_EXISTS_LINK_LOCALE",f="ALREADY_HAS_EDIT_PERMISSION",h="MULTILINGUAL_RELATION_FORBIDDEN",y="IS_ALREADY_RELATED_ERROR",x="OBJECT_RELATION_ERROR",m="IS_SELF_RELATION_ATTEMPT_ERROR",v="INVALID_RELATION_ERROR",b="NOT_RELATED_ERROR",w={IMAGE_UPLOAD_FAILED:"IMAGE_UPLOAD_FAILED",INVALID_PASSWORD:"INVALID_PASSWORD"},j=[{code:"ALREADY_EXISTS_EMAIL",key:"emailAlreadyExist"},{code:"INVALID_PASSWORD",key:"wrongPassword"},{code:w.INVALID_PASSWORD,key:"wrongPassword"},{code:u,key:"wrongPassword"},{code:p,key:"alreadyExistsLinkLocale"},{code:w.IMAGE_UPLOAD_FAILED,key:"imageUploadFailedError"},{code:f,key:"alreadyHasEditPermissionError"},{code:v,key:"invalidRelationError"},{code:h,key:"multilingualRelationError"},{code:y,key:"isAlreadyRelatedError"},{code:x,key:"objectRelationError"},{code:m,key:"selfRelationAttemptError"},{code:b,key:"notRelatedError"},{code:"unknownError",key:"unknownError"}];r.ZP=function(){var e=(0,a.useState)(null),r=e[0],t=e[1],i=(0,c.Z)(),u=(0,l.Z)().translate,p=function(e,r){var t=j.find((function(r){return r.code===e}));return u((null===t||void 0===t?void 0:t.key)||"unknownError",function(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?d(Object(t),!0).forEach((function(r){(0,o.Z)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):d(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}({},(null===r||void 0===r?void 0:r.values)&&{values:r.values}))},f=function(e,r){var n,o,s,a=(null===e||void 0===e?void 0:e.errorCode)||(null===e||void 0===e||null===(n=e.body)||void 0===n?void 0:n.errorCode)||(null===e||void 0===e||null===(o=e.body)||void 0===o?void 0:o.errors[0].errorCode),c=(null===e||void 0===e?void 0:e.errors)||(null===e||void 0===e||null===(s=e.body)||void 0===s?void 0:s.errors);if(a)return i.add({header:u("error"),message:p(a,r),type:"danger"}),void t(c);c||i.add({header:u("error"),message:p(),type:"danger"})};return{errors:r,handleError:f,resetErrors:function(){t(null)},decorateApi:function(e){return(0,n.Z)(s().mark((function r(){var t,n,o,i,a=arguments;return s().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e.apply(void 0,a);case 2:return t=r.sent,n=t.result,o=t.error,i=t.success,o&&f(o),r.abrupt("return",{result:n,error:o,success:i});case 8:case"end":return r.stop()}}),r)})))}}}},98748:function(e,r,t){var n=t(68895),o=t(88891),i=t(81585),s=t(42409);function a(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function c(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?a(Object(t),!0).forEach((function(r){(0,n.Z)(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}r.Z=function(){var e=(0,o.useContext)(s.ToastContext).dispatch;return{add:function(r){return e({type:"add-toast",toast:c(c({},r),{},{id:(0,i.Z)()})})},remove:function(r){return e({type:"remove-toast",toastId:r})}}}}}]);
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.