Newer
Older
smartwell_front_dz / smartwell / static / js / chunk-libs-5509b1e6.15fd35e0.js
wangxitong on 11 Sep 2023 15 KB first commit
(self["webpackChunknewfront"]=self["webpackChunknewfront"]||[]).push([[6145],{90110:(e,t,a)=>{var i=a(70492);a(84066),a(16140),a(78244);var n=a(21330),o=a(9496),r=a(22528);i.registerLayout(n),i.registerVisual(o),i.registerProcessor(r("themeRiver"))},16140:(e,t,a)=>{var i=a(93321),n=a(55623),o=a(10381),r=o.getDimensionTypeByAxis,l=a(87587),s=a(33051),d=a(32234),c=d.groupData,h=a(78988),u=h.encodeHTML,p=a(72019),g=2,y=i.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(e){y.superApply(this,"init",arguments),this.legendVisualProvider=new p(s.bind(this.getData,this),s.bind(this.getRawData,this))},fixData:function(e){var t=e.length,a={},i=c(e,(function(e){return a.hasOwnProperty(e[0])||(a[e[0]]=-1),e[2]})),n=[];i.buckets.each((function(e,t){n.push({name:t,dataList:e})}));for(var o=n.length,r=0;r<o;++r){for(var l=n[r].name,s=0;s<n[r].dataList.length;++s){var d=n[r].dataList[s][0];a[d]=r}for(var d in a)a.hasOwnProperty(d)&&a[d]!==r&&(a[d]=r,e[t]=[],e[t][0]=d,e[t][1]=0,e[t][2]=l,t++)}return e},getInitialData:function(e,t){for(var a=t.queryComponents({mainType:"singleAxis",index:this.get("singleAxisIndex"),id:this.get("singleAxisId")})[0],i=a.get("type"),o=s.filter(e.data,(function(e){return void 0!==e[2]})),d=this.fixData(o||[]),c=[],h=this.nameMap=s.createHashMap(),u=0,p=0;p<d.length;++p)c.push(d[p][g]),h.get(d[p][g])||(h.set(d[p][g],u),u++);var y=n(d,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:r(i)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}),m=new l(y,this);return m.initData(d),m},getLayerSeries:function(){for(var e=this.getData(),t=e.count(),a=[],i=0;i<t;++i)a[i]=i;var n=e.mapDimension("single"),o=c(a,(function(t){return e.get("name",t)})),r=[];return o.buckets.each((function(t,a){t.sort((function(t,a){return e.get(n,t)-e.get(n,a)})),r.push({name:a,indices:t})})),r},getAxisTooltipData:function(e,t,a){s.isArray(e)||(e=e?[e]:[]);for(var i,n=this.getData(),o=this.getLayerSeries(),r=[],l=o.length,d=0;d<l;++d){for(var c=Number.MAX_VALUE,h=-1,u=o[d].indices.length,p=0;p<u;++p){var g=n.get(e[0],o[d].indices[p]),y=Math.abs(g-t);y<=c&&(i=g,c=y,h=o[d].indices[p])}r.push(h)}return{dataIndices:r,nestestValue:i}},formatTooltip:function(e){var t=this.getData(),a=t.getName(e),i=t.get(t.mapDimension("value"),e);return(isNaN(i)||null==i)&&(i="-"),u(a+" : "+i)},defaultOption:{zlevel:0,z:2,coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",color:"#000",fontSize:11},emphasis:{label:{show:!0}}}}),m=y;e.exports=m},78244:(e,t,a)=>{var i=a(70492),n=a(30633),o=n.Polygon,r=a(51177),l=a(33051),s=l.bind,d=l.extend,c=a(4130),h=i.extendChartView({type:"themeRiver",init:function(){this._layers=[]},render:function(e,t,a){var i=e.getData(),n=this.group,l=e.getLayerSeries(),h=i.getLayout("layoutInfo"),p=h.rect,g=h.boundaryGap;function y(e){return e.name}n.attr("position",[0,p.y+g[0]]);var m=new c(this._layersSeries||[],l,y,y),f={};function v(t,a,s){var c=this._layers;if("remove"!==t){for(var h,p,g,y=[],m=[],v=l[a].indices,x=0;x<v.length;x++){var _=i.getItemLayout(v[x]),w=_.x,S=_.y0,I=_.y;y.push([w,S]),m.push([w,S+I]),h=i.getItemVisual(v[x],"color")}var P=i.getItemLayout(v[0]),b=i.getItemModel(v[x-1]),L=b.getModel("label"),N=L.get("margin");if("add"===t){var D=f[a]=new r.Group;p=new o({shape:{points:y,stackedOnPoints:m,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),g=new r.Text({style:{x:P.x-N,y:P.y0+P.y/2}}),D.add(p),D.add(g),n.add(D),p.setClipPath(u(p.getBoundingRect(),e,(function(){p.removeClipPath()})))}else{D=c[s];p=D.childAt(0),g=D.childAt(1),n.add(D),f[a]=D,r.updateProps(p,{shape:{points:y,stackedOnPoints:m}},e),r.updateProps(g,{style:{x:P.x-N,y:P.y0+P.y/2}},e)}var M=b.getModel("emphasis.itemStyle"),R=b.getModel("itemStyle");r.setTextStyle(g.style,L,{text:L.get("show")?e.getFormattedLabel(v[x-1],"normal")||i.getName(v[x-1]):null,textVerticalAlign:"middle"}),p.setStyle(d({fill:h},R.getItemStyle(["color"]))),r.setHoverStyle(p,M.getItemStyle())}else n.remove(c[a])}m.add(s(v,this,"add")).update(s(v,this,"update")).remove(s(v,this,"remove")).execute(),this._layersSeries=l,this._layers=f},dispose:function(){}});function u(e,t,a){var i=new r.Rect({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return r.initProps(i,{shape:{width:e.width+20,height:e.height+20}},t,a),i}e.exports=h},21330:(e,t,a)=>{var i=a(33051),n=a(85669);function o(e,t){e.eachSeriesByType("themeRiver",(function(e){var t=e.getData(),a=e.coordinateSystem,i={},o=a.getRect();i.rect=o;var l=e.get("boundaryGap"),s=a.getAxis();if(i.boundaryGap=l,"horizontal"===s.orient){l[0]=n.parsePercent(l[0],o.height),l[1]=n.parsePercent(l[1],o.height);var d=o.height-l[0]-l[1];r(t,e,d)}else{l[0]=n.parsePercent(l[0],o.width),l[1]=n.parsePercent(l[1],o.width);var c=o.width-l[0]-l[1];r(t,e,c)}t.setLayout("layoutInfo",i)}))}function r(e,t,a){if(e.count())for(var n,o=t.coordinateSystem,r=t.getLayerSeries(),s=e.mapDimension("single"),d=e.mapDimension("value"),c=i.map(r,(function(t){return i.map(t.indices,(function(t){var a=o.dataToPoint(e.get(s,t));return a[1]=e.get(d,t),a}))})),h=l(c),u=h.y0,p=a/h.max,g=r.length,y=r[0].indices.length,m=0;m<y;++m){n=u[m]*p,e.setItemLayout(r[0].indices[m],{layerIndex:0,x:c[0][m][0],y0:n,y:c[0][m][1]*p});for(var f=1;f<g;++f)n+=c[f-1][m][1]*p,e.setItemLayout(r[f].indices[m],{layerIndex:f,x:c[f][m][0],y0:n,y:c[f][m][1]*p})}}function l(e){for(var t=e.length,a=e[0].length,i=[],n=[],o=0,r={},l=0;l<a;++l){for(var s=0,d=0;s<t;++s)d+=e[s][l][1];d>o&&(o=d),i.push(d)}for(var c=0;c<a;++c)n[c]=(o-i[c])/2;o=0;for(var h=0;h<a;++h){var u=i[h]+n[h];u>o&&(o=u)}return r.y0=n,r.max=o,r}e.exports=o},9496:(e,t,a)=>{var i=a(33051),n=i.createHashMap;function o(e){e.eachSeriesByType("themeRiver",(function(e){var t=e.getData(),a=e.getRawData(),i=e.get("color"),o=n();t.each((function(e){o.set(t.getRawIndex(e),e)})),a.each((function(n){var r=a.getName(n),l=i[(e.nameMap.get(r)-1)%i.length];a.setItemVisual(n,"color",l);var s=o.get(n);null!=s&&t.setItemVisual(s,"color",l)}))}))}e.exports=o},97908:(e,t,a)=>{var i=a(93321),n=a(9327),o=a(78988),r=o.encodeHTML,l=a(4272),s=i.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(e){var t={name:e.name,children:e.data},a=e.leaves||{},i=new l(a,this,this.ecModel),o=n.createTree(t,this,r);function r(e){e.wrapMethod("getItemModel",(function(e,t){var a=o.getNodeByDataIndex(t);return a.children.length&&a.isExpand||(e.parentModel=i),e}))}var s=0;o.eachNode("preorder",(function(e){e.depth>s&&(s=e.depth)}));var d=e.expandAndCollapse,c=d&&e.initialTreeDepth>=0?e.initialTreeDepth:s;return o.root.eachNode("preorder",(function(e){var t=e.hostTree.data.getRawDataItem(e.dataIndex);e.isExpand=t&&null!=t.collapsed?!t.collapsed:e.depth<=c})),o.data},getOrient:function(){var e=this.get("orient");return"horizontal"===e?e="LR":"vertical"===e&&(e="TB"),e},setZoom:function(e){this.option.zoom=e},setCenter:function(e){this.option.center=e},formatTooltip:function(e){var t=this.getData().tree,a=t.root.children[0],i=t.getNodeByDataIndex(e),n=i.getValue(),o=i.name;while(i&&i!==a)o=i.parentNode.name+"."+o,i=i.parentNode;return r(o+(isNaN(n)||null==n?"":" : "+n))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}});e.exports=s},37732:(e,t,a)=>{var i=a(33051),n=a(51177),o=a(66351),r=a(69387),l=r.radialCoordinate,s=a(70492),d=a(3726),c=a(23845),h=a(31194),u=a(9176),p=a(61485),g=p.onIrrelevantElement,y=a(38175),m=(y.__DEV__,a(85669)),f=m.parsePercent,v=n.extendShape({shape:{parentPoint:[],childPoints:[],orient:"",forkPosition:""},style:{stroke:"#000",fill:null},buildPath:function(e,t){var a=t.childPoints,i=a.length,n=t.parentPoint,o=a[0],r=a[i-1];if(1===i)return e.moveTo(n[0],n[1]),void e.lineTo(o[0],o[1]);var l=t.orient,s="TB"===l||"BT"===l?0:1,d=1-s,c=f(t.forkPosition,1),h=[];h[s]=n[s],h[d]=n[d]+(r[d]-n[d])*c,e.moveTo(n[0],n[1]),e.lineTo(h[0],h[1]),e.moveTo(o[0],o[1]),h[s]=o[s],e.lineTo(h[0],h[1]),h[s]=r[s],e.lineTo(h[0],h[1]),e.lineTo(r[0],r[1]);for(var u=1;u<i-1;u++){var p=a[u];e.moveTo(p[0],p[1]),h[s]=p[s],e.lineTo(h[0],h[1])}}}),x=s.extendChartView({type:"tree",init:function(e,t){this._oldTree,this._mainGroup=new n.Group,this._controller=new u(t.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(e,t,a,i){var n=e.getData(),o=e.layoutInfo,r=this._mainGroup,l=e.get("layout");"radial"===l?r.attr("position",[o.x+o.width/2,o.y+o.height/2]):r.attr("position",[o.x,o.y]),this._updateViewCoordSys(e,o,l),this._updateController(e,t,a);var s=this._data,d={expandAndCollapse:e.get("expandAndCollapse"),layout:l,edgeShape:e.get("edgeShape"),edgeForkPosition:e.get("edgeForkPosition"),orient:e.getOrient(),curvature:e.get("lineStyle.curveness"),symbolRotate:e.get("symbolRotate"),symbolOffset:e.get("symbolOffset"),hoverAnimation:e.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};n.diff(s).add((function(t){_(n,t)&&S(n,t,null,r,e,d)})).update((function(t,a){var i=s.getItemGraphicEl(a);_(n,t)?S(n,t,i,r,e,d):i&&P(s,a,i,r,e,d)})).remove((function(t){var a=s.getItemGraphicEl(t);a&&P(s,t,a,r,e,d)})).execute(),this._nodeScaleRatio=e.get("nodeScaleRatio"),this._updateNodeAndLinkScale(e),!0===d.expandAndCollapse&&n.eachItemGraphicEl((function(t,i){t.off("click").on("click",(function(){a.dispatchAction({type:"treeExpandAndCollapse",seriesId:e.id,dataIndex:i})}))})),this._data=n},_updateViewCoordSys:function(e){var t=e.getData(),a=[];t.each((function(e){var i=t.getItemLayout(e);!i||isNaN(i.x)||isNaN(i.y)||a.push([+i.x,+i.y])}));var i=[],n=[];d.fromPoints(a,i,n);var o=this._min,r=this._max;n[0]-i[0]===0&&(i[0]=o?o[0]:i[0]-1,n[0]=r?r[0]:n[0]+1),n[1]-i[1]===0&&(i[1]=o?o[1]:i[1]-1,n[1]=r?r[1]:n[1]+1);var l=e.coordinateSystem=new c;l.zoomLimit=e.get("scaleLimit"),l.setBoundingRect(i[0],i[1],n[0]-i[0],n[1]-i[1]),l.setCenter(e.get("center")),l.setZoom(e.get("zoom")),this.group.attr({position:l.position,scale:l.scale}),this._viewCoordSys=l,this._min=i,this._max=n},_updateController:function(e,t,a){var i=this._controller,n=this._controllerHost,o=this.group;i.setPointerChecker((function(t,i,n){var r=o.getBoundingRect();return r.applyTransform(o.transform),r.contain(i,n)&&!g(t,a,e)})),i.enable(e.get("roam")),n.zoomLimit=e.get("scaleLimit"),n.zoom=e.coordinateSystem.getZoom(),i.off("pan").off("zoom").on("pan",(function(t){h.updateViewOnPan(n,t.dx,t.dy),a.dispatchAction({seriesId:e.id,type:"treeRoam",dx:t.dx,dy:t.dy})}),this).on("zoom",(function(t){h.updateViewOnZoom(n,t.scale,t.originX,t.originY),a.dispatchAction({seriesId:e.id,type:"treeRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(e)}),this)},_updateNodeAndLinkScale:function(e){var t=e.getData(),a=this._getNodeGlobalScale(e),i=[a,a];t.eachItemGraphicEl((function(e,t){e.attr("scale",i)}))},_getNodeGlobalScale:function(e){var t=e.coordinateSystem;if("view"!==t.type)return 1;var a=this._nodeScaleRatio,i=t.scale,n=i&&i[0]||1,o=t.getZoom(),r=(o-1)*a+1;return r/n},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}});function _(e,t){var a=e.getItemLayout(t);return a&&!isNaN(a.x)&&!isNaN(a.y)&&"none"!==e.getItemVisual(t,"symbol")}function w(e,t,a){return a.itemModel=t,a.itemStyle=t.getModel("itemStyle").getItemStyle(),a.hoverItemStyle=t.getModel("emphasis.itemStyle").getItemStyle(),a.lineStyle=t.getModel("lineStyle").getLineStyle(),a.labelModel=t.getModel("label"),a.hoverLabelModel=t.getModel("emphasis.label"),!1===e.isExpand&&0!==e.children.length?a.symbolInnerColor=a.itemStyle.fill:a.symbolInnerColor="#fff",a}function S(e,t,a,i,r,l){var s=!a,d=e.tree.getNodeByDataIndex(t),c=d.getModel(),h=(l=w(d,c,l),e.tree.root),u=d.parentNode===h?d:d.parentNode||d,p=e.getItemGraphicEl(u.dataIndex),g=u.getLayout(),y=p?{x:p.position[0],y:p.position[1],rawX:p.__radialOldRawX,rawY:p.__radialOldRawY}:g,m=d.getLayout();s?(a=new o(e,t,l),a.attr("position",[y.x,y.y])):a.updateData(e,t,l),a.__radialOldRawX=a.__radialRawX,a.__radialOldRawY=a.__radialRawY,a.__radialRawX=m.rawX,a.__radialRawY=m.rawY,i.add(a),e.setItemGraphicEl(t,a),n.updateProps(a,{position:[m.x,m.y]},r);var f=a.getSymbolPath();if("radial"===l.layout){var v,x,_=h.children[0],S=_.getLayout(),P=_.children.length;if(m.x===S.x&&!0===d.isExpand){var b={};b.x=(_.children[0].getLayout().x+_.children[P-1].getLayout().x)/2,b.y=(_.children[0].getLayout().y+_.children[P-1].getLayout().y)/2,v=Math.atan2(b.y-S.y,b.x-S.x),v<0&&(v=2*Math.PI+v),x=b.x<S.x,x&&(v-=Math.PI)}else v=Math.atan2(m.y-S.y,m.x-S.x),v<0&&(v=2*Math.PI+v),0===d.children.length||0!==d.children.length&&!1===d.isExpand?(x=m.x<S.x,x&&(v-=Math.PI)):(x=m.x>S.x,x||(v-=Math.PI));var L=x?"left":"right",N=l.labelModel.get("rotate"),D=N*(Math.PI/180);f.setStyle({textPosition:l.labelModel.get("position")||L,textRotation:null==N?-v:D,textOrigin:"center",verticalAlign:"middle"})}I(r,d,h,a,y,g,m,i,l)}function I(e,t,a,o,r,l,s,d,c){var h=c.edgeShape,u=o.__edge;if("curve"===h)t.parentNode&&t.parentNode!==a&&(u||(u=o.__edge=new n.BezierCurve({shape:b(c,r,r),style:i.defaults({opacity:0,strokeNoScale:!0},c.lineStyle)})),n.updateProps(u,{shape:b(c,l,s),style:i.defaults({opacity:1},c.lineStyle)},e));else if("polyline"===h&&"orthogonal"===c.layout&&t!==a&&t.children&&0!==t.children.length&&!0===t.isExpand){for(var p=t.children,g=[],y=0;y<p.length;y++){var m=p[y].getLayout();g.push([m.x,m.y])}u||(u=o.__edge=new v({shape:{parentPoint:[s.x,s.y],childPoints:[[s.x,s.y]],orient:c.orient,forkPosition:c.edgeForkPosition},style:i.defaults({opacity:0,strokeNoScale:!0},c.lineStyle)})),n.updateProps(u,{shape:{parentPoint:[s.x,s.y],childPoints:g},style:i.defaults({opacity:1},c.lineStyle)},e)}d.add(u)}function P(e,t,a,i,o,r){var l,s=e.tree.getNodeByDataIndex(t),d=e.tree.root,c=s.getModel(),h=(r=w(s,c,r),s.parentNode===d?s:s.parentNode||s),u=r.edgeShape;while(l=h.getLayout(),null==l)h=h.parentNode===d?h:h.parentNode||h;n.updateProps(a,{position:[l.x+1,l.y+1]},o,(function(){i.remove(a),e.setItemGraphicEl(t,null)})),a.fadeOut(null,{keepLabel:!0});var p=e.getItemGraphicEl(h.dataIndex),g=p.__edge,y=a.__edge||(!1===h.isExpand||1===h.children.length?g:void 0);u=r.edgeShape;y&&("curve"===u?n.updateProps(y,{shape:b(r,l,l),style:{opacity:0}},o,(function(){i.remove(y)})):"polyline"===u&&"orthogonal"===r.layout&&n.updateProps(y,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},o,(function(){i.remove(y)})))}function b(e,t,a){var i,n,o,r,s,d,c,h,u=e.orient;if("radial"===e.layout){s=t.rawX,c=t.rawY,d=a.rawX,h=a.rawY;var p=l(s,c),g=l(s,c+(h-c)*e.curvature),y=l(d,h+(c-h)*e.curvature),m=l(d,h);return{x1:p.x,y1:p.y,x2:m.x,y2:m.y,cpx1:g.x,cpy1:g.y,cpx2:y.x,cpy2:y.y}}return s=t.x,c=t.y,d=a.x,h=a.y,"LR"!==u&&"RL"!==u||(i=s+(d-s)*e.curvature,n=c,o=d+(s-d)*e.curvature,r=h),"TB"!==u&&"BT"!==u||(i=s,n=c+(h-c)*e.curvature,o=d,r=h+(c-h)*e.curvature),{x1:s,y1:c,x2:d,y2:h,cpx1:i,cpy1:n,cpx2:o,cpy2:r}}e.exports=x}}]);