tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hyun...@apache.org
Subject [13/51] [partial] TAJO-752: Escalate sub modules in tajo-core into the top-level modules. (hyunsik)
Date Fri, 18 Apr 2014 09:19:35 GMT
http://git-wip-us.apache.org/repos/asf/tajo/blob/6594ac1c/tajo-core/src/main/resources/webapps/static/js/jquery.jsPlumb-1.3.16-all-min.js
----------------------------------------------------------------------
diff --git a/tajo-core/src/main/resources/webapps/static/js/jquery.jsPlumb-1.3.16-all-min.js b/tajo-core/src/main/resources/webapps/static/js/jquery.jsPlumb-1.3.16-all-min.js
new file mode 100644
index 0000000..48b4cc5
--- /dev/null
+++ b/tajo-core/src/main/resources/webapps/static/js/jquery.jsPlumb-1.3.16-all-min.js
@@ -0,0 +1 @@
+jsPlumbUtil={isArray:function(b){return Object.prototype.toString.call(b)==="[object Array]"},isString:function(a){return typeof a==="string"},isBoolean:function(a){return typeof a==="boolean"},isObject:function(a){return Object.prototype.toString.call(a)==="[object Object]"},isDate:function(a){return Object.prototype.toString.call(a)==="[object Date]"},isFunction:function(a){return Object.prototype.toString.call(a)==="[object Function]"},clone:function(d){if(this.isString(d)){return new String(d)}else{if(this.isBoolean(d)){return new Boolean(d)}else{if(this.isDate(d)){return new Date(d.getTime())}else{if(this.isFunction(d)){return d}else{if(this.isArray(d)){var c=[];for(var e=0;e<d.length;e++){c.push(this.clone(d[e]))}return c}else{if(this.isObject(d)){var c={};for(var e in d){c[e]=this.clone(d[e])}return c}else{return d}}}}}}},merge:function(e,d){var k=this.clone(e);for(var h in d){if(k[h]==null||this.isString(d[h])||this.isBoolean(d[h])){k[h]=d[h]}else{if(this.isArray(d[h])&&this
 .isArray(k[h])){var f=[];f.push.apply(f,k[h]);f.push.apply(f,d[h]);k[h]=f}else{if(this.isObject(k[h])&&this.isObject(d[h])){for(var g in d[h]){k[h][g]=d[h][g]}}}}}return k},convertStyle:function(b,a){if("transparent"===b){return b}var g=b,f=function(h){return h.length==1?"0"+h:h},c=function(h){return f(Number(h).toString(16))},d=/(rgb[a]?\()(.*)(\))/;if(b.match(d)){var e=b.match(d)[2].split(",");g="#"+c(e[0])+c(e[1])+c(e[2]);if(!a&&e.length==4){g=g+c(e[3])}}return g},gradient:function(b,a){b=jsPlumbUtil.isArray(b)?b:[b.x,b.y];a=jsPlumbUtil.isArray(a)?a:[a.x,a.y];return(a[1]-b[1])/(a[0]-b[0])},normal:function(b,a){return -1/jsPlumbUtil.gradient(b,a)},lineLength:function(b,a){b=jsPlumbUtil.isArray(b)?b:[b.x,b.y];a=jsPlumbUtil.isArray(a)?a:[a.x,a.y];return Math.sqrt(Math.pow(a[1]-b[1],2)+Math.pow(a[0]-b[0],2))},segment:function(b,a){b=jsPlumbUtil.isArray(b)?b:[b.x,b.y];a=jsPlumbUtil.isArray(a)?a:[a.x,a.y];if(a[0]>b[0]){return(a[1]>b[1])?2:1}else{return(a[1]>b[1])?3:4}},intersects:funct
 ion(f,e){var c=f.x,a=f.x+f.w,k=f.y,h=f.y+f.h,d=e.x,b=e.x+e.w,i=e.y,g=e.y+e.h;return((c<=d&&d<=a)&&(k<=i&&i<=h))||((c<=b&&b<=a)&&(k<=i&&i<=h))||((c<=d&&d<=a)&&(k<=g&&g<=h))||((c<=b&&d<=a)&&(k<=g&&g<=h))||((d<=c&&c<=b)&&(i<=k&&k<=g))||((d<=a&&a<=b)&&(i<=k&&k<=g))||((d<=c&&c<=b)&&(i<=h&&h<=g))||((d<=a&&c<=b)&&(i<=h&&h<=g))},segmentMultipliers:[null,[1,-1],[1,1],[-1,1],[-1,-1]],inverseSegmentMultipliers:[null,[-1,-1],[-1,1],[1,1],[1,-1]],pointOnLine:function(a,e,b){var d=jsPlumbUtil.gradient(a,e),i=jsPlumbUtil.segment(a,e),h=b>0?jsPlumbUtil.segmentMultipliers[i]:jsPlumbUtil.inverseSegmentMultipliers[i],c=Math.atan(d),f=Math.abs(b*Math.sin(c))*h[1],g=Math.abs(b*Math.cos(c))*h[0];return{x:a.x+g,y:a.y+f}},perpendicularLineTo:function(c,d,e){var b=jsPlumbUtil.gradient(c,d),f=Math.atan(-1/b),g=e/2*Math.sin(f),a=e/2*Math.cos(f);return[{x:d.x+a,y:d.y+g},{x:d.x-a,y:d.y-g}]},findWithFunction:function(b,d){if(b){for(var c=0;c<b.length;c++){if(d(b[c])){return c}}}return -1},indexOf:function(a,b){r
 eturn jsPlumbUtil.findWithFunction(a,function(c){return c==b})},removeWithFunction:function(c,d){var b=jsPlumbUtil.findWithFunction(c,d);if(b>-1){c.splice(b,1)}return b!=-1},remove:function(b,c){var a=jsPlumbUtil.indexOf(b,c);if(a>-1){b.splice(a,1)}return a!=-1},addWithFunction:function(c,b,a){if(jsPlumbUtil.findWithFunction(c,a)==-1){c.push(b)}},addToList:function(d,b,c){var a=d[b];if(a==null){a=[],d[b]=a}a.push(c);return a},EventGenerator:function(){var c={},b=this;var a=["ready"];this.bind=function(d,e){jsPlumbUtil.addToList(c,d,e);return b};this.fire=function(g,h,d){if(c[g]){for(var f=0;f<c[g].length;f++){if(jsPlumbUtil.findWithFunction(a,function(i){return i===g})!=-1){c[g][f](h,d)}else{try{c[g][f](h,d)}catch(k){jsPlumbUtil.log("jsPlumb: fire failed for event "+g+" : "+k)}}}}return b};this.unbind=function(d){if(d){delete c[d]}else{c={}}return b};this.getListener=function(d){return c[d]}},logEnabled:true,log:function(){if(jsPlumbUtil.logEnabled&&typeof console!="undefined"){try{
 var b=arguments[arguments.length-1];console.log(b)}catch(a){}}},group:function(a){if(jsPlumbUtil.logEnabled&&typeof console!="undefined"){console.group(a)}},groupEnd:function(a){if(jsPlumbUtil.logEnabled&&typeof console!="undefined"){console.groupEnd(a)}},time:function(a){if(jsPlumbUtil.logEnabled&&typeof console!="undefined"){console.time(a)}},timeEnd:function(a){if(jsPlumbUtil.logEnabled&&typeof console!="undefined"){console.timeEnd(a)}}};(function(){var b=!!document.createElement("canvas").getContext,a=!!window.SVGAngle||document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1"),d=function(){if(d.vml==undefined){var f=document.body.appendChild(document.createElement("div"));f.innerHTML='<v:shape id="vml_flag1" adj="1" />';var e=f.firstChild;e.style.behavior="url(#default#VML)";d.vml=e?typeof e.adj=="object":true;f.parentNode.removeChild(f)}return d.vml};var c=function(i){var h={},g=[],f={},e={};this.register=function(n){var m=jsPlumb.CurrentLibr
 ary;n=m.getElementObject(n);var p=i.getId(n),l=m.getDOMElement(n),k=m.getOffset(n);if(!h[p]){h[p]=n;g.push(n);f[p]={}}var o=function(u,q){if(u){for(var r=0;r<u.childNodes.length;r++){if(u.childNodes[r].nodeType!=3){var t=m.getElementObject(u.childNodes[r]),v=i.getId(t,null,true);if(v&&e[v]&&e[v]>0){var s=m.getOffset(t);f[p][v]={id:v,offset:{left:s.left-k.left,top:s.top-k.top}}}o(u.childNodes[r])}}}};o(l)};this.updateOffsets=function(o){var r=jsPlumb.CurrentLibrary,m=r.getElementObject(o),l=i.getId(m),n=f[l],k=r.getOffset(m);if(n){for(var q in n){var s=r.getElementObject(q),p=r.getOffset(s);f[l][q]={id:q,offset:{left:p.left-k.left,top:p.top-k.top}}}}};this.endpointAdded=function(m){var r=jsPlumb.CurrentLibrary,u=document.body,k=i.getId(m),t=r.getDOMElement(m),l=t.parentNode,o=l==u;e[k]=e[k]?e[k]+1:1;while(l!=u){var q=i.getId(l,null,true);if(q&&h[q]){var w=-1,s=r.getElementObject(l),n=r.getOffset(s);if(f[q][k]==null){var v=jsPlumb.CurrentLibrary.getOffset(m);f[q][k]={id:k,offset:{left
 :v.left-n.left,top:v.top-n.top}}}break}l=l.parentNode}};this.endpointDeleted=function(l){if(e[l.elementId]){e[l.elementId]--;if(e[l.elementId]<=0){for(var k in f){delete f[k][l.elementId]}}}};this.getElementsForDraggable=function(k){return f[k]};this.reset=function(){h={};g=[];f={};e={}}};if(!window.console){window.console={time:function(){},timeEnd:function(){},group:function(){},groupEnd:function(){},log:function(){}}}window.jsPlumbAdapter={headless:false,appendToRoot:function(e){document.body.appendChild(e)},getRenderModes:function(){return["canvas","svg","vml"]},isRenderModeAvailable:function(e){return{canvas:b,svg:a,vml:d()}[e]},getDragManager:function(e){return new c(e)},setRenderMode:function(i){var h;if(i){i=i.toLowerCase();var f=this.isRenderModeAvailable("canvas"),e=this.isRenderModeAvailable("svg"),g=this.isRenderModeAvailable("vml");if(i==="svg"){if(e){h="svg"}else{if(f){h="canvas"}else{if(g){h="vml"}}}}else{if(i==="canvas"&&f){h="canvas"}else{if(g){h="vml"}}}}return h}}
 })();(function(){var g=jsPlumbUtil.findWithFunction,G=jsPlumbUtil.indexOf,A=jsPlumbUtil.removeWithFunction,k=jsPlumbUtil.remove,r=jsPlumbUtil.addWithFunction,i=jsPlumbUtil.addToList,l=jsPlumbUtil.isArray,z=jsPlumbUtil.isString,u=jsPlumbUtil.isObject;var v=null,c=function(H,I){return n.CurrentLibrary.getAttribute(C(H),I)},d=function(I,J,H){n.CurrentLibrary.setAttribute(C(I),J,H)},y=function(I,H){n.CurrentLibrary.addClass(C(I),H)},h=function(I,H){return n.CurrentLibrary.hasClass(C(I),H)},m=function(I,H){n.CurrentLibrary.removeClass(C(I),H)},C=function(H){return n.CurrentLibrary.getElementObject(H)},s=function(I,H){var K=n.CurrentLibrary.getOffset(C(I));if(H!=null){var J=H.getZoom();return{left:K.left/J,top:K.top/J}}else{return K}},a=function(H){return n.CurrentLibrary.getSize(C(H))},o=jsPlumbUtil.log,F=jsPlumbUtil.group,f=jsPlumbUtil.groupEnd,E=jsPlumbUtil.time,t=jsPlumbUtil.timeEnd,p=function(){return""+(new Date()).getTime()},B=function(aa){var U=this,ab=arguments,S=false,M=aa.param
 eters||{},K=U.idPrefix,X=K+(new Date()).getTime(),W=null,ac=null;U._jsPlumb=aa._jsPlumb;U.getId=function(){return X};U.tooltip=aa.tooltip;U.hoverClass=aa.hoverClass||U._jsPlumb.Defaults.HoverClass||n.Defaults.HoverClass;jsPlumbUtil.EventGenerator.apply(this);this.clone=function(){var ad=new Object();U.constructor.apply(ad,ab);return ad};this.getParameter=function(ad){return M[ad]},this.getParameters=function(){return M},this.setParameter=function(ad,ae){M[ad]=ae},this.setParameters=function(ad){M=ad},this.overlayPlacements=[];var L=aa.beforeDetach;this.isDetachAllowed=function(ad){var ae=U._jsPlumb.checkCondition("beforeDetach",ad);if(L){try{ae=L(ad)}catch(af){o("jsPlumb: beforeDetach callback failed",af)}}return ae};var O=aa.beforeDrop;this.isDropAllowed=function(ai,af,ag,ad,ae){var ah=U._jsPlumb.checkCondition("beforeDrop",{sourceId:ai,targetId:af,scope:ag,connection:ad,dropEndpoint:ae});if(O){try{ah=O({sourceId:ai,targetId:af,scope:ag,connection:ad,dropEndpoint:ae})}catch(aj){o("
 jsPlumb: beforeDrop callback failed",aj)}}return ah};var Y=function(){if(W&&ac){var ad={};n.extend(ad,W);n.extend(ad,ac);delete U.hoverPaintStyle;if(ad.gradient&&W.fillStyle){delete ad.gradient}ac=ad}};this.setPaintStyle=function(ad,ae){W=ad;U.paintStyleInUse=W;Y();if(!ae){U.repaint()}};this.getPaintStyle=function(){return W};this.setHoverPaintStyle=function(ad,ae){ac=ad;Y();if(!ae){U.repaint()}};this.getHoverPaintStyle=function(){return ac};this.setHover=function(ad,af,ae){if(!U._jsPlumb.currentlyDragging&&!U._jsPlumb.isHoverSuspended()){S=ad;if(U.hoverClass!=null&&U.canvas!=null){if(ad){J.addClass(U.canvas,U.hoverClass)}else{J.removeClass(U.canvas,U.hoverClass)}}if(ac!=null){U.paintStyleInUse=ad?ac:W;ae=ae||p();U.repaint({timestamp:ae,recalc:false})}if(U.getAttachedElements&&!af){Z(ad,p(),U)}}};this.isHover=function(){return S};var V=null;this.setZIndex=function(ad){V=ad};this.getZIndex=function(){return V};var J=n.CurrentLibrary,I=["click","dblclick","mouseenter","mouseout","mous
 emove","mousedown","mouseup","contextmenu"],T={mouseout:"mouseexit"},N=function(af,ag,ae){var ad=T[ae]||ae;J.bind(af,ae,function(ah){ag.fire(ad,ag,ah)})},R=function(af,ae){var ad=T[ae]||ae;J.unbind(af,ae)};this.attachListeners=function(ae,af){for(var ad=0;ad<I.length;ad++){N(ae,af,I[ad])}};var Z=function(ah,ag,ad){var af=U.getAttachedElements();if(af){for(var ae=0;ae<af.length;ae++){if(!ad||ad!=af[ae]){af[ae].setHover(ah,true,ag)}}}};this.reattachListenersForElement=function(ae){if(arguments.length>1){for(var ad=0;ad<I.length;ad++){R(ae,I[ad])}for(var ad=1;ad<arguments.length;ad++){U.attachListeners(ae,arguments[ad])}}};var H=[],P=function(ad){return ad==null?null:ad.split(" ")},Q=function(ae){if(U.getDefaultType){var ag=U.getTypeDescriptor();var af=jsPlumbUtil.merge({},U.getDefaultType());for(var ad=0;ad<H.length;ad++){af=jsPlumbUtil.merge(af,U._jsPlumb.getType(H[ad],ag))}U.applyType(af);if(!ae){U.repaint()}}};U.setType=function(ad,ae){H=P(ad)||[];Q(ae)};U.getType=function(){return
  H};U.hasType=function(ad){return jsPlumbUtil.indexOf(H,ad)!=-1};U.addType=function(af,ag){var ae=P(af),ah=false;if(ae!=null){for(var ad=0;ad<ae.length;ad++){if(!U.hasType(ae[ad])){H.push(ae[ad]);ah=true}}if(ah){Q(ag)}}};U.removeType=function(ag,ah){var ae=P(ag),ai=false,af=function(ak){var aj=jsPlumbUtil.indexOf(H,ak);if(aj!=-1){H.splice(aj,1);return true}return false};if(ae!=null){for(var ad=0;ad<ae.length;ad++){ai=af(ae[ad])||ai}if(ai){Q(ah)}}};U.toggleType=function(ag,ah){var af=P(ag);if(af!=null){for(var ae=0;ae<af.length;ae++){var ad=jsPlumbUtil.indexOf(H,af[ae]);if(ad!=-1){H.splice(ad,1)}else{H.push(af[ae])}}Q(ah)}};this.applyType=function(ae){U.setPaintStyle(ae.paintStyle);U.setHoverPaintStyle(ae.hoverPaintStyle);if(ae.parameters){for(var ad in ae.parameters){U.setParameter(ad,ae.parameters[ad])}}}},x=function(M){B.apply(this,arguments);var S=this;this.overlays=[];var K=function(X){var V=null;if(l(X)){var U=X[0],W=n.extend({component:S,_jsPlumb:S._jsPlumb},X[1]);if(X.length=
 =3){n.extend(W,X[2])}V=new n.Overlays[S._jsPlumb.getRenderMode()][U](W);if(W.events){for(var T in W.events){V.bind(T,W.events[T])}}}else{if(X.constructor==String){V=new n.Overlays[S._jsPlumb.getRenderMode()][X]({component:S,_jsPlumb:S._jsPlumb})}else{V=X}}S.overlays.push(V)},L=function(X){var T=S.defaultOverlayKeys||[],W=X.overlays,U=function(Y){return S._jsPlumb.Defaults[Y]||n.Defaults[Y]||[]};if(!W){W=[]}for(var V=0;V<T.length;V++){W.unshift.apply(W,U(T[V]))}return W};var I=L(M);if(I){for(var O=0;O<I.length;O++){K(I[O])}}var H=function(V){var T=-1;for(var U=0;U<S.overlays.length;U++){if(V===S.overlays[U].id){T=U;break}}return T};this.addOverlay=function(T,U){K(T);if(!U){S.repaint()}};this.getOverlay=function(U){var T=H(U);return T>=0?S.overlays[T]:null};this.getOverlays=function(){return S.overlays};this.hideOverlay=function(U){var T=S.getOverlay(U);if(T){T.hide()}};this.hideOverlays=function(){for(var T=0;T<S.overlays.length;T++){S.overlays[T].hide()}};this.showOverlay=function(U
 ){var T=S.getOverlay(U);if(T){T.show()}};this.showOverlays=function(){for(var T=0;T<S.overlays.length;T++){S.overlays[T].show()}};this.removeAllOverlays=function(){for(var T=0;T<S.overlays.length;T++){if(S.overlays[T].cleanup){S.overlays[T].cleanup()}}S.overlays.splice(0,S.overlays.length);S.repaint()};this.removeOverlay=function(U){var T=H(U);if(T!=-1){var V=S.overlays[T];if(V.cleanup){V.cleanup()}S.overlays.splice(T,1)}};this.removeOverlays=function(){for(var T=0;T<arguments.length;T++){S.removeOverlay(arguments[T])}};var J="__label",R=function(V){var T={cssClass:V.cssClass,labelStyle:this.labelStyle,id:J,component:S,_jsPlumb:S._jsPlumb},U=n.extend(T,V);return new n.Overlays[S._jsPlumb.getRenderMode()].Label(U)};if(M.label){var P=M.labelLocation||S.defaultLabelLocation||0.5,Q=M.labelStyle||S._jsPlumb.Defaults.LabelStyle||n.Defaults.LabelStyle;this.overlays.push(R({label:M.label,location:P,labelStyle:Q}))}this.setLabel=function(T){var U=S.getOverlay(J);if(!U){var V=T.constructor==S
 tring||T.constructor==Function?{label:T}:T;U=R(V);this.overlays.push(U)}else{if(T.constructor==String||T.constructor==Function){U.setLabel(T)}else{if(T.label){U.setLabel(T.label)}if(T.location){U.setLocation(T.location)}}}if(!S._jsPlumb.isSuspendDrawing()){S.repaint()}};this.getLabel=function(){var T=S.getOverlay(J);return T!=null?T.getLabel():null};this.getLabelOverlay=function(){return S.getOverlay(J)};var N=this.applyType;this.applyType=function(U){N(U);S.removeAllOverlays();if(U.overlays){for(var T=0;T<U.overlays.length;T++){S.addOverlay(U.overlays[T],true)}}}},D=function(J,H,I){J.bind("click",function(K,L){H.fire("click",H,L)});J.bind("dblclick",function(K,L){H.fire("dblclick",H,L)});J.bind("contextmenu",function(K,L){H.fire("contextmenu",H,L)});J.bind("mouseenter",function(K,L){if(!H.isHover()){I(true);H.fire("mouseenter",H,L)}});J.bind("mouseexit",function(K,L){if(H.isHover()){I(false);H.fire("mouseexit",H,L)}})};var e=0,b=function(){var H=e+1;e++;return H};var w=function(I){
 this.Defaults={Anchor:"BottomCenter",Anchors:[null,null],ConnectionsDetachable:true,ConnectionOverlays:[],Connector:"Bezier",ConnectorZIndex:null,Container:null,DragOptions:{},DropOptions:{},Endpoint:"Dot",EndpointOverlays:[],Endpoints:[null,null],EndpointStyle:{fillStyle:"#456"},EndpointStyles:[null,null],EndpointHoverStyle:null,EndpointHoverStyles:[null,null],HoverPaintStyle:null,LabelStyle:{color:"black"},LogEnabled:false,Overlays:[],MaxConnections:1,PaintStyle:{lineWidth:8,strokeStyle:"#456"},ReattachConnections:false,RenderMode:"svg",Scope:"jsPlumb_DefaultScope"};if(I){n.extend(this.Defaults,I)}this.logEnabled=this.Defaults.LogEnabled;var a4={},al={};this.registerConnectionType=function(bA,bz){a4[bA]=n.extend({},bz)};this.registerConnectionTypes=function(bA){for(var bz in bA){a4[bz]=n.extend({},bA[bz])}};this.registerEndpointType=function(bA,bz){al[bA]=n.extend({},bz)};this.registerEndpointTypes=function(bA){for(var bz in bA){al[bz]=n.extend({},bA[bz])}};this.getType=function(b
 A,bz){return bz==="connection"?a4[bA]:al[bA]};jsPlumbUtil.EventGenerator.apply(this);var br=this,aO=b(),aR=br.bind,aE={},ad=1;this.setZoom=function(bA,bz){ad=bA;if(bz){br.repaintEverything()}};this.getZoom=function(){return ad};for(var aD in this.Defaults){aE[aD]=this.Defaults[aD]}this.bind=function(bA,bz){if("ready"===bA&&K){bz()}else{aR.apply(br,[bA,bz])}};br.importDefaults=function(bA){for(var bz in bA){br.Defaults[bz]=bA[bz]}};br.restoreDefaults=function(){br.Defaults=n.extend({},aE)};var O=null,bj=null,K=false,a0={},aV={},aW={},aj={},bu={},bk={},bq={},by=[],ag=[],R=this.Defaults.Scope,Y=null,W=function(bC,bA,bB){var bz=bC[bA];if(bz==null){bz=[];bC[bA]=bz}bz.push(bB);return bz},aX=function(bA,bz){if(br.Defaults.Container){n.CurrentLibrary.appendElement(bA,br.Defaults.Container)}else{if(!bz){jsPlumbAdapter.appendToRoot(bA)}else{n.CurrentLibrary.appendElement(bA,bz)}}},aF=1,an=function(){return""+aF++},aL=function(bz){return bz._nodes?bz._nodes:bz},be=function(bB,bD,bC){if(!jsPlum
 bAdapter.headless&&!a9){var bE=c(bB,"id"),bz=br.dragManager.getElementsForDraggable(bE);if(bC==null){bC=p()}br.anchorManager.redraw(bE,bD,bC);if(bz){for(var bA in bz){br.anchorManager.redraw(bz[bA].id,bD,bC,bz[bA].offset)}}}},aJ=function(bA,bC){var bD=null;if(l(bA)){bD=[];for(var bz=0;bz<bA.length;bz++){var bB=C(bA[bz]),bE=c(bB,"id");bD.push(bC(bB,bE))}}else{var bB=C(bA),bE=c(bB,"id");bD=bC(bB,bE)}return bD},ax=function(bz){return aW[bz]},bg=function(bD,bz,bG){if(!jsPlumbAdapter.headless){var bI=bz==null?false:bz,bE=n.CurrentLibrary;if(bI){if(bE.isDragSupported(bD)&&!bE.isAlreadyDraggable(bD)){var bH=bG||br.Defaults.DragOptions||n.Defaults.DragOptions;bH=n.extend({},bH);var bF=bE.dragEvents.drag,bA=bE.dragEvents.stop,bC=bE.dragEvents.start;bH[bC]=ap(bH[bC],function(){br.setHoverSuspended(true)});bH[bF]=ap(bH[bF],function(){var bJ=bE.getUIPosition(arguments,br.getZoom());be(bD,bJ);y(bD,"jsPlumb_dragged")});bH[bA]=ap(bH[bA],function(){var bJ=bE.getUIPosition(arguments,br.getZoom());be
 (bD,bJ);m(bD,"jsPlumb_dragged");br.setHoverSuspended(false)});var bB=H(bD);bq[bB]=true;var bI=bq[bB];bH.disabled=bI==null?false:!bI;bE.initDraggable(bD,bH,false);br.dragManager.register(bD)}}}},aC=function(bF,bA){var bz=n.extend({sourceIsNew:true,targetIsNew:true},bF);if(bA){n.extend(bz,bA)}if(bz.source&&bz.source.endpoint){bz.sourceEndpoint=bz.source}if(bz.source&&bz.target.endpoint){bz.targetEndpoint=bz.target}if(bF.uuids){bz.sourceEndpoint=ax(bF.uuids[0]);bz.targetEndpoint=ax(bF.uuids[1])}if(bz.sourceEndpoint&&bz.sourceEndpoint.isFull()){o(br,"could not add connection; source endpoint is full");return}if(bz.targetEndpoint&&bz.targetEndpoint.isFull()){o(br,"could not add connection; target endpoint is full");return}if(bz.sourceEndpoint){bz.sourceIsNew=false}if(bz.targetEndpoint){bz.targetIsNew=false}if(!bz.type&&bz.sourceEndpoint){bz.type=bz.sourceEndpoint.connectionType}if(bz.sourceEndpoint&&bz.sourceEndpoint.connectorOverlays){bz.overlays=bz.overlays||[];for(var bD=0;bD<bz.sourc
 eEndpoint.connectorOverlays.length;bD++){bz.overlays.push(bz.sourceEndpoint.connectorOverlays[bD])}}bz.tooltip=bF.tooltip;if(!bz.tooltip&&bz.sourceEndpoint&&bz.sourceEndpoint.connectorTooltip){bz.tooltip=bz.sourceEndpoint.connectorTooltip}if(bz.target&&!bz.target.endpoint&&!bz.targetEndpoint&&!bz.newConnection){var bE=H(bz.target),bG=a1[bE],bB=aK[bE];if(bG){if(!am[bE]){return}var bC=bB!=null?bB:br.addEndpoint(bz.target,bG);if(bl[bE]){aK[bE]=bC}bz.targetEndpoint=bC;bC._makeTargetCreator=true;bz.targetIsNew=true}}if(bz.source&&!bz.source.endpoint&&!bz.sourceEndpoint&&!bz.newConnection){var bE=H(bz.source),bG=aB[bE],bB=a6[bE];if(bG){if(!ae[bE]){return}var bC=bB!=null?bB:br.addEndpoint(bz.source,bG);if(bc[bE]){a6[bE]=bC}bz.sourceEndpoint=bC;bz.sourceIsNew=true}}return bz},af=function(bD){var bC=br.Defaults.ConnectionType||br.getDefaultConnectionType(),bB=br.Defaults.EndpointType||ah,bA=n.CurrentLibrary.getParent;if(bD.container){bD.parent=bD.container}else{if(bD.sourceEndpoint){bD.paren
 t=bD.sourceEndpoint.parent}else{if(bD.source.constructor==bB){bD.parent=bD.source.parent}else{bD.parent=bA(bD.source)}}}bD._jsPlumb=br;var bz=new bC(bD);bz.id="con_"+an();bw("click","click",bz);bw("dblclick","dblclick",bz);bw("contextmenu","contextmenu",bz);return bz},bx=function(bB,bC,bz){bC=bC||{};if(!bB.suspendedEndpoint){W(a0,bB.scope,bB)}if(!bC.doNotFireConnectionEvent&&bC.fireEvent!==false){var bA={connection:bB,source:bB.source,target:bB.target,sourceId:bB.sourceId,targetId:bB.targetId,sourceEndpoint:bB.endpoints[0],targetEndpoint:bB.endpoints[1]};br.fire("jsPlumbConnection",bA,bz);br.fire("connection",bA,bz)}br.anchorManager.newConnection(bB);be(bB.source)},bw=function(bz,bA,bB){bB.bind(bz,function(bD,bC){br.fire(bA,bB,bC)})},ay=function(bB){if(bB.container){return bB.container}else{var bz=n.CurrentLibrary.getTagName(bB.source),bA=n.CurrentLibrary.getParent(bB.source);if(bz&&bz.toLowerCase()==="td"){return n.CurrentLibrary.getParent(bA)}else{return bA}}},aH=function(bB){var 
 bA=br.Defaults.EndpointType||ah;bB.parent=ay(bB);bB._jsPlumb=br;var bz=new bA(bB);bz.id="ep_"+an();bw("click","endpointClick",bz);bw("dblclick","endpointDblClick",bz);bw("contextmenu","contextmenu",bz);if(!jsPlumbAdapter.headless){br.dragManager.endpointAdded(bB.source)}return bz},V=function(bB,bE,bD){var bz=aV[bB];if(bz&&bz.length){for(var bC=0;bC<bz.length;bC++){for(var bA=0;bA<bz[bC].connections.length;bA++){var bF=bE(bz[bC].connections[bA]);if(bF){return}}if(bD){bD(bz[bC])}}}},Z=function(bA){for(var bz in aV){V(bz,bA)}},aw=function(bz,bA){if(bz!=null&&bz.parentNode!=null){bz.parentNode.removeChild(bz)}},aZ=function(bB,bA){for(var bz=0;bz<bB.length;bz++){aw(bB[bz],bA)}},bo=function(bA,bz){return aJ(bA,function(bB,bC){bq[bC]=bz;if(n.CurrentLibrary.isDragSupported(bB)){n.CurrentLibrary.setDraggable(bB,bz)}})},a7=function(bB,bC,bz){bC=bC==="block";var bA=null;if(bz){if(bC){bA=function(bE){bE.setVisible(true,true,true)}}else{bA=function(bE){bE.setVisible(false,true,true)}}}var bD=c(b
 B,"id");V(bD,function(bF){if(bC&&bz){var bE=bF.sourceId===bD?1:0;if(bF.endpoints[bE].isVisible()){bF.setVisible(true)}}else{bF.setVisible(bC)}},bA)},bm=function(bz){return aJ(bz,function(bB,bA){var bC=bq[bA]==null?false:bq[bA];bC=!bC;bq[bA]=bC;n.CurrentLibrary.setDraggable(bB,bC);return bC})},aS=function(bz,bB){var bA=null;if(bB){bA=function(bC){var bD=bC.isVisible();bC.setVisible(!bD)}}V(bz,function(bD){var bC=bD.isVisible();bD.setVisible(!bC)},bA)},X=function(bE){var bC=bE.timestamp,bz=bE.recalc,bD=bE.offset,bA=bE.elId;if(a9&&!bC){bC=bd}if(!bz){if(bC&&bC===bu[bA]){return aj[bA]}}if(bz||!bD){var bB=C(bA);if(bB!=null){ag[bA]=a(bB);aj[bA]=s(bB,br);bu[bA]=bC}}else{aj[bA]=bD;if(ag[bA]==null){var bB=C(bA);if(bB!=null){ag[bA]=a(bB)}}}if(aj[bA]&&!aj[bA].right){aj[bA].right=aj[bA].left+ag[bA][0];aj[bA].bottom=aj[bA].top+ag[bA][1];aj[bA].width=ag[bA][0];aj[bA].height=ag[bA][1];aj[bA].centerx=aj[bA].left+(aj[bA].width/2);aj[bA].centery=aj[bA].top+(aj[bA].height/2)}return aj[bA]},aQ=function(
 bz){var bA=aj[bz];if(!bA){bA=X({elId:bz})}return{o:bA,s:ag[bz]}},H=function(bz,bA,bC){var bB=C(bz);var bD=c(bB,"id");if(!bD||bD=="undefined"){if(arguments.length==2&&arguments[1]!=undefined){bD=bA}else{if(arguments.length==1||(arguments.length==3&&!arguments[2])){bD="jsPlumb_"+aO+"_"+an()}}if(!bC){d(bB,"id",bD)}}return bD},ap=function(bB,bz,bA){bB=bB||function(){};bz=bz||function(){};return function(){var bC=null;try{bC=bz.apply(this,arguments)}catch(bD){o(br,"jsPlumb function failed : "+bD)}if(bA==null||(bC!==bA)){try{bB.apply(this,arguments)}catch(bD){o(br,"wrapped function failed : "+bD)}}return bC}};this.connectorClass="_jsPlumb_connector";this.endpointClass="_jsPlumb_endpoint";this.overlayClass="_jsPlumb_overlay";this.Anchors={};this.Connectors={canvas:{},svg:{},vml:{}};this.Endpoints={canvas:{},svg:{},vml:{}};this.Overlays={canvas:{},svg:{},vml:{}};this.addClass=function(bA,bz){return n.CurrentLibrary.addClass(bA,bz)};this.removeClass=function(bA,bz){return n.CurrentLibrary.re
 moveClass(bA,bz)};this.hasClass=function(bA,bz){return n.CurrentLibrary.hasClass(bA,bz)};this.addEndpoint=function(bC,bD,bM){bM=bM||{};var bB=n.extend({},bM);n.extend(bB,bD);bB.endpoint=bB.endpoint||br.Defaults.Endpoint||n.Defaults.Endpoint;bB.paintStyle=bB.paintStyle||br.Defaults.EndpointStyle||n.Defaults.EndpointStyle;bC=aL(bC);var bE=[],bH=bC.length&&bC.constructor!=String?bC:[bC];for(var bF=0;bF<bH.length;bF++){var bK=C(bH[bF]),bA=H(bK);bB.source=bK;X({elId:bA,timestamp:bd});var bJ=aH(bB);if(bB.parentAnchor){bJ.parentAnchor=bB.parentAnchor}W(aV,bA,bJ);var bI=aj[bA],bG=ag[bA];var bL=bJ.anchor.compute({xy:[bI.left,bI.top],wh:bG,element:bJ,timestamp:bd});var bz={anchorLoc:bL,timestamp:bd};if(a9){bz.recalc=false}bJ.paint(bz);bE.push(bJ)}return bE.length==1?bE[0]:bE};this.addEndpoints=function(bD,bA,bz){var bC=[];for(var bB=0;bB<bA.length;bB++){var bE=br.addEndpoint(bD,bA[bB],bz);if(l(bE)){Array.prototype.push.apply(bC,bE)}else{bC.push(bE)}}return bC};this.animate=function(bB,bA,bz){
 var bC=C(bB),bF=c(bB,"id");bz=bz||{};var bE=n.CurrentLibrary.dragEvents.step;var bD=n.CurrentLibrary.dragEvents.complete;bz[bE]=ap(bz[bE],function(){br.repaint(bF)});bz[bD]=ap(bz[bD],function(){br.repaint(bF)});n.CurrentLibrary.animate(bC,bA,bz)};this.checkCondition=function(bB,bD){var bz=br.getListener(bB),bC=true;if(bz&&bz.length>0){try{for(var bA=0;bA<bz.length;bA++){bC=bC&&bz[bA](bD)}}catch(bE){o(br,"cannot check condition ["+bB+"]"+bE)}}return bC};this.checkASyncCondition=function(bB,bD,bC,bA){var bz=br.getListener(bB);if(bz&&bz.length>0){try{bz[0](bD,bC,bA)}catch(bE){o(br,"cannot asynchronously check condition ["+bB+"]"+bE)}}};this.connect=function(bC,bA){var bz=aC(bC,bA),bB;if(bz){if(bz.deleteEndpointsOnDetach==null){bz.deleteEndpointsOnDetach=true}bB=af(bz);bx(bB,bz)}return bB};this.deleteEndpoint=function(bA){var bF=(typeof bA=="string")?aW[bA]:bA;if(bF){var bC=bF.getUuid();if(bC){aW[bC]=null}bF.detachAll();if(bF.endpoint.cleanup){bF.endpoint.cleanup()}aZ(bF.endpoint.getDis
 playElements());br.anchorManager.deleteEndpoint(bF);for(var bE in aV){var bz=aV[bE];if(bz){var bD=[];for(var bB=0;bB<bz.length;bB++){if(bz[bB]!=bF){bD.push(bz[bB])}}aV[bE]=bD}}if(!jsPlumbAdapter.headless){br.dragManager.endpointDeleted(bF)}}};this.deleteEveryEndpoint=function(){br.setSuspendDrawing(true);for(var bB in aV){var bz=aV[bB];if(bz&&bz.length){for(var bA=0;bA<bz.length;bA++){br.deleteEndpoint(bz[bA])}}}aV={};aW={};br.setSuspendDrawing(false,true)};var ba=function(bC,bE,bz){var bB=br.Defaults.ConnectionType||br.getDefaultConnectionType(),bA=bC.constructor==bB,bD=bA?{connection:bC,source:bC.source,target:bC.target,sourceId:bC.sourceId,targetId:bC.targetId,sourceEndpoint:bC.endpoints[0],targetEndpoint:bC.endpoints[1]}:bC;if(bE){br.fire("jsPlumbConnectionDetached",bD,bz);br.fire("connectionDetached",bD,bz)}br.anchorManager.connectionDetached(bD)},a8=function(bz){br.fire("connectionDrag",bz)},aT=function(bz){br.fire("connectionDragStop",bz)};this.detach=function(){if(arguments.
 length==0){return}var bD=br.Defaults.ConnectionType||br.getDefaultConnectionType(),bE=arguments[0].constructor==bD,bC=arguments.length==2?bE?(arguments[1]||{}):arguments[0]:arguments[0],bH=(bC.fireEvent!==false),bB=bC.forceDetach,bA=bE?arguments[0]:bC.connection;if(bA){if(bB||(bA.isDetachAllowed(bA)&&bA.endpoints[0].isDetachAllowed(bA)&&bA.endpoints[1].isDetachAllowed(bA))){if(bB||br.checkCondition("beforeDetach",bA)){bA.endpoints[0].detach(bA,false,true,bH)}}}else{var bz=n.extend({},bC);if(bz.uuids){ax(bz.uuids[0]).detachFrom(ax(bz.uuids[1]),bH)}else{if(bz.sourceEndpoint&&bz.targetEndpoint){bz.sourceEndpoint.detachFrom(bz.targetEndpoint)}else{var bG=H(bz.source),bF=H(bz.target);V(bG,function(bI){if((bI.sourceId==bG&&bI.targetId==bF)||(bI.targetId==bG&&bI.sourceId==bF)){if(br.checkCondition("beforeDetach",bI)){bI.endpoints[0].detach(bI,false,true,bH)}}})}}}};this.detachAllConnections=function(bB,bC){bC=bC||{};bB=C(bB);var bD=c(bB,"id"),bz=aV[bD];if(bz&&bz.length){for(var bA=0;bA<bz.
 length;bA++){bz[bA].detachAll(bC.fireEvent)}}};this.detachEveryConnection=function(bB){bB=bB||{};for(var bC in aV){var bz=aV[bC];if(bz&&bz.length){for(var bA=0;bA<bz.length;bA++){bz[bA].detachAll(bB.fireEvent)}}}a0={}};this.draggable=function(bB,bz){if(typeof bB=="object"&&bB.length){for(var bA=0;bA<bB.length;bA++){var bC=C(bB[bA]);if(bC){bg(bC,true,bz)}}}else{if(bB._nodes){for(var bA=0;bA<bB._nodes.length;bA++){var bC=C(bB._nodes[bA]);if(bC){bg(bC,true,bz)}}}else{var bC=C(bB);if(bC){bg(bC,true,bz)}}}};this.extend=function(bA,bz){return n.CurrentLibrary.extend(bA,bz)};this.getDefaultEndpointType=function(){return ah};this.getDefaultConnectionType=function(){return az};var bt=function(bD,bC,bA,bz){for(var bB=0;bB<bD.length;bB++){bD[bB][bC].apply(bD[bB],bA)}return bz(bD)},T=function(bD,bC,bA){var bz=[];for(var bB=0;bB<bD.length;bB++){bz.push([bD[bB][bC].apply(bD[bB],bA),bD[bB]])}return bz},aq=function(bB,bA,bz){return function(){return bt(bB,bA,arguments,bz)}},aA=function(bA,bz){retur
 n function(){return T(bA,bz,arguments)}},bv=function(bz,bC){var bB=[];if(bz){if(typeof bz=="string"){if(bz==="*"){return bz}bB.push(bz)}else{if(bC){bB=bz}else{for(var bA=0;bA<bz.length;bA++){bB.push(H(C(bz[bA])))}}}}return bB},aI=function(bB,bA,bz){if(bB==="*"){return true}return bB.length>0?G(bB,bA)!=-1:!bz};this.getConnections=function(bI,bA){if(!bI){bI={}}else{if(bI.constructor==String){bI={scope:bI}}}var bH=bI.scope||br.getDefaultScope(),bG=bv(bH,true),bz=bv(bI.source),bE=bv(bI.target),bD=(!bA&&bG.length>1)?{}:[],bJ=function(bL,bM){if(!bA&&bG.length>1){var bK=bD[bL];if(bK==null){bK=[];bD[bL]=bK}bK.push(bM)}else{bD.push(bM)}};for(var bC in a0){if(aI(bG,bC)){for(var bB=0;bB<a0[bC].length;bB++){var bF=a0[bC][bB];if(aI(bz,bF.sourceId)&&aI(bE,bF.targetId)){bJ(bC,bF)}}}}return bD};var L=function(bz,bA){return function(bC){for(var bB=0;bB<bz.length;bB++){bC(bz[bB])}return bA(bz)}},P=function(bz){return function(bA){return bz[bA]}};var Q=function(bz,bA){return{setHover:aq(bz,"setHover",
 bA),removeAllOverlays:aq(bz,"removeAllOverlays",bA),setLabel:aq(bz,"setLabel",bA),addOverlay:aq(bz,"addOverlay",bA),removeOverlay:aq(bz,"removeOverlay",bA),removeOverlays:aq(bz,"removeOverlays",bA),showOverlay:aq(bz,"showOverlay",bA),hideOverlay:aq(bz,"hideOverlay",bA),showOverlays:aq(bz,"showOverlays",bA),hideOverlays:aq(bz,"hideOverlays",bA),setPaintStyle:aq(bz,"setPaintStyle",bA),setHoverPaintStyle:aq(bz,"setHoverPaintStyle",bA),setParameter:aq(bz,"setParameter",bA),setParameters:aq(bz,"setParameters",bA),setVisible:aq(bz,"setVisible",bA),setZIndex:aq(bz,"setZIndex",bA),repaint:aq(bz,"repaint",bA),addType:aq(bz,"addType",bA),toggleType:aq(bz,"toggleType",bA),removeType:aq(bz,"removeType",bA),getLabel:aA(bz,"getLabel"),getOverlay:aA(bz,"getOverlay"),isHover:aA(bz,"isHover"),getParameter:aA(bz,"getParameter"),getParameters:aA(bz,"getParameters"),getPaintStyle:aA(bz,"getPaintStyle"),getHoverPaintStyle:aA(bz,"getHoverPaintStyle"),isVisible:aA(bz,"isVisible"),getZIndex:aA(bz,"getZInde
 x"),hasType:aA(bz,"hasType"),getType:aA(bz,"getType"),length:bz.length,each:L(bz,bA),get:P(bz)}};var aN=function(bA){var bz=Q(bA,aN);return n.CurrentLibrary.extend(bz,{setDetachable:aq(bA,"setDetachable",aN),setReattach:aq(bA,"setReattach",aN),setConnector:aq(bA,"setConnector",aN),detach:function(){for(var bB=0;bB<bA.length;bB++){br.detach(bA[bB])}},isDetachable:aA(bA,"isDetachable"),isReattach:aA(bA,"isReattach")})};var bf=function(bA){var bz=Q(bA,bf);return n.CurrentLibrary.extend(bz,{setEnabled:aq(bA,"setEnabled",bf),isEnabled:aA(bA,"isEnabled"),detachAll:function(){for(var bB=0;bB<bA.length;bB++){bA[bB].detachAll()}},"delete":function(){for(var bB=0;bB<bA.length;bB++){br.deleteEndpoint(bA[bB])}}})};this.select=function(bz){bz=bz||{};bz.scope=bz.scope||"*";var bA=br.getConnections(bz,true);return aN(bA)};this.selectEndpoints=function(bH){bH=bH||{};bH.scope=bH.scope||"*";var bM=!bH.element&&!bH.source&&!bH.target,bA=bM?"*":bv(bH.element),bB=bM?"*":bv(bH.source),bJ=bM?"*":bv(bH.tar
 get),bO=bv(bH.scope,true);var bP=[];for(var bF in aV){var bD=aI(bA,bF,true),bz=aI(bB,bF,true),bE=bB!="*",bK=aI(bJ,bF,true),bC=bJ!="*";if(bD||bz||bK){inner:for(var bI=0;bI<aV[bF].length;bI++){var bL=aV[bF][bI];if(aI(bO,bL.scope,true)){var bN=(bE&&bB.length>0&&!bL.isSource),bG=(bC&&bJ.length>0&&!bL.isTarget);if(bN||bG){continue inner}bP.push(bL)}}}}return bf(bP)};this.getAllConnections=function(){return a0};this.getDefaultScope=function(){return R};this.getEndpoint=ax;this.getEndpoints=function(bz){return aV[H(bz)]};this.getId=H;this.getOffset=function(bA){var bz=aj[bA];return X({elId:bA})};this.getSelector=function(bz){return n.CurrentLibrary.getSelector(bz)};this.getSize=function(bA){var bz=ag[bA];if(!bz){X({elId:bA})}return ag[bA]};this.appendElement=aX;var aU=false;this.isHoverSuspended=function(){return aU};this.setHoverSuspended=function(bz){aU=bz};var aY=function(bz){return function(){return jsPlumbAdapter.isRenderModeAvailable(bz)}};this.isCanvasAvailable=aY("canvas");this.isS
 VGAvailable=aY("svg");this.isVMLAvailable=aY("vml");this.hide=function(bz,bA){a7(bz,"none",bA)};this.idstamp=an;this.init=function(){if(!K){br.setRenderMode(br.Defaults.RenderMode);var bz=function(bA){n.CurrentLibrary.bind(document,bA,function(bG){if(!br.currentlyDragging&&Y==n.CANVAS){for(var bF in a0){var bH=a0[bF];for(var bD=0;bD<bH.length;bD++){var bC=bH[bD].connector[bA](bG);if(bC){return}}}for(var bE in aV){var bB=aV[bE];for(var bD=0;bD<bB.length;bD++){if(bB[bD].endpoint[bA](bG)){return}}}}})};bz("click");bz("dblclick");bz("mousemove");bz("mousedown");bz("mouseup");bz("contextmenu");K=true;br.fire("ready")}};this.log=O;this.jsPlumbUIComponent=B;this.makeAnchor=function(){if(arguments.length==0){return null}var bE=arguments[0],bB=arguments[1],bA=arguments[2],bC=null;if(bE.compute&&bE.getOrientation){return bE}else{if(typeof bE=="string"){bC=n.Anchors[arguments[0]]({elementId:bB,jsPlumbInstance:br})}else{if(l(bE)){if(l(bE[0])||z(bE[0])){if(bE.length==2&&z(bE[0])&&u(bE[1])){var b
 z=n.extend({elementId:bB,jsPlumbInstance:br},bE[1]);bC=n.Anchors[bE[0]](bz)}else{bC=new au(bE,null,bB)}}else{var bD={x:bE[0],y:bE[1],orientation:(bE.length>=4)?[bE[2],bE[3]]:[0,0],offsets:(bE.length==6)?[bE[4],bE[5]]:[0,0],elementId:bB};bC=new ab(bD);bC.clone=function(){return new ab(bD)}}}}}if(!bC.id){bC.id="anchor_"+an()}return bC};this.makeAnchors=function(bC,bA,bz){var bD=[];for(var bB=0;bB<bC.length;bB++){if(typeof bC[bB]=="string"){bD.push(n.Anchors[bC[bB]]({elementId:bA,jsPlumbInstance:bz}))}else{if(l(bC[bB])){bD.push(br.makeAnchor(bC[bB],bA,bz))}}}return bD};this.makeDynamicAnchor=function(bz,bA){return new au(bz,bA)};var a1={},aK={},bl={},at={},ac=function(bz,bA){bz.paintStyle=bz.paintStyle||br.Defaults.EndpointStyles[bA]||br.Defaults.EndpointStyle||n.Defaults.EndpointStyles[bA]||n.Defaults.EndpointStyle;bz.hoverPaintStyle=bz.hoverPaintStyle||br.Defaults.EndpointHoverStyles[bA]||br.Defaults.EndpointHoverStyle||n.Defaults.EndpointHoverStyles[bA]||n.Defaults.EndpointHoverStyl
 e;bz.anchor=bz.anchor||br.Defaults.Anchors[bA]||br.Defaults.Anchor||n.Defaults.Anchors[bA]||n.Defaults.Anchor;bz.endpoint=bz.endpoint||br.Defaults.Endpoints[bA]||br.Defaults.Endpoint||n.Defaults.Endpoints[bA]||n.Defaults.Endpoint};this.makeTarget=function(bC,bD,bJ){var bA=n.extend({_jsPlumb:br},bJ);n.extend(bA,bD);ac(bA,1);var bH=n.CurrentLibrary,bI=bA.scope||br.Defaults.Scope,bE=!(bA.deleteEndpointsOnDetach===false),bB=bA.maxConnections||-1,bz=bA.onMaxConnections;_doOne=function(bO){var bM=H(bO);a1[bM]=bA;bl[bM]=bA.uniqueEndpoint,at[bM]=bB,am[bM]=true,proxyComponent=new B(bA);var bL=n.extend({},bA.dropOptions||{}),bK=function(){var bR=n.CurrentLibrary.getDropEvent(arguments),bT=br.select({target:bM}).length;br.currentlyDragging=false;var b3=C(bH.getDragObject(arguments)),bS=c(b3,"dragId"),b1=c(b3,"originalScope"),bY=bk[bS],bQ=bY.endpoints[0],bP=bA.endpoint?n.extend({},bA.endpoint):{};if(!am[bM]||at[bM]>0&&bT>=at[bM]){if(bz){bz({element:bO,connection:bY},bR)}return false}bQ.anchor.l
 ocked=false;if(b1){bH.setDragScope(b3,b1)}var bW=proxyComponent.isDropAllowed(bY.sourceId,H(bO),bY.scope,bY,null);if(bY.endpointsToDeleteOnDetach){if(bQ===bY.endpointsToDeleteOnDetach[0]){bY.endpointsToDeleteOnDetach[0]=null}else{if(bQ===bY.endpointsToDeleteOnDetach[1]){bY.endpointsToDeleteOnDetach[1]=null}}}if(bY.suspendedEndpoint){bY.targetId=bY.suspendedEndpoint.elementId;bY.target=bH.getElementObject(bY.suspendedEndpoint.elementId);bY.endpoints[1]=bY.suspendedEndpoint}if(bW){bQ.detach(bY,false,true,false);var b2=aK[bM]||br.addEndpoint(bO,bA);if(bA.uniqueEndpoint){aK[bM]=b2}b2._makeTargetCreator=true;if(b2.anchor.positionFinder!=null){var bZ=bH.getUIPosition(arguments,br.getZoom()),bV=s(bO,br),b0=a(bO),bU=b2.anchor.positionFinder(bZ,bV,b0,b2.anchor.constructorParams);b2.anchor.x=bU[0];b2.anchor.y=bU[1]}var bX=br.connect({source:bQ,target:b2,scope:b1,previousConnection:bY,container:bY.parent,deleteEndpointsOnDetach:bE,doNotFireConnectionEvent:bQ.endpointWillMoveAfterConnection});i
 f(bY.endpoints[1]._makeTargetCreator&&bY.endpoints[1].connections.length<2){br.deleteEndpoint(bY.endpoints[1])}if(bE){bX.endpointsToDeleteOnDetach=[bQ,b2]}bX.repaint()}else{if(bY.suspendedEndpoint){if(bY.isReattach()){bY.setHover(false);bY.floatingAnchorIndex=null;bY.suspendedEndpoint.addConnection(bY);br.repaint(bQ.elementId)}else{bQ.detach(bY,false,true,true,bR)}}}};var bN=bH.dragEvents.drop;bL.scope=bL.scope||bI;bL[bN]=ap(bL[bN],bK);bH.initDroppable(bO,bL,true)};bC=aL(bC);var bG=bC.length&&bC.constructor!=String?bC:[bC];for(var bF=0;bF<bG.length;bF++){_doOne(C(bG[bF]))}return br};this.unmakeTarget=function(bA,bB){bA=n.CurrentLibrary.getElementObject(bA);var bz=H(bA);if(!bB){delete a1[bz];delete bl[bz];delete at[bz];delete am[bz]}return br};this.makeTargets=function(bB,bC,bz){for(var bA=0;bA<bB.length;bA++){br.makeTarget(bB[bA],bC,bz)}};var aB={},a6={},bc={},ae={},J={},N={},am={};this.makeSource=function(bD,bE,bI){var bB=n.extend({},bI);n.extend(bB,bE);ac(bB,0);var bH=n.CurrentLib
 rary,bC=bB.maxConnections||-1,bA=bB.onMaxConnections,bz=function(bQ){var bK=H(bQ),bR=bB.parent,bJ=bR!=null?br.getId(bH.getElementObject(bR)):bK;aB[bJ]=bB;bc[bJ]=bB.uniqueEndpoint;ae[bJ]=true;var bL=bH.dragEvents.stop,bP=bH.dragEvents.drag,bS=n.extend({},bB.dragOptions||{}),bN=bS.drag,bT=bS.stop,bU=null,bO=false;N[bJ]=bC;bS.scope=bS.scope||bB.scope;bS[bP]=ap(bS[bP],function(){if(bN){bN.apply(this,arguments)}bO=false});bS[bL]=ap(bS[bL],function(){if(bT){bT.apply(this,arguments)}br.currentlyDragging=false;if(bU.connections.length==0){br.deleteEndpoint(bU)}else{bH.unbind(bU.canvas,"mousedown");var bW=bB.anchor||br.Defaults.Anchor,bX=bU.anchor,bZ=bU.connections[0];bU.anchor=br.makeAnchor(bW,bK,br);if(bB.parent){var bY=bH.getElementObject(bB.parent);if(bY){var bV=bU.elementId;var b0=bB.container||br.Defaults.Container||n.Defaults.Container;bU.setElement(bY,b0);bU.endpointWillMoveAfterConnection=false;br.anchorManager.rehomeEndpoint(bV,bY);bZ.previousConnection=null;A(a0[bZ.scope],function
 (b1){return b1.id===bZ.id});br.anchorManager.connectionDetached({sourceId:bZ.sourceId,targetId:bZ.targetId,connection:bZ});bx(bZ)}}bU.repaint();br.repaint(bU.elementId);br.repaint(bZ.targetId)}});var bM=function(bZ){if(!ae[bJ]){return}var bX=br.select({source:bJ}).length;if(N[bJ]>=0&&bX>=N[bJ]){if(bA){bA({element:bQ,maxConnections:bC},bZ)}return false}if(bE.filter){var bV=bE.filter(bH.getOriginalEvent(bZ),bQ);if(bV===false){return}}var b3=X({elId:bK});var b2=((bZ.pageX||bZ.page.x)-b3.left)/b3.width,b1=((bZ.pageY||bZ.page.y)-b3.top)/b3.height,b7=b2,b6=b1;if(bB.parent){var b0=bH.getElementObject(bB.parent),bY=H(b0);b3=X({elId:bY});b7=((bZ.pageX||bZ.page.x)-b3.left)/b3.width,b6=((bZ.pageY||bZ.page.y)-b3.top)/b3.height}var b5={};n.extend(b5,bB);b5.isSource=true;b5.anchor=[b2,b1,0,0];b5.parentAnchor=[b7,b6,0,0];b5.dragOptions=bS;if(bB.parent){var bW=b5.container||br.Defaults.Container||n.Defaults.Container;if(bW){b5.container=bW}else{b5.container=n.CurrentLibrary.getParent(bB.parent)}}bU
 =br.addEndpoint(bK,b5);bO=true;bU.endpointWillMoveAfterConnection=bB.parent!=null;bU.endpointWillMoveTo=bB.parent?bH.getElementObject(bB.parent):null;var b4=function(){if(bO){br.deleteEndpoint(bU)}};br.registerListener(bU.canvas,"mouseup",b4);br.registerListener(bQ,"mouseup",b4);bH.trigger(bU.canvas,"mousedown",bZ)};br.registerListener(bQ,"mousedown",bM);J[bK]=bM};bD=aL(bD);var bG=bD.length&&bD.constructor!=String?bD:[bD];for(var bF=0;bF<bG.length;bF++){bz(C(bG[bF]))}return br};this.unmakeSource=function(bA,bB){bA=n.CurrentLibrary.getElementObject(bA);var bC=H(bA),bz=J[bC];if(bz){br.unregisterListener(_el,"mousedown",bz)}if(!bB){delete aB[bC];delete bc[bC];delete ae[bC];delete J[bC];delete N[bC]}return br};this.unmakeEverySource=function(){for(var bz in ae){br.unmakeSource(bz,true)}aB={};bc={};ae={};J={}};this.unmakeEveryTarget=function(){for(var bz in am){br.unmakeTarget(bz,true)}a1={};bl={};at={};am={};return br};this.makeSources=function(bB,bC,bz){for(var bA=0;bA<bB.length;bA++){
 br.makeSource(bB[bA],bC,bz)}return br};var aP=function(bD,bC,bE,bz){var bA=bD=="source"?ae:am;if(z(bC)){bA[bC]=bz?!bA[bC]:bE}else{if(bC.length){bC=aL(bC);for(var bB=0;bB<bC.length;bB++){var bF=_el=n.CurrentLibrary.getElementObject(bC[bB]),bF=H(_el);bA[bF]=bz?!bA[bF]:bE}}}return br};this.setSourceEnabled=function(bz,bA){return aP("source",bz,bA)};this.toggleSourceEnabled=function(bz){aP("source",bz,null,true);return br.isSourceEnabled(bz)};this.isSource=function(bz){bz=n.CurrentLibrary.getElementObject(bz);return ae[H(bz)]!=null};this.isSourceEnabled=function(bz){bz=n.CurrentLibrary.getElementObject(bz);return ae[H(bz)]===true};this.setTargetEnabled=function(bz,bA){return aP("target",bz,bA)};this.toggleTargetEnabled=function(bz){return aP("target",bz,null,true);return br.isTargetEnabled(bz)};this.isTarget=function(bz){bz=n.CurrentLibrary.getElementObject(bz);return am[H(bz)]!=null};this.isTargetEnabled=function(bz){bz=n.CurrentLibrary.getElementObject(bz);return am[H(bz)]===true};thi
 s.ready=function(bz){br.bind("ready",bz)};this.repaint=function(bA,bC,bB){if(typeof bA=="object"){for(var bz=0;bz<bA.length;bz++){be(C(bA[bz]),bC,bB)}}else{be(C(bA),bC,bB)}return br};this.repaintEverything=function(){for(var bz in aV){be(C(bz))}return br};this.removeAllEndpoints=function(bB){var bz=c(bB,"id"),bC=aV[bz];if(bC){for(var bA=0;bA<bC.length;bA++){br.deleteEndpoint(bC[bA])}}aV[bz]=[];return br};var ai={},bi=function(){for(var bA in ai){for(var bz=0;bz<ai[bA].length;bz++){var bB=ai[bA][bz];n.CurrentLibrary.unbind(bB.el,bB.event,bB.listener)}}ai={}};this.registerListener=function(bA,bz,bB){n.CurrentLibrary.bind(bA,bz,bB);W(ai,bz,{el:bA,event:bz,listener:bB})};this.unregisterListener=function(bA,bz,bB){n.CurrentLibrary.unbind(bA,bz,bB);A(ai,function(bC){return bC.type==bz&&bC.listener==bB})};this.reset=function(){br.deleteEveryEndpoint();br.unbind();a1={};aK={};bl={};at={};aB={};a6={};bc={};N={};bi();br.anchorManager.reset();if(!jsPlumbAdapter.headless){br.dragManager.reset()
 }};this.setDefaultScope=function(bz){R=bz;return br};this.setDraggable=bo;this.setId=function(bD,bz,bF){var bG=bD.constructor==String?bD:br.getId(bD),bC=br.getConnections({source:bG,scope:"*"},true),bB=br.getConnections({target:bG,scope:"*"},true);bz=""+bz;if(!bF){bD=n.CurrentLibrary.getElementObject(bG);n.CurrentLibrary.setAttribute(bD,"id",bz)}bD=n.CurrentLibrary.getElementObject(bz);aV[bz]=aV[bG]||[];for(var bA=0;bA<aV[bz].length;bA++){aV[bz][bA].elementId=bz;aV[bz][bA].element=bD;aV[bz][bA].anchor.elementId=bz}delete aV[bG];br.anchorManager.changeId(bG,bz);var bE=function(bK,bH,bJ){for(var bI=0;bI<bK.length;bI++){bK[bI].endpoints[bH].elementId=bz;bK[bI].endpoints[bH].element=bD;bK[bI][bJ+"Id"]=bz;bK[bI][bJ]=bD}};bE(bC,0,"source");bE(bB,1,"target")};this.setIdChanged=function(bA,bz){br.setId(bA,bz,true)};this.setDebugLog=function(bz){O=bz};var a9=false,bd=null;this.setSuspendDrawing=function(bA,bz){a9=bA;if(bA){bd=new Date().getTime()}else{bd=null}if(bz){br.repaintEverything()}};
 this.isSuspendDrawing=function(){return a9};this.CANVAS="canvas";this.SVG="svg";this.VML="vml";this.setRenderMode=function(bz){Y=jsPlumbAdapter.setRenderMode(bz);return Y};this.getRenderMode=function(){return Y};this.show=function(bz,bA){a7(bz,"block",bA);return br};this.sizeCanvas=function(bB,bz,bD,bA,bC){if(bB){bB.style.height=bC+"px";bB.height=bC;bB.style.width=bA+"px";bB.width=bA;bB.style.left=bz+"px";bB.style.top=bD+"px"}return br};this.getTestHarness=function(){return{endpointsByElement:aV,endpointCount:function(bz){var bA=aV[bz];return bA?bA.length:0},connectionCount:function(bz){bz=bz||R;var bA=a0[bz];return bA?bA.length:0},getId:H,makeAnchor:self.makeAnchor,makeDynamicAnchor:self.makeDynamicAnchor}};this.toggle=aS;this.toggleVisible=aS;this.toggleDraggable=bm;this.wrap=ap;this.addListener=this.bind;var bs=function(bE,bB){var bC=null,bz=bE;if(bB.tagName.toLowerCase()==="svg"&&bB.parentNode){bC=bB.parentNode}else{if(bB.offsetParent){bC=bB.offsetParent}}if(bC!=null){var bA=bC.
 tagName.toLowerCase()==="body"?{left:0,top:0}:s(bC,br),bD=bC.tagName.toLowerCase()==="body"?{left:0,top:0}:{left:bC.scrollLeft,top:bC.scrollTop};bz[0]=bE[0]-bA.left+bD.left;bz[1]=bE[1]-bA.top+bD.top}return bz};var ab=function(bD){var bB=this;this.x=bD.x||0;this.y=bD.y||0;this.elementId=bD.elementId;var bA=bD.orientation||[0,0];var bC=null,bz=null;this.offsets=bD.offsets||[0,0];bB.timestamp=null;this.compute=function(bI){var bH=bI.xy,bE=bI.wh,bF=bI.element,bG=bI.timestamp;if(bG&&bG===bB.timestamp){return bz}bz=[bH[0]+(bB.x*bE[0])+bB.offsets[0],bH[1]+(bB.y*bE[1])+bB.offsets[1]];bz=bs(bz,bF.canvas);bB.timestamp=bG;return bz};this.getOrientation=function(bE){return bA};this.equals=function(bE){if(!bE){return false}var bF=bE.getOrientation();var bG=this.getOrientation();return this.x==bE.x&&this.y==bE.y&&this.offsets[0]==bE.offsets[0]&&this.offsets[1]==bE.offsets[1]&&bG[0]==bF[0]&&bG[1]==bF[1]};this.getCurrentLocation=function(){return bz}};var a3=function(bF){var bD=bF.reference,bE=bF.r
 eferenceCanvas,bB=a(C(bE)),bA=0,bG=0,bz=null,bC=null;this.x=0;this.y=0;this.isFloating=true;this.compute=function(bK){var bJ=bK.xy,bI=bK.element,bH=[bJ[0]+(bB[0]/2),bJ[1]+(bB[1]/2)];bH=bs(bH,bI.canvas);bC=bH;return bH};this.getOrientation=function(bI){if(bz){return bz}else{var bH=bD.getOrientation(bI);return[Math.abs(bH[0])*bA*-1,Math.abs(bH[1])*bG*-1]}};this.over=function(bH){bz=bH.getOrientation()};this.out=function(){bz=null};this.getCurrentLocation=function(){return bC}};var au=function(bB,bA,bG){this.isSelective=true;this.isDynamic=true;var bJ=[],bI=this,bH=function(bK){return bK.constructor==ab?bK:br.makeAnchor(bK,bG,br)};for(var bF=0;bF<bB.length;bF++){bJ[bF]=bH(bB[bF])}this.addAnchor=function(bK){bJ.push(bH(bK))};this.getAnchors=function(){return bJ};this.locked=false;var bC=bJ.length>0?bJ[0]:null,bE=bJ.length>0?0:-1,bI=this,bD=function(bQ,bN,bM,bR,bL){var bK=bR[0]+(bQ.x*bL[0]),bS=bR[1]+(bQ.y*bL[1]),bP=bR[0]+(bL[0]/2),bO=bR[1]+(bL[1]/2);return(Math.sqrt(Math.pow(bN-bK,2)+Mat
 h.pow(bM-bS,2))+Math.sqrt(Math.pow(bP-bK,2)+Math.pow(bO-bS,2)))},bz=bA||function(bU,bL,bM,bN,bK){var bP=bM[0]+(bN[0]/2),bO=bM[1]+(bN[1]/2);var bR=-1,bT=Infinity;for(var bQ=0;bQ<bK.length;bQ++){var bS=bD(bK[bQ],bP,bO,bU,bL);if(bS<bT){bR=bQ+0;bT=bS}}return bK[bR]};this.compute=function(bO){var bN=bO.xy,bK=bO.wh,bM=bO.timestamp,bL=bO.txy,bP=bO.twh;if(bI.locked||bL==null||bP==null){return bC.compute(bO)}else{bO.timestamp=null}bC=bz(bN,bK,bL,bP,bJ);bI.x=bC.x;bI.y=bC.y;return bC.compute(bO)};this.getCurrentLocation=function(){return bC!=null?bC.getCurrentLocation():null};this.getOrientation=function(bK){return bC!=null?bC.getOrientation(bK):[0,0]};this.over=function(bK){if(bC!=null){bC.over(bK)}};this.out=function(){if(bC!=null){bC.out()}}};var bn={},ak={},aM={},U={HORIZONTAL:"horizontal",VERTICAL:"vertical",DIAGONAL:"diagonal",IDENTITY:"identity"},bp=function(bI,bJ,bF,bC){if(bI===bJ){return{orientation:U.IDENTITY,a:["top","top"]}}var bA=Math.atan2((bC.centery-bF.centery),(bC.centerx-bF.c
 enterx)),bD=Math.atan2((bF.centery-bC.centery),(bF.centerx-bC.centerx)),bE=((bF.left<=bC.left&&bF.right>=bC.left)||(bF.left<=bC.right&&bF.right>=bC.right)||(bF.left<=bC.left&&bF.right>=bC.right)||(bC.left<=bF.left&&bC.right>=bF.right)),bK=((bF.top<=bC.top&&bF.bottom>=bC.top)||(bF.top<=bC.bottom&&bF.bottom>=bC.bottom)||(bF.top<=bC.top&&bF.bottom>=bC.bottom)||(bC.top<=bF.top&&bC.bottom>=bF.bottom));if(!(bE||bK)){var bH=null,bB=false,bz=false,bG=null;if(bC.left>bF.left&&bC.top>bF.top){bH=["right","top"]}else{if(bC.left>bF.left&&bF.top>bC.top){bH=["top","left"]}else{if(bC.left<bF.left&&bC.top<bF.top){bH=["top","right"]}else{if(bC.left<bF.left&&bC.top>bF.top){bH=["left","top"]}}}}return{orientation:U.DIAGONAL,a:bH,theta:bA,theta2:bD}}else{if(bE){return{orientation:U.HORIZONTAL,a:bF.top<bC.top?["bottom","top"]:["top","bottom"],theta:bA,theta2:bD}}else{return{orientation:U.VERTICAL,a:bF.left<bC.left?["right","left"]:["left","right"],theta:bA,theta2:bD}}}},a5=function(bN,bJ,bH,bI,bO,bK,bB){
 var bP=[],bA=bJ[bO?0:1]/(bI.length+1);for(var bL=0;bL<bI.length;bL++){var bQ=(bL+1)*bA,bz=bK*bJ[bO?1:0];if(bB){bQ=bJ[bO?0:1]-bQ}var bG=(bO?bQ:bz),bD=bH[0]+bG,bF=bG/bJ[0],bE=(bO?bz:bQ),bC=bH[1]+bE,bM=bE/bJ[1];bP.push([bD,bC,bF,bM,bI[bL][1],bI[bL][2]])}return bP},bb=function(bA,bz){return bA[0]>bz[0]?1:-1},aa=function(bz){return function(bB,bA){var bC=true;if(bz){if(bB[0][0]<bA[0][0]){bC=true}else{bC=bB[0][1]>bA[0][1]}}else{if(bB[0][0]>bA[0][0]){bC=true}else{bC=bB[0][1]>bA[0][1]}}return bC===false?-1:1}},M=function(bA,bz){var bC=bA[0][0]<0?-Math.PI-bA[0][0]:Math.PI-bA[0][0],bB=bz[0][0]<0?-Math.PI-bz[0][0]:Math.PI-bz[0][0];if(bC>bB){return 1}else{return bA[0][1]>bz[0][1]?1:-1}},a2={top:bb,right:aa(true),bottom:aa(true),left:M},ar=function(bz,bA){return bz.sort(bA)},ao=function(bA,bz){var bC=ag[bA],bD=aj[bA],bB=function(bK,bR,bG,bJ,bP,bO,bF){if(bJ.length>0){var bN=ar(bJ,a2[bK]),bL=bK==="right"||bK==="top",bE=a5(bK,bR,bG,bN,bP,bO,bL);var bS=function(bV,bU){var bT=bs([bU[0],bU[1]],bV.canv
 as);ak[bV.id]=[bT[0],bT[1],bU[2],bU[3]];aM[bV.id]=bF};for(var bH=0;bH<bE.length;bH++){var bM=bE[bH][4],bQ=bM.endpoints[0].elementId===bA,bI=bM.endpoints[1].elementId===bA;if(bQ){bS(bM.endpoints[0],bE[bH])}else{if(bI){bS(bM.endpoints[1],bE[bH])}}}}};bB("bottom",bC,[bD.left,bD.top],bz.bottom,true,1,[0,1]);bB("top",bC,[bD.left,bD.top],bz.top,true,0,[0,-1]);bB("left",bC,[bD.left,bD.top],bz.left,false,0,[-1,0]);bB("right",bC,[bD.left,bD.top],bz.right,false,1,[1,0])},aG=function(){var bz={},bD={},bA=this,bC={};this.reset=function(){bz={};bD={};bC={}};this.newConnection=function(bH){var bJ=bH.sourceId,bG=bH.targetId,bE=bH.endpoints,bI=true,bF=function(bK,bL,bN,bM,bO){if((bJ==bG)&&bN.isContinuous){n.CurrentLibrary.removeElement(bE[1].canvas);bI=false}W(bD,bM,[bO,bL,bN.constructor==au])};bF(0,bE[0],bE[0].anchor,bG,bH);if(bI){bF(1,bE[1],bE[1].anchor,bJ,bH)}};this.connectionDetached=function(bE){var bF=bE.connection||bE;var bK=bF.sourceId,bL=bF.targetId,bO=bF.endpoints,bJ=function(bP,bQ,bS,bR,
 bT){if(bS.constructor==a3){}else{A(bD[bR],function(bU){return bU[0].id==bT.id})}};bJ(1,bO[1],bO[1].anchor,bK,bF);bJ(0,bO[0],bO[0].anchor,bL,bF);var bG=bF.sourceId,bH=bF.targetId,bN=bF.endpoints[0].id,bI=bF.endpoints[1].id,bM=function(bR,bP){if(bR){var bQ=function(bS){return bS[4]==bP};A(bR.top,bQ);A(bR.left,bQ);A(bR.bottom,bQ);A(bR.right,bQ)}};bM(bC[bG],bN);bM(bC[bH],bI);bA.redraw(bG);bA.redraw(bH)};this.add=function(bF,bE){W(bz,bE,bF)};this.changeId=function(bF,bE){bD[bE]=bD[bF];bz[bE]=bz[bF];delete bD[bF];delete bz[bF]};this.getConnectionsFor=function(bE){return bD[bE]||[]};this.getEndpointsFor=function(bE){return bz[bE]||[]};this.deleteEndpoint=function(bE){A(bz[bE.elementId],function(bF){return bF.id==bE.id})};this.clearFor=function(bE){delete bz[bE];bz[bE]=[]};var bB=function(bY,bL,bT,bI,bO,bP,bR,bN,b0,bQ,bH,bX){var bV=-1,bG=-1,bJ=bI.endpoints[bR],bS=bJ.id,bM=[1,0][bR],bE=[[bL,bT],bI,bO,bP,bS],bF=bY[b0],bZ=bJ._continuousAnchorEdge?bY[bJ._continuousAnchorEdge]:null;if(bZ){var bW
 =g(bZ,function(b1){return b1[4]==bS});if(bW!=-1){bZ.splice(bW,1);for(var bU=0;bU<bZ.length;bU++){r(bH,bZ[bU][1],function(b1){return b1.id==bZ[bU][1].id});r(bX,bZ[bU][1].endpoints[bR],function(b1){return b1.id==bZ[bU][1].endpoints[bR].id})}}}for(var bU=0;bU<bF.length;bU++){if(bR==1&&bF[bU][3]===bP&&bG==-1){bG=bU}r(bH,bF[bU][1],function(b1){return b1.id==bF[bU][1].id});r(bX,bF[bU][1].endpoints[bR],function(b1){return b1.id==bF[bU][1].endpoints[bR].id})}if(bV!=-1){bF[bV]=bE}else{var bK=bN?bG!=-1?bG:0:bF.length;bF.splice(bK,0,bE)}bJ._continuousAnchorEdge=b0};this.redraw=function(bT,bV,bG,bJ){if(!a9){var b4=bz[bT]||[],b3=bD[bT]||[],bF=[],b2=[],bH=[];bG=bG||p();bJ=bJ||{left:0,top:0};if(bV){bV={left:bV.left+bJ.left,top:bV.top+bJ.top}}X({elId:bT,offset:bV,recalc:false,timestamp:bG});var bO=aj[bT],bK=ag[bT],bQ={};for(var b0=0;b0<b3.length;b0++){var bL=b3[b0][0],bN=bL.sourceId,bI=bL.targetId,bM=bL.endpoints[0].anchor.isContinuous,bS=bL.endpoints[1].anchor.isContinuous;if(bM||bS){var b1=bN+"_"
 +bI,bY=bI+"_"+bN,bX=bQ[b1],bR=bL.sourceId==bT?1:0;if(bM&&!bC[bN]){bC[bN]={top:[],right:[],bottom:[],left:[]}}if(bS&&!bC[bI]){bC[bI]={top:[],right:[],bottom:[],left:[]}}if(bT!=bI){X({elId:bI,timestamp:bG})}if(bT!=bN){X({elId:bN,timestamp:bG})}var bP=aQ(bI),bE=aQ(bN);if(bI==bN&&(bM||bS)){bB(bC[bN],-Math.PI/2,0,bL,false,bI,0,false,"top",bN,bF,b2)}else{if(!bX){bX=bp(bN,bI,bE.o,bP.o);bQ[b1]=bX}if(bM){bB(bC[bN],bX.theta,0,bL,false,bI,0,false,bX.a[0],bN,bF,b2)}if(bS){bB(bC[bI],bX.theta2,-1,bL,true,bN,1,true,bX.a[1],bI,bF,b2)}}if(bM){r(bH,bN,function(b5){return b5===bN})}if(bS){r(bH,bI,function(b5){return b5===bI})}r(bF,bL,function(b5){return b5.id==bL.id});if((bM&&bR==0)||(bS&&bR==1)){r(b2,bL.endpoints[bR],function(b5){return b5.id==bL.endpoints[bR].id})}}}for(var b0=0;b0<b4.length;b0++){if(b4[b0].connections.length==0&&b4[b0].anchor.isContinuous){if(!bC[bT]){bC[bT]={top:[],right:[],bottom:[],left:[]}}bB(bC[bT],-Math.PI/2,0,{endpoints:[b4[b0],b4[b0]],paint:function(){}},false,bT,0,false,"t
 op",bT,bF,b2);r(bH,bT,function(b5){return b5===bT})}}for(var b0=0;b0<bH.length;b0++){ao(bH[b0],bC[bH[b0]])}for(var b0=0;b0<b4.length;b0++){b4[b0].paint({timestamp:bG,offset:bO,dimensions:bK})}for(var b0=0;b0<b2.length;b0++){b2[b0].paint({timestamp:bG,offset:bO,dimensions:bK})}for(var b0=0;b0<b3.length;b0++){var bU=b3[b0][1];if(bU.anchor.constructor==au){bU.paint({elementWithPrecedence:bT});r(bF,b3[b0][0],function(b5){return b5.id==b3[b0][0].id});for(var bZ=0;bZ<bU.connections.length;bZ++){if(bU.connections[bZ]!==b3[b0][0]){r(bF,bU.connections[bZ],function(b5){return b5.id==bU.connections[bZ].id})}}}else{if(bU.anchor.constructor==ab){r(bF,b3[b0][0],function(b5){return b5.id==b3[b0][0].id})}}}var bW=bk[bT];if(bW){bW.paint({timestamp:bG,recalc:false,elId:bT})}for(var b0=0;b0<bF.length;b0++){bF[b0].paint({elId:bT,timestamp:bG,recalc:false})}}};this.rehomeEndpoint=function(bE,bI){var bF=bz[bE]||[],bG=br.getId(bI);if(bG!==bE){for(var bH=0;bH<bF.length;bH++){bA.add(bF[bH],bG)}bF.splice(0,b
 F.length)}}};br.anchorManager=new aG();br.continuousAnchorFactory={get:function(bA){var bz=bn[bA.elementId];if(!bz){bz={type:"Continuous",compute:function(bB){return ak[bB.element.id]||[0,0]},getCurrentLocation:function(bB){return ak[bB.id]||[0,0]},getOrientation:function(bB){return aM[bB.id]||[0,0]},isDynamic:true,isContinuous:true};bn[bA.elementId]=bz}return bz}};if(!jsPlumbAdapter.headless){br.dragManager=jsPlumbAdapter.getDragManager(br)}br.recalculateOffsets=br.dragManager.updateOffsets;var az=function(bU){var bK=this,bB=true,bP,bQ;bK.idPrefix="_jsplumb_c_";bK.defaultLabelLocation=0.5;bK.defaultOverlayKeys=["Overlays","ConnectionOverlays"];this.parent=bU.parent;x.apply(this,arguments);this.isVisible=function(){return bB};this.setVisible=function(bW){bB=bW;bK[bW?"showOverlays":"hideOverlays"]();if(bK.connector&&bK.connector.canvas){bK.connector.canvas.style.display=bW?"block":"none"}bK.repaint()};this.getTypeDescriptor=function(){return"connection"};this.getDefaultType=function(
 ){return{parameters:{},scope:null,detachable:bK._jsPlumb.Defaults.ConnectionsDetachable,rettach:bK._jsPlumb.Defaults.ReattachConnections,paintStyle:bK._jsPlumb.Defaults.PaintStyle||n.Defaults.PaintStyle,connector:bK._jsPlumb.Defaults.Connector||n.Defaults.Connector,hoverPaintStyle:bK._jsPlumb.Defaults.HoverPaintStyle||n.Defaults.HoverPaintStyle,overlays:bK._jsPlumb.Defaults.ConnectorOverlays||n.Defaults.ConnectorOverlays}};var bS=this.applyType;this.applyType=function(bW){bS(bW);if(bW.detachable!=null){bK.setDetachable(bW.detachable)}if(bW.reattach!=null){bK.setReattach(bW.reattach)}if(bW.scope){bK.scope=bW.scope}bK.setConnector(bW.connector)};bQ=bK.setHover;bK.setHover=function(bX){var bW=br.ConnectorZIndex||n.Defaults.ConnectorZIndex;if(bW){bK.connector.setZIndex(bW+(bX?1:0))}bK.connector.setHover.apply(bK.connector,arguments);bQ.apply(bK,arguments)};bP=function(bW){if(v==null){bK.setHover(bW,false)}};this.setConnector=function(bW,bY){if(bK.connector!=null){aZ(bK.connector.getDisp
 layElements(),bK.parent)}var bZ={_jsPlumb:bK._jsPlumb,parent:bU.parent,cssClass:bU.cssClass,container:bU.container,tooltip:bK.tooltip};if(z(bW)){this.connector=new n.Connectors[Y][bW](bZ)}else{if(l(bW)){if(bW.length==1){this.connector=new n.Connectors[Y][bW[0]](bZ)}else{this.connector=new n.Connectors[Y][bW[0]](n.extend(bW[1],bZ))}}}bK.canvas=bK.connector.canvas;D(bK.connector,bK,bP);var bX=br.ConnectorZIndex||n.Defaults.ConnectorZIndex;if(bX){bK.connector.setZIndex(bX)}if(!bY){bK.repaint()}};this.source=C(bU.source);this.target=C(bU.target);if(bU.sourceEndpoint){this.source=bU.sourceEndpoint.endpointWillMoveTo||bU.sourceEndpoint.getElement()}if(bU.targetEndpoint){this.target=bU.targetEndpoint.getElement()}bK.previousConnection=bU.previousConnection;this.sourceId=c(this.source,"id");this.targetId=c(this.target,"id");this.scope=bU.scope;this.endpoints=[];this.endpointStyles=[];var bT=function(bX,bW){return(bX)?br.makeAnchor(bX,bW,br):null},bO=function(bW,b2,bX,bZ,b0,bY,b1){var b3;if(
 bW){bK.endpoints[b2]=bW;bW.addConnection(bK)}else{if(!bX.endpoints){bX.endpoints=[null,null]}var b8=bX.endpoints[b2]||bX.endpoint||br.Defaults.Endpoints[b2]||n.Defaults.Endpoints[b2]||br.Defaults.Endpoint||n.Defaults.Endpoint;if(!bX.endpointStyles){bX.endpointStyles=[null,null]}if(!bX.endpointHoverStyles){bX.endpointHoverStyles=[null,null]}var b6=bX.endpointStyles[b2]||bX.endpointStyle||br.Defaults.EndpointStyles[b2]||n.Defaults.EndpointStyles[b2]||br.Defaults.EndpointStyle||n.Defaults.EndpointStyle;if(b6.fillStyle==null&&bY!=null){b6.fillStyle=bY.strokeStyle}if(b6.outlineColor==null&&bY!=null){b6.outlineColor=bY.outlineColor}if(b6.outlineWidth==null&&bY!=null){b6.outlineWidth=bY.outlineWidth}var b5=bX.endpointHoverStyles[b2]||bX.endpointHoverStyle||br.Defaults.EndpointHoverStyles[b2]||n.Defaults.EndpointHoverStyles[b2]||br.Defaults.EndpointHoverStyle||n.Defaults.EndpointHoverStyle;if(b1!=null){if(b5==null){b5={}}if(b5.fillStyle==null){b5.fillStyle=b1.strokeStyle}}var b4=bX.anchors?
 bX.anchors[b2]:bX.anchor?bX.anchor:bT(br.Defaults.Anchors[b2],b0)||bT(n.Defaults.Anchors[b2],b0)||bT(br.Defaults.Anchor,b0)||bT(n.Defaults.Anchor,b0),b7=bX.uuids?bX.uuids[b2]:null;b3=aH({paintStyle:b6,hoverPaintStyle:b5,endpoint:b8,connections:[bK],uuid:b7,anchor:b4,source:bZ,scope:bX.scope,container:bX.container,reattach:bX.reattach||br.Defaults.ReattachConnections,detachable:bX.detachable||br.Defaults.ConnectionsDetachable});bK.endpoints[b2]=b3;if(bX.drawEndpoints===false){b3.setVisible(false,true,true)}}return b3};var bM=bO(bU.sourceEndpoint,0,bU,bK.source,bK.sourceId,bU.paintStyle,bU.hoverPaintStyle);if(bM){W(aV,this.sourceId,bM)}var bL=bO(bU.targetEndpoint,1,bU,bK.target,bK.targetId,bU.paintStyle,bU.hoverPaintStyle);if(bL){W(aV,this.targetId,bL)}if(!this.scope){this.scope=this.endpoints[0].scope}bK.endpointsToDeleteOnDetach=[null,null];if(bU.deleteEndpointsOnDetach){if(bU.sourceIsNew){bK.endpointsToDeleteOnDetach[0]=bK.endpoints[0]}if(bU.targetIsNew){bK.endpointsToDeleteOnDetac
 h[1]=bK.endpoints[1]}}bK.setConnector(this.endpoints[0].connector||this.endpoints[1].connector||bU.connector||br.Defaults.Connector||n.Defaults.Connector,true);this.setPaintStyle(this.endpoints[0].connectorStyle||this.endpoints[1].connectorStyle||bU.paintStyle||br.Defaults.PaintStyle||n.Defaults.PaintStyle,true);this.setHoverPaintStyle(this.endpoints[0].connectorHoverStyle||this.endpoints[1].connectorHoverStyle||bU.hoverPaintStyle||br.Defaults.HoverPaintStyle||n.Defaults.HoverPaintStyle,true);this.paintStyleInUse=this.getPaintStyle();X({elId:this.sourceId,timestamp:bd});X({elId:this.targetId,timestamp:bd});var bD=aj[this.sourceId],bC=ag[this.sourceId],bz=aj[this.targetId],bH=ag[this.targetId],bI=bd||p(),bN=this.endpoints[0].anchor.compute({xy:[bD.left,bD.top],wh:bC,element:this.endpoints[0],elementId:this.endpoints[0].elementId,txy:[bz.left,bz.top],twh:bH,tElement:this.endpoints[1],timestamp:bI});this.endpoints[0].paint({anchorLoc:bN,timestamp:bI});bN=this.endpoints[1].anchor.comput
 e({xy:[bz.left,bz.top],wh:bH,element:this.endpoints[1],elementId:this.endpoints[1].elementId,txy:[bD.left,bD.top],twh:bC,tElement:this.endpoints[0],timestamp:bI});this.endpoints[1].paint({anchorLoc:bN,timestamp:bI});var bA=br.Defaults.ConnectionsDetachable;if(bU.detachable===false){bA=false}if(bK.endpoints[0].connectionsDetachable===false){bA=false}if(bK.endpoints[1].connectionsDetachable===false){bA=false}this.isDetachable=function(){return bA===true};this.setDetachable=function(bW){bA=bW===true};var bG=bU.reattach||bK.endpoints[0].reattachConnections||bK.endpoints[1].reattachConnections||br.Defaults.ReattachConnections;this.isReattach=function(){return bG===true};this.setReattach=function(bW){bG=bW===true};var bF=bU.cost||bK.endpoints[0].getConnectionCost();bK.getCost=function(){return bF};bK.setCost=function(bW){bF=bW};var bE=!(bU.bidirectional===false);if(bU.bidirectional==null){bE=bK.endpoints[0].areConnectionsBidirectional()}bK.isBidirectional=function(){return bE};var bV=n.ex
 tend({},this.endpoints[0].getParameters());n.extend(bV,this.endpoints[1].getParameters());n.extend(bV,bK.getParameters());bK.setParameters(bV);this.getAttachedElements=function(){return bK.endpoints};this.moveParent=function(bZ){var bY=n.CurrentLibrary,bX=bY.getParent(bK.connector.canvas);if(bK.connector.bgCanvas){bY.removeElement(bK.connector.bgCanvas,bX);bY.appendElement(bK.connector.bgCanvas,bZ)}bY.removeElement(bK.connector.canvas,bX);bY.appendElement(bK.connector.canvas,bZ);for(var bW=0;bW<bK.overlays.length;bW++){if(bK.overlays[bW].isAppendedAtTopLevel){bY.removeElement(bK.overlays[bW].canvas,bX);bY.appendElement(bK.overlays[bW].canvas,bZ);if(bK.overlays[bW].reattachListeners){bK.overlays[bW].reattachListeners(bK.connector)}}}if(bK.connector.reattachListeners){bK.connector.reattachListeners()}};var bJ=null;this.paint=function(cd){if(bB){cd=cd||{};var b4=cd.elId,b5=cd.ui,b2=cd.recalc,bX=cd.timestamp,b6=false,cc=b6?this.sourceId:this.targetId,b1=b6?this.targetId:this.sourceId,bY
 =b6?0:1,ce=b6?1:0;if(bX==null||bX!=bJ){var cf=X({elId:b4,offset:b5,recalc:b2,timestamp:bX}),b3=X({elId:cc,timestamp:bX});var b8=this.endpoints[ce],bW=this.endpoints[bY],b0=b8.anchor.getCurrentLocation(b8),cb=bW.anchor.getCurrentLocation(bW);var bZ=0;for(var ca=0;ca<bK.overlays.length;ca++){var b7=bK.overlays[ca];if(b7.isVisible()){bZ=Math.max(bZ,b7.computeMaxSize())}}var b9=this.connector.compute(b0,cb,this.endpoints[ce],this.endpoints[bY],this.endpoints[ce].anchor,this.endpoints[bY].anchor,bK.paintStyleInUse.lineWidth,bZ,cf,b3);bK.connector.paint(b9,bK.paintStyleInUse);for(var ca=0;ca<bK.overlays.length;ca++){var b7=bK.overlays[ca];if(b7.isVisible){bK.overlayPlacements[ca]=b7.draw(bK.connector,bK.paintStyleInUse,b9)}}}bJ=bX}};this.repaint=function(bX){bX=bX||{};var bW=!(bX.recalc===false);this.paint({elId:this.sourceId,recalc:bW,timestamp:bX.timestamp})};var bR=bU.type||bK.endpoints[0].connectionType||bK.endpoints[1].connectionType;if(bR){bK.addType(bR)}};var bh=function(bA){var bz
 =false;return{drag:function(){if(bz){bz=false;return true}var bB=n.CurrentLibrary.getUIPosition(arguments,br.getZoom()),bC=bA.element;if(bC){n.CurrentLibrary.setOffset(bC,bB);be(C(bC),bB)}},stopDrag:function(){bz=true}}};var av=function(bD,bC,bE,bB,bz){var bA=new a3({reference:bC,referenceCanvas:bB});return aH({paintStyle:bD,endpoint:bE,anchor:bA,source:bz,scope:"__floating"})};var S=function(bB,bz){var bD=document.createElement("div");bD.style.position="absolute";var bA=C(bD);aX(bD,bz);var bC=H(bA);X({elId:bC});bB.id=bC;bB.element=bA};var ah=function(b5){var bS=this;bS.idPrefix="_jsplumb_e_";bS.defaultLabelLocation=[0.5,0.5];bS.defaultOverlayKeys=["Overlays","EndpointOverlays"];this.parent=b5.parent;x.apply(this,arguments);b5=b5||{};this.getTypeDescriptor=function(){return"endpoint"};this.getDefaultType=function(){return{parameters:{},scope:null,maxConnections:bS._jsPlumb.Defaults.MaxConnections,paintStyle:bS._jsPlumb.Defaults.EndpointStyle||n.Defaults.EndpointStyle,endpoint:bS._js
 Plumb.Defaults.Endpoint||n.Defaults.Endpoint,hoverPaintStyle:bS._jsPlumb.Defaults.EndpointHoverStyle||n.Defaults.EndpointHoverStyle,overlays:bS._jsPlumb.Defaults.EndpointOverlays||n.Defaults.EndpointOverlays,connectorStyle:b5.connectorStyle,connectorHoverStyle:b5.connectorHoverStyle,connectorClass:b5.connectorClass,connectorHoverClass:b5.connectorHoverClass,connectorOverlays:b5.connectorOverlays,connector:b5.connector,connectorTooltip:b5.connectorTooltip}};var b3=this.applyType;this.applyType=function(b7){b3(b7);if(b7.maxConnections!=null){bY=b7.maxConnections}if(b7.scope){bS.scope=b7.scope}bS.connectorStyle=b7.connectorStyle;bS.connectorHoverStyle=b7.connectorHoverStyle;bS.connectorOverlays=b7.connectorOverlays;bS.connector=b7.connector;bS.connectorTooltip=b7.connectorTooltip;bS.connectionType=b7.connectionType;bS.connectorClass=b7.connectorClass;bS.connectorHoverClass=b7.connectorHoverClass};var bE=true,bC=!(b5.enabled===false);this.isVisible=function(){return bE};this.setVisible=
 function(b8,cb,b7){bE=b8;if(bS.canvas){bS.canvas.style.display=b8?"block":"none"}bS[b8?"showOverlays":"hideOverlays"]();if(!cb){for(var ca=0;ca<bS.connections.length;ca++){bS.connections[ca].setVisible(b8);if(!b7){var b9=bS===bS.connections[ca].endpoints[0]?1:0;if(bS.connections[ca].endpoints[b9].connections.length==1){bS.connections[ca].endpoints[b9].setVisible(b8,true,true)}}}}};this.isEnabled=function(){return bC};this.setEnabled=function(b7){bC=b7};var bR=b5.source,bL=b5.uuid,b2=null,bG=null;if(bL){aW[bL]=bS}var bJ=c(bR,"id");this.elementId=bJ;this.element=bR;var bB=b5.connectionCost;this.getConnectionCost=function(){return bB};this.setConnectionCost=function(b7){bB=b7};var b1=b5.connectionsBidirectional===false?false:true;this.areConnectionsBidirectional=function(){return b1};this.setConnectionsBidirectional=function(b7){b1=b7};bS.anchor=b5.anchor?br.makeAnchor(b5.anchor,bJ,br):b5.anchors?br.makeAnchor(b5.anchors,bJ,br):br.makeAnchor(br.Defaults.Anchor||"TopCenter",bJ,br);if(!b
 5._transient){br.anchorManager.add(bS,bJ)}var bP=null,bU=null;this.setEndpoint=function(b7){var b8={_jsPlumb:bS._jsPlumb,parent:b5.parent,container:b5.container,tooltip:b5.tooltip,connectorTooltip:b5.connectorTooltip,endpoint:bS};if(z(b7)){bP=new n.Endpoints[Y][b7](b8)}else{if(l(b7)){b8=n.extend(b7[1],b8);bP=new n.Endpoints[Y][b7[0]](b8)}else{bP=b7.clone()}}var b9=n.extend({},b8);bP.clone=function(){var ca=new Object();bP.constructor.apply(ca,[b9]);return ca};bS.endpoint=bP;bS.type=bS.endpoint.type};this.setEndpoint(b5.endpoint||br.Defaults.Endpoint||n.Defaults.Endpoint||"Dot");bU=bP;var bQ=bS.setHover;bS.setHover=function(){bS.endpoint.setHover.apply(bS.endpoint,arguments);bQ.apply(bS,arguments)};var b6=function(b7){if(bS.connections.length>0){bS.connections[0].setHover(b7,false)}else{bS.setHover(b7)}};D(bS.endpoint,bS,b6);this.setPaintStyle(b5.paintStyle||b5.style||br.Defaults.EndpointStyle||n.Defaults.EndpointStyle,true);this.setHoverPaintStyle(b5.hoverPaintStyle||br.Defaults.End
 pointHoverStyle||n.Defaults.EndpointHoverStyle,true);this.paintStyleInUse=this.getPaintStyle();var bN=this.getPaintStyle();this.connectorStyle=b5.connectorStyle;this.connectorHoverStyle=b5.connectorHoverStyle;this.connectorOverlays=b5.connectorOverlays;this.connector=b5.connector;this.connectorTooltip=b5.connectorTooltip;this.connectorClass=b5.connectorClass;this.connectorHoverClass=b5.connectorHoverClass;this.isSource=b5.isSource||false;this.isTarget=b5.isTarget||false;var bY=b5.maxConnections||br.Defaults.MaxConnections;this.getAttachedElements=function(){return bS.connections};this.canvas=this.endpoint.canvas;this.connections=b5.connections||[];this.scope=b5.scope||R;this.connectionType=b5.connectionType;this.timestamp=null;bS.reattachConnections=b5.reattach||br.Defaults.ReattachConnections;bS.connectionsDetachable=br.Defaults.ConnectionsDetachable;if(b5.connectionsDetachable===false||b5.detachable===false){bS.connectionsDetachable=false}var bM=b5.dragAllowedWhenFull||true;if(b5.
 onMaxConnections){bS.bind("maxConnections",b5.onMaxConnections)}this.computeAnchor=function(b7){return bS.anchor.compute(b7)};this.addConnection=function(b7){bS.connections.push(b7)};this.detach=function(b8,cd,b9,cg,b7){var cf=g(bS.connections,function(ci){return ci.id==b8.id}),ce=false;cg=(cg!==false);if(cf>=0){if(b9||b8._forceDetach||b8.isDetachable()||b8.isDetachAllowed(b8)){var ch=b8.endpoints[0]==bS?b8.endpoints[1]:b8.endpoints[0];if(b9||b8._forceDetach||(bS.isDetachAllowed(b8))){bS.connections.splice(cf,1);if(!cd){ch.detach(b8,true,b9);if(b8.endpointsToDeleteOnDetach){for(var cc=0;cc<b8.endpointsToDeleteOnDetach.length;cc++){var ca=b8.endpointsToDeleteOnDetach[cc];if(ca&&ca.connections.length==0){br.deleteEndpoint(ca)}}}}aZ(b8.connector.getDisplayElements(),b8.parent);A(a0[b8.scope],function(ci){return ci.id==b8.id});ce=true;var cb=(!cd&&cg);ba(b8,cb,b7)}}}return ce};this.detachAll=function(b8,b7){while(bS.connections.length>0){bS.detach(bS.connections[0],false,true,b8,b7)}};t
 his.detachFrom=function(ca,b9,b7){var cb=[];for(var b8=0;b8<bS.connections.length;b8++){if(bS.connections[b8].endpoints[1]==ca||bS.connections[b8].endpoints[0]==ca){cb.push(bS.connections[b8])}}for(var b8=0;b8<cb.length;b8++){if(bS.detach(cb[b8],false,true,b9,b7)){cb[b8].setHover(false,false)}}};this.detachFromConnection=function(b8){var b7=g(bS.connections,function(b9){return b9.id==b8.id});if(b7>=0){bS.connections.splice(b7,1)}};this.getElement=function(){return bR};this.setElement=function(ca,b7){var cc=H(ca);A(aV[bS.elementId],function(cd){return cd.id==bS.id});bR=C(ca);bJ=H(bR);bS.elementId=bJ;var cb=ay({source:cc,container:b7}),b9=bD.getParent(bS.canvas);bD.removeElement(bS.canvas,b9);bD.appendElement(bS.canvas,cb);for(var b8=0;b8<bS.connections.length;b8++){bS.connections[b8].moveParent(cb);bS.connections[b8].sourceId=bJ;bS.connections[b8].source=bR}W(aV,cc,bS)};this.getUuid=function(){return bL};this.makeInPlaceCopy=function(){var b9=bS.anchor.getCurrentLocation(bS),b8=bS.an
 chor.getOrientation(bS),b7={compute:function(){return[b9[0],b9[1]]},getCurrentLocation:function(){return[b9[0],b9[1]]},getOrientation:function(){return b8}};return aH({anchor:b7,source:bR,paintStyle:this.getPaintStyle(),endpoint:bP,_transient:true,scope:bS.scope})};this.isConnectedTo=function(b9){var b8=false;if(b9){for(var b7=0;b7<bS.connections.length;b7++){if(bS.connections[b7].endpoints[1]==b9){b8=true;break}}}return b8};this.isFloating=function(){return b2!=null};this.connectorSelector=function(){var b7=bS.connections[0];if(bS.isTarget&&b7){return b7}else{return(bS.connections.length<bY)||bY==-1?null:b7}};this.isFull=function(){return !(bS.isFloating()||bY<1||bS.connections.length<bY)};this.setDragAllowedWhenFull=function(b7){bM=b7};this.setStyle=bS.setPaintStyle;this.equals=function(b7){return this.anchor.equals(b7.anchor)};var bO=function(b8){var b7=0;if(b8!=null){for(var b9=0;b9<bS.connections.length;b9++){if(bS.connections[b9].sourceId==b8||bS.connections[b9].targetId==b8){
 b7=b9;break}}}return bS.connections[b7]};this.paint=function(ca){ca=ca||{};var cg=ca.timestamp,cf=!(ca.recalc===false);if(!cg||bS.timestamp!==cg){X({elId:bJ,timestamp:cg,recalc:cf});var cm=ca.offset||aj[bJ];if(cm){var cd=ca.anchorPoint,cb=ca.connectorPaintStyle;if(cd==null){var b7=ca.dimensions||ag[bJ];if(cm==null||b7==null){X({elId:bJ,timestamp:cg});cm=aj[bJ];b7=ag[bJ]}var b9={xy:[cm.left,cm.top],wh:b7,element:bS,timestamp:cg};if(cf&&bS.anchor.isDynamic&&bS.connections.length>0){var cj=bO(ca.elementWithPrecedence),cl=cj.endpoints[0]==bS?1:0,cc=cl==0?cj.sourceId:cj.targetId,ci=aj[cc],ck=ag[cc];b9.txy=[ci.left,ci.top];b9.twh=ck;b9.tElement=cj.endpoints[cl]}cd=bS.anchor.compute(b9)}var ch=bP.compute(cd,bS.anchor.getOrientation(bS),bS.paintStyleInUse,cb||bS.paintStyleInUse);bP.paint(ch,bS.paintStyleInUse,bS.anchor);bS.timestamp=cg;for(var ce=0;ce<bS.overlays.length;ce++){var b8=bS.overlays[ce];if(b8.isVisible){bS.overlayPlacements[ce]=b8.draw(bS.endpoint,bS.paintStyleInUse,ch)}}}}};thi
 s.repaint=this.paint;this.removeConnection=this.detach;if(n.CurrentLibrary.isDragSupported(bR)){var bX={id:null,element:null},bW=null,bA=false,bF=null,bz=bh(bX);var bH=function(){bW=bS.connectorSelector();var b7=true;if(!bS.isEnabled()){b7=false}if(bW==null&&!b5.isSource){b7=false}if(b5.isSource&&bS.isFull()&&!bM){b7=false}if(bW!=null&&!bW.isDetachable()){b7=false}if(b7===false){if(n.CurrentLibrary.stopDrag){n.CurrentLibrary.stopDrag()}bz.stopDrag();return false}if(bW&&!bS.isFull()&&b5.isSource){bW=null}X({elId:bJ});bG=bS.makeInPlaceCopy();bG.referenceEndpoint=bS;bG.paint();S(bX,bS.parent);var cd=C(bG.canvas),cb=s(cd,br),b8=bs([cb.left,cb.top],bG.canvas);n.CurrentLibrary.setOffset(bX.element,{left:b8[0],top:b8[1]});if(bS.parentAnchor){bS.anchor=br.makeAnchor(bS.parentAnchor,bS.elementId,br)}d(C(bS.canvas),"dragId",bX.id);d(C(bS.canvas),"elId",bJ);if(b5.proxy){bS.setPaintStyle(b5.proxy.paintStyle)}b2=av(bS.getPaintStyle(),bS.anchor,bP,bS.canvas,bX.element);if(bW==null){bS.anchor.lock
 ed=true;bS.setHover(false,false);bW=af({sourceEndpoint:bS,targetEndpoint:b2,source:bS.endpointWillMoveTo||C(bR),target:bX.element,anchors:[bS.anchor,b2.anchor],paintStyle:b5.connectorStyle,hoverPaintStyle:b5.connectorHoverStyle,connector:b5.connector,overlays:b5.connectorOverlays,type:bS.connectionType,cssClass:bS.connectorClass,hoverClass:bS.connectorHoverClass})}else{bA=true;bW.setHover(false);bI(C(bG.canvas),false,true);var ca=bW.endpoints[0].id==bS.id?0:1;bW.floatingAnchorIndex=ca;bS.detachFromConnection(bW);var ce=C(bS.canvas),cc=n.CurrentLibrary.getDragScope(ce);d(ce,"originalScope",cc);var b9=n.CurrentLibrary.getDropScope(ce);n.CurrentLibrary.setDragScope(ce,b9);if(ca==0){bF=[bW.source,bW.sourceId,b0,cc];bW.source=bX.element;bW.sourceId=bX.id}else{bF=[bW.target,bW.targetId,b0,cc];bW.target=bX.element;bW.targetId=bX.id}bW.endpoints[ca==0?1:0].anchor.locked=true;bW.suspendedEndpoint=bW.endpoints[ca];bW.suspendedEndpoint.setHover(false);b2.referenceEndpoint=bW.suspendedEndpoint;
 bW.endpoints[ca]=b2;a8(bW)}bk[bX.id]=bW;b2.addConnection(bW);W(aV,bX.id,b2);br.currentlyDragging=true};var bD=n.CurrentLibrary,bZ=b5.dragOptions||{},bT=n.extend({},bD.defaultDragOptions),bV=bD.dragEvents.start,b4=bD.dragEvents.stop,bK=bD.dragEvents.drag;bZ=n.extend(bT,bZ);bZ.scope=bZ.scope||bS.scope;bZ[bV]=ap(bZ[bV],bH);bZ[bK]=ap(bZ[bK],bz.drag);bZ[b4]=ap(bZ[b4],function(){var b8=bD.getDropEvent(arguments);br.currentlyDragging=false;A(aV[bX.id],function(b9){return b9.id==b2.id});aZ([bX.element[0],b2.canvas],bR);aw(bG.canvas,bR);br.anchorManager.clearFor(bX.id);var b7=bW.floatingAnchorIndex==null?1:bW.floatingAnchorIndex;bW.endpoints[b7==0?1:0].anchor.locked=false;bS.setPaintStyle(bN);if(bW.endpoints[b7]==b2){if(bA&&bW.suspendedEndpoint){if(b7==0){bW.source=bF[0];bW.sourceId=bF[1]}else{bW.target=bF[0];bW.targetId=bF[1]}n.CurrentLibrary.setDragScope(bF[2],bF[3]);bW.endpoints[b7]=bW.suspendedEndpoint;if(bW.isReattach()||bW._forceReattach||bW._forceDetach||!bW.endpoints[b7==0?1:0].detac
 h(bW,false,false,true,b8)){bW.setHover(false);bW.floatingAnchorIndex=null;bW.suspendedEndpoint.addConnection(bW);br.repaint(bF[1])}bW._forceDetach=null;bW._forceReattach=null}else{aZ(bW.connector.getDisplayElements(),bS.parent);bS.detachFromConnection(bW)}}bS.anchor.locked=false;bS.paint({recalc:false});aT(bW);bW=null;bG=null;delete aV[b2.elementId];b2.anchor=null;b2=null;br.currentlyDragging=false});var b0=C(bS.canvas);n.CurrentLibrary.initDraggable(b0,bZ,true)}var bI=function(b9,ce,cc,cf){if((b5.isTarget||ce)&&n.CurrentLibrary.isDropSupported(bR)){var ca=b5.dropOptions||br.Defaults.DropOptions||n.Defaults.DropOptions;ca=n.extend({},ca);ca.scope=ca.scope||bS.scope;var b8=n.CurrentLibrary.dragEvents.drop,cd=n.CurrentLibrary.dragEvents.over,b7=n.CurrentLibrary.dragEvents.out,cb=function(){var cg=n.CurrentLibrary.getDropEvent(arguments),ct=C(n.CurrentLibrary.getDragObject(arguments)),ci=c(ct,"dragId"),ck=c(ct,"elId"),cs=c(ct,"originalScope"),cn=bk[ci];var cl=cn.suspendedEndpoint&&(cn.
 suspendedEndpoint.id==bS.id||bS.referenceEndpoint&&cn.suspendedEndpoint.id==bS.referenceEndpoint.id);if(cl){cn._forceReattach=true;return}if(cn!=null){var cp=cn.floatingAnchorIndex==null?1:cn.floatingAnchorIndex,cq=cp==0?1:0;if(cs){n.CurrentLibrary.setDragScope(ct,cs)}var cr=cf!=null?cf.isEnabled():true;if(bS.isFull()){bS.fire("maxConnections",{endpoint:bS,connection:cn,maxConnections:bY},cg)}if(!bS.isFull()&&!(cp==0&&!bS.isSource)&&!(cp==1&&!bS.isTarget)&&cr){var cm=true;if(cn.suspendedEndpoint&&cn.suspendedEndpoint.id!=bS.id){if(cp==0){cn.source=cn.suspendedEndpoint.element;cn.sourceId=cn.suspendedEndpoint.elementId}else{cn.target=cn.suspendedEndpoint.element;cn.targetId=cn.suspendedEndpoint.elementId}if(!cn.isDetachAllowed(cn)||!cn.endpoints[cp].isDetachAllowed(cn)||!cn.suspendedEndpoint.isDetachAllowed(cn)||!br.checkCondition("beforeDetach",cn)){cm=false}}if(cp==0){cn.source=bS.element;cn.sourceId=bS.elementId}else{cn.target=bS.element;cn.targetId=bS.elementId}var co=function(){
 cn.floatingAnchorIndex=null};var ch=function(){cn.endpoints[cp].detachFromConnection(cn);if(cn.suspendedEndpoint){cn.suspendedEndpoint.detachFromConnection(cn)}cn.endpoints[cp]=bS;bS.addConnection(cn);var cx=bS.getParameters();for(var cv in cx){cn.setParameter(cv,cx[cv])}if(!cn.suspendedEndpoint){if(cx.draggable){n.CurrentLibrary.initDraggable(bS.element,bZ,true)}}else{var cw=cn.suspendedEndpoint.getElement(),cu=cn.suspendedEndpoint.elementId;ba({source:cp==0?cw:cn.source,target:cp==1?cw:cn.target,sourceId:cp==0?cu:cn.sourceId,targetId:cp==1?cu:cn.targetId,sourceEndpoint:cp==0?cn.suspendedEndpoint:cn.endpoints[0],targetEndpoint:cp==1?cn.suspendedEndpoint:cn.endpoints[1],connection:cn},true,cg)}bx(cn,null,cg);co()};var cj=function(){if(cn.suspendedEndpoint){cn.endpoints[cp]=cn.suspendedEndpoint;cn.setHover(false);cn._forceDetach=true;if(cp==0){cn.source=cn.suspendedEndpoint.element;cn.sourceId=cn.suspendedEndpoint.elementId}else{cn.target=cn.suspendedEndpoint.element;cn.targetId=cn.s
 uspendedEndpoint.elementId}cn.suspendedEndpoint.addConnection(cn);cn.endpoints[0].repaint();cn.repaint();br.repaint(cn.source.elementId);cn._forceDetach=false}co()};cm=cm&&bS.isDropAllowed(cn.sourceId,cn.targetId,cn.scope,cn,bS);if(cm){ch()}else{cj()}}br.currentlyDragging=false;delete bk[ci];cn.suspendedEndpoint=null}};ca[b8]=ap(ca[b8],cb);ca[cd]=ap(ca[cd],function(){var ch=n.CurrentLibrary.getDragObject(arguments),ck=c(C(ch),"dragId"),cj=bk[ck];if(cj!=null){var cg=cj.floatingAnchorIndex==null?1:cj.floatingAnchorIndex;var ci=(bS.isTarget&&cj.floatingAnchorIndex!=0)||(cj.suspendedEndpoint&&bS.referenceEndpoint&&bS.referenceEndpoint.id==cj.suspendedEndpoint.id);if(ci){cj.endpoints[cg].anchor.over(bS.anchor)}}});ca[b7]=ap(ca[b7],function(){var ch=n.CurrentLibrary.getDragObject(arguments),ck=c(C(ch),"dragId"),cj=bk[ck];if(cj!=null){var cg=cj.floatingAnchorIndex==null?1:cj.floatingAnchorIndex;var ci=(bS.isTarget&&cj.floatingAnchorIndex!=0)||(cj.suspendedEndpoint&&bS.referenceEndpoint&&bS
 .referenceEndpoint.id==cj.suspendedEndpoint.id);if(ci){cj.endpoints[cg].anchor.out()}}});n.CurrentLibrary.initDroppable(b9,ca,true,cc)}};bI(C(bS.canvas),true,!(b5._transient||bS.anchor.isFloating),bS);if(b5.type){bS.addType(b5.type)}return bS}};var n=new w();if(typeof window!="undefined"){window.jsPlumb=n}n.getInstance=function(I){var H=new w(I);H.init();return H};if(typeof define==="function"&&define.amd&&define.amd.jsPlumb){define("jsplumb",[],function(){return n})}var q=function(H,M,J,I,L,K){return function(O){O=O||{};var N=O.jsPlumbInstance.makeAnchor([H,M,J,I,0,0],O.elementId,O.jsPlumbInstance);N.type=L;if(K){K(N,O)}return N}};n.Anchors.TopCenter=q(0.5,0,0,-1,"TopCenter");n.Anchors.BottomCenter=q(0.5,1,0,1,"BottomCenter");n.Anchors.LeftMiddle=q(0,0.5,-1,0,"LeftMiddle");n.Anchors.RightMiddle=q(1,0.5,1,0,"RightMiddle");n.Anchors.Center=q(0.5,0.5,0,0,"Center");n.Anchors.TopRight=q(1,0,0,-1,"TopRight");n.Anchors.BottomRight=q(1,1,0,1,"BottomRight");n.Anchors.TopLeft=q(0,0,0,-1,"Top
 Left");n.Anchors.BottomLeft=q(0,1,0,1,"BottomLeft");n.Defaults.DynamicAnchors=function(H){return H.jsPlumbInstance.makeAnchors(["TopCenter","RightMiddle","BottomCenter","LeftMiddle"],H.elementId,H.jsPlumbInstance)};n.Anchors.AutoDefault=function(I){var H=I.jsPlumbInstance.makeDynamicAnchor(n.Defaults.DynamicAnchors(I));H.type="AutoDefault";return H};n.Anchors.Assign=q(0,0,0,0,"Assign",function(I,J){var H=J.position||"Fixed";I.positionFinder=H.constructor==String?J.jsPlumbInstance.AnchorPositionFinders[H]:H;I.constructorParams=J});n.Anchors.Continuous=function(H){return H.jsPlumbInstance.continuousAnchorFactory.get(H)};n.AnchorPositionFinders={Fixed:function(K,H,J,I){return[(K.left-H.left)/J[0],(K.top-H.top)/J[1]]},Grid:function(H,Q,L,I){var P=H.left-Q.left,O=H.top-Q.top,N=L[0]/(I.grid[0]),M=L[1]/(I.grid[1]),K=Math.floor(P/N),J=Math.floor(O/M);return[((K*N)+(N/2))/L[0],((J*M)+(M/2))/L[1]]}};n.Anchors.Perimeter=function(H){H=H||{};var I=H.anchorCount||60,L=H.shape;if(!L){throw new Err
 or("no shape supplied to Perimeter Anchor type")}var J=function(){var W=0.5,V=Math.PI*2/I,X=0,T=[];for(var U=0;U<I;U++){var S=W+(W*Math.sin(X)),Y=W+(W*Math.cos(X));T.push([S,Y,0,0]);X+=V}return T},M=function(U){var W=I/U.length,S=[],T=function(aa,ad,Z,ac,ae){W=I*ae;var Y=(Z-aa)/W,X=(ac-ad)/W;for(var ab=0;ab<W;ab++){S.push([aa+(Y*ab),ad+(X*ab),0,0])}};for(var V=0;V<U.length;V++){T.apply(null,U[V])}return S},P=function(S){var U=[];for(var T=0;T<S.length;T++){U.push([S[T][0],S[T][1],S[T][2],S[T][3],1/S.length])}return M(U)},N=function(){return P([[0,0,1,0],[1,0,1,1],[1,1,0,1],[0,1,0,0]])};var K={circle:J,ellipse:J,diamond:function(){return P([[0.5,0,1,0.5],[1,0.5,0.5,1],[0.5,1,0,0.5],[0,0.5,0.5,0]])},rectangle:N,square:N,triangle:function(){return P([[0.5,0,1,1],[1,1,0,1],[0,1,0.5,0]])},path:function(X){var V=X.points;var W=[],T=0;for(var U=0;U<V.length-1;U++){var S=Math.sqrt(Math.pow(V[U][2]-V[U][0])+Math.pow(V[U][3]-V[U][1]));T+=S;W.push([V[U][0],V[U][1],V[U+1][0],V[U+1][1],S])}for(v
 ar U=0;U<W.length;U++){W[U][4]=W[U][4]/T}return M(W)}},Q=function(X,W){var Y=[],V=W/180*Math.PI;for(var U=0;U<X.length;U++){var T=X[U][0]-0.5,S=X[U][1]-0.5;Y.push([0.5+((T*Math.cos(V))-(S*Math.sin(V))),0.5+((T*Math.sin(V))+(S*Math.cos(V))),X[U][2],X[U][3]])}return Y};if(!K[L]){throw new Error("Shape ["+L+"] is unknown by Perimeter Anchor type")}var R=K[L](H);if(H.rotation){R=Q(R,H.rotation)}var O=H.jsPlumbInstance.makeDynamicAnchor(R);O.type="Perimeter";return O}})();(function(){jsPlumb.DOMElementComponent=function(d){jsPlumb.jsPlumbUIComponent.apply(this,arguments);this.mousemove=this.dblclick=this.click=this.mousedown=this.mouseup=function(f){}};jsPlumb.Connectors.Straight=function(){this.type="Straight";var s=this,k=null,f,l,q,o,m,g,r,i,h,e,d,p,n;this.compute=function(B,K,t,A,G,u,E,z){var J=Math.abs(B[0]-K[0]),D=Math.abs(B[1]-K[1]),C=0.45*J,v=0.45*D;J*=1.9;D*=1.9;var H=Math.min(B[0],K[0])-C;var F=Math.min(B[1],K[1])-v;var I=Math.max(2*E,z);if(J<I){J=I;H=B[0]+((K[0]-B[0])/2)-(I/2)
 ;C=(J-Math.abs(B[0]-K[0]))/2}if(D<I){D=I;F=B[1]+((K[1]-B[1])/2)-(I/2);v=(D-Math.abs(B[1]-K[1]))/2}i=B[0]<K[0]?C:J-C;h=B[1]<K[1]?v:D-v;e=B[0]<K[0]?J-C:C;d=B[1]<K[1]?D-v:v;k=[H,F,J,D,i,h,e,d];o=e-i,m=d-h;f=jsPlumbUtil.gradient({x:i,y:h},{x:e,y:d}),l=-1/f;q=-1*((f*i)-h);g=Math.atan(f);r=Math.atan(l);n=Math.sqrt((o*o)+(m*m));return k};this.pointOnPath=function(u,v){if(u==0&&!v){return{x:i,y:h}}else{if(u==1&&!v){return{x:e,y:d}}else{var t=v?u>0?u:n+u:u*n;return jsPlumbUtil.pointOnLine({x:i,y:h},{x:e,y:d},t)}}};this.gradientAtPoint=function(t){return f};this.pointAlongPathFrom=function(t,x,w){var v=s.pointOnPath(t,w),u=t==1?{x:i+((e-i)*10),y:h+((h-d)*10)}:x<=0?{x:i,y:h}:{x:e,y:d};if(x<=0&&Math.abs(x)>1){x*=-1}return jsPlumbUtil.pointOnLine(v,u,x)}};jsPlumb.Connectors.Bezier=function(w){var q=this;w=w||{};this.majorAnchor=w.curviness||150;this.minorAnchor=10;var u=null;this.type="Bezier";this._findControlPoint=function(I,x,D,y,B,G,z){var F=G.getOrientation(y),H=z.getOrientation(B),C=F[0]!=
 H[0]||F[1]==H[1],A=[],J=q.majorAnchor,E=q.minorAnchor;if(!C){if(F[0]==0){A.push(x[0]<D[0]?I[0]+E:I[0]-E)}else{A.push(I[0]-(J*F[0]))}if(F[1]==0){A.push(x[1]<D[1]?I[1]+E:I[1]-E)}else{A.push(I[1]+(J*H[1]))}}else{if(H[0]==0){A.push(D[0]<x[0]?I[0]+E:I[0]-E)}else{A.push(I[0]+(J*H[0]))}if(H[1]==0){A.push(D[1]<x[1]?I[1]+E:I[1]-E)}else{A.push(I[1]+(J*F[1]))}}return A};var r,m,g,p,o,g,f,t,s,v,e,i,h,l,k;this.compute=function(T,A,N,B,R,y,x,M){x=Math.max(M,(x||0));v=Math.abs(T[0]-A[0])+x;e=Math.abs(T[1]-A[1])+x;t=Math.min(T[0],A[0])-(x/2);s=Math.min(T[1],A[1])-(x/2);g=T[0]<A[0]?v-(x/2):(x/2);f=T[1]<A[1]?e-(x/2):(x/2);p=T[0]<A[0]?(x/2):v-(x/2);o=T[1]<A[1]?(x/2):e-(x/2);r=q._findControlPoint([g,f],T,A,N,B,R,y);m=q._findControlPoint([p,o],A,T,B,N,y,R);var L=Math.min(g,p),K=Math.min(r[0],m[0]),G=Math.min(L,K),S=Math.max(g,p),P=Math.max(r[0],m[0]),D=Math.max(S,P);if(D>v){v=D}if(G<0){t+=G;var I=Math.abs(G);v+=I;r[0]+=I;g+=I;p+=I;m[0]+=I}var Q=Math.min(f,o),O=Math.min(r[1],m[1]),C=Math.min(Q,O),H=Math.
 max(f,o),F=Math.max(r[1],m[1]),z=Math.max(H,F);if(z>e){e=z}if(C<0){s+=C;var E=Math.abs(C);e+=E;r[1]+=E;f+=E;o+=E;m[1]+=E}if(M&&v<M){var J=(M-v)/2;v=M;t-=J;g=g+J;p=p+J;r[0]=r[0]+J;m[0]=m[0]+J}if(M&&e<M){var J=(M-e)/2;e=M;s-=J;f=f+J;o=o+J;r[1]=r[1]+J;m[1]=m[1]+J}u=[t,s,v,e,g,f,p,o,r[0],r[1],m[0],m[1]];return u};var d=function(){return[{x:g,y:f},{x:r[0],y:r[1]},{x:m[0],y:m[1]},{x:p,y:o}]};var n=function(y,x,z){if(z){x=jsBezier.locationAlongCurveFrom(y,x>0?0:1,x)}return x};this.pointOnPath=function(x,z){var y=d();x=n(y,x,z);return jsBezier.pointOnCurve(y,x)};this.gradientAtPoint=function(x,z){var y=d();x=n(y,x,z);return jsBezier.gradientAtPoint(y,x)};this.pointAlongPathFrom=function(x,A,z){var y=d();x=n(y,x,z);return jsBezier.pointAlongCurveFrom(y,x,A)}};jsPlumb.Connectors.Flowchart=function(A){this.type="Flowchart";A=A||{};var s=this,e=A.stub||A.minStubLength||30,k=jsPlumbUtil.isArray(e)?e[0]:e,p=jsPlumbUtil.isArray(e)?e[1]:e,u=A.gap||0,f=A.midpoint||0.5,v=[],n=0,h=[],r=[],w=[],t,q,z=-
 Infinity,x=-Infinity,B=Infinity,y=Infinity,d=A.grid,g=function(H,D){var G=H%D,E=Math.floor(H/D),F=G>(D/2)?1:0;return(E+F)*D},o=function(D,G,F,E){return[F||d==null?D:g(D,d[0]),E||d==null?G:g(G,d[1])]},C=function(E,D,I,H){var G=0;for(var F=0;F<v.length;F++){r[F]=v[F][5]/n;h[F]=[G,(G+=(v[F][5]/n))]}},m=function(){w.push(v.length);for(var D=0;D<v.length;D++){w.push(v[D][0]);w.push(v[D][1])}},l=function(M,J,L,K,I,H){var E=v.length==0?L:v[v.length-1][0],D=v.length==0?K:v[v.length-1][1],F=M==E?Infinity:0;var G=Math.abs(M==E?J-D:M-E);v.push([M,J,E,D,F,G]);n+=G;z=Math.max(z,M);x=Math.max(x,J);B=Math.min(B,M);y=Math.min(y,J)},i=function(F,H){if(H){F=F>0?F/n:(n+F)/n}var D=h.length-1,E=1;for(var G=0;G<h.length;G++){if(h[G][1]>=F){D=G;E=(F-h[G][0])/r[G];break}}return{segment:v[D],proportion:E,index:D}};this.compute=function(aa,ao,D,U,az,O,Y,T,au,aq){v=[];h=[];n=0;r=[];z=x=-Infinity;B=y=Infinity;s.lineWidth=Y;t=ao[0]<aa[0];q=ao[1]<aa[1];var ae=Y||1,I=(ae/2)+(k+p),F=(ae/2)+(p+k),H=(ae/2)+(k+p),E=(
 ae/2)+(p+k),R=az.orientation||az.getOrientation(D),aA=O.orientation||O.getOrientation(U),an=t?ao[0]:aa[0],am=q?ao[1]:aa[1],ap=Math.abs(ao[0]-aa[0])+I+F,ay=Math.abs(ao[1]-aa[1])+H+E;if(R[0]==0&&R[1]==0||aA[0]==0&&aA[1]==0){var ag=ap>ay?0:1,ai=[1,0][ag];R=[];aA=[];R[ag]=aa[ag]>ao[ag]?-1:1;aA[ag]=aa[ag]>ao[ag]?1:-1;R[ai]=0;aA[ai]=0}var M=t?(ap-F)+(u*R[0]):I+(u*R[0]),L=q?(ay-E)+(u*R[1]):H+(u*R[1]),aw=t?I+(u*aA[0]):(ap-F)+(u*aA[0]),av=q?H+(u*aA[1]):(ay-E)+(u*aA[1]),ad=M+(R[0]*k),ac=L+(R[1]*k),P=aw+(aA[0]*p),N=av+(aA[1]*p),Z=Math.abs(M-aw)>(k+p),ab=Math.abs(L-av)>(k+p),al=ad+((P-ad)*f),aj=ac+((N-ac)*f),S=((R[0]*aA[0])+(R[1]*aA[1])),af=S==-1,ah=S==0,G=S==1;an-=I;am-=H;w=[an,am,ap,ay,M,L,aw,av];var at=[];var W=R[0]==0?"y":"x",Q=af?"opposite":G?"orthogonal":"perpendicular",J=jsPlumbUtil.segment([M,L],[aw,av]),ak=R[W=="x"?0:1]==-1,V={x:[null,4,3,2,1],y:[null,2,1,4,3]};if(ak){J=V[W][J]}l(ad,ac,M,L,aw,av);var X=function(aE,aD,aB,aC){return aE+(aD*((1-aB)*aC)+Math.max(k,p))},K={oppositex:functio
 n(){if(D.elementId==U.elementId){var aB=ac+((1-az.y)*au.height)+Math.max(k,p);return[[ad,aB],[P,aB]]}else{if(Z&&(J==1||J==2)){return[[al,L],[al,av]]}else{return[[ad,aj],[P,aj]]}}},orthogonalx:function(){if(J==1||

<TRUNCATED>

Mime
View raw message