(function(){var d=!!!document.createElement("canvas").getContext;var h=function(u,s,t){var r=u[s];if(r==null){r=[];u[s]=r}r.push(t);return r};var g=null;var n=function(r,s){return q.CurrentLibrary.getAttribute(b(r),s)};var f=function(s,t,r){q.CurrentLibrary.setAttribute(b(s),t,r)};var m=function(s,r){q.CurrentLibrary.addClass(b(s),r)};var k=function(s,r){return q.CurrentLibrary.hasClass(b(s),r)};var c=function(s,r){q.CurrentLibrary.removeClass(b(s),r)};var b=function(r){return q.CurrentLibrary.getElementObject(r)};var p=function(r){return q.CurrentLibrary.getOffset(b(r))};var e=function(r){return q.CurrentLibrary.getSize(b(r))};var l=function(r,s){if(r.logEnabled&&typeof console!="undefined"){console.log(s)}};var a=function(){var v={};var A=this;this.overlayPlacements=[];this.paintStyle=null,this.hoverPaintStyle=null;this._over=function(E){var G=p(b(A.canvas));var I=q.CurrentLibrary.getPageXY(E);var B=I[0]-G.left,H=I[1]-G.top;if(B>0&&H>0&&B=B&&D[2]<=H&&D[3]>=H)){return true}}if(!d){var F=A.canvas.getContext("2d").getImageData(parseInt(B),parseInt(H),1,1);return F.data[0]!=0||F.data[1]!=0||F.data[2]!=0||F.data[3]!=0}else{}}return false};this.bind=function(B,C){h(v,B,C)};this.fireUpdate=function(D,E,B){if(v[D]){for(var C=0;C=0){delete (aq[ar]);aq.splice(ar,1);return true}}}return false};var r=function(ar,aq){return C(ar,function(at,au){aa[au]=aq;if(q.CurrentLibrary.isDragSupported(at)){q.CurrentLibrary.setDraggable(at,aq)}})};var ai=function(aq,ar){N(n(aq,"id"),function(at){at.canvas.style.display=ar})};var H=function(aq){return C(aq,function(at,ar){var au=aa[ar]==null?R:aa[ar];au=!au;aa[ar]=au;q.CurrentLibrary.setDraggable(at,au);return au})};var s=function(aq){N(aq,function(at){var ar=("none"==at.canvas.style.display);at.canvas.style.display=ar?"block":"none"})};var y=function(aw){var au=aw.timestamp,aq=aw.recalc,av=aw.offset,ar=aw.elId;if(!aq){if(au&&au===w[ar]){return}}if(aq||av==null){var at=b(ar);if(at!=null){J[ar]=e(at);P[ar]=p(at);w[ar]=au}}else{P[ar]=av}};var ap=function(aq,ar){var at=b(aq);var au=n(at,"id");if(!au||au=="undefined"){if(arguments.length==2&&arguments[1]!=undefined){au=ar}else{au="jsPlumb_"+al()}f(at,"id",au)}return au};var ag=function(at,aq,ar){at=at||function(){};aq=aq||function(){};return function(){var au=null;try{au=aq.apply(this,arguments)}catch(av){l(x,"jsPlumb function failed : "+av)}if(ar==null||(au!==ar)){try{at.apply(this,arguments)}catch(av){l(x,"wrapped function failed : "+av)}}return au}};this.connectorClass="_jsPlumb_connector";this.endpointClass="_jsPlumb_endpoint";this.overlayClass="_jsPlumb_overlay";this.Anchors={};this.Connectors={};this.Endpoints={};this.Overlays={};this.addEndpoint=function(aw,au,aA){aA=aA||{};var ar=q.extend({},aA);q.extend(ar,au);ar.endpoint=ar.endpoint||x.Defaults.Endpoint||q.Defaults.Endpoint;ar.endpointStyle=ar.endpointStyle||x.Defaults.EndpointStyle||q.Defaults.EndpointStyle;var at=b(aw),aq=n(at,"id");ar.source=at;y({elId:aq});var ax=ah(ar);h(ab,aq,ax);var ay=P[aq],av=J[aq];var az=ax.anchor.compute({xy:[ay.left,ay.top],wh:av,element:ax});ax.paint({anchorLoc:az});return ax};this.addEndpoints=function(av,ar,aq){var au=[];for(var at=0;at0?Y(aC,aB)!=-1:true};for(var av in E){if(at(ay,av)){aq[av]=[];for(var au=0;au=4){ar.orientation=[arguments[2],arguments[3]]}if(arguments.length==6){ar.offsets=[arguments[4],arguments[5]]}}var ax=new V(ar);ax.clone=function(){return new V(ar)};return ax};this.makeAnchors=function(ar){var at=[];for(var aq=0;aq0?aA[0]:null;var aw=aA.length>0?0:-1;this.locked=false;var az=this;var av=function(aD,aB,aH,aG,aC){var aF=aG[0]+(aD.x*aC[0]),aE=aG[1]+(aD.y*aC[1]);return Math.sqrt(Math.pow(aB-aF,2)+Math.pow(aH-aE,2))};var aq=ar||function(aL,aC,aD,aE,aB){var aG=aD[0]+(aE[0]/2),aF=aD[1]+(aE[1]/2);var aI=-1,aK=Infinity;for(var aH=0;aHaO){aO=aW}}var a1=this.connector.compute(aQ,a3,this.endpoints[a7].anchor,this.endpoints[aN].anchor,az.paintStyleInUse.lineWidth,aO);q.sizeCanvas(at,a1[0],a1[1],a1[2],a1[3]);var aU=function(a8,ba){a8.save();q.extend(a8,ba);if(ba.gradient&&!d){var bb=az.connector.createGradient(a1,a8,(aV==this.sourceId));for(var a9=0;a9=0){aE.connections.splice(aQ,1);if(!aT){var aS=aR.endpoints[0]==aE?aR.endpoints[1]:aR.endpoints[0];aS.detach(aR,true)}X(aR.canvas,aR.container);G(E,aR.scope,aR);if(!aT){W(aR)}}};this.detachAll=function(){while(aE.connections.length>0){aE.detach(aE.connections[0])}};this.detachFrom=function(aR){var aS=[];for(var aQ=0;aQ=0){aE.connections.splice(aQ,1)}};this.getElement=function(){return aD};this.getUuid=function(){return az};this.makeInPlaceCopy=function(){var aQ=ah({anchor:aE.anchor,source:aD,paintStyle:this.paintStyle,endpoint:aC});return aQ};this.isConnectedTo=function(aS){var aR=false;if(aS){for(var aQ=0;aQ=aK)};this.setDragAllowedWhenFull=function(aQ){aA=aQ};this.setPaintStyle=this.setPaintStyle;this.setHoverPaintStyle=this.setHoverPaintStyle;this.setStyle=aE.setPaintStyle;this.equals=function(aQ){return this.anchor.equals(aQ.anchor)};this.paint=function(aT){aT=aT||{};var aX=aT.timestamp;if(!aX||aE.timestamp!==aX){var aW=aT.anchorPoint,aS=aT.canvas,aU=aT.connectorPaintStyle;if(aW==null){var a2=aT.offset||P[ax];var aQ=aT.dimensions||J[ax];if(a2==null||aQ==null){y({elId:ax,timestamp:aX});a2=P[ax];aQ=J[ax]}var aR={xy:[a2.left,a2.top],wh:aQ,element:aE,timestamp:aX};if(aE.anchor.isDynamic){if(aE.connections.length>0){var aZ=aE.connections[0];var a1=aZ.endpoints[0]==aE?1:0;var aV=a1==0?aZ.sourceId:aZ.targetId;var aY=P[aV],a0=J[aV];aR.txy=[aY.left,aY.top];aR.twh=a0;aR.tElement=aZ.endpoints[a1]}}aW=aE.anchor.compute(aR)}aC.paint(aW,aE.anchor.getOrientation(),aS||aE.canvas,aE.paintStyleInUse,aU||aE.paintStyleInUse);aE.timestamp=aX}};this.repaint=this.paint;this.removeConnection=this.detach;if(aP.isSource&&q.CurrentLibrary.isDragSupported(aD)){var aJ=null,aF=null,aI=null,aq=false,at=null;var av=function(){aI=aE.connectorSelector();if(aE.isFull()&&!aA){return false}y({elId:ax});au=aE.makeInPlaceCopy();au.paint();aJ=document.createElement("div");var aU=b(aJ);L(aJ,aE.container);var aW=ap(aU);y({elId:aW});f(b(aE.canvas),"dragId",aW);f(b(aE.canvas),"elId",ax);var aR=new B({reference:aE.anchor,referenceCanvas:aE.canvas});aN=ah({paintStyle:{fillStyle:"rgba(0,0,0,0)"},endpoint:aC,anchor:aR,source:aU});if(aI==null){aE.anchor.locked=true;aI=an({sourceEndpoint:aE,targetEndpoint:aN,source:b(aD),target:b(aJ),anchors:[aE.anchor,aR],paintStyle:aP.connectorStyle,hoverPaintStyle:aP.connectorHoverStyle,backgroundPaintStyle:aP.connectorBackgroundStyle,connector:aP.connector,overlays:aP.connectorOverlays});aI.setHover(false)}else{aq=true;aI.setHover(false);aw(b(au.canvas));var aQ=aI.sourceId==ax?0:1;aI.floatingAnchorIndex=aQ;aE.detachFromConnection(aI);var aV=b(aE.canvas);var aT=q.CurrentLibrary.getDragScope(aV);f(aV,"originalScope",aT);var aS="scope_"+(new Date()).getTime();if(aQ==0){at=[aI.source,aI.sourceId,aM,aT];aI.source=b(aJ);aI.sourceId=aW}else{at=[aI.target,aI.targetId,aM,aT];aI.target=b(aJ);aI.targetId=aW}q.CurrentLibrary.setDragScope(aM,aS);aI.endpoints[aQ==0?1:0].anchor.locked=true;aI.suspendedEndpoint=aI.endpoints[aQ];aI.endpoints[aQ]=aN}S[aW]=aI;aN.addConnection(aI);h(ab,aW,aN);x.currentlyDragging=true};var aL=aP.dragOptions||{};var aG=q.extend({},q.CurrentLibrary.defaultDragOptions);aL=q.extend(aG,aL);aL.scope=aL.scope||aE.scope;var aH=q.CurrentLibrary.dragEvents.start;var aO=q.CurrentLibrary.dragEvents.stop;var ay=q.CurrentLibrary.dragEvents.drag;aL[aH]=ag(aL[aH],av);aL[ay]=ag(aL[ay],function(){var aQ=q.CurrentLibrary.getUIPosition(arguments);q.CurrentLibrary.setOffset(aJ,aQ);am(b(aJ),aQ)});aL[aO]=ag(aL[aO],function(){G(ab,aF,aN);K([aJ,aN.canvas],aD);X(au.canvas,aD);var aQ=aI.floatingAnchorIndex==null?1:aI.floatingAnchorIndex;aI.endpoints[aQ==0?1:0].anchor.locked=false;if(aI.endpoints[aQ]==aN){if(aq&&aI.suspendedEndpoint){if(aQ==0){aI.source=at[0];aI.sourceId=at[1]}else{aI.target=at[0];aI.targetId=at[1]}q.CurrentLibrary.setDragScope(at[2],at[3]);aI.endpoints[aQ]=aI.suspendedEndpoint;if(aB){aI.floatingAnchorIndex=null;aI.suspendedEndpoint.addConnection(aI);q.repaint(at[1])}else{aI.endpoints[aQ==0?1:0].detach(aI)}}else{X(aI.canvas,aE.container);aE.detachFromConnection(aI)}}aE.anchor.locked=false;aE.paint();aI.repaint();aI=null;delete au;delete ab[aN.elementId];delete aN;x.currentlyDragging=false});var aM=b(aE.canvas);q.CurrentLibrary.initDraggable(aM,aL)}var aw=function(aT){if(aP.isTarget&&q.CurrentLibrary.isDropSupported(aD)){var aQ=aP.dropOptions||x.Defaults.DropOptions||q.Defaults.DropOptions;aQ=q.extend({},aQ);aQ.scope=aQ.scope||aE.scope;var aW=null;var aU=q.CurrentLibrary.dragEvents.drop;var aV=q.CurrentLibrary.dragEvents.over;var aR=q.CurrentLibrary.dragEvents.out;var aS=function(){var a5=b(q.CurrentLibrary.getDragObject(arguments));var aX=n(a5,"dragId");var aZ=n(a5,"elId");var a4=n(a5,"originalScope");if(a4){q.CurrentLibrary.setDragScope(a5,a4)}var a1=S[aX];var a2=a1.floatingAnchorIndex==null?1:a1.floatingAnchorIndex,a3=a2==0?1:0;if(!aE.isFull()&&!(a2==0&&!aE.isSource)&&!(a2==1&&!aE.isTarget)){if(a2==0){a1.source=aD;a1.sourceId=ax}else{a1.target=aD;a1.targetId=ax}a1.endpoints[a2].detachFromConnection(a1);if(a1.suspendedEndpoint){a1.suspendedEndpoint.detachFromConnection(a1)}a1.endpoints[a2]=aE;aE.addConnection(a1);if(!a1.suspendedEndpoint){h(E,a1.scope,a1);I(aD,aP.draggable,{})}else{var a0=a1.suspendedEndpoint.getElement(),aY=a1.suspendedEndpoint.elementId;x.fireUpdate("jsPlumbConnectionDetached",{source:a2==0?a0:a1.source,target:a2==1?a0:a1.target,sourceId:a2==0?aY:a1.sourceId,targetId:a2==1?aY:a1.targetId,sourceEndpoint:a2==0?a1.suspendedEndpoint:a1.endpoints[0],targetEndpoint:a2==1?a1.suspendedEndpoint:a1.endpoints[1],connection:a1})}q.repaint(aZ);x.fireUpdate("jsPlumbConnection",{source:a1.source,target:a1.target,sourceId:a1.sourceId,targetId:a1.targetId,sourceEndpoint:a1.endpoints[0],targetEndpoint:a1.endpoints[1],connection:a1})}x.currentlyDragging=false;delete S[aX]};aQ[aU]=ag(aQ[aU],aS);aQ[aV]=ag(aQ[aV],function(){var aY=q.CurrentLibrary.getDragObject(arguments);var a0=n(b(aY),"dragId");var aZ=S[a0];var aX=aZ.floatingAnchorIndex==null?1:aZ.floatingAnchorIndex;aZ.endpoints[aX].anchor.over(aE.anchor)});aQ[aR]=ag(aQ[aR],function(){var aY=q.CurrentLibrary.getDragObject(arguments);var a0=n(b(aY),"dragId");var aZ=S[a0];var aX=aZ.floatingAnchorIndex==null?1:aZ.floatingAnchorIndex;aZ.endpoints[aX].anchor.out()});q.CurrentLibrary.initDroppable(aT,aQ)}};aw(b(aE.canvas));return aE}};var q=window.jsPlumb=new o();q.getInstance=function(s){var r=new o(s);return r}})();(function(){var b=!!!document.createElement("canvas").getContext;var a=function(c,f,e,d){return function(){return jsPlumb.makeAnchor(c,f,e,d)}};jsPlumb.Anchors.TopCenter=a(0.5,0,0,-1);jsPlumb.Anchors.BottomCenter=a(0.5,1,0,1);jsPlumb.Anchors.LeftMiddle=a(0,0.5,-1,0);jsPlumb.Anchors.RightMiddle=a(1,0.5,1,0);jsPlumb.Anchors.Center=a(0.5,0.5,0,0);jsPlumb.Anchors.TopRight=a(1,0,0,-1);jsPlumb.Anchors.BottomRight=a(1,1,0,1);jsPlumb.Anchors.TopLeft=a(0,0,0,-1);jsPlumb.Anchors.BottomLeft=a(0,1,0,1);jsPlumb.Defaults.DynamicAnchors=function(){return jsPlumb.makeAnchors(["TopCenter","RightMiddle","BottomCenter","LeftMiddle"])};jsPlumb.Anchors.AutoDefault=function(){return jsPlumb.makeDynamicAnchor(jsPlumb.Defaults.DynamicAnchors())};jsPlumb.Connectors.Straight=function(){var q=this;var k=null;var e,l,o,n,m,f,p,h,g,d,c;this.compute=function(u,I,E,r,B,t){var H=Math.abs(u[0]-I[0]);var A=Math.abs(u[1]-I[1]);var C=false,v=false;var z=0.45*H,s=0.45*A;H*=1.9;A*=1.9;var F=Math.min(u[0],I[0])-z;var D=Math.min(u[1],I[1])-s;var G=Math.max(2*B,t);if(H0?1:-1;var v=Math.abs(w*Math.sin(f));if(g>c){v=v*-1}var r=Math.abs(w*Math.cos(f));if(h>d){r=r*-1}return{x:u.x+(t*r),y:u.y+(t*v)}};this.perpendicularToPathAt=function(u,v,A){var w=q.pointAlongPathFrom(u,A);var t=q.gradientAtPoint(w.location);var s=Math.atan(-1/t);var z=v/2*Math.sin(s);var r=v/2*Math.cos(s);return[{x:w.x+r,y:w.y+z},{x:w.x-r,y:w.y-z}]};this.createGradient=function(s,r){return r.createLinearGradient(s[4],s[5],s[6],s[7])}};jsPlumb.Connectors.Bezier=function(g){var r=this;this.majorAnchor=150;if(g){if(g.constructor==Number){this.majorAnchor=g}else{if(g.curviness){this.majorAnchor=g.curviness}}}this.minorAnchor=10;var l=null;this._findControlPoint=function(B,s,w,z,t){var y=z.getOrientation(),A=t.getOrientation();var v=y[0]!=A[0]||y[1]==A[1];var u=[];var C=r.majorAnchor,x=r.minorAnchor;if(!v){if(y[0]==0){u.push(s[0]o){o=x}if(A<0){f+=A;var B=Math.abs(A);o+=B;q[0]+=B;m+=B;d+=B;p[0]+=B}var J=Math.min(h,c);var H=Math.min(q[1],p[1]);var w=Math.min(J,H);var C=Math.max(h,c);var z=Math.max(q[1],p[1]);var u=Math.max(C,z);if(u>k){k=u}if(w<0){e+=w;var y=Math.abs(w);k+=y;q[1]+=y;h+=y;c+=y;p[1]+=y}if(G&&o1?q:{x:s[0].x+((s[1].x-s[0].x)/2),y:s[0].y+((s[1].y-s[0].y)/2)};var A=p.x-l.x,x=p.y-l.y;q.x+=A;q.y+=x;k.x+=A;k.y+=x;s[0].x+=A;s[0].y+=x;s[1].x+=A;s[1].y+=x;r.x+=A;r.y+=x}var w=Math.min(r.x,s[0].x,s[1].x);var u=Math.max(r.x,s[0].x,s[1].x);var v=Math.min(r.y,s[0].y,s[1].y);var t=Math.max(r.y,s[0].y,s[1].y);z.lineWidth=e.lineWidth;z.beginPath();z.moveTo(r.x,r.y);z.lineTo(s[0].x,s[0].y);z.lineTo(q.x,q.y);z.lineTo(s[1].x,s[1].y);z.lineTo(r.x,r.y);z.closePath();if(e.strokeStyle){z.strokeStyle=e.strokeStyle;z.stroke()}z.fillStyle=e.fillStyle||y.strokeStyle;z.fill();return[w,u,v,t]}};jsPlumb.Overlays.PlainArrow=function(d){d=d||{};var c=jsPlumb.extend(d,{foldback:1});jsPlumb.Overlays.Arrow.call(this,c)};jsPlumb.Overlays.Diamond=function(e){e=e||{};var c=e.length||40;var d=jsPlumb.extend(e,{length:c/2,foldback:2});jsPlumb.Overlays.Arrow.call(this,d)};jsPlumb.Overlays.Label=function(l){this.labelStyle=l.labelStyle||jsPlumb.Defaults.LabelStyle;this.label=l.label;this.connection=l.connection;var d=this;var c=null,k=null,f=null,g=null;this.location=l.location||0.5;this.cachedDimensions=null;var h=function(n){if(d.cachedDimensions){return d.cachedDimensions}f=typeof d.label=="function"?d.label(d):d.label;var r={};if(f){var m=f.split(/\n|\r\n/);n.save();if(d.labelStyle.font){n.font=d.labelStyle.font}var o=e(m,n);var p=n.measureText("M").width;g=d.labelStyle.padding||0.25;c=o+(2*o*g);k=(m.length*p)+(2*p*g);var q=m.length*p;n.restore();r={width:c,height:k,lines:m,oneLine:p,padding:g,textHeight:q}}if(typeof d.label!="function"){d.cachedDimensions=r}return r};this.computeMaxSize=function(n,m){var o=h(m);return o.width?Math.max(o.width,o.height)*1.5:0};var e=function(o,n){var m=0;for(var q=0;qm){m=p}}return m};this.draw=function(p,o,q){var s=h(o);if(s.width){var r=p.pointOnPath(d.location);if(d.labelStyle.font){o.font=d.labelStyle.font}if(d.labelStyle.fillStyle){o.fillStyle=d.labelStyle.fillStyle}else{o.fillStyle="rgba(0,0,0,0)"}var n=r.x-(s.width/2);var m=r.y-(s.height/2);o.fillRect(n,m,s.width,s.height);if(d.labelStyle.color){o.fillStyle=d.labelStyle.color}o.textBaseline="middle";o.textAlign="center";for(i=0;i0){o.strokeStyle=d.labelStyle.borderStyle||"black";o.strokeRect(n,m,s.width,s.height)}return[n,n+s.width,m,m+s.height]}else{return[0,0,0,0]}}};jsPlumb.Overlays.Image=function(e){var l=this;this.location=e.location||0.5;this.img=new Image();this.connection=e.connection;var m=null;var f=null;var d,c;var k=e.events||{};var h=function(){if(l.ready){window.clearInterval(f);m=document.createElement("img");m.src=l.img.src;m.style.position="absolute";m.style.display="none";m.className="_jsPlumb_overlay";document.body.appendChild(m);for(var n in k){jsPlumb.CurrentLibrary.bind(m,n,k[n])}if(d&&c){g(d,c);c=null;d=null}}};this.img.onload=function(){l.ready=true};this.img.src=e.src||e.url;f=window.setInterval(h,250);this.computeMaxSize=function(o,n){return[l.img.width,l.img.height]};var g=function(q,v,u){if(m!=null){var r=q.pointOnPath(l.location);var p=jsPlumb.CurrentLibrary.getElementObject(v.canvas);var w=jsPlumb.CurrentLibrary.getOffset(p);var t=r.x-(l.img.width/2);var s=r.y-(l.img.height/2);var n={left:w.left+t,top:w.top+s};jsPlumb.CurrentLibrary.setOffset(m,n);m.style.display="block";return[t,t+l.img.width,s,s+l.img.height]}};this.draw=function(o,n){if(l.ready){return g(o,n)}else{d=o;c=n;return[0,0,0,0]}}}})();(function(){jsPlumb.Connectors.Flowchart=function(f){f=f||{};var o=this,b=f.minStubLength||30,k=[],h=[],m=[],g=[],a=[],n=[],d,c,q=function(u,t,B,A){var y=0;for(var s=0;s=t){r=u;s=(t-m[u][0])/a[u];break}}return{segment:k[r],proportion:s,index:r}};this.compute=function(u,J,F,r,C,s){k=[];h=[];a=[];g=[];segmentProportionals=[];d=J[0]u[0]?u[0]+((1-y)*t)-z:u[2]+(y*t)+z,y:r==0?u[3]:u[3]>u[1]?u[1]+((1-y)*t)-z:u[3]+(y*t)+z,segmentInfo:w};return x};this.perpendicularToPathAt=function(u,v,A){var w=o.pointAlongPathFrom(u,A);var t=h[w.segmentInfo.index];var s=Math.atan(-1/t);var z=v/2*Math.sin(s);var r=v/2*Math.cos(s);return[{x:w.x+r,y:w.y+z},{x:w.x-r,y:w.y-z}]}}})();(function(){if(!Array.prototype.indexOf){Array.prototype.indexOf=function(w,t,y){for(var x=+t||0,u=this.length;x0?1:-1}}var b={subtract:function(n,m){return{x:n.x-m.x,y:n.y-m.y}},dotProduct:function(n,m){return n.x*m.x+n.y*m.y},square:function(m){return Math.sqrt(m.x*m.x+m.y*m.y)},scale:function(n,m){return{x:n.x*m,y:n.y*m}}},d=Math.pow(2,-65),h=function(y,x){for(var s=[],v=x.length-1,r=2*v-1,t=[],w=[],o=[],p=[],q=[[1,0.6,0.3,0.1],[0.4,0.6,0.6,0.4],[0.1,0.3,0.6,1]],u=0;u<=v;u++){t[u]=b.subtract(x[u],y)}for(u=0;u<=v-1;u++){w[u]=b.subtract(x[u+1],x[u]);w[u]=b.scale(w[u],3)}for(u=0;u<=v-1;u++){for(var n=0;n<=v;n++){o[u]||(o[u]=[]);o[u][n]=b.dotProduct(w[u],t[n])}}for(u=0;u<=r;u++){p[u]||(p[u]=[]);p[u].y=0;p[u].x=parseFloat(u)/r}r=v-1;for(t=0;t<=v+r;t++){w=Math.min(t,v);for(u=Math.max(0,t-r);u<=w;u++){j=t-u;p[u+j].y+=o[j][u]*q[j][u]}}v=x.length-1;p=l(p,2*v-1,s,0);r=b.subtract(y,x[0]);o=b.square(r);for(u=q=0;u=64){y[0]=(E[0].x+E[D].x)/2;return 1}var s,r,p;v=E[0].y-E[D].y;w=E[D].x-E[0].x;A=E[0].x*E[D].y-E[D].x*E[0].y;t=max_distance_below=0;for(r=1;rt){t=p}else{if(p0?1:-1,s=null;o