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.65ec...

1 line
30 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[229],{LsG1:function(t,e,r){"use strict";r.r(e);var n=r("9og8"),o=r("q1tI"),a=r.n(o),i=(r("+L6B"),r("2/Rp")),c=(r("5NDa"),r("5rEg")),u=(r("y8nQ"),r("Vl3Y")),s=r("tJVT"),l=r("k1fw"),f=(r("tJYU"),r("4i/N")),h=r("bRQS"),p=r("VTBJ"),d={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"},v=d,y=r("6VBw"),m=function(t,e){return o["createElement"](y["a"],Object(p["a"])(Object(p["a"])({},t),{},{ref:e,icon:v}))};m.displayName="DoubleRightOutlined";var g=o["forwardRef"](m),w=r("1vsH");function b(){b=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new N(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",v="completed",y={};function m(){}function g(){}function w(){}var E={};s(E,i,(function(){return this}));var x=Object.getPrototypeOf,L=x&&x(x(S([])));L&&L!==r&&n.call(L,i)&&(E=L);var O=w.prototype=m.prototype=Object.create(E);function j(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var s=u.arg,l=s.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(l).then((function(t){s.value=t,i(s)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(e,r,n){var o=h;return function(a,i){if(o===d)throw new Error("Generator is already running");if(o===v){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=P(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=f(e,r,n);if("normal"===s.type){if(o=n.done?v:p,s.arg===y)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=v,n.method="throw",n.arg=s.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function T(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 F(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function S(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(typeof e+" is not iterable")}return g.prototype=w,o(O,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=s(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,s(t,u,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},j(_.prototype),s(_.prototype,c,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new _(l(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},j(O),s(O,u,"Generator"),s(O,i,(function(){return this})),s(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=S,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(F),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(u&&s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),F(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;F(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:S(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}var E={moveX:0,verify:0},x=function(t){return t[t["SET_MOVEX"]=0]="SET_MOVEX",t[t["VERIFY"]=1]="VERIFY",t}(x||{});function L(t,e){switch(e.type){case x.SET_MOVEX:return Object(l["a"])(Object(l["a"])({},t),{},{moveX:e.payload});case x.VERIFY:return Object(l["a"])(Object(l["a"])({},t),e.payload);default:throw new Error}}var O=function(t){var e=t.value,r=t.onChange,i=t.onValidate,c=Object(o["useReducer"])(L,E),u=Object(s["a"])(c,2),l=u[0],p=u[1],d=l.moveX,v=l.verify,y=Object(o["useRef"])(),m=Object(o["useRef"])(),O=Object(o["useRef"])(),j=Object(o["useRef"])(),_=Object(o["useMemo"])((function(){if(m.current)return m.current.getBoundingClientRect()}),[m.current]);function k(){v||(j.current=!0,y.current.style.transition="",O.current.style.transition="")}return Object(o["useEffect"])((function(){if(_){var t=function(){var t=Object(n["a"])(b().mark((function t(e){var n;return b().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!j.current){t.next=15;break}if(n=e.pageX-c,s&&(n=e.changedTouches[0].pageX-c),n<0&&(n=0),!(n>=u)){t.next=14;break}return j.current=!1,n=u,t.next=9,i();case 9:o=t.sent,p({type:x.VERIFY,payload:{moveX:n,verify:o}}),r(o),t.next=15;break;case 14:p({type:x.SET_MOVEX,payload:n});case 15:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e=function(){j.current=!1,0===o&&(y.current.style.transition="left .5s ease",O.current.style.transition="width .5s ease",p({type:x.VERIFY,payload:{moveX:0}}))},o=0,a=_.width,c=_.left,u=a-48,s=!Object(w["H"])();return s?(window.addEventListener("touchmove",t),window.addEventListener("touchend",e)):(window.addEventListener("mousemove",t),window.addEventListener("mouseup",e)),function(){s?(window.removeEventListener("touchmove",t),window.removeEventListener("touchend",e)):(window.removeEventListener("mousemove",t),window.removeEventListener("mouseup",e))}}}),[_,w["H"]]),Object(o["useEffect"])((function(){p({type:x.VERIFY,payload:{verify:e,moveX:e?(null===_||void 0===_?void 0:_.width)-48:0}})}),[e]),a.a.createElement("div",{ref:m,className:"unlock-wrapper"},a.a.createElement("div",{ref:O,className:1===v?"unlock-error-bg":"unlock-bg",style:{width:d}}),a.a.createElement("div",{className:"unlock-text"},v?1===v?"\u9a8c\u8bc1\u5931\u8d25":"\u9a8c\u8bc1\u901a\u8fc7":"\u62d6\u52a8\u6ed1\u5757\u81f3\u53f3\u4fa7\u9a8c\u8bc1"),a.a.createElement("div",{ref:y,onTouchStart:k,onMouseDown:k,style:{left:d},className:"unlock-handler"},v?1===v?a.a.createElement(f["a"],null):a.a.createElement(h["a"],null):a.a.createElement(g,null)))},j=r("Ty5D"),_=r("9kvl"),k=r("55Ip");function P(){P=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new N(n||[]);return o(i,"_invoke",{value:_(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",v="completed",y={};function m(){}function g(){}function w(){}var b={};s(b,i,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(S([])));x&&x!==r&&n.call(x,i)&&(b=x);var L=w.prototype=m.prototype=Object.create(b);function O(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var s=u.arg,l=s.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(l).then((function(t){s.value=t,i(s)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function _(e,r,n){var o=h;return function(a,i){if(o===d)throw new Error("Generator is already running");if(o===v){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=k(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=f(e,r,n);if("normal"===s.type){if(o=n.done?v:p,s.arg===y)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=v,n.method="throw",n.arg=s.arg)}}}function k(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,k(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function T(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 F(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function S(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(typeof e+" is not iterable")}return g.prototype=w,o(L,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=s(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,s(t,u,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},O(j.prototype),s(j.prototype,c,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new j(l(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},O(L),s(L,u,"Generator"),s(L,i,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=S,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(F),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(u&&s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),F(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;F(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:S(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}var T={height:48},F=/(\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,N={timer:0},S=function(t){return t[t["setTimer"]=0]="setTimer",t}(S||{});function I(t,e){switch(e.type){case S.setTimer:return Object(l["a"])(Object(l["a"])({},t),{},{timer:e.payload});default:throw new Error}}var G=function(t){var e=t.validateName,r=t.getCode,l=t.callback,f=t.style,h=void 0===f?{}:f,p=Object(j["l"])(),d=u["a"].useForm(),v=Object(s["a"])(d,1),y=v[0],m=Object(o["useReducer"])(I,N),g=Object(s["a"])(m,2),b=g[0],E=g[1],x=Object(o["useState"])(!1),L=Object(s["a"])(x,2),G=L[0],V=L[1],R=b.timer;function Y(t){return X.apply(this,arguments)}function X(){return X=Object(n["a"])(P().mark((function t(e){var r,n,o,a,i,c,u,s,f,h,d;return P().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r=e.login,n=e.new_password,o=e.code,a=e.new_password_confirmation,t.next=3,l({login:r,new_password_confirmation:a,new_password:n,code:o});case 3:i=t.sent,c=i.message,u=i.status,s=i.show,f=i.start_date,0===u?(s?(localStorage.setItem("extension-modal","exist"),localStorage.setItem("extension-date",f)):localStorage.removeItem("extension-modal"),d=null===(h=p.query)||void 0===h?void 0:h.from,d&&d.indexOf("login")<0?_["c"].replace(d):_["c"].replace("/")):y.setFields([{name:"code",errors:[c]}]);case 9:case"end":return t.stop()}}),t)}))),X.apply(this,arguments)}function A(){return z.apply(this,arguments)}function z(){return z=Object(n["a"])(P().mark((function t(){var r,n,o,a,i,c;return P().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(r=y.getFieldValue("login"),n=0,F.test(r)&&!(r.indexOf(" ")>-1)){t.next=6;break}return y.setFields([{name:"login",errors:["\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u624b\u673a\u53f7\u6216\u90ae\u7bb1"]}]),n=1,t.abrupt("return",n);case 6:return t.next=8,e({login:r,type:2});case 8:return o=t.sent,a=o.status,i=o.message,c=a>0,c?n=2:(y.setFields([{name:"login",errors:[i]}]),n=1),t.abrupt("return",n);case 14:case"end":return t.stop()}}),t)}))),z.apply(this,arguments)}var B=function(){var t=Object(n["a"])(P().mark((function t(){var e,n,o,a,i;return P().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e=y.getFieldValue("verify"),n=y.getFieldValue("login"),e){t.next=6;break}y.validateFields(["verify"]),t.next=15;break;case 6:return V(!0),t.next=9,r({login:n,type:2,smscode:Object(w["P"])(n)});case 9:o=t.sent,a=o.status,i=o.message,a<0&&y.setFields([{name:"code",errors:[i]}]),E({type:S.setTimer,payload:60}),V(!1);case 15:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();function M(t,e){var r=y.getFieldValue("new_password_confirmation");if(!e)return Promise.resolve();if(y.setFields([{name:"new_password_confirmation",errors:r&&r!==e?["\u4e24\u6b21\u5bc6\u7801\u4e0d\u4e00\u81f4"]:[]}]),e.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 n=e.length;return n>=8&&n<=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(o["useEffect"])((function(){R>0&&setTimeout((function(){E({type:S.setTimer,payload:R-1})}),1e3)}),[R]);var q=function(t,e){return e?Promise.resolve():Promise.reject("\u8bf7\u62d6\u52a8\u6ed1\u5757\u9a8c\u8bc1")},C=function(t,e){return e?e.indexOf(" ")>-1?Promise.reject("\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u624b\u673a\u53f7\u6216\u90ae\u7bb1"):F.test(e)?Promise.resolve():Promise.reject("\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u624b\u673a\u53f7\u6216\u90ae\u7bb1"):Promise.resolve()};return a.a.createElement(u["a"],{layout:"vertical",form:y,style:h,initialValues:{autologin:!0,protool:!0},onFinish:Y},a.a.createElement(u["a"].Item,{name:"login",rules:[{required:!0,message:"\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u624b\u673a\u53f7\u6216\u90ae\u7bb1"},{validator:C}]},a.a.createElement(c["a"],{style:T,size:"large",placeholder:"\u8bf7\u8f93\u5165\u6709\u6548\u7684\u624b\u673a\u53f7/\u90ae\u7bb1\u53f7",onChange:function(){return y.setFieldsValue({verify:0})}})),a.a.createElement(u["a"].Item,{name:"verify",rules:[{validator:q}]},a.a.createElement(O,{onValidate:A})),a.a.createElement(u["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:M}]},a.a.createElement(c["a"].Password,{style:T,size:"large",placeholder:"\u8f93\u51658\uff5e16\u4f4d\u5bc6\u7801\uff0c\u533a\u5206\u5927\u5c0f\u5199",visibilityToggle:!1})),a.a.createElement(u["a"].Item,{name:"new_password_confirmation",rules:[{required:!0,message:"\u8bf7\u518d\u6b21\u8f93\u5165\u65b0\u5bc6\u7801"},function(t){var e=t.getFieldValue;return{validator:function(t,r){return r&&e("new_password")!==r?Promise.reject("\u4e24\u6b21\u5bc6\u7801\u4e0d\u4e00\u81f4"):Promise.resolve()}}}]},a.a.createElement(c["a"].Password,{style:T,size:"large",placeholder:"\u518d\u6b21\u8f93\u5165\u65b0\u5bc6\u7801",visibilityToggle:!1})),a.a.createElement(u["a"].Item,{name:"code",rules:[{required:!0,message:"\u8bf7\u8f93\u5165\u9a8c\u8bc1\u7801"}]},a.a.createElement(c["a"],{suffix:a.a.createElement(i["a"],{loading:G,type:"link",onClick:B,disabled:R>0}," ",0===R?"\u83b7\u53d6\u9a8c\u8bc1\u7801":"".concat(R,"\u79d2\u53ef\u91cd\u65b0\u83b7\u53d6")),style:{paddingRight:2,height:48},placeholder:"\u8bf7\u8f93\u5165\u9a8c\u8bc1\u7801",size:"large"})),a.a.createElement(u["a"].Item,null,a.a.createElement(i["a"],{size:"large",type:"primary",htmlType:"submit",block:!0,style:T}," \u5b8c\u6210 ")),a.a.createElement(u["a"].Item,{className:"tc"},a.a.createElement(k["Link"],{to:"/user/login"},"\u8fd4\u56de\u767b\u5f55")))},V=r("YrPe");function R(){R=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var a=e&&e.prototype instanceof m?e:m,i=Object.create(a.prototype),c=new F(n||[]);return o(i,"_invoke",{value:_(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var h="suspendedStart",p="suspendedYield",d="executing",v="completed",y={};function m(){}function g(){}function w(){}var b={};s(b,i,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(N([])));x&&x!==r&&n.call(x,i)&&(b=x);var L=w.prototype=m.prototype=Object.create(b);function O(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var s=u.arg,l=s.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(l).then((function(t){s.value=t,i(s)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function _(e,r,n){var o=h;return function(a,i){if(o===d)throw new Error("Generator is already running");if(o===v){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=k(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=f(e,r,n);if("normal"===s.type){if(o=n.done?v:p,s.arg===y)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=v,n.method="throw",n.arg=s.arg)}}}function k(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,k(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function P(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(typeof e+" is not iterable")}return g.prototype=w,o(L,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=s(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,s(t,u,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},O(j.prototype),s(j.prototype,c,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new j(l(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},O(L),s(L,u,"Generator"),s(L,i,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,F.prototype={constructor:F,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(u&&s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}e["default"]=function(){var t={getCode:V["a"],callback:function(){var t=Object(n["a"])(R().mark((function t(e){var r;return R().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(V["c"])(e);case 2:return r=t.sent,t.abrupt("return",r);case 4:case"end":return t.stop()}}),t)})));function e(e){return t.apply(this,arguments)}return e}(),validateName:V["d"]};return a.a.createElement(G,t)}},YrPe:function(t,e,r){"use strict";r.d(e,"d",(function(){return o})),r.d(e,"a",(function(){return a})),r.d(e,"b",(function(){return i})),r.d(e,"e",(function(){return c})),r.d(e,"c",(function(){return u}));var n=r("ErOA");function o(t){return Object(n["c"])("accounts/valid_email_and_phone.json",t)}function a(t){return Object(n["c"])("accounts/get_verification_code.json",t)}function i(t){return Object(n["f"])("accounts/register.json",t)}function c(t){return Object(n["f"])("weapps/register.json",t)}function u(t){return Object(n["f"])("accounts/reset_password.json",t)}},bRQS:function(t,e,r){"use strict";var n=r("VTBJ"),o=r("q1tI"),a={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"},i=a,c=r("6VBw"),u=function(t,e){return o["createElement"](c["a"],Object(n["a"])(Object(n["a"])({},t),{},{ref:e,icon:i}))};u.displayName="CheckOutlined";e["a"]=o["forwardRef"](u)},tJYU:function(t,e,r){}}]);