@jhuix/showdowns 0.7.0 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///flowchart.min.js","webpack:///webpack/bootstrap b04f6270804beefb9eda","webpack:///./index.js","webpack:///./src/flowchart.helpers.js","webpack:///./src/flowchart.symbol.js","webpack:///./src/flowchart.functions.js","webpack:///./src/flowchart.parse.js","webpack:///./src/flowchart.symbol.condition.js","webpack:///./src/flowchart.symbol.parallel.js","webpack:///./src/flowchart.chart.js","webpack:///./src/flowchart.defaults.js","webpack:///./src/flowchart.shim.js","webpack:///./src/flowchart.symbol.end.js","webpack:///./src/flowchart.symbol.inputoutput.js","webpack:///./src/flowchart.symbol.operation.js","webpack:///./src/flowchart.symbol.start.js","webpack:///./src/flowchart.symbol.subroutine.js","webpack:///./src/jquery-plugin.js","webpack:///external \"Raphael\""],"names":["root","factory","exports","module","require","define","amd","a","i","this","__WEBPACK_EXTERNAL_MODULE_16__","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","parse","FlowChart","window","flowchart","_defaults","options","defaultOptions","merged","attrname","_inherits","ctor","superCtor","Object","super_","prototype","create","constructor","value","enumerable","writable","configurable","TempCtor","defaults","inherits","Symbol","chart","symbol","group","paper","set","connectedTo","symbolType","flowstate","lineStyle","key","next_direction","next","undefined","text","node","setAttribute","getAttr","attr","text-anchor","x","fill","font-size","font","fontF","fontW","font-family","font-weight","link","cursor","addEventListener","evt","target","maxWidth","words","split","tempText","ii","length","word","getBBox","width","substring","push","tmpMargin","stroke","stroke-width","height","insertBefore","y","initialize","drawAPI","drawLine","checkLineIntersection","attName","opt1","opt3","opt2","symbols","transform","getCenter","getX","getY","shiftX","setX","shiftY","setY","getTop","getBottom","getLeft","getRight","render","self","lineLength","rightPoint","isPositioned","shift","symb","hasSymbolUnder","len","diff","Math","abs","leftPoint","bottomPoint","renderLines","drawLineTo","origin","indexOf","line","right","bottom","top","left","symbolX","symbolY","symbolTop","symbolRight","symbolLeft","isOnSameColumn","isOnSameLine","isUnder","isUpper","isLeft","isRight","maxX","lineWith","rightStart","topEnd","bottomStart","diffX","leftStart","topStart","leftEnd","rightEnd","l","llen","lines","otherLine","ePath","lPath","iP","lenP","newPath","line1_from_x","line1_from_y","line1_to_x","line1_to_y","lP","lenlP","newLinePath","line2_from_x","line2_from_y","line2_to_x","line2_to_y","res","onLine1","onLine2","newSegment","splice","minXFromSymbols","maxXFromLine","drawPath","location","points","path","pathValues","from","to","toString","arrow-end","centerText","textPath","isHorizontal","firstTo","line1StartX","line1StartY","line1EndX","line1EndY","line2StartX","line2StartY","line2EndX","line2EndY","denominator","b","numerator1","numerator2","result","input","getStyle","s","startIndex","endIndex","getSymbValue","getSymbol","getNextPath","flowSymb","trim","start","drawSVG","container","getDisplaySymbol","dispSymbols","Start","diagram","End","Operation","InputOutput","Subroutine","Condition","Parallel","Error","clean","constructChart","prevDisp","prev","dispSymb","startWith","pathOk","yes","no","path1","path2","path3","then","prevBreak","i0","i0len","line0","replace","substr","currentLine","parts","function","params","match","entries","entry","sub","join","txtAndState","pop","flowSymbols","iS","lenS","symbVal","realSymb","direction","condOpt","nextSymb","lineStyleSymbols","iSS","lenSS","curSymb","nextSymbol","JSON","textMargin","yes_direction","no_direction","direction_yes","direction_no","max","startX","startY","yes_symbol","no_symbol","bottom_symbol","right_symbol","rect","path1_direction","path2_direction","path3_direction","direction_next","direction_path1","direction_path2","direction_path3","path1_symbol","path2_symbol","path3_symbol","top_symbol","topPoint","left_symbol","Raphael","handle","flowChart","maxHeight","maxY","minX","minY","x2","y2","scale","lineWidth","setSize","setViewBox","paperDom","canvas","parentNode","removeChild","line-width","line-length","text-margin","font-color","line-color","element-color","yes-text","no-text","class","end","condition","inputoutput","operation","subroutine","parallel","Array","searchElement","TypeError","t","n","arguments","Number","Infinity","floor","k","lastIndexOf","min","String","innerWrap","jQuery","$","paramFit","needle","haystack","isArray","includes","methods","init","each","$this","html","setFlowStateByParam","param","paramValue","newFlowState","nextSymbolKeys","property","hasOwnProperty","val","nski","nextSymbolKey","clearFlowState","fn","methodOrOptions","apply","slice","error"],"mappings":";;;;;CAAA,SAAAA,EAAAC,GACA,mBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,EAAAG,QAAA,gBACA,sBAAAC,gBAAAC,IACAD,QAAA,WAAAJ,OACA,CACA,GAAAM,GAAAN,EAAA,gBAAAC,SAAAE,QAAA,WAAAJ,EAAA,QACA,QAAAQ,KAAAD,IAAA,gBAAAL,iBAAAF,GAAAQ,GAAAD,EAAAC,KAECC,KAAA,SAAAC,GACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAX,OAGA,IAAAC,GAAAW,EAAAD,IACAX,WACAa,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAd,EAAAD,QAAAC,IAAAD,QAAAU,GAGAT,EAAAa,QAAA,EAGAb,EAAAD,QAvBA,GAAAY,KAqCA,OATAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,GAGAR,EAAA,KDmBM,SAAST,EAAQD,EAASU,GEzDhCA,EAAA,EACA,IAAAS,GAAAT,EAAA,EACAA,GAAA,GAEA,IAAAU,IACAD,QAGA,oBAAAE,UACAA,OAAAC,UAAAF,GAGAnB,EAAAD,QAAAoB,GFmEM,SAASnB,EAAQD,GG/EvB,QAAAuB,GAAAC,EAAAC,GACA,IAAAD,GAAA,kBAAAA,GACA,MAAAC,EAGA,IAAAC,KACA,QAAAC,KAAAF,GACAC,EAAAC,GAAAF,EAAAE,EAGA,KAAAA,IAAAH,GACAA,EAAAG,KACA,gBAAAD,GAAAC,GACAD,EAAAC,GAAAJ,EAAAG,EAAAC,GAAAH,EAAAG,IAEAD,EAAAC,GAAAH,EAAAG,GAIA,OAAAD,GA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EAAAyD,QAAA2Q,EACAtT,GAAAP,UAAA,GAIAP,EAAA+L,QACA/L,EAAAkL,QAAAvN,SAKAyV,GAAAsB,GAAAnE,UAAA,SAAAoE,GACA,MAAAjB,GAAAiB,GACAjB,EAAAiB,GAAAC,MAAAjX,KAAA0U,MAAAhT,UAAAwV,MAAA1W,KAAAuU,UAAA,IACA,gBAAAiC,UAIAvB,GAAA0B,MAAA,UAAAH,EAAA,uCAFAjB,EAAAC,KAAAiB,MAAAjX,KAAA+U,aAMAS,UjBskEM,SAAS9V,EAAQD,GkBppEvBC,EAAAD,QAAAQ","file":"flowchart.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"Raphael\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"Raphael\"], factory);\n\telse {\n\t\tvar a = typeof exports === 'object' ? factory(require(\"Raphael\")) : factory(root[\"Raphael\"]);\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(this, function(__WEBPACK_EXTERNAL_MODULE_16__) {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"Raphael\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"Raphael\"], factory);\n\telse {\n\t\tvar a = typeof exports === 'object' ? factory(require(\"Raphael\")) : factory(root[\"Raphael\"]);\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(this, function(__WEBPACK_EXTERNAL_MODULE_16__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/*!******************!*\\\n !*** ./index.js ***!\n \\******************/\n/***/ function(module, exports, __webpack_require__) {\n\n\t__webpack_require__(/*! ./src/flowchart.shim */ 9);\n\tvar parse = __webpack_require__(/*! ./src/flowchart.parse */ 4);\n\t__webpack_require__(/*! ./src/jquery-plugin */ 15);\n\t\n\tvar FlowChart = {\n\t\tparse: parse\n\t};\n\t\n\tif (typeof window !== 'undefined') {\n\t\twindow.flowchart = FlowChart;\n\t}\n\t\n\tmodule.exports = FlowChart;\n\n\n/***/ },\n/* 1 */\n/*!**********************************!*\\\n !*** ./src/flowchart.helpers.js ***!\n \\**********************************/\n/***/ function(module, exports) {\n\n\tfunction _defaults(options, defaultOptions) {\n\t if (!options || typeof options === 'function') {\n\t return defaultOptions;\n\t }\n\t\n\t var merged = {};\n\t for (var attrname in defaultOptions) {\n\t merged[attrname] = defaultOptions[attrname];\n\t }\n\t\n\t for (attrname in options) {\n\t if (options[attrname]) {\n\t if (typeof merged[attrname] === 'object') {\n\t merged[attrname] = _defaults(merged[attrname], options[attrname]);\n\t } else {\n\t merged[attrname] = options[attrname];\n\t }\n\t }\n\t }\n\t return merged;\n\t}\n\t\n\tfunction _inherits(ctor, superCtor) {\n\t if (typeof(Object.create) === 'function') {\n\t // implementation from standard node.js 'util' module\n\t ctor.super_ = superCtor;\n\t ctor.prototype = Object.create(superCtor.prototype, {\n\t constructor: {\n\t value: ctor,\n\t enumerable: false,\n\t writable: true,\n\t configurable: true\n\t }\n\t });\n\t } else {\n\t // old school shim for old browsers\n\t ctor.super_ = superCtor;\n\t var TempCtor = function () {};\n\t TempCtor.prototype = superCtor.prototype;\n\t ctor.prototype = new TempCtor();\n\t ctor.prototype.constructor = ctor;\n\t }\n\t}\n\t\n\t// move dependent functions to a container so that\n\t// they can be overriden easier in no jquery environment (node.js)\n\tmodule.exports = {\n\t defaults: _defaults,\n\t inherits: _inherits\n\t};\n\n\n/***/ },\n/* 2 */\n/*!*********************************!*\\\n !*** ./src/flowchart.symbol.js ***!\n \\*********************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar drawAPI = __webpack_require__(/*! ./flowchart.functions */ 3);\n\tvar drawLine = drawAPI.drawLine;\n\tvar checkLineIntersection = drawAPI.checkLineIntersection;\n\t\n\tfunction Symbol(chart, options, symbol) {\n\t this.chart = chart;\n\t this.group = this.chart.paper.set();\n\t this.symbol = symbol;\n\t this.connectedTo = [];\n\t this.symbolType = options.symbolType;\n\t this.flowstate = (options.flowstate || 'future');\n\t this.lineStyle = (options.lineStyle || {});\n\t this.key = (options.key || '');\n\t\n\t this.next_direction = options.next && options['direction_next'] ? options['direction_next'] : undefined;\n\t\n\t this.text = this.chart.paper.text(0, 0, options.text);\n\t //Raphael does not support the svg group tag so setting the text node id to the symbol node id plus t\n\t if (options.key) { this.text.node.id = options.key + 't'; }\n\t this.text.node.setAttribute('class', this.getAttr('class') + 't');\n\t\n\t this.text.attr({\n\t 'text-anchor': 'start',\n\t 'x' : this.getAttr('text-margin'),\n\t 'fill' : this.getAttr('font-color'),\n\t 'font-size' : this.getAttr('font-size')\n\t });\n\t\n\t var font = this.getAttr('font');\n\t var fontF = this.getAttr('font-family');\n\t var fontW = this.getAttr('font-weight');\n\t\n\t if (font) this.text.attr({ 'font': font });\n\t if (fontF) this.text.attr({ 'font-family': fontF });\n\t if (fontW) this.text.attr({ 'font-weight': fontW });\n\t\n\t if (options.link) { this.text.attr('href', options.link); }\n\t \n\t //ndrqu Add click function with event and options params\n\t if (options.function) { \n\t this.text.attr({ 'cursor' : 'pointer' });\n\t\n\t this.text.node.addEventListener(\"click\", function(evt) {\n\t window[options.function](evt,options);\n\t }, false);\n\t }\n\t \n\t if (options.target) { this.text.attr('target', options.target); }\n\t\n\t var maxWidth = this.getAttr('maxWidth');\n\t if (maxWidth) {\n\t // using this approach: http://stackoverflow.com/a/3153457/22466\n\t var words = options.text.split(' ');\n\t var tempText = \"\";\n\t for (var i=0, ii=words.length; i<ii; i++) {\n\t var word = words[i];\n\t this.text.attr(\"text\", tempText + \" \" + word);\n\t if (this.text.getBBox().width > maxWidth) {\n\t tempText += \"\\n\" + word;\n\t } else {\n\t tempText += \" \" + word;\n\t }\n\t }\n\t this.text.attr(\"text\", tempText.substring(1));\n\t }\n\t\n\t this.group.push(this.text);\n\t\n\t if (symbol) {\n\t var tmpMargin = this.getAttr('text-margin');\n\t\n\t symbol.attr({\n\t 'fill' : this.getAttr('fill'),\n\t 'stroke' : this.getAttr('element-color'),\n\t 'stroke-width' : this.getAttr('line-width'),\n\t 'width' : this.text.getBBox().width + 2 * tmpMargin,\n\t 'height' : this.text.getBBox().height + 2 * tmpMargin\n\t });\n\t\n\t symbol.node.setAttribute('class', this.getAttr('class'));\n\t\n\t if (options.link) { symbol.attr('href', options.link); }\n\t if (options.target) { symbol.attr('target', options.target); }\n\t\n\t //ndrqu Add click function with event and options params\n\t if (options.function) { \n\t symbol.node.addEventListener(\"click\", function(evt) {\n\t window[options.function](evt,options);\n\t }, false);\n\t symbol.attr({ 'cursor' : 'pointer' });\n\t }\n\t if (options.key) { symbol.node.id = options.key; }\n\t\n\t this.group.push(symbol);\n\t symbol.insertBefore(this.text);\n\t\n\t this.text.attr({\n\t 'y': symbol.getBBox().height/2\n\t });\n\t\n\t this.initialize();\n\t }\n\t\n\t}\n\t\n\t/* Gets the attribute based on Flowstate, Symbol-Name and default, first found wins */\n\tSymbol.prototype.getAttr = function(attName) {\n\t if (!this.chart) {\n\t return undefined;\n\t }\n\t var opt3 = (this.chart.options) ? this.chart.options[attName] : undefined;\n\t var opt2 = (this.chart.options.symbols) ? this.chart.options.symbols[this.symbolType][attName] : undefined;\n\t var opt1;\n\t if (this.chart.options.flowstate && this.chart.options.flowstate[this.flowstate]) {\n\t opt1 = this.chart.options.flowstate[this.flowstate][attName];\n\t }\n\t return (opt1 || opt2 || opt3);\n\t};\n\t\n\tSymbol.prototype.initialize = function() {\n\t this.group.transform('t' + this.getAttr('line-width') + ',' + this.getAttr('line-width'));\n\t\n\t this.width = this.group.getBBox().width;\n\t this.height = this.group.getBBox().height;\n\t};\n\t\n\tSymbol.prototype.getCenter = function() {\n\t return {x: this.getX() + this.width/2,\n\t y: this.getY() + this.height/2};\n\t};\n\t\n\tSymbol.prototype.getX = function() {\n\t return this.group.getBBox().x;\n\t};\n\t\n\tSymbol.prototype.getY = function() {\n\t return this.group.getBBox().y;\n\t};\n\t\n\tSymbol.prototype.shiftX = function(x) {\n\t this.group.transform('t' + (this.getX() + x) + ',' + this.getY());\n\t};\n\t\n\tSymbol.prototype.setX = function(x) {\n\t this.group.transform('t' + x + ',' + this.getY());\n\t};\n\t\n\tSymbol.prototype.shiftY = function(y) {\n\t this.group.transform('t' + this.getX() + ',' + (this.getY() + y));\n\t};\n\t\n\tSymbol.prototype.setY = function(y) {\n\t this.group.transform('t' + this.getX() + ',' + y);\n\t};\n\t\n\tSymbol.prototype.getTop = function() {\n\t var y = this.getY();\n\t var x = this.getX() + this.width/2;\n\t return {x: x, y: y};\n\t};\n\t\n\tSymbol.prototype.getBottom = function() {\n\t var y = this.getY() + this.height;\n\t var x = this.getX() + this.width/2;\n\t return {x: x, y: y};\n\t};\n\t\n\tSymbol.prototype.getLeft = function() {\n\t var y = this.getY() + this.group.getBBox().height/2;\n\t var x = this.getX();\n\t return {x: x, y: y};\n\t};\n\t\n\tSymbol.prototype.getRight = function() {\n\t var y = this.getY() + this.group.getBBox().height/2;\n\t var x = this.getX() + this.group.getBBox().width;\n\t return {x: x, y: y};\n\t};\n\t\n\tSymbol.prototype.render = function() {\n\t if (this.next) {\n\t\n\t var self = this;\n\t var lineLength = this.getAttr('line-length');\n\t\n\t if (this.next_direction === 'right') {\n\t\n\t var rightPoint = this.getRight();\n\t\n\t if (!this.next.isPositioned) {\n\t this.next.setY(rightPoint.y - this.next.height/2);\n\t this.next.shiftX(this.group.getBBox().x + this.width + lineLength);\n\t\n\t (function shift() {\n\t var hasSymbolUnder = false;\n\t var symb;\n\t for (var i = 0, len = self.chart.symbols.length; i < len; i++) {\n\t symb = self.chart.symbols[i];\n\t\n\t var diff = Math.abs(symb.getCenter().x - self.next.getCenter().x);\n\t if (symb.getCenter().y > self.next.getCenter().y && diff <= self.next.width/2) {\n\t hasSymbolUnder = true;\n\t break;\n\t }\n\t }\n\t\n\t if (hasSymbolUnder) {\n\t if (self.next.symbolType === 'end') return;\n\t self.next.setX(symb.getX() + symb.width + lineLength);\n\t shift();\n\t }\n\t })();\n\t\n\t this.next.isPositioned = true;\n\t\n\t this.next.render();\n\t }\n\t } else if (this.next_direction === 'left') {\n\t\n\t var leftPoint = this.getLeft();\n\t\n\t if (!this.next.isPositioned) {\n\t this.next.setY(leftPoint.y - this.next.height/2);\n\t this.next.shiftX(-(this.group.getBBox().x + this.width + lineLength));\n\t\n\t (function shift() {\n\t var hasSymbolUnder = false;\n\t var symb;\n\t for (var i = 0, len = self.chart.symbols.length; i < len; i++) {\n\t symb = self.chart.symbols[i];\n\t\n\t var diff = Math.abs(symb.getCenter().x - self.next.getCenter().x);\n\t if (symb.getCenter().y > self.next.getCenter().y && diff <= self.next.width/2) {\n\t hasSymbolUnder = true;\n\t break;\n\t }\n\t }\n\t\n\t if (hasSymbolUnder) {\n\t if (self.next.symbolType === 'end') return;\n\t self.next.setX(symb.getX() + symb.width + lineLength);\n\t shift();\n\t }\n\t })();\n\t\n\t this.next.isPositioned = true;\n\t\n\t this.next.render();\n\t }\n\t } else {\n\t var bottomPoint = this.getBottom();\n\t\n\t if (!this.next.isPositioned) {\n\t this.next.shiftY(this.getY() + this.height + lineLength);\n\t this.next.setX(bottomPoint.x - this.next.width/2);\n\t this.next.isPositioned = true;\n\t\n\t this.next.render();\n\t }\n\t }\n\t }\n\t};\n\t\n\tSymbol.prototype.renderLines = function() {\n\t if (this.next) {\n\t if (this.next_direction) {\n\t this.drawLineTo(this.next, this.getAttr('arrow-text') || '', this.next_direction);\n\t } else {\n\t this.drawLineTo(this.next, this.getAttr('arrow-text') || '');\n\t }\n\t }\n\t};\n\t\n\tSymbol.prototype.drawLineTo = function(symbol, text, origin) {\n\t if (this.connectedTo.indexOf(symbol) < 0) {\n\t this.connectedTo.push(symbol);\n\t }\n\t\n\t var x = this.getCenter().x,\n\t y = this.getCenter().y,\n\t right = this.getRight(),\n\t bottom = this.getBottom(),\n\t top = this.getTop(),\n\t left = this.getLeft();\n\t\n\t var symbolX = symbol.getCenter().x,\n\t symbolY = symbol.getCenter().y,\n\t symbolTop = symbol.getTop(),\n\t symbolRight = symbol.getRight(),\n\t symbolLeft = symbol.getLeft();\n\t\n\t var isOnSameColumn = x === symbolX,\n\t isOnSameLine = y === symbolY,\n\t isUnder = y < symbolY,\n\t isUpper = y > symbolY || this === symbol,\n\t isLeft = x > symbolX,\n\t isRight = x < symbolX;\n\t\n\t var maxX = 0,\n\t line,\n\t lineLength = this.getAttr('line-length'),\n\t lineWith = this.getAttr('line-width');\n\t\n\t if ((!origin || origin === 'bottom') && isOnSameColumn && isUnder) {\n\t line = drawLine(this.chart, bottom, symbolTop, text);\n\t this.bottomStart = true;\n\t symbol.topEnd = true;\n\t maxX = bottom.x;\n\t } else if ((!origin || origin === 'right') && isOnSameLine && isRight) {\n\t line = drawLine(this.chart, right, symbolLeft, text);\n\t this.rightStart = true;\n\t symbol.leftEnd = true;\n\t maxX = symbolLeft.x;\n\t } else if ((!origin || origin === 'left') && isOnSameLine && isLeft) {\n\t line = drawLine(this.chart, left, symbolRight, text);\n\t this.leftStart = true;\n\t symbol.rightEnd = true;\n\t maxX = symbolRight.x;\n\t } else if ((!origin || origin === 'right') && isOnSameColumn && isUpper) {\n\t line = drawLine(this.chart, right, [\n\t {x: right.x + lineLength/2, y: right.y},\n\t {x: right.x + lineLength/2, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y}\n\t ], text);\n\t this.rightStart = true;\n\t symbol.topEnd = true;\n\t maxX = right.x + lineLength/2;\n\t } else if ((!origin || origin === 'right') && isOnSameColumn && isUnder) {\n\t line = drawLine(this.chart, right, [\n\t {x: right.x + lineLength/2, y: right.y},\n\t {x: right.x + lineLength/2, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y}\n\t ], text);\n\t this.rightStart = true;\n\t symbol.topEnd = true;\n\t maxX = right.x + lineLength/2;\n\t } else if ((!origin || origin === 'bottom') && isLeft) {\n\t if (this.leftEnd && isUpper) {\n\t line = drawLine(this.chart, bottom, [\n\t {x: bottom.x, y: bottom.y + lineLength/2},\n\t {x: bottom.x + (bottom.x - symbolTop.x)/2, y: bottom.y + lineLength/2},\n\t {x: bottom.x + (bottom.x - symbolTop.x)/2, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y}\n\t ], text);\n\t } else {\n\t line = drawLine(this.chart, bottom, [\n\t {x: bottom.x, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y}\n\t ], text);\n\t }\n\t this.bottomStart = true;\n\t symbol.topEnd = true;\n\t maxX = bottom.x + (bottom.x - symbolTop.x)/2;\n\t } else if ((!origin || origin === 'bottom') && isRight && isUnder) {\n\t line = drawLine(this.chart, bottom, [\n\t {x: bottom.x, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y}\n\t ], text);\n\t this.bottomStart = true;\n\t symbol.topEnd = true;\n\t maxX = bottom.x;\n\t if (symbolTop.x > maxX) maxX = symbolTop.x;\n\t } else if ((!origin || origin === 'bottom') && isRight) {\n\t line = drawLine(this.chart, bottom, [\n\t {x: bottom.x, y: bottom.y + lineLength/2},\n\t {x: bottom.x + (bottom.x - symbolTop.x)/2, y: bottom.y + lineLength/2},\n\t {x: bottom.x + (bottom.x - symbolTop.x)/2, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y}\n\t ], text);\n\t this.bottomStart = true;\n\t symbol.topEnd = true;\n\t maxX = bottom.x + (bottom.x - symbolTop.x)/2;\n\t } else if ((origin && origin === 'right') && isLeft) {\n\t line = drawLine(this.chart, right, [\n\t {x: right.x + lineLength/2, y: right.y},\n\t {x: right.x + lineLength/2, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y}\n\t ], text);\n\t this.rightStart = true;\n\t symbol.topEnd = true;\n\t maxX = right.x + lineLength/2;\n\t } else if ((origin && origin === 'right') && isRight) {\n\t line = drawLine(this.chart, right, [\n\t {x: symbolTop.x, y: right.y},\n\t {x: symbolTop.x, y: symbolTop.y}\n\t ], text);\n\t this.rightStart = true;\n\t symbol.topEnd = true;\n\t maxX = right.x + lineLength/2;\n\t } else if ((origin && origin === 'bottom') && isOnSameColumn && isUpper) {\n\t line = drawLine(this.chart, bottom, [\n\t {x: bottom.x, y: bottom.y + lineLength/2},\n\t {x: right.x + lineLength/2, y: bottom.y + lineLength/2},\n\t {x: right.x + lineLength/2, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y}\n\t ], text);\n\t this.bottomStart = true;\n\t symbol.topEnd = true;\n\t maxX = bottom.x + lineLength/2;\n\t } else if ((origin === 'left') && isOnSameColumn && isUpper) {\n\t var diffX = left.x - lineLength/2;\n\t if (symbolLeft.x < left.x) {\n\t diffX = symbolLeft.x - lineLength/2;\n\t }\n\t line = drawLine(this.chart, left, [\n\t {x: diffX, y: left.y},\n\t {x: diffX, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y}\n\t ], text);\n\t this.leftStart = true;\n\t symbol.topEnd = true;\n\t maxX = left.x;\n\t } else if ((origin === 'left')) {\n\t line = drawLine(this.chart, left, [\n\t {x: symbolTop.x + (left.x - symbolTop.x)/2, y: left.y},\n\t {x: symbolTop.x + (left.x - symbolTop.x)/2, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y}\n\t ], text);\n\t this.leftStart = true;\n\t symbol.topEnd = true;\n\t maxX = left.x;\n\t } else if ((origin === 'top')) {\n\t line = drawLine(this.chart, top, [\n\t {x: top.x, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n\t {x: symbolTop.x, y: symbolTop.y}\n\t ], text);\n\t this.topStart = true;\n\t symbol.topEnd = true;\n\t maxX = top.x;\n\t }\n\t\n\t //update line style\n\t if (this.lineStyle[symbol.key] && line){\n\t line.attr(this.lineStyle[symbol.key]);\n\t }\n\t\n\t if (line) {\n\t for (var l = 0, llen = this.chart.lines.length; l < llen; l++) {\n\t var otherLine = this.chart.lines[l];\n\t\n\t var ePath = otherLine.attr('path'),\n\t lPath = line.attr('path');\n\t\n\t for (var iP = 0, lenP = ePath.length - 1; iP < lenP; iP++) {\n\t var newPath = [];\n\t newPath.push(['M', ePath[iP][1], ePath[iP][2]]);\n\t newPath.push(['L', ePath[iP + 1][1], ePath[iP + 1][2]]);\n\t\n\t var line1_from_x = newPath[0][1];\n\t var line1_from_y = newPath[0][2];\n\t var line1_to_x = newPath[1][1];\n\t var line1_to_y = newPath[1][2];\n\t\n\t for (var lP = 0, lenlP = lPath.length - 1; lP < lenlP; lP++) {\n\t var newLinePath = [];\n\t newLinePath.push(['M', lPath[lP][1], lPath[lP][2]]);\n\t newLinePath.push(['L', lPath[lP + 1][1], lPath[lP + 1][2]]);\n\t\n\t var line2_from_x = newLinePath[0][1];\n\t var line2_from_y = newLinePath[0][2];\n\t var line2_to_x = newLinePath[1][1];\n\t var line2_to_y = newLinePath[1][2];\n\t\n\t var res = checkLineIntersection(line1_from_x, line1_from_y, line1_to_x, line1_to_y, line2_from_x, line2_from_y, line2_to_x, line2_to_y);\n\t if (res.onLine1 && res.onLine2) {\n\t\n\t var newSegment;\n\t if (line2_from_y === line2_to_y) {\n\t if (line2_from_x > line2_to_x) {\n\t newSegment = ['L', res.x + lineWith * 2, line2_from_y];\n\t lPath.splice(lP + 1, 0, newSegment);\n\t newSegment = ['C', res.x + lineWith * 2, line2_from_y, res.x, line2_from_y - lineWith * 4, res.x - lineWith * 2, line2_from_y];\n\t lPath.splice(lP + 2, 0, newSegment);\n\t line.attr('path', lPath);\n\t } else {\n\t newSegment = ['L', res.x - lineWith * 2, line2_from_y];\n\t lPath.splice(lP + 1, 0, newSegment);\n\t newSegment = ['C', res.x - lineWith * 2, line2_from_y, res.x, line2_from_y - lineWith * 4, res.x + lineWith * 2, line2_from_y];\n\t lPath.splice(lP + 2, 0, newSegment);\n\t line.attr('path', lPath);\n\t }\n\t } else {\n\t if (line2_from_y > line2_to_y) {\n\t newSegment = ['L', line2_from_x, res.y + lineWith * 2];\n\t lPath.splice(lP + 1, 0, newSegment);\n\t newSegment = ['C', line2_from_x, res.y + lineWith * 2, line2_from_x + lineWith * 4, res.y, line2_from_x, res.y - lineWith * 2];\n\t lPath.splice(lP + 2, 0, newSegment);\n\t line.attr('path', lPath);\n\t } else {\n\t newSegment = ['L', line2_from_x, res.y - lineWith * 2];\n\t lPath.splice(lP + 1, 0, newSegment);\n\t newSegment = ['C', line2_from_x, res.y - lineWith * 2, line2_from_x + lineWith * 4, res.y, line2_from_x, res.y + lineWith * 2];\n\t lPath.splice(lP + 2, 0, newSegment);\n\t line.attr('path', lPath);\n\t }\n\t }\n\t\n\t lP += 2;\n\t }\n\t }\n\t }\n\t }\n\t\n\t this.chart.lines.push(line);\n\t if (this.chart.minXFromSymbols === undefined || this.chart.minXFromSymbols > left.x) {\n\t this.chart.minXFromSymbols = left.x;\n\t }\n\t }\n\t\n\t if (!this.chart.maxXFromLine || (this.chart.maxXFromLine && maxX > this.chart.maxXFromLine)) {\n\t this.chart.maxXFromLine = maxX;\n\t }\n\t};\n\t\n\tmodule.exports = Symbol;\n\n\n/***/ },\n/* 3 */\n/*!************************************!*\\\n !*** ./src/flowchart.functions.js ***!\n \\************************************/\n/***/ function(module, exports) {\n\n\tfunction drawPath(chart, location, points) {\n\t var i, len;\n\t var path = 'M{0},{1}';\n\t for (i = 2, len = 2 * points.length + 2; i < len; i+=2) {\n\t path += ' L{' + i + '},{' + (i + 1) + '}';\n\t }\n\t var pathValues = [location.x, location.y];\n\t for (i = 0, len = points.length; i < len; i++) {\n\t pathValues.push(points[i].x);\n\t pathValues.push(points[i].y);\n\t }\n\t var symbol = chart.paper.path(path, pathValues);\n\t symbol.attr('stroke', chart.options['element-color']);\n\t symbol.attr('stroke-width', chart.options['line-width']);\n\t\n\t var font = chart.options.font;\n\t var fontF = chart.options['font-family'];\n\t var fontW = chart.options['font-weight'];\n\t\n\t if (font) symbol.attr({ 'font': font });\n\t if (fontF) symbol.attr({ 'font-family': fontF });\n\t if (fontW) symbol.attr({ 'font-weight': fontW });\n\t\n\t return symbol;\n\t}\n\t\n\tfunction drawLine(chart, from, to, text) {\n\t var i, len;\n\t\n\t if (Object.prototype.toString.call(to) !== '[object Array]') {\n\t to = [to];\n\t }\n\t\n\t var path = 'M{0},{1}';\n\t for (i = 2, len = 2 * to.length + 2; i < len; i+=2) {\n\t path += ' L{' + i + '},{' + (i + 1) + '}';\n\t }\n\t var pathValues = [from.x, from.y];\n\t for (i = 0, len = to.length; i < len; i++) {\n\t pathValues.push(to[i].x);\n\t pathValues.push(to[i].y);\n\t }\n\t\n\t var line = chart.paper.path(path, pathValues);\n\t line.attr({\n\t stroke: chart.options['line-color'],\n\t 'stroke-width': chart.options['line-width'],\n\t 'arrow-end': chart.options['arrow-end']\n\t });\n\t\n\t var font = chart.options.font;\n\t var fontF = chart.options['font-family'];\n\t var fontW = chart.options['font-weight'];\n\t\n\t if (font) line.attr({ 'font': font });\n\t if (fontF) line.attr({ 'font-family': fontF });\n\t if (fontW) line.attr({ 'font-weight': fontW });\n\t\n\t if (text) {\n\t\n\t var centerText = false;\n\t\n\t var textPath = chart.paper.text(0, 0, text);\n\t\n\t var isHorizontal = false;\n\t var firstTo = to[0];\n\t\n\t if (from.y === firstTo.y) {\n\t isHorizontal = true;\n\t }\n\t\n\t var x = 0,\n\t y = 0;\n\t\n\t if (centerText) {\n\t if (from.x > firstTo.x) {\n\t x = from.x - (from.x - firstTo.x)/2;\n\t } else {\n\t x = firstTo.x - (firstTo.x - from.x)/2;\n\t }\n\t\n\t if (from.y > firstTo.y) {\n\t y = from.y - (from.y - firstTo.y)/2;\n\t } else {\n\t y = firstTo.y - (firstTo.y - from.y)/2;\n\t }\n\t\n\t if (isHorizontal) {\n\t x -= textPath.getBBox().width/2;\n\t y -= chart.options['text-margin'];\n\t } else {\n\t x += chart.options['text-margin'];\n\t y -= textPath.getBBox().height/2;\n\t }\n\t } else {\n\t x = from.x;\n\t y = from.y;\n\t\n\t if (isHorizontal) {\n\t x += chart.options['text-margin']/2;\n\t y -= chart.options['text-margin'];\n\t } else {\n\t x += chart.options['text-margin']/2;\n\t y += chart.options['text-margin'];\n\t if (from.y > firstTo.y) {\n\t y -= chart.options['text-margin']*2;\n\t }\n\t }\n\t }\n\t\n\t textPath.attr({\n\t 'text-anchor': 'start',\n\t 'font-size': chart.options['font-size'],\n\t 'fill': chart.options['font-color'],\n\t x: x,\n\t y: y\n\t });\n\t\n\t if (font) textPath.attr({ 'font': font });\n\t if (fontF) textPath.attr({ 'font-family': fontF });\n\t if (fontW) textPath.attr({ 'font-weight': fontW });\n\t }\n\t\n\t return line;\n\t}\n\t\n\tfunction checkLineIntersection(line1StartX, line1StartY, line1EndX, line1EndY, line2StartX, line2StartY, line2EndX, line2EndY) {\n\t // if the lines intersect, the result contains the x and y of the intersection (treating the lines as infinite) and booleans for whether line segment 1 or line segment 2 contain the point\n\t var denominator, a, b, numerator1, numerator2, result = {\n\t x: null,\n\t y: null,\n\t onLine1: false,\n\t onLine2: false\n\t };\n\t denominator = ((line2EndY - line2StartY) * (line1EndX - line1StartX)) - ((line2EndX - line2StartX) * (line1EndY - line1StartY));\n\t if (denominator === 0) {\n\t return result;\n\t }\n\t a = line1StartY - line2StartY;\n\t b = line1StartX - line2StartX;\n\t numerator1 = ((line2EndX - line2StartX) * a) - ((line2EndY - line2StartY) * b);\n\t numerator2 = ((line1EndX - line1StartX) * a) - ((line1EndY - line1StartY) * b);\n\t a = numerator1 / denominator;\n\t b = numerator2 / denominator;\n\t\n\t // if we cast these lines infinitely in both directions, they intersect here:\n\t result.x = line1StartX + (a * (line1EndX - line1StartX));\n\t result.y = line1StartY + (a * (line1EndY - line1StartY));\n\t /*\n\t // it is worth noting that this should be the same as:\n\t x = line2StartX + (b * (line2EndX - line2StartX));\n\t y = line2StartX + (b * (line2EndY - line2StartY));\n\t */\n\t // if line1 is a segment and line2 is infinite, they intersect if:\n\t if (a > 0 && a < 1) {\n\t result.onLine1 = true;\n\t }\n\t // if line2 is a segment and line1 is infinite, they intersect if:\n\t if (b > 0 && b < 1) {\n\t result.onLine2 = true;\n\t }\n\t // if line1 and line2 are segments, they intersect if both of the above are true\n\t return result;\n\t}\n\t\n\tmodule.exports = {\n\t\tdrawPath: drawPath,\n\t\tdrawLine: drawLine,\n\t\tcheckLineIntersection: checkLineIntersection\n\t};\n\n\n/***/ },\n/* 4 */\n/*!********************************!*\\\n !*** ./src/flowchart.parse.js ***!\n \\********************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar FlowChart = __webpack_require__(/*! ./flowchart.chart */ 7);\n\tvar Start = __webpack_require__(/*! ./flowchart.symbol.start */ 13);\n\tvar End = __webpack_require__(/*! ./flowchart.symbol.end */ 10);\n\tvar Operation = __webpack_require__(/*! ./flowchart.symbol.operation */ 12);\n\tvar InputOutput = __webpack_require__(/*! ./flowchart.symbol.inputoutput */ 11);\n\tvar Subroutine = __webpack_require__(/*! ./flowchart.symbol.subroutine */ 14);\n\tvar Condition = __webpack_require__(/*! ./flowchart.symbol.condition */ 5);\n\tvar Parallel = __webpack_require__(/*! ./flowchart.symbol.parallel */ 6);\n\t\n\tfunction parse(input) {\n\t input = input || '';\n\t input = input.trim();\n\t\n\t var chart = {\n\t symbols: {},\n\t start: null,\n\t drawSVG: function(container, options) {\n\t var self = this;\n\t\n\t if (this.diagram) {\n\t this.diagram.clean();\n\t }\n\t\n\t var diagram = new FlowChart(container, options);\n\t this.diagram = diagram;\n\t var dispSymbols = {};\n\t\n\t function getDisplaySymbol(s) {\n\t if (dispSymbols[s.key]) {\n\t return dispSymbols[s.key];\n\t }\n\t\n\t switch (s.symbolType) {\n\t case 'start':\n\t dispSymbols[s.key] = new Start(diagram, s);\n\t break;\n\t case 'end':\n\t dispSymbols[s.key] = new End(diagram, s);\n\t break;\n\t case 'operation':\n\t dispSymbols[s.key] = new Operation(diagram, s);\n\t break;\n\t case 'inputoutput':\n\t dispSymbols[s.key] = new InputOutput(diagram, s);\n\t break;\n\t case 'subroutine':\n\t dispSymbols[s.key] = new Subroutine(diagram, s);\n\t break;\n\t case 'condition':\n\t dispSymbols[s.key] = new Condition(diagram, s);\n\t break;\n\t case 'parallel':\n\t dispSymbols[s.key] = new Parallel(diagram, s);\n\t break;\n\t default:\n\t return new Error('Wrong symbol type!');\n\t }\n\t\n\t return dispSymbols[s.key];\n\t }\n\t\n\t (function constructChart(s, prevDisp, prev) {\n\t var dispSymb = getDisplaySymbol(s);\n\t\n\t if (self.start === s) {\n\t diagram.startWith(dispSymb);\n\t } else if (prevDisp && prev && !prevDisp.pathOk) {\n\t if (prevDisp instanceof(Condition)) {\n\t if (prev.yes === s) {\n\t prevDisp.yes(dispSymb);\n\t }\n\t if (prev.no === s) {\n\t prevDisp.no(dispSymb);\n\t }\n\t } else if (prevDisp instanceof(Parallel)) {\n\t if (prev.path1 === s) {\n\t prevDisp.path1(dispSymb);\n\t }\n\t if (prev.path2 === s) {\n\t prevDisp.path2(dispSymb);\n\t }\n\t if (prev.path3 === s) {\n\t prevDisp.path3(dispSymb);\n\t }\n\t } else {\n\t prevDisp.then(dispSymb);\n\t }\n\t }\n\t\n\t if (dispSymb.pathOk) {\n\t return dispSymb;\n\t }\n\t\n\t if (dispSymb instanceof(Condition)) {\n\t if (s.yes) {\n\t constructChart(s.yes, dispSymb, s);\n\t }\n\t if (s.no) {\n\t constructChart(s.no, dispSymb, s);\n\t }\n\t } else if (dispSymb instanceof(Parallel)) {\n\t if (s.path1) {\n\t constructChart(s.path1, dispSymb, s);\n\t }\n\t if (s.path2) {\n\t constructChart(s.path2, dispSymb, s);\n\t }\n\t if (s.path3) {\n\t constructChart(s.path3, dispSymb, s);\n\t }\n\t } else if (s.next) {\n\t constructChart(s.next, dispSymb, s);\n\t }\n\t\n\t return dispSymb;\n\t })(this.start);\n\t\n\t diagram.render();\n\t },\n\t clean: function() {\n\t this.diagram.clean();\n\t },\n\t options: function() {\n\t return this.diagram.options;\n\t }\n\t };\n\t\n\t var lines = [];\n\t var prevBreak = 0;\n\t for (var i0 = 1, i0len = input.length; i0 < i0len; i0++) {\n\t if(input[i0] === '\\n' && input[i0 - 1] !== '\\\\') {\n\t var line0 = input.substring(prevBreak, i0);\n\t prevBreak = i0 + 1;\n\t lines.push(line0.replace(/\\\\\\n/g, '\\n'));\n\t }\n\t }\n\t\n\t if (prevBreak < input.length) {\n\t lines.push(input.substr(prevBreak));\n\t }\n\t\n\t for (var l = 1, len = lines.length; l < len;) {\n\t var currentLine = lines[l];\n\t\n\t if (currentLine.indexOf('->') < 0 && currentLine.indexOf('=>') < 0 && currentLine.indexOf('@>') < 0) {\n\t lines[l - 1] += '\\n' + currentLine;\n\t lines.splice(l, 1);\n\t len--;\n\t } else {\n\t l++;\n\t }\n\t }\n\t\n\t function getStyle(s){\n\t var startIndex = s.indexOf('(') + 1;\n\t var endIndex = s.indexOf(')');\n\t if (startIndex >= 0 && endIndex >= 0) {\n\t return s.substring(startIndex,endIndex);\n\t }\n\t return '{}';\n\t }\n\t\n\t function getSymbValue(s){\n\t var startIndex = s.indexOf('(') + 1;\n\t var endIndex = s.indexOf(')');\n\t if (startIndex >= 0 && endIndex >= 0) {\n\t return s.substring(startIndex,endIndex);\n\t }\n\t return '';\n\t }\n\t\n\t function getSymbol(s) {\n\t var startIndex = s.indexOf('(') + 1;\n\t var endIndex = s.indexOf(')');\n\t if (startIndex >= 0 && endIndex >= 0) {\n\t return chart.symbols[s.substring(0, startIndex - 1)];\n\t }\n\t return chart.symbols[s];\n\t }\n\t\n\t function getNextPath(s) {\n\t var next = 'next';\n\t var startIndex = s.indexOf('(') + 1;\n\t var endIndex = s.indexOf(')');\n\t if (startIndex >= 0 && endIndex >= 0) {\n\t next = flowSymb.substring(startIndex, endIndex);\n\t if (next.indexOf(',') < 0) {\n\t if (next !== 'yes' && next !== 'no') {\n\t next = 'next, ' + next;\n\t }\n\t }\n\t }\n\t return next;\n\t }\n\t\n\t while (lines.length > 0) {\n\t var line = lines.splice(0, 1)[0].trim();\n\t\n\t if (line.indexOf('=>') >= 0) {\n\t // definition\n\t var parts = line.split('=>');\n\t var symbol = {\n\t key: parts[0].replace(/\\(.*\\)/, ''),\n\t symbolType: parts[1],\n\t text: null,\n\t link: null,\n\t target: null,\n\t flowstate: null,\n\t function: null,\n\t lineStyle: {},\n\t params: {}\n\t };\n\t\n\t //parse parameters\n\t var params = parts[0].match(/\\((.*)\\)/);\n\t if (params && params.length > 1){\n\t var entries = params[1].split(',');\n\t for(var i = 0; i < entries.length; i++) {\n\t var entry = entries[i].split('=');\n\t if (entry.length == 2) {\n\t symbol.params[entry[0]] = entry[1];\n\t }\n\t }\n\t }\n\t\n\t var sub;\n\t\n\t if (symbol.symbolType.indexOf(': ') >= 0) {\n\t sub = symbol.symbolType.split(': ');\n\t symbol.symbolType = sub.shift();\n\t symbol.text = sub.join(': ');\n\t }\n\t\n\t if (symbol.text && symbol.text.indexOf(':$') >= 0) {\n\t sub = symbol.text.split(':$');\n\t symbol.text = sub.shift();\n\t symbol.function = sub.join(':$');\n\t } else if (symbol.symbolType.indexOf(':$') >= 0) {\n\t sub = symbol.symbolType.split(':$');\n\t symbol.symbolType = sub.shift();\n\t symbol.function = sub.join(':$');\n\t } else if (symbol.text && symbol.text.indexOf(':>') >= 0) {\n\t sub = symbol.text.split(':>');\n\t symbol.text = sub.shift();\n\t symbol.link = sub.join(':>');\n\t } else if (symbol.symbolType.indexOf(':>') >= 0) {\n\t sub = symbol.symbolType.split(':>');\n\t symbol.symbolType = sub.shift();\n\t symbol.link = sub.join(':>');\n\t }\n\t\n\t if (symbol.symbolType.indexOf('\\n') >= 0) {\n\t symbol.symbolType = symbol.symbolType.split('\\n')[0];\n\t }\n\t\n\t /* adding support for links */\n\t if (symbol.link) {\n\t var startIndex = symbol.link.indexOf('[') + 1;\n\t var endIndex = symbol.link.indexOf(']');\n\t if (startIndex >= 0 && endIndex >= 0) {\n\t symbol.target = symbol.link.substring(startIndex, endIndex);\n\t symbol.link = symbol.link.substring(0, startIndex - 1);\n\t }\n\t }\n\t /* end of link support */\n\t\n\t /* adding support for flowstates */\n\t if (symbol.text) {\n\t if (symbol.text.indexOf('|') >= 0) {\n\t var txtAndState = symbol.text.split('|');\n\t symbol.flowstate = txtAndState.pop().trim();\n\t symbol.text = txtAndState.join('|');\n\t }\n\t }\n\t /* end of flowstate support */\n\t\n\t chart.symbols[symbol.key] = symbol;\n\t\n\t } else if (line.indexOf('->') >= 0) {\n\t // flow\n\t var flowSymbols = line.split('->');\n\t for (var iS = 0, lenS = flowSymbols.length; iS < lenS; iS++) {\n\t var flowSymb = flowSymbols[iS];\n\t var symbVal = getSymbValue(flowSymb);\n\t\n\t if (symbVal === 'true' || symbVal === 'false') {\n\t // map true or false to yes or no respectively\n\t flowSymb = flowSymb.replace('true', 'yes');\n\t flowSymb = flowSymb.replace('false', 'no');\n\t }\n\t\n\t var realSymb = getSymbol(flowSymb);\n\t var next = getNextPath(flowSymb);\n\t\n\t var direction = null;\n\t if (next.indexOf(',') >= 0) {\n\t var condOpt = next.split(',');\n\t next = condOpt[0];\n\t direction = condOpt[1].trim();\n\t }\n\t\n\t if (!chart.start) {\n\t chart.start = realSymb;\n\t }\n\t\n\t if (iS + 1 < lenS) {\n\t var nextSymb = flowSymbols[iS + 1];\n\t realSymb[next] = getSymbol(nextSymb);\n\t realSymb['direction_' + next] = direction;\n\t direction = null;\n\t }\n\t }\n\t } else if (line.indexOf('@>') >= 0) {\n\t\n\t // line style\n\t var lineStyleSymbols = line.split('@>');\n\t for (var iSS = 0, lenSS = lineStyleSymbols.length; iSS < lenSS; iSS++) {\n\t if ((iSS + 1) !== lenSS) {\n\t var curSymb = getSymbol(lineStyleSymbols[iSS]);\n\t var nextSymbol = getSymbol(lineStyleSymbols[iSS+1]);\n\t\n\t curSymb['lineStyle'][nextSymbol.key] = JSON.parse(getStyle(lineStyleSymbols[iSS + 1]));\n\t }\n\t }\n\t }\n\t\n\t }\n\t return chart;\n\t}\n\t\n\tmodule.exports = parse;\n\n\n/***/ },\n/* 5 */\n/*!*******************************************!*\\\n !*** ./src/flowchart.symbol.condition.js ***!\n \\*******************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar Symbol = __webpack_require__(/*! ./flowchart.symbol */ 2);\n\tvar inherits = __webpack_require__(/*! ./flowchart.helpers */ 1).inherits;\n\tvar drawAPI = __webpack_require__(/*! ./flowchart.functions */ 3);\n\tvar drawPath = drawAPI.drawPath;\n\t\n\tfunction Condition(chart, options) {\n\t options = options || {};\n\t Symbol.call(this, chart, options);\n\t this.textMargin = this.getAttr('text-margin');\n\t this.yes_direction = 'bottom';\n\t this.no_direction = 'right';\n\t this.params = options.params;\n\t if (options.yes && options.direction_yes && options.no && !options.direction_no) {\n\t if (options.direction_yes === 'right') {\n\t this.no_direction = 'bottom';\n\t this.yes_direction = 'right';\n\t } else if (options.direction_yes === 'top') {\n\t this.no_direction = 'right';\n\t this.yes_direction = 'top';\n\t } else {\n\t this.no_direction = 'right';\n\t this.yes_direction = 'bottom';\n\t }\n\t } else if (options.yes && !options.direction_yes && options.no && options.direction_no) {\n\t if (options.direction_no === 'right') {\n\t this.yes_direction = 'bottom';\n\t this.no_direction = 'right';\n\t } else {\n\t this.yes_direction = 'right';\n\t this.no_direction = 'bottom';\n\t }\n\t } else if (options.yes && options.direction_yes && options.no && options.direction_no && options.direction_no !== options.direction_yes) {\n\t if (options.direction_yes === 'right') {\n\t this.no_direction = 'bottom';\n\t this.yes_direction = 'right';\n\t } else if (options.direction_yes === 'top') {\n\t this.no_direction = 'right';\n\t this.yes_direction = 'top';\n\t } else {\n\t this.no_direction = 'right';\n\t this.yes_direction = 'bottom';\n\t }\n\t } else {\n\t this.yes_direction = 'bottom';\n\t this.no_direction = 'right';\n\t }\n\t\n\t this.yes_direction = this.yes_direction || 'bottom';\n\t this.no_direction = this.no_direction || 'right';\n\t\n\t this.text.attr({\n\t x: this.textMargin * 2\n\t });\n\t\n\t var width = this.text.getBBox().width + 3 * this.textMargin;\n\t width += width/2;\n\t var height = this.text.getBBox().height + 2 * this.textMargin;\n\t height += height/2;\n\t height = Math.max(width * 0.5, height);\n\t var startX = width/4;\n\t var startY = height/4;\n\t\n\t this.text.attr({\n\t x: startX + this.textMargin/2\n\t });\n\t\n\t var start = {x: startX, y: startY};\n\t var points = [\n\t {x: startX - width/4, y: startY + height/4},\n\t {x: startX - width/4 + width/2, y: startY + height/4 + height/2},\n\t {x: startX - width/4 + width, y: startY + height/4},\n\t {x: startX - width/4 + width/2, y: startY + height/4 - height/2},\n\t {x: startX - width/4, y: startY + height/4}\n\t ];\n\t\n\t var symbol = drawPath(chart, start, points);\n\t\n\t symbol.attr({\n\t stroke: this.getAttr('element-color'),\n\t 'stroke-width': this.getAttr('line-width'),\n\t fill: this.getAttr('fill')\n\t });\n\t if (options.link) { symbol.attr('href', options.link); }\n\t if (options.target) { symbol.attr('target', options.target); }\n\t if (options.key) { symbol.node.id = options.key; }\n\t symbol.node.setAttribute('class', this.getAttr('class'));\n\t\n\t this.text.attr({\n\t y: symbol.getBBox().height/2\n\t });\n\t\n\t this.group.push(symbol);\n\t symbol.insertBefore(this.text);\n\t\n\t this.initialize();\n\t}\n\tinherits(Condition, Symbol);\n\t\n\tCondition.prototype.render = function() {\n\t\n\t if (this.yes_direction) {\n\t this[this.yes_direction + '_symbol'] = this.yes_symbol;\n\t }\n\t\n\t if (this.no_direction) {\n\t this[this.no_direction + '_symbol'] = this.no_symbol;\n\t }\n\t\n\t var lineLength = this.getAttr('line-length');\n\t\n\t if (this.bottom_symbol) {\n\t var bottomPoint = this.getBottom();\n\t\n\t if (!this.bottom_symbol.isPositioned) {\n\t this.bottom_symbol.shiftY(this.getY() + this.height + lineLength);\n\t this.bottom_symbol.setX(bottomPoint.x - this.bottom_symbol.width/2);\n\t this.bottom_symbol.isPositioned = true;\n\t\n\t this.bottom_symbol.render();\n\t }\n\t }\n\t\n\t if (this.right_symbol) {\n\t var rightPoint = this.getRight();\n\t\n\t if (!this.right_symbol.isPositioned) {\n\t\n\t this.right_symbol.setY(rightPoint.y - this.right_symbol.height/2);\n\t this.right_symbol.shiftX(this.group.getBBox().x + this.width + lineLength);\n\t\n\t var self = this;\n\t (function shift() {\n\t var hasSymbolUnder = false;\n\t var symb;\n\t for (var i = 0, len = self.chart.symbols.length; i < len; i++) {\n\t symb = self.chart.symbols[i];\n\t\n\t if (!self.params['align-next'] || self.params['align-next'] !== 'no') { \n\t var diff = Math.abs(symb.getCenter().x - self.right_symbol.getCenter().x);\n\t if (symb.getCenter().y > self.right_symbol.getCenter().y && diff <= self.right_symbol.width/2) {\n\t hasSymbolUnder = true;\n\t break;\n\t }\n\t }\n\t }\n\t\n\t if (hasSymbolUnder) {\n\t if (self.right_symbol.symbolType === 'end') return;\n\t self.right_symbol.setX(symb.getX() + symb.width + lineLength);\n\t shift();\n\t }\n\t })();\n\t\n\t this.right_symbol.isPositioned = true;\n\t\n\t this.right_symbol.render();\n\t }\n\t }\n\t};\n\t\n\tCondition.prototype.renderLines = function() {\n\t if (this.yes_symbol) {\n\t this.drawLineTo(this.yes_symbol, this.getAttr('yes-text'), this.yes_direction);\n\t }\n\t\n\t if (this.no_symbol) {\n\t this.drawLineTo(this.no_symbol, this.getAttr('no-text'), this.no_direction);\n\t }\n\t};\n\t\n\tmodule.exports = Condition;\n\n\n/***/ },\n/* 6 */\n/*!******************************************!*\\\n !*** ./src/flowchart.symbol.parallel.js ***!\n \\******************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar Symbol = __webpack_require__(/*! ./flowchart.symbol */ 2);\n\tvar inherits = __webpack_require__(/*! ./flowchart.helpers */ 1).inherits;\n\t\n\tfunction Parallel(chart, options) {\n\t var symbol = chart.paper.rect(0, 0, 0, 0);\n\t options = options || {};\n\t Symbol.call(this, chart, options, symbol);\n\t this.textMargin = this.getAttr('text-margin');\n\t this.path1_direction = 'bottom';\n\t this.path2_direction = 'right';\n\t this.path3_direction = 'top';\n\t this.params = options.params;\n\t if (options.direction_next === 'path1' && !options[options.direction_next] && options.next) {\n\t options[options.direction_next] = options.next;\n\t }\n\t if (options.direction_next === 'path2' && !options[options.direction_next] && options.next) {\n\t options[options.direction_next] = options.next;\n\t }\n\t if (options.direction_next === 'path3' && !options[options.direction_next] && options.next) {\n\t options[options.direction_next] = options.next;\n\t }\n\t\n\t if (options.path1 && options.direction_path1 && options.path2 && !options.direction_path2 && options.path3 && !options.direction_path3) {\n\t if (options.direction_path1 === 'right') {\n\t this.path2_direction = 'bottom';\n\t this.path1_direction = 'right';\n\t this.path3_direction = 'top';\n\t } else if (options.direction_path1 === 'top') {\n\t this.path2_direction = 'right';\n\t this.path1_direction = 'top';\n\t this.path3_direction = 'bottom';\n\t } else if (options.direction_path1 === 'left') {\n\t this.path2_direction = 'right';\n\t this.path1_direction = 'left';\n\t this.path3_direction = 'bottom';\n\t } else {\n\t this.path2_direction = 'right';\n\t this.path1_direction = 'bottom';\n\t this.path3_direction = 'top';\n\t }\n\t } else if (options.path1 && !options.direction_path1 && options.path2 && options.direction_path2 && options.path3 && !options.direction_path3) {\n\t if (options.direction_path2 === 'right') {\n\t this.path1_direction = 'bottom';\n\t this.path2_direction = 'right';\n\t this.path3_direction = 'top';\n\t } else if (options.direction_path2 === 'left') {\n\t this.path1_direction = 'bottom';\n\t this.path2_direction = 'left';\n\t this.path3_direction = 'right';\n\t } else {\n\t this.path1_direction = 'right';\n\t this.path2_direction = 'bottom';\n\t this.path3_direction = 'top';\n\t }\n\t } else if (options.path1 && !options.direction_path1 && options.path2 && !options.direction_path2 && options.path3 && options.direction_path3) {\n\t if (options.direction_path2 === 'right') {\n\t this.path1_direction = 'bottom';\n\t this.path2_direction = 'top';\n\t this.path3_direction = 'right';\n\t } else if (options.direction_path2 === 'left') {\n\t this.path1_direction = 'bottom';\n\t this.path2_direction = 'right';\n\t this.path3_direction = 'left';\n\t } else {\n\t this.path1_direction = 'right';\n\t this.path2_direction = 'bottom';\n\t this.path3_direction = 'top';\n\t }\n\t } else {\n\t this.path1_direction = options.direction_path1;\n\t this.path2_direction = options.direction_path2;\n\t this.path3_direction = options.direction_path3;\n\t }\n\t\n\t this.path1_direction = this.path1_direction || 'bottom';\n\t this.path2_direction = this.path2_direction || 'right';\n\t this.path3_direction = this.path3_direction || 'top';\n\t\n\t this.initialize();\n\t}\n\tinherits(Parallel, Symbol);\n\t\n\tParallel.prototype.render = function() {\n\t\n\t if (this.path1_direction) {\n\t this[this.path1_direction + '_symbol'] = this.path1_symbol;\n\t }\n\t\n\t if (this.path2_direction) {\n\t this[this.path2_direction + '_symbol'] = this.path2_symbol;\n\t }\n\t\n\t if (this.path3_direction) {\n\t this[this.path3_direction + '_symbol'] = this.path3_symbol;\n\t }\n\t\n\t var lineLength = this.getAttr('line-length');\n\t\n\t if (this.bottom_symbol) {\n\t var bottomPoint = this.getBottom();\n\t\n\t if (!this.bottom_symbol.isPositioned) {\n\t this.bottom_symbol.shiftY(this.getY() + this.height + lineLength);\n\t this.bottom_symbol.setX(bottomPoint.x - this.bottom_symbol.width / 2);\n\t this.bottom_symbol.isPositioned = true;\n\t\n\t this.bottom_symbol.render();\n\t }\n\t }\n\t\n\t if (this.top_symbol) {\n\t var topPoint = this.getTop();\n\t\n\t if (!this.top_symbol.isPositioned) {\n\t this.top_symbol.shiftY(this.getY() - this.top_symbol.height - lineLength);\n\t this.top_symbol.setX(topPoint.x + this.top_symbol.width);\n\t this.top_symbol.isPositioned = true;\n\t\n\t this.top_symbol.render();\n\t }\n\t }\n\t\n\t var self = this;\n\t\n\t if (this.left_symbol) {\n\t var leftPoint = this.getLeft();\n\t\n\t if (!this.left_symbol.isPositioned) {\n\t this.left_symbol.setY(leftPoint.y - this.left_symbol.height / 2);\n\t this.left_symbol.shiftX(-(this.group.getBBox().x + this.width + lineLength));\n\t (function shift() {\n\t var hasSymbolUnder = false;\n\t var symb;\n\t for (var i = 0, len = self.chart.symbols.length; i < len; i++) {\n\t symb = self.chart.symbols[i];\n\t\n\t if (!self.params['align-next'] || self.params['align-next'] !== 'no') {\n\t var diff = Math.abs(symb.getCenter().x - self.left_symbol.getCenter().x);\n\t if (symb.getCenter().y > self.left_symbol.getCenter().y && diff <= self.left_symbol.width / 2) {\n\t hasSymbolUnder = true;\n\t break;\n\t }\n\t }\n\t }\n\t\n\t if (hasSymbolUnder) {\n\t if (self.left_symbol.symbolType === 'end') return;\n\t self.left_symbol.setX(symb.getX() + symb.width + lineLength);\n\t shift();\n\t }\n\t })();\n\t\n\t this.left_symbol.isPositioned = true;\n\t\n\t this.left_symbol.render();\n\t }\n\t }\n\t\n\t if (this.right_symbol) {\n\t var rightPoint = this.getRight();\n\t\n\t if (!this.right_symbol.isPositioned) {\n\t this.right_symbol.setY(rightPoint.y - this.right_symbol.height / 2);\n\t this.right_symbol.shiftX(this.group.getBBox().x + this.width + lineLength);\n\t (function shift() {\n\t var hasSymbolUnder = false;\n\t var symb;\n\t for (var i = 0, len = self.chart.symbols.length; i < len; i++) {\n\t symb = self.chart.symbols[i];\n\t\n\t if (!self.params['align-next'] || self.params['align-next'] !== 'no') {\n\t var diff = Math.abs(symb.getCenter().x - self.right_symbol.getCenter().x);\n\t if (symb.getCenter().y > self.right_symbol.getCenter().y && diff <= self.right_symbol.width / 2) {\n\t hasSymbolUnder = true;\n\t break;\n\t }\n\t }\n\t }\n\t\n\t if (hasSymbolUnder) {\n\t if (self.right_symbol.symbolType === 'end') return;\n\t self.right_symbol.setX(symb.getX() + symb.width + lineLength);\n\t shift();\n\t }\n\t })();\n\t\n\t this.right_symbol.isPositioned = true;\n\t\n\t this.right_symbol.render();\n\t }\n\t }\n\t};\n\t\n\tParallel.prototype.renderLines = function() {\n\t if (this.path1_symbol) {\n\t this.drawLineTo(this.path1_symbol, '', this.path1_direction);\n\t }\n\t\n\t if (this.path2_symbol) {\n\t this.drawLineTo(this.path2_symbol, '', this.path2_direction);\n\t }\n\t\n\t if (this.path3_symbol) {\n\t this.drawLineTo(this.path3_symbol, '', this.path3_direction);\n\t }\n\t};\n\t\n\tmodule.exports = Parallel;\n\n/***/ },\n/* 7 */\n/*!********************************!*\\\n !*** ./src/flowchart.chart.js ***!\n \\********************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar Raphael = __webpack_require__(/*! raphael */ 16);\n\tvar defaults = __webpack_require__(/*! ./flowchart.helpers */ 1).defaults;\n\tvar defaultOptions = __webpack_require__(/*! ./flowchart.defaults */ 8);\n\tvar Condition = __webpack_require__(/*! ./flowchart.symbol.condition */ 5);\n\tvar Parallel = __webpack_require__(/*! ./flowchart.symbol.parallel */ 6);\n\t\n\tfunction FlowChart(container, options) {\n\t options = options || {};\n\t\n\t this.paper = new Raphael(container);\n\t\n\t this.options = defaults(options, defaultOptions);\n\t\n\t this.symbols = [];\n\t this.lines = [];\n\t this.start = null;\n\t}\n\t\n\tFlowChart.prototype.handle = function(symbol) {\n\t if (this.symbols.indexOf(symbol) <= -1) {\n\t this.symbols.push(symbol);\n\t }\n\t\n\t var flowChart = this;\n\t\n\t if (symbol instanceof(Condition)) {\n\t symbol.yes = function(nextSymbol) {\n\t symbol.yes_symbol = nextSymbol;\n\t if(symbol.no_symbol) {\n\t symbol.pathOk = true;\n\t }\n\t return flowChart.handle(nextSymbol);\n\t };\n\t symbol.no = function(nextSymbol) {\n\t symbol.no_symbol = nextSymbol;\n\t if (symbol.yes_symbol) {\n\t symbol.pathOk = true;\n\t }\n\t return flowChart.handle(nextSymbol);\n\t };\n\t } else if (symbol instanceof(Parallel)) {\n\t symbol.path1 = function(nextSymbol) {\n\t symbol.path1_symbol = nextSymbol;\n\t if (symbol.path2_symbol) {\n\t symbol.pathOk = true;\n\t }\n\t return flowChart.handle(nextSymbol);\n\t };\n\t symbol.path2 = function(nextSymbol) {\n\t symbol.path2_symbol = nextSymbol;\n\t if (symbol.path3_symbol) {\n\t symbol.pathOk = true;\n\t }\n\t return flowChart.handle(nextSymbol);\n\t };\n\t symbol.path3 = function(nextSymbol) {\n\t symbol.path3_symbol = nextSymbol;\n\t if (symbol.path1_symbol) {\n\t symbol.pathOk = true;\n\t }\n\t return flowChart.handle(nextSymbol);\n\t };\n\t } else {\n\t symbol.then = function(nextSymbol) {\n\t symbol.next = nextSymbol;\n\t symbol.pathOk = true;\n\t return flowChart.handle(nextSymbol);\n\t };\n\t }\n\t\n\t return symbol;\n\t};\n\t\n\tFlowChart.prototype.startWith = function(symbol) {\n\t this.start = symbol;\n\t return this.handle(symbol);\n\t};\n\t\n\tFlowChart.prototype.render = function() {\n\t var maxWidth = 0,\n\t maxHeight = 0,\n\t i = 0,\n\t len = 0,\n\t maxX = 0,\n\t maxY = 0,\n\t minX = 0,\n\t minY = 0,\n\t symbol,\n\t line;\n\t\n\t for (i = 0, len = this.symbols.length; i < len; i++) {\n\t symbol = this.symbols[i];\n\t if (symbol.width > maxWidth) {\n\t maxWidth = symbol.width;\n\t }\n\t if (symbol.height > maxHeight) {\n\t maxHeight = symbol.height;\n\t }\n\t }\n\t\n\t for (i = 0, len = this.symbols.length; i < len; i++) {\n\t symbol = this.symbols[i];\n\t symbol.shiftX(this.options.x + (maxWidth - symbol.width)/2 + this.options['line-width']);\n\t symbol.shiftY(this.options.y + (maxHeight - symbol.height)/2 + this.options['line-width']);\n\t }\n\t\n\t this.start.render();\n\t // for (i = 0, len = this.symbols.length; i < len; i++) {\n\t // symbol = this.symbols[i];\n\t // symbol.render();\n\t // }\n\t\n\t for (i = 0, len = this.symbols.length; i < len; i++) {\n\t symbol = this.symbols[i];\n\t symbol.renderLines();\n\t }\n\t\n\t maxX = this.maxXFromLine;\n\t\n\t var x;\n\t var y;\n\t\n\t for (i = 0, len = this.symbols.length; i < len; i++) {\n\t symbol = this.symbols[i];\n\t x = symbol.getX() + symbol.width;\n\t y = symbol.getY() + symbol.height;\n\t if (x > maxX) {\n\t maxX = x;\n\t }\n\t if (y > maxY) {\n\t maxY = y;\n\t }\n\t }\n\t\n\t for (i = 0, len = this.lines.length; i < len; i++) {\n\t line = this.lines[i].getBBox();\n\t x = line.x;\n\t y = line.y;\n\t var x2 = line.x2;\n\t var y2 = line.y2;\n\t if (x < minX) {\n\t minX = x;\n\t }\n\t if (y < minY) {\n\t minY = y;\n\t }\n\t if (x2 > maxX) {\n\t maxX = x2;\n\t }\n\t if (y2 > maxY) {\n\t maxY = y2;\n\t }\n\t }\n\t\n\t var scale = this.options['scale'];\n\t var lineWidth = this.options['line-width'];\n\t\n\t if (this.minXFromSymbols < minX) minX = this.minXFromSymbols;\n\t\n\t if (minX < 0) minX -= lineWidth;\n\t if (minY < 0) minY -= lineWidth;\n\t\n\t var width = maxX + lineWidth - minX;\n\t var height = maxY + lineWidth - minY;\n\t\n\t this.paper.setSize(width * scale, height * scale);\n\t this.paper.setViewBox(minX, minY, width, height, true);\n\t};\n\t\n\tFlowChart.prototype.clean = function() {\n\t if (this.paper) {\n\t var paperDom = this.paper.canvas;\n\t paperDom.parentNode && paperDom.parentNode.removeChild(paperDom);\n\t }\n\t};\n\t\n\tmodule.exports = FlowChart;\n\n/***/ },\n/* 8 */\n/*!***********************************!*\\\n !*** ./src/flowchart.defaults.js ***!\n \\***********************************/\n/***/ function(module, exports) {\n\n\t// defaults\n\tmodule.exports = {\n\t 'x': 0,\n\t 'y': 0,\n\t 'line-width': 3,\n\t 'line-length': 50,\n\t 'text-margin': 10,\n\t 'font-size': 14,\n\t 'font-color': 'black',\n\t // 'font': 'normal',\n\t // 'font-family': 'calibri',\n\t // 'font-weight': 'normal',\n\t 'line-color': 'black',\n\t 'element-color': 'black',\n\t 'fill': 'white',\n\t 'yes-text': 'yes',\n\t 'no-text': 'no',\n\t 'arrow-end': 'block',\n\t 'class': 'flowchart',\n\t 'scale': 1,\n\t 'symbols': {\n\t 'start': {},\n\t 'end': {},\n\t 'condition': {},\n\t 'inputoutput': {},\n\t 'operation': {},\n\t 'subroutine': {},\n\t 'parallel': {}\n\t } //,\n\t // 'flowstate' : {\n\t // 'past' : { 'fill': '#CCCCCC', 'font-size': 12},\n\t // 'current' : {'fill': 'yellow', 'font-color': 'red', 'font-weight': 'bold'},\n\t // 'future' : { 'fill': '#FFFF99'},\n\t // 'invalid': {'fill': '#444444'}\n\t // }\n\t};\n\n/***/ },\n/* 9 */\n/*!*******************************!*\\\n !*** ./src/flowchart.shim.js ***!\n \\*******************************/\n/***/ function(module, exports) {\n\n\t// add indexOf to non ECMA-262 standard compliant browsers\n\tif (!Array.prototype.indexOf) {\n\t Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) {\n\t \"use strict\";\n\t if (this === null) {\n\t throw new TypeError();\n\t }\n\t var t = Object(this);\n\t var len = t.length >>> 0;\n\t if (len === 0) {\n\t return -1;\n\t }\n\t var n = 0;\n\t if (arguments.length > 0) {\n\t n = Number(arguments[1]);\n\t if (n != n) { // shortcut for verifying if it's NaN\n\t n = 0;\n\t } else if (n !== 0 && n != Infinity && n != -Infinity) {\n\t n = (n > 0 || -1) * Math.floor(Math.abs(n));\n\t }\n\t }\n\t if (n >= len) {\n\t return -1;\n\t }\n\t var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0);\n\t for (; k < len; k++) {\n\t if (k in t && t[k] === searchElement) {\n\t return k;\n\t }\n\t }\n\t return -1;\n\t };\n\t}\n\t\n\t// add lastIndexOf to non ECMA-262 standard compliant browsers\n\tif (!Array.prototype.lastIndexOf) {\n\t Array.prototype.lastIndexOf = function(searchElement /*, fromIndex*/) {\n\t \"use strict\";\n\t if (this === null) {\n\t throw new TypeError();\n\t }\n\t var t = Object(this);\n\t var len = t.length >>> 0;\n\t if (len === 0) {\n\t return -1;\n\t }\n\t var n = len;\n\t if (arguments.length > 1) {\n\t n = Number(arguments[1]);\n\t if (n != n) {\n\t n = 0;\n\t } else if (n !== 0 && n != (1 / 0) && n != -(1 / 0)) {\n\t n = (n > 0 || -1) * Math.floor(Math.abs(n));\n\t }\n\t }\n\t var k = n >= 0 ? Math.min(n, len - 1) : len - Math.abs(n);\n\t for (; k >= 0; k--) {\n\t if (k in t && t[k] === searchElement) {\n\t return k;\n\t }\n\t }\n\t return -1;\n\t };\n\t}\n\t\n\tif (!String.prototype.trim) {\n\t String.prototype.trim = function() {\n\t return this.replace(/^\\s+|\\s+$/g, '');\n\t };\n\t}\n\n/***/ },\n/* 10 */\n/*!*************************************!*\\\n !*** ./src/flowchart.symbol.end.js ***!\n \\*************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar Symbol = __webpack_require__(/*! ./flowchart.symbol */ 2);\n\tvar inherits = __webpack_require__(/*! ./flowchart.helpers */ 1).inherits;\n\t\n\tfunction End(chart, options) {\n\t var symbol = chart.paper.rect(0, 0, 0, 0, 20);\n\t options = options || {};\n\t options.text = options.text || 'End';\n\t Symbol.call(this, chart, options, symbol);\n\t}\n\tinherits(End, Symbol);\n\t\n\tmodule.exports = End;\n\n\n/***/ },\n/* 11 */\n/*!*********************************************!*\\\n !*** ./src/flowchart.symbol.inputoutput.js ***!\n \\*********************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar Symbol = __webpack_require__(/*! ./flowchart.symbol */ 2);\n\tvar inherits = __webpack_require__(/*! ./flowchart.helpers */ 1).inherits;\n\tvar drawAPI = __webpack_require__(/*! ./flowchart.functions */ 3);\n\tvar drawPath = drawAPI.drawPath;\n\t\n\tfunction InputOutput(chart, options) {\n\t options = options || {};\n\t Symbol.call(this, chart, options);\n\t this.textMargin = this.getAttr('text-margin');\n\t\n\t this.text.attr({\n\t x: this.textMargin * 3\n\t });\n\t\n\t var width = this.text.getBBox().width + 4 * this.textMargin;\n\t var height = this.text.getBBox().height + 2 * this.textMargin;\n\t var startX = this.textMargin;\n\t var startY = height/2;\n\t\n\t var start = {x: startX, y: startY};\n\t var points = [\n\t {x: startX - this.textMargin, y: height},\n\t {x: startX - this.textMargin + width, y: height},\n\t {x: startX - this.textMargin + width + 2 * this.textMargin, y: 0},\n\t {x: startX - this.textMargin + 2 * this.textMargin, y: 0},\n\t {x: startX, y: startY}\n\t ];\n\t\n\t var symbol = drawPath(chart, start, points);\n\t\n\t symbol.attr({\n\t stroke: this.getAttr('element-color'),\n\t 'stroke-width': this.getAttr('line-width'),\n\t fill: this.getAttr('fill')\n\t });\n\t if (options.link) { symbol.attr('href', options.link); }\n\t if (options.target) { symbol.attr('target', options.target); }\n\t if (options.key) { symbol.node.id = options.key; }\n\t symbol.node.setAttribute('class', this.getAttr('class'));\n\t\n\t this.text.attr({\n\t y: symbol.getBBox().height/2\n\t });\n\t\n\t this.group.push(symbol);\n\t symbol.insertBefore(this.text);\n\t\n\t this.initialize();\n\t}\n\tinherits(InputOutput, Symbol);\n\t\n\tInputOutput.prototype.getLeft = function() {\n\t var y = this.getY() + this.group.getBBox().height/2;\n\t var x = this.getX() + this.textMargin;\n\t return {x: x, y: y};\n\t};\n\t\n\tInputOutput.prototype.getRight = function() {\n\t var y = this.getY() + this.group.getBBox().height/2;\n\t var x = this.getX() + this.group.getBBox().width - this.textMargin;\n\t return {x: x, y: y};\n\t};\n\t\n\tmodule.exports = InputOutput;\n\n\n/***/ },\n/* 12 */\n/*!*******************************************!*\\\n !*** ./src/flowchart.symbol.operation.js ***!\n \\*******************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar Symbol = __webpack_require__(/*! ./flowchart.symbol */ 2);\n\tvar inherits = __webpack_require__(/*! ./flowchart.helpers */ 1).inherits;\n\t\n\tfunction Operation(chart, options) {\n\t var symbol = chart.paper.rect(0, 0, 0, 0);\n\t options = options || {};\n\t Symbol.call(this, chart, options, symbol);\n\t}\n\tinherits(Operation, Symbol);\n\t\n\tmodule.exports = Operation;\n\n\n/***/ },\n/* 13 */\n/*!***************************************!*\\\n !*** ./src/flowchart.symbol.start.js ***!\n \\***************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar Symbol = __webpack_require__(/*! ./flowchart.symbol */ 2);\n\tvar inherits = __webpack_require__(/*! ./flowchart.helpers */ 1).inherits;\n\t\n\tfunction Start(chart, options) {\n\t var symbol = chart.paper.rect(0, 0, 0, 0, 20);\n\t options = options || {};\n\t options.text = options.text || 'Start';\n\t Symbol.call(this, chart, options, symbol);\n\t}\n\tinherits(Start, Symbol);\n\t\n\tmodule.exports = Start;\n\t\n\t// Start.prototype.render = function() {\n\t// if (this.next) {\n\t// var lineLength = this.chart.options.symbols[this.symbolType]['line-length'] || this.chart.options['line-length'];\n\t\n\t// var bottomPoint = this.getBottom();\n\t// var topPoint = this.next.getTop();\n\t\n\t// if (!this.next.isPositioned) {\n\t// this.next.shiftY(this.getY() + this.height + lineLength);\n\t// this.next.setX(bottomPoint.x - this.next.width/2);\n\t// this.next.isPositioned = true;\n\t\n\t// this.next.render();\n\t// }\n\t// }\n\t// };\n\t\n\t// Start.prototype.renderLines = function() {\n\t// if (this.next) {\n\t// this.drawLineTo(this.next);\n\t// }\n\t// };\n\n\n/***/ },\n/* 14 */\n/*!********************************************!*\\\n !*** ./src/flowchart.symbol.subroutine.js ***!\n \\********************************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar Symbol = __webpack_require__(/*! ./flowchart.symbol */ 2);\n\tvar inherits = __webpack_require__(/*! ./flowchart.helpers */ 1).inherits;\n\t\n\tfunction Subroutine(chart, options) {\n\t var symbol = chart.paper.rect(0, 0, 0, 0);\n\t options = options || {};\n\t Symbol.call(this, chart, options, symbol);\n\t\n\t symbol.attr({\n\t width: this.text.getBBox().width + 4 * this.getAttr('text-margin')\n\t });\n\t\n\t this.text.attr({\n\t 'x': 2 * this.getAttr('text-margin')\n\t });\n\t\n\t var innerWrap = chart.paper.rect(0, 0, 0, 0);\n\t innerWrap.attr({\n\t x: this.getAttr('text-margin'),\n\t stroke: this.getAttr('element-color'),\n\t 'stroke-width': this.getAttr('line-width'),\n\t width: this.text.getBBox().width + 2 * this.getAttr('text-margin'),\n\t height: this.text.getBBox().height + 2 * this.getAttr('text-margin'),\n\t fill: this.getAttr('fill')\n\t });\n\t if (options.key) { innerWrap.node.id = options.key + 'i'; }\n\t\n\t var font = this.getAttr('font');\n\t var fontF = this.getAttr('font-family');\n\t var fontW = this.getAttr('font-weight');\n\t\n\t if (font) innerWrap.attr({ 'font': font });\n\t if (fontF) innerWrap.attr({ 'font-family': fontF });\n\t if (fontW) innerWrap.attr({ 'font-weight': fontW });\n\t\n\t if (options.link) { innerWrap.attr('href', options.link); }\n\t if (options.target) { innerWrap.attr('target', options.target); }\n\t this.group.push(innerWrap);\n\t innerWrap.insertBefore(this.text);\n\t\n\t this.initialize();\n\t}\n\tinherits(Subroutine, Symbol);\n\t\n\tmodule.exports = Subroutine;\n\n\n/***/ },\n/* 15 */\n/*!******************************!*\\\n !*** ./src/jquery-plugin.js ***!\n \\******************************/\n/***/ function(module, exports, __webpack_require__) {\n\n\tif (typeof jQuery != 'undefined') {\n\t\tvar parse = __webpack_require__(/*! ./flowchart.parse */ 4);\n\t\n\t\t(function( $ ) {\n\t\t\tfunction paramFit(needle, haystack) {\n\t\t\t\treturn needle == haystack ||\n\t\t\t\t( Array.isArray(haystack) && (haystack.includes(needle) || haystack.includes(Number(needle)) ))\n\t\t\t}\n\t\t\tvar methods = {\n\t\t\t\tinit : function(options) {\n\t\t\t\t\treturn this.each(function() {\n\t\t\t\t\t\tvar $this = $(this);\n\t\t\t\t\t\tthis.chart = parse($this.text());\n\t\t\t\t\t\t$this.html('');\n\t\t\t\t\t\tthis.chart.drawSVG(this, options);\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\tsetFlowStateByParam : function(param, paramValue, newFlowState) {\n\t\t\t\t\treturn this.each(function() {\n\t\t\t\t\t\tvar chart = this.chart;\n\t\n\t\t\t\t\t\t// @todo this should be part of Symbol API\n\t\t\t\t\t\tvar nextSymbolKeys = ['next', 'yes', 'no', 'path1', 'path2', 'path3'];\n\t\n\t\t\t\t\t\tfor (var property in chart.symbols) {\n\t\t\t\t\t\t\tif (chart.symbols.hasOwnProperty(property)) {\n\t\t\t\t\t\t\t\tvar symbol = chart.symbols[property];\n\t\t\t\t\t\t\t\tvar val = symbol.params[param];\n\t\t\t\t\t\t\t\tif (paramFit(val, paramValue)) {\n\t\t\t\t\t\t\t\t\tsymbol.flowstate = newFlowState;\n\t\t\t\t\t\t\t\t\tfor (var nski = 0; nski < nextSymbolKeys.length; nski++) {\n\t\t\t\t\t\t\t\t\t\tvar nextSymbolKey = nextSymbolKeys[nski];\n\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\tsymbol[nextSymbolKey] &&\n\t\t\t\t\t\t\t\t\t\t\tsymbol[nextSymbolKey]['params'] &&\n\t\t\t\t\t\t\t\t\t\t\tsymbol[nextSymbolKey]['params'][param] &&\n\t\t\t\t\t\t\t\t\t\t\tparamFit(symbol[nextSymbolKey]['params'][param], paramValue)\n\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\tsymbol.lineStyle[symbol[nextSymbolKey]['key']] = {stroke: chart.options()['flowstate'][newFlowState]['fill']};\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tchart.clean();\n\t\t\t\t\t\tchart.drawSVG(this);\n\t\t\t\t\t});\n\t\n\t\t\t\t},\n\t\t\t\tclearFlowState: function () {\n\t\t\t\t\treturn this.each(function() {\n\t\t\t\t\t\tvar chart = this.chart;\n\t\n\t\t\t\t\t\tfor (var property in chart.symbols) {\n\t\t\t\t\t\t\tif (chart.symbols.hasOwnProperty(property)) {\n\t\t\t\t\t\t\t\tvar node = chart.symbols[property];\n\t\t\t\t\t\t\t\tnode.flowstate = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tchart.clean();\n\t\t\t\t\t\tchart.drawSVG(this);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t};\n\t\n\t\t\t$.fn.flowChart = function(methodOrOptions) {\n\t\t\t\tif ( methods[methodOrOptions] ) {\n\t\t\t\t\treturn methods[ methodOrOptions ].apply( this, Array.prototype.slice.call( arguments, 1 ));\n\t\t\t\t} else if ( typeof methodOrOptions === 'object' || ! methodOrOptions ) {\n\t\t\t\t\t// Default to \"init\"\n\t\t\t\t\treturn methods.init.apply( this, arguments );\n\t\t\t\t} else {\n\t\t\t\t\t$.error( 'Method ' + methodOrOptions + ' does not exist on jQuery.flowChart' );\n\t\t\t\t}\n\t\t\t};\n\t\n\t\t})(jQuery); // eslint-disable-line\n\t}\n\n\n/***/ },\n/* 16 */\n/*!**************************!*\\\n !*** external \"Raphael\" ***!\n \\**************************/\n/***/ function(module, exports) {\n\n\tmodule.exports = __WEBPACK_EXTERNAL_MODULE_16__;\n\n/***/ }\n/******/ ])\n});\n;\n\n\n/** WEBPACK FOOTER **\n ** flowchart.min.js\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap b04f6270804beefb9eda\n **/","require('./src/flowchart.shim');\nvar parse = require('./src/flowchart.parse');\nrequire('./src/jquery-plugin');\n\nvar FlowChart = {\n\tparse: parse\n};\n\nif (typeof window !== 'undefined') {\n\twindow.flowchart = FlowChart;\n}\n\nmodule.exports = FlowChart;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./index.js\n ** module id = 0\n ** module chunks = 0\n **/","function _defaults(options, defaultOptions) {\n if (!options || typeof options === 'function') {\n return defaultOptions;\n }\n\n var merged = {};\n for (var attrname in defaultOptions) {\n merged[attrname] = defaultOptions[attrname];\n }\n\n for (attrname in options) {\n if (options[attrname]) {\n if (typeof merged[attrname] === 'object') {\n merged[attrname] = _defaults(merged[attrname], options[attrname]);\n } else {\n merged[attrname] = options[attrname];\n }\n }\n }\n return merged;\n}\n\nfunction _inherits(ctor, superCtor) {\n if (typeof(Object.create) === 'function') {\n // implementation from standard node.js 'util' module\n ctor.super_ = superCtor;\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n } else {\n // old school shim for old browsers\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n}\n\n// move dependent functions to a container so that\n// they can be overriden easier in no jquery environment (node.js)\nmodule.exports = {\n defaults: _defaults,\n inherits: _inherits\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/flowchart.helpers.js\n ** module id = 1\n ** module chunks = 0\n **/","var drawAPI = require('./flowchart.functions');\nvar drawLine = drawAPI.drawLine;\nvar checkLineIntersection = drawAPI.checkLineIntersection;\n\nfunction Symbol(chart, options, symbol) {\n this.chart = chart;\n this.group = this.chart.paper.set();\n this.symbol = symbol;\n this.connectedTo = [];\n this.symbolType = options.symbolType;\n this.flowstate = (options.flowstate || 'future');\n this.lineStyle = (options.lineStyle || {});\n this.key = (options.key || '');\n\n this.next_direction = options.next && options['direction_next'] ? options['direction_next'] : undefined;\n\n this.text = this.chart.paper.text(0, 0, options.text);\n //Raphael does not support the svg group tag so setting the text node id to the symbol node id plus t\n if (options.key) { this.text.node.id = options.key + 't'; }\n this.text.node.setAttribute('class', this.getAttr('class') + 't');\n\n this.text.attr({\n 'text-anchor': 'start',\n 'x' : this.getAttr('text-margin'),\n 'fill' : this.getAttr('font-color'),\n 'font-size' : this.getAttr('font-size')\n });\n\n var font = this.getAttr('font');\n var fontF = this.getAttr('font-family');\n var fontW = this.getAttr('font-weight');\n\n if (font) this.text.attr({ 'font': font });\n if (fontF) this.text.attr({ 'font-family': fontF });\n if (fontW) this.text.attr({ 'font-weight': fontW });\n\n if (options.link) { this.text.attr('href', options.link); }\n \n //ndrqu Add click function with event and options params\n if (options.function) { \n this.text.attr({ 'cursor' : 'pointer' });\n\n this.text.node.addEventListener(\"click\", function(evt) {\n window[options.function](evt,options);\n }, false);\n }\n \n if (options.target) { this.text.attr('target', options.target); }\n\n var maxWidth = this.getAttr('maxWidth');\n if (maxWidth) {\n // using this approach: http://stackoverflow.com/a/3153457/22466\n var words = options.text.split(' ');\n var tempText = \"\";\n for (var i=0, ii=words.length; i<ii; i++) {\n var word = words[i];\n this.text.attr(\"text\", tempText + \" \" + word);\n if (this.text.getBBox().width > maxWidth) {\n tempText += \"\\n\" + word;\n } else {\n tempText += \" \" + word;\n }\n }\n this.text.attr(\"text\", tempText.substring(1));\n }\n\n this.group.push(this.text);\n\n if (symbol) {\n var tmpMargin = this.getAttr('text-margin');\n\n symbol.attr({\n 'fill' : this.getAttr('fill'),\n 'stroke' : this.getAttr('element-color'),\n 'stroke-width' : this.getAttr('line-width'),\n 'width' : this.text.getBBox().width + 2 * tmpMargin,\n 'height' : this.text.getBBox().height + 2 * tmpMargin\n });\n\n symbol.node.setAttribute('class', this.getAttr('class'));\n\n if (options.link) { symbol.attr('href', options.link); }\n if (options.target) { symbol.attr('target', options.target); }\n\n //ndrqu Add click function with event and options params\n if (options.function) { \n symbol.node.addEventListener(\"click\", function(evt) {\n window[options.function](evt,options);\n }, false);\n symbol.attr({ 'cursor' : 'pointer' });\n }\n if (options.key) { symbol.node.id = options.key; }\n\n this.group.push(symbol);\n symbol.insertBefore(this.text);\n\n this.text.attr({\n 'y': symbol.getBBox().height/2\n });\n\n this.initialize();\n }\n\n}\n\n/* Gets the attribute based on Flowstate, Symbol-Name and default, first found wins */\nSymbol.prototype.getAttr = function(attName) {\n if (!this.chart) {\n return undefined;\n }\n var opt3 = (this.chart.options) ? this.chart.options[attName] : undefined;\n var opt2 = (this.chart.options.symbols) ? this.chart.options.symbols[this.symbolType][attName] : undefined;\n var opt1;\n if (this.chart.options.flowstate && this.chart.options.flowstate[this.flowstate]) {\n opt1 = this.chart.options.flowstate[this.flowstate][attName];\n }\n return (opt1 || opt2 || opt3);\n};\n\nSymbol.prototype.initialize = function() {\n this.group.transform('t' + this.getAttr('line-width') + ',' + this.getAttr('line-width'));\n\n this.width = this.group.getBBox().width;\n this.height = this.group.getBBox().height;\n};\n\nSymbol.prototype.getCenter = function() {\n return {x: this.getX() + this.width/2,\n y: this.getY() + this.height/2};\n};\n\nSymbol.prototype.getX = function() {\n return this.group.getBBox().x;\n};\n\nSymbol.prototype.getY = function() {\n return this.group.getBBox().y;\n};\n\nSymbol.prototype.shiftX = function(x) {\n this.group.transform('t' + (this.getX() + x) + ',' + this.getY());\n};\n\nSymbol.prototype.setX = function(x) {\n this.group.transform('t' + x + ',' + this.getY());\n};\n\nSymbol.prototype.shiftY = function(y) {\n this.group.transform('t' + this.getX() + ',' + (this.getY() + y));\n};\n\nSymbol.prototype.setY = function(y) {\n this.group.transform('t' + this.getX() + ',' + y);\n};\n\nSymbol.prototype.getTop = function() {\n var y = this.getY();\n var x = this.getX() + this.width/2;\n return {x: x, y: y};\n};\n\nSymbol.prototype.getBottom = function() {\n var y = this.getY() + this.height;\n var x = this.getX() + this.width/2;\n return {x: x, y: y};\n};\n\nSymbol.prototype.getLeft = function() {\n var y = this.getY() + this.group.getBBox().height/2;\n var x = this.getX();\n return {x: x, y: y};\n};\n\nSymbol.prototype.getRight = function() {\n var y = this.getY() + this.group.getBBox().height/2;\n var x = this.getX() + this.group.getBBox().width;\n return {x: x, y: y};\n};\n\nSymbol.prototype.render = function() {\n if (this.next) {\n\n var self = this;\n var lineLength = this.getAttr('line-length');\n\n if (this.next_direction === 'right') {\n\n var rightPoint = this.getRight();\n\n if (!this.next.isPositioned) {\n this.next.setY(rightPoint.y - this.next.height/2);\n this.next.shiftX(this.group.getBBox().x + this.width + lineLength);\n\n (function shift() {\n var hasSymbolUnder = false;\n var symb;\n for (var i = 0, len = self.chart.symbols.length; i < len; i++) {\n symb = self.chart.symbols[i];\n\n var diff = Math.abs(symb.getCenter().x - self.next.getCenter().x);\n if (symb.getCenter().y > self.next.getCenter().y && diff <= self.next.width/2) {\n hasSymbolUnder = true;\n break;\n }\n }\n\n if (hasSymbolUnder) {\n if (self.next.symbolType === 'end') return;\n self.next.setX(symb.getX() + symb.width + lineLength);\n shift();\n }\n })();\n\n this.next.isPositioned = true;\n\n this.next.render();\n }\n } else if (this.next_direction === 'left') {\n\n var leftPoint = this.getLeft();\n\n if (!this.next.isPositioned) {\n this.next.setY(leftPoint.y - this.next.height/2);\n this.next.shiftX(-(this.group.getBBox().x + this.width + lineLength));\n\n (function shift() {\n var hasSymbolUnder = false;\n var symb;\n for (var i = 0, len = self.chart.symbols.length; i < len; i++) {\n symb = self.chart.symbols[i];\n\n var diff = Math.abs(symb.getCenter().x - self.next.getCenter().x);\n if (symb.getCenter().y > self.next.getCenter().y && diff <= self.next.width/2) {\n hasSymbolUnder = true;\n break;\n }\n }\n\n if (hasSymbolUnder) {\n if (self.next.symbolType === 'end') return;\n self.next.setX(symb.getX() + symb.width + lineLength);\n shift();\n }\n })();\n\n this.next.isPositioned = true;\n\n this.next.render();\n }\n } else {\n var bottomPoint = this.getBottom();\n\n if (!this.next.isPositioned) {\n this.next.shiftY(this.getY() + this.height + lineLength);\n this.next.setX(bottomPoint.x - this.next.width/2);\n this.next.isPositioned = true;\n\n this.next.render();\n }\n }\n }\n};\n\nSymbol.prototype.renderLines = function() {\n if (this.next) {\n if (this.next_direction) {\n this.drawLineTo(this.next, this.getAttr('arrow-text') || '', this.next_direction);\n } else {\n this.drawLineTo(this.next, this.getAttr('arrow-text') || '');\n }\n }\n};\n\nSymbol.prototype.drawLineTo = function(symbol, text, origin) {\n if (this.connectedTo.indexOf(symbol) < 0) {\n this.connectedTo.push(symbol);\n }\n\n var x = this.getCenter().x,\n y = this.getCenter().y,\n right = this.getRight(),\n bottom = this.getBottom(),\n top = this.getTop(),\n left = this.getLeft();\n\n var symbolX = symbol.getCenter().x,\n symbolY = symbol.getCenter().y,\n symbolTop = symbol.getTop(),\n symbolRight = symbol.getRight(),\n symbolLeft = symbol.getLeft();\n\n var isOnSameColumn = x === symbolX,\n isOnSameLine = y === symbolY,\n isUnder = y < symbolY,\n isUpper = y > symbolY || this === symbol,\n isLeft = x > symbolX,\n isRight = x < symbolX;\n\n var maxX = 0,\n line,\n lineLength = this.getAttr('line-length'),\n lineWith = this.getAttr('line-width');\n\n if ((!origin || origin === 'bottom') && isOnSameColumn && isUnder) {\n line = drawLine(this.chart, bottom, symbolTop, text);\n this.bottomStart = true;\n symbol.topEnd = true;\n maxX = bottom.x;\n } else if ((!origin || origin === 'right') && isOnSameLine && isRight) {\n line = drawLine(this.chart, right, symbolLeft, text);\n this.rightStart = true;\n symbol.leftEnd = true;\n maxX = symbolLeft.x;\n } else if ((!origin || origin === 'left') && isOnSameLine && isLeft) {\n line = drawLine(this.chart, left, symbolRight, text);\n this.leftStart = true;\n symbol.rightEnd = true;\n maxX = symbolRight.x;\n } else if ((!origin || origin === 'right') && isOnSameColumn && isUpper) {\n line = drawLine(this.chart, right, [\n {x: right.x + lineLength/2, y: right.y},\n {x: right.x + lineLength/2, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y}\n ], text);\n this.rightStart = true;\n symbol.topEnd = true;\n maxX = right.x + lineLength/2;\n } else if ((!origin || origin === 'right') && isOnSameColumn && isUnder) {\n line = drawLine(this.chart, right, [\n {x: right.x + lineLength/2, y: right.y},\n {x: right.x + lineLength/2, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y}\n ], text);\n this.rightStart = true;\n symbol.topEnd = true;\n maxX = right.x + lineLength/2;\n } else if ((!origin || origin === 'bottom') && isLeft) {\n if (this.leftEnd && isUpper) {\n line = drawLine(this.chart, bottom, [\n {x: bottom.x, y: bottom.y + lineLength/2},\n {x: bottom.x + (bottom.x - symbolTop.x)/2, y: bottom.y + lineLength/2},\n {x: bottom.x + (bottom.x - symbolTop.x)/2, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y}\n ], text);\n } else {\n line = drawLine(this.chart, bottom, [\n {x: bottom.x, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y}\n ], text);\n }\n this.bottomStart = true;\n symbol.topEnd = true;\n maxX = bottom.x + (bottom.x - symbolTop.x)/2;\n } else if ((!origin || origin === 'bottom') && isRight && isUnder) {\n line = drawLine(this.chart, bottom, [\n {x: bottom.x, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y}\n ], text);\n this.bottomStart = true;\n symbol.topEnd = true;\n maxX = bottom.x;\n if (symbolTop.x > maxX) maxX = symbolTop.x;\n } else if ((!origin || origin === 'bottom') && isRight) {\n line = drawLine(this.chart, bottom, [\n {x: bottom.x, y: bottom.y + lineLength/2},\n {x: bottom.x + (bottom.x - symbolTop.x)/2, y: bottom.y + lineLength/2},\n {x: bottom.x + (bottom.x - symbolTop.x)/2, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y}\n ], text);\n this.bottomStart = true;\n symbol.topEnd = true;\n maxX = bottom.x + (bottom.x - symbolTop.x)/2;\n } else if ((origin && origin === 'right') && isLeft) {\n line = drawLine(this.chart, right, [\n {x: right.x + lineLength/2, y: right.y},\n {x: right.x + lineLength/2, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y}\n ], text);\n this.rightStart = true;\n symbol.topEnd = true;\n maxX = right.x + lineLength/2;\n } else if ((origin && origin === 'right') && isRight) {\n line = drawLine(this.chart, right, [\n {x: symbolTop.x, y: right.y},\n {x: symbolTop.x, y: symbolTop.y}\n ], text);\n this.rightStart = true;\n symbol.topEnd = true;\n maxX = right.x + lineLength/2;\n } else if ((origin && origin === 'bottom') && isOnSameColumn && isUpper) {\n line = drawLine(this.chart, bottom, [\n {x: bottom.x, y: bottom.y + lineLength/2},\n {x: right.x + lineLength/2, y: bottom.y + lineLength/2},\n {x: right.x + lineLength/2, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y}\n ], text);\n this.bottomStart = true;\n symbol.topEnd = true;\n maxX = bottom.x + lineLength/2;\n } else if ((origin === 'left') && isOnSameColumn && isUpper) {\n var diffX = left.x - lineLength/2;\n if (symbolLeft.x < left.x) {\n diffX = symbolLeft.x - lineLength/2;\n }\n line = drawLine(this.chart, left, [\n {x: diffX, y: left.y},\n {x: diffX, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y}\n ], text);\n this.leftStart = true;\n symbol.topEnd = true;\n maxX = left.x;\n } else if ((origin === 'left')) {\n line = drawLine(this.chart, left, [\n {x: symbolTop.x + (left.x - symbolTop.x)/2, y: left.y},\n {x: symbolTop.x + (left.x - symbolTop.x)/2, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y}\n ], text);\n this.leftStart = true;\n symbol.topEnd = true;\n maxX = left.x;\n } else if ((origin === 'top')) {\n line = drawLine(this.chart, top, [\n {x: top.x, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y - lineLength/2},\n {x: symbolTop.x, y: symbolTop.y}\n ], text);\n this.topStart = true;\n symbol.topEnd = true;\n maxX = top.x;\n }\n\n //update line style\n if (this.lineStyle[symbol.key] && line){\n line.attr(this.lineStyle[symbol.key]);\n }\n\n if (line) {\n for (var l = 0, llen = this.chart.lines.length; l < llen; l++) {\n var otherLine = this.chart.lines[l];\n\n var ePath = otherLine.attr('path'),\n lPath = line.attr('path');\n\n for (var iP = 0, lenP = ePath.length - 1; iP < lenP; iP++) {\n var newPath = [];\n newPath.push(['M', ePath[iP][1], ePath[iP][2]]);\n newPath.push(['L', ePath[iP + 1][1], ePath[iP + 1][2]]);\n\n var line1_from_x = newPath[0][1];\n var line1_from_y = newPath[0][2];\n var line1_to_x = newPath[1][1];\n var line1_to_y = newPath[1][2];\n\n for (var lP = 0, lenlP = lPath.length - 1; lP < lenlP; lP++) {\n var newLinePath = [];\n newLinePath.push(['M', lPath[lP][1], lPath[lP][2]]);\n newLinePath.push(['L', lPath[lP + 1][1], lPath[lP + 1][2]]);\n\n var line2_from_x = newLinePath[0][1];\n var line2_from_y = newLinePath[0][2];\n var line2_to_x = newLinePath[1][1];\n var line2_to_y = newLinePath[1][2];\n\n var res = checkLineIntersection(line1_from_x, line1_from_y, line1_to_x, line1_to_y, line2_from_x, line2_from_y, line2_to_x, line2_to_y);\n if (res.onLine1 && res.onLine2) {\n\n var newSegment;\n if (line2_from_y === line2_to_y) {\n if (line2_from_x > line2_to_x) {\n newSegment = ['L', res.x + lineWith * 2, line2_from_y];\n lPath.splice(lP + 1, 0, newSegment);\n newSegment = ['C', res.x + lineWith * 2, line2_from_y, res.x, line2_from_y - lineWith * 4, res.x - lineWith * 2, line2_from_y];\n lPath.splice(lP + 2, 0, newSegment);\n line.attr('path', lPath);\n } else {\n newSegment = ['L', res.x - lineWith * 2, line2_from_y];\n lPath.splice(lP + 1, 0, newSegment);\n newSegment = ['C', res.x - lineWith * 2, line2_from_y, res.x, line2_from_y - lineWith * 4, res.x + lineWith * 2, line2_from_y];\n lPath.splice(lP + 2, 0, newSegment);\n line.attr('path', lPath);\n }\n } else {\n if (line2_from_y > line2_to_y) {\n newSegment = ['L', line2_from_x, res.y + lineWith * 2];\n lPath.splice(lP + 1, 0, newSegment);\n newSegment = ['C', line2_from_x, res.y + lineWith * 2, line2_from_x + lineWith * 4, res.y, line2_from_x, res.y - lineWith * 2];\n lPath.splice(lP + 2, 0, newSegment);\n line.attr('path', lPath);\n } else {\n newSegment = ['L', line2_from_x, res.y - lineWith * 2];\n lPath.splice(lP + 1, 0, newSegment);\n newSegment = ['C', line2_from_x, res.y - lineWith * 2, line2_from_x + lineWith * 4, res.y, line2_from_x, res.y + lineWith * 2];\n lPath.splice(lP + 2, 0, newSegment);\n line.attr('path', lPath);\n }\n }\n\n lP += 2;\n }\n }\n }\n }\n\n this.chart.lines.push(line);\n if (this.chart.minXFromSymbols === undefined || this.chart.minXFromSymbols > left.x) {\n this.chart.minXFromSymbols = left.x;\n }\n }\n\n if (!this.chart.maxXFromLine || (this.chart.maxXFromLine && maxX > this.chart.maxXFromLine)) {\n this.chart.maxXFromLine = maxX;\n }\n};\n\nmodule.exports = Symbol;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/flowchart.symbol.js\n ** module id = 2\n ** module chunks = 0\n **/","function drawPath(chart, location, points) {\n var i, len;\n var path = 'M{0},{1}';\n for (i = 2, len = 2 * points.length + 2; i < len; i+=2) {\n path += ' L{' + i + '},{' + (i + 1) + '}';\n }\n var pathValues = [location.x, location.y];\n for (i = 0, len = points.length; i < len; i++) {\n pathValues.push(points[i].x);\n pathValues.push(points[i].y);\n }\n var symbol = chart.paper.path(path, pathValues);\n symbol.attr('stroke', chart.options['element-color']);\n symbol.attr('stroke-width', chart.options['line-width']);\n\n var font = chart.options.font;\n var fontF = chart.options['font-family'];\n var fontW = chart.options['font-weight'];\n\n if (font) symbol.attr({ 'font': font });\n if (fontF) symbol.attr({ 'font-family': fontF });\n if (fontW) symbol.attr({ 'font-weight': fontW });\n\n return symbol;\n}\n\nfunction drawLine(chart, from, to, text) {\n var i, len;\n\n if (Object.prototype.toString.call(to) !== '[object Array]') {\n to = [to];\n }\n\n var path = 'M{0},{1}';\n for (i = 2, len = 2 * to.length + 2; i < len; i+=2) {\n path += ' L{' + i + '},{' + (i + 1) + '}';\n }\n var pathValues = [from.x, from.y];\n for (i = 0, len = to.length; i < len; i++) {\n pathValues.push(to[i].x);\n pathValues.push(to[i].y);\n }\n\n var line = chart.paper.path(path, pathValues);\n line.attr({\n stroke: chart.options['line-color'],\n 'stroke-width': chart.options['line-width'],\n 'arrow-end': chart.options['arrow-end']\n });\n\n var font = chart.options.font;\n var fontF = chart.options['font-family'];\n var fontW = chart.options['font-weight'];\n\n if (font) line.attr({ 'font': font });\n if (fontF) line.attr({ 'font-family': fontF });\n if (fontW) line.attr({ 'font-weight': fontW });\n\n if (text) {\n\n var centerText = false;\n\n var textPath = chart.paper.text(0, 0, text);\n\n var isHorizontal = false;\n var firstTo = to[0];\n\n if (from.y === firstTo.y) {\n isHorizontal = true;\n }\n\n var x = 0,\n y = 0;\n\n if (centerText) {\n if (from.x > firstTo.x) {\n x = from.x - (from.x - firstTo.x)/2;\n } else {\n x = firstTo.x - (firstTo.x - from.x)/2;\n }\n\n if (from.y > firstTo.y) {\n y = from.y - (from.y - firstTo.y)/2;\n } else {\n y = firstTo.y - (firstTo.y - from.y)/2;\n }\n\n if (isHorizontal) {\n x -= textPath.getBBox().width/2;\n y -= chart.options['text-margin'];\n } else {\n x += chart.options['text-margin'];\n y -= textPath.getBBox().height/2;\n }\n } else {\n x = from.x;\n y = from.y;\n\n if (isHorizontal) {\n x += chart.options['text-margin']/2;\n y -= chart.options['text-margin'];\n } else {\n x += chart.options['text-margin']/2;\n y += chart.options['text-margin'];\n if (from.y > firstTo.y) {\n y -= chart.options['text-margin']*2;\n }\n }\n }\n\n textPath.attr({\n 'text-anchor': 'start',\n 'font-size': chart.options['font-size'],\n 'fill': chart.options['font-color'],\n x: x,\n y: y\n });\n\n if (font) textPath.attr({ 'font': font });\n if (fontF) textPath.attr({ 'font-family': fontF });\n if (fontW) textPath.attr({ 'font-weight': fontW });\n }\n\n return line;\n}\n\nfunction checkLineIntersection(line1StartX, line1StartY, line1EndX, line1EndY, line2StartX, line2StartY, line2EndX, line2EndY) {\n // if the lines intersect, the result contains the x and y of the intersection (treating the lines as infinite) and booleans for whether line segment 1 or line segment 2 contain the point\n var denominator, a, b, numerator1, numerator2, result = {\n x: null,\n y: null,\n onLine1: false,\n onLine2: false\n };\n denominator = ((line2EndY - line2StartY) * (line1EndX - line1StartX)) - ((line2EndX - line2StartX) * (line1EndY - line1StartY));\n if (denominator === 0) {\n return result;\n }\n a = line1StartY - line2StartY;\n b = line1StartX - line2StartX;\n numerator1 = ((line2EndX - line2StartX) * a) - ((line2EndY - line2StartY) * b);\n numerator2 = ((line1EndX - line1StartX) * a) - ((line1EndY - line1StartY) * b);\n a = numerator1 / denominator;\n b = numerator2 / denominator;\n\n // if we cast these lines infinitely in both directions, they intersect here:\n result.x = line1StartX + (a * (line1EndX - line1StartX));\n result.y = line1StartY + (a * (line1EndY - line1StartY));\n /*\n // it is worth noting that this should be the same as:\n x = line2StartX + (b * (line2EndX - line2StartX));\n y = line2StartX + (b * (line2EndY - line2StartY));\n */\n // if line1 is a segment and line2 is infinite, they intersect if:\n if (a > 0 && a < 1) {\n result.onLine1 = true;\n }\n // if line2 is a segment and line1 is infinite, they intersect if:\n if (b > 0 && b < 1) {\n result.onLine2 = true;\n }\n // if line1 and line2 are segments, they intersect if both of the above are true\n return result;\n}\n\nmodule.exports = {\n\tdrawPath: drawPath,\n\tdrawLine: drawLine,\n\tcheckLineIntersection: checkLineIntersection\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/flowchart.functions.js\n ** module id = 3\n ** module chunks = 0\n **/","var FlowChart = require('./flowchart.chart');\nvar Start = require('./flowchart.symbol.start');\nvar End = require('./flowchart.symbol.end');\nvar Operation = require('./flowchart.symbol.operation');\nvar InputOutput = require('./flowchart.symbol.inputoutput');\nvar Subroutine = require('./flowchart.symbol.subroutine');\nvar Condition = require('./flowchart.symbol.condition');\nvar Parallel = require('./flowchart.symbol.parallel');\n\nfunction parse(input) {\n input = input || '';\n input = input.trim();\n\n var chart = {\n symbols: {},\n start: null,\n drawSVG: function(container, options) {\n var self = this;\n\n if (this.diagram) {\n this.diagram.clean();\n }\n\n var diagram = new FlowChart(container, options);\n this.diagram = diagram;\n var dispSymbols = {};\n\n function getDisplaySymbol(s) {\n if (dispSymbols[s.key]) {\n return dispSymbols[s.key];\n }\n\n switch (s.symbolType) {\n case 'start':\n dispSymbols[s.key] = new Start(diagram, s);\n break;\n case 'end':\n dispSymbols[s.key] = new End(diagram, s);\n break;\n case 'operation':\n dispSymbols[s.key] = new Operation(diagram, s);\n break;\n case 'inputoutput':\n dispSymbols[s.key] = new InputOutput(diagram, s);\n break;\n case 'subroutine':\n dispSymbols[s.key] = new Subroutine(diagram, s);\n break;\n case 'condition':\n dispSymbols[s.key] = new Condition(diagram, s);\n break;\n case 'parallel':\n dispSymbols[s.key] = new Parallel(diagram, s);\n break;\n default:\n return new Error('Wrong symbol type!');\n }\n\n return dispSymbols[s.key];\n }\n\n (function constructChart(s, prevDisp, prev) {\n var dispSymb = getDisplaySymbol(s);\n\n if (self.start === s) {\n diagram.startWith(dispSymb);\n } else if (prevDisp && prev && !prevDisp.pathOk) {\n if (prevDisp instanceof(Condition)) {\n if (prev.yes === s) {\n prevDisp.yes(dispSymb);\n }\n if (prev.no === s) {\n prevDisp.no(dispSymb);\n }\n } else if (prevDisp instanceof(Parallel)) {\n if (prev.path1 === s) {\n prevDisp.path1(dispSymb);\n }\n if (prev.path2 === s) {\n prevDisp.path2(dispSymb);\n }\n if (prev.path3 === s) {\n prevDisp.path3(dispSymb);\n }\n } else {\n prevDisp.then(dispSymb);\n }\n }\n\n if (dispSymb.pathOk) {\n return dispSymb;\n }\n\n if (dispSymb instanceof(Condition)) {\n if (s.yes) {\n constructChart(s.yes, dispSymb, s);\n }\n if (s.no) {\n constructChart(s.no, dispSymb, s);\n }\n } else if (dispSymb instanceof(Parallel)) {\n if (s.path1) {\n constructChart(s.path1, dispSymb, s);\n }\n if (s.path2) {\n constructChart(s.path2, dispSymb, s);\n }\n if (s.path3) {\n constructChart(s.path3, dispSymb, s);\n }\n } else if (s.next) {\n constructChart(s.next, dispSymb, s);\n }\n\n return dispSymb;\n })(this.start);\n\n diagram.render();\n },\n clean: function() {\n this.diagram.clean();\n },\n options: function() {\n return this.diagram.options;\n }\n };\n\n var lines = [];\n var prevBreak = 0;\n for (var i0 = 1, i0len = input.length; i0 < i0len; i0++) {\n if(input[i0] === '\\n' && input[i0 - 1] !== '\\\\') {\n var line0 = input.substring(prevBreak, i0);\n prevBreak = i0 + 1;\n lines.push(line0.replace(/\\\\\\n/g, '\\n'));\n }\n }\n\n if (prevBreak < input.length) {\n lines.push(input.substr(prevBreak));\n }\n\n for (var l = 1, len = lines.length; l < len;) {\n var currentLine = lines[l];\n\n if (currentLine.indexOf('->') < 0 && currentLine.indexOf('=>') < 0 && currentLine.indexOf('@>') < 0) {\n lines[l - 1] += '\\n' + currentLine;\n lines.splice(l, 1);\n len--;\n } else {\n l++;\n }\n }\n\n function getStyle(s){\n var startIndex = s.indexOf('(') + 1;\n var endIndex = s.indexOf(')');\n if (startIndex >= 0 && endIndex >= 0) {\n return s.substring(startIndex,endIndex);\n }\n return '{}';\n }\n\n function getSymbValue(s){\n var startIndex = s.indexOf('(') + 1;\n var endIndex = s.indexOf(')');\n if (startIndex >= 0 && endIndex >= 0) {\n return s.substring(startIndex,endIndex);\n }\n return '';\n }\n\n function getSymbol(s) {\n var startIndex = s.indexOf('(') + 1;\n var endIndex = s.indexOf(')');\n if (startIndex >= 0 && endIndex >= 0) {\n return chart.symbols[s.substring(0, startIndex - 1)];\n }\n return chart.symbols[s];\n }\n\n function getNextPath(s) {\n var next = 'next';\n var startIndex = s.indexOf('(') + 1;\n var endIndex = s.indexOf(')');\n if (startIndex >= 0 && endIndex >= 0) {\n next = flowSymb.substring(startIndex, endIndex);\n if (next.indexOf(',') < 0) {\n if (next !== 'yes' && next !== 'no') {\n next = 'next, ' + next;\n }\n }\n }\n return next;\n }\n\n while (lines.length > 0) {\n var line = lines.splice(0, 1)[0].trim();\n\n if (line.indexOf('=>') >= 0) {\n // definition\n var parts = line.split('=>');\n var symbol = {\n key: parts[0].replace(/\\(.*\\)/, ''),\n symbolType: parts[1],\n text: null,\n link: null,\n target: null,\n flowstate: null,\n function: null,\n lineStyle: {},\n params: {}\n };\n\n //parse parameters\n var params = parts[0].match(/\\((.*)\\)/);\n if (params && params.length > 1){\n var entries = params[1].split(',');\n for(var i = 0; i < entries.length; i++) {\n var entry = entries[i].split('=');\n if (entry.length == 2) {\n symbol.params[entry[0]] = entry[1];\n }\n }\n }\n\n var sub;\n\n if (symbol.symbolType.indexOf(': ') >= 0) {\n sub = symbol.symbolType.split(': ');\n symbol.symbolType = sub.shift();\n symbol.text = sub.join(': ');\n }\n\n if (symbol.text && symbol.text.indexOf(':$') >= 0) {\n sub = symbol.text.split(':$');\n symbol.text = sub.shift();\n symbol.function = sub.join(':$');\n } else if (symbol.symbolType.indexOf(':$') >= 0) {\n sub = symbol.symbolType.split(':$');\n symbol.symbolType = sub.shift();\n symbol.function = sub.join(':$');\n } else if (symbol.text && symbol.text.indexOf(':>') >= 0) {\n sub = symbol.text.split(':>');\n symbol.text = sub.shift();\n symbol.link = sub.join(':>');\n } else if (symbol.symbolType.indexOf(':>') >= 0) {\n sub = symbol.symbolType.split(':>');\n symbol.symbolType = sub.shift();\n symbol.link = sub.join(':>');\n }\n\n if (symbol.symbolType.indexOf('\\n') >= 0) {\n symbol.symbolType = symbol.symbolType.split('\\n')[0];\n }\n\n /* adding support for links */\n if (symbol.link) {\n var startIndex = symbol.link.indexOf('[') + 1;\n var endIndex = symbol.link.indexOf(']');\n if (startIndex >= 0 && endIndex >= 0) {\n symbol.target = symbol.link.substring(startIndex, endIndex);\n symbol.link = symbol.link.substring(0, startIndex - 1);\n }\n }\n /* end of link support */\n\n /* adding support for flowstates */\n if (symbol.text) {\n if (symbol.text.indexOf('|') >= 0) {\n var txtAndState = symbol.text.split('|');\n symbol.flowstate = txtAndState.pop().trim();\n symbol.text = txtAndState.join('|');\n }\n }\n /* end of flowstate support */\n\n chart.symbols[symbol.key] = symbol;\n\n } else if (line.indexOf('->') >= 0) {\n // flow\n var flowSymbols = line.split('->');\n for (var iS = 0, lenS = flowSymbols.length; iS < lenS; iS++) {\n var flowSymb = flowSymbols[iS];\n var symbVal = getSymbValue(flowSymb);\n\n if (symbVal === 'true' || symbVal === 'false') {\n // map true or false to yes or no respectively\n flowSymb = flowSymb.replace('true', 'yes');\n flowSymb = flowSymb.replace('false', 'no');\n }\n\n var realSymb = getSymbol(flowSymb);\n var next = getNextPath(flowSymb);\n\n var direction = null;\n if (next.indexOf(',') >= 0) {\n var condOpt = next.split(',');\n next = condOpt[0];\n direction = condOpt[1].trim();\n }\n\n if (!chart.start) {\n chart.start = realSymb;\n }\n\n if (iS + 1 < lenS) {\n var nextSymb = flowSymbols[iS + 1];\n realSymb[next] = getSymbol(nextSymb);\n realSymb['direction_' + next] = direction;\n direction = null;\n }\n }\n } else if (line.indexOf('@>') >= 0) {\n\n // line style\n var lineStyleSymbols = line.split('@>');\n for (var iSS = 0, lenSS = lineStyleSymbols.length; iSS < lenSS; iSS++) {\n if ((iSS + 1) !== lenSS) {\n var curSymb = getSymbol(lineStyleSymbols[iSS]);\n var nextSymbol = getSymbol(lineStyleSymbols[iSS+1]);\n\n curSymb['lineStyle'][nextSymbol.key] = JSON.parse(getStyle(lineStyleSymbols[iSS + 1]));\n }\n }\n }\n\n }\n return chart;\n}\n\nmodule.exports = parse;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/flowchart.parse.js\n ** module id = 4\n ** module chunks = 0\n **/","var Symbol = require('./flowchart.symbol');\nvar inherits = require('./flowchart.helpers').inherits;\nvar drawAPI = require('./flowchart.functions');\nvar drawPath = drawAPI.drawPath;\n\nfunction Condition(chart, options) {\n options = options || {};\n Symbol.call(this, chart, options);\n this.textMargin = this.getAttr('text-margin');\n this.yes_direction = 'bottom';\n this.no_direction = 'right';\n this.params = options.params;\n if (options.yes && options.direction_yes && options.no && !options.direction_no) {\n if (options.direction_yes === 'right') {\n this.no_direction = 'bottom';\n this.yes_direction = 'right';\n } else if (options.direction_yes === 'top') {\n this.no_direction = 'right';\n this.yes_direction = 'top';\n } else {\n this.no_direction = 'right';\n this.yes_direction = 'bottom';\n }\n } else if (options.yes && !options.direction_yes && options.no && options.direction_no) {\n if (options.direction_no === 'right') {\n this.yes_direction = 'bottom';\n this.no_direction = 'right';\n } else {\n this.yes_direction = 'right';\n this.no_direction = 'bottom';\n }\n } else if (options.yes && options.direction_yes && options.no && options.direction_no && options.direction_no !== options.direction_yes) {\n if (options.direction_yes === 'right') {\n this.no_direction = 'bottom';\n this.yes_direction = 'right';\n } else if (options.direction_yes === 'top') {\n this.no_direction = 'right';\n this.yes_direction = 'top';\n } else {\n this.no_direction = 'right';\n this.yes_direction = 'bottom';\n }\n } else {\n this.yes_direction = 'bottom';\n this.no_direction = 'right';\n }\n\n this.yes_direction = this.yes_direction || 'bottom';\n this.no_direction = this.no_direction || 'right';\n\n this.text.attr({\n x: this.textMargin * 2\n });\n\n var width = this.text.getBBox().width + 3 * this.textMargin;\n width += width/2;\n var height = this.text.getBBox().height + 2 * this.textMargin;\n height += height/2;\n height = Math.max(width * 0.5, height);\n var startX = width/4;\n var startY = height/4;\n\n this.text.attr({\n x: startX + this.textMargin/2\n });\n\n var start = {x: startX, y: startY};\n var points = [\n {x: startX - width/4, y: startY + height/4},\n {x: startX - width/4 + width/2, y: startY + height/4 + height/2},\n {x: startX - width/4 + width, y: startY + height/4},\n {x: startX - width/4 + width/2, y: startY + height/4 - height/2},\n {x: startX - width/4, y: startY + height/4}\n ];\n\n var symbol = drawPath(chart, start, points);\n\n symbol.attr({\n stroke: this.getAttr('element-color'),\n 'stroke-width': this.getAttr('line-width'),\n fill: this.getAttr('fill')\n });\n if (options.link) { symbol.attr('href', options.link); }\n if (options.target) { symbol.attr('target', options.target); }\n if (options.key) { symbol.node.id = options.key; }\n symbol.node.setAttribute('class', this.getAttr('class'));\n\n this.text.attr({\n y: symbol.getBBox().height/2\n });\n\n this.group.push(symbol);\n symbol.insertBefore(this.text);\n\n this.initialize();\n}\ninherits(Condition, Symbol);\n\nCondition.prototype.render = function() {\n\n if (this.yes_direction) {\n this[this.yes_direction + '_symbol'] = this.yes_symbol;\n }\n\n if (this.no_direction) {\n this[this.no_direction + '_symbol'] = this.no_symbol;\n }\n\n var lineLength = this.getAttr('line-length');\n\n if (this.bottom_symbol) {\n var bottomPoint = this.getBottom();\n\n if (!this.bottom_symbol.isPositioned) {\n this.bottom_symbol.shiftY(this.getY() + this.height + lineLength);\n this.bottom_symbol.setX(bottomPoint.x - this.bottom_symbol.width/2);\n this.bottom_symbol.isPositioned = true;\n\n this.bottom_symbol.render();\n }\n }\n\n if (this.right_symbol) {\n var rightPoint = this.getRight();\n\n if (!this.right_symbol.isPositioned) {\n\n this.right_symbol.setY(rightPoint.y - this.right_symbol.height/2);\n this.right_symbol.shiftX(this.group.getBBox().x + this.width + lineLength);\n\n var self = this;\n (function shift() {\n var hasSymbolUnder = false;\n var symb;\n for (var i = 0, len = self.chart.symbols.length; i < len; i++) {\n symb = self.chart.symbols[i];\n\n if (!self.params['align-next'] || self.params['align-next'] !== 'no') { \n var diff = Math.abs(symb.getCenter().x - self.right_symbol.getCenter().x);\n if (symb.getCenter().y > self.right_symbol.getCenter().y && diff <= self.right_symbol.width/2) {\n hasSymbolUnder = true;\n break;\n }\n }\n }\n\n if (hasSymbolUnder) {\n if (self.right_symbol.symbolType === 'end') return;\n self.right_symbol.setX(symb.getX() + symb.width + lineLength);\n shift();\n }\n })();\n\n this.right_symbol.isPositioned = true;\n\n this.right_symbol.render();\n }\n }\n};\n\nCondition.prototype.renderLines = function() {\n if (this.yes_symbol) {\n this.drawLineTo(this.yes_symbol, this.getAttr('yes-text'), this.yes_direction);\n }\n\n if (this.no_symbol) {\n this.drawLineTo(this.no_symbol, this.getAttr('no-text'), this.no_direction);\n }\n};\n\nmodule.exports = Condition;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/flowchart.symbol.condition.js\n ** module id = 5\n ** module chunks = 0\n **/","var Symbol = require('./flowchart.symbol');\nvar inherits = require('./flowchart.helpers').inherits;\n\nfunction Parallel(chart, options) {\n var symbol = chart.paper.rect(0, 0, 0, 0);\n options = options || {};\n Symbol.call(this, chart, options, symbol);\n this.textMargin = this.getAttr('text-margin');\n this.path1_direction = 'bottom';\n this.path2_direction = 'right';\n this.path3_direction = 'top';\n this.params = options.params;\n if (options.direction_next === 'path1' && !options[options.direction_next] && options.next) {\n options[options.direction_next] = options.next;\n }\n if (options.direction_next === 'path2' && !options[options.direction_next] && options.next) {\n options[options.direction_next] = options.next;\n }\n if (options.direction_next === 'path3' && !options[options.direction_next] && options.next) {\n options[options.direction_next] = options.next;\n }\n\n if (options.path1 && options.direction_path1 && options.path2 && !options.direction_path2 && options.path3 && !options.direction_path3) {\n if (options.direction_path1 === 'right') {\n this.path2_direction = 'bottom';\n this.path1_direction = 'right';\n this.path3_direction = 'top';\n } else if (options.direction_path1 === 'top') {\n this.path2_direction = 'right';\n this.path1_direction = 'top';\n this.path3_direction = 'bottom';\n } else if (options.direction_path1 === 'left') {\n this.path2_direction = 'right';\n this.path1_direction = 'left';\n this.path3_direction = 'bottom';\n } else {\n this.path2_direction = 'right';\n this.path1_direction = 'bottom';\n this.path3_direction = 'top';\n }\n } else if (options.path1 && !options.direction_path1 && options.path2 && options.direction_path2 && options.path3 && !options.direction_path3) {\n if (options.direction_path2 === 'right') {\n this.path1_direction = 'bottom';\n this.path2_direction = 'right';\n this.path3_direction = 'top';\n } else if (options.direction_path2 === 'left') {\n this.path1_direction = 'bottom';\n this.path2_direction = 'left';\n this.path3_direction = 'right';\n } else {\n this.path1_direction = 'right';\n this.path2_direction = 'bottom';\n this.path3_direction = 'top';\n }\n } else if (options.path1 && !options.direction_path1 && options.path2 && !options.direction_path2 && options.path3 && options.direction_path3) {\n if (options.direction_path2 === 'right') {\n this.path1_direction = 'bottom';\n this.path2_direction = 'top';\n this.path3_direction = 'right';\n } else if (options.direction_path2 === 'left') {\n this.path1_direction = 'bottom';\n this.path2_direction = 'right';\n this.path3_direction = 'left';\n } else {\n this.path1_direction = 'right';\n this.path2_direction = 'bottom';\n this.path3_direction = 'top';\n }\n } else {\n this.path1_direction = options.direction_path1;\n this.path2_direction = options.direction_path2;\n this.path3_direction = options.direction_path3;\n }\n\n this.path1_direction = this.path1_direction || 'bottom';\n this.path2_direction = this.path2_direction || 'right';\n this.path3_direction = this.path3_direction || 'top';\n\n this.initialize();\n}\ninherits(Parallel, Symbol);\n\nParallel.prototype.render = function() {\n\n if (this.path1_direction) {\n this[this.path1_direction + '_symbol'] = this.path1_symbol;\n }\n\n if (this.path2_direction) {\n this[this.path2_direction + '_symbol'] = this.path2_symbol;\n }\n\n if (this.path3_direction) {\n this[this.path3_direction + '_symbol'] = this.path3_symbol;\n }\n\n var lineLength = this.getAttr('line-length');\n\n if (this.bottom_symbol) {\n var bottomPoint = this.getBottom();\n\n if (!this.bottom_symbol.isPositioned) {\n this.bottom_symbol.shiftY(this.getY() + this.height + lineLength);\n this.bottom_symbol.setX(bottomPoint.x - this.bottom_symbol.width / 2);\n this.bottom_symbol.isPositioned = true;\n\n this.bottom_symbol.render();\n }\n }\n\n if (this.top_symbol) {\n var topPoint = this.getTop();\n\n if (!this.top_symbol.isPositioned) {\n this.top_symbol.shiftY(this.getY() - this.top_symbol.height - lineLength);\n this.top_symbol.setX(topPoint.x + this.top_symbol.width);\n this.top_symbol.isPositioned = true;\n\n this.top_symbol.render();\n }\n }\n\n var self = this;\n\n if (this.left_symbol) {\n var leftPoint = this.getLeft();\n\n if (!this.left_symbol.isPositioned) {\n this.left_symbol.setY(leftPoint.y - this.left_symbol.height / 2);\n this.left_symbol.shiftX(-(this.group.getBBox().x + this.width + lineLength));\n (function shift() {\n var hasSymbolUnder = false;\n var symb;\n for (var i = 0, len = self.chart.symbols.length; i < len; i++) {\n symb = self.chart.symbols[i];\n\n if (!self.params['align-next'] || self.params['align-next'] !== 'no') {\n var diff = Math.abs(symb.getCenter().x - self.left_symbol.getCenter().x);\n if (symb.getCenter().y > self.left_symbol.getCenter().y && diff <= self.left_symbol.width / 2) {\n hasSymbolUnder = true;\n break;\n }\n }\n }\n\n if (hasSymbolUnder) {\n if (self.left_symbol.symbolType === 'end') return;\n self.left_symbol.setX(symb.getX() + symb.width + lineLength);\n shift();\n }\n })();\n\n this.left_symbol.isPositioned = true;\n\n this.left_symbol.render();\n }\n }\n\n if (this.right_symbol) {\n var rightPoint = this.getRight();\n\n if (!this.right_symbol.isPositioned) {\n this.right_symbol.setY(rightPoint.y - this.right_symbol.height / 2);\n this.right_symbol.shiftX(this.group.getBBox().x + this.width + lineLength);\n (function shift() {\n var hasSymbolUnder = false;\n var symb;\n for (var i = 0, len = self.chart.symbols.length; i < len; i++) {\n symb = self.chart.symbols[i];\n\n if (!self.params['align-next'] || self.params['align-next'] !== 'no') {\n var diff = Math.abs(symb.getCenter().x - self.right_symbol.getCenter().x);\n if (symb.getCenter().y > self.right_symbol.getCenter().y && diff <= self.right_symbol.width / 2) {\n hasSymbolUnder = true;\n break;\n }\n }\n }\n\n if (hasSymbolUnder) {\n if (self.right_symbol.symbolType === 'end') return;\n self.right_symbol.setX(symb.getX() + symb.width + lineLength);\n shift();\n }\n })();\n\n this.right_symbol.isPositioned = true;\n\n this.right_symbol.render();\n }\n }\n};\n\nParallel.prototype.renderLines = function() {\n if (this.path1_symbol) {\n this.drawLineTo(this.path1_symbol, '', this.path1_direction);\n }\n\n if (this.path2_symbol) {\n this.drawLineTo(this.path2_symbol, '', this.path2_direction);\n }\n\n if (this.path3_symbol) {\n this.drawLineTo(this.path3_symbol, '', this.path3_direction);\n }\n};\n\nmodule.exports = Parallel;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/flowchart.symbol.parallel.js\n ** module id = 6\n ** module chunks = 0\n **/","var Raphael = require('raphael');\nvar defaults = require('./flowchart.helpers').defaults;\nvar defaultOptions = require('./flowchart.defaults');\nvar Condition = require('./flowchart.symbol.condition');\nvar Parallel = require('./flowchart.symbol.parallel');\n\nfunction FlowChart(container, options) {\n options = options || {};\n\n this.paper = new Raphael(container);\n\n this.options = defaults(options, defaultOptions);\n\n this.symbols = [];\n this.lines = [];\n this.start = null;\n}\n\nFlowChart.prototype.handle = function(symbol) {\n if (this.symbols.indexOf(symbol) <= -1) {\n this.symbols.push(symbol);\n }\n\n var flowChart = this;\n\n if (symbol instanceof(Condition)) {\n symbol.yes = function(nextSymbol) {\n symbol.yes_symbol = nextSymbol;\n if(symbol.no_symbol) {\n symbol.pathOk = true;\n }\n return flowChart.handle(nextSymbol);\n };\n symbol.no = function(nextSymbol) {\n symbol.no_symbol = nextSymbol;\n if (symbol.yes_symbol) {\n symbol.pathOk = true;\n }\n return flowChart.handle(nextSymbol);\n };\n } else if (symbol instanceof(Parallel)) {\n symbol.path1 = function(nextSymbol) {\n symbol.path1_symbol = nextSymbol;\n if (symbol.path2_symbol) {\n symbol.pathOk = true;\n }\n return flowChart.handle(nextSymbol);\n };\n symbol.path2 = function(nextSymbol) {\n symbol.path2_symbol = nextSymbol;\n if (symbol.path3_symbol) {\n symbol.pathOk = true;\n }\n return flowChart.handle(nextSymbol);\n };\n symbol.path3 = function(nextSymbol) {\n symbol.path3_symbol = nextSymbol;\n if (symbol.path1_symbol) {\n symbol.pathOk = true;\n }\n return flowChart.handle(nextSymbol);\n };\n } else {\n symbol.then = function(nextSymbol) {\n symbol.next = nextSymbol;\n symbol.pathOk = true;\n return flowChart.handle(nextSymbol);\n };\n }\n\n return symbol;\n};\n\nFlowChart.prototype.startWith = function(symbol) {\n this.start = symbol;\n return this.handle(symbol);\n};\n\nFlowChart.prototype.render = function() {\n var maxWidth = 0,\n maxHeight = 0,\n i = 0,\n len = 0,\n maxX = 0,\n maxY = 0,\n minX = 0,\n minY = 0,\n symbol,\n line;\n\n for (i = 0, len = this.symbols.length; i < len; i++) {\n symbol = this.symbols[i];\n if (symbol.width > maxWidth) {\n maxWidth = symbol.width;\n }\n if (symbol.height > maxHeight) {\n maxHeight = symbol.height;\n }\n }\n\n for (i = 0, len = this.symbols.length; i < len; i++) {\n symbol = this.symbols[i];\n symbol.shiftX(this.options.x + (maxWidth - symbol.width)/2 + this.options['line-width']);\n symbol.shiftY(this.options.y + (maxHeight - symbol.height)/2 + this.options['line-width']);\n }\n\n this.start.render();\n // for (i = 0, len = this.symbols.length; i < len; i++) {\n // symbol = this.symbols[i];\n // symbol.render();\n // }\n\n for (i = 0, len = this.symbols.length; i < len; i++) {\n symbol = this.symbols[i];\n symbol.renderLines();\n }\n\n maxX = this.maxXFromLine;\n\n var x;\n var y;\n\n for (i = 0, len = this.symbols.length; i < len; i++) {\n symbol = this.symbols[i];\n x = symbol.getX() + symbol.width;\n y = symbol.getY() + symbol.height;\n if (x > maxX) {\n maxX = x;\n }\n if (y > maxY) {\n maxY = y;\n }\n }\n\n for (i = 0, len = this.lines.length; i < len; i++) {\n line = this.lines[i].getBBox();\n x = line.x;\n y = line.y;\n var x2 = line.x2;\n var y2 = line.y2;\n if (x < minX) {\n minX = x;\n }\n if (y < minY) {\n minY = y;\n }\n if (x2 > maxX) {\n maxX = x2;\n }\n if (y2 > maxY) {\n maxY = y2;\n }\n }\n\n var scale = this.options['scale'];\n var lineWidth = this.options['line-width'];\n\n if (this.minXFromSymbols < minX) minX = this.minXFromSymbols;\n\n if (minX < 0) minX -= lineWidth;\n if (minY < 0) minY -= lineWidth;\n\n var width = maxX + lineWidth - minX;\n var height = maxY + lineWidth - minY;\n\n this.paper.setSize(width * scale, height * scale);\n this.paper.setViewBox(minX, minY, width, height, true);\n};\n\nFlowChart.prototype.clean = function() {\n if (this.paper) {\n var paperDom = this.paper.canvas;\n paperDom.parentNode && paperDom.parentNode.removeChild(paperDom);\n }\n};\n\nmodule.exports = FlowChart;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/flowchart.chart.js\n ** module id = 7\n ** module chunks = 0\n **/","// defaults\nmodule.exports = {\n 'x': 0,\n 'y': 0,\n 'line-width': 3,\n 'line-length': 50,\n 'text-margin': 10,\n 'font-size': 14,\n 'font-color': 'black',\n // 'font': 'normal',\n // 'font-family': 'calibri',\n // 'font-weight': 'normal',\n 'line-color': 'black',\n 'element-color': 'black',\n 'fill': 'white',\n 'yes-text': 'yes',\n 'no-text': 'no',\n 'arrow-end': 'block',\n 'class': 'flowchart',\n 'scale': 1,\n 'symbols': {\n 'start': {},\n 'end': {},\n 'condition': {},\n 'inputoutput': {},\n 'operation': {},\n 'subroutine': {},\n 'parallel': {}\n } //,\n // 'flowstate' : {\n // 'past' : { 'fill': '#CCCCCC', 'font-size': 12},\n // 'current' : {'fill': 'yellow', 'font-color': 'red', 'font-weight': 'bold'},\n // 'future' : { 'fill': '#FFFF99'},\n // 'invalid': {'fill': '#444444'}\n // }\n};\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/flowchart.defaults.js\n ** module id = 8\n ** module chunks = 0\n **/","// add indexOf to non ECMA-262 standard compliant browsers\nif (!Array.prototype.indexOf) {\n Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) {\n \"use strict\";\n if (this === null) {\n throw new TypeError();\n }\n var t = Object(this);\n var len = t.length >>> 0;\n if (len === 0) {\n return -1;\n }\n var n = 0;\n if (arguments.length > 0) {\n n = Number(arguments[1]);\n if (n != n) { // shortcut for verifying if it's NaN\n n = 0;\n } else if (n !== 0 && n != Infinity && n != -Infinity) {\n n = (n > 0 || -1) * Math.floor(Math.abs(n));\n }\n }\n if (n >= len) {\n return -1;\n }\n var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0);\n for (; k < len; k++) {\n if (k in t && t[k] === searchElement) {\n return k;\n }\n }\n return -1;\n };\n}\n\n// add lastIndexOf to non ECMA-262 standard compliant browsers\nif (!Array.prototype.lastIndexOf) {\n Array.prototype.lastIndexOf = function(searchElement /*, fromIndex*/) {\n \"use strict\";\n if (this === null) {\n throw new TypeError();\n }\n var t = Object(this);\n var len = t.length >>> 0;\n if (len === 0) {\n return -1;\n }\n var n = len;\n if (arguments.length > 1) {\n n = Number(arguments[1]);\n if (n != n) {\n n = 0;\n } else if (n !== 0 && n != (1 / 0) && n != -(1 / 0)) {\n n = (n > 0 || -1) * Math.floor(Math.abs(n));\n }\n }\n var k = n >= 0 ? Math.min(n, len - 1) : len - Math.abs(n);\n for (; k >= 0; k--) {\n if (k in t && t[k] === searchElement) {\n return k;\n }\n }\n return -1;\n };\n}\n\nif (!String.prototype.trim) {\n String.prototype.trim = function() {\n return this.replace(/^\\s+|\\s+$/g, '');\n };\n}\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/flowchart.shim.js\n ** module id = 9\n ** module chunks = 0\n **/","var Symbol = require('./flowchart.symbol');\nvar inherits = require('./flowchart.helpers').inherits;\n\nfunction End(chart, options) {\n var symbol = chart.paper.rect(0, 0, 0, 0, 20);\n options = options || {};\n options.text = options.text || 'End';\n Symbol.call(this, chart, options, symbol);\n}\ninherits(End, Symbol);\n\nmodule.exports = End;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/flowchart.symbol.end.js\n ** module id = 10\n ** module chunks = 0\n **/","var Symbol = require('./flowchart.symbol');\nvar inherits = require('./flowchart.helpers').inherits;\nvar drawAPI = require('./flowchart.functions');\nvar drawPath = drawAPI.drawPath;\n\nfunction InputOutput(chart, options) {\n options = options || {};\n Symbol.call(this, chart, options);\n this.textMargin = this.getAttr('text-margin');\n\n this.text.attr({\n x: this.textMargin * 3\n });\n\n var width = this.text.getBBox().width + 4 * this.textMargin;\n var height = this.text.getBBox().height + 2 * this.textMargin;\n var startX = this.textMargin;\n var startY = height/2;\n\n var start = {x: startX, y: startY};\n var points = [\n {x: startX - this.textMargin, y: height},\n {x: startX - this.textMargin + width, y: height},\n {x: startX - this.textMargin + width + 2 * this.textMargin, y: 0},\n {x: startX - this.textMargin + 2 * this.textMargin, y: 0},\n {x: startX, y: startY}\n ];\n\n var symbol = drawPath(chart, start, points);\n\n symbol.attr({\n stroke: this.getAttr('element-color'),\n 'stroke-width': this.getAttr('line-width'),\n fill: this.getAttr('fill')\n });\n if (options.link) { symbol.attr('href', options.link); }\n if (options.target) { symbol.attr('target', options.target); }\n if (options.key) { symbol.node.id = options.key; }\n symbol.node.setAttribute('class', this.getAttr('class'));\n\n this.text.attr({\n y: symbol.getBBox().height/2\n });\n\n this.group.push(symbol);\n symbol.insertBefore(this.text);\n\n this.initialize();\n}\ninherits(InputOutput, Symbol);\n\nInputOutput.prototype.getLeft = function() {\n var y = this.getY() + this.group.getBBox().height/2;\n var x = this.getX() + this.textMargin;\n return {x: x, y: y};\n};\n\nInputOutput.prototype.getRight = function() {\n var y = this.getY() + this.group.getBBox().height/2;\n var x = this.getX() + this.group.getBBox().width - this.textMargin;\n return {x: x, y: y};\n};\n\nmodule.exports = InputOutput;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/flowchart.symbol.inputoutput.js\n ** module id = 11\n ** module chunks = 0\n **/","var Symbol = require('./flowchart.symbol');\nvar inherits = require('./flowchart.helpers').inherits;\n\nfunction Operation(chart, options) {\n var symbol = chart.paper.rect(0, 0, 0, 0);\n options = options || {};\n Symbol.call(this, chart, options, symbol);\n}\ninherits(Operation, Symbol);\n\nmodule.exports = Operation;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/flowchart.symbol.operation.js\n ** module id = 12\n ** module chunks = 0\n **/","var Symbol = require('./flowchart.symbol');\nvar inherits = require('./flowchart.helpers').inherits;\n\nfunction Start(chart, options) {\n var symbol = chart.paper.rect(0, 0, 0, 0, 20);\n options = options || {};\n options.text = options.text || 'Start';\n Symbol.call(this, chart, options, symbol);\n}\ninherits(Start, Symbol);\n\nmodule.exports = Start;\n\n// Start.prototype.render = function() {\n// if (this.next) {\n// var lineLength = this.chart.options.symbols[this.symbolType]['line-length'] || this.chart.options['line-length'];\n\n// var bottomPoint = this.getBottom();\n// var topPoint = this.next.getTop();\n\n// if (!this.next.isPositioned) {\n// this.next.shiftY(this.getY() + this.height + lineLength);\n// this.next.setX(bottomPoint.x - this.next.width/2);\n// this.next.isPositioned = true;\n\n// this.next.render();\n// }\n// }\n// };\n\n// Start.prototype.renderLines = function() {\n// if (this.next) {\n// this.drawLineTo(this.next);\n// }\n// };\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/flowchart.symbol.start.js\n ** module id = 13\n ** module chunks = 0\n **/","var Symbol = require('./flowchart.symbol');\nvar inherits = require('./flowchart.helpers').inherits;\n\nfunction Subroutine(chart, options) {\n var symbol = chart.paper.rect(0, 0, 0, 0);\n options = options || {};\n Symbol.call(this, chart, options, symbol);\n\n symbol.attr({\n width: this.text.getBBox().width + 4 * this.getAttr('text-margin')\n });\n\n this.text.attr({\n 'x': 2 * this.getAttr('text-margin')\n });\n\n var innerWrap = chart.paper.rect(0, 0, 0, 0);\n innerWrap.attr({\n x: this.getAttr('text-margin'),\n stroke: this.getAttr('element-color'),\n 'stroke-width': this.getAttr('line-width'),\n width: this.text.getBBox().width + 2 * this.getAttr('text-margin'),\n height: this.text.getBBox().height + 2 * this.getAttr('text-margin'),\n fill: this.getAttr('fill')\n });\n if (options.key) { innerWrap.node.id = options.key + 'i'; }\n\n var font = this.getAttr('font');\n var fontF = this.getAttr('font-family');\n var fontW = this.getAttr('font-weight');\n\n if (font) innerWrap.attr({ 'font': font });\n if (fontF) innerWrap.attr({ 'font-family': fontF });\n if (fontW) innerWrap.attr({ 'font-weight': fontW });\n\n if (options.link) { innerWrap.attr('href', options.link); }\n if (options.target) { innerWrap.attr('target', options.target); }\n this.group.push(innerWrap);\n innerWrap.insertBefore(this.text);\n\n this.initialize();\n}\ninherits(Subroutine, Symbol);\n\nmodule.exports = Subroutine;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/flowchart.symbol.subroutine.js\n ** module id = 14\n ** module chunks = 0\n **/","if (typeof jQuery != 'undefined') {\n\tvar parse = require('./flowchart.parse');\n\n\t(function( $ ) {\n\t\tfunction paramFit(needle, haystack) {\n\t\t\treturn needle == haystack ||\n\t\t\t( Array.isArray(haystack) && (haystack.includes(needle) || haystack.includes(Number(needle)) ))\n\t\t}\n\t\tvar methods = {\n\t\t\tinit : function(options) {\n\t\t\t\treturn this.each(function() {\n\t\t\t\t\tvar $this = $(this);\n\t\t\t\t\tthis.chart = parse($this.text());\n\t\t\t\t\t$this.html('');\n\t\t\t\t\tthis.chart.drawSVG(this, options);\n\t\t\t\t});\n\t\t\t},\n\t\t\tsetFlowStateByParam : function(param, paramValue, newFlowState) {\n\t\t\t\treturn this.each(function() {\n\t\t\t\t\tvar chart = this.chart;\n\n\t\t\t\t\t// @todo this should be part of Symbol API\n\t\t\t\t\tvar nextSymbolKeys = ['next', 'yes', 'no', 'path1', 'path2', 'path3'];\n\n\t\t\t\t\tfor (var property in chart.symbols) {\n\t\t\t\t\t\tif (chart.symbols.hasOwnProperty(property)) {\n\t\t\t\t\t\t\tvar symbol = chart.symbols[property];\n\t\t\t\t\t\t\tvar val = symbol.params[param];\n\t\t\t\t\t\t\tif (paramFit(val, paramValue)) {\n\t\t\t\t\t\t\t\tsymbol.flowstate = newFlowState;\n\t\t\t\t\t\t\t\tfor (var nski = 0; nski < nextSymbolKeys.length; nski++) {\n\t\t\t\t\t\t\t\t\tvar nextSymbolKey = nextSymbolKeys[nski];\n\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\tsymbol[nextSymbolKey] &&\n\t\t\t\t\t\t\t\t\t\tsymbol[nextSymbolKey]['params'] &&\n\t\t\t\t\t\t\t\t\t\tsymbol[nextSymbolKey]['params'][param] &&\n\t\t\t\t\t\t\t\t\t\tparamFit(symbol[nextSymbolKey]['params'][param], paramValue)\n\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\tsymbol.lineStyle[symbol[nextSymbolKey]['key']] = {stroke: chart.options()['flowstate'][newFlowState]['fill']};\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tchart.clean();\n\t\t\t\t\tchart.drawSVG(this);\n\t\t\t\t});\n\n\t\t\t},\n\t\t\tclearFlowState: function () {\n\t\t\t\treturn this.each(function() {\n\t\t\t\t\tvar chart = this.chart;\n\n\t\t\t\t\tfor (var property in chart.symbols) {\n\t\t\t\t\t\tif (chart.symbols.hasOwnProperty(property)) {\n\t\t\t\t\t\t\tvar node = chart.symbols[property];\n\t\t\t\t\t\t\tnode.flowstate = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tchart.clean();\n\t\t\t\t\tchart.drawSVG(this);\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\n\t\t$.fn.flowChart = function(methodOrOptions) {\n\t\t\tif ( methods[methodOrOptions] ) {\n\t\t\t\treturn methods[ methodOrOptions ].apply( this, Array.prototype.slice.call( arguments, 1 ));\n\t\t\t} else if ( typeof methodOrOptions === 'object' || ! methodOrOptions ) {\n\t\t\t\t// Default to \"init\"\n\t\t\t\treturn methods.init.apply( this, arguments );\n\t\t\t} else {\n\t\t\t\t$.error( 'Method ' + methodOrOptions + ' does not exist on jQuery.flowChart' );\n\t\t\t}\n\t\t};\n\n\t})(jQuery); // eslint-disable-line\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./src/jquery-plugin.js\n ** module id = 15\n ** module chunks = 0\n **/","module.exports = __WEBPACK_EXTERNAL_MODULE_16__;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external \"Raphael\"\n ** module id = 16\n ** module chunks = 0\n **/"],"sourceRoot":""}
1
+ {"version":3,"file":"flowchart.min.js","sources":["../../../node_modules/flowchart.js/src/flowchart.helpers.js","../../../node_modules/flowchart.js/src/flowchart.functions.js","../../../node_modules/flowchart.js/src/flowchart.symbol.js","../../../node_modules/flowchart.js/src/flowchart.symbol.condition.js","../../../node_modules/flowchart.js/src/flowchart.symbol.parallel.js","../../../node_modules/flowchart.js/src/flowchart.chart.js","../../../node_modules/flowchart.js/src/flowchart.defaults.js","../../../node_modules/flowchart.js/src/flowchart.parse.js","../../../node_modules/flowchart.js/src/flowchart.symbol.start.js","../../../node_modules/flowchart.js/src/flowchart.symbol.end.js","../../../node_modules/flowchart.js/src/flowchart.symbol.operation.js","../../../node_modules/flowchart.js/src/flowchart.symbol.inputoutput.js","../../../node_modules/flowchart.js/src/flowchart.symbol.input.js","../../../node_modules/flowchart.js/src/flowchart.symbol.output.js","../../../node_modules/flowchart.js/src/flowchart.symbol.subroutine.js","../../../node_modules/flowchart.js/src/flowchart.shim.js","../../../node_modules/flowchart.js/index.js","../../../node_modules/flowchart.js/src/jquery-plugin.js"],"sourcesContent":["function _defaults(options, defaultOptions) {\n if (!options || typeof options === 'function') {\n return defaultOptions;\n }\n\n var merged = {};\n for (var attrname in defaultOptions) {\n merged[attrname] = defaultOptions[attrname];\n }\n\n for (attrname in options) {\n if (options[attrname]) {\n if (typeof merged[attrname] === 'object') {\n merged[attrname] = _defaults(merged[attrname], options[attrname]);\n } else {\n merged[attrname] = options[attrname];\n }\n }\n }\n return merged;\n}\n\nfunction _inherits(ctor, superCtor) {\n if (typeof(Object.create) === 'function') {\n // implementation from standard node.js 'util' module\n ctor.super_ = superCtor;\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n } else {\n // old school shim for old browsers\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n}\n\n// move dependent functions to a container so that\n// they can be overriden easier in no jquery environment (node.js)\nmodule.exports = {\n defaults: _defaults,\n inherits: _inherits\n};\n","function drawPath(chart, location, points) {\n var i, len;\n var path = 'M{0},{1}';\n for (i = 2, len = 2 * points.length + 2; i < len; i+=2) {\n path += ' L{' + i + '},{' + (i + 1) + '}';\n }\n var pathValues = [location.x, location.y];\n for (i = 0, len = points.length; i < len; i++) {\n pathValues.push(points[i].x);\n pathValues.push(points[i].y);\n }\n var symbol = chart.paper.path(path, pathValues);\n symbol.attr('stroke', chart.options['element-color']);\n symbol.attr('stroke-width', chart.options['line-width']);\n\n var font = chart.options.font;\n var fontF = chart.options['font-family'];\n var fontW = chart.options['font-weight'];\n\n if (font) symbol.attr({ 'font': font });\n if (fontF) symbol.attr({ 'font-family': fontF });\n if (fontW) symbol.attr({ 'font-weight': fontW });\n\n return symbol;\n}\n\nfunction drawLine(chart, from, to, text) {\n var i, len;\n\n if (Object.prototype.toString.call(to) !== '[object Array]') {\n to = [to];\n }\n\n var path = 'M{0},{1}';\n for (i = 2, len = 2 * to.length + 2; i < len; i+=2) {\n path += ' L{' + i + '},{' + (i + 1) + '}';\n }\n var pathValues = [from.x, from.y];\n for (i = 0, len = to.length; i < len; i++) {\n pathValues.push(to[i].x);\n pathValues.push(to[i].y);\n }\n\n var line = chart.paper.path(path, pathValues);\n line.attr({\n stroke: chart.options['line-color'],\n 'stroke-width': chart.options['line-width'],\n 'arrow-end': chart.options['arrow-end']\n });\n\n var font = chart.options.font;\n var fontF = chart.options['font-family'];\n var fontW = chart.options['font-weight'];\n\n if (font) line.attr({ 'font': font });\n if (fontF) line.attr({ 'font-family': fontF });\n if (fontW) line.attr({ 'font-weight': fontW });\n\n if (text) {\n\n var centerText = false;\n\n var textPath = chart.paper.text(0, 0, text);\n var textAnchor = 'start';\n\n var isHorizontal = false;\n var firstTo = to[0];\n\n if (from.y === firstTo.y) {\n isHorizontal = true;\n }\n\n var x = 0,\n y = 0;\n\n if (centerText) {\n if (from.x > firstTo.x) {\n x = from.x - (from.x - firstTo.x)/2;\n } else {\n x = firstTo.x - (firstTo.x - from.x)/2;\n }\n\n if (from.y > firstTo.y) {\n y = from.y - (from.y - firstTo.y)/2;\n } else {\n y = firstTo.y - (firstTo.y - from.y)/2;\n }\n\n if (isHorizontal) {\n x -= textPath.getBBox().width/2;\n y -= chart.options['text-margin'];\n } else {\n x += chart.options['text-margin'];\n y -= textPath.getBBox().height/2;\n }\n } else {\n x = from.x;\n y = from.y;\n\n if (isHorizontal) {\n if (from.x > firstTo.x) {\n x -= chart.options['text-margin']/2;\n textAnchor = 'end';\n } else {\n x += chart.options['text-margin']/2;\n }\n y -= chart.options['text-margin'];\n } else {\n x += chart.options['text-margin']/2;\n y += chart.options['text-margin'];\n if (from.y > firstTo.y) {\n y -= chart.options['text-margin']*2;\n }\n }\n }\n\n textPath.attr({\n 'text-anchor': textAnchor,\n 'font-size': chart.options['font-size'],\n 'fill': chart.options['font-color'],\n x: x,\n y: y\n });\n\n if (font) textPath.attr({ 'font': font });\n if (fontF) textPath.attr({ 'font-family': fontF });\n if (fontW) textPath.attr({ 'font-weight': fontW });\n }\n\n return line;\n}\n\nfunction checkLineIntersection(line1StartX, line1StartY, line1EndX, line1EndY, line2StartX, line2StartY, line2EndX, line2EndY) {\n // if the lines intersect, the result contains the x and y of the intersection (treating the lines as infinite) and booleans for whether line segment 1 or line segment 2 contain the point\n var denominator, a, b, numerator1, numerator2, result = {\n x: null,\n y: null,\n onLine1: false,\n onLine2: false\n };\n denominator = ((line2EndY - line2StartY) * (line1EndX - line1StartX)) - ((line2EndX - line2StartX) * (line1EndY - line1StartY));\n if (denominator === 0) {\n return result;\n }\n a = line1StartY - line2StartY;\n b = line1StartX - line2StartX;\n numerator1 = ((line2EndX - line2StartX) * a) - ((line2EndY - line2StartY) * b);\n numerator2 = ((line1EndX - line1StartX) * a) - ((line1EndY - line1StartY) * b);\n a = numerator1 / denominator;\n b = numerator2 / denominator;\n\n // if we cast these lines infinitely in both directions, they intersect here:\n result.x = line1StartX + (a * (line1EndX - line1StartX));\n result.y = line1StartY + (a * (line1EndY - line1StartY));\n /*\n // it is worth noting that this should be the same as:\n x = line2StartX + (b * (line2EndX - line2StartX));\n y = line2StartX + (b * (line2EndY - line2StartY));\n */\n // if line1 is a segment and line2 is infinite, they intersect if:\n if (a > 0 && a < 1) {\n result.onLine1 = true;\n }\n // if line2 is a segment and line1 is infinite, they intersect if:\n if (b > 0 && b < 1) {\n result.onLine2 = true;\n }\n // if line1 and line2 are segments, they intersect if both of the above are true\n return result;\n}\n\nmodule.exports = {\n\tdrawPath: drawPath,\n\tdrawLine: drawLine,\n\tcheckLineIntersection: checkLineIntersection\n};\n","var drawAPI = require('./flowchart.functions');\nvar drawLine = drawAPI.drawLine;\nvar checkLineIntersection = drawAPI.checkLineIntersection;\n\nfunction Symbol(chart, options, symbol) {\n this.chart = chart;\n this.group = this.chart.paper.set();\n this.symbol = symbol;\n this.connectedTo = [];\n this.symbolType = options.symbolType;\n this.flowstate = (options.flowstate || 'future');\n this.lineStyle = (options.lineStyle || {});\n this.key = (options.key || '');\n this.leftLines = [];\n this.rightLines = [];\n this.topLines = [];\n this.bottomLines = [];\n this.params = options.params;\n\n this.next_direction = options.next && options['direction_next'] ? options['direction_next'] : undefined;\n\n this.text = this.chart.paper.text(0, 0, options.text);\n //Raphael does not support the svg group tag so setting the text node id to the symbol node id plus t\n if (options.key) { this.text.node.id = options.key + 't'; }\n this.text.node.setAttribute('class', this.getAttr('class') + 't');\n\n this.text.attr({\n 'text-anchor': 'start',\n 'x' : this.getAttr('text-margin'),\n 'fill' : this.getAttr('font-color'),\n 'font-size' : this.getAttr('font-size')\n });\n\n var font = this.getAttr('font');\n var fontF = this.getAttr('font-family');\n var fontW = this.getAttr('font-weight');\n\n if (font) this.text.attr({ 'font': font });\n if (fontF) this.text.attr({ 'font-family': fontF });\n if (fontW) this.text.attr({ 'font-weight': fontW });\n\n if (options.link) { this.text.attr('href', options.link); }\n \n //ndrqu Add click function with event and options params\n if (options.function) { \n this.text.attr({ 'cursor' : 'pointer' });\n\n this.text.node.addEventListener(\"click\", function(evt) {\n window[options.function](evt,options);\n }, false);\n }\n\n if (options.target) { this.text.attr('target', options.target); }\n\n var maxWidth = this.getAttr('maxWidth');\n if (maxWidth) {\n // using this approach: http://stackoverflow.com/a/3153457/22466\n var words = options.text.split(' ');\n var tempText = \"\";\n for (var i=0, ii=words.length; i<ii; i++) {\n var word = words[i];\n this.text.attr(\"text\", tempText + \" \" + word);\n if (this.text.getBBox().width > maxWidth) {\n tempText += \"\\n\" + word;\n } else {\n tempText += \" \" + word;\n }\n }\n this.text.attr(\"text\", tempText.substring(1));\n }\n\n this.group.push(this.text);\n\n if (symbol) {\n var tmpMargin = this.getAttr('text-margin');\n\n symbol.attr({\n 'fill' : this.getAttr('fill'),\n 'stroke' : this.getAttr('element-color'),\n 'stroke-width' : this.getAttr('line-width'),\n 'width' : this.text.getBBox().width + 2 * tmpMargin,\n 'height' : this.text.getBBox().height + 2 * tmpMargin\n });\n\n symbol.node.setAttribute('class', this.getAttr('class'));\n var roundness = this.getAttr('roundness');\n if (!isNaN(roundness)) {\n symbol.node.setAttribute('ry', roundness);\n symbol.node.setAttribute('rx', roundness);\n }\n\n if (options.link) { symbol.attr('href', options.link); }\n if (options.target) { symbol.attr('target', options.target); }\n\n //ndrqu Add click function with event and options params\n if (options.function) { \n symbol.node.addEventListener(\"click\", function(evt) {\n window[options.function](evt,options);\n }, false);\n symbol.attr({ 'cursor' : 'pointer' });\n }\n if (options.key) { symbol.node.id = options.key; }\n\n this.group.push(symbol);\n symbol.insertBefore(this.text);\n\n this.text.attr({\n 'y': symbol.getBBox().height/2\n });\n\n this.initialize();\n }\n\n}\n\n/* Gets the attribute based on Flowstate, Symbol-Name and default, first found wins */\nSymbol.prototype.getAttr = function(attName) {\n if (!this.chart) {\n return undefined;\n }\n var opt3 = (this.chart.options) ? this.chart.options[attName] : undefined;\n var opt2 = (this.chart.options.symbols) ? this.chart.options.symbols[this.symbolType][attName] : undefined;\n var opt1;\n if (this.chart.options.flowstate && this.chart.options.flowstate[this.flowstate]) {\n opt1 = this.chart.options.flowstate[this.flowstate][attName];\n }\n return (opt1 || opt2 || opt3);\n};\n\nSymbol.prototype.initialize = function() {\n this.group.transform('t' + this.getAttr('line-width') + ',' + this.getAttr('line-width'));\n\n this.width = this.group.getBBox().width;\n this.height = this.group.getBBox().height;\n};\n\nSymbol.prototype.getCenter = function() {\n return {x: this.getX() + this.width/2,\n y: this.getY() + this.height/2};\n};\n\nSymbol.prototype.getX = function() {\n return this.group.getBBox().x;\n};\n\nSymbol.prototype.getY = function() {\n return this.group.getBBox().y;\n};\n\nSymbol.prototype.shiftX = function(x) {\n this.group.transform('t' + (this.getX() + x) + ',' + this.getY());\n};\n\nSymbol.prototype.setX = function(x) {\n this.group.transform('t' + x + ',' + this.getY());\n};\n\nSymbol.prototype.shiftY = function(y) {\n this.group.transform('t' + this.getX() + ',' + (this.getY() + y));\n};\n\nSymbol.prototype.setY = function(y) {\n this.group.transform('t' + this.getX() + ',' + y);\n};\n\nSymbol.prototype.getTop = function() {\n var y = this.getY();\n var x = this.getX() + this.width/2;\n return {x: x, y: y};\n};\n\nSymbol.prototype.getBottom = function() {\n var y = this.getY() + this.height;\n var x = this.getX() + this.width/2;\n return {x: x, y: y};\n};\n\nSymbol.prototype.getLeft = function() {\n var y = this.getY() + this.group.getBBox().height/2;\n var x = this.getX();\n return {x: x, y: y};\n};\n\nSymbol.prototype.getRight = function() {\n var y = this.getY() + this.group.getBBox().height/2;\n var x = this.getX() + this.group.getBBox().width;\n return {x: x, y: y};\n};\n\nSymbol.prototype.render = function() {\n if (this.next) {\n\n var self = this;\n var lineLength = this.getAttr('line-length');\n\n if (this.next_direction === 'right') {\n\n var rightPoint = this.getRight();\n\n if (!this.next.isPositioned) {\n this.next.setY(rightPoint.y - this.next.height/2);\n this.next.shiftX(this.group.getBBox().x + this.width + lineLength);\n\n (function shift() {\n var hasSymbolUnder = false;\n var symb;\n for (var i = 0, len = self.chart.symbols.length; i < len; i++) {\n symb = self.chart.symbols[i];\n\n var diff = Math.abs(symb.getCenter().x - self.next.getCenter().x);\n if (symb.getCenter().y > self.next.getCenter().y && diff <= self.next.width/2) {\n hasSymbolUnder = true;\n break;\n }\n }\n\n if (hasSymbolUnder) {\n if (self.next.symbolType === 'end') return;\n self.next.setX(symb.getX() + symb.width + lineLength);\n shift();\n }\n })();\n\n this.next.isPositioned = true;\n\n this.next.render();\n }\n } else if (this.next_direction === 'left') {\n\n var leftPoint = this.getLeft();\n\n if (!this.next.isPositioned) {\n this.next.setY(leftPoint.y - this.next.height/2);\n this.next.shiftX(-(this.group.getBBox().x + this.width + lineLength));\n\n (function shift() {\n var hasSymbolUnder = false;\n var symb;\n for (var i = 0, len = self.chart.symbols.length; i < len; i++) {\n symb = self.chart.symbols[i];\n\n var diff = Math.abs(symb.getCenter().x - self.next.getCenter().x);\n if (symb.getCenter().y > self.next.getCenter().y && diff <= self.next.width/2) {\n hasSymbolUnder = true;\n break;\n }\n }\n\n if (hasSymbolUnder) {\n if (self.next.symbolType === 'end') return;\n self.next.setX(symb.getX() + symb.width + lineLength);\n shift();\n }\n })();\n\n this.next.isPositioned = true;\n\n this.next.render();\n }\n } else {\n var bottomPoint = this.getBottom();\n\n if (!this.next.isPositioned) {\n this.next.shiftY(this.getY() + this.height + lineLength);\n this.next.setX(bottomPoint.x - this.next.width/2);\n this.next.isPositioned = true;\n\n this.next.render();\n }\n }\n }\n};\n\nSymbol.prototype.renderLines = function() {\n if (this.next) {\n if (this.next_direction) {\n this.drawLineTo(this.next, this.getAttr('arrow-text') || '', this.next_direction);\n } else {\n this.drawLineTo(this.next, this.getAttr('arrow-text') || '');\n }\n }\n};\n\nSymbol.prototype.drawLineTo = function(symbol, text, origin) {\n if (this.connectedTo.indexOf(symbol) < 0) {\n this.connectedTo.push(symbol);\n }\n\n var x = this.getCenter().x,\n y = this.getCenter().y,\n right = this.getRight(),\n bottom = this.getBottom(),\n top = this.getTop(),\n left = this.getLeft();\n\n var symbolX = symbol.getCenter().x,\n symbolY = symbol.getCenter().y,\n symbolTop = symbol.getTop(),\n symbolRight = symbol.getRight(),\n symbolLeft = symbol.getLeft();\n\n var isOnSameColumn = x === symbolX,\n isOnSameLine = y === symbolY,\n isUnder = y < symbolY,\n isUpper = y > symbolY || this === symbol,\n isLeft = x > symbolX,\n isRight = x < symbolX;\n\n var maxX = 0,\n line,\n yOffset,\n lineLength = this.getAttr('line-length'),\n lineWith = this.getAttr('line-width');\n\n if ((!origin || origin === 'bottom') && isOnSameColumn && isUnder) {\n if (symbol.topLines.length === 0 && this.bottomLines.length === 0) {\n line = drawLine(this.chart, bottom, symbolTop, text);\n } else {\n yOffset = Math.max(symbol.topLines.length, this.bottomLines.length) * 10;\n line = drawLine(this.chart, bottom, [\n {x: symbolTop.x, y: symbolTop.y - yOffset},\n {x: symbolTop.x, y: symbolTop.y}\n ], text);\n }\n this.bottomLines.push(line);\n symbol.topLines.push(line);\n this.bottomStart = true;\n symbol.topEnd = true;\n maxX = bottom.x;\n } else if ((!origin || origin === 'right') && isOnSameLine && isRight) {\n if (symbol.leftLines.length === 0 && this.rightLines.length === 0) {\n line = drawLine(this.chart, right, symbolLeft, text);\n } else {\n yOffset = Math.max(symbol.leftLines.length, this.rightLines.length) * 10;\n line = drawLine(this.chart, right, [\n {x: right.x, y: right.y - yOffset},\n {x: right.x, y: symbolLeft.y - yOffset},\n {x: symbolLeft.x, y: symbolLeft.y - yOffset},\n {x: symbolLeft.x, y: symbolLeft.y}\n ], text);\n }\n this.rightLines.push(line);\n symbol.leftLines.push(line);\n this.rightStart = true;\n symbol.leftEnd = true;\n maxX = symbolLeft.x;\n } else if ((!origin || origin === 'left') && isOnSameLine && isLeft) {\n if (symbol.rightLines.length === 0 && this.leftLines.length === 0) {\n line = drawLine(this.chart, left, symbolRight, text);\n } else {\n yOffset = Math.max(symbol.rightLines.length, this.leftLines.length) * 10;\n line = drawLine(this.chart, right, [\n {x: right.x, y: right.y - yOffset},\n {x: right.x, y: symbolRight.y - yOffset},\n {x: symbolRight.x, y: symbolRight.y - yOffset},\n {x: symbolRight.x, y: symbolRight.y}\n ], text);\n }\n this.leftLines.push(line);\n symbol.rightLines.push(line);\n this.leftStart = true;\n symbol.rightEnd = true;\n maxX = symbolRight.x;\n } else if ((!origin || origin === 'right') && isOnSameColumn && isUpper) {\n yOffset = Math.max(symbol.topLines.length, this.rightLines.length) * 10;\n line = drawLine(this.chart, right, [\n {x: right.x + lineLength/2, y: right.y - yOffset},\n {x: right.x + lineLength/2, y: symbolTop.y - lineLength/2 - yOffset},\n {x: symbolTop.x, y: symbolTop.y - lineLength/2 - yOffset},\n {x: symbolTop.x, y: symbolTop.y}\n ], text);\n this.rightLines.push(line);\n symbol.topLines.push(line);\n this.rightStart = true;\n symbol.topEnd = true;\n maxX = right.x + lineLength/2;\n } else if ((!origin || origin === 'right') && isOnSameColumn && isUnder) {\n yOffset = Math.max(symbol.topLines.length, this.rightLines.length) * 10;\n line = drawLine(this.chart, right, [\n {x: right.x + lineLength/2, y: right.y - yOffset},\n {x: right.x + lineLength/2, y: symbolTop.y - lineLength/2 - yOffset},\n {x: symbolTop.x, y: symbolTop.y - lineLength/2 - yOffset},\n {x: symbolTop.x, y: symbolTop.y}\n ], text);\n this.rightLines.push(line);\n symbol.topLines.push(line);\n this.rightStart = true;\n symbol.topEnd = true;\n maxX = right.x + lineLength/2;\n } else if ((!origin || origin === 'bottom') && isLeft) {\n yOffset = Math.max(symbol.topLines.length, this.bottomLines.length) * 10;\n if (this.leftEnd && isUpper) {\n line = drawLine(this.chart, bottom, [\n {x: bottom.x, y: bottom.y + lineLength/2 - yOffset},\n {x: bottom.x + (bottom.x - symbolTop.x)/2, y: bottom.y + lineLength/2 - yOffset},\n {x: bottom.x + (bottom.x - symbolTop.x)/2, y: symbolTop.y - lineLength/2 - yOffset},\n {x: symbolTop.x, y: symbolTop.y - lineLength/2 - yOffset},\n {x: symbolTop.x, y: symbolTop.y}\n ], text);\n } else {\n line = drawLine(this.chart, bottom, [\n {x: bottom.x, y: symbolTop.y - lineLength/2 - yOffset},\n {x: symbolTop.x, y: symbolTop.y - lineLength/2 - yOffset},\n {x: symbolTop.x, y: symbolTop.y}\n ], text);\n }\n this.bottomLines.push(line);\n symbol.topLines.push(line);\n this.bottomStart = true;\n symbol.topEnd = true;\n maxX = bottom.x + (bottom.x - symbolTop.x)/2;\n } else if ((!origin || origin === 'bottom') && isRight && isUnder) {\n yOffset = Math.max(symbol.topLines.length, this.bottomLines.length) * 10;\n line = drawLine(this.chart, bottom, [\n {x: bottom.x, y: symbolTop.y - lineLength/2 - yOffset},\n {x: symbolTop.x, y: symbolTop.y - lineLength/2 - yOffset},\n {x: symbolTop.x, y: symbolTop.y}\n ], text);\n this.bottomLines.push(line);\n symbol.topLines.push(line);\n this.bottomStart = true;\n symbol.topEnd = true;\n maxX = bottom.x;\n if (symbolTop.x > maxX) maxX = symbolTop.x;\n } else if ((!origin || origin === 'bottom') && isRight) {\n yOffset = Math.max(symbol.topLines.length, this.bottomLines.length) * 10;\n line = drawLine(this.chart, bottom, [\n {x: bottom.x, y: bottom.y + lineLength/2 - yOffset},\n {x: bottom.x + (bottom.x - symbolTop.x)/2, y: bottom.y + lineLength/2 - yOffset},\n {x: bottom.x + (bottom.x - symbolTop.x)/2, y: symbolTop.y - lineLength/2 - yOffset},\n {x: symbolTop.x, y: symbolTop.y - lineLength/2 - yOffset},\n {x: symbolTop.x, y: symbolTop.y}\n ], text);\n this.bottomLines.push(line);\n symbol.topLines.push(line);\n this.bottomStart = true;\n symbol.topEnd = true;\n maxX = bottom.x + (bottom.x - symbolTop.x)/2;\n } else if ((origin && origin === 'right') && isLeft) {\n yOffset = Math.max(symbol.topLines.length, this.rightLines.length) * 10;\n line = drawLine(this.chart, right, [\n {x: right.x + lineLength/2, y: right.y},\n {x: right.x + lineLength/2, y: symbolTop.y - lineLength/2 - yOffset},\n {x: symbolTop.x, y: symbolTop.y - lineLength/2 - yOffset},\n {x: symbolTop.x, y: symbolTop.y}\n ], text);\n this.rightLines.push(line);\n symbol.topLines.push(line);\n this.rightStart = true;\n symbol.topEnd = true;\n maxX = right.x + lineLength/2;\n } else if ((origin && origin === 'right') && isRight) {\n yOffset = Math.max(symbol.topLines.length, this.rightLines.length) * 10;\n line = drawLine(this.chart, right, [\n {x: symbolTop.x, y: right.y - yOffset},\n {x: symbolTop.x, y: symbolTop.y - yOffset}\n ], text);\n this.rightLines.push(line);\n symbol.topLines.push(line);\n this.rightStart = true;\n symbol.topEnd = true;\n maxX = right.x + lineLength/2;\n } else if ((origin && origin === 'bottom') && isOnSameColumn && isUpper) {\n yOffset = Math.max(symbol.topLines.length, this.bottomLines.length) * 10;\n line = drawLine(this.chart, bottom, [\n {x: bottom.x, y: bottom.y + lineLength/2 - yOffset},\n {x: right.x + lineLength/2, y: bottom.y + lineLength/2 - yOffset},\n {x: right.x + lineLength/2, y: symbolTop.y - lineLength/2 - yOffset},\n {x: symbolTop.x, y: symbolTop.y - lineLength/2 - yOffset},\n {x: symbolTop.x, y: symbolTop.y}\n ], text);\n this.bottomLines.push(line);\n symbol.topLines.push(line);\n this.bottomStart = true;\n symbol.topEnd = true;\n maxX = bottom.x + lineLength/2;\n } else if ((origin === 'left') && isOnSameColumn && isUpper) {\n var diffX = left.x - lineLength/2;\n if (symbolLeft.x < left.x) {\n diffX = symbolLeft.x - lineLength/2;\n }\n yOffset = Math.max(symbol.topLines.length, this.leftLines.length) * 10;\n line = drawLine(this.chart, left, [\n {x: diffX, y: left.y - yOffset},\n {x: diffX, y: symbolTop.y - lineLength/2 - yOffset},\n {x: symbolTop.x, y: symbolTop.y - lineLength/2 - yOffset},\n {x: symbolTop.x, y: symbolTop.y}\n ], text);\n this.leftLines.push(line);\n symbol.topLines.push(line);\n this.leftStart = true;\n symbol.topEnd = true;\n maxX = left.x;\n } else if ((origin === 'left')) {\n yOffset = Math.max(symbol.topLines.length, this.leftLines.length) * 10;\n line = drawLine(this.chart, left, [\n {x: symbolTop.x + (left.x - symbolTop.x)/2, y: left.y},\n {x: symbolTop.x + (left.x - symbolTop.x)/2, y: symbolTop.y - lineLength/2 - yOffset},\n {x: symbolTop.x, y: symbolTop.y - lineLength/2 - yOffset},\n {x: symbolTop.x, y: symbolTop.y}\n ], text);\n this.leftLines.push(line);\n symbol.topLines.push(line);\n this.leftStart = true;\n symbol.topEnd = true;\n maxX = left.x;\n } else if ((origin === 'top')) {\n yOffset = Math.max(symbol.topLines.length, this.topLines.length) * 10;\n line = drawLine(this.chart, top, [\n {x: top.x, y: symbolTop.y - lineLength/2 - yOffset},\n {x: symbolTop.x, y: symbolTop.y - lineLength/2 - yOffset},\n {x: symbolTop.x, y: symbolTop.y}\n ], text);\n this.topLines.push(line);\n symbol.topLines.push(line);\n this.topStart = true;\n symbol.topEnd = true;\n maxX = top.x;\n }\n\n //update line style\n if (this.lineStyle[symbol.key] && line){\n line.attr(this.lineStyle[symbol.key]);\n }\n\n if (line) {\n for (var l = 0, llen = this.chart.lines.length; l < llen; l++) {\n var otherLine = this.chart.lines[l];\n\n var ePath = otherLine.attr('path'),\n lPath = line.attr('path');\n\n for (var iP = 0, lenP = ePath.length - 1; iP < lenP; iP++) {\n var newPath = [];\n newPath.push(['M', ePath[iP][1], ePath[iP][2]]);\n newPath.push(['L', ePath[iP + 1][1], ePath[iP + 1][2]]);\n\n var line1_from_x = newPath[0][1];\n var line1_from_y = newPath[0][2];\n var line1_to_x = newPath[1][1];\n var line1_to_y = newPath[1][2];\n\n for (var lP = 0, lenlP = lPath.length - 1; lP < lenlP; lP++) {\n var newLinePath = [];\n newLinePath.push(['M', lPath[lP][1], lPath[lP][2]]);\n newLinePath.push(['L', lPath[lP + 1][1], lPath[lP + 1][2]]);\n\n var line2_from_x = newLinePath[0][1];\n var line2_from_y = newLinePath[0][2];\n var line2_to_x = newLinePath[1][1];\n var line2_to_y = newLinePath[1][2];\n\n var res = checkLineIntersection(line1_from_x, line1_from_y, line1_to_x, line1_to_y, line2_from_x, line2_from_y, line2_to_x, line2_to_y);\n if (res.onLine1 && res.onLine2) {\n\n var newSegment;\n if (line2_from_y === line2_to_y) {\n if (line2_from_x > line2_to_x) {\n newSegment = ['L', res.x + lineWith * 2, line2_from_y];\n lPath.splice(lP + 1, 0, newSegment);\n newSegment = ['C', res.x + lineWith * 2, line2_from_y, res.x, line2_from_y - lineWith * 4, res.x - lineWith * 2, line2_from_y];\n lPath.splice(lP + 2, 0, newSegment);\n line.attr('path', lPath);\n } else {\n newSegment = ['L', res.x - lineWith * 2, line2_from_y];\n lPath.splice(lP + 1, 0, newSegment);\n newSegment = ['C', res.x - lineWith * 2, line2_from_y, res.x, line2_from_y - lineWith * 4, res.x + lineWith * 2, line2_from_y];\n lPath.splice(lP + 2, 0, newSegment);\n line.attr('path', lPath);\n }\n } else {\n if (line2_from_y > line2_to_y) {\n newSegment = ['L', line2_from_x, res.y + lineWith * 2];\n lPath.splice(lP + 1, 0, newSegment);\n newSegment = ['C', line2_from_x, res.y + lineWith * 2, line2_from_x + lineWith * 4, res.y, line2_from_x, res.y - lineWith * 2];\n lPath.splice(lP + 2, 0, newSegment);\n line.attr('path', lPath);\n } else {\n newSegment = ['L', line2_from_x, res.y - lineWith * 2];\n lPath.splice(lP + 1, 0, newSegment);\n newSegment = ['C', line2_from_x, res.y - lineWith * 2, line2_from_x + lineWith * 4, res.y, line2_from_x, res.y + lineWith * 2];\n lPath.splice(lP + 2, 0, newSegment);\n line.attr('path', lPath);\n }\n }\n\n lP += 2;\n }\n }\n }\n }\n\n this.chart.lines.push(line);\n if (this.chart.minXFromSymbols === undefined || this.chart.minXFromSymbols > left.x) {\n this.chart.minXFromSymbols = left.x;\n }\n }\n\n if (!this.chart.maxXFromLine || (this.chart.maxXFromLine && maxX > this.chart.maxXFromLine)) {\n this.chart.maxXFromLine = maxX;\n }\n};\n\nmodule.exports = Symbol;\n","var Symbol = require('./flowchart.symbol');\nvar inherits = require('./flowchart.helpers').inherits;\nvar drawAPI = require('./flowchart.functions');\nvar drawPath = drawAPI.drawPath;\n\nfunction Condition(chart, options) {\n options = options || {};\n Symbol.call(this, chart, options);\n this.yes_annotation = options.yes_annotation;\n this.no_annotation = options.no_annotation;\n this.textMargin = this.getAttr('text-margin');\n this.yes_direction = options.direction_yes;\n this.no_direction = options.direction_no;\n if (!this.no_direction && this.yes_direction === 'right') {\n this.no_direction = 'bottom';\n } else if (!this.yes_direction && this.no_direction === 'bottom') {\n this.yes_direction = 'right'\n }\n this.yes_direction = this.yes_direction || 'bottom';\n this.no_direction = this.no_direction || 'right';\n\n this.text.attr({\n x: this.textMargin * 2\n });\n\n var width = this.text.getBBox().width + 3 * this.textMargin;\n width += width/2;\n var height = this.text.getBBox().height + 2 * this.textMargin;\n height += height/2;\n height = Math.max(width * 0.5, height);\n var startX = width/4;\n var startY = height/4;\n\n this.text.attr({\n x: startX + this.textMargin/2\n });\n\n var start = {x: startX, y: startY};\n var points = [\n {x: startX - width/4, y: startY + height/4},\n {x: startX - width/4 + width/2, y: startY + height/4 + height/2},\n {x: startX - width/4 + width, y: startY + height/4},\n {x: startX - width/4 + width/2, y: startY + height/4 - height/2},\n {x: startX - width/4, y: startY + height/4}\n ];\n\n var symbol = drawPath(chart, start, points);\n\n symbol.attr({\n stroke: this.getAttr('element-color'),\n 'stroke-width': this.getAttr('line-width'),\n fill: this.getAttr('fill')\n });\n if (options.link) { symbol.attr('href', options.link); }\n if (options.target) { symbol.attr('target', options.target); }\n if (options.key) { symbol.node.id = options.key; }\n symbol.node.setAttribute('class', this.getAttr('class'));\n\n this.text.attr({\n y: symbol.getBBox().height/2\n });\n\n this.group.push(symbol);\n symbol.insertBefore(this.text);\n this.symbol = symbol\n\n this.initialize();\n}\ninherits(Condition, Symbol);\n\nCondition.prototype.render = function() {\n var self = this;\n if (this.yes_direction) {\n this[this.yes_direction + '_symbol'] = this.yes_symbol;\n }\n\n if (this.no_direction) {\n this[this.no_direction + '_symbol'] = this.no_symbol;\n }\n\n var lineLength = this.getAttr('line-length');\n\n if (this.bottom_symbol) {\n var bottomPoint = this.getBottom();\n\n if (!this.bottom_symbol.isPositioned) {\n this.bottom_symbol.shiftY(this.getY() + this.height + lineLength);\n this.bottom_symbol.setX(bottomPoint.x - this.bottom_symbol.width/2);\n this.bottom_symbol.isPositioned = true;\n\n this.bottom_symbol.render();\n }\n }\n\n if (this.right_symbol) {\n var rightPoint = this.getRight();\n\n if (!this.right_symbol.isPositioned) {\n\n this.right_symbol.setY(rightPoint.y - this.right_symbol.height/2);\n this.right_symbol.shiftX(this.group.getBBox().x + this.width + lineLength);\n\n (function shift() {\n var hasSymbolUnder = false;\n var symb;\n for (var i = 0, len = self.chart.symbols.length; i < len; i++) {\n symb = self.chart.symbols[i];\n\n if (!self.params['align-next'] || self.params['align-next'] !== 'no') { \n var diff = Math.abs(symb.getCenter().x - self.right_symbol.getCenter().x);\n if (symb.getCenter().y > self.right_symbol.getCenter().y && diff <= self.right_symbol.width/2) {\n hasSymbolUnder = true;\n break;\n }\n }\n }\n\n if (hasSymbolUnder) {\n if (self.right_symbol.symbolType === 'end') return;\n self.right_symbol.setX(symb.getX() + symb.width + lineLength);\n shift();\n }\n })();\n\n this.right_symbol.isPositioned = true;\n\n this.right_symbol.render();\n }\n }\n \n if (this.left_symbol) {\n var leftPoint = this.getLeft();\n \n if (!this.left_symbol.isPositioned) {\n this.left_symbol.setY(leftPoint.y - this.left_symbol.height / 2);\n this.left_symbol.shiftX(-(this.group.getBBox().x + this.width + lineLength));\n\n (function shift() {\n var hasSymbolUnder = false;\n var symb;\n for (var i = 0, len = self.chart.symbols.length; i < len; i++) {\n symb = self.chart.symbols[i];\n \n if (!self.params['align-next'] || self.params['align-next'] !== 'no') {\n var diff = Math.abs(symb.getCenter().x - self.left_symbol.getCenter().x);\n if (symb.getCenter().y > self.left_symbol.getCenter().y && diff <= self.left_symbol.width / 2) {\n hasSymbolUnder = true;\n break;\n }\n }\n }\n \n if (hasSymbolUnder) {\n if (self.left_symbol.symbolType === 'end') return;\n self.left_symbol.setX(symb.getX() + symb.width + lineLength);\n shift();\n }\n })();\n \n this.left_symbol.isPositioned = true;\n \n this.left_symbol.render();\n }\n }\n};\n\nCondition.prototype.renderLines = function() {\n if (this.yes_symbol) {\n this.drawLineTo(this.yes_symbol, this.yes_annotation ? this.yes_annotation : this.getAttr('yes-text'), this.yes_direction);\n }\n\n if (this.no_symbol) {\n this.drawLineTo(this.no_symbol, this.no_annotation ? this.no_annotation : this.getAttr('no-text'), this.no_direction);\n }\n};\n\nmodule.exports = Condition;\n","var Symbol = require('./flowchart.symbol');\nvar inherits = require('./flowchart.helpers').inherits;\n\nfunction Parallel(chart, options) {\n var symbol = chart.paper.rect(0, 0, 0, 0);\n options = options || {};\n Symbol.call(this, chart, options, symbol);\n this.path1_annotation = options.path1_annotation || '';\n this.path2_annotation = options.path2_annotation || '';\n this.path3_annotation = options.path3_annotation || '';\n this.textMargin = this.getAttr('text-margin');\n this.path1_direction = 'bottom';\n this.path2_direction = 'right';\n this.path3_direction = 'top';\n this.params = options.params;\n if (options.direction_next === 'path1' && !options[options.direction_next] && options.next) {\n options[options.direction_next] = options.next;\n }\n if (options.direction_next === 'path2' && !options[options.direction_next] && options.next) {\n options[options.direction_next] = options.next;\n }\n if (options.direction_next === 'path3' && !options[options.direction_next] && options.next) {\n options[options.direction_next] = options.next;\n }\n\n if (options.path1 && options.direction_path1 && options.path2 && !options.direction_path2 && options.path3 && !options.direction_path3) {\n if (options.direction_path1 === 'right') {\n this.path2_direction = 'bottom';\n this.path1_direction = 'right';\n this.path3_direction = 'top';\n } else if (options.direction_path1 === 'top') {\n this.path2_direction = 'right';\n this.path1_direction = 'top';\n this.path3_direction = 'bottom';\n } else if (options.direction_path1 === 'left') {\n this.path2_direction = 'right';\n this.path1_direction = 'left';\n this.path3_direction = 'bottom';\n } else {\n this.path2_direction = 'right';\n this.path1_direction = 'bottom';\n this.path3_direction = 'top';\n }\n } else if (options.path1 && !options.direction_path1 && options.path2 && options.direction_path2 && options.path3 && !options.direction_path3) {\n if (options.direction_path2 === 'right') {\n this.path1_direction = 'bottom';\n this.path2_direction = 'right';\n this.path3_direction = 'top';\n } else if (options.direction_path2 === 'left') {\n this.path1_direction = 'bottom';\n this.path2_direction = 'left';\n this.path3_direction = 'right';\n } else {\n this.path1_direction = 'right';\n this.path2_direction = 'bottom';\n this.path3_direction = 'top';\n }\n } else if (options.path1 && !options.direction_path1 && options.path2 && !options.direction_path2 && options.path3 && options.direction_path3) {\n if (options.direction_path2 === 'right') {\n this.path1_direction = 'bottom';\n this.path2_direction = 'top';\n this.path3_direction = 'right';\n } else if (options.direction_path2 === 'left') {\n this.path1_direction = 'bottom';\n this.path2_direction = 'right';\n this.path3_direction = 'left';\n } else {\n this.path1_direction = 'right';\n this.path2_direction = 'bottom';\n this.path3_direction = 'top';\n }\n } else {\n this.path1_direction = options.direction_path1;\n this.path2_direction = options.direction_path2;\n this.path3_direction = options.direction_path3;\n }\n\n this.path1_direction = this.path1_direction || 'bottom';\n this.path2_direction = this.path2_direction || 'right';\n this.path3_direction = this.path3_direction || 'top';\n\n this.initialize();\n}\ninherits(Parallel, Symbol);\n\nParallel.prototype.render = function() {\n if (this.path1_direction) {\n this[this.path1_direction + '_symbol'] = this.path1_symbol;\n }\n\n if (this.path2_direction) {\n this[this.path2_direction + '_symbol'] = this.path2_symbol;\n }\n\n if (this.path3_direction) {\n this[this.path3_direction + '_symbol'] = this.path3_symbol;\n }\n\n var lineLength = this.getAttr('line-length');\n\n if (this.bottom_symbol) {\n var bottomPoint = this.getBottom();\n\n if (!this.bottom_symbol.isPositioned) {\n this.bottom_symbol.shiftY(this.getY() + this.height + lineLength);\n this.bottom_symbol.setX(bottomPoint.x - this.bottom_symbol.width / 2);\n this.bottom_symbol.isPositioned = true;\n\n this.bottom_symbol.render();\n }\n }\n\n if (this.top_symbol) {\n var topPoint = this.getTop();\n\n if (!this.top_symbol.isPositioned) {\n this.top_symbol.shiftY(this.getY() - this.top_symbol.height - lineLength);\n this.top_symbol.setX(topPoint.x + this.top_symbol.width);\n this.top_symbol.isPositioned = true;\n\n this.top_symbol.render();\n }\n }\n\n var self = this;\n\n if (this.left_symbol) {\n var leftPoint = this.getLeft();\n\n if (!this.left_symbol.isPositioned) {\n this.left_symbol.setY(leftPoint.y - this.left_symbol.height / 2);\n this.left_symbol.shiftX(-(this.group.getBBox().x + this.width + lineLength));\n (function shift() {\n var hasSymbolUnder = false;\n var symb;\n for (var i = 0, len = self.chart.symbols.length; i < len; i++) {\n symb = self.chart.symbols[i];\n\n if (!self.params['align-next'] || self.params['align-next'] !== 'no') {\n var diff = Math.abs(symb.getCenter().x - self.left_symbol.getCenter().x);\n if (symb.getCenter().y > self.left_symbol.getCenter().y && diff <= self.left_symbol.width / 2) {\n hasSymbolUnder = true;\n break;\n }\n }\n }\n\n if (hasSymbolUnder) {\n if (self.left_symbol.symbolType === 'end') return;\n self.left_symbol.setX(symb.getX() + symb.width + lineLength);\n shift();\n }\n })();\n\n this.left_symbol.isPositioned = true;\n\n this.left_symbol.render();\n }\n }\n\n if (this.right_symbol) {\n var rightPoint = this.getRight();\n\n if (!this.right_symbol.isPositioned) {\n this.right_symbol.setY(rightPoint.y - this.right_symbol.height / 2);\n this.right_symbol.shiftX(this.group.getBBox().x + this.width + lineLength);\n (function shift() {\n var hasSymbolUnder = false;\n var symb;\n for (var i = 0, len = self.chart.symbols.length; i < len; i++) {\n symb = self.chart.symbols[i];\n\n if (!self.params['align-next'] || self.params['align-next'] !== 'no') {\n var diff = Math.abs(symb.getCenter().x - self.right_symbol.getCenter().x);\n if (symb.getCenter().y > self.right_symbol.getCenter().y && diff <= self.right_symbol.width / 2) {\n hasSymbolUnder = true;\n break;\n }\n }\n }\n\n if (hasSymbolUnder) {\n if (self.right_symbol.symbolType === 'end') return;\n self.right_symbol.setX(symb.getX() + symb.width + lineLength);\n shift();\n }\n })();\n\n this.right_symbol.isPositioned = true;\n\n this.right_symbol.render();\n }\n }\n};\n\nParallel.prototype.renderLines = function() {\n if (this.path1_symbol) {\n this.drawLineTo(this.path1_symbol, this.path1_annotation, this.path1_direction);\n }\n\n if (this.path2_symbol) {\n this.drawLineTo(this.path2_symbol, this.path2_annotation, this.path2_direction);\n }\n\n if (this.path3_symbol) {\n this.drawLineTo(this.path3_symbol, this.path3_annotation, this.path3_direction);\n }\n};\n\nmodule.exports = Parallel;","var Raphael = require('raphael');\nvar defaults = require('./flowchart.helpers').defaults;\nvar defaultOptions = require('./flowchart.defaults');\nvar Condition = require('./flowchart.symbol.condition');\nvar Parallel = require('./flowchart.symbol.parallel');\n\nfunction FlowChart(container, options) {\n options = options || {};\n\n this.paper = new Raphael(container);\n\n this.options = defaults(options, defaultOptions);\n\n this.symbols = [];\n this.lines = [];\n this.start = null;\n}\n\nFlowChart.prototype.handle = function(symbol) {\n if (this.symbols.indexOf(symbol) <= -1) {\n this.symbols.push(symbol);\n }\n\n var flowChart = this;\n\n if (symbol instanceof(Condition)) {\n symbol.yes = function(nextSymbol) {\n symbol.yes_symbol = nextSymbol;\n if(symbol.no_symbol) {\n symbol.pathOk = true;\n }\n return flowChart.handle(nextSymbol);\n };\n symbol.no = function(nextSymbol) {\n symbol.no_symbol = nextSymbol;\n if (symbol.yes_symbol) {\n symbol.pathOk = true;\n }\n return flowChart.handle(nextSymbol);\n };\n } else if (symbol instanceof(Parallel)) {\n symbol.path1 = function(nextSymbol) {\n symbol.path1_symbol = nextSymbol;\n if (symbol.path2_symbol) {\n symbol.pathOk = true;\n }\n return flowChart.handle(nextSymbol);\n };\n symbol.path2 = function(nextSymbol) {\n symbol.path2_symbol = nextSymbol;\n if (symbol.path3_symbol) {\n symbol.pathOk = true;\n }\n return flowChart.handle(nextSymbol);\n };\n symbol.path3 = function(nextSymbol) {\n symbol.path3_symbol = nextSymbol;\n if (symbol.path1_symbol) {\n symbol.pathOk = true;\n }\n return flowChart.handle(nextSymbol);\n };\n } else {\n symbol.then = function(nextSymbol) {\n symbol.next = nextSymbol;\n symbol.pathOk = true;\n return flowChart.handle(nextSymbol);\n };\n }\n\n return symbol;\n};\n\nFlowChart.prototype.startWith = function(symbol) {\n this.start = symbol;\n return this.handle(symbol);\n};\n\nFlowChart.prototype.render = function() {\n var maxWidth = 0,\n maxHeight = 0,\n i = 0,\n len = 0,\n maxX = 0,\n maxY = 0,\n minX = 0,\n minY = 0,\n symbol,\n line;\n\n for (i = 0, len = this.symbols.length; i < len; i++) {\n symbol = this.symbols[i];\n if (symbol.width > maxWidth) {\n maxWidth = symbol.width;\n }\n if (symbol.height > maxHeight) {\n maxHeight = symbol.height;\n }\n }\n\n for (i = 0, len = this.symbols.length; i < len; i++) {\n symbol = this.symbols[i];\n symbol.shiftX(this.options.x + (maxWidth - symbol.width)/2 + this.options['line-width']);\n symbol.shiftY(this.options.y + (maxHeight - symbol.height)/2 + this.options['line-width']);\n }\n\n this.start.render();\n // for (i = 0, len = this.symbols.length; i < len; i++) {\n // symbol = this.symbols[i];\n // symbol.render();\n // }\n\n for (i = 0, len = this.symbols.length; i < len; i++) {\n symbol = this.symbols[i];\n symbol.renderLines();\n }\n\n maxX = this.maxXFromLine;\n\n var x;\n var y;\n\n for (i = 0, len = this.symbols.length; i < len; i++) {\n symbol = this.symbols[i];\n var leftX = symbol.getX()\n x = leftX + symbol.width;\n y = symbol.getY() + symbol.height;\n if (leftX < minX) {\n minX = leftX;\n }\n if (x > maxX) {\n maxX = x;\n }\n if (y > maxY) {\n maxY = y;\n }\n }\n\n for (i = 0, len = this.lines.length; i < len; i++) {\n line = this.lines[i].getBBox();\n x = line.x;\n y = line.y;\n var x2 = line.x2;\n var y2 = line.y2;\n if (x < minX) {\n minX = x;\n }\n if (y < minY) {\n minY = y;\n }\n if (x2 > maxX) {\n maxX = x2;\n }\n if (y2 > maxY) {\n maxY = y2;\n }\n }\n\n var scale = this.options['scale'];\n var lineWidth = this.options['line-width'];\n\n if (this.minXFromSymbols < minX) minX = this.minXFromSymbols;\n\n if (minX < 0) minX -= lineWidth;\n if (minY < 0) minY -= lineWidth;\n\n var width = maxX + lineWidth - minX;\n var height = maxY + lineWidth - minY;\n\n this.paper.setSize(width * scale, height * scale);\n this.paper.setViewBox(minX, minY, width, height, true);\n};\n\nFlowChart.prototype.clean = function() {\n if (this.paper) {\n var paperDom = this.paper.canvas;\n paperDom.parentNode && paperDom.parentNode.removeChild(paperDom);\n }\n};\n\nmodule.exports = FlowChart;","// defaults\nmodule.exports = {\n 'x': 0,\n 'y': 0,\n // 'roundness': 0,\n 'line-width': 3,\n 'line-length': 50,\n 'text-margin': 10,\n 'font-size': 14,\n 'font-color': 'black',\n // 'font': 'normal',\n // 'font-family': 'calibri',\n // 'font-weight': 'normal',\n 'line-color': 'black',\n 'element-color': 'black',\n 'fill': 'white',\n 'yes-text': 'yes',\n 'no-text': 'no',\n 'arrow-end': 'block',\n 'class': 'flowchart',\n 'scale': 1,\n 'symbols': {\n 'start': {},\n 'end': {},\n 'condition': {},\n 'inputoutput': {},\n 'input': {}, //tds\n 'output': {}, //tds \n 'operation': {},\n 'subroutine': {},\n 'parallel': {}\n } //,\n // 'flowstate' : {\n // 'past' : { 'fill': '#CCCCCC', 'font-size': 12},\n // 'current' : {'fill': 'yellow', 'font-color': 'red', 'font-weight': 'bold'},\n // 'future' : { 'fill': '#FFFF99'},\n // 'invalid': {'fill': '#444444'}\n // }\n};","var FlowChart = require('./flowchart.chart');\nvar Start = require('./flowchart.symbol.start');\nvar End = require('./flowchart.symbol.end');\nvar Operation = require('./flowchart.symbol.operation');\nvar InputOutput = require('./flowchart.symbol.inputoutput');\nvar Input = require('./flowchart.symbol.input'); //tds\nvar Output = require('./flowchart.symbol.output'); //tds\nvar Subroutine = require('./flowchart.symbol.subroutine');\nvar Condition = require('./flowchart.symbol.condition');\nvar Parallel = require('./flowchart.symbol.parallel');\n\n\nfunction parse(input) {\n input = input || '';\n input = input.trim();\n\n var chart = {\n symbols: {},\n start: null,\n drawSVG: function(container, options) {\n var self = this;\n\n if (this.diagram) {\n this.diagram.clean();\n }\n\n var diagram = new FlowChart(container, options);\n this.diagram = diagram;\n var dispSymbols = {};\n\n function getDisplaySymbol(s) {\n if (dispSymbols[s.key]) {\n return dispSymbols[s.key];\n }\n\n switch (s.symbolType) {\n case 'start':\n dispSymbols[s.key] = new Start(diagram, s);\n break;\n case 'end':\n dispSymbols[s.key] = new End(diagram, s);\n break;\n case 'operation':\n dispSymbols[s.key] = new Operation(diagram, s);\n break;\n case 'inputoutput':\n dispSymbols[s.key] = new InputOutput(diagram, s);\n break;\n case 'input':\n dispSymbols[s.key] = new Input(diagram, s); //tds\n break; \n case 'output':\n dispSymbols[s.key] = new Output(diagram, s); //tds\n break; \n case 'subroutine':\n dispSymbols[s.key] = new Subroutine(diagram, s);\n break;\n case 'condition':\n dispSymbols[s.key] = new Condition(diagram, s);\n break;\n case 'parallel':\n dispSymbols[s.key] = new Parallel(diagram, s);\n break;\n default:\n return new Error('Wrong symbol type!');\n }\n\n return dispSymbols[s.key];\n }\n\n (function constructChart(s, prevDisp, prev) {\n var dispSymb = getDisplaySymbol(s);\n\n if (self.start === s) {\n diagram.startWith(dispSymb);\n } else if (prevDisp && prev && !prevDisp.pathOk) {\n if (prevDisp instanceof(Condition)) {\n if (prev.yes === s) {\n prevDisp.yes(dispSymb);\n }\n if (prev.no === s) {\n prevDisp.no(dispSymb);\n }\n } else if (prevDisp instanceof(Parallel)) {\n if (prev.path1 === s) {\n prevDisp.path1(dispSymb);\n }\n if (prev.path2 === s) {\n prevDisp.path2(dispSymb);\n }\n if (prev.path3 === s) {\n prevDisp.path3(dispSymb);\n }\n } else {\n prevDisp.then(dispSymb);\n }\n }\n\n if (dispSymb.pathOk) {\n return dispSymb;\n }\n\n if (dispSymb instanceof(Condition)) {\n if (s.yes) {\n constructChart(s.yes, dispSymb, s);\n }\n if (s.no) {\n constructChart(s.no, dispSymb, s);\n }\n } else if (dispSymb instanceof(Parallel)) {\n if (s.path1) {\n constructChart(s.path1, dispSymb, s);\n }\n if (s.path2) {\n constructChart(s.path2, dispSymb, s);\n }\n if (s.path3) {\n constructChart(s.path3, dispSymb, s);\n }\n } else if (s.next) {\n constructChart(s.next, dispSymb, s);\n }\n\n return dispSymb;\n })(this.start);\n\n diagram.render();\n },\n clean: function() {\n this.diagram.clean();\n },\n options: function() {\n return this.diagram.options;\n }\n };\n\n var lines = [];\n var prevBreak = 0;\n for (var i0 = 1, i0len = input.length; i0 < i0len; i0++) {\n if(input[i0] === '\\n' && input[i0 - 1] !== '\\\\') {\n var line0 = input.substring(prevBreak, i0);\n prevBreak = i0 + 1;\n lines.push(line0.replace(/\\\\\\n/g, '\\n'));\n }\n }\n\n if (prevBreak < input.length) {\n lines.push(input.substr(prevBreak));\n }\n\n for (var l = 1, len = lines.length; l < len;) {\n var currentLine = lines[l];\n\n if (currentLine.indexOf('->') < 0 && currentLine.indexOf('=>') < 0 && currentLine.indexOf('@>') < 0) {\n lines[l - 1] += '\\n' + currentLine;\n lines.splice(l, 1);\n len--;\n } else {\n l++;\n }\n }\n\n function getStyle(s){\n var startIndex = s.indexOf('(') + 1;\n var endIndex = s.indexOf(')');\n if (startIndex >= 0 && endIndex >= 0) {\n return s.substring(startIndex,endIndex);\n }\n return '{}';\n }\n\n function getSymbValue(s){\n var startIndex = s.indexOf('(') + 1;\n var endIndex = s.indexOf(')');\n if (startIndex >= 0 && endIndex >= 0) {\n return s.substring(startIndex,endIndex);\n }\n return '';\n }\n\n function getSymbol(s) {\n var startIndex = s.indexOf('(') + 1;\n var endIndex = s.indexOf(')');\n if (startIndex >= 0 && endIndex >= 0) {\n return chart.symbols[s.substring(0, startIndex - 1)];\n }\n return chart.symbols[s];\n }\n\n function getNextPath(s) {\n var next = 'next';\n var startIndex = s.indexOf('(') + 1;\n var endIndex = s.indexOf(')');\n if (startIndex >= 0 && endIndex >= 0) {\n next = flowSymb.substring(startIndex, endIndex);\n if (next.indexOf(',') < 0) {\n if (next !== 'yes' && next !== 'no') {\n next = 'next, ' + next;\n }\n }\n }\n return next;\n }\n \n function getAnnotation(s) {\n\tvar startIndex = s.indexOf(\"(\") + 1, endIndex = s.indexOf(\")\");\n\tvar tmp = s.substring(startIndex, endIndex);\n\tif(tmp.indexOf(\",\") > 0) { tmp = tmp.substring(0, tmp.indexOf(\",\")); }\n\tvar tmp_split = tmp.split(\"@\");\n\tif(tmp_split.length > 1)\n\t\treturn startIndex >= 0 && endIndex >= 0 ? tmp_split[1] : \"\";\n }\n\n while (lines.length > 0) {\n var line = lines.splice(0, 1)[0].trim();\n\n if (line.indexOf('=>') >= 0) {\n // definition\n var parts = line.split('=>');\n var symbol = {\n key: parts[0].replace(/\\(.*\\)/, ''),\n symbolType: parts[1],\n text: null,\n link: null,\n target: null,\n flowstate: null,\n function: null,\n lineStyle: {},\n params: {}\n };\n\n //parse parameters\n var params = parts[0].match(/\\((.*)\\)/);\n if (params && params.length > 1){\n var entries = params[1].split(',');\n for(var i = 0; i < entries.length; i++) {\n var entry = entries[i].split('=');\n if (entry.length == 2) {\n symbol.params[entry[0]] = entry[1];\n }\n }\n }\n\n var sub;\n\n if (symbol.symbolType.indexOf(': ') >= 0) {\n sub = symbol.symbolType.split(': ');\n symbol.symbolType = sub.shift();\n symbol.text = sub.join(': ');\n }\n\n if (symbol.text && symbol.text.indexOf(':$') >= 0) {\n sub = symbol.text.split(':$');\n symbol.text = sub.shift();\n symbol.function = sub.join(':$');\n } else if (symbol.symbolType.indexOf(':$') >= 0) {\n sub = symbol.symbolType.split(':$');\n symbol.symbolType = sub.shift();\n symbol.function = sub.join(':$');\n } else if (symbol.text && symbol.text.indexOf(':>') >= 0) {\n sub = symbol.text.split(':>');\n symbol.text = sub.shift();\n symbol.link = sub.join(':>');\n } else if (symbol.symbolType.indexOf(':>') >= 0) {\n sub = symbol.symbolType.split(':>');\n symbol.symbolType = sub.shift();\n symbol.link = sub.join(':>');\n }\n\n if (symbol.symbolType.indexOf('\\n') >= 0) {\n symbol.symbolType = symbol.symbolType.split('\\n')[0];\n }\n\n /* adding support for links */\n if (symbol.link) {\n var startIndex = symbol.link.indexOf('[') + 1;\n var endIndex = symbol.link.indexOf(']');\n if (startIndex >= 0 && endIndex >= 0) {\n symbol.target = symbol.link.substring(startIndex, endIndex);\n symbol.link = symbol.link.substring(0, startIndex - 1);\n }\n }\n /* end of link support */\n\n /* adding support for flowstates */\n if (symbol.text) {\n if (symbol.text.indexOf('|') >= 0) {\n var txtAndState = symbol.text.split('|');\n symbol.flowstate = txtAndState.pop().trim();\n symbol.text = txtAndState.join('|');\n }\n }\n /* end of flowstate support */\n\n chart.symbols[symbol.key] = symbol;\n\n } else if (line.indexOf('->') >= 0) {\n var ann = getAnnotation(line);\n if (ann) {\n line = line.replace('@' + ann, ''); \n }\n // flow\n var flowSymbols = line.split('->');\n for (var iS = 0, lenS = flowSymbols.length; iS < lenS; iS++) {\n var flowSymb = flowSymbols[iS];\n var symbVal = getSymbValue(flowSymb);\n\n if (symbVal === 'true' || symbVal === 'false') {\n // map true or false to yes or no respectively\n flowSymb = flowSymb.replace('true', 'yes');\n flowSymb = flowSymb.replace('false', 'no');\n }\n \n var next = getNextPath(flowSymb);\n var realSymb = getSymbol(flowSymb);\n\n var direction = null;\n if (next.indexOf(',') >= 0) {\n var condOpt = next.split(',');\n next = condOpt[0];\n direction = condOpt[1].trim();\n }\n\n if (ann) {\n if (realSymb.symbolType === 'condition') {\n if (next === \"yes\" || next === \"true\") {\n realSymb.yes_annotation = ann;\n } else {\n realSymb.no_annotation = ann;\n }\n } else if (realSymb.symbolType === 'parallel') {\n if (next === 'path1') {\n realSymb.path1_annotation = ann;\n } else if (next === 'path2') {\n realSymb.path2_annotation = ann;\n } else if (next === 'path3') {\n realSymb.path3_annotation = ann;\n }\n }\n ann = null;\n }\n\n if (!chart.start) {\n chart.start = realSymb;\n }\n\n if (iS + 1 < lenS) {\n var nextSymb = flowSymbols[iS + 1];\n realSymb[next] = getSymbol(nextSymb);\n realSymb['direction_' + next] = direction;\n direction = null;\n }\n }\n } else if (line.indexOf('@>') >= 0) {\n\n // line style\n var lineStyleSymbols = line.split('@>');\n for (var iSS = 0, lenSS = lineStyleSymbols.length; iSS < lenSS; iSS++) {\n if ((iSS + 1) !== lenSS) {\n var curSymb = getSymbol(lineStyleSymbols[iSS]);\n var nextSymbol = getSymbol(lineStyleSymbols[iSS+1]);\n\n curSymb['lineStyle'][nextSymbol.key] = JSON.parse(getStyle(lineStyleSymbols[iSS + 1]));\n }\n }\n }\n\n }\n return chart;\n}\n\nmodule.exports = parse;\n","var Symbol = require('./flowchart.symbol');\nvar inherits = require('./flowchart.helpers').inherits;\n\nfunction Start(chart, options) {\n var symbol = chart.paper.rect(0, 0, 0, 0, 20);\n options = options || {};\n options.text = options.text || 'Start';\n Symbol.call(this, chart, options, symbol);\n}\ninherits(Start, Symbol);\n\nmodule.exports = Start;\n\n// Start.prototype.render = function() {\n// if (this.next) {\n// var lineLength = this.chart.options.symbols[this.symbolType]['line-length'] || this.chart.options['line-length'];\n\n// var bottomPoint = this.getBottom();\n// var topPoint = this.next.getTop();\n\n// if (!this.next.isPositioned) {\n// this.next.shiftY(this.getY() + this.height + lineLength);\n// this.next.setX(bottomPoint.x - this.next.width/2);\n// this.next.isPositioned = true;\n\n// this.next.render();\n// }\n// }\n// };\n\n// Start.prototype.renderLines = function() {\n// if (this.next) {\n// this.drawLineTo(this.next);\n// }\n// };\n","var Symbol = require('./flowchart.symbol');\nvar inherits = require('./flowchart.helpers').inherits;\n\nfunction End(chart, options) {\n var symbol = chart.paper.rect(0, 0, 0, 0, 20);\n options = options || {};\n options.text = options.text || 'End';\n Symbol.call(this, chart, options, symbol);\n}\ninherits(End, Symbol);\n\nmodule.exports = End;\n","var Symbol = require('./flowchart.symbol');\nvar inherits = require('./flowchart.helpers').inherits;\n\nfunction Operation(chart, options) {\n var symbol = chart.paper.rect(0, 0, 0, 0);\n options = options || {};\n Symbol.call(this, chart, options, symbol);\n}\ninherits(Operation, Symbol);\n\nmodule.exports = Operation;\n","var Symbol = require('./flowchart.symbol');\nvar inherits = require('./flowchart.helpers').inherits;\nvar drawAPI = require('./flowchart.functions');\nvar drawPath = drawAPI.drawPath;\n\nfunction InputOutput(chart, options) {\n options = options || {};\n Symbol.call(this, chart, options);\n this.textMargin = this.getAttr('text-margin');\n\n this.text.attr({\n x: this.textMargin * 3\n });\n\n var width = this.text.getBBox().width + 4 * this.textMargin;\n var height = this.text.getBBox().height + 2 * this.textMargin;\n var startX = this.textMargin;\n var startY = height/2;\n\n var start = {x: startX, y: startY};\n var points = [\n {x: startX - this.textMargin, y: height},\n {x: startX - this.textMargin + width, y: height},\n {x: startX - this.textMargin + width + 2 * this.textMargin, y: 0},\n {x: startX - this.textMargin + 2 * this.textMargin, y: 0},\n {x: startX, y: startY}\n ];\n\n var symbol = drawPath(chart, start, points);\n\n symbol.attr({\n stroke: this.getAttr('element-color'),\n 'stroke-width': this.getAttr('line-width'),\n fill: this.getAttr('fill')\n });\n if (options.link) { symbol.attr('href', options.link); }\n if (options.target) { symbol.attr('target', options.target); }\n if (options.key) { symbol.node.id = options.key; }\n symbol.node.setAttribute('class', this.getAttr('class'));\n\n this.text.attr({\n y: symbol.getBBox().height/2\n });\n\n this.group.push(symbol);\n symbol.insertBefore(this.text);\n this.symbol = symbol\n\n this.initialize();\n}\ninherits(InputOutput, Symbol);\n\nInputOutput.prototype.getLeft = function() {\n var y = this.getY() + this.group.getBBox().height/2;\n var x = this.getX() + this.textMargin;\n return {x: x, y: y};\n};\n\nInputOutput.prototype.getRight = function() {\n var y = this.getY() + this.group.getBBox().height/2;\n var x = this.getX() + this.group.getBBox().width - this.textMargin;\n return {x: x, y: y};\n};\n\nmodule.exports = InputOutput;\n","var Symbol = require('./flowchart.symbol');\nvar inherits = require('./flowchart.helpers').inherits;\nvar drawAPI = require('./flowchart.functions');\nvar drawPath = drawAPI.drawPath;\n\nfunction Input(chart, options) {\n options = options || {};\n Symbol.call(this, chart, options);\n this.textMargin = this.getAttr('text-margin');\n\n this.text.attr({\n x: this.textMargin * 3\n });\n\n var width = this.text.getBBox().width + 4 * this.textMargin;\n var height = this.text.getBBox().height + 2 * this.textMargin;\n var startX = this.textMargin;\n var startY = height/2;\n\n var start = {x: startX, y: startY};\n var points = [\n {x: startX - this.textMargin + 2 * this.textMargin, y: height},\n {x: startX - this.textMargin + width, y: height},\n {x: startX - this.textMargin + width + 2 * this.textMargin, y: 0},\n {x: startX - this.textMargin, y: 0},\n {x: startX, y: startY}\n ];\n\n var symbol = drawPath(chart, start, points);\n\n symbol.attr({\n stroke: this.getAttr('element-color'),\n 'stroke-width': this.getAttr('line-width'),\n fill: this.getAttr('fill')\n });\n if (options.link) { symbol.attr('href', options.link); }\n if (options.target) { symbol.attr('target', options.target); }\n if (options.key) { symbol.node.id = options.key; }\n symbol.node.setAttribute('class', this.getAttr('class'));\n\n this.text.attr({\n y: symbol.getBBox().height/2\n });\n\n this.group.push(symbol);\n symbol.insertBefore(this.text);\n this.symbol = symbol\n\n this.initialize();\n}\ninherits(Input, Symbol);\n\nInput.prototype.getLeft = function() {\n var y = this.getY() + this.group.getBBox().height/2;\n var x = this.getX() + this.textMargin;\n return {x: x, y: y};\n};\n\nInput.prototype.getRight = function() {\n var y = this.getY() + this.group.getBBox().height/2;\n var x = this.getX() + this.group.getBBox().width - this.textMargin;\n return {x: x, y: y};\n};\n\nmodule.exports = Input;\n\n\n","var Symbol = require('./flowchart.symbol');\nvar inherits = require('./flowchart.helpers').inherits;\nvar drawAPI = require('./flowchart.functions');\nvar drawPath = drawAPI.drawPath;\n\nfunction Output(chart, options) {\n options = options || {};\n Symbol.call(this, chart, options);\n this.textMargin = this.getAttr('text-margin');\n\n this.text.attr({\n x: this.textMargin * 3\n });\n\n var width = this.text.getBBox().width + 4 * this.textMargin;\n var height = this.text.getBBox().height + 2 * this.textMargin;\n var startX = this.textMargin;\n var startY = height/2;\n\n var start = {x: startX, y: startY};\n var points = [\n {x: startX - this.textMargin, y: height},\n {x: startX - this.textMargin + width + 2 * this.textMargin, y: height},\n {x: startX - this.textMargin + width, y: 0},\n {x: startX - this.textMargin + 2 * this.textMargin, y: 0},\n {x: startX, y: startY}\n ];\n\n var symbol = drawPath(chart, start, points);\n\n symbol.attr({\n stroke: this.getAttr('element-color'),\n 'stroke-width': this.getAttr('line-width'),\n fill: this.getAttr('fill')\n });\n if (options.link) { symbol.attr('href', options.link); }\n if (options.target) { symbol.attr('target', options.target); }\n if (options.key) { symbol.node.id = options.key; }\n symbol.node.setAttribute('class', this.getAttr('class'));\n\n this.text.attr({\n y: symbol.getBBox().height/2\n });\n\n this.group.push(symbol);\n symbol.insertBefore(this.text);\n this.symbol = symbol\n\n this.initialize();\n}\ninherits(Output, Symbol);\n\nOutput.prototype.getLeft = function() {\n var y = this.getY() + this.group.getBBox().height/2;\n var x = this.getX() + this.textMargin;\n return {x: x, y: y};\n};\n\nOutput.prototype.getRight = function() {\n var y = this.getY() + this.group.getBBox().height/2;\n var x = this.getX() + this.group.getBBox().width - this.textMargin;\n return {x: x, y: y};\n};\n\nmodule.exports = Output;\n\n\n\n/*\n//var Symbol = require('./flowchart.symbol');\nvar inherits = require('./flowchart.helpers').inherits;\nvar drawAPI = require('./flowchart.functions');\nvar InputOutput = require('./flowchart.symbol.inputoutput');\nvar drawPath = drawAPI.drawPath;\n\nfunction Output(chart, options) {\n options = options || {};\n InputOutput.call(this, chart, options);\n\n var width = this.text.getBBox().width + 4 * this.textMargin;\n var height = this.text.getBBox().height + 2 * this.textMargin;\n var startX = this.textMargin;\n var startY = height/2;\n\n var start = {x: startX, y: startY};\n var points = [\n {x: startX - this.textMargin + 2 * this.textMargin, y: height},\n {x: startX - this.textMargin + width, y: height},\n {x: startX - this.textMargin + width + 2 * this.textMargin, y: 0},\n {x: startX - this.textMargin, y: 0},\n {x: startX, y: startY}\n ];\n\n var symbol = drawPath(chart, start, points);\n\n symbol.attr({\n stroke: this.getAttr('element-color'),\n 'stroke-width': this.getAttr('line-width'),\n fill: this.getAttr('fill')\n });\n if (options.link) { symbol.attr('href', options.link); }\n if (options.target) { symbol.attr('target', options.target); }\n if (options.key) { symbol.node.id = options.key; }\n symbol.node.setAttribute('class', this.getAttr('class'));\n\n this.text.attr({\n y: symbol.getBBox().height/2\n });\n\n this.group.push(symbol);\n symbol.insertBefore(this.text);\n \n if (this.symbol){\n this.group.remove(this.symbol); //tds\n this.symbol.parentNode.removeChild(this.symbol); //tds\n }\n this.symbol = symbol\n\n this.initialize();\n}\ninherits(Output, InputOutput);\n\nmodule.exports = Output;\n*/\n","var Symbol = require('./flowchart.symbol');\nvar inherits = require('./flowchart.helpers').inherits;\n\nfunction Subroutine(chart, options) {\n var symbol = chart.paper.rect(0, 0, 0, 0);\n options = options || {};\n Symbol.call(this, chart, options, symbol);\n\n symbol.attr({\n width: this.text.getBBox().width + 4 * this.getAttr('text-margin')\n });\n\n this.text.attr({\n 'x': 2 * this.getAttr('text-margin')\n });\n\n var innerWrap = chart.paper.rect(0, 0, 0, 0);\n innerWrap.attr({\n x: this.getAttr('text-margin'),\n stroke: this.getAttr('element-color'),\n 'stroke-width': this.getAttr('line-width'),\n width: this.text.getBBox().width + 2 * this.getAttr('text-margin'),\n height: this.text.getBBox().height + 2 * this.getAttr('text-margin'),\n fill: this.getAttr('fill')\n });\n if (options.key) { innerWrap.node.id = options.key + 'i'; }\n\n var font = this.getAttr('font');\n var fontF = this.getAttr('font-family');\n var fontW = this.getAttr('font-weight');\n\n if (font) innerWrap.attr({ 'font': font });\n if (fontF) innerWrap.attr({ 'font-family': fontF });\n if (fontW) innerWrap.attr({ 'font-weight': fontW });\n\n if (options.link) { innerWrap.attr('href', options.link); }\n if (options.target) { innerWrap.attr('target', options.target); }\n this.group.push(innerWrap);\n innerWrap.insertBefore(this.text);\n\n this.initialize();\n}\ninherits(Subroutine, Symbol);\n\nmodule.exports = Subroutine;\n","// add indexOf to non ECMA-262 standard compliant browsers\nif (!Array.prototype.indexOf) {\n Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) {\n \"use strict\";\n if (this === null) {\n throw new TypeError();\n }\n var t = Object(this);\n var len = t.length >>> 0;\n if (len === 0) {\n return -1;\n }\n var n = 0;\n if (arguments.length > 0) {\n n = Number(arguments[1]);\n if (n != n) { // shortcut for verifying if it's NaN\n n = 0;\n } else if (n !== 0 && n != Infinity && n != -Infinity) {\n n = (n > 0 || -1) * Math.floor(Math.abs(n));\n }\n }\n if (n >= len) {\n return -1;\n }\n var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0);\n for (; k < len; k++) {\n if (k in t && t[k] === searchElement) {\n return k;\n }\n }\n return -1;\n };\n}\n\n// add lastIndexOf to non ECMA-262 standard compliant browsers\nif (!Array.prototype.lastIndexOf) {\n Array.prototype.lastIndexOf = function(searchElement /*, fromIndex*/) {\n \"use strict\";\n if (this === null) {\n throw new TypeError();\n }\n var t = Object(this);\n var len = t.length >>> 0;\n if (len === 0) {\n return -1;\n }\n var n = len;\n if (arguments.length > 1) {\n n = Number(arguments[1]);\n if (n != n) {\n n = 0;\n } else if (n !== 0 && n != (1 / 0) && n != -(1 / 0)) {\n n = (n > 0 || -1) * Math.floor(Math.abs(n));\n }\n }\n var k = n >= 0 ? Math.min(n, len - 1) : len - Math.abs(n);\n for (; k >= 0; k--) {\n if (k in t && t[k] === searchElement) {\n return k;\n }\n }\n return -1;\n };\n}\n\nif (!String.prototype.trim) {\n String.prototype.trim = function() {\n return this.replace(/^\\s+|\\s+$/g, '');\n };\n}","require('./src/flowchart.shim');\nvar parse = require('./src/flowchart.parse');\nrequire('./src/jquery-plugin');\n\nvar FlowChart = {\n\tparse: parse\n};\n\nif (typeof window !== 'undefined') {\n\twindow.flowchart = FlowChart;\n}\n\nmodule.exports = FlowChart;\n","if (typeof jQuery != 'undefined') {\n\tvar parse = require('./flowchart.parse');\n\n\t(function( $ ) {\n\t\tfunction paramFit(needle, haystack) {\n\t\t\treturn needle == haystack ||\n\t\t\t( Array.isArray(haystack) && (haystack.includes(needle) || haystack.includes(Number(needle)) ))\n\t\t}\n\t\tvar methods = {\n\t\t\tinit : function(options) {\n\t\t\t\treturn this.each(function() {\n\t\t\t\t\tvar $this = $(this);\n\t\t\t\t\tthis.chart = parse($this.text());\n\t\t\t\t\t$this.html('');\n\t\t\t\t\tthis.chart.drawSVG(this, options);\n\t\t\t\t});\n\t\t\t},\n\t\t\tsetFlowStateByParam : function(param, paramValue, newFlowState) {\n\t\t\t\treturn this.each(function() {\n\t\t\t\t\tvar chart = this.chart;\n\n\t\t\t\t\t// @todo this should be part of Symbol API\n\t\t\t\t\tvar nextSymbolKeys = ['next', 'yes', 'no', 'path1', 'path2', 'path3'];\n\n\t\t\t\t\tfor (var property in chart.symbols) {\n\t\t\t\t\t\tif (chart.symbols.hasOwnProperty(property)) {\n\t\t\t\t\t\t\tvar symbol = chart.symbols[property];\n\t\t\t\t\t\t\tvar val = symbol.params[param];\n\t\t\t\t\t\t\tif (paramFit(val, paramValue)) {\n\t\t\t\t\t\t\t\tsymbol.flowstate = newFlowState;\n\t\t\t\t\t\t\t\tfor (var nski = 0; nski < nextSymbolKeys.length; nski++) {\n\t\t\t\t\t\t\t\t\tvar nextSymbolKey = nextSymbolKeys[nski];\n\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\tsymbol[nextSymbolKey] &&\n\t\t\t\t\t\t\t\t\t\tsymbol[nextSymbolKey]['params'] &&\n\t\t\t\t\t\t\t\t\t\tsymbol[nextSymbolKey]['params'][param] &&\n\t\t\t\t\t\t\t\t\t\tparamFit(symbol[nextSymbolKey]['params'][param], paramValue)\n\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\tsymbol.lineStyle[symbol[nextSymbolKey]['key']] = {stroke: chart.options()['flowstate'][newFlowState]['fill']};\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tchart.clean();\n\t\t\t\t\tchart.drawSVG(this);\n\t\t\t\t});\n\n\t\t\t},\n\t\t\tclearFlowState: function () {\n\t\t\t\treturn this.each(function() {\n\t\t\t\t\tvar chart = this.chart;\n\n\t\t\t\t\tfor (var property in chart.symbols) {\n\t\t\t\t\t\tif (chart.symbols.hasOwnProperty(property)) {\n\t\t\t\t\t\t\tvar node = chart.symbols[property];\n\t\t\t\t\t\t\tnode.flowstate = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tchart.clean();\n\t\t\t\t\tchart.drawSVG(this);\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\n\t\t$.fn.flowChart = function(methodOrOptions) {\n\t\t\tif ( methods[methodOrOptions] ) {\n\t\t\t\treturn methods[ methodOrOptions ].apply( this, Array.prototype.slice.call( arguments, 1 ));\n\t\t\t} else if ( typeof methodOrOptions === 'object' || ! methodOrOptions ) {\n\t\t\t\t// Default to \"init\"\n\t\t\t\treturn methods.init.apply( this, arguments );\n\t\t\t} else {\n\t\t\t\t$.error( 'Method ' + methodOrOptions + ' does not exist on jQuery.flowChart' );\n\t\t\t}\n\t\t};\n\n\t})(jQuery); // eslint-disable-line\n}\n"],"names":["flowchart_helpers","defaults","_defaults","options","defaultOptions","merged","attrname","inherits","ctor","superCtor","Object","super_","prototype","create","constructor","value","enumerable","writable","configurable","TempCtor","flowchart_functions","drawPath","chart","location","points","i","len","path","length","pathValues","x","y","push","symbol","paper","attr","font","fontF","fontW","drawLine","from","to","text","toString","call","line","stroke","textPath","textAnchor","isHorizontal","firstTo","fill","checkLineIntersection","line1StartX","line1StartY","line1EndX","line1EndY","line2StartX","line2StartY","line2EndX","line2EndY","denominator","a","b","numerator1","result","onLine1","onLine2","drawAPI","require$$0","Symbol","this","group","set","connectedTo","symbolType","flowstate","lineStyle","key","leftLines","rightLines","topLines","bottomLines","params","next_direction","next","undefined","node","id","setAttribute","getAttr","link","function","cursor","addEventListener","evt","window","target","maxWidth","words","split","tempText","ii","word","getBBox","width","substring","tmpMargin","height","roundness","isNaN","insertBefore","initialize","attName","opt1","symbols","transform","getCenter","getX","getY","shiftX","setX","shiftY","setY","getTop","getBottom","getLeft","getRight","render","self","lineLength","rightPoint","isPositioned","shift","symb","hasSymbolUnder","diff","Math","abs","leftPoint","bottomPoint","renderLines","drawLineTo","origin","indexOf","yOffset","right","bottom","top","left","symbolX","symbolY","symbolTop","symbolRight","symbolLeft","isOnSameColumn","isOnSameLine","isUnder","isUpper","isLeft","isRight","maxX","lineWith","max","rightStart","topEnd","bottomStart","diffX","leftStart","topStart","leftEnd","rightEnd","l","llen","lines","ePath","lPath","iP","lenP","newPath","line1_from_x","line1_from_y","line1_to_x","line1_to_y","lP","lenlP","newLinePath","line2_from_x","line2_from_y","line2_to_x","line2_to_y","res","splice","minXFromSymbols","maxXFromLine","flowchart_symbol","require$$1","require$$2","Condition","yes_annotation","no_annotation","textMargin","yes_direction","direction_yes","no_direction","direction_no","startX","startY","yes_symbol","no_symbol","bottom_symbol","right_symbol","left_symbol","flowchart_symbol_condition","Parallel","rect","path1_annotation","path2_annotation","path3_annotation","path1_direction","path2_direction","path3_direction","direction_next","path1","direction_path1","path2","direction_path2","path3","direction_path3","path1_symbol","path2_symbol","path3_symbol","top_symbol","topPoint","flowchart_symbol_parallel","Raphael","flowchart_defaults","class","scale","start","end","condition","inputoutput","input","output","operation","subroutine","parallel","require$$3","require$$4","FlowChart","container","handle","flowChart","yes","nextSymbol","pathOk","no","then","startWith","maxHeight","maxY","minX","minY","leftX","x2","y2","lineWidth","setSize","setViewBox","clean","paperDom","canvas","parentNode","removeChild","flowchart_chart","Start","flowchart_symbol_start","End","flowchart_symbol_end","Operation","flowchart_symbol_operation","InputOutput","flowchart_symbol_inputoutput","Input","flowchart_symbol_input","require$$5","Output","flowchart_symbol_output","require$$6","Subroutine","innerWrap","flowchart_symbol_subroutine","require$$7","require$$8","require$$9","flowchart_parse","trim","drawSVG","diagram","dispSymbols","constructChart","s","prevDisp","prev","dispSymb","Error","getDisplaySymbol","prevBreak","i0","i0len","line0","replace","substr","currentLine","getStyle","startIndex","endIndex","getSymbValue","getSymbol","getNextPath","flowSymb","getAnnotation","tmp","tmp_split","lineStyleSymbols","iSS","lenSS","curSymb","JSON","parse","ann","flowSymbols","iS","lenS","symbVal","realSymb","direction","condOpt","sub","parts","match","entries","entry","join","txtAndState","pop","Array","searchElement","TypeError","t","n","arguments","Number","Infinity","floor","k","lastIndexOf","min","String","jQuery","$","paramFit","needle","haystack","isArray","includes","methods","init","each","$this","html","setFlowStateByParam","param","paramValue","newFlowState","nextSymbolKeys","property","hasOwnProperty","nski","nextSymbolKey","clearFlowState","fn","methodOrOptions","apply","slice","error","flowchart","flowchart_js"],"mappings":"8VA8CAA,EAAiB,CACfC,SA/CF,SAASC,EAAUC,EAASC,GAC1B,IAAKD,GAA8B,mBAAZA,EACrB,OAAOC,EAGT,IAAIC,EAAS,CAAA,EACb,IAAK,IAAIC,KAAYF,EACnBC,EAAOC,GAAYF,EAAeE,GAGpC,IAAKA,KAAYH,EACXA,EAAQG,KAERD,EAAOC,GADuB,iBAArBD,EAAOC,GACGJ,EAAUG,EAAOC,GAAWH,EAAQG,IAEpCH,EAAQG,IAIjC,OAAOD,CACT,EA4BEE,SA1BF,SAAmBC,EAAMC,GACvB,GAA8B,mBAAnBC,OAAa,OAEtBF,EAAKG,OAASF,EACdD,EAAKI,UAAYF,OAAOG,OAAOJ,EAAUG,UAAW,CAClDE,YAAa,CACXC,MAAOP,EACPQ,YAAY,EACZC,UAAU,EACVC,cAAc,SAGb,CAELV,EAAKG,OAASF,EACd,IAAIU,EAAW,WAAY,EAC3BA,EAASP,UAAYH,EAAUG,UAC/BJ,EAAKI,UAAY,IAAIO,EACrBX,EAAKI,UAAUE,YAAcN,CACjC,CACA,2CCiIAY,EAAiB,CAChBC,SA5KD,SAAkBC,EAAOC,EAAUC,GACjC,IAAIC,EAAGC,EACHC,EAAO,WAC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