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

1 line
43 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[148,158],{BkJg:function(e,t,n){"use strict";n.r(t),n.d(t,"questionType",(function(){return X})),n.d(t,"difficultType",(function(){return $}));n("y8nQ");var r=n("Vl3Y"),a=(n("IzEo"),n("bx4M")),i=(n("T2oS"),n("W9HT")),o=(n("/zsF"),n("PArb")),c=(n("sPJy"),n("bE4q")),l=(n("+L6B"),n("2/Rp")),s=n("PpiC"),u=n("9og8"),f=(n("miYZ"),n("tsqr")),p=n("jrin"),h=n("k1fw"),d=n("fWQN"),m=n("mtLc"),y=n("yKVA"),v=n("879j"),g=(n("FJo9"),n("L41K")),b=n("q1tI"),_=n.n(b),w=(n("qVdP"),n("jsC+")),E=(n("7Kak"),n("9yH6")),x=(n("14J3"),n("BMrR")),L=(n("jCWc"),n("kPKH")),j=(n("giR+"),n("fyUT")),O=n("oBTY"),k=(n("lUTK"),n("BvKs")),S=(n("5NDa"),n("5rEg")),F=n("2BaD"),D=n("55Ip"),N=function(){return _.a.createElement("div",{style:{textAlign:"right",fontSize:12,color:"#ccc",marginTop:95}},"\u5982\u8003\u5bdf\u8303\u56f4\u4e0d\u80fd\u6ee1\u8db3\u9700\u6c42\uff0c\u8bf7\u81ea\u884c\u8865\u5145\u8bd5\u9898\u5145\u5b9e\u8003\u5bdf\u8303\u56f4",_.a.createElement(D["Link"],{to:"/problemset",target:"_blank",style:{marginLeft:10,color:"#1890FF"}},"\u73b0\u5728\u5c31\u53bb"))},T=N,C=n("Eaj2"),P=n.n(C),V=n("P/tu");function I(){I=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof v?t:v,o=Object.create(i.prototype),c=new D(r||[]);return a(o,"_invoke",{value:O(e,n,c)}),o}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",h="suspendedYield",d="executing",m="completed",y={};function v(){}function g(){}function b(){}var _={};s(_,o,(function(){return this}));var w=Object.getPrototypeOf,E=w&&w(w(N([])));E&&E!==n&&r.call(E,o)&&(_=E);var x=b.prototype=v.prototype=Object.create(_);function L(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(a,i,o,c){var l=f(e[a],e,i);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,o,c)}),(function(e){n("throw",e,o,c)})):t.resolve(u).then((function(e){s.value=e,o(s)}),(function(e){return n("throw",e,o,c)}))}c(l.arg)}var i;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return i=i?i.then(a,a):a()}})}function O(t,n,r){var a=p;return function(i,o){if(a===d)throw new Error("Generator is already running");if(a===m){if("throw"===i)throw o;return{value:e,done:!0}}for(r.method=i,r.arg=o;;){var c=r.delegate;if(c){var l=k(c,r);if(l){if(l===y)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===p)throw a=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=d;var s=f(t,n,r);if("normal"===s.type){if(a=r.done?m:h,s.arg===y)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(a=m,r.method="throw",r.arg=s.arg)}}}function k(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,k(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var i=f(a,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,y;var o=i.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function S(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 F(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function N(t){if(t||""===t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,i=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(typeof t+" is not iterable")}return g.prototype=b,a(x,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:g,configurable:!0}),g.displayName=s(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,s(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},L(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,r,a,i){void 0===i&&(i=Promise);var o=new j(u(e,n,r,a),i);return t.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},L(x),s(x,l,"Generator"),s(x,o,(function(){return this})),s(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=N,D.prototype={constructor:D,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(F),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=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 n=this;function a(r,a){return c.type="throw",c.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],c=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var l=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(l&&s){if(this.prev<o.catchLoc)return a(o.catchLoc,!0);if(this.prev<o.finallyLoc)return a(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return a(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return a(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&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(o)},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),y},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),F(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;F(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:N(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}var G=S["a"].TextArea,A=k["a"].SubMenu,K=function(e){return!e||Number.isNaN(Number(e))?"":Math.ceil(e)},R=function(e){Object(y["a"])(n,e);var t=Object(v["a"])(n);function n(){var e;Object(d["a"])(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return e=t.call.apply(t,[this].concat(a)),e.state={titleLen:0,subDisciplinesList:[],allGroupList:[],selectGroupList:[],openKeys:[],visible:null},e.componentDidMount=function(){setTimeout(Object(u["a"])(I().mark((function t(){return I().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.props.form){t.next=3;break}return t.next=3,e.setState({subDisciplinesList:e.props.form.getFieldValue("subDisciplines")||[]});case 3:case"end":return t.stop()}}),t)}))),1e3)},e.subDisciplinesAdd=function(t){var n=[],r=e.props.form.getFieldValue("subDisciplines")||[],a=r.filter((function(e){return t.id===e.id})).length>0;n=a?r.filter((function(e){return t.id!==e.id})):[].concat(Object(O["a"])(r),[t]),e.props.form.setFieldsValue({subDisciplines:n}),e.setState({subDisciplinesList:n})},e.disciplinesRemove=function(t){var n=e.props.form.getFieldValue("subDisciplines")||[],r=n.filter((function(e){return e.id!==t.id}));e.props.form.setFieldsValue({subDisciplines:r}),e.setState({subDisciplinesList:r})},e.handleSourceRadioChange=function(t){e.props.getdisciplines(t.target.value);var n=[];e.props.form.setFieldsValue({subDisciplines:n}),e.setState({subDisciplinesList:n})},e.dealList=function(){for(var t=e.state.subDisciplinesList,n=Object(O["a"])(t),r=0,a=[],i=0;i<n.length;i++){for(var o="",c=0;c<a.length;c++)if(a[c][0].parent_name==n[i].parent_name){r=1,o=c;break}if(1==r)a[o].push(n[i]),r=0;else if(0==r){var l=new Array;l.push(n[i]),a.push(l)}}return a},e}return Object(m["a"])(n,[{key:"render",value:function(){var e=this;if(!this.props.form)return"";var t=this.props,n=t.disciplines,i=t.form,o=(i.getFieldDecorator,i.getFieldValue),c=this.state,s=c.subDisciplinesList,u=(c.allGroupList,c.selectGroupList,c.openKeys),f=c.visible;return _.a.createElement("div",null,_.a.createElement(r["a"].Item,{label:"\u8bd5\u5377\u540d\u79f0:",name:"name",rules:[{required:!0,message:"\u8bd5\u5377\u540d\u79f0\u4e0d\u80fd\u4e3a\u7a7a"}]},_.a.createElement(S["a"],{style:{height:38},placeholder:"\u8bf7\u8f93\u5165\u8bd5\u5377\u6807\u9898\uff0c\u6700\u591a60\u5b57",suffix:this.state.titleLen+"/60",onChange:function(t){e.setState({titleLen:o("name").length})},maxLength:60})),_.a.createElement(x["a"],{align:"middle"},_.a.createElement(L["a"],null,_.a.createElement(r["a"].Item,{label:"\u8003\u8bd5\u65f6\u957f:",name:"time",rules:[{required:!0,message:"\u8003\u8bd5\u65f6\u957f\u4e0d\u80fd\u4e3a\u7a7a"}]},_.a.createElement(j["a"],{min:1,max:9999,placeholder:"\u8bf7\u8f93\u5165\u8bd5\u5377\u8003\u8bd5\u65f6\u957f",style:{width:150}}))),_.a.createElement(L["a"],{flex:1},_.a.createElement("span",{style:{marginLeft:8,top:2,position:"relative"}},"\u5206\u949f"))),_.a.createElement(r["a"].Item,{label:"\u96be\u5ea6",name:"difficulty",rules:[{required:!0,message:"\u8bf7\u9009\u62e9\u96be\u5ea6"}]},_.a.createElement(E["a"].Group,{style:{display:"flex",width:400,justifyContent:"space-between",marginBottom:6},size:"large",buttonStyle:"solid"},_.a.createElement(E["a"].Button,{style:{width:120,textAlign:"center",borderRadius:50,overflow:"hidden"},value:1},"\u7b80\u5355"),_.a.createElement(E["a"].Button,{style:{width:120,textAlign:"center",borderRadius:50,overflow:"hidden"},value:2},"\u9002\u4e2d"),_.a.createElement(E["a"].Button,{style:{width:120,textAlign:"center",borderRadius:50,overflow:"hidden"},value:3},"\u56f0\u96be"))),_.a.createElement(r["a"].Item,{label:"\u8003\u8bd5\u987b\u77e5",name:"exam_notes"},_.a.createElement(G,{rows:4,maxLength:300})),_.a.createElement(r["a"].Item,{label:_.a.createElement("span",null,"\u8bd5\u9898\u6765\u6e90",_.a.createElement("span",{className:"font12 c-grey-999"},"\uff08\u4e3a\u4fdd\u8bc1\u8003\u5bdf\u51c6\u786e\u6027\uff0c\u5efa\u8bae\u4f7f\u7528\u6211\u521b\u5efa\u7684\uff09")),name:"source",style:{width:"100%"},rules:[{required:!0,message:"\u8bf7\u9009\u62e9\u8bd5\u9898\u6765\u6e90"}]},_.a.createElement(E["a"].Group,{style:{display:"flex",width:368,justifyContent:"space-between"},onChange:function(t){e.handleSourceRadioChange(t)}},_.a.createElement(E["a"],{value:1},"\u4ec5\u6211\u521b\u5efa\u7684"),_.a.createElement(E["a"],{value:0},"\u516c\u5171\u9898\u5e93+\u6211\u521b\u5efa\u7684"))),_.a.createElement(r["a"].Item,{label:"\u8003\u67e5\u8303\u56f4\uff1a",name:"subDisciplines",initialValue:[]},_.a.createElement("div",{style:{display:"inline-flex",flexWrap:"wrap"}},n.map((function(t,n){return _.a.createElement("div",{style:{marginRight:12},onMouseLeave:function(){return e.setState({openKeys:[],visible:null})}},_.a.createElement(w["a"],{key:"disciplines"+t.id,placement:"bottomLeft",visible:n===f,getPopupContainer:function(e){return e.parentNode},overlay:_.a.createElement("div",null,t.sub_disciplines.length>0?_.a.createElement(k["a"],{mode:"vertical",multiple:!0,selectedKeys:null===s||void 0===s?void 0:s.map((function(e){return String(e.id)})),subMenuCloseDelay:0,subMenuOpenDelay:0,openKeys:u,getPopupContainer:function(e){return e.parentNode}},t.sub_disciplines.map((function(t){var n;return _.a.createElement(A,{onTitleMouseEnter:function(){e.setState({openKeys:[String(t.id)]})},key:t.id,title:_.a.createElement("span",null,"".concat(t.name,"(").concat(t.item_count,")")),popupClassName:(null===(n=t.tag_disciplines)||void 0===n?void 0:n.length)>10?P.a.maxHeiTag:""},Array.isArray(t.tag_disciplines)&&t.tag_disciplines.length?t.tag_disciplines.map((function(t){return _.a.createElement(k["a"].Item,{key:t.id,onClick:function(){e.subDisciplinesAdd(t)}},_.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},_.a.createElement("span",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},t.name,"(",t.item_count,")"),_.a.createElement("span",null,"personal"===t.type?"\uff08\u81ea\u7528\uff09":"")))})):_.a.createElement(k["a"].Item,null,"\u6682\u65e0\u6570\u636e"))}))):_.a.createElement(a["a"],null,"\u6682\u65e0\u6570\u636e"))},_.a.createElement(l["a"],{onMouseEnter:function(){return e.setState({visible:n,openKeys:[]})},style:{marginTop:6,marginBottom:6}},t.name)))})))),s.length>0?_.a.createElement("div",{style:{minHeight:150,backgroundColor:"#FAFAFA"}},_.a.createElement("div",{style:{paddingLeft:12,paddingTop:12}},"\u5df2\u9009"),this.dealList().map((function(t,n){var r;return _.a.createElement(_.a.Fragment,{key:n},_.a.createElement("div",{style:{fontSize:14,paddingLeft:10,marginTop:6}},null===t||void 0===t||null===(r=t[0])||void 0===r?void 0:r.parent_name),_.a.createElement("div",{style:{display:"flex",flexWrap:"wrap"}},null===t||void 0===t?void 0:t.map((function(t){return _.a.createElement("div",{key:"subDisciplinesList"+t.id},_.a.createElement(l["a"],{style:{margin:"12px 6px",backgroundColor:"#F6FFED"},onClick:function(){e.disciplinesRemove(t)}},t.name,_.a.createElement(F["a"],null)))}))))}))):null,_.a.createElement(r["a"].Item,{initialValue:[],label:"\u8bd5\u9898\u6587\u4ef6\u5939:\uff08\u9009\u4e2d\u9879\u4ec5\u5305\u62ec\u8be5\u6587\u4ef6\u5939\u4e0b\u7684\u8bd5\u9898\uff0c\u4e0d\u5305\u62ec\u5b50\u6587\u4ef6\u5939\uff0c\u4e14\u7cfb\u7edf\u53d6\u60a8\u9009\u4e2d\u7684\u6587\u4ef6\u5939\u548c\u8003\u67e5\u8303\u56f4\u4e2d\u7684\u8bd5\u9898\u7684\u4ea4\u96c6\u4f5c\u4e3a\u968f\u673a\u5bf9\u8c61\u3002\uff09",name:"group_ids"},_.a.createElement(V["a"],{multiple:!0})),_.a.createElement(T,null))}}]),n}(_.a.Component),M=R,q=n("ErOA"),B=function(e){Object(y["a"])(n,e);var t=Object(v["a"])(n);function n(){return Object(d["a"])(this,n),t.apply(this,arguments)}return Object(m["a"])(n,[{key:"render",value:function(){var e=this.props.form,t=(e.getFieldDecorator,e.getFieldsValue),n=(e.setFieldsValue,this.props.data),a=n.item_type,i=n.items_by_item_type,o=function(e){var t=e.difficult,n=e.count;return _.a.createElement("div",{style:{marginRight:10,lineHeight:"18px"}},_.a.createElement("div",{style:{fontSize:14,textAlign:"left"}},$[t]),_.a.createElement("div",{style:{fontSize:12,color:"#999999"}},"(\u5171 ",n," \u9898\u53ef\u9009)"))},c=t(),l=Object.keys(c).filter((function(e){return e.includes("".concat(a,"-"))&&c[e]})),s=0;return l.map((function(e){return s+=c[e],null})),_.a.createElement("div",null,_.a.createElement("div",null,_.a.createElement("span",{className:"font14"},X[a]),K(s)>0?_.a.createElement("span",{style:{color:"#999999",fontSize:12}},"\uff08\u5df2\u9009 ",K(s)," \u9898\uff09"):null),i.map((function(e){return _.a.createElement("div",{key:a+e.discipline_id+e.sub_discipline_id},_.a.createElement("div",{style:{fontSize:16,margin:"16px 0px",fontWeight:"500"}},e.discipline_name," / ",e.sub_discipline_name," ",e.tag_discipline_name&&"/".concat(e.tag_discipline_name)),_.a.createElement("div",{className:P.a.formItem},e.items_by_item_type_and_tag_discipline.map((function(t){return _.a.createElement(r["a"].Item,{label:_.a.createElement(o,{count:t.items_count,difficult:t.difficulty}),extra:_.a.createElement("span",{className:P.a.questionTip},"\u9898"),name:"count-".concat(a,"-").concat(e.sub_discipline_id,"-").concat(t.difficulty,"-").concat(e.tag_discipline_id),colon:!1,style:{width:"30%"},initialValue:0,key:"".concat(a,"-").concat(e.sub_discipline_id,"-").concat(t.difficulty)},_.a.createElement(j["a"],{min:0,max:t.items_count,formatter:K}))}))))})))}}]),n}(_.a.Component),z=B,W=function(e){Object(y["a"])(n,e);var t=Object(v["a"])(n);function n(e){var r;return Object(d["a"])(this,n),r=t.call(this,e),r.state={},r}return Object(m["a"])(n,[{key:"render",value:function(){var e=this.props.form,t=this.props.optinalData;return _.a.createElement("div",null,t.map((function(n,r){return _.a.createElement("div",{key:n.item_type},_.a.createElement(z,{form:e,data:n}),r===t.length-1?null:_.a.createElement(o["a"],null))})),_.a.createElement(T,null))}}]),n}(_.a.Component),Y=W,J=function(e){var t=e.title,n=e.score;e.totalCount;return _.a.createElement("div",null,t,":",n&&n>0?_.a.createElement("span",{style:{marginLeft:4,color:"#999",fontSize:12}},"(\u5171 ",n," \u5206)"):null)},U=function(e){Object(y["a"])(n,e);var t=Object(v["a"])(n);function n(e){var r;return Object(d["a"])(this,n),r=t.call(this,e),r.state={},r}return Object(m["a"])(n,[{key:"render",value:function(){if(!this.props.form)return"";var e=this.props.form,t=(e.getFieldDecorator,e.getFieldsValue),n=Object.keys(X),a=t(),i=0;return _.a.createElement("div",null,n.map((function(e){var t=Object.keys(a).filter((function(t){return t.includes("".concat(e,"-"))&&a[t]})),n=0,o=0;return t.map((function(t){return n+=a[t],o=n*a["score-".concat(e)],null})),i+=o,t.length>0?_.a.createElement(x["a"],{align:"middle"},_.a.createElement(L["a"],null,_.a.createElement(r["a"].Item,{label:_.a.createElement(J,{title:X[e],score:o,totalCount:n}),name:"score-".concat(e),colon:!1,key:X[e],rules:[{required:!0,message:"\u5206\u6570\u4e0d\u80fd\u4e3a\u7a7a"}]},_.a.createElement(j["a"],{min:1,max:100,placeholder:"\u8bf7\u8f93\u5165\u8bd5\u9898\u5206\u6570\u8bbe\u7f6e",style:{width:150}}))),_.a.createElement(L["a"],{flex:1},_.a.createElement("span",{style:{marginLeft:8,position:"relative",top:2}},"\u5206/\u9898"))):null})),i&&i>0?_.a.createElement("div",{style:{marginTop:16}},"\u5f53\u524d\u672c\u5377\u603b\u5206",_.a.createElement("span",{style:{color:"#1890FF"}}," ",i," "),"\u5206"):null)}}]),n}(_.a.Component),H=U;function Q(){Q=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof v?t:v,o=Object.create(i.prototype),c=new D(r||[]);return a(o,"_invoke",{value:O(e,n,c)}),o}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",h="suspendedYield",d="executing",m="completed",y={};function v(){}function g(){}function b(){}var _={};s(_,o,(function(){return this}));var w=Object.getPrototypeOf,E=w&&w(w(N([])));E&&E!==n&&r.call(E,o)&&(_=E);var x=b.prototype=v.prototype=Object.create(_);function L(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(a,i,o,c){var l=f(e[a],e,i);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,o,c)}),(function(e){n("throw",e,o,c)})):t.resolve(u).then((function(e){s.value=e,o(s)}),(function(e){return n("throw",e,o,c)}))}c(l.arg)}var i;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return i=i?i.then(a,a):a()}})}function O(t,n,r){var a=p;return function(i,o){if(a===d)throw new Error("Generator is already running");if(a===m){if("throw"===i)throw o;return{value:e,done:!0}}for(r.method=i,r.arg=o;;){var c=r.delegate;if(c){var l=k(c,r);if(l){if(l===y)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===p)throw a=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=d;var s=f(t,n,r);if("normal"===s.type){if(a=r.done?m:h,s.arg===y)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(a=m,r.method="throw",r.arg=s.arg)}}}function k(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,k(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var i=f(a,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,y;var o=i.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function S(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 F(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function N(t){if(t||""===t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,i=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(typeof t+" is not iterable")}return g.prototype=b,a(x,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:g,configurable:!0}),g.displayName=s(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,s(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},L(j.prototype),s(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,r,a,i){void 0===i&&(i=Promise);var o=new j(u(e,n,r,a),i);return t.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},L(x),s(x,l,"Generator"),s(x,o,(function(){return this})),s(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=N,D.prototype={constructor:D,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(F),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=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 n=this;function a(r,a){return c.type="throw",c.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],c=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var l=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(l&&s){if(this.prev<o.catchLoc)return a(o.catchLoc,!0);if(this.prev<o.finallyLoc)return a(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return a(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return a(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&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(o)},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),y},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),F(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;F(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:N(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}var Z=g["a"].Step,X={SINGLE:"\u5355\u9009\u9898",MULTIPLE:"\u591a\u9009\u9898",JUDGMENT:"\u5224\u65ad\u9898",COMPLETION:"\u586b\u7a7a\u9898",SUBJECTIVE:"\u7b80\u7b54\u9898",PRACTICAL:"\u5b9e\u8bad\u9898",PROGRAM:"\u7f16\u7a0b\u9898"},$={1:"\u7b80\u5355",2:"\u9002\u4e2d",3:"\u56f0\u96be"},ee=function(e){Object(y["a"])(n,e);var t=Object(v["a"])(n);function n(e){var r;return Object(d["a"])(this,n),r=t.call(this,e),r.getPaperData=function(){var e=window.location.href.split("/").pop(),t=[];r.setState({loading:!0}),Object(q["a"])("/api/examination_banks/".concat(e,"/edit_random_exam.json"),{method:"get"}).then((function(e){if(r.setState({loading:!1}),null===e||void 0===e?void 0:e.contents){var n=e.contents,a=e.groups,i=e.examination_bank,o=e.score_settings,c=e.all_sub_disciplines,l=e.all_tag_disciplines,s={},u={};Array.isArray(n)&&n.map((function(e){return s=Object(h["a"])(Object(h["a"])({},s),{},Object(p["a"])({},"count-".concat(e.item_type,"-").concat(e.sub_discipline_id,"-").concat(e.difficulty,"-").concat(e.tag_discipline_id),e.quanlity)),null})),o.map((function(e){return u=Object(h["a"])(Object(h["a"])({},u),{},Object(p["a"])({},"score-".concat(e.item_type),e.score)),null})),l.map((function(e,n){c.map((function(n,r){if((null===e||void 0===e?void 0:e.sub_discipline_id)===(null===n||void 0===n?void 0:n.sub_discipline_id)){var a={id:e.tag_discipline_id,name:e.tag_discipline_name,parent_name:n.sub_discipline_name,is_default:!0};t.push(a)}}))}));var d=Object(h["a"])(Object(h["a"])({},i),{},{subDisciplines:t,group_ids:null===a||void 0===a?void 0:a.map((function(e){return e.id}))});r.state.form.setFieldsValue(d),r.setState({formValue:d}),r.setState({countData:s,scoreData:u});var m=i.source;r.getdisciplines(m)}else f["b"].error("\u83b7\u53d6\u8bd5\u5377\u4fe1\u606f\u9519\u8bef")}))},r.getdisciplines=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t="/api/disciplines.json";Object(q["a"])(t,{params:{source:"question",public:e}}).then((function(e){(null===e||void 0===e?void 0:e.disciplines)&&r.setState({disciplines:e.disciplines})})).catch((function(e){console.log(e)}))},r.getQuestionNumbers=function(){var e;r.setState({loading:!0});var t=r.state.form.getFieldValue("subDisciplines").map((function(e){return e.id})),n=r.state.form.getFieldValue("source"),a=null===(e=r.state.disciplines)||void 0===e?void 0:e.map((function(e){return e.id})),i={group_ids:r.state.form.getFieldValue("group_ids"),source:1===n?0:2};t.length?i.tag_discipline_ids=t:i.discipline_ids=a,Object(q["a"])("/api/examination_intelligent_settings/optional_items.json",{method:"post",body:i}).then((function(e){r.setState({loading:!1}),e.contents&&(r.setState({optinalData:e.contents}),r.state.form.setFieldsValue(Object(h["a"])({},r.state.countData)))}))},r.next=Object(u["a"])(Q().mark((function e(){var t,n,a,i,o,c,l,u,p;return Q().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t=r.state.current+1,0!==r.state.current){e.next=13;break}return e.next=4,r.state.form.validateFields(["name","time","difficulty","source"]);case 4:if(n=r.state.form.getFieldsValue(),a=n.subDisciplines,i=void 0===a?[]:a,o=n.group_ids,c=void 0===o?[]:o,i.length||c.length){e.next=9;break}return f["b"].warn("\u5fc5\u987b\u9009\u62e9\u8003\u5bdf\u8303\u56f4\u6216\u8bd5\u9898\u6587\u4ef6\u5939\u7684\u5176\u4e2d\u4e00\u9879\uff0c\u624d\u80fd\u8fdb\u884c\u4e0b\u4e00\u6b65"),e.abrupt("return");case 9:r.setState({current:t}),r.getQuestionNumbers(),e.next=14;break;case 13:1===r.state.current&&r.idEdit?(r.state.form.setFieldsValue(Object(h["a"])({},r.state.scoreData)),r.setState({current:t})):1===r.state.current&&(l=0,u=r.state.form.getFieldsValue(),u.name,u.difficulty,u.time,u.source,u.subDisciplines,p=Object(s["a"])(u,["name","difficulty","time","source","subDisciplines"]),Object.keys(p).forEach((function(e){p[e]>0&&++l})),0===l?f["b"].error("\u8bf7\u586b\u5199\u9898\u578b\u6570\u91cf"):r.setState({current:t}));case 14:case"end":return e.stop()}}),e)}))),r.prev=function(){var e=r.state.current-1;r.setState({current:e})},r.submit=Object(u["a"])(Q().mark((function e(){var t,n,a,i,o,c,l,u,f,p,h;return Q().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,r.state.form.validateFields();case 2:t=r.state.form.getFieldsValue(),n=t.exam_notes,a=t.group_ids,i=t.name,o=t.difficulty,c=t.time,l=t.source,u=Object(s["a"])(t,["exam_notes","group_ids","name","difficulty","time","source"]),f=[],p=[],Object.keys(u).map((function(e){if(e.includes("count")){var n=e.split("-")[1],r=e.split("-")[2],a=e.split("-")[3],i=e.split("-")[4];0!==t[e]&&p.push({item_type:n,difficulty:a,sub_discipline_id:r,items_count:t[e],tag_discipline_id:i})}else if(e.includes("score")){var o=e.split("-")[1];f.push({item_type:o,score:t[e]})}return null})),h={name:i,difficulty:o,time:c,source:l,score_settings:f,contents:p,exam_notes:n,group_ids:a,sub_discipline_id:0},r.idEdit?r.updatePaper(h):r.createPaper(h);case 9:case"end":return e.stop()}}),e)}))),r.createPaper=function(e){r.setState({loading:!0}),Object(q["a"])("/api/examination_banks/create_random_exam.json",{method:"post",body:Object(h["a"])({},e)}).then((function(e){r.setState({loading:!1}),0===e.status&&(f["b"].success("\u521b\u5efa\u6210\u529f"),r.props.history.push("/paperlibrary"))}))},r.updatePaper=function(e){r.setState({loading:!0});var t=window.location.href.split("/").pop();Object(q["a"])("/api/examination_banks/".concat(t,"/update_random_exam.json"),{method:"post",body:Object(h["a"])({},e)}).then((function(e){r.setState({loading:!1}),0===e.status&&(f["b"].success("\u7f16\u8f91\u6210\u529f"),r.props.history.push("/paperlibrary"))}))},r.confirm=function(e){window.confirm("\u786e\u5b9a\u79bb\u5f00\u6b64\u9875\u9762\u5417?\u6b64\u9875\u6570\u636e\u53ef\u80fd\u4f1a\u4e22\u5931")&&(e?r.props.history.push(e):r.props.history.push("/paperlibrary"))},r.state={current:0,disciplines:[],loading:!1,optinalData:[],countData:{},scoreData:{},formValue:{}},r}return Object(m["a"])(n,[{key:"componentDidMount",value:function(){this.setState({form:this.refs.form}),window.location.href.includes("/randompaper/edit")?(this.getPaperData(),this.idEdit=!0):this.getdisciplines()}},{key:"componentWillMount",value:function(){window.addEventListener("beforeunload",this.beforeunload)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("beforeunload",this.beforeunload)}},{key:"beforeunload",value:function(e){var t="\u786e\u5b9a\u79bb\u5f00\u6b64\u9875\u9762\u5417?\u6b64\u9875\u6570\u636e\u53ef\u80fd\u4f1a\u4e22\u5931";return(e||window.event).returnValue=t,t}},{key:"render",value:function(){var e=this,t=this.state,n=t.current,s=t.disciplines,u=_.a.createElement(l["a"],{onClick:function(){e.confirm()},style:{marginRight:16}},"\u8fd4\u56de"),f=_.a.createElement(l["a"],{type:"primary",onClick:function(){return e.next()}},"\u4e0b\u4e00\u6b65"),p=_.a.createElement(l["a"],{onClick:function(){return e.prev()},style:{marginRight:16}},"\u4e0a\u4e00\u6b65"),d=_.a.createElement(l["a"],{onClick:function(){return e.submit()},type:"primary"},"\u5b8c\u6210\u7ec4\u5377"),m=[{title:"\u57fa\u672c\u4fe1\u606f",content:_.a.createElement(M,{formValue:this.state.formValue,disciplines:s,getdisciplines:this.getdisciplines,form:this.state.form})},{title:"\u9898\u578b\u6570\u91cf",content:_.a.createElement(Y,{form:this.state.form,optinalData:this.state.optinalData})},{title:"\u8d4b\u5206\u8bbe\u7f6e",content:_.a.createElement(H,{form:this.state.form})}];return _.a.createElement("div",{style:{width:1200,margin:"0px auto"}},_.a.createElement(c["a"],{separator:">",style:{padding:"12px 0px"}},_.a.createElement(c["a"].Item,null,_.a.createElement(D["Link"],{to:"/paperlibrary",onClick:function(t){t.preventDefault(),e.confirm("/paperlibrary")}},"\u8bd5\u5377\u5e93")),_.a.createElement(c["a"].Item,null,"\u968f\u673a\u7ec4\u5377")),_.a.createElement(r["a"],{from:this.state.form,onValuesChange:function(){return e.setState({formValue:Object(h["a"])({},e.state.form.getFieldsValue())})},ref:"form",name:"basic",layout:"vertical",onChange:function(){e.setState({now:new Date})}},_.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},_.a.createElement("span",{style:{fontSize:20,fontWeight:600}},"\u968f\u673a\u7ec4\u5377")),_.a.createElement(a["a"],{style:{marginTop:12}},_.a.createElement("div",{style:{display:"flex",justifyContent:"center",padding:20}},_.a.createElement(g["a"],{current:n,style:{width:780}},m.map((function(e){return _.a.createElement(Z,{key:e.title,title:e.title})})))),_.a.createElement(o["a"],null),_.a.createElement(i["a"],{spinning:this.state.loading},m.map((function(e,t){return _.a.createElement("div",{style:{display:t===n?"block":"none"},key:t,className:"pl20 pr20"},e.content)})))),_.a.createElement("div",{style:{display:"flex",marginBottom:200,marginTop:12,justifyContent:"center"}},_.a.createElement("span",{style:{fontSize:20,fontWeight:600}}),_.a.createElement("span",null,0===n?u:p,n===m.length-1?d:f))))}}]),n}(_.a.Component);t["default"]=ee},Eaj2:function(e,t,n){e.exports={flex_box_center:"flex_box_center___d7ZR0",flex_space_between:"flex_space_between___2R86v",flex_box_vertical_center:"flex_box_vertical_center___UB-3r",flex_box_center_end:"flex_box_center_end___ISZAL",flex_box_column:"flex_box_column___3fU_5",formItem:"formItem___76enf",subheight:"subheight___1YMQL"}},"P/tu":function(e,t,n){"use strict";n("ozfa");var r=n("MJZm"),a=n("0Owb"),i=n("9og8"),o=n("tJVT"),c=n("PpiC"),l=n("q1tI"),s=n.n(l),u=n("WCUW"),f=n("spXi"),p=n.n(f);function h(){h=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof g?t:g,o=Object.create(i.prototype),c=new N(r||[]);return a(o,"_invoke",{value:k(e,n,c)}),o}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",d="suspendedYield",m="executing",y="completed",v={};function g(){}function b(){}function _(){}var w={};s(w,o,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(T([])));x&&x!==n&&r.call(x,o)&&(w=x);var L=_.prototype=g.prototype=Object.create(w);function j(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function n(a,i,o,c){var l=f(e[a],e,i);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==typeof u&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,o,c)}),(function(e){n("throw",e,o,c)})):t.resolve(u).then((function(e){s.value=e,o(s)}),(function(e){return n("throw",e,o,c)}))}c(l.arg)}var i;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return i=i?i.then(a,a):a()}})}function k(t,n,r){var a=p;return function(i,o){if(a===m)throw new Error("Generator is already running");if(a===y){if("throw"===i)throw o;return{value:e,done:!0}}for(r.method=i,r.arg=o;;){var c=r.delegate;if(c){var l=S(c,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===p)throw a=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=m;var s=f(t,n,r);if("normal"===s.type){if(a=r.done?y:d,s.arg===v)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(a=y,r.method="throw",r.arg=s.arg)}}}function S(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=f(a,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var o=i.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function F(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 D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(F,this),this.reset(!0)}function T(t){if(t||""===t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,i=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=_,a(L,"constructor",{value:_,configurable:!0}),a(_,"constructor",{value:b,configurable:!0}),b.displayName=s(_,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,s(e,l,"GeneratorFunction")),e.prototype=Object.create(L),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,n,r,a,i){void 0===i&&(i=Promise);var o=new O(u(e,n,r,a),i);return t.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},j(L),s(L,l,"Generator"),s(L,o,(function(){return this})),s(L,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=T,N.prototype={constructor:N,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(D),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=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 n=this;function a(r,a){return c.type="throw",c.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],c=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var l=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(l&&s){if(this.prev<o.catchLoc)return a(o.catchLoc,!0);if(this.prev<o.finallyLoc)return a(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return a(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return a(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&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(o)},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),v},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),D(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;D(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:T(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}var d=function(e){var t=e.value,n=e.onChange,f=e.defaultValue,d=Object(c["a"])(e,["value","onChange","defaultValue"]),m=Object(l["useState"])([]),y=Object(o["a"])(m,2),v=y[0],g=y[1],b=Object(l["useState"])("1"),_=Object(o["a"])(b,2),w=_[0],E=_[1];Object(l["useEffect"])((function(){x()}),[]);var x=function(){var e=Object(i["a"])(h().mark((function e(){var t,n;return h().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(u["y"])({});case 2:t=e.sent,(null===t||void 0===t?void 0:t.data)&&(n=[{title:s.a.createElement("div",{title:"\u6839\u76ee\u5f55",className:p.a.name},"\u6839\u76ee\u5f55"),value:0,key:0,icon:s.a.createElement("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:L(t.data||[])}],g(n),E("2"));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),L=function(e){function t(e){var n=e.children,r=Array.isArray(n)&&n.length>0,a=null===e||void 0===e?void 0:e.group_id;return{title:s.a.createElement("div",{title:null===e||void 0===e?void 0:e.name,className:p.a.name},null===e||void 0===e?void 0:e.name),value:a,key:a,icon:s.a.createElement("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:r?null===n||void 0===n?void 0:n.map((function(e){return t(e)})):[]}}return null===e||void 0===e?void 0:e.map((function(e){return t(e)}))},j=f?{defaultExpandedKeys:[0],defaultSelectedKeys:[0]}:{selectedKeys:t,defaultExpandedKeys:t};return s.a.createElement("div",{className:p.a.customTree},s.a.createElement(r["a"],Object(a["a"])({key:w},j,{showIcon:!0,treeData:v,onSelect:n},d)))};t["a"]=d},spXi:function(e,t,n){e.exports={flex_box_center:"flex_box_center___2B_Y7",flex_space_between:"flex_space_between___2olzC",flex_box_vertical_center:"flex_box_vertical_center___2Z4dV",flex_box_center_end:"flex_box_center_end___3FiwX",flex_box_column:"flex_box_column___8kyK-",customTree:"customTree___1KOYx",name:"name___3pqs4"}}}]);