hugo-theme-roland/static/js/kityminder.core.min.js

10 lines
128 KiB
JavaScript
Raw Normal View History

2021-07-09 14:54:40 +00:00
/*!
* ====================================================
* Kity Minder Core - v1.4.49 - 2018-04-02
* https://github.com/fex-team/kityminder-core
* GitHub: https://github.com/fex-team/kityminder-core.git
* Copyright (c) 2018 Baidu FEX; Licensed BSD-3-Clause
* ====================================================
*/
!function(){function a(a){b.r([c[a]])}var b={r:function(a){if(b[a].inited)return b[a].value;if("function"!=typeof b[a].value)return b[a].inited=!0,b[a].value;var c={exports:{}},d=b[a].value(null,c.exports,c);if(b[a].inited=!0,b[a].value=d,void 0!==d)return d;for(var e in c.exports)if(c.exports.hasOwnProperty(e))return b[a].inited=!0,b[a].value=c.exports,c.exports}};b[0]={value:function(a,c,d){var e=b.r(17),f=b.r(11),g=(new e.Marker).pipe(function(){var a=7,b=new e.Circle(a-1);this.addShape(b),this.setRef(a-1,0).setViewBox(-a,-a,a+a,a+a).setWidth(a).setHeight(a),this.dot=b,this.node.setAttribute("markerUnits","userSpaceOnUse")});f.register("arc",function(a,b,c,d,f){var h,i,j,k=a.getLayoutBox(),l=b.getLayoutBox(),m=Math.abs,n=[],o=k.x>l.x?"right":"left";a.getMinder().getPaper().addResource(g),h=new e.Point(l.cx,l.cy),i="left"==o?new e.Point(k.right+2,k.cy):new e.Point(k.left-2,k.cy),j=e.Vector.fromPoints(h,i),n.push("M",h),n.push("A",m(j.x),m(j.y),0,0,j.x*j.y>0?0:1,i),c.setMarker(g),g.dot.fill(f),c.setPathData(n)})}},b[1]={value:function(a,c,d){var e=b.r(17),f=b.r(11),g=(new e.Marker).pipe(function(){var a=7,b=new e.Circle(a-1);this.addShape(b),this.setRef(a-1,0).setViewBox(-a,-a,a+a,a+a).setWidth(a).setHeight(a),this.dot=b,this.node.setAttribute("markerUnits","userSpaceOnUse")});f.register("arc_tp",function(a,b,c,d,f){var h=a.getLayoutBox(),i=b.getLayoutBox(),j=a.getIndex(),k=b.getChildren()[j+1];a.getIndex()>0&&(i=b.getChildren()[j-1].getLayoutBox());var l,m,n=(Math.abs,[]);h.x,i.x;a.getMinder().getPaper().addResource(g),l=new e.Point(i.cx,i.cy),m=new e.Point(h.cx,h.cy);var o=Math.sqrt(Math.pow(l.x-m.x,2)+Math.pow(l.y-m.y,2));if(o=0==a.getIndex()?.4*o:o,e.Vector.fromPoints(l,m),n.push("M",l),n.push("A",o,o,0,0,1,m),c.setMarker(g),g.dot.fill(f),c.setPathData(n),k&&k.getConnection()){var p=k.getConnection(),q=k.getLayoutBox(),r=new e.Point(q.cx,q.cy),s=Math.sqrt(Math.pow(m.x-r.x,2)+Math.pow(m.y-r.y,2));n=[],n.push("M",m),n.push("A",s,s,0,0,1,r),p.setMarker(g),g.dot.fill(f),p.setPathData(n)}})}},b[2]={value:function(a,c,d){b.r(17);b.r(11).register("bezier",function(a,b,c){var d=b.getLayoutVertexOut(),e=a.getLayoutVertexIn(),f=b.getLayoutVectorOut().normalize(),g=Math.round,h=Math.abs,i=[];if(i.push("M",g(d.x),g(d.y)),h(f.x)>h(f.y)){var j=(e.x+d.x)/2;i.push("C",j,d.y,j,e.y,e.x,e.y)}else{var k=(e.y+d.y)/2;i.push("C",d.x,k,e.x,k,e.x,e.y)}c.setMarker(null),c.setPathData(i)})}},b[3]={value:function(a,c,d){b.r(17);b.r(11).register("fish-bone-master",function(a,b,c){var d=b.getLayoutVertexOut(),e=a.getLayoutVertexIn(),f=Math.abs,g=f(d.y-e.y),h=f(d.x-e.x),i=[];i.push("M",d.x,d.y),i.push("h",h-g),i.push("L",e.x,e.y),c.setMarker(null),c.setPathData(i)})}},b[4]={value:function(a,c,d){b.r(17);b.r(11).register("l",function(a,b,c){var d=b.getLayoutVertexOut(),e=a.getLayoutVertexIn(),f=b.getLayoutVectorOut(),g=[],h=Math.round,i=Math.abs;g.push("M",d.round()),i(f.x)>i(f.y)?g.push("H",h(e.x)):g.push("V",e.y),g.push("L",e),c.setPathData(g)})}},b[5]={value:function(a,c,d){b.r(17);b.r(11).register("poly",function(a,b,c,d){var e=b.getLayoutVertexOut(),f=a.getLayoutVertexIn(),g=b.getLayoutVectorOut().normalize(),h=Math.round,i=Math.abs,j=[];switch(j.push("M",h(e.x),h(e.y)),!0){case i(g.x)>i(g.y)&&g.x<0:j.push("h",-b.getStyle("margin-left")),j.push("v",f.y-e.y),j.push("H",f.x);break;case i(g.x)>i(g.y)&&g.x>=0:j.push("h",b.getStyle("margin-right")),j.push("v",f.y-e.y),j.push("H",f.x);break;case i(g.x)<=i(g.y)&&g.y<0:j.push("v",-b.getStyle("margin-top")),j.push("h",f.x-e.x),j.push("V",f.y);break;case i(g.x)<=i(g.y)&&g.y>=0:j.push("v",b.getStyle("margin-bottom")),j.push("h",f.x-e.x),j.push("V",f.y)}c.setMarker(null),c.setPathData(j)})}},b[6]={value:function(a,c,d){var e=b.r(17);b.r(11).register("under",function(a,b,c,d,f){var g,h,i,j,k=a.getLayoutBox(),l=b.getLayoutBox(),m=(Math.abs,[]),n=k.x>l.x?"right":"left",o=(a.getStyle("connect-radius"),k.bottom+3),p="sub"==b.getType()?l.bottom+3:l.cy;"right"==n?(g=new e.Point(l.right,p),h=new e.Point(k.left-10,o),i=new e.Point(k.right,o)):(g=new e.Point(l.left,p),h=new e.Point(k.right+10,o),i=new e.Point(k.l