function Pi(g,x){for(var w=0;wE[U]})}}}return Object.freeze(Object.defineProperty(g,Symbol.toStringTag,{value:"Module"}))}var He={},Si={get exports(){return He},set exports(g){He=g}};(function(g,x){(function(w,E){g.exports=E()})(window,function(){return function(w){var E={};function U(O){if(E[O])return E[O].exports;var z=E[O]={i:O,l:!1,exports:{}};return w[O].call(z.exports,z,z.exports,U),z.l=!0,z.exports}return U.m=w,U.c=E,U.d=function(O,z,f){U.o(O,z)||Object.defineProperty(O,z,{enumerable:!0,get:f})},U.r=function(O){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(O,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(O,"__esModule",{value:!0})},U.t=function(O,z){if(1&z&&(O=U(O)),8&z||4&z&&typeof O=="object"&&O&&O.__esModule)return O;var f=Object.create(null);if(U.r(f),Object.defineProperty(f,"default",{enumerable:!0,value:O}),2&z&&typeof O!="string")for(var o in O)U.d(f,o,function(V){return O[V]}.bind(null,o));return f},U.n=function(O){var z=O&&O.__esModule?function(){return O.default}:function(){return O};return U.d(z,"a",z),z},U.o=function(O,z){return Object.prototype.hasOwnProperty.call(O,z)},U.p="",U(U.s=1)}([function(w,E,U){var O,z;O=[U(2)],(z=function(f){function o(t){if(o.is(t,"function"))return V?t():f.on("raphael.DOMload",t);if(o.is(t,bt))return o._engine.create[H](o,t.splice(0,3+o.is(t[0],ct))).add(t);var e=Array.prototype.slice.call(arguments,0);if(o.is(e[e.length-1],"function")){var i=e.pop();return V?i.call(o._engine.create[H](o,e)):f.on("raphael.DOMload",function(){i.call(o._engine.create[H](o,e))})}return o._engine.create[H](o,arguments)}o.version="2.3.0",o.eve=f;var V,q,N=/[, ]+/,ot={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},mt=/\{(\d+)\}/g,lt="hasOwnProperty",tt={doc:document,win:window},gt={was:Object.prototype[lt].call(tt.win,"Raphael"),is:tt.win.Raphael},J=function(){this.ca=this.customAttributes={}},H="apply",j="concat",rt="ontouchstart"in window||window.TouchEvent||window.DocumentTouch&&document instanceof DocumentTouch,$="",I=" ",k=String,Z="split",st="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[Z](I),xt={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},at=k.prototype.toLowerCase,K=Math,nt=K.max,W=K.min,wt=K.abs,kt=K.pow,_t=K.PI,ct="number",bt="array",$t=Object.prototype.toString,l=(o._ISURL=/^url\(['"]?(.+?)['"]?\)$/i,/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i),a={NaN:1,Infinity:1,"-Infinity":1},s=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,u=K.round,y=parseFloat,v=parseInt,_=k.prototype.toUpperCase,A=o._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0,class:""},b=o._availableAnimAttrs={blur:ct,"clip-rect":"csv",cx:ct,cy:ct,fill:"colour","fill-opacity":ct,"font-size":ct,height:ct,opacity:ct,path:"path",r:ct,rx:ct,ry:ct,stroke:"colour","stroke-opacity":ct,"stroke-width":ct,transform:"transform",width:ct,x:ct,y:ct},B=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,Q={hs:1,rg:1},G=/,?([achlmqrstvxz]),?/gi,it=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,pt=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,dt=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi,ut=(o._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,{}),At=function(t,e){return y(t)-y(e)},Bt=function(t){return t},ft=o._rectPath=function(t,e,i,r,n){return n?[["M",t+n,e],["l",i-2*n,0],["a",n,n,0,0,1,n,n],["l",0,r-2*n],["a",n,n,0,0,1,-n,n],["l",2*n-i,0],["a",n,n,0,0,1,-n,-n],["l",0,2*n-r],["a",n,n,0,0,1,n,-n],["z"]]:[["M",t,e],["l",i,0],["l",0,r],["l",-i,0],["z"]]},Tt=function(t,e,i,r){return r==null&&(r=i),[["M",t,e],["m",0,-r],["a",i,r,0,1,1,0,2*r],["a",i,r,0,1,1,0,-2*r],["z"]]},Et=o._getPath={path:function(t){return t.attr("path")},circle:function(t){var e=t.attrs;return Tt(e.cx,e.cy,e.r)},ellipse:function(t){var e=t.attrs;return Tt(e.cx,e.cy,e.rx,e.ry)},rect:function(t){var e=t.attrs;return ft(e.x,e.y,e.width,e.height,e.r)},image:function(t){var e=t.attrs;return ft(e.x,e.y,e.width,e.height)},text:function(t){var e=t._getBBox();return ft(e.x,e.y,e.width,e.height)},set:function(t){var e=t._getBBox();return ft(e.x,e.y,e.width,e.height)}},Ot=o.mapPath=function(t,e){if(!e)return t;var i,r,n,h,p,c,d;for(n=0,p=(t=ke(t)).length;n',(Mt=Yt.firstChild).style.behavior="url(#default#VML)",!Mt||typeof Mt.adj!="object")return o.type=$;Yt=null}function Rt(t){if(typeof t=="function"||Object(t)!==t)return t;var e=new t.constructor;for(var i in t)t[lt](i)&&(e[i]=Rt(t[i]));return e}o.svg=!(o.vml=o.type=="VML"),o._Paper=J,o.fn=q=J.prototype=o.prototype,o._id=0,o.is=function(t,e){return(e=at.call(e))=="finite"?!a[lt](+t):e=="array"?t instanceof Array:e=="null"&&t===null||e==typeof t&&t!==null||e=="object"&&t===Object(t)||e=="array"&&Array.isArray&&Array.isArray(t)||$t.call(t).slice(8,-1).toLowerCase()==e},o.angle=function(t,e,i,r,n,h){if(n==null){var p=t-i,c=e-r;return p||c?(180+180*K.atan2(-c,-p)/_t+360)%360:0}return o.angle(t,e,n,h)-o.angle(i,r,n,h)},o.rad=function(t){return t%360*_t/180},o.deg=function(t){return Math.round(180*t/_t%360*1e3)/1e3},o.snapTo=function(t,e,i){if(i=o.is(i,"finite")?i:10,o.is(t,bt)){for(var r=t.length;r--;)if(wt(t[r]-e)<=i)return t[r]}else{var n=e%(t=+t);if(nt-i)return e-n+t}return e};var Gt,me;o.createUUID=(Gt=/[xy]/g,me=function(t){var e=16*K.random()|0;return(t=="x"?e:3&e|8).toString(16)},function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(Gt,me).toUpperCase()}),o.setWindow=function(t){f("raphael.setWindow",o,tt.win,t),tt.win=t,tt.doc=tt.win.document,o._engine.initWin&&o._engine.initWin(tt.win)};var Ht=function(t){if(o.vml){var e,i=/^\s+|\s+$/g;try{var r=new ActiveXObject("htmlfile");r.write(""),r.close(),e=r.body}catch{e=createPopup().document.body}var n=e.createTextRange();Ht=Nt(function(p){try{e.style.color=k(p).replace(i,$);var c=n.queryCommandValue("ForeColor");return"#"+("000000"+(c=(255&c)<<16|65280&c|(16711680&c)>>>16).toString(16)).slice(-6)}catch{return"none"}})}else{var h=tt.doc.createElement("i");h.title="Raphaël Colour Picker",h.style.display="none",tt.doc.body.appendChild(h),Ht=Nt(function(p){return h.style.color=p,tt.doc.defaultView.getComputedStyle(h,$).getPropertyValue("color")})}return Ht(t)},ae=function(){return"hsb("+[this.h,this.s,this.b]+")"},oe=function(){return"hsl("+[this.h,this.s,this.l]+")"},_e=function(){return this.hex},he=function(t,e,i){if(e==null&&o.is(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(i=t.b,e=t.g,t=t.r),e==null&&o.is(t,"string")){var r=o.getRGB(t);t=r.r,e=r.g,i=r.b}return(t>1||e>1||i>1)&&(t/=255,e/=255,i/=255),[t,e,i]},Me=function(t,e,i,r){var n={r:t*=255,g:e*=255,b:i*=255,hex:o.rgb(t,e,i),toString:_e};return o.is(r,"finite")&&(n.opacity=r),n};function Nt(t,e,i){return function r(){var n=Array.prototype.slice.call(arguments,0),h=n.join("␀"),p=r.cache=r.cache||{},c=r.count=r.count||[];return p[lt](h)?(function(d,m){for(var C=0,X=d.length;C=1e3&&delete p[c.shift()],c.push(h),p[h]=t[H](e,n),i?i(p[h]):p[h])}}o.color=function(t){var e;return o.is(t,"object")&&"h"in t&&"s"in t&&"b"in t?(e=o.hsb2rgb(t),t.r=e.r,t.g=e.g,t.b=e.b,t.hex=e.hex):o.is(t,"object")&&"h"in t&&"s"in t&&"l"in t?(e=o.hsl2rgb(t),t.r=e.r,t.g=e.g,t.b=e.b,t.hex=e.hex):(o.is(t,"string")&&(t=o.getRGB(t)),o.is(t,"object")&&"r"in t&&"g"in t&&"b"in t?(e=o.rgb2hsl(t),t.h=e.h,t.s=e.s,t.l=e.l,e=o.rgb2hsb(t),t.v=e.b):(t={hex:"none"}).r=t.g=t.b=t.h=t.s=t.v=t.l=-1),t.toString=_e,t},o.hsb2rgb=function(t,e,i,r){var n,h,p,c,d;return this.is(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(i=t.b,e=t.s,r=t.o,t=t.h),c=(d=i*e)*(1-wt((t=(t*=360)%360/60)%2-1)),n=h=p=i-d,Me(n+=[d,c,0,0,c,d][t=~~t],h+=[c,d,d,c,0,0][t],p+=[0,0,c,d,d,c][t],r)},o.hsl2rgb=function(t,e,i,r){var n,h,p,c,d;return this.is(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(i=t.l,e=t.s,t=t.h),(t>1||e>1||i>1)&&(t/=360,e/=100,i/=100),c=(d=2*e*(i<.5?i:1-i))*(1-wt((t=(t*=360)%360/60)%2-1)),n=h=p=i-d/2,Me(n+=[d,c,0,0,c,d][t=~~t],h+=[c,d,d,c,0,0][t],p+=[0,0,c,d,d,c][t],r)},o.rgb2hsb=function(t,e,i){var r,n;return t=(i=he(t,e,i))[0],e=i[1],i=i[2],{h:(((n=(r=nt(t,e,i))-W(t,e,i))==0?null:r==t?(e-i)/n:r==e?(i-t)/n+2:(t-e)/n+4)+360)%6*60/360,s:n==0?0:n/r,b:r,toString:ae}},o.rgb2hsl=function(t,e,i){var r,n,h,p;return t=(i=he(t,e,i))[0],e=i[1],i=i[2],r=((n=nt(t,e,i))+(h=W(t,e,i)))/2,{h:(((p=n-h)==0?null:n==t?(e-i)/p:n==e?(i-t)/p+2:(t-e)/p+4)+360)%6*60/360,s:p==0?0:r<.5?p/(2*r):p/(2-2*r),l:r,toString:oe}},o._path2string=function(){return this.join(",").replace(G,"$1")},o._preload=function(t,e){var i=tt.doc.createElement("img");i.style.cssText="position:absolute;left:-9999em;top:-9999em",i.onload=function(){e.call(this),this.onload=null,tt.doc.body.removeChild(this)},i.onerror=function(){tt.doc.body.removeChild(this)},tt.doc.body.appendChild(i),i.src=t};function Wt(){return this.hex}function le(t,e){for(var i=[],r=0,n=t.length;n-2*!e>r;r+=2){var h=[{x:+t[r-2],y:+t[r-1]},{x:+t[r],y:+t[r+1]},{x:+t[r+2],y:+t[r+3]},{x:+t[r+4],y:+t[r+5]}];e?r?n-4==r?h[3]={x:+t[0],y:+t[1]}:n-2==r&&(h[2]={x:+t[0],y:+t[1]},h[3]={x:+t[2],y:+t[3]}):h[0]={x:+t[n-2],y:+t[n-1]}:n-4==r?h[3]=h[2]:r||(h[0]={x:+t[r],y:+t[r+1]}),i.push(["C",(-h[0].x+6*h[1].x+h[2].x)/6,(-h[0].y+6*h[1].y+h[2].y)/6,(h[1].x+6*h[2].x-h[3].x)/6,(h[1].y+6*h[2].y-h[3].y)/6,h[2].x,h[2].y])}return i}o.getRGB=Nt(function(t){if(!t||(t=k(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:Wt};if(t=="none")return{r:-1,g:-1,b:-1,hex:"none",toString:Wt};!Q[lt](t.toLowerCase().substring(0,2))&&t.charAt()!="#"&&(t=Ht(t));var e,i,r,n,h,p,c=t.match(l);return c?(c[2]&&(r=v(c[2].substring(5),16),i=v(c[2].substring(3,5),16),e=v(c[2].substring(1,3),16)),c[3]&&(r=v((h=c[3].charAt(3))+h,16),i=v((h=c[3].charAt(2))+h,16),e=v((h=c[3].charAt(1))+h,16)),c[4]&&(p=c[4][Z](B),e=y(p[0]),p[0].slice(-1)=="%"&&(e*=2.55),i=y(p[1]),p[1].slice(-1)=="%"&&(i*=2.55),r=y(p[2]),p[2].slice(-1)=="%"&&(r*=2.55),c[1].toLowerCase().slice(0,4)=="rgba"&&(n=y(p[3])),p[3]&&p[3].slice(-1)=="%"&&(n/=100)),c[5]?(p=c[5][Z](B),e=y(p[0]),p[0].slice(-1)=="%"&&(e*=2.55),i=y(p[1]),p[1].slice(-1)=="%"&&(i*=2.55),r=y(p[2]),p[2].slice(-1)=="%"&&(r*=2.55),(p[0].slice(-3)=="deg"||p[0].slice(-1)=="°")&&(e/=360),c[1].toLowerCase().slice(0,4)=="hsba"&&(n=y(p[3])),p[3]&&p[3].slice(-1)=="%"&&(n/=100),o.hsb2rgb(e,i,r,n)):c[6]?(p=c[6][Z](B),e=y(p[0]),p[0].slice(-1)=="%"&&(e*=2.55),i=y(p[1]),p[1].slice(-1)=="%"&&(i*=2.55),r=y(p[2]),p[2].slice(-1)=="%"&&(r*=2.55),(p[0].slice(-3)=="deg"||p[0].slice(-1)=="°")&&(e/=360),c[1].toLowerCase().slice(0,4)=="hsla"&&(n=y(p[3])),p[3]&&p[3].slice(-1)=="%"&&(n/=100),o.hsl2rgb(e,i,r,n)):((c={r:e,g:i,b:r,toString:Wt}).hex="#"+(16777216|r|i<<8|e<<16).toString(16).slice(1),o.is(n,"finite")&&(c.opacity=n),c)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:Wt}},o),o.hsb=Nt(function(t,e,i){return o.hsb2rgb(t,e,i).hex}),o.hsl=Nt(function(t,e,i){return o.hsl2rgb(t,e,i).hex}),o.rgb=Nt(function(t,e,i){function r(n){return n+.5|0}return"#"+(16777216|r(i)|r(e)<<8|r(t)<<16).toString(16).slice(1)}),o.getColor=function(t){var e=this.getColor.start=this.getColor.start||{h:0,s:1,b:t||.75},i=this.hsb2rgb(e.h,e.s,e.b);return e.h+=.075,e.h>1&&(e.h=0,e.s-=.2,e.s<=0&&(this.getColor.start={h:0,s:1,b:e.b})),i.hex},o.getColor.reset=function(){delete this.start},o.parsePathString=function(t){if(!t)return null;var e=St(t);if(e.arr)return Xt(e.arr);var i={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},r=[];return o.is(t,bt)&&o.is(t[0],bt)&&(r=Xt(t)),r.length||k(t).replace(it,function(n,h,p){var c=[],d=h.toLowerCase();if(p.replace(dt,function(m,C){C&&c.push(+C)}),d=="m"&&c.length>2&&(r.push([h][j](c.splice(0,2))),d="l",h=h=="m"?"l":"L"),d=="r")r.push([h][j](c));else for(;c.length>=i[d]&&(r.push([h][j](c.splice(0,i[d]))),i[d]););}),r.toString=o._path2string,e.arr=Xt(r),r},o.parseTransformString=Nt(function(t){if(!t)return null;var e=[];return o.is(t,bt)&&o.is(t[0],bt)&&(e=Xt(t)),e.length||k(t).replace(pt,function(i,r,n){var h=[];at.call(r),n.replace(dt,function(p,c){c&&h.push(+c)}),e.push([r][j](h))}),e.toString=o._path2string,e},this,function(t){if(!t)return t;for(var e=[],i=0;i1?1:d<0?0:d)/2,C=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],X=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],T=0,L=0;L<12;L++){var F=m*C[L]+m,Y=fe(F,t,i,n,p),R=fe(F,e,r,h,c),M=Y*Y+R*R;T+=X[L]*K.sqrt(M)}return m*T}function be(t,e,i,r,n,h,p,c){if(!(nt(t,i)nt(n,p)||nt(e,r)nt(h,c))){var d=(t-i)*(h-c)-(e-r)*(n-p);if(d){var m=((t*r-e*i)*(n-p)-(t-i)*(n*c-h*p))/d,C=((t*r-e*i)*(h-c)-(e-r)*(n*c-h*p))/d,X=+m.toFixed(2),T=+C.toFixed(2);if(!(X<+W(t,i).toFixed(2)||X>+nt(t,i).toFixed(2)||X<+W(n,p).toFixed(2)||X>+nt(n,p).toFixed(2)||T<+W(e,r).toFixed(2)||T>+nt(e,r).toFixed(2)||T<+W(h,c).toFixed(2)||T>+nt(h,c).toFixed(2)))return{x:m,y:C}}}}function ue(t,e,i){var r=o.bezierBBox(t),n=o.bezierBBox(e);if(!o.isBBoxIntersect(r,n))return i?0:[];for(var h=Vt.apply(0,t),p=Vt.apply(0,e),c=nt(~~(h/5),1),d=nt(~~(p/5),1),m=[],C=[],X={},T=i?0:[],L=0;L=0&&ht<=1.001&&vt>=0&&vt<=1.001&&(i?T++:T.push({x:yt.x,y:yt.y,t1:W(ht,1),t2:W(vt,1)}))}}return T}function we(t,e,i){t=o._path2curve(t),e=o._path2curve(e);for(var r,n,h,p,c,d,m,C,X,T,L=i?0:[],F=0,Y=t.length;Fet||M=t.x&&e<=t.x2&&i>=t.y&&i<=t.y2},o.isBBoxIntersect=function(t,e){var i=o.isPointInsideBBox;return i(e,t.x,t.y)||i(e,t.x2,t.y)||i(e,t.x,t.y2)||i(e,t.x2,t.y2)||i(t,e.x,e.y)||i(t,e.x2,e.y)||i(t,e.x,e.y2)||i(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)},o.pathIntersection=function(t,e){return we(t,e)},o.pathIntersectionNumber=function(t,e){return we(t,e,1)},o.isPointInsidePath=function(t,e,i){var r=o.pathBBox(t);return o.isPointInsideBBox(r,e,i)&&we(t,[["M",e,i],["H",r.x2+10]],1)%2==1},o._removedFactory=function(t){return function(){f("raphael.log",null,"Raphaël: you are calling to method “"+t+"” of removed object",t)}};var Qt=o.pathBBox=function(t){var e=St(t);if(e.bbox)return Rt(e.bbox);if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0};for(var i,r=0,n=0,h=[],p=[],c=0,d=(t=ke(t)).length;c1&&(i*=M=K.sqrt(M),r*=M);var et=i*i,P=r*r,D=(h==p?-1:1)*K.sqrt(wt((et*P-et*R*R-P*Y*Y)/(et*R*R+P*Y*Y))),S=D*i*R/r+(t+c)/2,yt=D*-r*Y/i+(e+d)/2,ht=K.asin(((e-yt)/r).toFixed(9)),vt=K.asin(((d-yt)/r).toFixed(9));(ht=tvt&&(ht-=2*_t),!p&&vt>ht&&(vt-=2*_t)}var ge=vt-ht;if(wt(ge)>X){var Ce=vt,jt=c,Ut=d;vt=ht+X*(p&&vt>ht?1:-1),c=S+i*K.cos(vt),d=yt+r*K.sin(vt),L=Ee(c,d,i,r,n,0,p,jt,Ut,[vt,Ce,S,yt])}ge=vt-ht;var xe=K.cos(ht),ye=K.sin(ht),ze=K.cos(vt),Dt=K.sin(vt),ne=K.tan(ge/4),Fe=4/3*i*ne,li=4/3*r*ne,fi=[t,e],ve=[t+Fe*ye,e-li*xe],ui=[c+Fe*Dt,d-li*ze],ci=[c,d];if(ve[0]=2*fi[0]-ve[0],ve[1]=2*fi[1]-ve[1],m)return[ve,ui,ci][j](L);for(var pi=[],Kt=0,Yi=(L=[ve,ui,ci][j](L).join()[Z](",")).length;Kt"1e12"&&(T=.5),wt(L)>"1e12"&&(L=.5),T>0&&T<1&&(d=ee(t,e,i,r,n,h,p,c,T),Y.push(d.x),F.push(d.y)),L>0&&L<1&&(d=ee(t,e,i,r,n,h,p,c,L),Y.push(d.x),F.push(d.y)),m=h-2*r+e-(c-2*h+r),X=e-r,T=(-(C=2*(r-e)-2*(h-r))+K.sqrt(C*C-4*m*X))/2/m,L=(-C-K.sqrt(C*C-4*m*X))/2/m,wt(T)>"1e12"&&(T=.5),wt(L)>"1e12"&&(L=.5),T>0&&T<1&&(d=ee(t,e,i,r,n,h,p,c,T),Y.push(d.x),F.push(d.y)),L>0&&L<1&&(d=ee(t,e,i,r,n,h,p,c,L),Y.push(d.x),F.push(d.y)),{min:{x:W[H](0,Y),y:W[H](0,F)},max:{x:nt[H](0,Y),y:nt[H](0,F)}}}),ke=o._path2curve=Nt(function(t,e){var i=!e&&St(t);if(!e&&i.curve)return Xt(i.curve);for(var r=ce(t),n=e&&ce(e),h={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},p={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},c=function(D,S,yt){var ht,vt;if(!D)return["C",S.x,S.y,S.x,S.y,S.x,S.y];switch(!(D[0]in{T:1,Q:1})&&(S.qx=S.qy=null),D[0]){case"M":S.X=D[1],S.Y=D[2];break;case"A":D=["C"][j](Ee[H](0,[S.x,S.y][j](D.slice(1))));break;case"S":yt=="C"||yt=="S"?(ht=2*S.x-S.bx,vt=2*S.y-S.by):(ht=S.x,vt=S.y),D=["C",ht,vt][j](D.slice(1));break;case"T":yt=="Q"||yt=="T"?(S.qx=2*S.x-S.qx,S.qy=2*S.y-S.qy):(S.qx=S.x,S.qy=S.y),D=["C"][j](Zt(S.x,S.y,S.qx,S.qy,D[1],D[2]));break;case"Q":S.qx=D[1],S.qy=D[2],D=["C"][j](Zt(S.x,S.y,D[1],D[2],D[3],D[4]));break;case"L":D=["C"][j](pe(S.x,S.y,D[1],D[2]));break;case"H":D=["C"][j](pe(S.x,S.y,D[1],S.y));break;case"V":D=["C"][j](pe(S.x,S.y,S.x,D[1]));break;case"Z":D=["C"][j](pe(S.x,S.y,S.X,S.Y))}return D},d=function(D,S){if(D[S].length>7){D[S].shift();for(var yt=D[S];yt.length;)C[S]="A",n&&(X[S]="A"),D.splice(S++,0,["C"][j](yt.splice(0,6)));D.splice(S,1),Y=nt(r.length,n&&n.length||0)}},m=function(D,S,yt,ht,vt){D&&S&&D[vt][0]=="M"&&S[vt][0]!="M"&&(S.splice(vt,0,["M",ht.x,ht.y]),yt.bx=0,yt.by=0,yt.x=D[vt][1],yt.y=D[vt][2],Y=nt(r.length,n&&n.length||0))},C=[],X=[],T="",L="",F=0,Y=nt(r.length,n&&n.length||0);F.01;)et=Vt(m,C,X,T,L,F,Y,R,D+=(etr){if(e&&!X.start){if(C+=["C"+(m=Ye(h,p,c[1],c[2],c[3],c[4],c[5],c[6],r-T)).start.x,m.start.y,m.m.x,m.m.y,m.x,m.y],n)return C;X.start=C,C=["M"+m.x,m.y+"C"+m.n.x,m.n.y,m.end.x,m.end.y,c[5],c[6]].join(),T+=d,h=+c[5],p=+c[6];continue}if(!t&&!e)return{x:(m=Ye(h,p,c[1],c[2],c[3],c[4],c[5],c[6],r-T)).x,y:m.y,alpha:m.alpha}}T+=d,h=+c[5],p=+c[6]}C+=c.shift()+c}return X.end=C,(m=t?T:e?X:o.findDotsAtSegment(h,p,c[0],c[1],c[2],c[3],c[4],c[5],1)).alpha&&(m={x:m.x,y:m.y,alpha:m.alpha}),m}},ii=Pe(1),ri=Pe(),Se=Pe(0,1);o.getTotalLength=ii,o.getPointAtLength=ri,o.getSubpath=function(t,e,i){if(this.getTotalLength(t)-i<1e-6)return Se(t,e).end;var r=Se(t,i,1);return e?Se(r,e).end:r},Ct.getTotalLength=function(){var t=this.getPath();if(t)return this.node.getTotalLength?this.node.getTotalLength():ii(t)},Ct.getPointAtLength=function(t){var e=this.getPath();if(e)return ri(e,t)},Ct.getPath=function(){var t,e=o._getPath[this.type];if(this.type!="text"&&this.type!="set")return e&&(t=e(this)),t},Ct.getSubpath=function(t,e){var i=this.getPath();if(i)return o.getSubpath(i,t,e)};var Pt=o.easing_formulas={linear:function(t){return t},"<":function(t){return kt(t,1.7)},">":function(t){return kt(t,.48)},"<>":function(t){var e=.48-t/1.04,i=K.sqrt(.1734+e*e),r=i-e,n=-i-e,h=kt(wt(r),1/3)*(r<0?-1:1)+kt(wt(n),1/3)*(n<0?-1:1)+.5;return 3*(1-h)*h*h+h*h*h},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},elastic:function(t){return t==!!t?t:kt(2,-10*t)*K.sin(2*_t*(t-.075)/.3)+1},bounce:function(t){var e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375}};Pt.easeIn=Pt["ease-in"]=Pt["<"],Pt.easeOut=Pt["ease-out"]=Pt[">"],Pt.easeInOut=Pt["ease-in-out"]=Pt["<>"],Pt["back-in"]=Pt.backIn,Pt["back-out"]=Pt.backOut;var Lt=[],ni=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,16)},Ve=function(){for(var t=+new Date,e=0;e1&&!i.next){for(n in C)C[lt](n)&&(L[n]=i.totalOrigin[n]);i.el.attr(L),Le(i.anim,i.el,i.anim.percents[0],null,i.totalOrigin,i.repeat-1)}i.next&&!i.stop&&Le(i.anim,i.el,i.next,null,i.totalOrigin,i.repeat)}}}Lt.length&&ni(Ve)},Ue=function(t){return t>255?255:t<0?0:t};function $i(t,e,i,r,n,h){var p=3*e,c=3*(r-e)-p,d=1-p-c,m=3*i,C=3*(n-i)-m,X=1-m-C;function T(L){return((d*L+c)*L+p)*L}return function(L,F){var Y=function(R,M){var et,P,D,S,yt,ht;for(D=R,ht=0;ht<8;ht++){if(S=T(D)-R,wt(S)P)return P;for(;etS?et=D:P=D,D=(P-et)/2+et}return D}(L,F);return((X*Y+C)*Y+m)*Y}(t,1/(200*h))}function qt(t,e){var i=[],r={};if(this.ms=e,this.times=1,t){for(var n in t)t[lt](n)&&(r[y(n)]=t[n],i.push(y(n)));i.sort(At)}this.anim=r,this.top=i[i.length-1],this.percents=i}function Le(t,e,i,r,n,h){i=y(i);var p,c,d,m,C,X,T=t.ms,L={},F={},Y={};if(r)for(M=0,et=Lt.length;Mr*t.top){i=t.percents[M],C=t.percents[M-1]||0,T=T/t.top*(i-C),m=t.percents[M+1],p=t.anim[i];break}r&&e.attr(t.anim[t.percents[M]])}if(p){if(c)c.initstatus=r,c.start=new Date-c.ms*r;else{for(var P in p)if(p[lt](P)&&(b[lt](P)||e.paper.customAttributes[lt](P)))switch(L[P]=e.attr(P),L[P]==null&&(L[P]=A[P]),F[P]=p[P],b[P]){case ct:Y[P]=(F[P]-L[P])/T;break;case"colour":L[P]=o.getRGB(L[P]);var D=o.getRGB(F[P]);Y[P]={r:(D.r-L[P].r)/T,g:(D.g-L[P].g)/T,b:(D.b-L[P].b)/T};break;case"path":var S=ke(L[P],F[P]),yt=S[1];for(L[P]=S[0],Y[P]=[],M=0,et=L[P].length;Mc&&(c=m)}!t[c+="%"].callback&&(t[c].callback=r)}return new qt(t,e)},Ct.animate=function(t,e,i,r){if(this.removed)return r&&r.call(this),this;var n=t instanceof qt?t:o.animation(t,e,i,r);return Le(n,this,n.percents[0],null,this.attr()),this},Ct.setTime=function(t,e){return t&&e!=null&&this.status(t,W(e,t.ms)/t.ms),this},Ct.status=function(t,e){var i,r,n=[],h=0;if(e!=null)return Le(t,this,-1,W(e,1)),this;for(i=Lt.length;h1)for(var I=0,k=$.length;I.5)-1;tt(y-.5,2)+tt(v-.5,2)>.25&&(v=ot.sqrt(.25-tt(y-.5,2))*Tt+.5)&&v!=.5&&(v=v.toFixed(5)-1e-5*Tt)}return H})).split(/\s*\-\s*/),s=="linear"){var Q=a.shift();if(Q=-q(Q),isNaN(Q))return null;var G=[0,0,ot.cos(f.rad(Q)),ot.sin(f.rad(Q))],it=1/(mt(lt(G[2]),lt(G[3]))||1);G[2]*=it,G[3]*=it,G[2]<0&&(G[0]=-G[2],G[2]=0),G[3]<0&&(G[1]=-G[3],G[3]=0)}var pt=f._parseDots(a);if(!pt)return null;if(u=u.replace(/[\(\)\s,\xb0#]/g,"_"),l.gradient&&u!=l.gradient.id&&(A.defs.removeChild(l.gradient),delete l.gradient),!l.gradient){B=k(s+"Gradient",{id:u}),l.gradient=B,k(B,s=="radial"?{fx:y,fy:v}:{x1:G[0],y1:G[1],x2:G[2],y2:G[3],gradientTransform:l.matrix.invert()}),A.defs.appendChild(B);for(var dt=0,ut=pt.length;dt1?ft.opacity/100:ft.opacity});case"stroke":ft=f.getRGB(_),s.setAttribute(v,ft.hex),v=="stroke"&&ft[o]("opacity")&&k(s,{"stroke-opacity":ft.opacity>1?ft.opacity/100:ft.opacity}),v=="stroke"&&l._.arrows&&("startString"in l._.arrows&&at(l,l._.arrows.startString),"endString"in l._.arrows&&at(l,l._.arrows.endString,1));break;case"gradient":(l.type=="circle"||l.type=="ellipse"||V(_).charAt()!="r")&&Z(l,_);break;case"opacity":u.gradient&&!u[o]("stroke-opacity")&&k(s,{"stroke-opacity":_>1?_/100:_});case"fill-opacity":if(u.gradient){(Tt=f._g.doc.getElementById(s.getAttribute("fill").replace(/^url\(#|\)$/g,H)))&&(Et=Tt.getElementsByTagName("stop"),k(Et[Et.length-1],{"stop-opacity":_}));break}default:v=="font-size"&&(_=N(_,10)+"px");var Ot=v.replace(/(\-.)/g,function(Mt){return Mt.substring(1).toUpperCase()});s.style[Ot]=_,l._.dirty=1,s.setAttribute(v,_)}}wt(l,a),s.style.visibility=y},wt=function(l,a){if(l.type=="text"&&(a[o]("text")||a[o]("font")||a[o]("font-size")||a[o]("x")||a[o]("y"))){var s=l.attrs,u=l.node,y=u.firstChild?N(f._g.doc.defaultView.getComputedStyle(u.firstChild,H).getPropertyValue("font-size"),10):10;if(a[o]("text")){for(s.text=a.text;u.firstChild;)u.removeChild(u.firstChild);for(var v,_=V(a.text).split(` `),A=[],b=0,B=_.length;b"));var oe=Ht.getBoundingClientRect();b.W=y.w=(oe.right-oe.left)/100,b.H=y.h=(oe.bottom-oe.top)/100,b.X=y.x,b.Y=y.y+b.H/2,("x"in s||"y"in s)&&(b.path.v=f.format("m{0},{1}l{2},{1}",ot(y.x*st),ot(y.y*st),ot(y.x*st)+1));for(var _e=["x","y","text","font","font-family","font-weight","font-style","font-size"],he=0,Me=_e.length;he.25&&(dt=N.sqrt(.25-y(pt-.5,2))*(2*(dt>.5)-1)+.5),_=pt+H+dt),j})).split(/\s*\-\s*/),v=="linear"){var A=s.shift();if(A=-q(A),isNaN(A))return null}var b=f._parseDots(s);if(!b)return null;if(a=a.shape||a.node,b.length){a.removeChild(u),u.on=!0,u.method="none",u.color=b[0].color,u.color2=b[b.length-1].color;for(var B=[],Q=0,G=b.length;Q')}}catch{W=function(y){return s.createElement("<"+y+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},f._engine.initWin(f._g.win),f._engine.create=function(){var a=f._getContainer.apply(0,arguments),s=a.container,u=a.height,y=a.width,v=a.x,_=a.y;if(!s)throw new Error("VML container not found.");var A=new f._Paper,b=A.canvas=f._g.doc.createElement("div"),B=b.style;return v=v||0,_=_||0,y=y||512,u=u||342,A.width=y,A.height=u,y==+y&&(y+="px"),u==+u&&(u+="px"),A.coordsize=216e5+H+216e5,A.coordorigin="0 0",A.span=f._g.doc.createElement("span"),A.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",b.appendChild(A.span),B.cssText=f.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",y,u),s==1?(f._g.doc.body.appendChild(b),B.left=v+"px",B.top=_+"px",B.position="absolute"):s.firstChild?s.insertBefore(b,s.firstChild):s.appendChild(b),A.renderfix=function(){},A},f.prototype.clear=function(){f.eve("raphael.clear",this),this.canvas.innerHTML=j,this.span=f._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},f.prototype.remove=function(){for(var a in f.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas),this)this[a]=typeof this[a]=="function"?f._removedFactory(a):null;return!0};var $t=f.st;for(var l in bt)bt[o](l)&&!$t[o](l)&&($t[l]=function(a){return function(){var s=arguments;return this.forEach(function(u){u[a].apply(u,s)})}}(l))}}.apply(E,O))===void 0||(w.exports=z)}])})})(Si);function yi(g,x){if(!g||typeof g=="function")return x;var w={};for(var E in x)w[E]=x[E];for(E in g)g[E]&&(typeof w[E]=="object"?w[E]=yi(w[E],g[E]):w[E]=g[E]);return w}function Vi(g,x){if(typeof Object.create=="function")g.super_=x,g.prototype=Object.create(x.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}});else{g.super_=x;var w=function(){};w.prototype=x.prototype,g.prototype=new w,g.prototype.constructor=g}}var te={defaults:yi,inherits:Vi},Ui={x:0,y:0,"line-width":3,"line-length":50,"text-margin":10,"font-size":14,"font-color":"black","line-color":"black","element-color":"black",fill:"white","yes-text":"yes","no-text":"no","arrow-end":"block",class:"flowchart",scale:1,symbols:{start:{},end:{},condition:{},inputoutput:{},operation:{},subroutine:{},parallel:{}}};function qi(g,x,w){var E,U,O="M{0},{1}";for(E=2,U=2*w.length+2;Egt.x?J=x.x-(x.x-gt.x)/2:J=gt.x-(gt.x-x.x)/2,x.y>gt.y?H=x.y-(x.y-gt.y)/2:H=gt.y-(gt.y-x.y)/2,tt?(J-=mt.getBBox().width/2,H-=g.options["text-margin"]):(J+=g.options["text-margin"],H-=mt.getBBox().height/2)):(J=x.x,H=x.y,tt?(x.x>gt.x?(J-=g.options["text-margin"]/2,lt="end"):J+=g.options["text-margin"]/2,H-=g.options["text-margin"]):(J+=g.options["text-margin"]/2,H+=g.options["text-margin"],x.y>gt.y&&(H-=g.options["text-margin"]*2))),mt.attr({"text-anchor":lt,"font-size":g.options["font-size"],fill:g.options["font-color"],x:J,y:H}),V&&mt.attr({font:V}),q&&mt.attr({"font-family":q}),N&&mt.attr({"font-weight":N})}return o}function Gi(g,x,w,E,U,O,z,f){var o,V,q,N,ot,mt={x:null,y:null,onLine1:!1,onLine2:!1};return o=(f-O)*(w-g)-(z-U)*(E-x),o===0||(V=x-O,q=g-U,N=(z-U)*V-(f-O)*q,ot=(w-g)*V-(E-x)*q,V=N/o,q=ot/o,mt.x=g+V*(w-g),mt.y=x+V*(E-x),V>0&&V<1&&(mt.onLine1=!0),q>0&&q<1&&(mt.onLine2=!0)),mt}var We={drawPath:qi,drawLine:Di,checkLineIntersection:Gi},vi=We,zt=vi.drawLine,Hi=vi.checkLineIntersection;function Ft(g,x,w){this.chart=g,this.group=this.chart.paper.set(),this.symbol=w,this.connectedTo=[],this.symbolType=x.symbolType,this.flowstate=x.flowstate||"future",this.lineStyle=x.lineStyle||{},this.key=x.key||"",this.leftLines=[],this.rightLines=[],this.topLines=[],this.bottomLines=[],this.params=x.params,this.next_direction=x.next&&x.direction_next?x.direction_next:void 0,this.text=this.chart.paper.text(0,0,x.text),x.key&&(this.text.node.id=x.key+"t"),this.text.node.setAttribute("class",this.getAttr("class")+"t"),this.text.attr({"text-anchor":"start",x:this.getAttr("text-margin"),fill:this.getAttr("font-color"),"font-size":this.getAttr("font-size")});var E=this.getAttr("font"),U=this.getAttr("font-family"),O=this.getAttr("font-weight");E&&this.text.attr({font:E}),U&&this.text.attr({"font-family":U}),O&&this.text.attr({"font-weight":O}),x.link&&this.text.attr("href",x.link),x.function&&(this.text.attr({cursor:"pointer"}),this.text.node.addEventListener("click",function(lt){window[x.function](lt,x)},!1)),x.target&&this.text.attr("target",x.target);var z=this.getAttr("maxWidth");if(z){for(var f=x.text.split(" "),o="",V=0,q=f.length;Vz?o+=` `+N:o+=" "+N}this.text.attr("text",o.substring(1))}if(this.group.push(this.text),w){var ot=this.getAttr("text-margin");w.attr({fill:this.getAttr("fill"),stroke:this.getAttr("element-color"),"stroke-width":this.getAttr("line-width"),width:this.text.getBBox().width+2*ot,height:this.text.getBBox().height+2*ot}),w.node.setAttribute("class",this.getAttr("class"));var mt=this.getAttr("roundness");isNaN(mt)||(w.node.setAttribute("ry",mt),w.node.setAttribute("rx",mt)),x.link&&w.attr("href",x.link),x.target&&w.attr("target",x.target),x.function&&(w.node.addEventListener("click",function(lt){window[x.function](lt,x)},!1),w.attr({cursor:"pointer"})),x.key&&(w.node.id=x.key),this.group.push(w),w.insertBefore(this.text),this.text.attr({y:w.getBBox().height/2}),this.initialize()}}Ft.prototype.getAttr=function(g){if(this.chart){var x=this.chart.options?this.chart.options[g]:void 0,w=this.chart.options.symbols?this.chart.options.symbols[this.symbolType][g]:void 0,E;return this.chart.options.flowstate&&this.chart.options.flowstate[this.flowstate]&&(E=this.chart.options.flowstate[this.flowstate][g]),E||w||x}};Ft.prototype.initialize=function(){this.group.transform("t"+this.getAttr("line-width")+","+this.getAttr("line-width")),this.width=this.group.getBBox().width,this.height=this.group.getBBox().height};Ft.prototype.getCenter=function(){return{x:this.getX()+this.width/2,y:this.getY()+this.height/2}};Ft.prototype.getX=function(){return this.group.getBBox().x};Ft.prototype.getY=function(){return this.group.getBBox().y};Ft.prototype.shiftX=function(g){this.group.transform("t"+(this.getX()+g)+","+this.getY())};Ft.prototype.setX=function(g){this.group.transform("t"+g+","+this.getY())};Ft.prototype.shiftY=function(g){this.group.transform("t"+this.getX()+","+(this.getY()+g))};Ft.prototype.setY=function(g){this.group.transform("t"+this.getX()+","+g)};Ft.prototype.getTop=function(){var g=this.getY(),x=this.getX()+this.width/2;return{x,y:g}};Ft.prototype.getBottom=function(){var g=this.getY()+this.height,x=this.getX()+this.width/2;return{x,y:g}};Ft.prototype.getLeft=function(){var g=this.getY()+this.group.getBBox().height/2,x=this.getX();return{x,y:g}};Ft.prototype.getRight=function(){var g=this.getY()+this.group.getBBox().height/2,x=this.getX()+this.group.getBBox().width;return{x,y:g}};Ft.prototype.render=function(){if(this.next){var g=this,x=this.getAttr("line-length");if(this.next_direction==="right"){var w=this.getRight();this.next.isPositioned||(this.next.setY(w.y-this.next.height/2),this.next.shiftX(this.group.getBBox().x+this.width+x),function O(){for(var z=!1,f,o=0,V=g.chart.symbols.length;og.next.getCenter().y&&q<=g.next.width/2){z=!0;break}}if(z){if(g.next.symbolType==="end")return;g.next.setX(f.getX()+f.width+x),O()}}(),this.next.isPositioned=!0,this.next.render())}else if(this.next_direction==="left"){var E=this.getLeft();this.next.isPositioned||(this.next.setY(E.y-this.next.height/2),this.next.shiftX(-(this.group.getBBox().x+this.width+x)),function O(){for(var z=!1,f,o=0,V=g.chart.symbols.length;og.next.getCenter().y&&q<=g.next.width/2){z=!0;break}}if(z){if(g.next.symbolType==="end")return;g.next.setX(f.getX()+f.width+x),O()}}(),this.next.isPositioned=!0,this.next.render())}else{var U=this.getBottom();this.next.isPositioned||(this.next.shiftY(this.getY()+this.height+x),this.next.setX(U.x-this.next.width/2),this.next.isPositioned=!0,this.next.render())}}};Ft.prototype.renderLines=function(){this.next&&(this.next_direction?this.drawLineTo(this.next,this.getAttr("arrow-text")||"",this.next_direction):this.drawLineTo(this.next,this.getAttr("arrow-text")||""))};Ft.prototype.drawLineTo=function(g,x,w){this.connectedTo.indexOf(g)<0&&this.connectedTo.push(g);var E=this.getCenter().x,U=this.getCenter().y,O=this.getRight(),z=this.getBottom(),f=this.getTop(),o=this.getLeft(),V=g.getCenter().x,q=g.getCenter().y,N=g.getTop(),ot=g.getRight(),mt=g.getLeft(),lt=E===V,tt=U===q,gt=Uq||this===g,H=E>V,j=Ert&&(rt=N.x);else if((!w||w==="bottom")&&j)I=Math.max(g.topLines.length,this.bottomLines.length)*10,$=zt(this.chart,z,[{x:z.x,y:z.y+k/2-I},{x:z.x+(z.x-N.x)/2,y:z.y+k/2-I},{x:z.x+(z.x-N.x)/2,y:N.y-k/2-I},{x:N.x,y:N.y-k/2-I},{x:N.x,y:N.y}],x),this.bottomLines.push($),g.topLines.push($),this.bottomStart=!0,g.topEnd=!0,rt=z.x+(z.x-N.x)/2;else if(w&&w==="right"&&H)I=Math.max(g.topLines.length,this.rightLines.length)*10,$=zt(this.chart,O,[{x:O.x+k/2,y:O.y},{x:O.x+k/2,y:N.y-k/2-I},{x:N.x,y:N.y-k/2-I},{x:N.x,y:N.y}],x),this.rightLines.push($),g.topLines.push($),this.rightStart=!0,g.topEnd=!0,rt=O.x+k/2;else if(w&&w==="right"&&j)I=Math.max(g.topLines.length,this.rightLines.length)*10,$=zt(this.chart,O,[{x:N.x,y:O.y-I},{x:N.x,y:N.y-I}],x),this.rightLines.push($),g.topLines.push($),this.rightStart=!0,g.topEnd=!0,rt=O.x+k/2;else if(w&&w==="bottom"&<&&J)I=Math.max(g.topLines.length,this.bottomLines.length)*10,$=zt(this.chart,z,[{x:z.x,y:z.y+k/2-I},{x:O.x+k/2,y:z.y+k/2-I},{x:O.x+k/2,y:N.y-k/2-I},{x:N.x,y:N.y-k/2-I},{x:N.x,y:N.y}],x),this.bottomLines.push($),g.topLines.push($),this.bottomStart=!0,g.topEnd=!0,rt=z.x+k/2;else if(w==="left"&<&&J){var st=o.x-k/2;mt.x_?(B=["L",b.x+Z*2,v],W.splice(a+1,0,B),B=["C",b.x+Z*2,v,b.x,v-Z*4,b.x-Z*2,v],W.splice(a+2,0,B),$.attr("path",W)):(B=["L",b.x-Z*2,v],W.splice(a+1,0,B),B=["C",b.x-Z*2,v,b.x,v-Z*4,b.x+Z*2,v],W.splice(a+2,0,B),$.attr("path",W)):v>A?(B=["L",y,b.y+Z*2],W.splice(a+1,0,B),B=["C",y,b.y+Z*2,y+Z*4,b.y,y,b.y-Z*2],W.splice(a+2,0,B),$.attr("path",W)):(B=["L",y,b.y-Z*2],W.splice(a+1,0,B),B=["C",y,b.y-Z*2,y+Z*4,b.y,y,b.y+Z*2],W.splice(a+2,0,B),$.attr("path",W)),a+=2}}}this.chart.lines.push($),(this.chart.minXFromSymbols===void 0||this.chart.minXFromSymbols>o.x)&&(this.chart.minXFromSymbols=o.x)}(!this.chart.maxXFromLine||this.chart.maxXFromLine&&rt>this.chart.maxXFromLine)&&(this.chart.maxXFromLine=rt)};var se=Ft,mi=se,Wi=te.inherits,Qi=We,Zi=Qi.drawPath;function Ie(g,x){x=x||{},mi.call(this,g,x),this.yes_annotation=x.yes_annotation,this.no_annotation=x.no_annotation,this.textMargin=this.getAttr("text-margin"),this.yes_direction=x.direction_yes,this.no_direction=x.direction_no,!this.no_direction&&this.yes_direction==="right"?this.no_direction="bottom":!this.yes_direction&&this.no_direction==="bottom"&&(this.yes_direction="right"),this.yes_direction=this.yes_direction||"bottom",this.no_direction=this.no_direction||"right",this.text.attr({x:this.textMargin*2});var w=this.text.getBBox().width+3*this.textMargin;w+=w/2;var E=this.text.getBBox().height+2*this.textMargin;E+=E/2,E=Math.max(w*.5,E);var U=w/4,O=E/4;this.text.attr({x:U+this.textMargin/2});var z={x:U,y:O},f=[{x:U-w/4,y:O+E/4},{x:U-w/4+w/2,y:O+E/4+E/2},{x:U-w/4+w,y:O+E/4},{x:U-w/4+w/2,y:O+E/4-E/2},{x:U-w/4,y:O+E/4}],o=Zi(g,z,f);o.attr({stroke:this.getAttr("element-color"),"stroke-width":this.getAttr("line-width"),fill:this.getAttr("fill")}),x.link&&o.attr("href",x.link),x.target&&o.attr("target",x.target),x.key&&(o.node.id=x.key),o.node.setAttribute("class",this.getAttr("class")),this.text.attr({y:o.getBBox().height/2}),this.group.push(o),o.insertBefore(this.text),this.symbol=o,this.initialize()}Wi(Ie,mi);Ie.prototype.render=function(){var g=this;this.yes_direction&&(this[this.yes_direction+"_symbol"]=this.yes_symbol),this.no_direction&&(this[this.no_direction+"_symbol"]=this.no_symbol);var x=this.getAttr("line-length");if(this.bottom_symbol){var w=this.getBottom();this.bottom_symbol.isPositioned||(this.bottom_symbol.shiftY(this.getY()+this.height+x),this.bottom_symbol.setX(w.x-this.bottom_symbol.width/2),this.bottom_symbol.isPositioned=!0,this.bottom_symbol.render())}if(this.right_symbol){var E=this.getRight();this.right_symbol.isPositioned||(this.right_symbol.setY(E.y-this.right_symbol.height/2),this.right_symbol.shiftX(this.group.getBBox().x+this.width+x),function O(){for(var z=!1,f,o=0,V=g.chart.symbols.length;og.right_symbol.getCenter().y&&q<=g.right_symbol.width/2){z=!0;break}}if(z){if(g.right_symbol.symbolType==="end")return;g.right_symbol.setX(f.getX()+f.width+x),O()}}(),this.right_symbol.isPositioned=!0,this.right_symbol.render())}if(this.left_symbol){var U=this.getLeft();this.left_symbol.isPositioned||(this.left_symbol.setY(U.y-this.left_symbol.height/2),this.left_symbol.shiftX(-(this.group.getBBox().x+this.width+x)),function O(){for(var z=!1,f,o=0,V=g.chart.symbols.length;og.left_symbol.getCenter().y&&q<=g.left_symbol.width/2){z=!0;break}}if(z){if(g.left_symbol.symbolType==="end")return;g.left_symbol.setX(f.getX()+f.width+x),O()}}(),this.left_symbol.isPositioned=!0,this.left_symbol.render())}};Ie.prototype.renderLines=function(){this.yes_symbol&&this.drawLineTo(this.yes_symbol,this.yes_annotation?this.yes_annotation:this.getAttr("yes-text"),this.yes_direction),this.no_symbol&&this.drawLineTo(this.no_symbol,this.no_annotation?this.no_annotation:this.getAttr("no-text"),this.no_direction)};var _i=Ie,bi=se,Ji=te.inherits;function Re(g,x){var w=g.paper.rect(0,0,0,0);x=x||{},bi.call(this,g,x,w),this.path1_annotation=x.path1_annotation||"",this.path2_annotation=x.path2_annotation||"",this.path3_annotation=x.path3_annotation||"",this.textMargin=this.getAttr("text-margin"),this.path1_direction="bottom",this.path2_direction="right",this.path3_direction="top",this.params=x.params,x.direction_next==="path1"&&!x[x.direction_next]&&x.next&&(x[x.direction_next]=x.next),x.direction_next==="path2"&&!x[x.direction_next]&&x.next&&(x[x.direction_next]=x.next),x.direction_next==="path3"&&!x[x.direction_next]&&x.next&&(x[x.direction_next]=x.next),x.path1&&x.direction_path1&&x.path2&&!x.direction_path2&&x.path3&&!x.direction_path3?x.direction_path1==="right"?(this.path2_direction="bottom",this.path1_direction="right",this.path3_direction="top"):x.direction_path1==="top"?(this.path2_direction="right",this.path1_direction="top",this.path3_direction="bottom"):x.direction_path1==="left"?(this.path2_direction="right",this.path1_direction="left",this.path3_direction="bottom"):(this.path2_direction="right",this.path1_direction="bottom",this.path3_direction="top"):x.path1&&!x.direction_path1&&x.path2&&x.direction_path2&&x.path3&&!x.direction_path3?x.direction_path2==="right"?(this.path1_direction="bottom",this.path2_direction="right",this.path3_direction="top"):x.direction_path2==="left"?(this.path1_direction="bottom",this.path2_direction="left",this.path3_direction="right"):(this.path1_direction="right",this.path2_direction="bottom",this.path3_direction="top"):x.path1&&!x.direction_path1&&x.path2&&!x.direction_path2&&x.path3&&x.direction_path3?x.direction_path2==="right"?(this.path1_direction="bottom",this.path2_direction="top",this.path3_direction="right"):x.direction_path2==="left"?(this.path1_direction="bottom",this.path2_direction="right",this.path3_direction="left"):(this.path1_direction="right",this.path2_direction="bottom",this.path3_direction="top"):(this.path1_direction=x.direction_path1,this.path2_direction=x.direction_path2,this.path3_direction=x.direction_path3),this.path1_direction=this.path1_direction||"bottom",this.path2_direction=this.path2_direction||"right",this.path3_direction=this.path3_direction||"top",this.initialize()}Ji(Re,bi);Re.prototype.render=function(){this.path1_direction&&(this[this.path1_direction+"_symbol"]=this.path1_symbol),this.path2_direction&&(this[this.path2_direction+"_symbol"]=this.path2_symbol),this.path3_direction&&(this[this.path3_direction+"_symbol"]=this.path3_symbol);var g=this.getAttr("line-length");if(this.bottom_symbol){var x=this.getBottom();this.bottom_symbol.isPositioned||(this.bottom_symbol.shiftY(this.getY()+this.height+g),this.bottom_symbol.setX(x.x-this.bottom_symbol.width/2),this.bottom_symbol.isPositioned=!0,this.bottom_symbol.render())}if(this.top_symbol){var w=this.getTop();this.top_symbol.isPositioned||(this.top_symbol.shiftY(this.getY()-this.top_symbol.height-g),this.top_symbol.setX(w.x+this.top_symbol.width),this.top_symbol.isPositioned=!0,this.top_symbol.render())}var E=this;if(this.left_symbol){var U=this.getLeft();this.left_symbol.isPositioned||(this.left_symbol.setY(U.y-this.left_symbol.height/2),this.left_symbol.shiftX(-(this.group.getBBox().x+this.width+g)),function z(){for(var f=!1,o,V=0,q=E.chart.symbols.length;VE.left_symbol.getCenter().y&&N<=E.left_symbol.width/2){f=!0;break}}if(f){if(E.left_symbol.symbolType==="end")return;E.left_symbol.setX(o.getX()+o.width+g),z()}}(),this.left_symbol.isPositioned=!0,this.left_symbol.render())}if(this.right_symbol){var O=this.getRight();this.right_symbol.isPositioned||(this.right_symbol.setY(O.y-this.right_symbol.height/2),this.right_symbol.shiftX(this.group.getBBox().x+this.width+g),function z(){for(var f=!1,o,V=0,q=E.chart.symbols.length;VE.right_symbol.getCenter().y&&N<=E.right_symbol.width/2){f=!0;break}}if(f){if(E.right_symbol.symbolType==="end")return;E.right_symbol.setX(o.getX()+o.width+g),z()}}(),this.right_symbol.isPositioned=!0,this.right_symbol.render())}};Re.prototype.renderLines=function(){this.path1_symbol&&this.drawLineTo(this.path1_symbol,this.path1_annotation,this.path1_direction),this.path2_symbol&&this.drawLineTo(this.path2_symbol,this.path2_annotation,this.path2_direction),this.path3_symbol&&this.drawLineTo(this.path3_symbol,this.path3_annotation,this.path3_direction)};var wi=Re,Ki=He,tr=te.defaults,er=Ui,ir=_i,rr=wi;function Ae(g,x){x=x||{},this.paper=new Ki(g),this.options=tr(x,er),this.symbols=[],this.lines=[],this.start=null}Ae.prototype.handle=function(g){this.symbols.indexOf(g)<=-1&&this.symbols.push(g);var x=this;return g instanceof ir?(g.yes=function(w){return g.yes_symbol=w,g.no_symbol&&(g.pathOk=!0),x.handle(w)},g.no=function(w){return g.no_symbol=w,g.yes_symbol&&(g.pathOk=!0),x.handle(w)}):g instanceof rr?(g.path1=function(w){return g.path1_symbol=w,g.path2_symbol&&(g.pathOk=!0),x.handle(w)},g.path2=function(w){return g.path2_symbol=w,g.path3_symbol&&(g.pathOk=!0),x.handle(w)},g.path3=function(w){return g.path3_symbol=w,g.path1_symbol&&(g.pathOk=!0),x.handle(w)}):g.then=function(w){return g.next=w,g.pathOk=!0,x.handle(w)},g};Ae.prototype.startWith=function(g){return this.start=g,this.handle(g)};Ae.prototype.render=function(){var g=0,x=0,w=0,E=0,U=0,O=0,z=0,f=0,o,V;for(w=0,E=this.symbols.length;wg&&(g=o.width),o.height>x&&(x=o.height);for(w=0,E=this.symbols.length;wU&&(U=q),N>O&&(O=N)}for(w=0,E=this.lines.length;wU&&(U=mt),lt>O&&(O=lt)}var tt=this.options.scale,gt=this.options["line-width"];this.minXFromSymbols")<0&&V.indexOf("=>")<0&&V.indexOf("@>")<0?(w[f-1]+=` `+V,w.splice(f,1),o--):f++}function q(v){var _=v.indexOf("(")+1,A=v.indexOf(")");return _>=0&&A>=0?v.substring(_,A):"{}"}function N(v){var _=v.indexOf("(")+1,A=v.indexOf(")");return _>=0&&A>=0?v.substring(_,A):""}function ot(v){var _=v.indexOf("(")+1,A=v.indexOf(")");return _>=0&&A>=0?x.symbols[v.substring(0,_-1)]:x.symbols[v]}function mt(v){var _="next",A=v.indexOf("(")+1,b=v.indexOf(")");return A>=0&&b>=0&&(_=W.substring(A,b),_.indexOf(",")<0&&_!=="yes"&&_!=="no"&&(_="next, "+_)),_}function lt(v){var _=v.indexOf("(")+1,A=v.indexOf(")"),b=v.substring(_,A);b.indexOf(",")>0&&(b=b.substring(0,b.indexOf(",")));var B=b.split("@");if(B.length>1)return _>=0&&A>=0?B[1]:""}for(;w.length>0;){var tt=w.splice(0,1)[0].trim();if(tt.indexOf("=>")>=0){var gt=tt.split("=>"),J={key:gt[0].replace(/\(.*\)/,""),symbolType:gt[1],text:null,link:null,target:null,flowstate:null,function:null,lineStyle:{},params:{}},H=gt[0].match(/\((.*)\)/);if(H&&H.length>1)for(var j=H[1].split(","),rt=0;rt=0&&(I=J.symbolType.split(": "),J.symbolType=I.shift(),J.text=I.join(": ")),J.text&&J.text.indexOf(":$")>=0?(I=J.text.split(":$"),J.text=I.shift(),J.function=I.join(":$")):J.symbolType.indexOf(":$")>=0?(I=J.symbolType.split(":$"),J.symbolType=I.shift(),J.function=I.join(":$")):J.text&&J.text.indexOf(":>")>=0?(I=J.text.split(":>"),J.text=I.shift(),J.link=I.join(":>")):J.symbolType.indexOf(":>")>=0&&(I=J.symbolType.split(":>"),J.symbolType=I.shift(),J.link=I.join(":>")),J.symbolType.indexOf(` `)>=0&&(J.symbolType=J.symbolType.split(` `)[0]),J.link){var k=J.link.indexOf("[")+1,Z=J.link.indexOf("]");k>=0&&Z>=0&&(J.target=J.link.substring(k,Z),J.link=J.link.substring(0,k-1))}if(J.text&&J.text.indexOf("|")>=0){var st=J.text.split("|");J.flowstate=st.pop().trim(),J.text=st.join("|")}x.symbols[J.key]=J}else if(tt.indexOf("->")>=0){var xt=lt(tt);xt&&(tt=tt.replace("@"+xt,""));for(var at=tt.split("->"),K=0,nt=at.length;K=0){var bt=kt.split(",");kt=bt[0],ct=bt[1].trim()}if(xt&&(_t.symbolType==="condition"?kt==="yes"||kt==="true"?_t.yes_annotation=xt:_t.no_annotation=xt:_t.symbolType==="parallel"&&(kt==="path1"?_t.path1_annotation=xt:kt==="path2"?_t.path2_annotation=xt:kt==="path3"&&(_t.path3_annotation=xt)),xt=null),x.start||(x.start=_t),K+1")>=0){for(var l=tt.split("@>"),a=0,s=l.length;a