// flowchart.js, v1.18.0 // Copyright (c)2023 Adriano Raiano (adrai). // Distributed under MIT license // http://adrai.github.io/flowchart.js !function(t,i){if("object"==typeof exports&&"object"==typeof module)module.exports=i(require("Raphael"));else if("function"==typeof define&&define.amd)define(["Raphael"],i);else{var e=i("object"==typeof exports?require("Raphael"):t.Raphael);for(var s in e)("object"==typeof exports?exports:t)[s]=e[s]}}(this,function(t){return function(t){function i(s){if(e[s])return e[s].exports;var n=e[s]={exports:{},id:s,loaded:!1};return t[s].call(n.exports,n,n.exports,i),n.loaded=!0,n.exports}var e={};return i.m=t,i.c=e,i.p="",i(0)}([function(t,i,e){e(9);var s=e(4);e(17);var n={parse:s};"undefined"!=typeof window&&(window.flowchart=n),t.exports=n},function(t,i){function e(t,i){if(!t||"function"==typeof t)return i;var s={};for(var n in i)s[n]=i[n];for(n in t)t[n]&&("object"==typeof s[n]?s[n]=e(s[n],t[n]):s[n]=t[n]);return s}function s(t,i){if("function"==typeof Object.create)t.super_=i,t.prototype=Object.create(i.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}});else{t.super_=i;var e=function(){};e.prototype=i.prototype,t.prototype=new e,t.prototype.constructor=t}}t.exports={defaults:e,inherits:s}},function(t,i,e){function s(t,i,e){this.chart=t,this.group=this.chart.paper.set(),this.symbol=e,this.connectedTo=[],this.symbolType=i.symbolType,this.flowstate=i.flowstate||"future",this.lineStyle=i.lineStyle||{},this.key=i.key||"",this.leftLines=[],this.rightLines=[],this.topLines=[],this.bottomLines=[],this.params=i.params,this.next_direction=i.next&&i.direction_next?i.direction_next:void 0,this.text=this.chart.paper.text(0,0,i.text),i.key&&(this.text.node.id=i.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 s=this.getAttr("font"),n=this.getAttr("font-family"),h=this.getAttr("font-weight");s&&this.text.attr({font:s}),n&&this.text.attr({"font-family":n}),h&&this.text.attr({"font-weight":h}),i.link&&this.text.attr("href",i.link),i.function&&(this.text.attr({cursor:"pointer"}),this.text.node.addEventListener("click",function(t){window[i.function](t,i)},!1)),i.target&&this.text.attr("target",i.target);var r=this.getAttr("maxWidth");if(r){for(var o=i.text.split(" "),a="",l=0,p=o.length;lr?"\n"+x:" "+x}this.text.attr("text",a.substring(1))}if(this.group.push(this.text),e){var y=this.getAttr("text-margin");e.attr({fill:this.getAttr("fill"),stroke:this.getAttr("element-color"),"stroke-width":this.getAttr("line-width"),width:this.text.getBBox().width+2*y,height:this.text.getBBox().height+2*y}),e.node.setAttribute("class",this.getAttr("class"));var g=this.getAttr("roundness");isNaN(g)||(e.node.setAttribute("ry",g),e.node.setAttribute("rx",g)),i.link&&e.attr("href",i.link),i.target&&e.attr("target",i.target),i.function&&(e.node.addEventListener("click",function(t){window[i.function](t,i)},!1),e.attr({cursor:"pointer"})),i.key&&(e.node.id=i.key),this.group.push(e),e.insertBefore(this.text),this.text.attr({y:e.getBBox().height/2}),this.initialize()}}var n=e(3),h=n.drawLine,r=n.checkLineIntersection;s.prototype.getAttr=function(t){if(this.chart){var i,e=this.chart.options?this.chart.options[t]:void 0,s=this.chart.options.symbols?this.chart.options.symbols[this.symbolType][t]:void 0;return this.chart.options.flowstate&&this.chart.options.flowstate[this.flowstate]&&(i=this.chart.options.flowstate[this.flowstate][t]),i||s||e}},s.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},s.prototype.getCenter=function(){return{x:this.getX()+this.width/2,y:this.getY()+this.height/2}},s.prototype.getX=function(){return this.group.getBBox().x},s.prototype.getY=function(){return this.group.getBBox().y},s.prototype.shiftX=function(t){this.group.transform("t"+(this.getX()+t)+","+this.getY())},s.prototype.setX=function(t){this.group.transform("t"+t+","+this.getY())},s.prototype.shiftY=function(t){this.group.transform("t"+this.getX()+","+(this.getY()+t))},s.prototype.setY=function(t){this.group.transform("t"+this.getX()+","+t)},s.prototype.getTop=function(){var t=this.getY(),i=this.getX()+this.width/2;return{x:i,y:t}},s.prototype.getBottom=function(){var t=this.getY()+this.height,i=this.getX()+this.width/2;return{x:i,y:t}},s.prototype.getLeft=function(){var t=this.getY()+this.group.getBBox().height/2,i=this.getX();return{x:i,y:t}},s.prototype.getRight=function(){var t=this.getY()+this.group.getBBox().height/2,i=this.getX()+this.group.getBBox().width;return{x:i,y:t}},s.prototype.render=function(){if(this.next){var t=this,i=this.getAttr("line-length");if("right"===this.next_direction){var e=this.getRight();this.next.isPositioned||(this.next.setY(e.y-this.next.height/2),this.next.shiftX(this.group.getBBox().x+this.width+i),function e(){for(var s,n=!1,h=0,r=t.chart.symbols.length;ht.next.getCenter().y&&o<=t.next.width/2){n=!0;break}}if(n){if("end"===t.next.symbolType)return;t.next.setX(s.getX()+s.width+i),e()}}(),this.next.isPositioned=!0,this.next.render())}else if("left"===this.next_direction){var s=this.getLeft();this.next.isPositioned||(this.next.setY(s.y-this.next.height/2),this.next.shiftX(-(this.group.getBBox().x+this.width+i)),function e(){for(var s,n=!1,h=0,r=t.chart.symbols.length;ht.next.getCenter().y&&o<=t.next.width/2){n=!0;break}}if(n){if("end"===t.next.symbolType)return;t.next.setX(s.getX()+s.width+i),e()}}(),this.next.isPositioned=!0,this.next.render())}else{var n=this.getBottom();this.next.isPositioned||(this.next.shiftY(this.getY()+this.height+i),this.next.setX(n.x-this.next.width/2),this.next.isPositioned=!0,this.next.render())}}},s.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")||""))},s.prototype.drawLineTo=function(t,i,e){this.connectedTo.indexOf(t)<0&&this.connectedTo.push(t);var s,n,o=this.getCenter().x,a=this.getCenter().y,l=this.getRight(),p=this.getBottom(),x=this.getTop(),y=this.getLeft(),g=t.getCenter().x,f=t.getCenter().y,c=t.getTop(),d=t.getRight(),m=t.getLeft(),u=o===g,b=a===f,_=af||this===t,w=o>g,L=ok&&(k=c.x);else n=10*Math.max(t.topLines.length,this.bottomLines.length),s=this.leftEnd&&v?h(this.chart,p,[{x:p.x,y:p.y+B/2-n},{x:p.x+(p.x-c.x)/2,y:p.y+B/2-n},{x:p.x+(p.x-c.x)/2,y:c.y-B/2-n},{x:c.x,y:c.y-B/2-n},{x:c.x,y:c.y}],i):h(this.chart,p,[{x:p.x,y:c.y-B/2-n},{x:c.x,y:c.y-B/2-n},{x:c.x,y:c.y}],i),this.bottomLines.push(s),t.topLines.push(s),this.bottomStart=!0,t.topEnd=!0,k=p.x+(p.x-c.x)/2;else n=10*Math.max(t.topLines.length,this.rightLines.length),s=h(this.chart,l,[{x:l.x+B/2,y:l.y-n},{x:l.x+B/2,y:c.y-B/2-n},{x:c.x,y:c.y-B/2-n},{x:c.x,y:c.y}],i),this.rightLines.push(s),t.topLines.push(s),this.rightStart=!0,t.topEnd=!0,k=l.x+B/2;else n=10*Math.max(t.topLines.length,this.rightLines.length),s=h(this.chart,l,[{x:l.x+B/2,y:l.y-n},{x:l.x+B/2,y:c.y-B/2-n},{x:c.x,y:c.y-B/2-n},{x:c.x,y:c.y}],i),this.rightLines.push(s),t.topLines.push(s),this.rightStart=!0,t.topEnd=!0,k=l.x+B/2;else 0===t.rightLines.length&&0===this.leftLines.length?s=h(this.chart,y,d,i):(n=10*Math.max(t.rightLines.length,this.leftLines.length),s=h(this.chart,l,[{x:l.x,y:l.y-n},{x:l.x,y:d.y-n},{x:d.x,y:d.y-n},{x:d.x,y:d.y}],i)),this.leftLines.push(s),t.rightLines.push(s),this.leftStart=!0,t.rightEnd=!0,k=d.x;else 0===t.leftLines.length&&0===this.rightLines.length?s=h(this.chart,l,m,i):(n=10*Math.max(t.leftLines.length,this.rightLines.length),s=h(this.chart,l,[{x:l.x,y:l.y-n},{x:l.x,y:m.y-n},{x:m.x,y:m.y-n},{x:m.x,y:m.y}],i)),this.rightLines.push(s),t.leftLines.push(s),this.rightStart=!0,t.leftEnd=!0,k=m.x;else 0===t.topLines.length&&0===this.bottomLines.length?s=h(this.chart,p,c,i):(n=10*Math.max(t.topLines.length,this.bottomLines.length),s=h(this.chart,p,[{x:c.x,y:c.y-n},{x:c.x,y:c.y}],i)),this.bottomLines.push(s),t.topLines.push(s),this.bottomStart=!0,t.topEnd=!0,k=p.x;if(this.lineStyle[t.key]&&s&&s.attr(this.lineStyle[t.key]),s){for(var O=0,X=this.chart.lines.length;OW?(J=["L",q.x+2*M,I],C.splice(N+1,0,J),J=["C",q.x+2*M,I,q.x,I-4*M,q.x-2*M,I],C.splice(N+2,0,J),s.attr("path",C)):(J=["L",q.x-2*M,I],C.splice(N+1,0,J),J=["C",q.x-2*M,I,q.x,I-4*M,q.x+2*M,I],C.splice(N+2,0,J),s.attr("path",C)):I>Q?(J=["L",G,q.y+2*M],C.splice(N+1,0,J),J=["C",G,q.y+2*M,G+4*M,q.y,G,q.y-2*M],C.splice(N+2,0,J),s.attr("path",C)):(J=["L",G,q.y-2*M],C.splice(N+1,0,J),J=["C",G,q.y-2*M,G+4*M,q.y,G,q.y+2*M],C.splice(N+2,0,J),s.attr("path",C)),N+=2}}}this.chart.lines.push(s),(void 0===this.chart.minXFromSymbols||this.chart.minXFromSymbols>y.x)&&(this.chart.minXFromSymbols=y.x)}(!this.chart.maxXFromLine||this.chart.maxXFromLine&&k>this.chart.maxXFromLine)&&(this.chart.maxXFromLine=k)},t.exports=s},function(t,i){function e(t,i,e){var s,n,h="M{0},{1}";for(s=2,n=2*e.length+2;sd.x?i.x-(i.x-d.x)/2:d.x-(d.x-i.x)/2,u=i.y>d.y?i.y-(i.y-d.y)/2:d.y-(d.y-i.y)/2,c?(m-=g.getBBox().width/2,u-=t.options["text-margin"]):(m+=t.options["text-margin"],u-=g.getBBox().height/2)):(m=i.x,u=i.y,c?(i.x>d.x?(m-=t.options["text-margin"]/2,f="end"):m+=t.options["text-margin"]/2,u-=t.options["text-margin"]):(m+=t.options["text-margin"]/2,u+=t.options["text-margin"],i.y>d.y&&(u-=2*t.options["text-margin"]))),g.attr({"text-anchor":f,"font-size":t.options["font-size"],fill:t.options["font-color"],x:m,y:u}),l&&g.attr({font:l}),p&&g.attr({"font-family":p}),x&&g.attr({"font-weight":x})}return a}function n(t,i,e,s,n,h,r,o){var a,l,p,x,y,g={x:null,y:null,onLine1:!1,onLine2:!1};return a=(o-h)*(e-t)-(r-n)*(s-i),0===a?g:(l=i-h,p=t-n,x=(r-n)*l-(o-h)*p,y=(e-t)*l-(s-i)*p,l=x/a,p=y/a,g.x=t+l*(e-t),g.y=i+l*(s-i),l>0&&l<1&&(g.onLine1=!0),p>0&&p<1&&(g.onLine2=!0),g)}t.exports={drawPath:e,drawLine:s,checkLineIntersection:n}},function(t,i,e){function s(t){function i(t){var i=t.indexOf("(")+1,e=t.indexOf(")");return i>=0&&e>=0?t.substring(i,e):"{}"}function e(t){var i=t.indexOf("(")+1,e=t.indexOf(")");return i>=0&&e>=0?t.substring(i,e):""}function s(t){var i=t.indexOf("(")+1,e=t.indexOf(")");return i>=0&&e>=0?d.symbols[t.substring(0,i-1)]:d.symbols[t]}function f(t){var i="next",e=t.indexOf("(")+1,s=t.indexOf(")");return e>=0&&s>=0&&(i=N.substring(e,s),i.indexOf(",")<0&&"yes"!==i&&"no"!==i&&(i="next, "+i)),i}function c(t){var i=t.indexOf("(")+1,e=t.indexOf(")"),s=t.substring(i,e);s.indexOf(",")>0&&(s=s.substring(0,s.indexOf(",")));var n=s.split("@");if(n.length>1)return i>=0&&e>=0?n[1]:""}t=t||"",t=t.trim();for(var d={symbols:{},start:null,drawSVG:function(t,i){function e(t){if(c[t.key])return c[t.key];switch(t.symbolType){case"start":c[t.key]=new h(f,t);break;case"end":c[t.key]=new r(f,t);break;case"operation":c[t.key]=new o(f,t);break;case"inputoutput":c[t.key]=new a(f,t);break;case"input":c[t.key]=new l(f,t);break;case"output":c[t.key]=new p(f,t);break;case"subroutine":c[t.key]=new x(f,t);break;case"condition":c[t.key]=new y(f,t);break;case"parallel":c[t.key]=new g(f,t);break;default:return new Error("Wrong symbol type!")}return c[t.key]}var s=this;this.diagram&&this.diagram.clean();var f=new n(t,i);this.diagram=f;var c={};!function t(i,n,h){var r=e(i);return s.start===i?f.startWith(r):n&&h&&!n.pathOk&&(n instanceof y?(h.yes===i&&n.yes(r),h.no===i&&n.no(r)):n instanceof g?(h.path1===i&&n.path1(r),h.path2===i&&n.path2(r),h.path3===i&&n.path3(r)):n.then(r)),r.pathOk?r:(r instanceof y?(i.yes&&t(i.yes,r,i),i.no&&t(i.no,r,i)):r instanceof g?(i.path1&&t(i.path1,r,i),i.path2&&t(i.path2,r,i),i.path3&&t(i.path3,r,i)):i.next&&t(i.next,r,i),r)}(this.start),f.render()},clean:function(){this.diagram.clean()},options:function(){return this.diagram.options}},m=[],u=0,b=1,_=t.length;b<_;b++)if("\n"===t[b]&&"\\"!==t[b-1]){var v=t.substring(u,b);u=b+1,m.push(v.replace(/\\\n/g,"\n"))}u")<0&&k.indexOf("=>")<0&&k.indexOf("@>")<0?(m[w-1]+="\n"+k,m.splice(w,1),L--):w++}for(;m.length>0;){var B=m.splice(0,1)[0].trim();if(B.indexOf("=>")>=0){var M=B.split("=>"),A={key:M[0].replace(/\(.*\)/,""),symbolType:M[1],text:null,link:null,target:null,flowstate:null,function:null,lineStyle:{},params:{}},O=M[0].match(/\((.*)\)/);if(O&&O.length>1)for(var X=O[1].split(","),T=0;T=0&&(C=A.symbolType.split(": "),A.symbolType=C.shift(),A.text=C.join(": ")),A.text&&A.text.indexOf(":$")>=0?(C=A.text.split(":$"),A.text=C.shift(),A.function=C.join(":$")):A.symbolType.indexOf(":$")>=0?(C=A.symbolType.split(":$"),A.symbolType=C.shift(),A.function=C.join(":$")):A.text&&A.text.indexOf(":>")>=0?(C=A.text.split(":>"),A.text=C.shift(),A.link=C.join(":>")):A.symbolType.indexOf(":>")>=0&&(C=A.symbolType.split(":>"),A.symbolType=C.shift(),A.link=C.join(":>")),A.symbolType.indexOf("\n")>=0&&(A.symbolType=A.symbolType.split("\n")[0]),A.link){var Y=A.link.indexOf("[")+1,P=A.link.indexOf("]");Y>=0&&P>=0&&(A.target=A.link.substring(Y,P),A.link=A.link.substring(0,Y-1))}if(A.text&&A.text.indexOf("|")>=0){var j=A.text.split("|");A.flowstate=j.pop().trim(),A.text=j.join("|")}d.symbols[A.key]=A}else if(B.indexOf("->")>=0){var E=c(B);E&&(B=B.replace("@"+E,""));for(var z=B.split("->"),R=0,F=z.length;R=0){var W=V.split(",");V=W[0],I=W[1].trim()}if(E&&("condition"===G.symbolType?"yes"===V||"true"===V?G.yes_annotation=E:G.no_annotation=E:"parallel"===G.symbolType&&("path1"===V?G.path1_annotation=E:"path2"===V?G.path2_annotation=E:"path3"===V&&(G.path3_annotation=E)),E=null),d.start||(d.start=G),R+1")>=0)for(var q=B.split("@>"),J=0,D=q.length;Jt.right_symbol.getCenter().y&&o<=t.right_symbol.width/2){n=!0;break}}if(n){if("end"===t.right_symbol.symbolType)return;t.right_symbol.setX(s.getX()+s.width+i),e()}}(),this.right_symbol.isPositioned=!0,this.right_symbol.render())}if(this.left_symbol){var n=this.getLeft();this.left_symbol.isPositioned||(this.left_symbol.setY(n.y-this.left_symbol.height/2),this.left_symbol.shiftX(-(this.group.getBBox().x+this.width+i)),function e(){for(var s,n=!1,h=0,r=t.chart.symbols.length;ht.left_symbol.getCenter().y&&o<=t.left_symbol.width/2){n=!0;break}}if(n){if("end"===t.left_symbol.symbolType)return;t.left_symbol.setX(s.getX()+s.width+i),e()}}(),this.left_symbol.isPositioned=!0,this.left_symbol.render())}},s.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)},t.exports=s},function(t,i,e){function s(t,i){var e=t.paper.rect(0,0,0,0);i=i||{},n.call(this,t,i,e),this.path1_annotation=i.path1_annotation||"",this.path2_annotation=i.path2_annotation||"",this.path3_annotation=i.path3_annotation||"",this.textMargin=this.getAttr("text-margin"),this.path1_direction="bottom",this.path2_direction="right",this.path3_direction="top",this.params=i.params,"path1"===i.direction_next&&!i[i.direction_next]&&i.next&&(i[i.direction_next]=i.next),"path2"===i.direction_next&&!i[i.direction_next]&&i.next&&(i[i.direction_next]=i.next),"path3"===i.direction_next&&!i[i.direction_next]&&i.next&&(i[i.direction_next]=i.next),i.path1&&i.direction_path1&&i.path2&&!i.direction_path2&&i.path3&&!i.direction_path3?"right"===i.direction_path1?(this.path2_direction="bottom",this.path1_direction="right",this.path3_direction="top"):"top"===i.direction_path1?(this.path2_direction="right",this.path1_direction="top",this.path3_direction="bottom"):"left"===i.direction_path1?(this.path2_direction="right",this.path1_direction="left",this.path3_direction="bottom"):(this.path2_direction="right",this.path1_direction="bottom",this.path3_direction="top"):i.path1&&!i.direction_path1&&i.path2&&i.direction_path2&&i.path3&&!i.direction_path3?"right"===i.direction_path2?(this.path1_direction="bottom",this.path2_direction="right",this.path3_direction="top"):"left"===i.direction_path2?(this.path1_direction="bottom",this.path2_direction="left",this.path3_direction="right"):(this.path1_direction="right",this.path2_direction="bottom",this.path3_direction="top"):i.path1&&!i.direction_path1&&i.path2&&!i.direction_path2&&i.path3&&i.direction_path3?"right"===i.direction_path2?(this.path1_direction="bottom",this.path2_direction="top",this.path3_direction="right"):"left"===i.direction_path2?(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=i.direction_path1,this.path2_direction=i.direction_path2,this.path3_direction=i.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()}var n=e(2),h=e(1).inherits;h(s,n),s.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 t=this.getAttr("line-length");if(this.bottom_symbol){var i=this.getBottom();this.bottom_symbol.isPositioned||(this.bottom_symbol.shiftY(this.getY()+this.height+t),this.bottom_symbol.setX(i.x-this.bottom_symbol.width/2),this.bottom_symbol.isPositioned=!0,this.bottom_symbol.render())}if(this.top_symbol){var e=this.getTop();this.top_symbol.isPositioned||(this.top_symbol.shiftY(this.getY()-this.top_symbol.height-t),this.top_symbol.setX(e.x+this.top_symbol.width),this.top_symbol.isPositioned=!0,this.top_symbol.render())}var s=this;if(this.left_symbol){var n=this.getLeft();this.left_symbol.isPositioned||(this.left_symbol.setY(n.y-this.left_symbol.height/2),this.left_symbol.shiftX(-(this.group.getBBox().x+this.width+t)),function i(){for(var e,n=!1,h=0,r=s.chart.symbols.length;hs.left_symbol.getCenter().y&&o<=s.left_symbol.width/2){n=!0;break}}if(n){if("end"===s.left_symbol.symbolType)return;s.left_symbol.setX(e.getX()+e.width+t),i()}}(),this.left_symbol.isPositioned=!0,this.left_symbol.render())}if(this.right_symbol){var h=this.getRight();this.right_symbol.isPositioned||(this.right_symbol.setY(h.y-this.right_symbol.height/2),this.right_symbol.shiftX(this.group.getBBox().x+this.width+t),function i(){for(var e,n=!1,h=0,r=s.chart.symbols.length;hs.right_symbol.getCenter().y&&o<=s.right_symbol.width/2){n=!0;break}}if(n){if("end"===s.right_symbol.symbolType)return;s.right_symbol.setX(e.getX()+e.width+t),i()}}(),this.right_symbol.isPositioned=!0,this.right_symbol.render())}},s.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)},t.exports=s},function(t,i,e){function s(t,i){i=i||{},this.paper=new n(t),this.options=h(i,r),this.symbols=[],this.lines=[],this.start=null}var n=e(18),h=e(1).defaults,r=e(8),o=e(5),a=e(6);s.prototype.handle=function(t){this.symbols.indexOf(t)<=-1&&this.symbols.push(t);var i=this;return t instanceof o?(t.yes=function(e){return t.yes_symbol=e,t.no_symbol&&(t.pathOk=!0),i.handle(e)},t.no=function(e){return t.no_symbol=e,t.yes_symbol&&(t.pathOk=!0),i.handle(e)}):t instanceof a?(t.path1=function(e){return t.path1_symbol=e,t.path2_symbol&&(t.pathOk=!0),i.handle(e)},t.path2=function(e){return t.path2_symbol=e,t.path3_symbol&&(t.pathOk=!0),i.handle(e)},t.path3=function(e){return t.path3_symbol=e,t.path1_symbol&&(t.pathOk=!0),i.handle(e)}):t.then=function(e){return t.next=e,t.pathOk=!0,i.handle(e)},t},s.prototype.startWith=function(t){return this.start=t,this.handle(t)},s.prototype.render=function(){var t,i,e=0,s=0,n=0,h=0,r=0,o=0,a=0,l=0;for(n=0,h=this.symbols.length;ne&&(e=t.width),t.height>s&&(s=t.height);for(n=0,h=this.symbols.length;nr&&(r=p),x>o&&(o=x)}for(n=0,h=this.lines.length;nr&&(r=g),f>o&&(o=f)}var c=this.options.scale,d=this.options["line-width"];this.minXFromSymbols>>0;if(0===e)return-1;var s=0;if(arguments.length>0&&(s=Number(arguments[1]),s!=s?s=0:0!==s&&s!=1/0&&s!=-(1/0)&&(s=(s>0||-1)*Math.floor(Math.abs(s)))),s>=e)return-1;for(var n=s>=0?s:Math.max(e-Math.abs(s),0);n>>0;if(0===e)return-1;var s=e;arguments.length>1&&(s=Number(arguments[1]),s!=s?s=0:0!==s&&s!=1/0&&s!=-(1/0)&&(s=(s>0||-1)*Math.floor(Math.abs(s))));for(var n=s>=0?Math.min(s,e-1):e-Math.abs(s);n>=0;n--)if(n in i&&i[n]===t)return n;return-1}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")})},function(t,i,e){function s(t,i){var e=t.paper.rect(0,0,0,0,20);i=i||{},i.text=i.text||"End",n.call(this,t,i,e)}var n=e(2),h=e(1).inherits;h(s,n),t.exports=s},function(t,i,e){function s(t,i){i=i||{},n.call(this,t,i),this.textMargin=this.getAttr("text-margin"),this.text.attr({x:3*this.textMargin});var e=this.text.getBBox().width+4*this.textMargin,s=this.text.getBBox().height+2*this.textMargin,h=this.textMargin,r=s/2,a={x:h,y:r},l=[{x:h-this.textMargin+2*this.textMargin,y:s},{x:h-this.textMargin+e,y:s},{x:h-this.textMargin+e+2*this.textMargin,y:0},{x:h-this.textMargin,y:0},{x:h,y:r}],p=o(t,a,l);p.attr({stroke:this.getAttr("element-color"),"stroke-width":this.getAttr("line-width"),fill:this.getAttr("fill")}),i.link&&p.attr("href",i.link),i.target&&p.attr("target",i.target),i.key&&(p.node.id=i.key),p.node.setAttribute("class",this.getAttr("class")),this.text.attr({y:p.getBBox().height/2}),this.group.push(p),p.insertBefore(this.text),this.symbol=p,this.initialize()}var n=e(2),h=e(1).inherits,r=e(3),o=r.drawPath;h(s,n),s.prototype.getLeft=function(){var t=this.getY()+this.group.getBBox().height/2,i=this.getX()+this.textMargin;return{x:i,y:t}},s.prototype.getRight=function(){var t=this.getY()+this.group.getBBox().height/2,i=this.getX()+this.group.getBBox().width-this.textMargin;return{x:i,y:t}},t.exports=s},function(t,i,e){function s(t,i){i=i||{},n.call(this,t,i),this.textMargin=this.getAttr("text-margin"),this.text.attr({x:3*this.textMargin});var e=this.text.getBBox().width+4*this.textMargin,s=this.text.getBBox().height+2*this.textMargin,h=this.textMargin,r=s/2,a={x:h,y:r},l=[{x:h-this.textMargin,y:s},{x:h-this.textMargin+e,y:s},{x:h-this.textMargin+e+2*this.textMargin,y:0},{x:h-this.textMargin+2*this.textMargin,y:0},{x:h,y:r}],p=o(t,a,l);p.attr({stroke:this.getAttr("element-color"),"stroke-width":this.getAttr("line-width"),fill:this.getAttr("fill")}),i.link&&p.attr("href",i.link),i.target&&p.attr("target",i.target),i.key&&(p.node.id=i.key),p.node.setAttribute("class",this.getAttr("class")),this.text.attr({y:p.getBBox().height/2}),this.group.push(p),p.insertBefore(this.text),this.symbol=p,this.initialize()}var n=e(2),h=e(1).inherits,r=e(3),o=r.drawPath;h(s,n),s.prototype.getLeft=function(){var t=this.getY()+this.group.getBBox().height/2,i=this.getX()+this.textMargin;return{x:i,y:t}},s.prototype.getRight=function(){var t=this.getY()+this.group.getBBox().height/2,i=this.getX()+this.group.getBBox().width-this.textMargin;return{x:i,y:t}},t.exports=s},function(t,i,e){function s(t,i){var e=t.paper.rect(0,0,0,0);i=i||{},n.call(this,t,i,e)}var n=e(2),h=e(1).inherits; h(s,n),t.exports=s},function(t,i,e){function s(t,i){i=i||{},n.call(this,t,i),this.textMargin=this.getAttr("text-margin"),this.text.attr({x:3*this.textMargin});var e=this.text.getBBox().width+4*this.textMargin,s=this.text.getBBox().height+2*this.textMargin,h=this.textMargin,r=s/2,a={x:h,y:r},l=[{x:h-this.textMargin,y:s},{x:h-this.textMargin+e+2*this.textMargin,y:s},{x:h-this.textMargin+e,y:0},{x:h-this.textMargin+2*this.textMargin,y:0},{x:h,y:r}],p=o(t,a,l);p.attr({stroke:this.getAttr("element-color"),"stroke-width":this.getAttr("line-width"),fill:this.getAttr("fill")}),i.link&&p.attr("href",i.link),i.target&&p.attr("target",i.target),i.key&&(p.node.id=i.key),p.node.setAttribute("class",this.getAttr("class")),this.text.attr({y:p.getBBox().height/2}),this.group.push(p),p.insertBefore(this.text),this.symbol=p,this.initialize()}var n=e(2),h=e(1).inherits,r=e(3),o=r.drawPath;h(s,n),s.prototype.getLeft=function(){var t=this.getY()+this.group.getBBox().height/2,i=this.getX()+this.textMargin;return{x:i,y:t}},s.prototype.getRight=function(){var t=this.getY()+this.group.getBBox().height/2,i=this.getX()+this.group.getBBox().width-this.textMargin;return{x:i,y:t}},t.exports=s},function(t,i,e){function s(t,i){var e=t.paper.rect(0,0,0,0,20);i=i||{},i.text=i.text||"Start",n.call(this,t,i,e)}var n=e(2),h=e(1).inherits;h(s,n),t.exports=s},function(t,i,e){function s(t,i){var e=t.paper.rect(0,0,0,0);i=i||{},n.call(this,t,i,e),e.attr({width:this.text.getBBox().width+4*this.getAttr("text-margin")}),this.text.attr({x:2*this.getAttr("text-margin")});var s=t.paper.rect(0,0,0,0);s.attr({x:this.getAttr("text-margin"),stroke:this.getAttr("element-color"),"stroke-width":this.getAttr("line-width"),width:this.text.getBBox().width+2*this.getAttr("text-margin"),height:this.text.getBBox().height+2*this.getAttr("text-margin"),fill:this.getAttr("fill")}),i.key&&(s.node.id=i.key+"i");var h=this.getAttr("font"),r=this.getAttr("font-family"),o=this.getAttr("font-weight");h&&s.attr({font:h}),r&&s.attr({"font-family":r}),o&&s.attr({"font-weight":o}),i.link&&s.attr("href",i.link),i.target&&s.attr("target",i.target),this.group.push(s),s.insertBefore(this.text),this.initialize()}var n=e(2),h=e(1).inherits;h(s,n),t.exports=s},function(t,i,e){if("undefined"!=typeof jQuery){var s=e(4);!function(t){function i(t,i){return t==i||Array.isArray(i)&&(i.includes(t)||i.includes(Number(t)))}var e={init:function(i){return this.each(function(){var e=t(this);this.chart=s(e.text()),e.html(""),this.chart.drawSVG(this,i)})},setFlowStateByParam:function(t,e,s){return this.each(function(){var n=this.chart,h=["next","yes","no","path1","path2","path3"];for(var r in n.symbols)if(n.symbols.hasOwnProperty(r)){var o=n.symbols[r],a=o.params[t];if(i(a,e)){o.flowstate=s;for(var l=0;l