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/layouts__index.a8e4e263.asy...

1 line
64 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[29,14],{"+ego":function(e,t,r){"use strict";r.r(t);r("GNNt");var n=r("wEI+"),a=(r("T2oS"),r("W9HT")),o=(r("2qtc"),r("kLXV")),i=r("PpiC"),c=r("q1tI"),l=r.n(c),s=r("+Gva"),u=r("9kvl"),f=(r("14J3"),r("BMrR")),h=(r("jCWc"),r("kPKH")),p=(r("miYZ"),r("tsqr")),d=r("k1fw"),m=r("9og8"),g=r("tJVT"),v=(r("Znn+"),r("ZTPi")),y=(r("+L6B"),r("2/Rp")),w=(r("sRBo"),r("kaz8")),b=(r("5NDa"),r("5rEg")),E=(r("y8nQ"),r("Vl3Y")),x=r("jb+D"),_=r("4i/N"),j=r("m3rI"),O=r("Ty5D"),L=(r("0zpY"),r("J66h"));function k(){k=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof v?t:v,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:L(e,r,c)}),i}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var h="suspendedStart",p="suspendedYield",d="executing",m="completed",g={};function v(){}function y(){}function w(){}var b={};s(b,i,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(I([])));x&&x!==r&&n.call(x,i)&&(b=x);var _=w.prototype=v.prototype=Object.create(b);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(a,o,i,c){var l=f(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function L(t,r,n){var a=h;return function(o,i){if(a===d)throw new Error("Generator is already running");if(a===m){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=T(c,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===h)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=d;var s=f(t,r,n);if("normal"===s.type){if(a=n.done?m:p,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=m,n.method="throw",n.arg=s.arg)}}}function T(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=f(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=w,a(_,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:y,configurable:!0}),y.displayName=s(w,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},j(O.prototype),s(O.prototype,c,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new O(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(S),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&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,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;S(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}var T={height:48,borderRadius:4},N=function(e){var t=e.dispatch,r=(e.setType,e.user),n=e.setusername,a=E["a"].useForm(),o=Object(g["a"])(a,1),i=o[0],s=Object(O["l"])(),f=Object(c["useState"])(""),h=Object(g["a"])(f,2),p=h[0],d=h[1],v=/^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$).{8,16}$/,N=Object(c["useState"])(0),S=Object(g["a"])(N,2),P=S[0],I=S[1];Object(c["useEffect"])((function(){i.resetFields()}),[r.showPopLogin]);var F=Object(c["useMemo"])((function(){return"/rucaptcha?t="+(new Date).getTime()}),[P]),G=function(){var e=Object(m["a"])(k().mark((function e(t){var r,a,o,c;return k().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return v.test(t.password)||(n(t.login),d("\u7cfb\u7edf\u68c0\u6d4b\u60a8\u7684\u5bc6\u7801\u5f3a\u5ea6\u8fc7\u4f4e\uff0c\u8bf7\u53ca\u65f6\u4fee\u6539")),t.password=L["Base64"].encode(t.password),e.next=4,Object(x["b"])(t);case 4:if(r=e.sent,!r.status){e.next=9;break}return d(null===r||void 0===r?void 0:r.message),I(P+1),e.abrupt("return");case 9:(null===r||void 0===r?void 0:r.show)?(localStorage.setItem("extension-modal","exist"),localStorage.setItem("extension-date",null===r||void 0===r?void 0:r.start_date)):localStorage.removeItem("extension-modal"),console.log(u["c"],"history"),"/user/login"===s.pathname||"/login"===s.pathname?(c=(null===(a=s.query)||void 0===a?void 0:a.from)||(null===(o=s.query)||void 0===o?void 0:o.back_url),c?window.location.href=decodeURIComponent(c):u["c"].replace("/")):window.location.reload(),i.resetFields();case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return l.a.createElement(E["a"],{layout:"vertical",form:i,initialValues:{autologin:!0,login:r.actionTabs.phone},onFinish:G,onValuesChange:function(){return d("")}},!!p&&l.a.createElement("div",{className:"res-error-values"},l.a.createElement("span",null,p),l.a.createElement(_["a"],{onClick:function(){return d("")}})),l.a.createElement(E["a"].Item,{name:"login",rules:[{required:!0,message:"\u8bf7\u8f93\u5165\u7528\u6237\u540d\u3001\u624b\u673a\u53f7\u6216\u90ae\u7bb1"}]},l.a.createElement(b["a"],{style:T,size:"large",placeholder:"\u8bf7\u8f93\u5165\u6709\u6548\u7684\u624b\u673a\u53f7/\u90ae\u7bb1\u53f7/\u8d26\u53f7",onBlur:function(){t({type:"user/setActionTabs",payload:{phone:i.getFieldValue("login")}})}})),l.a.createElement(E["a"].Item,{name:"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"}]},l.a.createElement(b["a"].Password,{style:T,size:"large",placeholder:"\u5bc6\u7801"})),l.a.createElement(E["a"].Item,null,l.a.createElement("div",{className:"flex-container",style:{justifyContent:"space-between"}},l.a.createElement(E["a"].Item,{name:"autologin",noStyle:!0,valuePropName:"checked"},l.a.createElement(w["a"],null,"\u4e0b\u6b21\u81ea\u52a8\u767b\u5f55")),l.a.createElement("div",null))),l.a.createElement(E["a"].Item,{name:"code",rules:[{required:!0,message:"\u8bf7\u8f93\u5165\u9a8c\u8bc1\u7801"}]},l.a.createElement("div",{style:{display:"flex"}},l.a.createElement(b["a"],{style:T,size:"large",placeholder:"\u9a8c\u8bc1\u7801"}),l.a.createElement("img",{src:(null===j["a"]||void 0===j["a"]?void 0:j["a"].API_SERVER)+F,style:{height:"32px",marginLeft:"10px"},onClick:function(){I(P+1)}}))),l.a.createElement(E["a"].Item,null,l.a.createElement(y["a"],{size:"large",type:"primary",htmlType:"submit",block:!0,className:"font16",style:T},"\u767b\u5f55")),l.a.createElement("div",{className:"tc",style:{paddingTop:0,paddingBottom:20}},"\u767b\u5f55\u5373\u4ee3\u8868\u60a8\u5df2\u9605\u8bfb\u5e76\u540c\u610f",l.a.createElement("a",{href:"https://engineer.educoder.net/help?index=4",target:"_blank"},"\u300a\u670d\u52a1\u534f\u8bae\u6761\u6b3e\u300b")))},S=Object(u["a"])((function(e){var t=e.user,r=e.loading,n=e.globalSetting;return{user:t,globalSetting:n,loading:r.models.index}}))(N),P=(r("5Dmo"),r("3S7+")),I=r("1vsH");function F(){F=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof v?t:v,i=Object.create(o.prototype),c=new S(n||[]);return a(i,"_invoke",{value:L(e,r,c)}),i}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var h="suspendedStart",p="suspendedYield",d="executing",m="completed",g={};function v(){}function y(){}function w(){}var b={};s(b,i,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(P([])));x&&x!==r&&n.call(x,i)&&(b=x);var _=w.prototype=v.prototype=Object.create(b);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(a,o,i,c){var l=f(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function L(t,r,n){var a=h;return function(o,i){if(a===d)throw new Error("Generator is already running");if(a===m){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===h)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=d;var s=f(t,r,n);if("normal"===s.type){if(a=n.done?m:p,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=m,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=f(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function P(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=w,a(_,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:y,configurable:!0}),y.displayName=s(w,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},j(O.prototype),s(O.prototype,c,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new O(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=P,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(N),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&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,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),N(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;N(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}var G={height:48},C=/(\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,q=/^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$).{8,16}$/,z={timer:0},A=function(e){return e[e["setTimer"]=0]="setTimer",e}(A||{});function B(e,t){switch(t.type){case A.setTimer:return Object(d["a"])(Object(d["a"])({},e),{},{timer:t.payload});default:throw new Error}}var V=function(e){var t,r=e.validateName,n=e.getCode,a=e.register,o=e.style,i=void 0===o?{}:o,s=e.buttonText,u=void 0===s?"\u6ce8\u518c":s,f=e.globalSetting,h=E["a"].useForm(),p=Object(g["a"])(h,1),d=p[0],v=Object(c["useReducer"])(B,z),w=Object(g["a"])(v,2),x=w[0],_=w[1],j=Object(c["useState"])(!1),O=Object(g["a"])(j,2),L=O[0],k=O[1],T=x.timer;function N(e){return S.apply(this,arguments)}function S(){return S=Object(m["a"])(F().mark((function e(t){var r,n,o,i,c,l;return F().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return r=t.login,n=t.password,o=t.code,e.next=3,a({login:r,password:n,code:o});case 3:if(i=e.sent,c=i.message,l=i.status,!(l<0)){e.next=10;break}return d.setFields([{name:"code",errors:[c]}]),e.abrupt("return");case 10:window.location.reload();case 11:case"end":return e.stop()}}),e)}))),S.apply(this,arguments)}function V(){return R.apply(this,arguments)}function R(){return R=Object(m["a"])(F().mark((function e(){var t,n,a,o,i,c;return F().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t=d.getFieldValue("login"),n=0,C.test(t)&&!(t.indexOf(" ")>-1)){e.next=6;break}return d.setFields([{name:"login",errors:["\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u624b\u673a\u53f7\u6216\u90ae\u7bb1"]}]),n=1,e.abrupt("return",n);case 6:return e.next=8,r({login:t,type:1});case 8:return a=e.sent,o=a.status,i=a.message,c=o>0,c?n=2:(d.setFields([{name:"login",errors:[i]}]),n=1),e.abrupt("return",n);case 14:case"end":return e.stop()}}),e)}))),R.apply(this,arguments)}var $=function(){var e=Object(m["a"])(F().mark((function e(){var t,r,a,o;return F().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(d.getFieldValue("verify"),t=d.getFieldValue("login"),t){e.next=6;break}d.validateFields(["login"]),e.next=15;break;case 6:return k(!0),e.next=9,n({login:t,type:1,smscode:Object(I["P"])(t)});case 9:r=e.sent,a=r.status,o=r.message,a<0&&d.setFields([{name:"code",errors:[o]}]),_({type:A.setTimer,payload:60}),k(!1);case 15:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();function D(e,t){if(!t)return Promise.resolve();if(!q.test(t))return Promise.reject("\u8bf7\u8f93\u51658~16\u4f4d\u5b57\u7b26\uff0c\u5b57\u6bcd\u3001\u6570\u5b57\u548c\u7279\u6b8a\u7b26\u53f7\u81f3\u5c11\u5305\u542b2\u79cd");if(t.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 r=t.length;return r>=8&&r<=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(c["useEffect"])((function(){T>0&&setTimeout((function(){_({type:A.setTimer,payload:T-1})}),1e3)}),[T]);var Y=function(e,t){return t?t.indexOf(" ")>-1?Promise.reject("\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u624b\u673a\u53f7\u6216\u90ae\u7bb1"):C.test(t)?Promise.resolve():Promise.reject("\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u624b\u673a\u53f7\u6216\u90ae\u7bb1"):Promise.resolve()};return l.a.createElement(E["a"],{layout:"vertical",form:d,style:i,initialValues:{autologin:!0,protool:!1},onFinish:N},l.a.createElement(E["a"].Item,{name:"login",rules:[{required:!0,message:"\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u624b\u673a\u53f7\u6216\u90ae\u7bb1"},{validator:Y}]},l.a.createElement(b["a"],{style:G,autoComplete:"new-login",size:"large",placeholder:"\u8bf7\u8f93\u5165\u6709\u6548\u7684\u624b\u673a\u53f7/\u90ae\u7bb1\u53f7",onBlur:function(){return V},onChange:function(){return d.setFieldsValue({verify:0})}})),!(null===f||void 0===f||null===(t=f.setting)||void 0===t?void 0:t.is_local)&&l.a.createElement(E["a"].Item,{name:"code",rules:[{required:!0,message:"\u8bf7\u8f93\u5165\u9a8c\u8bc1\u7801"}]},l.a.createElement(b["a"],{suffix:l.a.createElement(y["a"],{loading:L,type:"link",onClick:$,disabled:T>0}," ",0===T?"\u83b7\u53d6\u9a8c\u8bc1\u7801":"".concat(T,"\u79d2\u53ef\u91cd\u65b0\u83b7\u53d6")),style:{paddingRight:2,height:48},placeholder:"\u8bf7\u8f93\u5165\u9a8c\u8bc1\u7801",size:"large"})),l.a.createElement(P["a"],{title:l.a.createElement("div",null,l.a.createElement("span",null,"\u957f\u5ea6\u4e3a8-16\u4f4d\u5b57\u7b26"),l.a.createElement("br",null),l.a.createElement("span",null,"\u5b57\u6bcd/\u6570\u5b57\u4ee5\u53ca\u6807\u70b9\u7b26\u53f7\u81f3\u5c11\u5305\u542b2\u79cd"),l.a.createElement("br",null),l.a.createElement("span",null,"\u4e0d\u5141\u8bb8\u6709\u7a7a\u683c\u3001\u4e2d\u6587")),placement:"topRight"},l.a.createElement(E["a"].Item,{name:"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:D}]},l.a.createElement(b["a"].Password,{autoComplete:"new-password",style:G,size:"large",placeholder:"\u8bf7\u8f93\u51658~16\u4f4d\u5b57\u7b26\uff0c\u5b57\u6bcd\u3001\u6570\u5b57\u548c\u7279\u6b8a\u7b26\u53f7\u81f3\u5c11\u5305\u542b2\u79cd"}))),l.a.createElement(E["a"].Item,null,l.a.createElement(y["a"],{size:"large",type:"primary",htmlType:"submit",block:!0,style:G,className:"font16"}," ",u," ")),l.a.createElement("div",{className:"tc",style:{paddingTop:0,paddingBottom:35}},"\u6ce8\u518c\u5e76\u767b\u5f55\u5373\u4ee3\u8868\u60a8\u5df2\u9605\u8bfb\u5e76\u540c\u610f",l.a.createElement("a",{href:"https://engineer.educoder.net/help?index=4",target:"_blank"},"\u300a\u670d\u52a1\u534f\u8bae\u6761\u6b3e\u300b")))},R=Object(u["a"])((function(e){var t=e.globalSetting;return{globalSetting:t}}))(V);function $(){$=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof v?t:v,i=Object.create(o.prototype),c=new S(n||[]);return a(i,"_invoke",{value:L(e,r,c)}),i}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var h="suspendedStart",p="suspendedYield",d="executing",m="completed",g={};function v(){}function y(){}function w(){}var b={};s(b,i,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(P([])));x&&x!==r&&n.call(x,i)&&(b=x);var _=w.prototype=v.prototype=Object.create(b);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(a,o,i,c){var l=f(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function L(t,r,n){var a=h;return function(o,i){if(a===d)throw new Error("Generator is already running");if(a===m){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===h)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=d;var s=f(t,r,n);if("normal"===s.type){if(a=n.done?m:p,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=m,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=f(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function P(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=w,a(_,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:y,configurable:!0}),y.displayName=s(w,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},j(O.prototype),s(O.prototype,c,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new O(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=P,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(N),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&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,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),N(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;N(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}var D={height:48},Y=/(\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,Z=/^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$).{8,16}$/,U={timer:0},Q=function(e){return e[e["setTimer"]=0]="setTimer",e}(Q||{});function J(e,t){switch(t.type){case Q.setTimer:return Object(d["a"])(Object(d["a"])({},e),{},{timer:t.payload});default:throw new Error}}var M=function(e){var t,r=e.validateName,n=e.getCode,a=e.register,o=e.style,i=void 0===o?{}:o,s=e.buttonText,u=void 0===s?"\u6ce8\u518c":s,f=e.globalSetting,h=E["a"].useForm(),p=Object(g["a"])(h,1),d=p[0],v=Object(c["useReducer"])(J,U),w=Object(g["a"])(v,2),x=w[0],_=w[1],j=Object(c["useState"])(!1),O=Object(g["a"])(j,2),k=O[0],T=O[1],N=x.timer;function S(e){return F.apply(this,arguments)}function F(){return F=Object(m["a"])($().mark((function e(t){var r,n,o,i,c,l;return $().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return r=t.login,n=t.new_password,o=t.code,t.new_password=L["Base64"].encode(t.new_password),e.next=4,a({login:r,new_password:n,code:o});case 4:if(i=e.sent,c=i.message,l=i.status,!(l<0)){e.next=10;break}return d.setFields([{name:"code",errors:[c]}]),e.abrupt("return");case 10:location.reload();case 11:case"end":return e.stop()}}),e)}))),F.apply(this,arguments)}var G=function(){var e=Object(m["a"])($().mark((function e(){var t,r,a,o;return $().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return d.getFieldValue("verify"),t=d.getFieldValue("login"),e.next=4,d.validateFields(["login"]);case 4:if(t){e.next=8;break}d.validateFields(["login"]),e.next=17;break;case 8:return T(!0),e.next=11,n({login:t,type:2,smscode:Object(I["P"])(t)});case 11:r=e.sent,a=r.status,o=r.message,a<0&&d.setFields([{name:"code",errors:[o]}]),_({type:Q.setTimer,payload:60}),T(!1);case 17:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();function C(e,t){if(!t)return Promise.resolve();if(!Z.test(t))return Promise.reject("\u8bf7\u8f93\u51658~16\u4f4d\u5b57\u7b26\uff0c\u5b57\u6bcd\u3001\u6570\u5b57\u548c\u7279\u6b8a\u7b26\u53f7\u81f3\u5c11\u5305\u542b2\u79cd");if(t.indexOf(" ")>-1)return Promise.reject("\u8bf7\u8f93\u51658-16\u4f4d\u65b0\u5bc6\u7801\uff0c\u533a\u5206\u5927\u5c0f\u5199\u3001\u4e0d\u80fd\u4f7f\u7528\u7a7a\u683c");var r=t.length;return r>=8&&r<=16?Promise.resolve():Promise.reject("\u8bf7\u8f93\u51658-16\u4f4d\u65b0\u5bc6\u7801\uff0c\u533a\u5206\u5927\u5c0f\u5199\u3001\u4e0d\u80fd\u4f7f\u7528\u7a7a\u683c")}Object(c["useEffect"])((function(){N>0&&setTimeout((function(){_({type:Q.setTimer,payload:N-1})}),1e3)}),[N]);var q=function(){var e=Object(m["a"])($().mark((function e(t,n){var a,o,i,c;return $().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n){e.next=2;break}return e.abrupt("return",Promise.resolve());case 2:if(!(n.indexOf(" ")>-1)){e.next=4;break}return e.abrupt("return",Promise.reject("\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u624b\u673a\u53f7\u6216\u90ae\u7bb1"));case 4:if(!Y.test(n)){e.next=18;break}return e.next=7,r({login:n,type:2});case 7:if(a=e.sent,o=a.status,i=a.message,c=o>0,!c){e.next=15;break}return e.abrupt("return",Promise.resolve());case 15:return e.abrupt("return",Promise.reject(i));case 16:e.next=19;break;case 18:return e.abrupt("return",Promise.reject("\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u624b\u673a\u53f7\u6216\u90ae\u7bb1"));case 19:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();return l.a.createElement(E["a"],{layout:"vertical",form:d,style:i,initialValues:{autologin:!0,protool:!1},onFinish:S},l.a.createElement(E["a"].Item,{name:"login",rules:[{required:!0,message:"\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u624b\u673a\u53f7\u6216\u90ae\u7bb1"},{validator:q}]},l.a.createElement(b["a"],{style:D,autoComplete:"new-login",size:"large",placeholder:"\u8bf7\u8f93\u5165\u6709\u6548\u7684\u624b\u673a\u53f7/\u90ae\u7bb1\u53f7",onChange:function(){return d.setFieldsValue({verify:0})}})),l.a.createElement(P["a"],{title:l.a.createElement("div",null,l.a.createElement("span",null,"\u957f\u5ea6\u4e3a8-16\u4f4d\u5b57\u7b26"),l.a.createElement("br",null),l.a.createElement("span",null,"\u5b57\u6bcd/\u6570\u5b57\u4ee5\u53ca\u6807\u70b9\u7b26\u53f7\u81f3\u5c11\u5305\u542b2\u79cd"),l.a.createElement("br",null),l.a.createElement("span",null,"\u4e0d\u5141\u8bb8\u6709\u7a7a\u683c\u3001\u4e2d\u6587")),placement:"topRight"},l.a.createElement(E["a"].Item,{name:"new_password",rules:[{required:!0,message:"\u8bf7\u8f93\u51658-16\u4f4d\u65b0\u5bc6\u7801\uff0c\u533a\u5206\u5927\u5c0f\u5199\u3001\u4e0d\u80fd\u4f7f\u7528\u7a7a\u683c"},{validator:C}]},l.a.createElement(b["a"].Password,{autoComplete:"new-password",style:D,size:"large",placeholder:"\u8f93\u51658\uff5e16\u4f4d\u65b0\u5bc6\u7801\uff0c\u533a\u5206\u5927\u5c0f\u5199"}))),!(null===f||void 0===f||null===(t=f.setting)||void 0===t?void 0:t.is_local)&&l.a.createElement(E["a"].Item,{name:"code",rules:[{required:!0,message:"\u8bf7\u8f93\u5165\u9a8c\u8bc1\u7801"}]},l.a.createElement(b["a"],{suffix:l.a.createElement(y["a"],{loading:k,type:"link",onClick:G,disabled:N>0}," ",0===N?"\u83b7\u53d6\u9a8c\u8bc1\u7801":"".concat(N,"\u79d2\u53ef\u91cd\u65b0\u83b7\u53d6")),style:{paddingRight:2,height:48},placeholder:"\u8bf7\u8f93\u5165\u9a8c\u8bc1\u7801",size:"large"})),l.a.createElement(E["a"].Item,null,l.a.createElement(y["a"],{size:"large",type:"primary",htmlType:"submit",block:!0,style:D,className:"font16"}," ",u," ")),l.a.createElement("div",{className:"tc",style:{paddingTop:0,paddingBottom:20}},"\u4fee\u6539\u5e76\u767b\u5f55\u5373\u4ee3\u8868\u60a8\u5df2\u9605\u8bfb\u5e76\u540c\u610f",l.a.createElement("a",{href:"https://engineer.educoder.net/help?index=4",target:"_blank"},"\u300a\u670d\u52a1\u534f\u8bae\u6761\u6b3e\u300b")))},H=Object(u["a"])((function(e){var t=e.globalSetting;return{globalSetting:t}}))(M),W=r("h0ge"),K=r.n(W),X=r("/nL+"),ee=r.n(X),te=r("IxGP"),re=r.n(te),ne=window.location.host,ae=j["a"].QQLoginCB,oe=function(e){var t=e.onWechatLogin,r=e.setType,n=e.loginType;function a(){Object(I["H"])()?window.location.href="https://graph.qq.com/oauth2.0/show?which=Login&display=pc&client_id=101508858&redirect_uri=".concat(ae,"%2fotherloginqq&state=null,").concat(ne,"&response_type=code"):Object(I["L"])("https://xui.ptlogin2.qq.com/cgi-bin/xlogin?appid=716027609&pt_3rd_aid=101508858&daid=383&pt_skey_valid=0&style=35&s_url=http%3A%2F%2Fconnect.qq.com&refer_cgi=authorize&which=&client_id=101508858&response_type=code&scope=get_user_info&redirect_uri=".concat(ae,"%2fotherloginqq&state=null,").concat(ne,"&response_type=code"))}return l.a.createElement(l.a.Fragment,null,(1===n||2===n)&&l.a.createElement("div",{style:{marginTop:4===n?20:92,marginBottom:60},className:"font16 tc"},"\u6ca1\u6709\u8d26\u53f7\uff1f",l.a.createElement("span",{onClick:function(){return r(3)},className:"c-blue current"},"\u514d\u8d39\u6ce8\u518c")),(3===n||4===n||5===n)&&l.a.createElement("div",{style:{marginTop:92,marginBottom:60},className:"font16 tc"},"\u5df2\u6709\u8d26\u53f7\uff1f",l.a.createElement("span",{onClick:function(){return r(1)},className:"c-blue current"},"\u7acb\u5373\u767b\u5f55")),l.a.createElement("p",{className:re.a.driver},l.a.createElement("span",{style:{color:"#444444"}},"\u5feb\u901f\u767b\u5f55")),l.a.createElement("div",{className:re.a["other-login"]},l.a.createElement("a",{title:"\u5fae\u4fe1\u767b\u5f55",onClick:t},l.a.createElement("img",{src:K.a,alt:"\u5fae\u4fe1",width:66})),l.a.createElement("a",{title:"qq\u767b\u5f55",onClick:a},l.a.createElement("img",{src:ee.a,alt:"QQ",width:66}))))};function ie(e){e.onBack;var t=e.setType;return l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{style:{overflow:"hidden",width:300,height:300,margin:"20px auto 0 auto"}},l.a.createElement("iframe",{className:re.a["wechat-qrcode"],frameBorder:"0",sandbox:"allow-scripts allow-same-origin allow-top-navigation",scrolling:"no",src:"https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=".concat(ae,"%2fotherloginstart&response_type=code&scope=snsapi_login&state=null,").concat(ne,"#wechat_redirect")})),l.a.createElement("div",{style:{marginTop:17,marginBottom:10},className:"font16 bold tc c-blue current"},l.a.createElement("span",{onClick:function(){return t(1)},style:{borderBottom:"2px solid #1890FF"}},"\u8fd4\u56de\u8d26\u53f7\u767b\u5f55")),l.a.createElement("div",{className:"tc",style:{paddingTop:14,paddingBottom:40}},"\u767b\u5f55\u5373\u4ee3\u8868\u60a8\u5df2\u9605\u8bfb\u5e76\u540c\u610f",l.a.createElement("a",{href:"https://engineer.educoder.net/help?index=4",target:"_blank"},"\u300a\u670d\u52a1\u534f\u8bae\u6761\u6b3e\u300b")))}function ce(){ce=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof v?t:v,i=Object.create(o.prototype),c=new S(n||[]);return a(i,"_invoke",{value:L(e,r,c)}),i}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var h="suspendedStart",p="suspendedYield",d="executing",m="completed",g={};function v(){}function y(){}function w(){}var b={};s(b,i,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(P([])));x&&x!==r&&n.call(x,i)&&(b=x);var _=w.prototype=v.prototype=Object.create(b);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(a,o,i,c){var l=f(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function L(t,r,n){var a=h;return function(o,i){if(a===d)throw new Error("Generator is already running");if(a===m){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===h)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=d;var s=f(t,r,n);if("normal"===s.type){if(a=n.done?m:p,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=m,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=f(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function P(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=w,a(_,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:y,configurable:!0}),y.displayName=s(w,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},j(O.prototype),s(O.prototype,c,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new O(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=P,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(N),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&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,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),N(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;N(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}var le={height:48},se=/^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$).{8,16}$/,ue={timer:0},fe=function(e){return e[e["setTimer"]=0]="setTimer",e}(fe||{});function he(e,t){switch(t.type){case fe.setTimer:return Object(d["a"])(Object(d["a"])({},e),{},{timer:t.payload});default:throw new Error}}var pe=function(e){e.validateName,e.getCode;var t=e.register,r=e.style,n=void 0===r?{}:r,a=e.buttonText,o=void 0===a?"\u6ce8\u518c":a,i=(e.globalSetting,E["a"].useForm()),s=Object(g["a"])(i,1),u=s[0],f=Object(c["useReducer"])(he,ue),h=Object(g["a"])(f,2),p=h[0],d=h[1],v=Object(c["useState"])(!1),w=Object(g["a"])(v,2),x=(w[0],w[1],p.timer);function _(e){return j.apply(this,arguments)}function j(){return j=Object(m["a"])(ce().mark((function e(r){var n,a,o,i,c;return ce().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=r.old_password,a=r.newPassword,e.next=3,t({old_password:n,newPassword:a});case 3:if(o=e.sent,i=o.message,c=o.status,!(c<0)){e.next=9;break}return u.setFields([{name:"code",errors:[i]}]),e.abrupt("return");case 9:case"end":return e.stop()}}),e)}))),j.apply(this,arguments)}var O=function(e,t,r){t?t.indexOf(" ")>-1?r("\u8bf7\u8f93\u51658-16\u4f4d\u5bc6\u7801\uff0c\u533a\u5206\u5927\u5c0f\u5199\u3001\u4e0d\u80fd\u4f7f\u7528\u7a7a\u683c"):t.length<8||t.length>16?r("\u8bf7\u8f93\u51658-16\u4f4d\u5b57\u7b26\u7684\u65b0\u5bc6\u7801\uff0c\u533a\u5206\u5927\u5c0f\u5199\uff01"):se.test(t)?r():r("\u8bf7\u8f93\u51658~16\u4f4d\u5b57\u7b26\uff0c\u5b57\u6bcd\u3001\u6570\u5b57\u548c\u7279\u6b8a\u7b26\u53f7\u81f3\u5c11\u5305\u542b2\u79cd"):r("\u8bf7\u8f93\u51658-16\u4f4d\u5b57\u7b26\u7684\u65b0\u5bc6\u7801\uff0c\u533a\u5206\u5927\u5c0f\u5199\uff01")};return Object(c["useEffect"])((function(){x>0&&setTimeout((function(){d({type:fe.setTimer,payload:x-1})}),1e3)}),[x]),l.a.createElement(E["a"],{layout:"vertical",form:u,style:n,initialValues:{autologin:!0,protool:!1},onFinish:_},l.a.createElement(E["a"].Item,{name:"old_password",rules:[{required:!0,message:"\u8bf7\u8f93\u51658\uff5e16\u4f4d\u5bc6\u7801\uff0c\u533a\u5206\u5927\u5c0f\u5199"}]},l.a.createElement(b["a"],{style:le,autoComplete:"new-login",size:"large",type:"password",placeholder:"\u8bf7\u8f93\u5165\u65e7\u5bc6\u7801",onChange:function(){return u.setFieldsValue({verify:0})}})),l.a.createElement(P["a"],{title:l.a.createElement("div",null,l.a.createElement("span",null,"\u957f\u5ea6\u4e3a8-16\u4f4d\u5b57\u7b26"),l.a.createElement("br",null),l.a.createElement("span",null,"\u5b57\u6bcd/\u6570\u5b57\u4ee5\u53ca\u6807\u70b9\u7b26\u53f7\u81f3\u5c11\u5305\u542b2\u79cd"),l.a.createElement("br",null),l.a.createElement("span",null,"\u4e0d\u5141\u8bb8\u6709\u7a7a\u683c\u3001\u4e2d\u6587")),placement:"topRight"},l.a.createElement(E["a"].Item,{name:"newPassword",rules:[{required:!0,message:"\u8bf7\u8f93\u51658-16\u4f4d\u65b0\u5bc6\u7801\uff0c\u533a\u5206\u5927\u5c0f\u5199\u3001\u4e0d\u80fd\u4f7f\u7528\u7a7a\u683c"},{validator:O}]},l.a.createElement(b["a"].Password,{autoComplete:"new-password",style:le,size:"large",placeholder:"\u8f93\u51658\uff5e16\u4f4d\u65b0\u5bc6\u7801\uff0c\u533a\u5206\u5927\u5c0f\u5199"}))),l.a.createElement(P["a"],{title:l.a.createElement("div",null,l.a.createElement("span",null,"\u957f\u5ea6\u4e3a8-16\u4f4d\u5b57\u7b26"),l.a.createElement("br",null),l.a.createElement("span",null,"\u5b57\u6bcd/\u6570\u5b57\u4ee5\u53ca\u6807\u70b9\u7b26\u53f7\u81f3\u5c11\u5305\u542b2\u79cd"),l.a.createElement("br",null),l.a.createElement("span",null,"\u4e0d\u5141\u8bb8\u6709\u7a7a\u683c\u3001\u4e2d\u6587")),placement:"topRight"},l.a.createElement(E["a"].Item,{name:"againPassword",rules:[{required:!0,message:"\u8bf7\u518d\u6b21\u8f93\u5165\u65b0\u5bc6\u7801"},{validator:function(e,t,r){t!=u.getFieldsValue().newPassword?r("\u4e24\u6b21\u8f93\u5165\u7684\u65b0\u5bc6\u7801\u5fc5\u987b\u4e00\u81f4\uff01"):r()}}]},l.a.createElement(b["a"].Password,{autoComplete:"new-password",style:le,size:"large",placeholder:"\u8bf7\u518d\u6b21\u8f93\u5165\u65b0\u5bc6\u7801"}))),l.a.createElement(E["a"].Item,null,l.a.createElement(y["a"],{size:"large",type:"primary",htmlType:"submit",block:!0,style:le,className:"font16"}," ",o," ")),l.a.createElement("div",{className:"tc",style:{paddingTop:0,paddingBottom:20}},"\u4fee\u6539\u5e76\u767b\u5f55\u5373\u4ee3\u8868\u60a8\u5df2\u9605\u8bfb\u5e76\u540c\u610f",l.a.createElement("a",{href:"https://engineer.educoder.net/help?index=4",target:"_blank"},"\u300a\u670d\u52a1\u534f\u8bae\u6761\u6b3e\u300b")))},de=Object(u["a"])((function(e){var t=e.globalSetting;return{globalSetting:t}}))(pe),me=r("4R62"),ge=r.n(me);function ve(){ve=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof v?t:v,i=Object.create(o.prototype),c=new S(n||[]);return a(i,"_invoke",{value:L(e,r,c)}),i}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var h="suspendedStart",p="suspendedYield",d="executing",m="completed",g={};function v(){}function y(){}function w(){}var b={};s(b,i,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(P([])));x&&x!==r&&n.call(x,i)&&(b=x);var _=w.prototype=v.prototype=Object.create(b);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(a,o,i,c){var l=f(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,c)}),(function(e){r("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function L(t,r,n){var a=h;return function(o,i){if(a===d)throw new Error("Generator is already running");if(a===m){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===h)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=d;var s=f(t,r,n);if("normal"===s.type){if(a=n.done?m:p,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a=m,n.method="throw",n.arg=s.arg)}}}function k(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,k(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=f(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function P(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=w,a(_,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:y,configurable:!0}),y.displayName=s(w,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,s(e,l,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},j(O.prototype),s(O.prototype,c,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new O(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(_),s(_,l,"Generator"),s(_,i,(function(){return this})),s(_,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=P,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(N),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&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,g):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),N(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;N(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}var ye=v["a"].TabPane,we=function(e){e.dispatch,e.is_main_site;var t=e.is_local,r=e.style,n=void 0===r?{}:r,a=Object(c["useState"])(!1),o=Object(g["a"])(a,2),i=(o[0],o[1]),s=Object(c["useState"])("1"),u=Object(g["a"])(s,2),y=u[0],w=u[1],b=Object(c["useState"])(1),E=Object(g["a"])(b,2),_=E[0],j=E[1],O=Object(c["useState"])(),k=Object(g["a"])(O,2),T=k[0],N=k[1];function P(){j(1),i(!1)}function I(){j(2),i(!0)}function F(e){console.log(e),w(e)}x["G"],x["w"],function(){var e=Object(m["a"])(ve().mark((function e(t){var r;return ve().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(x["a"])({phone:t.login,code:t.code});case 2:if(r=e.sent,0!==r.status){e.next=6;break}return(null===r||void 0===r?void 0:r.show)?(localStorage.setItem("extension-modal","exist"),localStorage.setItem("extension-date",null===r||void 0===r?void 0:r.start_date)):localStorage.removeItem("extension-modal"),e.abrupt("return","/");case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}}();var G={buttonText:"\u6ce8\u518c\u5e76\u767b\u5f55",validateName:x["G"],getCode:x["w"],register:function(){var e=Object(m["a"])(ve().mark((function e(t){var r,n;return ve().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(x["z"])(Object(d["a"])({},t));case 2:if(r=e.sent,0!==r.status){e.next=9;break}return n=localStorage.getItem("addinfo"),"1"===n?localStorage.setItem("addinfo","2"):localStorage.setItem("registeruser","1"),localStorage.removeItem("extension-modal"),p["b"].info("\u6ce8\u518c\u5e76\u767b\u9646\u6210\u529f"),e.abrupt("return","/");case 9:return e.abrupt("return",r);case 10:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}()},C={buttonText:"\u4fee\u6539\u5bc6\u7801",validateName:x["G"],getCode:x["w"],register:function(){var e=Object(m["a"])(ve().mark((function e(t){var r;return ve().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(x["f"])(Object(d["a"])({login:T},t));case 2:return r=e.sent,p["b"].info("\u4fee\u6539\u5bc6\u7801\u6210\u529f"),e.abrupt("return",r);case 5:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}()},q={buttonText:"\u4fee\u6539\u5e76\u767b\u5f55",validateName:x["G"],getCode:x["w"],register:function(){var e=Object(m["a"])(ve().mark((function e(t){var r;return ve().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.new_password_confirmation=L["Base64"].encode(t.new_password),t.new_password=L["Base64"].encode(t.new_password),e.next=4,Object(x["A"])(Object(d["a"])({},t));case 4:if(r=e.sent,0!==r.status){e.next=9;break}return(null===r||void 0===r?void 0:r.show)?(localStorage.setItem("extension-modal","exist"),localStorage.setItem("extension-date",null===r||void 0===r?void 0:r.start_date)):localStorage.removeItem("extension-modal"),p["b"].info("\u4fee\u6539\u6210\u529f"),e.abrupt("return","/");case 9:return e.abrupt("return",r);case 10:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}()},z=Object(c["useCallback"])((function(){switch(_){case 1:return l.a.createElement(v["a"],{defaultActiveKey:y,onChange:F,className:ge.a.tabs},l.a.createElement(ye,{tab:"\u8d26\u53f7\u767b\u5f55",key:"1"},l.a.createElement("div",{className:"mt20"},"1"===y&&l.a.createElement(S,{setusername:N,setType:j}))));case 2:return l.a.createElement(ie,{setType:j,onBack:P});case 3:return l.a.createElement("div",{className:"ml40"},l.a.createElement("h1",{className:"font18 mb20 mt35"},"\u65b0\u7528\u6237\u6ce8\u518c"),l.a.createElement(R,G));case 4:return l.a.createElement("div",{className:"ml40"},l.a.createElement("h1",{className:"font18 mb20 mt35"},"\u627e\u56de\u5bc6\u7801"),l.a.createElement(H,q));case 5:return l.a.createElement("div",{className:"ml40"},l.a.createElement("h1",{className:"font18 mb20 mt35"},"\u4fee\u6539\u5bc6\u7801"),l.a.createElement(de,C))}}),[_,y]);return l.a.createElement("div",{className:ge.a["login-panel-wrapper2"],style:n},l.a.createElement(f["a"],null,l.a.createElement(h["a"],{flex:"1"},z()),t&&l.a.createElement(h["a"],{flex:"40px"}),l.a.createElement(h["a"],{flex:"295px",className:ge.a["login-panel-right-wrp"]},!t&&l.a.createElement(oe,{loginType:_,setType:j,onWechatLogin:I}))))},be=r("1TMG"),Ee=r.n(be),xe=function(e){var t,r,n=e.user,a=e.globalSetting,i=(e.loading,e.dispatch),c=function(){i({type:"user/showPopLogin",payload:{showPopLogin:!1,showClosable:!1}})},s=null===(t=a.setting)||void 0===t?void 0:t.main_site,u=null===(r=a.setting)||void 0===r?void 0:r.is_local;return l.a.createElement(o["a"],{centered:!0,visible:n.showPopLogin,footer:null,width:u?420:765,keyboard:!1,maskClosable:!1,wrapClassName:Ee.a.popLogin,closable:n.showClosable,onCancel:c},n.showPopLogin&&l.a.createElement(we,{is_main_site:s,is_local:u}))},_e=Object(u["a"])((function(e){var t=e.user,r=e.loading,n=e.globalSetting;return{user:t,globalSetting:n,loading:r.models.index}}))(xe),je=r("wd/R"),Oe=r.n(je),Le=function(e){e.loading;var t=e.globalSetting,r=e.children,f=e.user,h=e.dispatch,p=e.location,d=(Object(i["a"])(e,["loading","globalSetting","children","user","dispatch","location"]),t.globalLoading);Object(c["useEffect"])((function(){}),[]),Object(c["useEffect"])((function(){if(document.body.scrollIntoView(),h({type:"globalSetting/query",payload:{}}),h({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}}),console.log(p,":location"),"/admins"===p.pathname||"/sidekiq"===p.pathname){var e=document.domain;if(e.indexOf("educoder.net")>-1)switch(e){case"www.educoder.net":case"educoder.net":window.location.href="https://data.educoder.net".concat(p.pathname);break;default:var t=document.domain.split(".");t[0]=t[0]+"-data",window.location.href="https://".concat(t.join(".")).concat(p.pathname);break}}o["a"].destroyAll(),Object(u["e"])("zh-CN",!1)}),[p.pathname]),Object(c["useEffect"])((function(){t.updateData.system_update?localStorage.updateEndTime||(new Date).getTime()<new Date(t.updateData.end_time).getTime()&&o["a"].info({title:t.updateData.subject,content:t.updateData.system_score,onOk:function(){localStorage.updateEndTime=t.updateData.end_time}}):localStorage.removeItem("updateEndTime")}),[t.updateData.system_update]),Object(c["useEffect"])((function(){var e,t,r;(null===(e=f.userInfo)||void 0===e?void 0:e.login)&&(window.gtag("config","UA-198293321-1",{user_id:null===(t=f.userInfo)||void 0===t?void 0:t.login,custom_map:{dimension1:"user_id"}}),window.gtag("set",{user_id:null===(r=f.userInfo)||void 0===r?void 0:r.login}))}),[f.userInfo]),Object(c["useEffect"])((function(){var e,t,r,n,a,o;((null===(e=f.userInfo)||void 0===e?void 0:e.login)&&m(),null===(t=f.userInfo)||void 0===t?void 0:t.user_school)&&(Object(I["V"])([null===(r=f.userInfo)||void 0===r?void 0:r.user_school,null===(n=f.userInfo)||void 0===n?void 0:n.login,3]),Object(I["U"])(["\u7528\u6237\u8bbf\u95ee\u660e\u7ec6",null===(a=f.userInfo)||void 0===a?void 0:a.login,null===(o=f.userInfo)||void 0===o?void 0:o.user_school]))}),[f.userInfo,p.pathname]);var m=function(){var e,t=localStorage.trackUserTime,r=localStorage.trackUser;if(t&&Oe()(t).isSame(Oe()().startOf("day"),"d")&&r==(null===(e=f.userInfo)||void 0===e?void 0:e.login));else{var n,a,o,i;localStorage.trackUserTime=new Date,localStorage.trackUser=null===(n=f.userInfo)||void 0===n?void 0:n.login;var c,l,s,u="";switch(f.userInfo.role){case 1:u="\u8d85\u7ba1";break;case 2:u="\u8fd0\u8425";break;case 5:u="\u8ba4\u8bc1\u6559\u5e08";break;case 12:u="\u672a\u8ba4\u8bc1\u6559\u5e08";break;case 15:u="\u5b66\u751f";break}if("student"!==(null===(a=f.userInfo)||void 0===a?void 0:a.identity)&&"teacher"!==(null===(o=f.userInfo)||void 0===o?void 0:o.identity)&&(u="\u4e13\u4e1a\u4eba\u58eb"),null===(i=f.userInfo)||void 0===i?void 0:i.user_school)Object(I["U"])(["\u5b66\u6821\u6d3b\u8dc3\u7528\u6237",null===(c=f.userInfo)||void 0===c?void 0:c.user_school]),Object(I["U"])(["\u7528\u6237\u8bbf\u95ee\u660e\u7ec6",null===(l=f.userInfo)||void 0===l?void 0:l.login,null===(s=f.userInfo)||void 0===s?void 0:s.user_school]);Object(I["U"])(["\u5e73\u53f0PC\u7aef","\u603b\u6d3b\u8dc3\u7528\u6237\u6570"]),Object(I["U"])(["\u5e73\u53f0PC\u7aef",u])}};return l.a.createElement(n["a"],{locale:s["default"]},l.a.createElement(_e,null),l.a.createElement(a["a"],{size:"large",spinning:d.show,tip:d.text,className:"ant-spin-nested-loading-black"},r))};t["default"]=Object(u["a"])((function(e){var t=e.loading,r=e.globalSetting,n=e.user;return{loading:t,globalSetting:r,user:n}}))(Le)},"/nL+":function(e,t,r){e.exports=r.p+"static/qq.3cfa477b.svg"},"0zpY":function(e,t,r){},"1TMG":function(e,t,r){e.exports={popLogin:"popLogin___3dT1f"}},"4R62":function(e,t,r){e.exports={"login-panel-wrapper2":"login-panel-wrapper2___togLZ","ant-form-item-explain":"ant-form-item-explain___ThRBE","ant-form-item":"ant-form-item___3IV6B","ant-form-item-with-help":"ant-form-item-with-help___tz-ky","login-panel-right-wrp":"login-panel-right-wrp___2GQ8_","res-error-values":"res-error-values___2aGnb",tabs:"tabs___2wmM-"}},IxGP:function(e,t,r){e.exports={"other-login":"other-login___re0Nc","btn-link":"btn-link___1uZTy","wechat-qrcode":"wechat-qrcode___14L6l",driver:"driver___1fhl_"}},h0ge:function(e,t,r){e.exports=r.p+"static/wechat.044c9ad6.svg"}}]);