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.
2 lines
30 KiB
2 lines
30 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[233],{LsG1:function(ne,B,f){"use strict";f.r(B);var X=f("9og8"),U=f("q1tI"),g=f.n(U),ee=f("+L6B"),W=f("2/Rp"),Z=f("5NDa"),F=f("5rEg"),fe=f("y8nQ"),Y=f("Vl3Y"),Q=f("tJVT"),K=f("k1fw"),Pe=f("tJYU"),he=f("4i/N"),pe=f("bRQS"),se=f("VTBJ"),me={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"},ve=me,ge=f("6VBw"),ce=function(L,m){return U.createElement(ge.a,Object(se.a)(Object(se.a)({},L),{},{ref:m,icon:ve}))};ce.displayName="DoubleRightOutlined";var ye=U.forwardRef(ce),oe=f("1vsH");function ae(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ae=function(){return s};var s={},L=Object.prototype,m=L.hasOwnProperty,N=Object.defineProperty||function(r,e,t){r[e]=t.value},A=typeof Symbol=="function"?Symbol:{},b=A.iterator||"@@iterator",$=A.asyncIterator||"@@asyncIterator",O=A.toStringTag||"@@toStringTag";function d(r,e,t){return Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}),r[e]}try{d({},"")}catch(r){d=function(t,n,a){return t[n]=a}}function y(r,e,t,n){var a=e&&e.prototype instanceof C?e:C,o=Object.create(a.prototype),i=new I(n||[]);return N(o,"_invoke",{value:z(r,t,i)}),o}function S(r,e,t){try{return{type:"normal",arg:r.call(e,t)}}catch(n){return{type:"throw",arg:n}}}s.wrap=y;var l={};function C(){}function _(){}function h(){}var k={};d(k,b,function(){return this});var D=Object.getPrototypeOf,R=D&&D(D(j([])));R&&R!==L&&m.call(R,b)&&(k=R);var p=h.prototype=C.prototype=Object.create(k);function V(r){["next","throw","return"].forEach(function(e){d(r,e,function(t){return this._invoke(e,t)})})}function T(r,e){function t(a,o,i,u){var c=S(r[a],r,o);if(c.type!=="throw"){var w=c.arg,v=w.value;return v&&typeof v=="object"&&m.call(v,"__await")?e.resolve(v.__await).then(function(E){t("next",E,i,u)},function(E){t("throw",E,i,u)}):e.resolve(v).then(function(E){w.value=E,i(w)},function(E){return t("throw",E,i,u)})}u(c.arg)}var n;N(this,"_invoke",{value:function(o,i){function u(){return new e(function(c,w){t(o,i,c,w)})}return n=n?n.then(u,u):u()}})}function z(r,e,t){var n="suspendedStart";return function(a,o){if(n==="executing")throw new Error("Generator is already running");if(n==="completed"){if(a==="throw")throw o;return P()}for(t.method=a,t.arg=o;;){var i=t.delegate;if(i){var u=G(i,t);if(u){if(u===l)continue;return u}}if(t.method==="next")t.sent=t._sent=t.arg;else if(t.method==="throw"){if(n==="suspendedStart")throw n="completed",t.arg;t.dispatchException(t.arg)}else t.method==="return"&&t.abrupt("return",t.arg);n="executing";var c=S(r,e,t);if(c.type==="normal"){if(n=t.done?"completed":"suspendedYield",c.arg===l)continue;return{value:c.arg,done:t.done}}c.type==="throw"&&(n="completed",t.method="throw",t.arg=c.arg)}}}function G(r,e){var t=e.method,n=r.iterator[t];if(n===void 0)return e.delegate=null,t==="throw"&&r.iterator.return&&(e.method="return",e.arg=void 0,G(r,e),e.method==="throw")||t!=="return"&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+t+"' method")),l;var a=S(n,r.iterator,e.arg);if(a.type==="throw")return e.method="throw",e.arg=a.arg,e.delegate=null,l;var o=a.arg;return o?o.done?(e[r.resultName]=o.value,e.next=r.nextLoc,e.method!=="return"&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function J(r){var e={tryLoc:r[0]};1 in r&&(e.catchLoc=r[1]),2 in r&&(e.finallyLoc=r[2],e.afterLoc=r[3]),this.tryEntries.push(e)}function M(r){var e=r.completion||{};e.type="normal",delete e.arg,r.completion=e}function I(r){this.tryEntries=[{tryLoc:"root"}],r.forEach(J,this),this.reset(!0)}function j(r){if(r){var e=r[b];if(e)return e.call(r);if(typeof r.next=="function")return r;if(!isNaN(r.length)){var t=-1,n=function a(){for(;++t<r.length;)if(m.call(r,t))return a.value=r[t],a.done=!1,a;return a.value=void 0,a.done=!0,a};return n.next=n}}return{next:P}}function P(){return{value:void 0,done:!0}}return _.prototype=h,N(p,"constructor",{value:h,configurable:!0}),N(h,"constructor",{value:_,configurable:!0}),_.displayName=d(h,O,"GeneratorFunction"),s.isGeneratorFunction=function(r){var e=typeof r=="function"&&r.constructor;return!!e&&(e===_||(e.displayName||e.name)==="GeneratorFunction")},s.mark=function(r){return Object.setPrototypeOf?Object.setPrototypeOf(r,h):(r.__proto__=h,d(r,O,"GeneratorFunction")),r.prototype=Object.create(p),r},s.awrap=function(r){return{__await:r}},V(T.prototype),d(T.prototype,$,function(){return this}),s.AsyncIterator=T,s.async=function(r,e,t,n,a){a===void 0&&(a=Promise);var o=new T(y(r,e,t,n),a);return s.isGeneratorFunction(e)?o:o.next().then(function(i){return i.done?i.value:o.next()})},V(p),d(p,O,"Generator"),d(p,b,function(){return this}),d(p,"toString",function(){return"[object Generator]"}),s.keys=function(r){var e=Object(r),t=[];for(var n in e)t.push(n);return t.reverse(),function a(){for(;t.length;){var o=t.pop();if(o in e)return a.value=o,a.done=!1,a}return a.done=!0,a}},s.values=j,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(M),!e)for(var t in this)t.charAt(0)==="t"&&m.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=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 t=this;function n(w,v){return i.type="throw",i.arg=e,t.next=w,v&&(t.method="next",t.arg=void 0),!!v}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if(o.tryLoc==="root")return n("end");if(o.tryLoc<=this.prev){var u=m.call(o,"catchLoc"),c=m.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&m.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&(e==="break"||e==="continue")&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(i)},complete:function(e,t){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"&&t&&(this.next=t),l},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),M(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var a=n.completion;if(a.type==="throw"){var o=a.arg;M(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:j(e),resultName:t,nextLoc:n},this.method==="next"&&(this.arg=void 0),l}},s}var Ee={moveX:0,verify:0},x=function(s){return s[s.SET_MOVEX=0]="SET_MOVEX",s[s.VERIFY=1]="VERIFY",s}(x||{});function we(s,L){switch(L.type){case x.SET_MOVEX:return Object(K.a)(Object(K.a)({},s),{},{moveX:L.payload});case x.VERIFY:return Object(K.a)(Object(K.a)({},s),L.payload);default:throw new Error}}var Le=function(s){var L=s.value,m=s.onChange,N=s.onValidate,A=Object(U.useReducer)(we,Ee),b=Object(Q.a)(A,2),$=b[0],O=b[1],d=$.moveX,y=$.verify,S=Object(U.useRef)(),l=Object(U.useRef)(),C=Object(U.useRef)(),_=Object(U.useRef)(),h=Object(U.useMemo)(function(){if(l.current)return l.current.getBoundingClientRect()},[l.current]);Object(U.useEffect)(function(){if(h){var D=function(){var J=Object(X.a)(ae().mark(function M(I){var j;return ae().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(!_.current){r.next=15;break}if(j=I.pageX-T,G&&(j=I.changedTouches[0].pageX-T),j<0&&(j=0),!(j>=z)){r.next=14;break}return _.current=!1,j=z,r.next=9,N();case 9:p=r.sent,O({type:x.VERIFY,payload:{moveX:j,verify:p}}),m(p),r.next=15;break;case 14:O({type:x.SET_MOVEX,payload:j});case 15:case"end":return r.stop()}},M)}));return function(I){return J.apply(this,arguments)}}(),R=function(){_.current=!1,p===0&&(S.current.style.transition="left .5s ease",C.current.style.transition="width .5s ease",O({type:x.VERIFY,payload:{moveX:0}}))},p=0,V=h.width,T=h.left,z=V-48,G=!Object(oe.E)();return G?(window.addEventListener("touchmove",D),window.addEventListener("touchend",R)):(window.addEventListener("mousemove",D),window.addEventListener("mouseup",R)),function(){G?(window.removeEventListener("touchmove",D),window.removeEventListener("touchend",R)):(window.removeEventListener("mousemove",D),window.removeEventListener("mouseup",R))}}},[h,oe.E]),Object(U.useEffect)(function(){O({type:x.VERIFY,payload:{verify:L,moveX:L?(h==null?void 0:h.width)-48:0}})},[L]);function k(){y||(_.current=!0,S.current.style.transition="",C.current.style.transition="")}return g.a.createElement("div",{ref:l,className:"unlock-wrapper"},g.a.createElement("div",{ref:C,className:y===1?"unlock-error-bg":"unlock-bg",style:{width:d}}),g.a.createElement("div",{className:"unlock-text"},y?y===1?"\u9A8C\u8BC1\u5931\u8D25":"\u9A8C\u8BC1\u901A\u8FC7":"\u62D6\u52A8\u6ED1\u5757\u81F3\u53F3\u4FA7\u9A8C\u8BC1"),g.a.createElement("div",{ref:S,onTouchStart:k,onMouseDown:k,style:{left:d},className:"unlock-handler"},y?y===1?g.a.createElement(he.a,null):g.a.createElement(pe.a,null):g.a.createElement(ye,null)))},Oe=f("Ty5D"),le=f("9kvl"),be=f("55Ip");function H(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */H=function(){return s};var s={},L=Object.prototype,m=L.hasOwnProperty,N=Object.defineProperty||function(r,e,t){r[e]=t.value},A=typeof Symbol=="function"?Symbol:{},b=A.iterator||"@@iterator",$=A.asyncIterator||"@@asyncIterator",O=A.toStringTag||"@@toStringTag";function d(r,e,t){return Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}),r[e]}try{d({},"")}catch(r){d=function(t,n,a){return t[n]=a}}function y(r,e,t,n){var a=e&&e.prototype instanceof C?e:C,o=Object.create(a.prototype),i=new I(n||[]);return N(o,"_invoke",{value:z(r,t,i)}),o}function S(r,e,t){try{return{type:"normal",arg:r.call(e,t)}}catch(n){return{type:"throw",arg:n}}}s.wrap=y;var l={};function C(){}function _(){}function h(){}var k={};d(k,b,function(){return this});var D=Object.getPrototypeOf,R=D&&D(D(j([])));R&&R!==L&&m.call(R,b)&&(k=R);var p=h.prototype=C.prototype=Object.create(k);function V(r){["next","throw","return"].forEach(function(e){d(r,e,function(t){return this._invoke(e,t)})})}function T(r,e){function t(a,o,i,u){var c=S(r[a],r,o);if(c.type!=="throw"){var w=c.arg,v=w.value;return v&&typeof v=="object"&&m.call(v,"__await")?e.resolve(v.__await).then(function(E){t("next",E,i,u)},function(E){t("throw",E,i,u)}):e.resolve(v).then(function(E){w.value=E,i(w)},function(E){return t("throw",E,i,u)})}u(c.arg)}var n;N(this,"_invoke",{value:function(o,i){function u(){return new e(function(c,w){t(o,i,c,w)})}return n=n?n.then(u,u):u()}})}function z(r,e,t){var n="suspendedStart";return function(a,o){if(n==="executing")throw new Error("Generator is already running");if(n==="completed"){if(a==="throw")throw o;return P()}for(t.method=a,t.arg=o;;){var i=t.delegate;if(i){var u=G(i,t);if(u){if(u===l)continue;return u}}if(t.method==="next")t.sent=t._sent=t.arg;else if(t.method==="throw"){if(n==="suspendedStart")throw n="completed",t.arg;t.dispatchException(t.arg)}else t.method==="return"&&t.abrupt("return",t.arg);n="executing";var c=S(r,e,t);if(c.type==="normal"){if(n=t.done?"completed":"suspendedYield",c.arg===l)continue;return{value:c.arg,done:t.done}}c.type==="throw"&&(n="completed",t.method="throw",t.arg=c.arg)}}}function G(r,e){var t=e.method,n=r.iterator[t];if(n===void 0)return e.delegate=null,t==="throw"&&r.iterator.return&&(e.method="return",e.arg=void 0,G(r,e),e.method==="throw")||t!=="return"&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+t+"' method")),l;var a=S(n,r.iterator,e.arg);if(a.type==="throw")return e.method="throw",e.arg=a.arg,e.delegate=null,l;var o=a.arg;return o?o.done?(e[r.resultName]=o.value,e.next=r.nextLoc,e.method!=="return"&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function J(r){var e={tryLoc:r[0]};1 in r&&(e.catchLoc=r[1]),2 in r&&(e.finallyLoc=r[2],e.afterLoc=r[3]),this.tryEntries.push(e)}function M(r){var e=r.completion||{};e.type="normal",delete e.arg,r.completion=e}function I(r){this.tryEntries=[{tryLoc:"root"}],r.forEach(J,this),this.reset(!0)}function j(r){if(r){var e=r[b];if(e)return e.call(r);if(typeof r.next=="function")return r;if(!isNaN(r.length)){var t=-1,n=function a(){for(;++t<r.length;)if(m.call(r,t))return a.value=r[t],a.done=!1,a;return a.value=void 0,a.done=!0,a};return n.next=n}}return{next:P}}function P(){return{value:void 0,done:!0}}return _.prototype=h,N(p,"constructor",{value:h,configurable:!0}),N(h,"constructor",{value:_,configurable:!0}),_.displayName=d(h,O,"GeneratorFunction"),s.isGeneratorFunction=function(r){var e=typeof r=="function"&&r.constructor;return!!e&&(e===_||(e.displayName||e.name)==="GeneratorFunction")},s.mark=function(r){return Object.setPrototypeOf?Object.setPrototypeOf(r,h):(r.__proto__=h,d(r,O,"GeneratorFunction")),r.prototype=Object.create(p),r},s.awrap=function(r){return{__await:r}},V(T.prototype),d(T.prototype,$,function(){return this}),s.AsyncIterator=T,s.async=function(r,e,t,n,a){a===void 0&&(a=Promise);var o=new T(y(r,e,t,n),a);return s.isGeneratorFunction(e)?o:o.next().then(function(i){return i.done?i.value:o.next()})},V(p),d(p,O,"Generator"),d(p,b,function(){return this}),d(p,"toString",function(){return"[object Generator]"}),s.keys=function(r){var e=Object(r),t=[];for(var n in e)t.push(n);return t.reverse(),function a(){for(;t.length;){var o=t.pop();if(o in e)return a.value=o,a.done=!1,a}return a.done=!0,a}},s.values=j,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(M),!e)for(var t in this)t.charAt(0)==="t"&&m.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=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 t=this;function n(w,v){return i.type="throw",i.arg=e,t.next=w,v&&(t.method="next",t.arg=void 0),!!v}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if(o.tryLoc==="root")return n("end");if(o.tryLoc<=this.prev){var u=m.call(o,"catchLoc"),c=m.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&m.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&(e==="break"||e==="continue")&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(i)},complete:function(e,t){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"&&t&&(this.next=t),l},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),M(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var a=n.completion;if(a.type==="throw"){var o=a.arg;M(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:j(e),resultName:t,nextLoc:n},this.method==="next"&&(this.arg=void 0),l}},s}var te={height:48},de=/(\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,_e={timer:0},re=function(s){return s[s.setTimer=0]="setTimer",s}(re||{});function Re(s,L){switch(L.type){case re.setTimer:return Object(K.a)(Object(K.a)({},s),{},{timer:L.payload});default:throw new Error}}var je=function(s){var L=s.validateName,m=s.getCode,N=s.callback,A=s.style,b=A===void 0?{}:A,$=Object(Oe.l)(),O=Y.a.useForm(),d=Object(Q.a)(O,1),y=d[0],S=Object(U.useReducer)(Re,_e),l=Object(Q.a)(S,2),C=l[0],_=l[1],h=Object(U.useState)(!1),k=Object(Q.a)(h,2),D=k[0],R=k[1],p=C.timer;function V(P){return T.apply(this,arguments)}function T(){return T=Object(X.a)(H().mark(function P(r){var e,t,n,a,o,i,u,c,w,v,E;return H().wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return e=r.login,t=r.new_password,n=r.code,a=r.new_password_confirmation,q.next=3,N({login:e,new_password_confirmation:a,new_password:t,code:n});case 3:o=q.sent,i=o.message,u=o.status,c=o.show,w=o.start_date,u===0?(c?(localStorage.setItem("extension-modal","exist"),localStorage.setItem("extension-date",w)):localStorage.removeItem("extension-modal"),E=(v=$.query)===null||v===void 0?void 0:v.from,E&&E.indexOf("login")<0?le.c.replace(E):le.c.replace("/")):y.setFields([{name:"code",errors:[i]}]);case 9:case"end":return q.stop()}},P)})),T.apply(this,arguments)}function z(){return G.apply(this,arguments)}function G(){return G=Object(X.a)(H().mark(function P(){var r,e,t,n,a,o;return H().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(r=y.getFieldValue("login"),e=0,!(!de.test(r)||r.indexOf(" ")>-1)){u.next=6;break}return y.setFields([{name:"login",errors:["\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u6216\u90AE\u7BB1"]}]),e=1,u.abrupt("return",e);case 6:return u.next=8,L({login:r,type:2});case 8:return t=u.sent,n=t.status,a=t.message,o=n>0,o?e=2:(y.setFields([{name:"login",errors:[a]}]),e=1),u.abrupt("return",e);case 14:case"end":return u.stop()}},P)})),G.apply(this,arguments)}var J=function(){var P=Object(X.a)(H().mark(function r(){var e,t,n,a,o;return H().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(e=y.getFieldValue("verify"),t=y.getFieldValue("login"),e){u.next=6;break}y.validateFields(["verify"]),u.next=15;break;case 6:return R(!0),u.next=9,m({login:t,type:2,smscode:Object(oe.L)(t)});case 9:n=u.sent,a=n.status,o=n.message,a<0&&y.setFields([{name:"code",errors:[o]}]),_({type:re.setTimer,payload:60}),R(!1);case 15:case"end":return u.stop()}},r)}));return function(){return P.apply(this,arguments)}}();function M(P,r){var e=y.getFieldValue("new_password_confirmation");if(!r)return Promise.resolve();if(y.setFields([{name:"new_password_confirmation",errors:e&&e!==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 t=r.length;return t>=8&&t<=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(U.useEffect)(function(){p>0&&setTimeout(function(){_({type:re.setTimer,payload:p-1})},1e3)},[p]);var I=function(r,e){return e?Promise.resolve():Promise.reject("\u8BF7\u62D6\u52A8\u6ED1\u5757\u9A8C\u8BC1")},j=function(r,e){return e?e.indexOf(" ")>-1?Promise.reject("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u6216\u90AE\u7BB1"):de.test(e)?Promise.resolve():Promise.reject("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u6216\u90AE\u7BB1"):Promise.resolve()};return g.a.createElement(Y.a,{layout:"vertical",form:y,style:b,initialValues:{autologin:!0,protool:!0},onFinish:V},g.a.createElement(Y.a.Item,{name:"login",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u6216\u90AE\u7BB1"},{validator:j}]},g.a.createElement(F.a,{style:te,size:"large",placeholder:"\u8BF7\u8F93\u5165\u6709\u6548\u7684\u624B\u673A\u53F7/\u90AE\u7BB1\u53F7",onChange:function(){return y.setFieldsValue({verify:0})}})),g.a.createElement(Y.a.Item,{name:"verify",rules:[{validator:I}]},g.a.createElement(Le,{onValidate:z})),g.a.createElement(Y.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}]},g.a.createElement(F.a.Password,{style:te,size:"large",placeholder:"\u8F93\u51658\uFF5E16\u4F4D\u5BC6\u7801\uFF0C\u533A\u5206\u5927\u5C0F\u5199",visibilityToggle:!1})),g.a.createElement(Y.a.Item,{name:"new_password_confirmation",rules:[{required:!0,message:"\u8BF7\u518D\u6B21\u8F93\u5165\u65B0\u5BC6\u7801"},function(P){var r=P.getFieldValue;return{validator:function(t,n){return!n||r("new_password")===n?Promise.resolve():Promise.reject("\u4E24\u6B21\u5BC6\u7801\u4E0D\u4E00\u81F4")}}}]},g.a.createElement(F.a.Password,{style:te,size:"large",placeholder:"\u518D\u6B21\u8F93\u5165\u65B0\u5BC6\u7801",visibilityToggle:!1})),g.a.createElement(Y.a.Item,{name:"code",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801"}]},g.a.createElement(F.a,{suffix:g.a.createElement(W.a,{loading:D,type:"link",onClick:J,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"})),g.a.createElement(Y.a.Item,null,g.a.createElement(W.a,{size:"large",type:"primary",htmlType:"submit",block:!0,style:te}," \u5B8C\u6210 ")),g.a.createElement(Y.a.Item,{className:"tc"},g.a.createElement(be.Link,{to:"/user/login"},"\u8FD4\u56DE\u767B\u5F55")))},ie=f("YrPe");function ue(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ue=function(){return s};var s={},L=Object.prototype,m=L.hasOwnProperty,N=Object.defineProperty||function(r,e,t){r[e]=t.value},A=typeof Symbol=="function"?Symbol:{},b=A.iterator||"@@iterator",$=A.asyncIterator||"@@asyncIterator",O=A.toStringTag||"@@toStringTag";function d(r,e,t){return Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}),r[e]}try{d({},"")}catch(r){d=function(t,n,a){return t[n]=a}}function y(r,e,t,n){var a=e&&e.prototype instanceof C?e:C,o=Object.create(a.prototype),i=new I(n||[]);return N(o,"_invoke",{value:z(r,t,i)}),o}function S(r,e,t){try{return{type:"normal",arg:r.call(e,t)}}catch(n){return{type:"throw",arg:n}}}s.wrap=y;var l={};function C(){}function _(){}function h(){}var k={};d(k,b,function(){return this});var D=Object.getPrototypeOf,R=D&&D(D(j([])));R&&R!==L&&m.call(R,b)&&(k=R);var p=h.prototype=C.prototype=Object.create(k);function V(r){["next","throw","return"].forEach(function(e){d(r,e,function(t){return this._invoke(e,t)})})}function T(r,e){function t(a,o,i,u){var c=S(r[a],r,o);if(c.type!=="throw"){var w=c.arg,v=w.value;return v&&typeof v=="object"&&m.call(v,"__await")?e.resolve(v.__await).then(function(E){t("next",E,i,u)},function(E){t("throw",E,i,u)}):e.resolve(v).then(function(E){w.value=E,i(w)},function(E){return t("throw",E,i,u)})}u(c.arg)}var n;N(this,"_invoke",{value:function(o,i){function u(){return new e(function(c,w){t(o,i,c,w)})}return n=n?n.then(u,u):u()}})}function z(r,e,t){var n="suspendedStart";return function(a,o){if(n==="executing")throw new Error("Generator is already running");if(n==="completed"){if(a==="throw")throw o;return P()}for(t.method=a,t.arg=o;;){var i=t.delegate;if(i){var u=G(i,t);if(u){if(u===l)continue;return u}}if(t.method==="next")t.sent=t._sent=t.arg;else if(t.method==="throw"){if(n==="suspendedStart")throw n="completed",t.arg;t.dispatchException(t.arg)}else t.method==="return"&&t.abrupt("return",t.arg);n="executing";var c=S(r,e,t);if(c.type==="normal"){if(n=t.done?"completed":"suspendedYield",c.arg===l)continue;return{value:c.arg,done:t.done}}c.type==="throw"&&(n="completed",t.method="throw",t.arg=c.arg)}}}function G(r,e){var t=e.method,n=r.iterator[t];if(n===void 0)return e.delegate=null,t==="throw"&&r.iterator.return&&(e.method="return",e.arg=void 0,G(r,e),e.method==="throw")||t!=="return"&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+t+"' method")),l;var a=S(n,r.iterator,e.arg);if(a.type==="throw")return e.method="throw",e.arg=a.arg,e.delegate=null,l;var o=a.arg;return o?o.done?(e[r.resultName]=o.value,e.next=r.nextLoc,e.method!=="return"&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function J(r){var e={tryLoc:r[0]};1 in r&&(e.catchLoc=r[1]),2 in r&&(e.finallyLoc=r[2],e.afterLoc=r[3]),this.tryEntries.push(e)}function M(r){var e=r.completion||{};e.type="normal",delete e.arg,r.completion=e}function I(r){this.tryEntries=[{tryLoc:"root"}],r.forEach(J,this),this.reset(!0)}function j(r){if(r){var e=r[b];if(e)return e.call(r);if(typeof r.next=="function")return r;if(!isNaN(r.length)){var t=-1,n=function a(){for(;++t<r.length;)if(m.call(r,t))return a.value=r[t],a.done=!1,a;return a.value=void 0,a.done=!0,a};return n.next=n}}return{next:P}}function P(){return{value:void 0,done:!0}}return _.prototype=h,N(p,"constructor",{value:h,configurable:!0}),N(h,"constructor",{value:_,configurable:!0}),_.displayName=d(h,O,"GeneratorFunction"),s.isGeneratorFunction=function(r){var e=typeof r=="function"&&r.constructor;return!!e&&(e===_||(e.displayName||e.name)==="GeneratorFunction")},s.mark=function(r){return Object.setPrototypeOf?Object.setPrototypeOf(r,h):(r.__proto__=h,d(r,O,"GeneratorFunction")),r.prototype=Object.create(p),r},s.awrap=function(r){return{__await:r}},V(T.prototype),d(T.prototype,$,function(){return this}),s.AsyncIterator=T,s.async=function(r,e,t,n,a){a===void 0&&(a=Promise);var o=new T(y(r,e,t,n),a);return s.isGeneratorFunction(e)?o:o.next().then(function(i){return i.done?i.value:o.next()})},V(p),d(p,O,"Generator"),d(p,b,function(){return this}),d(p,"toString",function(){return"[object Generator]"}),s.keys=function(r){var e=Object(r),t=[];for(var n in e)t.push(n);return t.reverse(),function a(){for(;t.length;){var o=t.pop();if(o in e)return a.value=o,a.done=!1,a}return a.done=!0,a}},s.values=j,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(M),!e)for(var t in this)t.charAt(0)==="t"&&m.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=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 t=this;function n(w,v){return i.type="throw",i.arg=e,t.next=w,v&&(t.method="next",t.arg=void 0),!!v}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if(o.tryLoc==="root")return n("end");if(o.tryLoc<=this.prev){var u=m.call(o,"catchLoc"),c=m.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&m.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&(e==="break"||e==="continue")&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(i)},complete:function(e,t){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"&&t&&(this.next=t),l},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),M(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var a=n.completion;if(a.type==="throw"){var o=a.arg;M(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:j(e),resultName:t,nextLoc:n},this.method==="next"&&(this.arg=void 0),l}},s}var Ne=B.default=function(){var s={getCode:ie.a,callback:function(){var L=Object(X.a)(ue().mark(function N(A){var b;return ue().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return O.next=2,Object(ie.c)(A);case 2:return b=O.sent,O.abrupt("return",b);case 4:case"end":return O.stop()}},N)}));function m(N){return L.apply(this,arguments)}return m}(),validateName:ie.d};return g.a.createElement(je,s)}},YrPe:function(ne,B,f){"use strict";f.d(B,"d",function(){return U}),f.d(B,"a",function(){return g}),f.d(B,"b",function(){return ee}),f.d(B,"e",function(){return W}),f.d(B,"c",function(){return Z});var X=f("ErOA");function U(F){return Object(X.c)("accounts/valid_email_and_phone.json",F)}function g(F){return Object(X.c)("accounts/get_verification_code.json",F)}function ee(F){return Object(X.f)("accounts/register.json",F)}function W(F){return Object(X.f)("weapps/register.json",F)}function Z(F){return Object(X.f)("accounts/reset_password.json",F)}},bRQS:function(ne,B,f){"use strict";var X=f("VTBJ"),U=f("q1tI"),g={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"},ee=g,W=f("6VBw"),Z=function(Y,Q){return U.createElement(W.a,Object(X.a)(Object(X.a)({},Y),{},{ref:Q,icon:ee}))};Z.displayName="CheckOutlined";var F=B.a=U.forwardRef(Z)},tJYU:function(ne,B,f){}}]);
|