forked from bytedance/Elkeid
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path628ac9.73.min.js
More file actions
1 lines (1 loc) · 14.1 KB
/
628ac9.73.min.js
File metadata and controls
1 lines (1 loc) · 14.1 KB
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[73],{318:function(t,e,r){"use strict";r.r(e),r.d(e,"RiskChartType",(function(){return i}));var i,o=r(4),n=r.n(o),a=r(0),l=r.n(a),s=r(566),c=r.n(s),d=r(616);function u(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function h(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?u(Object(r),!0).forEach((function(e){n()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}!function(t){t[t.alarm=0]="alarm",t[t.vuln=1]="vuln"}(i||(i={}));e.default=function(t){var e,r=t.data,o=t.type,n=o===i.alarm?[{title:"紧急",key:"critical",color:"#E63F3F"},{title:"高风险",key:"high",color:"#846BCE"},{title:"中风险",key:"medium",color:"#FEC745"},{title:"低风险",key:"low",color:"#468DFF"}]:[{title:"严重",key:"critical",color:"#E63F3F"},{title:"高危",key:"high",color:"#846BCE"},{title:"中危",key:"medium",color:"#FEC745"},{title:"低危",key:"low",color:"#468DFF"}],a=n.map((function(t){return t.title})),s=n.map((function(t){return t.color})),u=n.map((function(t){return t.key}));var f={tooltip:{trigger:"item",textStyle:{color:"#fff"},formatter:function(t){var e,n,a,l,s,d,u=null==t?void 0:t.dataIndex;return void 0===u?"":"".concat(c.a.unix(null!==(e=null==r||null===(n=r.date)||void 0===n?void 0:n[u])&&void 0!==e?e:0).format("MM-DD"),"<div><div style='display: inline-block;width: 10px;height: 10px; border-radius: 50%;background: #E63F3F;margin-right: 5px;'></div><div style='display: inline-block;width: 80px;'>".concat(o===i.alarm?"紧急 ":"严重 ","</div>").concat(null==r||null===(a=r.critical)||void 0===a?void 0:a[u],"<div>"),"<div><div style='display: inline-block;width: 10px;height: 10px; border-radius: 50%;background: #846BCE;margin-right: 5px;'></div><div style='display: inline-block;width: 80px;'>".concat(o===i.alarm?"高风险 ":"高危 ","</div>").concat(null==r||null===(l=r.high)||void 0===l?void 0:l[u],"<div>"),"<div><div style='display: inline-block;width: 10px;height: 10px; border-radius: 50%;background: #FEC745;margin-right: 5px;'></div><div style='display: inline-block;width: 80px;'>".concat(o===i.alarm?"中风险 ":"中危 ","</div>").concat(null==r||null===(s=r.medium)||void 0===s?void 0:s[u],"<div>"),"<div><div style='display: inline-block;width: 10px;height: 10px; border-radius: 50%;background: #468DFF;margin-right: 5px;'></div><div style='display: inline-block;width: 80px;'>".concat(o===i.alarm?"低风险 ":"低危 ","</div>").concat(null==r||null===(d=r.low)||void 0===d?void 0:d[u],"<div>"))}},legend:{data:a,bottom:6,itemWidth:10,itemHeight:10,icon:"circle",textStyle:{fontSize:12,color:"#4E5969"}},grid:{top:"10",left:"0",right:"0",bottom:"50",containLabel:!0},xAxis:{type:"category",data:(null!==(e=null==r?void 0:r.date)&&void 0!==e?e:[]).map((function(t){return c.a.unix(t).format("MM-DD")})),axisLine:{show:!1},axisTick:{alignWithLabel:!0,lineStyle:{color:"#E5E6EB"}}},yAxis:h({type:"value",minInterval:1},function(){if(!r)return 0;for(var t=0,e=0;e<7;e++){var i,o,n,a,l;l=(null!==(i=r.low[e])&&void 0!==i?i:0)+(null!==(o=r.medium[e])&&void 0!==o?o:0)+(null!==(n=r.high[e])&&void 0!==n?n:0)+(null!==(a=r.critical[e])&&void 0!==a?a:0),t=Math.max(t,l)}return t}()<5?{min:0,max:5,interval:1}:{}),series:u.map((function(t,e){var i;return{type:"bar",stack:"risks",barWidth:20,name:a[e],data:null!==(i=null==r?void 0:r[t])&&void 0!==i?i:[],color:s[e]}})).reverse()};return l.a.createElement(d.a,{chartOption:f,__source:{fileName:"/data00/webprojectdev/hids_open/src/pages/overview/recent-risk-situation/risk-chart.tsx",lineNumber:142,columnNumber:10}})}},566:function(t,e,r){t.exports=function(){"use strict";var t=6e4,e=36e5,r="millisecond",i="second",o="minute",n="hour",a="day",l="week",s="month",c="quarter",d="year",u="date",h="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},b=function(t,e,r){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(r)+t},p={s:b,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),i=Math.floor(r/60),o=r%60;return(e<=0?"+":"-")+b(i,2,"0")+":"+b(o,2,"0")},m:function t(e,r){if(e.date()<r.date())return-t(r,e);var i=12*(r.year()-e.year())+(r.month()-e.month()),o=e.clone().add(i,s),n=r-o<0,a=e.clone().add(i+(n?-1:1),s);return+(-(i+(r-o)/(n?o-a:a-o))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:s,y:d,w:l,d:a,D:u,h:n,m:o,s:i,ms:r,Q:c}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},v="en",S={};S[v]=m;var g=function(t){return t instanceof D},$=function(t,e,r){var i;if(!t)return v;if("string"==typeof t)S[t]&&(i=t),e&&(S[t]=e,i=t);else{var o=t.name;S[o]=t,i=o}return!r&&i&&(v=i),i||!r&&v},w=function(t,e){if(g(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new D(r)},x=p;x.l=$,x.i=g,x.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var D=function(){function m(t){this.$L=$(t.locale,null,!0),this.parse(t)}var b=m.prototype;return b.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(x.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(f);if(i){var o=i[2]-1||0,n=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)):new Date(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},b.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},b.$utils=function(){return x},b.isValid=function(){return!(this.$d.toString()===h)},b.isSame=function(t,e){var r=w(t);return this.startOf(e)<=r&&r<=this.endOf(e)},b.isAfter=function(t,e){return w(t)<this.startOf(e)},b.isBefore=function(t,e){return this.endOf(e)<w(t)},b.$g=function(t,e,r){return x.u(t)?this[e]:this.set(r,t)},b.unix=function(){return Math.floor(this.valueOf()/1e3)},b.valueOf=function(){return this.$d.getTime()},b.startOf=function(t,e){var r=this,c=!!x.u(e)||e,h=x.p(t),f=function(t,e){var i=x.w(r.$u?Date.UTC(r.$y,e,t):new Date(r.$y,e,t),r);return c?i:i.endOf(a)},y=function(t,e){return x.w(r.toDate()[t].apply(r.toDate("s"),(c?[0,0,0,0]:[23,59,59,999]).slice(e)),r)},m=this.$W,b=this.$M,p=this.$D,v="set"+(this.$u?"UTC":"");switch(h){case d:return c?f(1,0):f(31,11);case s:return c?f(1,b):f(0,b+1);case l:var S=this.$locale().weekStart||0,g=(m<S?m+7:m)-S;return f(c?p-g:p+(6-g),b);case a:case u:return y(v+"Hours",0);case n:return y(v+"Minutes",1);case o:return y(v+"Seconds",2);case i:return y(v+"Milliseconds",3);default:return this.clone()}},b.endOf=function(t){return this.startOf(t,!1)},b.$set=function(t,e){var l,c=x.p(t),h="set"+(this.$u?"UTC":""),f=(l={},l[a]=h+"Date",l[u]=h+"Date",l[s]=h+"Month",l[d]=h+"FullYear",l[n]=h+"Hours",l[o]=h+"Minutes",l[i]=h+"Seconds",l[r]=h+"Milliseconds",l)[c],y=c===a?this.$D+(e-this.$W):e;if(c===s||c===d){var m=this.clone().set(u,1);m.$d[f](y),m.init(),this.$d=m.set(u,Math.min(this.$D,m.daysInMonth())).$d}else f&&this.$d[f](y);return this.init(),this},b.set=function(t,e){return this.clone().$set(t,e)},b.get=function(t){return this[x.p(t)]()},b.add=function(r,c){var u,h=this;r=Number(r);var f=x.p(c),y=function(t){var e=w(h);return x.w(e.date(e.date()+Math.round(t*r)),h)};if(f===s)return this.set(s,this.$M+r);if(f===d)return this.set(d,this.$y+r);if(f===a)return y(1);if(f===l)return y(7);var m=(u={},u[o]=t,u[n]=e,u[i]=1e3,u)[f]||1,b=this.$d.getTime()+r*m;return x.w(b,this)},b.subtract=function(t,e){return this.add(-1*t,e)},b.format=function(t){var e=this,r=this.$locale();if(!this.isValid())return r.invalidDate||h;var i=t||"YYYY-MM-DDTHH:mm:ssZ",o=x.z(this),n=this.$H,a=this.$m,l=this.$M,s=r.weekdays,c=r.months,d=function(t,r,o,n){return t&&(t[r]||t(e,i))||o[r].substr(0,n)},u=function(t){return x.s(n%12||12,t,"0")},f=r.meridiem||function(t,e,r){var i=t<12?"AM":"PM";return r?i.toLowerCase():i},m={YY:String(this.$y).slice(-2),YYYY:this.$y,M:l+1,MM:x.s(l+1,2,"0"),MMM:d(r.monthsShort,l,c,3),MMMM:d(c,l),D:this.$D,DD:x.s(this.$D,2,"0"),d:String(this.$W),dd:d(r.weekdaysMin,this.$W,s,2),ddd:d(r.weekdaysShort,this.$W,s,3),dddd:s[this.$W],H:String(n),HH:x.s(n,2,"0"),h:u(1),hh:u(2),a:f(n,a,!0),A:f(n,a,!1),m:String(a),mm:x.s(a,2,"0"),s:String(this.$s),ss:x.s(this.$s,2,"0"),SSS:x.s(this.$ms,3,"0"),Z:o};return i.replace(y,(function(t,e){return e||m[t]||o.replace(":","")}))},b.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},b.diff=function(r,u,h){var f,y=x.p(u),m=w(r),b=(m.utcOffset()-this.utcOffset())*t,p=this-m,v=x.m(this,m);return v=(f={},f[d]=v/12,f[s]=v,f[c]=v/3,f[l]=(p-b)/6048e5,f[a]=(p-b)/864e5,f[n]=p/e,f[o]=p/t,f[i]=p/1e3,f)[y]||p,h?v:x.a(v)},b.daysInMonth=function(){return this.endOf(s).$D},b.$locale=function(){return S[this.$L]},b.locale=function(t,e){if(!t)return this.$L;var r=this.clone(),i=$(t,e,!0);return i&&(r.$L=i),r},b.clone=function(){return x.w(this.$d,this)},b.toDate=function(){return new Date(this.valueOf())},b.toJSON=function(){return this.isValid()?this.toISOString():null},b.toISOString=function(){return this.$d.toISOString()},b.toString=function(){return this.$d.toUTCString()},m}(),C=D.prototype;return w.prototype=C,[["$ms",r],["$s",i],["$m",o],["$H",n],["$W",a],["$M",s],["$y",d],["$D",u]].forEach((function(t){C[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),w.extend=function(t,e){return t.$i||(t(e,D,w),t.$i=!0),w},w.locale=$,w.isDayjs=g,w.unix=function(t){return w(1e3*t)},w.en=S[v],w.Ls=S,w.p={},w}()},616:function(t,e,r){"use strict";var i=r(0),o=r.n(i),n=r(594),a=r(571);n.registerTheme("macarons",{color:["#E63F3F","#846BCE","#FEC745","#468DFF","#86DF6C","#5594f9","#8DDA76","#8E6D57","#F8C95C","#E55D8F","#339ca8","#cda819","#32a487"],backgroundColor:"#ffffff",textStyle:{},title:{textStyle:{color:"#282f38"},subtextStyle:{color:"#aaa"}},line:{itemStyle:{borderWidth:"2"},lineStyle:{width:2},symbolSize:"1",symbol:"emptyCircle",smooth:!1},radar:{itemStyle:{borderWidth:"1"},lineStyle:{width:2},symbolSize:"1",symbol:"emptyCircle",smooth:!1},bar:{itemStyle:{barBorderWidth:"0",barBorderColor:"#ccc"}},pie:{itemStyle:{borderWidth:"0",borderColor:"#ccc"}},scatter:{itemStyle:{borderWidth:"0",borderColor:"#ccc"}},boxplot:{itemStyle:{borderWidth:"0",borderColor:"#ccc"}},parallel:{itemStyle:{borderWidth:"0",borderColor:"#ccc"}},sankey:{itemStyle:{borderWidth:"0",borderColor:"#ccc"}},funnel:{itemStyle:{borderWidth:"0",borderColor:"#ccc"}},gauge:{itemStyle:{borderWidth:"0",borderColor:"#ccc"}},candlestick:{itemStyle:{color:"#c12e34",color0:"#2b821d",borderColor:"#c12e34",borderColor0:"#2b821d",borderWidth:1}},graph:{itemStyle:{borderWidth:"0",borderColor:"#ccc"},lineStyle:{width:1,color:"#aaa"},symbolSize:"1",symbol:"emptyCircle",smooth:!1,color:["#5594f9","#e6b600","#0098d9","#2b821d","#005eaa","#339ca8","#cda819","#32a487"],label:{color:"#eee"}},map:{itemStyle:{normal:{areaColor:"#ddd",borderColor:"#eee",borderWidth:.5},emphasis:{areaColor:"#e6b600",borderColor:"#ddd",borderWidth:1}},label:{normal:{textStyle:{color:"#c12e34"}},emphasis:{textStyle:{color:"#c12e34"}}}},geo:{itemStyle:{normal:{areaColor:"#ddd",borderColor:"#eee",borderWidth:.5},emphasis:{areaColor:"#e6b600",borderColor:"#ddd",borderWidth:1}},label:{normal:{textStyle:{color:"#c12e34"}},emphasis:{textStyle:{color:"#c12e34"}}}},categoryAxis:{axisLine:{show:!0,lineStyle:{color:"#a9aeb8"}},axisTick:{show:!0,lineStyle:{color:"#a9aeb8"}},axisLabel:{show:!0,textStyle:{color:"#4e5969"}},splitLine:{show:!1,lineStyle:{color:["#ccc"]}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},valueAxis:{axisLine:{show:!1,lineStyle:{color:"#a9aeb8"}},axisTick:{show:!1,lineStyle:{color:"#a9aeb8"}},axisLabel:{show:!0,textStyle:{color:"#4e5969"}},splitLine:{show:!0,lineStyle:{color:["#e5e6eb"]}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},logAxis:{axisLine:{show:!0,lineStyle:{color:"#333"}},axisTick:{show:!0,lineStyle:{color:"#333"}},axisLabel:{show:!0,textStyle:{color:"#333"}},splitLine:{show:!0,lineStyle:{color:["#ccc"]}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},timeAxis:{axisLine:{show:!0,lineStyle:{color:"#a9aeb8"}},axisTick:{show:!0,lineStyle:{color:"#a9aeb8"}},axisLabel:{show:!0,textStyle:{color:"#4e5969"}},splitLine:{show:!1,lineStyle:{color:["#ccc"]}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},toolbox:{iconStyle:{normal:{borderColor:"#06467c"},emphasis:{borderColor:"#4187c2"}}},legend:{textStyle:{color:"#333333"}},tooltip:{backgroundColor:"#1D2129",axisPointer:{lineStyle:{color:"#3370ff",width:"1"},crossStyle:{color:"#3370ff",width:"1"}}},timeline:{lineStyle:{color:"#005eaa",width:1},itemStyle:{normal:{color:"#005eaa",borderWidth:1},emphasis:{color:"#005eaa"}},controlStyle:{normal:{color:"#005eaa",borderColor:"#005eaa",borderWidth:.5},emphasis:{color:"#005eaa",borderColor:"#005eaa",borderWidth:.5}},checkpointStyle:{color:"#005eaa",borderColor:"rgba(49,107,194,0.5)"},label:{normal:{textStyle:{color:"#005eaa"}},emphasis:{textStyle:{color:"#005eaa"}}}},visualMap:{color:["#1790cf","#a2d4e6"]},dataZoom:{backgroundColor:"rgba(47,69,84,0)",dataBackgroundColor:"rgba(47,69,84,0.3)",fillerColor:"rgba(167,183,204,0.4)",handleColor:"#a7b7cc",handleSize:"100%",textStyle:{color:"#333333"}},markPoint:{label:{color:"#eee"},emphasis:{label:{color:"#eee"}}}});e.a=function(t){var e=t.chartOption;return o.a.createElement(a.a,{theme:"macarons",option:e,notMerge:!0,style:{height:"100%"},__source:{fileName:"/data00/webprojectdev/hids_open/src/components/common/chart/chart.tsx",lineNumber:21,columnNumber:5}})}}}]);