You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__User__ResetPassword.4163...

2 lines
30 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[230],{LsG1:function(oe,J,m){"use strict";m.r(J);var F=m("9og8"),T=m("q1tI"),E=m.n(T),re=m("+L6B"),K=m("2/Rp"),ee=m("5NDa"),G=m("5rEg"),he=m("y8nQ"),H=m("Vl3Y"),Z=m("tJVT"),q=m("k1fw"),Te=m("tJYU"),pe=m("4i/N"),me=m("bRQS"),ce=m("VTBJ"),ve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"},ge=ve,ye=m("6VBw"),le=function(L,v){return T.createElement(ye.a,Object(ce.a)(Object(ce.a)({},L),{},{ref:v,icon:ge}))};le.displayName="DoubleRightOutlined";var Ee=T.forwardRef(le),ae=m("1vsH");function ie(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ie=function(){return s};var s={},L=Object.prototype,v=L.hasOwnProperty,U=typeof Symbol=="function"?Symbol:{},b=U.iterator||"@@iterator",V=U.asyncIterator||"@@asyncIterator",S=U.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(r,n,o){return r[n]=o}}function B(t,e,r,n){var o=e&&e.prototype instanceof N?e:N,a=Object.create(o.prototype),u=new I(n||[]);return a._invoke=function(d,h,i){var c="suspendedStart";return function(p,$){if(c==="executing")throw new Error("Generator is already running");if(c==="completed"){if(p==="throw")throw $;return X()}for(i.method=p,i.arg=$;;){var Y=i.delegate;if(Y){var z=M(Y,i);if(z){if(z===f)continue;return z}}if(i.method==="next")i.sent=i._sent=i.arg;else if(i.method==="throw"){if(c==="suspendedStart")throw c="completed",i.arg;i.dispatchException(i.arg)}else i.method==="return"&&i.abrupt("return",i.arg);c="executing";var O=g(d,h,i);if(O.type==="normal"){if(c=i.done?"completed":"suspendedYield",O.arg===f)continue;return{value:O.arg,done:i.done}}O.type==="throw"&&(c="completed",i.method="throw",i.arg=O.arg)}}}(t,r,u),a}function g(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(n){return{type:"throw",arg:n}}}s.wrap=B;var f={};function N(){}function j(){}function y(){}var _={};l(_,b,function(){return this});var C=Object.getPrototypeOf,R=C&&C(C(k([])));R&&R!==L&&v.call(R,b)&&(_=R);var w=y.prototype=N.prototype=Object.create(_);function P(t){["next","throw","return"].forEach(function(e){l(t,e,function(r){return this._invoke(e,r)})})}function D(t,e){function r(o,a,u,d){var h=g(t[o],t,a);if(h.type!=="throw"){var i=h.arg,c=i.value;return c&&typeof c=="object"&&v.call(c,"__await")?e.resolve(c.__await).then(function(p){r("next",p,u,d)},function(p){r("throw",p,u,d)}):e.resolve(c).then(function(p){i.value=p,u(i)},function(p){return r("throw",p,u,d)})}d(h.arg)}var n;this._invoke=function(o,a){function u(){return new e(function(d,h){r(o,a,d,h)})}return n=n?n.then(u,u):u()}}function M(t,e){var r=t.iterator[e.method];if(r===void 0){if(e.delegate=null,e.method==="throw"){if(t.iterator.return&&(e.method="return",e.arg=void 0,M(t,e),e.method==="throw"))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=g(r,t.iterator,e.arg);if(n.type==="throw")return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,e.method!=="return"&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function W(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(W,this),this.reset(!0)}function k(t){if(t){var e=t[b];if(e)return e.call(t);if(typeof t.next=="function")return t;if(!isNaN(t.length)){var r=-1,n=function o(){for(;++r<t.length;)if(v.call(t,r))return o.value=t[r],o.done=!1,o;return o.value=void 0,o.done=!0,o};return n.next=n}}return{next:X}}function X(){return{value:void 0,done:!0}}return j.prototype=y,l(w,"constructor",y),l(y,"constructor",j),j.displayName=l(y,S,"GeneratorFunction"),s.isGeneratorFunction=function(t){var e=typeof t=="function"&&t.constructor;return!!e&&(e===j||(e.displayName||e.name)==="GeneratorFunction")},s.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,l(t,S,"GeneratorFunction")),t.prototype=Object.create(w),t},s.awrap=function(t){return{__await:t}},P(D.prototype),l(D.prototype,V,function(){return this}),s.AsyncIterator=D,s.async=function(t,e,r,n,o){o===void 0&&(o=Promise);var a=new D(B(t,e,r,n),o);return s.isGeneratorFunction(e)?a:a.next().then(function(u){return u.done?u.value:a.next()})},P(w),l(w,S,"Generator"),l(w,b,function(){return this}),l(w,"toString",function(){return"[object Generator]"}),s.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function n(){for(;e.length;){var o=e.pop();if(o in t)return n.value=o,n.done=!1,n}return n.done=!0,n}},s.values=k,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!e)for(var r in this)r.charAt(0)==="t"&&v.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type==="throw")throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(i,c){return u.type="throw",u.arg=e,r.next=i,c&&(r.method="next",r.arg=void 0),!!c}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if(a.tryLoc==="root")return n("end");if(a.tryLoc<=this.prev){var d=v.call(a,"catchLoc"),h=v.call(a,"finallyLoc");if(d&&h){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(d){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,r){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&v.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&(e==="break"||e==="continue")&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var u=a?a.completion:{};return u.type=e,u.arg=r,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(u)},complete:function(e,r){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&r&&(this.next=r),f},finish:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),f}},catch:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===e){var o=n.completion;if(o.type==="throw"){var a=o.arg;A(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:k(e),resultName:r,nextLoc:n},this.method==="next"&&(this.arg=void 0),f}},s}var we={moveX:0,verify:0},Q;(function(s){s[s.SET_MOVEX=0]="SET_MOVEX",s[s.VERIFY=1]="VERIFY"})(Q||(Q={}));function Le(s,L){switch(L.type){case Q.SET_MOVEX:return Object(q.a)(Object(q.a)({},s),{},{moveX:L.payload});case Q.VERIFY:return Object(q.a)(Object(q.a)({},s),L.payload);default:throw new Error}}var Oe=function(s){var L=s.value,v=s.onChange,U=s.onValidate,b=Object(T.useReducer)(Le,we),V=Object(Z.a)(b,2),S=V[0],l=V[1],B=S.moveX,g=S.verify,f=Object(T.useRef)(),N=Object(T.useRef)(),j=Object(T.useRef)(),y=Object(T.useRef)(),_=Object(T.useMemo)(function(){if(N.current)return N.current.getBoundingClientRect()},[N.current]);Object(T.useEffect)(function(){if(_){var R=function(){var I=Object(F.a)(ie().mark(function k(X){var t;return ie().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(!y.current){r.next=15;break}if(t=X.pageX-M,A&&(t=X.changedTouches[0].pageX-M),t<0&&(t=0),!(t>=W)){r.next=14;break}return y.current=!1,t=W,r.next=9,U();case 9:P=r.sent,l({type:Q.VERIFY,payload:{moveX:t,verify:P}}),v(P),r.next=15;break;case 14:l({type:Q.SET_MOVEX,payload:t});case 15:case"end":return r.stop()}},k)}));return function(X){return I.apply(this,arguments)}}(),w=function(){y.current=!1,P===0&&(f.current.style.transition="left .5s ease",j.current.style.transition="width .5s ease",l({type:Q.VERIFY,payload:{moveX:0}}))},P=0,D=_.width,M=_.left,W=D-48,A=!Object(ae.E)();return A?(window.addEventListener("touchmove",R),window.addEventListener("touchend",w)):(window.addEventListener("mousemove",R),window.addEventListener("mouseup",w)),function(){A?(window.removeEventListener("touchmove",R),window.removeEventListener("touchend",w)):(window.removeEventListener("mousemove",R),window.removeEventListener("mouseup",w))}}},[_,ae.E]),Object(T.useEffect)(function(){l({type:Q.VERIFY,payload:{verify:L,moveX:L?(_==null?void 0:_.width)-48:0}})},[L]);function C(){g||(y.current=!0,f.current.style.transition="",j.current.style.transition="")}return E.a.createElement("div",{ref:N,className:"unlock-wrapper"},E.a.createElement("div",{ref:j,className:g===1?"unlock-error-bg":"unlock-bg",style:{width:B}}),E.a.createElement("div",{className:"unlock-text"},g?g===1?"\u9A8C\u8BC1\u5931\u8D25":"\u9A8C\u8BC1\u901A\u8FC7":"\u62D6\u52A8\u6ED1\u5757\u81F3\u53F3\u4FA7\u9A8C\u8BC1"),E.a.createElement("div",{ref:f,onTouchStart:C,onMouseDown:C,style:{left:B},className:"unlock-handler"},g?g===1?E.a.createElement(pe.a,null):E.a.createElement(me.a,null):E.a.createElement(Ee,null)))},be=m("Ty5D"),de=m("9kvl"),_e=m("55Ip");function x(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */x=function(){return s};var s={},L=Object.prototype,v=L.hasOwnProperty,U=typeof Symbol=="function"?Symbol:{},b=U.iterator||"@@iterator",V=U.asyncIterator||"@@asyncIterator",S=U.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(r,n,o){return r[n]=o}}function B(t,e,r,n){var o=e&&e.prototype instanceof N?e:N,a=Object.create(o.prototype),u=new I(n||[]);return a._invoke=function(d,h,i){var c="suspendedStart";return function(p,$){if(c==="executing")throw new Error("Generator is already running");if(c==="completed"){if(p==="throw")throw $;return X()}for(i.method=p,i.arg=$;;){var Y=i.delegate;if(Y){var z=M(Y,i);if(z){if(z===f)continue;return z}}if(i.method==="next")i.sent=i._sent=i.arg;else if(i.method==="throw"){if(c==="suspendedStart")throw c="completed",i.arg;i.dispatchException(i.arg)}else i.method==="return"&&i.abrupt("return",i.arg);c="executing";var O=g(d,h,i);if(O.type==="normal"){if(c=i.done?"completed":"suspendedYield",O.arg===f)continue;return{value:O.arg,done:i.done}}O.type==="throw"&&(c="completed",i.method="throw",i.arg=O.arg)}}}(t,r,u),a}function g(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(n){return{type:"throw",arg:n}}}s.wrap=B;var f={};function N(){}function j(){}function y(){}var _={};l(_,b,function(){return this});var C=Object.getPrototypeOf,R=C&&C(C(k([])));R&&R!==L&&v.call(R,b)&&(_=R);var w=y.prototype=N.prototype=Object.create(_);function P(t){["next","throw","return"].forEach(function(e){l(t,e,function(r){return this._invoke(e,r)})})}function D(t,e){function r(o,a,u,d){var h=g(t[o],t,a);if(h.type!=="throw"){var i=h.arg,c=i.value;return c&&typeof c=="object"&&v.call(c,"__await")?e.resolve(c.__await).then(function(p){r("next",p,u,d)},function(p){r("throw",p,u,d)}):e.resolve(c).then(function(p){i.value=p,u(i)},function(p){return r("throw",p,u,d)})}d(h.arg)}var n;this._invoke=function(o,a){function u(){return new e(function(d,h){r(o,a,d,h)})}return n=n?n.then(u,u):u()}}function M(t,e){var r=t.iterator[e.method];if(r===void 0){if(e.delegate=null,e.method==="throw"){if(t.iterator.return&&(e.method="return",e.arg=void 0,M(t,e),e.method==="throw"))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=g(r,t.iterator,e.arg);if(n.type==="throw")return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,e.method!=="return"&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function W(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(W,this),this.reset(!0)}function k(t){if(t){var e=t[b];if(e)return e.call(t);if(typeof t.next=="function")return t;if(!isNaN(t.length)){var r=-1,n=function o(){for(;++r<t.length;)if(v.call(t,r))return o.value=t[r],o.done=!1,o;return o.value=void 0,o.done=!0,o};return n.next=n}}return{next:X}}function X(){return{value:void 0,done:!0}}return j.prototype=y,l(w,"constructor",y),l(y,"constructor",j),j.displayName=l(y,S,"GeneratorFunction"),s.isGeneratorFunction=function(t){var e=typeof t=="function"&&t.constructor;return!!e&&(e===j||(e.displayName||e.name)==="GeneratorFunction")},s.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,l(t,S,"GeneratorFunction")),t.prototype=Object.create(w),t},s.awrap=function(t){return{__await:t}},P(D.prototype),l(D.prototype,V,function(){return this}),s.AsyncIterator=D,s.async=function(t,e,r,n,o){o===void 0&&(o=Promise);var a=new D(B(t,e,r,n),o);return s.isGeneratorFunction(e)?a:a.next().then(function(u){return u.done?u.value:a.next()})},P(w),l(w,S,"Generator"),l(w,b,function(){return this}),l(w,"toString",function(){return"[object Generator]"}),s.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function n(){for(;e.length;){var o=e.pop();if(o in t)return n.value=o,n.done=!1,n}return n.done=!0,n}},s.values=k,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!e)for(var r in this)r.charAt(0)==="t"&&v.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type==="throw")throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(i,c){return u.type="throw",u.arg=e,r.next=i,c&&(r.method="next",r.arg=void 0),!!c}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if(a.tryLoc==="root")return n("end");if(a.tryLoc<=this.prev){var d=v.call(a,"catchLoc"),h=v.call(a,"finallyLoc");if(d&&h){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(d){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,r){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&v.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&(e==="break"||e==="continue")&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var u=a?a.completion:{};return u.type=e,u.arg=r,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(u)},complete:function(e,r){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&r&&(this.next=r),f},finish:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),f}},catch:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===e){var o=n.completion;if(o.type==="throw"){var a=o.arg;A(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:k(e),resultName:r,nextLoc:n},this.method==="next"&&(this.arg=void 0),f}},s}var ne={height:48},fe=/(\b[\w\.-]+@[\w\.-]+\.\w{2,4}\b)|(^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$)/i,Re={timer:0},te;(function(s){s[s.setTimer=0]="setTimer"})(te||(te={}));function je(s,L){switch(L.type){case te.setTimer:return Object(q.a)(Object(q.a)({},s),{},{timer:L.payload});default:throw new Error}}var Pe=function(s){var L=s.validateName,v=s.getCode,U=s.callback,b=s.style,V=b===void 0?{}:b,S=Object(be.l)(),l=H.a.useForm(),B=Object(Z.a)(l,1),g=B[0],f=Object(T.useReducer)(je,Re),N=Object(Z.a)(f,2),j=N[0],y=N[1],_=Object(T.useState)(!1),C=Object(Z.a)(_,2),R=C[0],w=C[1],P=j.timer;function D(e){return M.apply(this,arguments)}function M(){return M=Object(F.a)(x().mark(function e(r){var n,o,a,u,d,h,i,c,p,$,Y;return x().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return n=r.login,o=r.new_password,a=r.code,u=r.new_password_confirmation,O.next=3,U({login:n,new_password_confirmation:u,new_password:o,code:a});case 3:d=O.sent,h=d.message,i=d.status,c=d.show,p=d.start_date,i===0?(c?(localStorage.setItem("extension-modal","exist"),localStorage.setItem("extension-date",p)):localStorage.removeItem("extension-modal"),Y=($=S.query)===null||$===void 0?void 0:$.from,Y&&Y.indexOf("login")<0?de.c.replace(Y):de.c.replace("/")):g.setFields([{name:"code",errors:[h]}]);case 9:case"end":return O.stop()}},e)})),M.apply(this,arguments)}function W(){return A.apply(this,arguments)}function A(){return A=Object(F.a)(x().mark(function e(){var r,n,o,a,u,d;return x().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(r=g.getFieldValue("login"),n=0,!(!fe.test(r)||r.indexOf(" ")>-1)){i.next=6;break}return g.setFields([{name:"login",errors:["\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u6216\u90AE\u7BB1"]}]),n=1,i.abrupt("return",n);case 6:return i.next=8,L({login:r,type:2});case 8:return o=i.sent,a=o.status,u=o.message,d=a>0,d?n=2:(g.setFields([{name:"login",errors:[u]}]),n=1),i.abrupt("return",n);case 14:case"end":return i.stop()}},e)})),A.apply(this,arguments)}var I=function(){var e=Object(F.a)(x().mark(function r(){var n,o,a,u,d;return x().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(n=g.getFieldValue("verify"),o=g.getFieldValue("login"),n){i.next=6;break}g.validateFields(["verify"]),i.next=15;break;case 6:return w(!0),i.next=9,v({login:o,type:2,smscode:Object(ae.L)(o)});case 9:a=i.sent,u=a.status,d=a.message,u<0&&g.setFields([{name:"code",errors:[d]}]),y({type:te.setTimer,payload:60}),w(!1);case 15:case"end":return i.stop()}},r)}));return function(){return e.apply(this,arguments)}}();function k(e,r){var n=g.getFieldValue("new_password_confirmation");if(!r)return Promise.resolve();if(g.setFields([{name:"new_password_confirmation",errors:n&&n!==r?["\u4E24\u6B21\u5BC6\u7801\u4E0D\u4E00\u81F4"]:[]}]),r.indexOf(" ")>-1)return Promise.reject("\u8BF7\u8F93\u51658-16\u4F4D\u5BC6\u7801\uFF0C\u533A\u5206\u5927\u5C0F\u5199\u3001\u4E0D\u80FD\u4F7F\u7528\u7A7A\u683C");var o=r.length;return o>=8&&o<=16?Promise.resolve():Promise.reject("\u8BF7\u8F93\u51658-16\u4F4D\u5BC6\u7801\uFF0C\u533A\u5206\u5927\u5C0F\u5199\u3001\u4E0D\u80FD\u4F7F\u7528\u7A7A\u683C")}Object(T.useEffect)(function(){P>0&&setTimeout(function(){y({type:te.setTimer,payload:P-1})},1e3)},[P]);var X=function(r,n){return n?Promise.resolve():Promise.reject("\u8BF7\u62D6\u52A8\u6ED1\u5757\u9A8C\u8BC1")},t=function(r,n){return n?n.indexOf(" ")>-1?Promise.reject("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u6216\u90AE\u7BB1"):fe.test(n)?Promise.resolve():Promise.reject("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u6216\u90AE\u7BB1"):Promise.resolve()};return E.a.createElement(H.a,{layout:"vertical",form:g,style:V,initialValues:{autologin:!0,protool:!0},onFinish:D},E.a.createElement(H.a.Item,{name:"login",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u6216\u90AE\u7BB1"},{validator:t}]},E.a.createElement(G.a,{style:ne,size:"large",placeholder:"\u8BF7\u8F93\u5165\u6709\u6548\u7684\u624B\u673A\u53F7/\u90AE\u7BB1\u53F7",onChange:function(){return g.setFieldsValue({verify:0})}})),E.a.createElement(H.a.Item,{name:"verify",rules:[{validator:X}]},E.a.createElement(Oe,{onValidate:W})),E.a.createElement(H.a.Item,{name:"new_password",rules:[{required:!0,message:"\u8BF7\u8F93\u51658-16\u4F4D\u5BC6\u7801\uFF0C\u533A\u5206\u5927\u5C0F\u5199\u3001\u4E0D\u80FD\u4F7F\u7528\u7A7A\u683C"},{validator:k}]},E.a.createElement(G.a.Password,{style:ne,size:"large",placeholder:"\u8F93\u51658\uFF5E16\u4F4D\u5BC6\u7801\uFF0C\u533A\u5206\u5927\u5C0F\u5199",visibilityToggle:!1})),E.a.createElement(H.a.Item,{name:"new_password_confirmation",rules:[{required:!0,message:"\u8BF7\u518D\u6B21\u8F93\u5165\u65B0\u5BC6\u7801"},function(e){var r=e.getFieldValue;return{validator:function(o,a){return!a||r("new_password")===a?Promise.resolve():Promise.reject("\u4E24\u6B21\u5BC6\u7801\u4E0D\u4E00\u81F4")}}}]},E.a.createElement(G.a.Password,{style:ne,size:"large",placeholder:"\u518D\u6B21\u8F93\u5165\u65B0\u5BC6\u7801",visibilityToggle:!1})),E.a.createElement(H.a.Item,{name:"code",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801"}]},E.a.createElement(G.a,{suffix:E.a.createElement(K.a,{loading:R,type:"link",onClick:I,disabled:P>0}," ",P===0?"\u83B7\u53D6\u9A8C\u8BC1\u7801":"".concat(P,"\u79D2\u53EF\u91CD\u65B0\u83B7\u53D6")),style:{paddingRight:2,height:48},placeholder:"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801",size:"large"})),E.a.createElement(H.a.Item,null,E.a.createElement(K.a,{size:"large",type:"primary",htmlType:"submit",block:!0,style:ne}," \u5B8C\u6210 ")),E.a.createElement(H.a.Item,{className:"tc"},E.a.createElement(_e.Link,{to:"/user/login"},"\u8FD4\u56DE\u767B\u5F55")))},ue=m("YrPe");function se(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */se=function(){return s};var s={},L=Object.prototype,v=L.hasOwnProperty,U=typeof Symbol=="function"?Symbol:{},b=U.iterator||"@@iterator",V=U.asyncIterator||"@@asyncIterator",S=U.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(r,n,o){return r[n]=o}}function B(t,e,r,n){var o=e&&e.prototype instanceof N?e:N,a=Object.create(o.prototype),u=new I(n||[]);return a._invoke=function(d,h,i){var c="suspendedStart";return function(p,$){if(c==="executing")throw new Error("Generator is already running");if(c==="completed"){if(p==="throw")throw $;return X()}for(i.method=p,i.arg=$;;){var Y=i.delegate;if(Y){var z=M(Y,i);if(z){if(z===f)continue;return z}}if(i.method==="next")i.sent=i._sent=i.arg;else if(i.method==="throw"){if(c==="suspendedStart")throw c="completed",i.arg;i.dispatchException(i.arg)}else i.method==="return"&&i.abrupt("return",i.arg);c="executing";var O=g(d,h,i);if(O.type==="normal"){if(c=i.done?"completed":"suspendedYield",O.arg===f)continue;return{value:O.arg,done:i.done}}O.type==="throw"&&(c="completed",i.method="throw",i.arg=O.arg)}}}(t,r,u),a}function g(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(n){return{type:"throw",arg:n}}}s.wrap=B;var f={};function N(){}function j(){}function y(){}var _={};l(_,b,function(){return this});var C=Object.getPrototypeOf,R=C&&C(C(k([])));R&&R!==L&&v.call(R,b)&&(_=R);var w=y.prototype=N.prototype=Object.create(_);function P(t){["next","throw","return"].forEach(function(e){l(t,e,function(r){return this._invoke(e,r)})})}function D(t,e){function r(o,a,u,d){var h=g(t[o],t,a);if(h.type!=="throw"){var i=h.arg,c=i.value;return c&&typeof c=="object"&&v.call(c,"__await")?e.resolve(c.__await).then(function(p){r("next",p,u,d)},function(p){r("throw",p,u,d)}):e.resolve(c).then(function(p){i.value=p,u(i)},function(p){return r("throw",p,u,d)})}d(h.arg)}var n;this._invoke=function(o,a){function u(){return new e(function(d,h){r(o,a,d,h)})}return n=n?n.then(u,u):u()}}function M(t,e){var r=t.iterator[e.method];if(r===void 0){if(e.delegate=null,e.method==="throw"){if(t.iterator.return&&(e.method="return",e.arg=void 0,M(t,e),e.method==="throw"))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=g(r,t.iterator,e.arg);if(n.type==="throw")return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,e.method!=="return"&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function W(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(W,this),this.reset(!0)}function k(t){if(t){var e=t[b];if(e)return e.call(t);if(typeof t.next=="function")return t;if(!isNaN(t.length)){var r=-1,n=function o(){for(;++r<t.length;)if(v.call(t,r))return o.value=t[r],o.done=!1,o;return o.value=void 0,o.done=!0,o};return n.next=n}}return{next:X}}function X(){return{value:void 0,done:!0}}return j.prototype=y,l(w,"constructor",y),l(y,"constructor",j),j.displayName=l(y,S,"GeneratorFunction"),s.isGeneratorFunction=function(t){var e=typeof t=="function"&&t.constructor;return!!e&&(e===j||(e.displayName||e.name)==="GeneratorFunction")},s.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,l(t,S,"GeneratorFunction")),t.prototype=Object.create(w),t},s.awrap=function(t){return{__await:t}},P(D.prototype),l(D.prototype,V,function(){return this}),s.AsyncIterator=D,s.async=function(t,e,r,n,o){o===void 0&&(o=Promise);var a=new D(B(t,e,r,n),o);return s.isGeneratorFunction(e)?a:a.next().then(function(u){return u.done?u.value:a.next()})},P(w),l(w,S,"Generator"),l(w,b,function(){return this}),l(w,"toString",function(){return"[object Generator]"}),s.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function n(){for(;e.length;){var o=e.pop();if(o in t)return n.value=o,n.done=!1,n}return n.done=!0,n}},s.values=k,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!e)for(var r in this)r.charAt(0)==="t"&&v.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type==="throw")throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(i,c){return u.type="throw",u.arg=e,r.next=i,c&&(r.method="next",r.arg=void 0),!!c}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if(a.tryLoc==="root")return n("end");if(a.tryLoc<=this.prev){var d=v.call(a,"catchLoc"),h=v.call(a,"finallyLoc");if(d&&h){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(d){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,r){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&v.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&(e==="break"||e==="continue")&&a.tryLoc<=r&&r<=a.finallyLoc&&(a=null);var u=a?a.completion:{};return u.type=e,u.arg=r,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(u)},complete:function(e,r){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&r&&(this.next=r),f},finish:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),f}},catch:function(e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc===e){var o=n.completion;if(o.type==="throw"){var a=o.arg;A(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:k(e),resultName:r,nextLoc:n},this.method==="next"&&(this.arg=void 0),f}},s}var Ne=J.default=function(){var s={getCode:ue.a,callback:function(){var L=Object(F.a)(se().mark(function U(b){var V;return se().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,Object(ue.c)(b);case 2:return V=l.sent,l.abrupt("return",V);case 4:case"end":return l.stop()}},U)}));function v(U){return L.apply(this,arguments)}return v}(),validateName:ue.d};return E.a.createElement(Pe,s)}},YrPe:function(oe,J,m){"use strict";m.d(J,"d",function(){return T}),m.d(J,"a",function(){return E}),m.d(J,"b",function(){return re}),m.d(J,"e",function(){return K}),m.d(J,"c",function(){return ee});var F=m("ErOA");function T(G){return Object(F.c)("accounts/valid_email_and_phone.json",G)}function E(G){return Object(F.c)("accounts/get_verification_code.json",G)}function re(G){return Object(F.f)("accounts/register.json",G)}function K(G){return Object(F.f)("weapps/register.json",G)}function ee(G){return Object(F.f)("accounts/reset_password.json",G)}},bRQS:function(oe,J,m){"use strict";var F=m("VTBJ"),T=m("q1tI"),E={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},re=E,K=m("6VBw"),ee=function(H,Z){return T.createElement(K.a,Object(F.a)(Object(F.a)({},H),{},{ref:Z,icon:re}))};ee.displayName="CheckOutlined";var G=J.a=T.forwardRef(ee)},tJYU:function(oe,J,m){}}]);