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.
educoder/public/react/dist/static/js/6.519f5ab7.chunk.js

1 line
18 KiB

(this.webpackJsonph5=this.webpackJsonph5||[]).push([[6],{691:function(e,t,r){"use strict";r(46),r(797)},694:function(e,t,r){"use strict";var n=r(1),o=r.n(n),a=r(0),c=r.n(a),i=r(12),s=r.n(i),l=r(33),u=r(18),p=r(77),f=r(51);function y(e){return!e||e<0?0:100<e?100:e}function b(){return(b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],n=!0,o=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(n=(c=i.next()).done)&&(r.push(c.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==i.return||i.return()}finally{if(o)throw a}}return r}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function d(e){var t=e.from,r=void 0===t?"#1890ff":t,n=e.to,o=void 0===n?"#1890ff":n,a=e.direction,c=void 0===a?"to right":a,i=v(e,["from","to","direction"]);if(0===Object.keys(i).length)return{backgroundImage:"linear-gradient(".concat(c,", ").concat(r,", ").concat(o,")")};var s=function(e){for(var t=[],r=0,n=Object.entries(e);r<n.length;r++){var o=h(n[r],2),a=o[0],c=o[1],i=parseFloat(a.replace(/%/g,""));if(isNaN(i))return{};t.push({key:i,value:c})}return(t=t.sort((function(e,t){return e.key-t.key}))).map((function(e){var t=e.key,r=e.value;return"".concat(r," ").concat(t,"%")})).join(", ")}(i);return{backgroundImage:"linear-gradient(".concat(c,", ").concat(s,")")}}function g(e){var t,r=e.prefixCls,n=e.percent,o=e.successPercent,c=e.strokeWidth,i=e.size,s=e.strokeColor,l=e.strokeLinecap,u=e.children;t=s&&"string"!=typeof s?d(s):{background:s};var p=b({width:"".concat(y(n),"%"),height:c||("small"===i?6:8),borderRadius:"square"===l?0:""},t),f={width:"".concat(y(o),"%"),height:c||("small"===i?6:8),borderRadius:"square"===l?0:""},h=void 0!==o?a.createElement("div",{className:"".concat(r,"-success-bg"),style:f}):null;return a.createElement("div",null,a.createElement("div",{className:"".concat(r,"-outer")},a.createElement("div",{className:"".concat(r,"-inner")},a.createElement("div",{className:"".concat(r,"-bg"),style:p}),h)),u)}var v=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r};function O(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function m(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function k(e,t,r){return(k="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=j(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.value}})(e,t,r||e)}function j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function w(e,t){return(w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var P=function(e){return function(){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),m(this,j(t).apply(this,arguments))}var r,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&w(e,t)}(t,e),r=t,(n=[{key:"componentDidUpdate",value:function(){var e=this,t=Date.now(),r=!1;Object.keys(this.paths).forEach((function(n){var o=e.paths[n];if(o){r=!0;var a=o.style;a.transitionDuration=".3s, .3s, .3s, .06s",e.prevTimeStamp&&t-e.prevTimeStamp<100&&(a.transitionDuration="0s, 0s")}})),r&&(this.prevTimeStamp=Date.now())}},{key:"render",value:function(){return k(j(t.prototype),"render",this).call(this)}}])&&O(r.prototype,n),t}()},C={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},x=o.a.oneOfType([o.a.number,o.a.string]),E={className:o.a.string,percent:o.a.oneOfType([x,o.a.arrayOf(x)]),prefixCls:o.a.string,strokeColor:o.a.oneOfType([o.a.string,o.a.arrayOf(o.a.oneOfType([o.a.string,o.a.object])),o.a.object]),strokeLinecap:o.a.oneOf(["butt","round","square"]),strokeWidth:x,style:o.a.object,trailColor:o.a.string,trailWidth:x};function S(){return(S=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function _(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function D(e){return(D=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function N(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function W(e,t){return(W=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var I=function(){function e(){var t,r,n,o,a,c,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);for(var s=arguments.length,l=new Array(s),u=0;u<s;u++)l[u]=arguments[u];return n=this,r=!(o=(t=D(e)).call.apply(t,[this].concat(l)))||"object"!=typeof o&&"function"!=typeof o?N(n):o,i={},(c="paths")in(a=N(r))?Object.defineProperty(a,c,{value:i,enumerable:!0,configurable:!0,writable:!0}):a[c]=i,r}var t,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&W(e,t)}(e,a.Component),t=e,(r=[{key:"render",value:function(){var e=this,t=this.props,r=t.className,n=t.percent,o=t.prefixCls,a=t.strokeColor,i=t.strokeLinecap,s=t.strokeWidth,l=t.style,u=t.trailColor,p=t.trailWidth,f=t.transition,y=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],0<=t.indexOf(r)||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],0<=t.indexOf(r)||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(t,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete y.gapPosition;var b=Array.isArray(n)?n:[n],h=Array.isArray(a)?a:[a],d=s/2,g=100-s/2,v="M ".concat("round"===i?d:0,",").concat(d,"\n L ").concat("round"===i?g:100,",").concat(d),O="0 0 100 ".concat(s),m=0;return c.a.createElement("svg",S({className:"".concat(o,"-line ").concat(r),viewBox:O,preserveAspectRatio:"none",style:l},y),c.a.createElement("path",{className:"".concat(o,"-line-trail"),d:v,strokeLinecap:i,stroke:u,strokeWidth:p||s,fillOpacity:"0"}),b.map((function(t,r){var n={strokeDasharray:"".concat(t,"px, 100px"),strokeDashoffset:"-".concat(m,"px"),transition:f||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},a=h[r]||h[h.length-1];return m+=t,c.a.createElement("path",{key:r,className:"".concat(o,"-line-path"),d:v,strokeLinecap:i,stroke:a,strokeWidth:s,fillOpacity:"0",ref:function(t){e.paths[r]=t},style:n})})))}}])&&_(t.prototype,r),e}();function L(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function T(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?L(r,!0).forEach((function(t){B(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function A(){return(A=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function R(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function z(e){return(z=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function q(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function M(e,t){return(M=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function B(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}I.propTypes=E,I.defaultProps=C,P(I);var J=0;function F(e){return+e.replace("%","")}function G(e){return Array.isArray(e)?e:[e]}function U(e,t,r,n,o,a){var c=4<arguments.length&&void 0!==o?o:0,i=50-n/2,s=0,l=-i,u=0,p=-2*i;switch(5<arguments.length?a:void 0){case"left":s=-i,u=2*i,p=l=0;break;case"right":u=-2*(s=i),p=l=0;break;case"bottom":p=2*(l=i)}var f="M 50,50 m ".concat(s,",").concat(l,"\n a ").concat(i,",").concat(i," 0 1 1 ").concat(u,",").concat(-p,"\n a ").concat(i,",").concat(i," 0 1 1 ").concat(-u,",").concat(p),y=2*Math.PI*i;return{pathString:f,pathStyle:{stroke:r,strokeDasharray:"".concat(t/100*(y-c),"px ").concat(y,"px"),strokeDashoffset:"-".concat(c/2+e/100*(y-c),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"}}}var H=function(){function e(){var t,r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this,t=!(r=z(e).call(this))||"object"!=typeof r&&"function"!=typeof r?q(this):r,B(q(t),"paths",{}),B(q(t),"gradientId",0),t.gradientId=J,J+=1,t}var t,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&M(e,t)}(e,a.Component),t=e,(r=[{key:"getStokeList",value:function(){var e=this,t=this.props,r=t.prefixCls,n=t.percent,o=t.strokeColor,a=t.strokeWidth,i=t.strokeLinecap,s=t.gapDegree,l=t.gapPosition,u=G(n),p=G(o),f=0;return u.map((function(t,n){var o=p[n]||p[p.length-1],u="[object Object]"===Object.prototype.toString.call(o)?"url(#".concat(r,"-gradient-").concat(e.gradientId,")"):"",y=U(f,t,o,a,s,l),b=y.pathString,h=y.pathStyle;return f+=t,c.a.createElement("path",{key:n,className:"".concat(r,"-circle-path"),d:b,stroke:u,strokeLinecap:i,strokeWidth:0===t?0:a,fillOpacity:"0",style:h,ref:function(t){e.paths[n]=t}})}))}},{key:"render",value:function(){var e=this.props,t=e.prefixCls,r=e.strokeWidth,n=e.trailWidth,o=e.gapDegree,a=e.gapPosition,i=e.trailColor,s=e.strokeLinecap,l=e.style,u=e.className,p=e.strokeColor,f=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],0<=t.indexOf(r)||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],0<=t.indexOf(r)||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor"]),y=U(0,100,i,r,o,a),b=y.pathString,h=y.pathStyle;delete f.percent;var d=G(p).find((function(e){return"[object Object]"===Object.prototype.toString.call(e)}));return c.a.createElement("svg",A({className:"".concat(t,"-circle ").concat(u),viewBox:"0 0 100 100",style:l},f),d&&c.a.createElement("defs",null,c.a.createElement("linearGradient",{id:"".concat(t,"-gradient-").concat(this.gradientId),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(d).sort((function(e,t){return F(e)-F(t)})).map((function(e,t){return c.a.createElement("stop",{key:t,offset:e,stopColor:d[e]})})))),c.a.createElement("path",{className:"".concat(t,"-circle-trail"),d:b,stroke:i,strokeLinecap:s,strokeWidth:n||r,fillOpacity:"0",style:h}),this.getStokeList().reverse())}}])&&R(t.prototype,r),e}();H.propTypes=T({},E,{gapPosition:o.a.oneOf(["top","bottom","left","right"])}),H.defaultProps=T({},C,{gapPosition:"top"});var K=P(H),Q={normal:"#108ee9",exception:"#ff5500",success:"#87d068"};function V(e){var t,r,n,o,c,i,l,u=e.prefixCls,p=e.width,f=e.strokeWidth,b=e.trailColor,h=e.strokeLinecap,d=e.gapPosition,g=e.gapDegree,v=e.type,O=e.children,m=p||120,k={width:m,height:m,fontSize:.15*m+6},j=f||6,w=d||"dashboard"===v&&"bottom"||"top",P=g||("dashboard"===v?75:void 0),C=(r=(t=e).progressStatus,n=t.successPercent,o=t.strokeColor||Q[r],n?[Q.success,o]:o),x="[object Object]"===Object.prototype.toString.call(C),E=s()("".concat(u,"-inner"),(c={},l=x,(i="".concat(u,"-circle-gradient"))in c?Object.defineProperty(c,i,{value:l,enumerable:!0,configurable:!0,writable:!0}):c[i]=l,c));return a.createElement("div",{className:E,style:k},a.createElement(K,{percent:function(e){var t=e.percent,r=e.successPercent,n=y(t);if(!r)return n;var o=y(r);return[r,y(n-o)]}(e),strokeWidth:j,trailWidth:j,strokeColor:C,strokeLinecap:h,trailColor:b,prefixCls:u,gapDegree:P,gapPosition:w}),O)}function X(e){return(X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Z(){return(Z=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function $(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ee(e){return(ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function te(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function re(e,t){return(re=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ne=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r},oe=Object(f.a)("line","circle","dashboard"),ae=Object(f.a)("normal","exception","active","success"),ce=function(){function e(){var t,r,n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r=this,n=ee(e).apply(this,arguments),(t=!n||"object"!==X(n)&&"function"!=typeof n?te(r):n).renderProgress=function(e){var r,n,o=e.getPrefixCls,c=te(t).props,i=c.prefixCls,u=c.className,p=c.size,f=c.type,y=c.showInfo,b=ne(c,["prefixCls","className","size","type","showInfo"]),h=o("progress",i),d=t.getProgressStatus(),v=t.renderProcessInfo(h,d);"line"===f?n=a.createElement(g,Z({},t.props,{prefixCls:h}),v):"circle"!==f&&"dashboard"!==f||(n=a.createElement(V,Z({},t.props,{prefixCls:h,progressStatus:d}),v));var O=s()(h,(Y(r={},"".concat(h,"-").concat("dashboard"===f?"circle":f),!0),Y(r,"".concat(h,"-status-").concat(d),!0),Y(r,"".concat(h,"-show-info"),y),Y(r,"".concat(h,"-").concat(p),p),r),u);return a.createElement("div",Z({},Object(l.default)(b,["status","format","trailColor","successPercent","strokeWidth","width","gapDegree","gapPosition","strokeColor","strokeLinecap","percent"]),{className:O}),n)},t}var t,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&re(e,t)}(e,a.Component),t=e,(r=[{key:"getPercentNumber",value:function(){var e=this.props,t=e.successPercent,r=e.percent,n=void 0===r?0:r;return parseInt(void 0!==t?t.toString():n.toString(),10)}},{key:"getProgressStatus",value:function(){var e=this.props.status;return ae.indexOf(e)<0&&100<=this.getPercentNumber()?"success":e||"normal"}},{key:"renderProcessInfo",value:function(e,t){var r,n=this.props,o=n.showInfo,c=n.format,i=n.type,s=n.percent,l=n.successPercent;if(!o)return null;var p="circle"===i||"dashboard"===i?"":"-circle";return c||"exception"!==t&&"success"!==t?r=(c||function(e){return"".concat(e,"%")})(y(s),y(l)):"exception"===t?r=a.createElement(u.a,{type:"close".concat(p),theme:"line"===i?"filled":"outlined"}):"success"===t&&(r=a.createElement(u.a,{type:"check".concat(p),theme:"line"===i?"filled":"outlined"})),a.createElement("span",{className:"".concat(e,"-text"),title:"string"==typeof r?r:void 0},r)}},{key:"render",value:function(){return a.createElement(p.a,null,this.renderProgress)}}])&&$(t.prototype,r),e}();ce.defaultProps={type:"line",percent:0,showInfo:!0,trailColor:"#f3f3f3",size:"default",gapDegree:0,strokeLinecap:"round"},ce.propTypes={status:n.oneOf(ae),type:n.oneOf(oe),showInfo:n.bool,percent:n.number,width:n.number,strokeWidth:n.number,strokeLinecap:n.oneOf(["round","square"]),strokeColor:n.oneOfType([n.string,n.object]),trailColor:n.string,format:n.func,gapDegree:n.number},t.a=ce},797:function(e,t,r){}}]);