From 78d8ee01ac7c4f2d17dad2e8965ae19398cf960e Mon Sep 17 00:00:00 2001 From: knsv Date: Sun, 29 Mar 2015 11:54:54 +0200 Subject: [PATCH] #Adjustments of init - **could break some integrations!!** * Configuration are picked up from the mermaid object and is not passed as arguments. Same handling for all diagram types, sequenceDiagrams were handled in a different way before this commit. When init is called with: * 0 arguments - all mermaid divs are processed * 1 argument - this is interpreted as a definition of what nodes to process * 2 arguments - for (some) backwards compatability the second argument is interpreted as the definition of nodes to process. The first argument (prrobably a sequence config is ignored) A definition of nodes to process can be * a css selector for what elements to be processed * a list of nodes as in the result of a command like the one below ``` document.querySelectorAll('.tbProcessed'); ``` --- dist/mermaid.full.js | 48 ++++++++++++++++++++++++---------------- dist/mermaid.full.min.js | 2 +- dist/mermaid.slim.js | 48 ++++++++++++++++++++++++---------------- dist/mermaid.slim.min.js | 2 +- src/main.js | 48 ++++++++++++++++++++++++---------------- 5 files changed, 89 insertions(+), 59 deletions(-) diff --git a/dist/mermaid.full.js b/dist/mermaid.full.js index a622e4875..a0b12cfbc 100644 --- a/dist/mermaid.full.js +++ b/dist/mermaid.full.js @@ -30861,25 +30861,34 @@ var parse = function(text){ * c-->|No |d(Transform); * ``` */ -var init = function (sequenceConfig, arr) { - arr = arr == null ? document.querySelectorAll('.mermaid') - : typeof arr === "string" ? document.querySelectorAll(arr) - : arr instanceof Node ? [arr] - : arr; - //arr = document.querySelectorAll('.mermaid'); - var i; - - if (sequenceConfig !== 'undefined' && (typeof sequenceConfig !== 'undefined')) { - if(typeof sequenceConfig === 'object'){ - seq.setConf(sequenceConfig); - } else{ - seq.setConf(JSON.parse(sequenceConfig)); +/** + * Renders the mermaid diagrams + * @* param nodes- a css selector or an array of nodes + */ +var init = function () { + var nodes; + if(arguments.length === 2){ + // sequence config was passed as #1 + if(typeof arguments[0] !== 'undefined'){ + mermaid.sequenceConfig = arguments[0]; } - } - for (i = 0; i < arr.length; i++) { - var element = arr[i]; + nodes = arguments[1]; + } + else{ + nodes = arguments[0]; + } + + nodes = nodes === undefined ? document.querySelectorAll('.mermaid') + : typeof nodes === "string" ? document.querySelectorAll(nodes) + : nodes instanceof Node ? [nodes] + // Last case - sequence config was passed pick next + : nodes; + + var i; + for (i = 0; i < nodes.length; i++) { + var element = nodes[i]; // Check if previously processed if(!element.getAttribute("data-processed")) { @@ -30888,7 +30897,7 @@ var init = function (sequenceConfig, arr) { continue; } - id = 'mermaidChart' + nextId++; + var id = 'mermaidChart' + nextId++; var txt = element.innerHTML; txt = txt.replace(/>/g,'>'); @@ -30919,6 +30928,9 @@ var init = function (sequenceConfig, arr) { utils.cloneCssStyles(element.firstChild, classes); break; case 'sequenceDiagram': + if(typeof mermaid.sequenceConfig === 'object'){ + seq.setConf(mermaid.sequenceConfig); + } seq.draw(txt,id); utils.cloneCssStyles(element.firstChild, []); break; @@ -31016,8 +31028,6 @@ if(typeof document !== 'undefined'){ }, false); } - - }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) },{"../package.json":84,"./diagrams/example/exampleDb":85,"./diagrams/example/exampleRenderer":86,"./diagrams/example/parser/example":87,"./diagrams/flowchart/flowRenderer":90,"./diagrams/flowchart/graphDb":91,"./diagrams/flowchart/parser/dot":92,"./diagrams/flowchart/parser/flow":93,"./diagrams/gantt/ganttDb":95,"./diagrams/gantt/ganttRenderer":96,"./diagrams/gantt/parser/gantt":97,"./diagrams/sequenceDiagram/parser/sequenceDiagram":99,"./diagrams/sequenceDiagram/sequenceDb":100,"./diagrams/sequenceDiagram/sequenceRenderer":101,"./utils":104,"he":81}],104:[function(require,module,exports){ /** diff --git a/dist/mermaid.full.min.js b/dist/mermaid.full.min.js index d73981482..9bf817fff 100644 --- a/dist/mermaid.full.min.js +++ b/dist/mermaid.full.min.js @@ -42,4 +42,4 @@ return 0>e-a?(n=t.clone().add(i-1,"months"),r=(e-a)/(a-n)):(n=t.clone().add(i+1, case"second":return 24*e*60*60+this._milliseconds/1e3;case"millisecond":return Math.floor(24*e*60*60*1e3)+this._milliseconds;default:throw new Error("Unknown unit "+t)}},lang:Ae.fn.lang,locale:Ae.fn.locale,toIsoString:s("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var t=Math.abs(this.years()),e=Math.abs(this.months()),n=Math.abs(this.days()),r=Math.abs(this.hours()),i=Math.abs(this.minutes()),a=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(t?t+"Y":"")+(e?e+"M":"")+(n?n+"D":"")+(r||i||a?"T":"")+(r?r+"H":"")+(i?i+"M":"")+(a?a+"S":""):"P0D"},localeData:function(){return this._locale},toJSON:function(){return this.toISOString()}}),Ae.duration.fn.toString=Ae.duration.fn.toISOString;for(De in pn)a(pn,De)&&we(De.toLowerCase());Ae.duration.fn.asMilliseconds=function(){return this.as("ms")},Ae.duration.fn.asSeconds=function(){return this.as("s")},Ae.duration.fn.asMinutes=function(){return this.as("m")},Ae.duration.fn.asHours=function(){return this.as("h")},Ae.duration.fn.asDays=function(){return this.as("d")},Ae.duration.fn.asWeeks=function(){return this.as("weeks")},Ae.duration.fn.asMonths=function(){return this.as("M")},Ae.duration.fn.asYears=function(){return this.as("y")},Ae.locale("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=1===F(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n}}),Ue?e.exports=Ae:"function"==typeof define&&define.amd?(define(function(t,e,n){return n.config&&n.config()&&n.config().noGlobal===!0&&(Se.moment=Ee),Ae}),ke(!0)):ke()}).call(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],84:[function(t,e){e.exports={name:"mermaid",version:"0.4.0",description:"Markdownish syntax for generating flowcharts, sequence diagrams and gantt charts.",main:"src/main.js",keywords:["diagram","markdown","flowchart","sequence diagram","gantt"],bin:{mermaid:"./bin/mermaid.js"},scripts:{test:"gulp test"},repository:{type:"git",url:"https://github.com/knsv/mermaid"},author:"Knut Sveidqvist",license:"MIT",dependencies:{chalk:"^0.5.1",d3:"~3.4.13","dagre-d3":"~0.4.2",he:"^0.5.0",minimist:"^1.1.0",mkdirp:"^0.5.0",moment:"^2.9.0",semver:"^4.1.1",which:"^1.0.8"},devDependencies:{async:"^0.9.0",browserify:"~6.2.0",clone:"^0.2.0","codeclimate-test-reporter":"0.0.4",d3:"~3.4.13","dagre-d3":"~0.3.3",dateformat:"^1.0.11","event-stream":"^3.2.0",foundation:"^4.2.1-1","front-matter":"^0.2.0",gulp:"~3.8.9","gulp-browserify":"^0.5.0","gulp-bump":"^0.1.11","gulp-concat":"~2.4.1","gulp-data":"^1.1.1","gulp-ext-replace":"~0.1.0","gulp-hogan":"^1.1.0","gulp-insert":"^0.4.0","gulp-istanbul":"^0.4.0","gulp-jasmine":"~1.0.1","gulp-jison":"~1.0.0","gulp-jshint":"^1.9.0","gulp-less":"^3.0.1","gulp-rename":"~1.2.0","gulp-shell":"^0.2.10","gulp-tag-version":"^1.2.1","gulp-uglify":"~1.0.1",he:"^0.5.0","hogan.js":"^3.0.2",jasmine:"~2.0.1",jison:"~0.4.15","jshint-stylish":"^1.0.0",karma:"~0.12.20","karma-chrome-launcher":"~0.1.5","karma-jasmine":"~0.2.1","karma-requirejs":"~0.2.2",lodash:"^2.4.1","lodash._escapestringchar":"^2.4.1","lodash._objecttypes":"^2.4.1","lodash._reinterpolate":"^2.4.1","lodash._reunescapedhtml":"^2.4.1","lodash.defaults":"^2.4.1","lodash.templatesettings":"^2.4.1","lodash.values":"^2.4.1",marked:"^0.3.2","mock-browser":"^0.90.27",path:"^0.4.9",phantomjs:"^1.9.12",proxyquire:"^1.3.1",rewire:"^2.1.3",rimraf:"^2.2.8",tape:"^3.0.3"}}},{}],85:[function(t,e,n){var r="",i=!1;n.setMessage=function(t){r=t},n.getMessage=function(){return r},n.setInfo=function(t){i=t},n.getInfo=function(){return i},n.parseError=function(t,e){mermaid.parseError(t,e)}},{}],86:[function(t,e,n){var r=t("./exampleDb"),i=t("./parser/example.js");n.draw=function(t,e,n){var a;a=i.parser,a.yy=r,a.parse(t);var o=d3.select("#"+e),u=o.append("g");u.append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("mermaid "+n),o.attr("height",100),o.attr("width",400)}},{"./exampleDb":85,"./parser/example.js":87}],87:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[6,9,10,12],r={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,message:11,say:12,TXT:13,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo",12:"say",13:"TXT"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1],[8,1],[11,2]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 1:return r;case 4:break;case 6:r.setInfo(!0);break;case 7:r.setMessage(a[o]);break;case 8:this.$=a[o-1].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8],11:9,12:[1,10]},{1:[2,1]},e(n,[2,3]),e(n,[2,4]),e(n,[2,5]),e(n,[2,6]),e(n,[2,7]),{13:[1,11]},e(n,[2,8])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,k,A,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(A in o[x])this.terminals_[A]&&A>h&&M.push("'"+this.terminals_[A]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),k=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof k)return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},i=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!1):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 9;case 1:return 10;case 2:return 4;case 3:return 12;case 4:return 13;case 5:return 6;case 6:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:showInfo\b)/i,/^(?:info\b)/i,/^(?:say\b)/i,/^(?::[^#\n;]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6],inclusive:!0}}};return t}();return r.lexer=i,t.prototype=r,r.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],88:[function(t,e){var n;if(t)try{n=t("d3")}catch(r){}n||(n=window.d3),e.exports=n},{d3:1}],89:[function(t,e){var n;if(t)try{n=t("dagre-d3")}catch(r){}n||(n=window.dagreD3),e.exports=n},{"dagre-d3":2}],90:[function(t,e,n){(function(r){var i=t("./graphDb"),a=t("./parser/flow"),o=t("./parser/dot"),u=t("./dagre-d3"),s=t("./d3"),c={};e.exports.setConf=function(t){var e,n=Object.keys(t);for(e=0;e0&&(u=o.classes.join(" "));var s="";s=i(s,o.styles),a="undefined"==typeof o.text?o.id:o.text;var c="";r.mermaid.htmlLabels?c="html":(a=a.replace(/
/g,"\n"),c="text");var l=0,h="";switch(o.type){case"round":l=5,h="rect";break;case"square":h="rect";break;case"diamond":h="question";break;case"odd":h="rect_left_inv_arrow";break;case"odd_right":h="rect_left_inv_arrow";break;case"circle":h="circle";break;default:h="rect"}e.setNode(o.id,{labelType:c,shape:h,label:a,rx:l,ry:l,"class":u,style:s,id:o.id})})},n.addEdges=function(t,e){var n,i,a=0;"undefined"!=typeof t.defaultStyle&&(i=t.defaultStyle.toString().replace(/,/g,";")),t.forEach(function(t){a++,n="arrow_open"===t.type?"none":"normal";var o="";if("undefined"!=typeof t.style)t.style.forEach(function(t){o=o+t+";"});else switch(t.stroke){case"normal":o="fill:none","undefined"!=typeof i&&(o=i);break;case"dotted":o="stroke: #333; fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":o="stroke: #333; stroke-width: 3.5px;fill:none"}if("undefined"==typeof t.text)"undefined"==typeof t.style?e.setEdge(t.start,t.end,{style:o,arrowhead:n},a):e.setEdge(t.start,t.end,{style:o,arrowheadStyle:"fill: #333",arrowhead:n},a);else{var u=t.text.replace(/
/g,"\n");"undefined"==typeof t.style?r.mermaid.htmlLabels?e.setEdge(t.start,t.end,{labelType:"html",style:o,labelpos:"c",label:''+t.text+"",arrowheadStyle:"fill: #333",arrowhead:n},a):e.setEdge(t.start,t.end,{labelType:"text",style:"stroke: #333; stroke-width: 1.5px;fill:none",labelpos:"c",label:u,arrowheadStyle:"fill: #333",arrowhead:n},a):e.setEdge(t.start,t.end,{labelType:"text",style:o,arrowheadStyle:"fill: #333",label:u,arrowhead:n},a)}})},n.getClasses=function(t,e){var n;i.clear(),n=e?o.parser:a.parser,n.yy=i,n.parse(t);var r=i.getClasses();return"undefined"==typeof r.default&&(r.default={id:"default"},r.default.styles=["fill:#ffa","stroke:#666","stroke-width:3px"],r.default.nodeLabelStyles=["fill:#000","stroke:none","font-weight:300",'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf',"font-size:14px"],r.default.edgeLabelStyles=["fill:#000","stroke:none","font-weight:300",'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf',"font-size:14px"]),r},n.draw=function(t,e,r){var l;i.clear(),l=r?o.parser:a.parser,l.yy=i;try{l.parse(t)}catch(h){}var f;f=i.getDirection(),"undefined"==typeof f&&(f="TD");var d=new u.graphlib.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:f,marginx:20,marginy:20}).setDefaultEdgeLabel(function(){return{}}),p=i.getSubGraphs(),g=0;p.forEach(function(){g+=1;var t="subG"+g;i.addVertex(t,void 0,void 0,void 0)});var y=i.getVertices(),m=i.getEdges();g=0,p.forEach(function(t){g+=1;var e="subG"+g;s.selectAll("cluster").append("text"),t.nodes.forEach(function(t){d.setParent(t,e)})}),n.addVertices(y,d),n.addEdges(m,d);var v=new u.render;v.shapes().question=function(t,e,n){var r=e.width,i=e.height,a=.8*(r+i),o=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}],s=t.insert("polygon",":first-child").attr("points",o.map(function(t){return t.x+","+t.y}).join(" ")).attr("rx",5).attr("ry",5).attr("transform","translate("+-a/2+","+2*a/4+")");return n.intersect=function(t){return u.intersect.polygon(n,o,t)},s},v.shapes().rect_left_inv_arrow=function(t,e,n){var r=e.width,i=e.height,a=[{x:-i/2,y:0},{x:r,y:0},{x:r,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}],o=t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+-r/2+","+2*i/4+")");return n.intersect=function(t){return u.intersect.polygon(n,a,t)},o},v.shapes().rect_right_inv_arrow=function(t,e,n){var r=e.width,i=e.height,a=[{x:0,y:0},{x:r+i/2,y:0},{x:r,y:-i/2},{x:r+i/2,y:-i},{x:0,y:-i}],o=t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+-r/2+","+2*i/4+")");return n.intersect=function(t){return u.intersect.polygon(n,a,t)},o},v.arrows().none=function(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),a=i.append("path").attr("d","M 0 0 L 0 0 L 0 0 z");u.util.applyStyle(a,n[r+"Style"])};var b=s.select("#"+e);svgGroup=s.select("#"+e+" g"),v(s.select("#"+e+" g"),d);document.querySelector("#"+e);b.attr("height",d.graph().height),"undefined"==typeof c.width?(console.log("Undefined it is"),b.attr("width",d.graph().width)):(console.log("Defined it is"+c.width),b.attr("width",c.width)),b.attr("viewBox","0 0 "+(d.graph().width+20)+" "+(d.graph().height+20)),setTimeout(function(){var t=0;p.forEach(function(n){var r=document.querySelectorAll("#"+e+" .clusters rect"),i=document.querySelectorAll("#"+e+" .cluster");if("undefined"!==n.title){var a=r[t].x.baseVal.value,o=r[t].y.baseVal.value,u=r[t].width.baseVal.value,c=s.select(i[t]),l=c.append("text");l.attr("x",a+u/2),l.attr("y",o+14),l.attr("fill","black"),l.attr("stroke","none"),l.attr("id",e+"Text"),l.style("text-anchor","middle"),l.text(n.title)}t+=1})},20)}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./d3":88,"./dagre-d3":89,"./graphDb":91,"./parser/dot":92,"./parser/flow":93}],91:[function(require,module,exports){var vertices={},edges=[],classes=[],subGraphs=[],direction,funs=[];exports.addVertex=function(t,e,n,r){"undefined"!=typeof t&&0!==t.trim().length&&("undefined"==typeof vertices[t]&&(vertices[t]={id:t,styles:[],classes:[]}),"undefined"!=typeof e&&(vertices[t].text=e),"undefined"!=typeof n&&(vertices[t].type=n),"undefined"!=typeof n&&(vertices[t].type=n),"undefined"!=typeof r&&null!==r&&r.forEach(function(e){vertices[t].styles.push(e)}))},exports.addLink=function(t,e,n,r){var i={start:t,end:e,type:void 0,text:""};r=n.text,"undefined"!=typeof r&&(i.text=r),"undefined"!=typeof n&&(i.type=n.type,i.stroke=n.stroke),edges.push(i)},exports.updateLink=function(t,e){t.substr(1);"default"===t?edges.defaultStyle=e:edges[t].style=e},exports.addClass=function(t,e){"undefined"==typeof classes[t]&&(classes[t]={id:t,styles:[]}),"undefined"!=typeof e&&null!==e&&e.forEach(function(e){classes[t].styles.push(e)})},exports.setDirection=function(t){direction=t},exports.setClass=function(t,e){t.indexOf(",")>0?t.split(",").forEach(function(t){"undefined"!=typeof vertices[t]&&vertices[t].classes.push(e)}):"undefined"!=typeof vertices[t]&&vertices[t].classes.push(e)},exports.setClickEvent=function(id,functionName){id.indexOf(",")>0?id.split(",").forEach(function(id2){"undefined"!=typeof vertices[id2]&&funs.push(function(){var elem=document.getElementById(id2);null!==elem&&(elem.onclick=function(){eval(functionName+"('"+id2+"')")})})}):"undefined"!=typeof vertices[id]&&funs.push(function(){var elem=document.getElementById(id);null!==elem&&(elem.onclick=function(){eval(functionName+"('"+id+"')")})})},exports.bindFunctions=function(){funs.forEach(function(t){t()})},exports.getDirection=function(){return direction},exports.getVertices=function(){return vertices},exports.getEdges=function(){return edges},exports.getClasses=function(){return classes},exports.clear=function(){vertices={},classes={},edges=[],funs=[],subGraphs=[]},exports.defaultStyle=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},exports.addSubGraph=function(t,e){function n(t){var e={"boolean":{},number:{},string:{}},n=[];return t.filter(function(t){var r=typeof t;return" "===t?!1:r in e?e[r].hasOwnProperty(t)?!1:e[r][t]=!0:n.indexOf(t)>=0?!1:n.push(t)})}var r=[];r=n(r.concat.apply(r,t)),subGraphs.push({nodes:r,title:e})},exports.getSubGraphs=function(){return subGraphs},exports.parseError=function(t,e){mermaid.parseError(t,e)}},{}],92:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,5],r=[1,6],i=[1,12],a=[1,13],o=[1,14],u=[1,15],s=[1,16],c=[1,17],l=[1,18],h=[1,19],f=[1,20],d=[1,21],p=[1,22],g=[8,16,17,18,19,20,21,22,23,24,25,26],y=[1,37],m=[1,33],v=[1,34],b=[1,35],_=[1,36],x=[8,10,16,17,18,19,20,21,22,23,24,25,26,28,32,37,39,40,45,57,58],w=[10,28],k=[10,28,37,57,58],A=[2,49],E=[1,45],D=[1,48],M=[1,49],S=[1,52],C=[2,65],T=[1,65],F=[1,66],L=[1,67],B=[1,68],N=[1,69],O=[1,70],I=[1,71],q=[1,72],R=[1,73],P=[8,16,17,18,19,20,21,22,23,24,25,26,47],U=[10,28,37],Y={trace:function(){},yy:{},symbols_:{error:2,expressions:3,graph:4,EOF:5,graphStatement:6,idStatement:7,"{":8,stmt_list:9,"}":10,strict:11,GRAPH:12,DIGRAPH:13,textNoTags:14,textNoTagsToken:15,ALPHA:16,NUM:17,COLON:18,PLUS:19,EQUALS:20,MULT:21,DOT:22,BRKT:23,SPACE:24,MINUS:25,keywords:26,stmt:27,";":28,node_stmt:29,edge_stmt:30,attr_stmt:31,"=":32,subgraph:33,attr_list:34,NODE:35,EDGE:36,"[":37,a_list:38,"]":39,",":40,edgeRHS:41,node_id:42,edgeop:43,port:44,":":45,compass_pt:46,SUBGRAPH:47,n:48,ne:49,e:50,se:51,s:52,sw:53,w:54,nw:55,c:56,ARROW_POINT:57,ARROW_OPEN:58,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",8:"{",10:"}",11:"strict",12:"GRAPH",13:"DIGRAPH",16:"ALPHA",17:"NUM",18:"COLON",19:"PLUS",20:"EQUALS",21:"MULT",22:"DOT",23:"BRKT",24:"SPACE",25:"MINUS",26:"keywords",28:";",32:"=",35:"NODE",36:"EDGE",37:"[",39:"]",40:",",45:":",47:"SUBGRAPH",48:"n",49:"ne",50:"e",51:"se",52:"s",53:"sw",54:"w",55:"nw",56:"c",57:"ARROW_POINT",58:"ARROW_OPEN"},productions_:[0,[3,2],[4,5],[4,6],[4,4],[6,1],[6,1],[7,1],[14,1],[14,2],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[9,1],[9,3],[27,1],[27,1],[27,1],[27,3],[27,1],[31,2],[31,2],[31,2],[34,4],[34,3],[34,3],[34,2],[38,5],[38,5],[38,3],[30,3],[30,3],[30,2],[30,2],[41,3],[41,3],[41,2],[41,2],[29,2],[29,1],[42,2],[42,1],[44,4],[44,2],[44,2],[33,5],[33,4],[33,3],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,0],[43,1],[43,1]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 1:this.$=a[o-1];break;case 2:this.$=a[o-4];break;case 3:this.$=a[o-5];break;case 4:this.$=a[o-3];break;case 8:case 10:case 11:this.$=a[o];break;case 9:this.$=a[o-1]+""+a[o];break;case 12:case 13:case 14:case 15:case 16:case 18:case 19:case 20:this.$=a[o];break;case 17:this.$="
";break;case 39:this.$="oy";break;case 40:r.addLink(a[o-1],a[o].id,a[o].op),this.$="oy";break;case 42:r.addLink(a[o-1],a[o].id,a[o].op),this.$={op:a[o-2],id:a[o-1]};break;case 44:this.$={op:a[o-1],id:a[o]};break;case 48:r.addVertex(a[o-1]),this.$=a[o-1];break;case 49:r.addVertex(a[o]),this.$=a[o];break;case 66:this.$="arrow";break;case 67:this.$="arrow_open"}},table:[{3:1,4:2,6:3,11:[1,4],12:n,13:r},{1:[3]},{5:[1,7]},{7:8,8:[1,9],14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{6:23,12:n,13:r},e(g,[2,5]),e(g,[2,6]),{1:[2,1]},{8:[1,24]},{7:30,8:y,9:25,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},e([8,10,28,32,37,39,40,45,57,58],[2,7],{15:38,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p}),e(x,[2,8]),e(x,[2,10]),e(x,[2,11]),e(x,[2,12]),e(x,[2,13]),e(x,[2,14]),e(x,[2,15]),e(x,[2,16]),e(x,[2,17]),e(x,[2,18]),e(x,[2,19]),e(x,[2,20]),{7:39,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{7:30,8:y,9:40,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{10:[1,41]},{10:[2,21],28:[1,42]},e(w,[2,23]),e(w,[2,24]),e(w,[2,25]),e(k,A,{44:44,32:[1,43],45:E}),e(w,[2,27],{41:46,43:47,57:D,58:M}),e(w,[2,47],{43:47,34:50,41:51,37:S,57:D,58:M}),{34:53,37:S},{34:54,37:S},{34:55,37:S},{7:56,8:[1,57],14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{7:30,8:y,9:58,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},e(x,[2,9]),{8:[1,59]},{10:[1,60]},{5:[2,4]},{7:30,8:y,9:61,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{7:62,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},e(k,[2,48]),e(k,C,{14:10,15:11,7:63,46:64,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,48:T,49:F,50:L,51:B,52:N,53:O,54:I,55:q,56:R}),e(w,[2,41],{34:74,37:S}),{7:77,8:y,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,33:76,42:75,47:_},e(P,[2,66]),e(P,[2,67]),e(w,[2,46]),e(w,[2,40],{34:78,37:S}),{7:81,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:79,39:[1,80]},e(w,[2,28]),e(w,[2,29]),e(w,[2,30]),{8:[1,82]},{7:30,8:y,9:83,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{10:[1,84]},{7:30,8:y,9:85,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{5:[2,2]},{10:[2,22]},e(w,[2,26]),e(k,[2,51],{45:[1,86]}),e(k,[2,52]),e(k,[2,56]),e(k,[2,57]),e(k,[2,58]),e(k,[2,59]),e(k,[2,60]),e(k,[2,61]),e(k,[2,62]),e(k,[2,63]),e(k,[2,64]),e(w,[2,38]),e(U,[2,44],{43:47,41:87,57:D,58:M}),e(U,[2,45],{43:47,41:88,57:D,58:M}),e(k,A,{44:44,45:E}),e(w,[2,39]),{39:[1,89]},e(w,[2,34],{34:90,37:S}),{32:[1,91]},{7:30,8:y,9:92,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{10:[1,93]},e(k,[2,55]),{10:[1,94]},e(k,C,{46:95,48:T,49:F,50:L,51:B,52:N,53:O,54:I,55:q,56:R}),e(U,[2,42]),e(U,[2,43]),e(w,[2,33],{34:96,37:S}),e(w,[2,32]),{7:97,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{10:[1,98]},e(k,[2,54]),{5:[2,3]},e(k,[2,50]),e(w,[2,31]),{28:[1,99],39:[2,37],40:[1,100]},e(k,[2,53]),{7:81,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:101},{7:81,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:102},{39:[2,35]},{39:[2,36]}],defaultActions:{7:[2,1],41:[2,4],60:[2,2],61:[2,22],94:[2,3],101:[2,35],102:[2,36]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,k,A,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(A in o[x])this.terminals_[A]&&A>h&&M.push("'"+this.terminals_[A]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),k=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof k)return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},j=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n; if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!1):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:return"STYLE";case 1:return"LINKSTYLE";case 2:return"CLASSDEF";case 3:return"CLASS";case 4:return"CLICK";case 5:return 12;case 6:return 13;case 7:return 47;case 8:return 35;case 9:return 36;case 10:return"DIR";case 11:return"DIR";case 12:return"DIR";case 13:return"DIR";case 14:return"DIR";case 15:return"DIR";case 16:return 17;case 17:return 23;case 18:return 18;case 19:return 28;case 20:return 40;case 21:return 32;case 22:return 21;case 23:return 22;case 24:return"ARROW_CROSS";case 25:return 57;case 26:return"ARROW_CIRCLE";case 27:return 58;case 28:return 25;case 29:return 19;case 30:return 20;case 31:return 16;case 32:return"PIPE";case 33:return"PS";case 34:return"PE";case 35:return 37;case 36:return 39;case 37:return 8;case 38:return 10;case 39:return"QUOTE";case 40:return 24;case 41:return"NEWLINE";case 42:return 5}},rules:[/^(?:style\b)/,/^(?:linkStyle\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:click\b)/,/^(?:graph\b)/,/^(?:digraph\b)/,/^(?:subgraph\b)/,/^(?:node\b)/,/^(?:edge\b)/,/^(?:LR\b)/,/^(?:RL\b)/,/^(?:TB\b)/,/^(?:BT\b)/,/^(?:TD\b)/,/^(?:BR\b)/,/^(?:[0-9])/,/^(?:#)/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:=)/,/^(?:\*)/,/^(?:\.)/,/^(?:--[x])/,/^(?:->)/,/^(?:--[o])/,/^(?:--)/,/^(?:-)/,/^(?:\+)/,/^(?:=)/,/^(?:[\u0021-\u0027\u002A-\u002E\u003F\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC_])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:\s)/,/^(?:\n)/,/^(?:$)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],inclusive:!0}}};return t}();return Y.lexer=j,t.prototype=Y,Y.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],93:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,4],r=[1,3],i=[1,5],a=[1,8,9,10,11,13,30,67,68,69,70,71,77,81,83,84,86,87,89,90,91],o=[2,2],u=[1,12],s=[1,13],c=[1,14],l=[1,15],h=[1,31],f=[1,22],d=[1,24],p=[1,25],g=[1,26],y=[1,27],m=[1,28],v=[1,34],b=[1,36],_=[1,33],x=[1,35],w=[1,41],k=[1,40],A=[1,37],E=[1,38],D=[1,39],M=[1,8,9,10,11,13,30,32,67,68,69,70,71,77,81,83,84,86,87,89,90,91],S=[1,49],C=[1,48],T=[1,50],F=[1,67],L=[1,75],B=[1,76],N=[1,61],O=[1,60],I=[1,80],q=[1,79],R=[1,77],P=[1,78],U=[1,68],Y=[1,63],j=[1,62],z=[1,70],V=[1,71],H=[1,72],G=[1,73],$=[1,74],W=[1,65],Z=[1,64],X=[8,9,11],K=[8,9,11,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61],J=[1,109],Q=[8,9,10,11,13,15,36,38,40,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,77,81,83,84,86,87,89,90,91],te=[8,9,10,11,12,13,15,16,17,18,30,32,36,37,38,39,40,41,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,67,68,69,70,71,74,77,79,81,83,84,86,87,89,90,91],ee=[1,112],ne=[1,113],re=[8,9,10,11,13,30,32,67,68,69,70,71,77,81,83,84,86,87,89,90,91],ie=[8,9,10,11,12,13,15,16,17,18,30,32,37,39,41,44,47,48,49,50,51,53,54,55,56,57,58,59,60,61,62,67,68,69,70,71,74,77,79,81,83,84,86,87,89,90,91],ae=[13,77,81,83,84,86,87,89,90,91],oe=[13,62,77,81,83,84,86,87,89,90,91],ue=[1,184],se=[1,181],ce=[1,188],le=[1,185],he=[1,182],fe=[1,189],de=[1,179],pe=[1,180],ge=[1,183],ye=[1,186],me=[1,187],ve=[1,203],be=[8,9,11,81],_e=[8,9,10,11,44,67,76,77,79,81,83,84,85,86,87],xe={trace:function(){},yy:{},symbols_:{error:2,mermaidDoc:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,DIR:13,FirstStmtSeperator:14,TAGEND:15,TAGSTART:16,UP:17,DOWN:18,ending:19,endToken:20,spaceList:21,spaceListNewline:22,verticeStatement:23,separator:24,styleStatement:25,linkStyleStatement:26,classDefStatement:27,classStatement:28,clickStatement:29,subgraph:30,text:31,end:32,vertex:33,link:34,alphaNum:35,SQS:36,SQE:37,PS:38,PE:39,DIAMOND_START:40,DIAMOND_STOP:41,alphaNumStatement:42,alphaNumToken:43,MINUS:44,linkStatement:45,arrowText:46,"--":47,ARROW_POINT:48,ARROW_CIRCLE:49,ARROW_CROSS:50,ARROW_OPEN:51,"-.":52,DOTTED_ARROW_POINT:53,DOTTED_ARROW_CIRCLE:54,DOTTED_ARROW_CROSS:55,DOTTED_ARROW_OPEN:56,"==":57,THICK_ARROW_POINT:58,THICK_ARROW_CIRCLE:59,THICK_ARROW_CROSS:60,THICK_ARROW_OPEN:61,PIPE:62,textToken:63,commentText:64,commentToken:65,keywords:66,STYLE:67,LINKSTYLE:68,CLASSDEF:69,CLASS:70,CLICK:71,textNoTags:72,textNoTagsToken:73,DEFAULT:74,stylesOpt:75,HEX:76,NUM:77,commentStatement:78,PCT:79,style:80,COMMA:81,styleComponent:82,ALPHA:83,COLON:84,UNIT:85,BRKT:86,DOT:87,graphCodeTokens:88,PLUS:89,EQUALS:90,MULT:91,TAG_START:92,TAG_END:93,QUOTE:94,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"DIR",15:"TAGEND",16:"TAGSTART",17:"UP",18:"DOWN",30:"subgraph",32:"end",36:"SQS",37:"SQE",38:"PS",39:"PE",40:"DIAMOND_START",41:"DIAMOND_STOP",44:"MINUS",47:"--",48:"ARROW_POINT",49:"ARROW_CIRCLE",50:"ARROW_CROSS",51:"ARROW_OPEN",52:"-.",53:"DOTTED_ARROW_POINT",54:"DOTTED_ARROW_CIRCLE",55:"DOTTED_ARROW_CROSS",56:"DOTTED_ARROW_OPEN",57:"==",58:"THICK_ARROW_POINT",59:"THICK_ARROW_CIRCLE",60:"THICK_ARROW_CROSS",61:"THICK_ARROW_OPEN",62:"PIPE",67:"STYLE",68:"LINKSTYLE",69:"CLASSDEF",70:"CLASS",71:"CLICK",74:"DEFAULT",76:"HEX",77:"NUM",79:"PCT",81:"COMMA",83:"ALPHA",84:"COLON",85:"UNIT",86:"BRKT",87:"DOT",89:"PLUS",90:"EQUALS",91:"MULT",92:"TAG_START",93:"TAG_END",94:"QUOTE"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,4],[4,4],[4,4],[4,4],[4,4],[19,2],[19,1],[20,1],[20,1],[20,1],[14,1],[14,1],[14,2],[22,2],[22,2],[22,1],[22,1],[21,2],[21,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,6],[7,5],[24,1],[24,1],[24,1],[23,3],[23,1],[33,4],[33,5],[33,6],[33,7],[33,4],[33,5],[33,4],[33,5],[33,4],[33,5],[33,1],[33,2],[35,1],[35,2],[42,1],[42,1],[42,3],[34,2],[34,3],[34,1],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[46,3],[31,1],[31,2],[64,1],[64,2],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[72,1],[72,2],[27,5],[27,5],[28,5],[29,5],[25,5],[25,5],[26,5],[26,5],[78,3],[75,1],[75,3],[80,1],[80,2],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[65,1],[65,1],[63,1],[63,1],[63,1],[63,1],[63,1],[63,1],[63,1],[73,1],[73,1],[73,1],[73,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 2:this.$=[];break;case 3:a[o]!==[]&&a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 55:case 57:case 58:case 88:case 90:case 103:this.$=a[o];break;case 11:r.setDirection(a[o-1]),this.$=a[o-1];break;case 12:r.setDirection("LR"),this.$=a[o-1];break;case 13:r.setDirection("RL"),this.$=a[o-1];break;case 14:r.setDirection("BT"),this.$=a[o-1];break;case 15:r.setDirection("TB"),this.$=a[o-1];break;case 30:this.$=a[o-1];break;case 31:case 32:case 33:case 34:case 35:this.$=[];break;case 36:r.addSubGraph(a[o-2],a[o-4]);break;case 37:r.addSubGraph(a[o-2],void 0);break;case 41:r.addLink(a[o-2],a[o],a[o-1]),this.$=[a[o-2],a[o]];break;case 42:this.$=[a[o]];break;case 43:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"square");break;case 44:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"square");break;case 45:this.$=a[o-5],r.addVertex(a[o-5],a[o-2],"circle");break;case 46:this.$=a[o-6],r.addVertex(a[o-6],a[o-3],"circle");break;case 47:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"round");break;case 48:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"round");break;case 49:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"diamond");break;case 50:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"diamond");break;case 51:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"odd");break;case 52:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"odd");break;case 53:this.$=a[o],r.addVertex(a[o]);break;case 54:this.$=a[o-1],r.addVertex(a[o-1]);break;case 56:case 89:case 91:case 104:this.$=a[o-1]+""+a[o];break;case 59:this.$=a[o-2]+"-"+a[o];break;case 60:a[o-1].text=a[o],this.$=a[o-1];break;case 61:a[o-2].text=a[o-1],this.$=a[o-2];break;case 62:this.$=a[o];break;case 63:this.$={type:"arrow",stroke:"normal",text:a[o-1]};break;case 64:this.$={type:"arrow_circle",stroke:"normal",text:a[o-1]};break;case 65:this.$={type:"arrow_cross",stroke:"normal",text:a[o-1]};break;case 66:this.$={type:"arrow_open",stroke:"normal",text:a[o-1]};break;case 67:this.$={type:"arrow",stroke:"dotted",text:a[o-1]};break;case 68:this.$={type:"arrow_circle",stroke:"dotted",text:a[o-1]};break;case 69:this.$={type:"arrow_cross",stroke:"dotted",text:a[o-1]};break;case 70:this.$={type:"arrow_open",stroke:"dotted",text:a[o-1]};break;case 71:this.$={type:"arrow",stroke:"thick",text:a[o-1]};break;case 72:this.$={type:"arrow_circle",stroke:"thick",text:a[o-1]};break;case 73:this.$={type:"arrow_cross",stroke:"thick",text:a[o-1]};break;case 74:this.$={type:"arrow_open",stroke:"thick",text:a[o-1]};break;case 75:this.$={type:"arrow",stroke:"normal"};break;case 76:this.$={type:"arrow_circle",stroke:"normal"};break;case 77:this.$={type:"arrow_cross",stroke:"normal"};break;case 78:this.$={type:"arrow_open",stroke:"normal"};break;case 79:this.$={type:"arrow",stroke:"dotted"};break;case 80:this.$={type:"arrow_circle",stroke:"dotted"};break;case 81:this.$={type:"arrow_cross",stroke:"dotted"};break;case 82:this.$={type:"arrow_open",stroke:"dotted"};break;case 83:this.$={type:"arrow",stroke:"thick"};break;case 84:this.$={type:"arrow_circle",stroke:"thick"};break;case 85:this.$={type:"arrow_cross",stroke:"thick"};break;case 86:this.$={type:"arrow_open",stroke:"thick"};break;case 87:this.$=a[o-1];break;case 105:case 106:this.$=a[o-4],r.addClass(a[o-2],a[o]);break;case 107:this.$=a[o-4],r.setClass(a[o-2],a[o]);break;case 108:this.$=a[o-4],r.setClickEvent(a[o-2],a[o]);break;case 109:this.$=a[o-4],r.addVertex(a[o-2],void 0,void 0,a[o]);break;case 110:case 111:case 112:this.$=a[o-4],r.updateLink(a[o-2],a[o]);break;case 114:this.$=[a[o]];break;case 115:a[o-2].push(a[o]),this.$=a[o-2];break;case 117:this.$=a[o-1]+a[o]}},table:[{3:1,4:2,9:n,10:r,12:i},{1:[3]},e(a,o,{5:6}),{4:7,9:n,10:r,12:i},{4:8,9:n,10:r,12:i},{10:[1,9]},{1:[2,1],6:10,7:11,8:u,9:s,10:c,11:l,13:h,23:16,25:17,26:18,27:19,28:20,29:21,30:f,33:23,35:29,42:30,43:32,67:d,68:p,69:g,70:y,71:m,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(a,[2,9]),e(a,[2,10]),{13:[1,42],15:[1,43],16:[1,44],17:[1,45],18:[1,46]},e(M,[2,3]),e(M,[2,4]),e(M,[2,5]),e(M,[2,6]),e(M,[2,7]),e(M,[2,8]),{8:S,9:C,11:T,24:47},{8:S,9:C,11:T,24:51},{8:S,9:C,11:T,24:52},{8:S,9:C,11:T,24:53},{8:S,9:C,11:T,24:54},{8:S,9:C,11:T,24:55},{8:S,9:C,10:F,11:T,12:L,13:B,15:N,16:O,17:I,18:q,24:57,30:R,31:56,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(X,[2,42],{34:81,45:82,47:[1,83],48:[1,86],49:[1,87],50:[1,88],51:[1,89],52:[1,84],53:[1,90],54:[1,91],55:[1,92],56:[1,93],57:[1,85],58:[1,94],59:[1,95],60:[1,96],61:[1,97]}),{10:[1,98]},{10:[1,99]},{10:[1,100]},{10:[1,101]},{10:[1,102]},e(K,[2,53],{43:32,21:107,42:108,10:J,13:h,15:[1,106],36:[1,103],38:[1,104],40:[1,105],77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D}),e(Q,[2,55]),e(Q,[2,57]),e(Q,[2,58],{44:[1,110]}),e(te,[2,142]),e(te,[2,143]),e(te,[2,144]),e(te,[2,145]),e(te,[2,146]),e(te,[2,147]),e(te,[2,148]),e(te,[2,149]),e(te,[2,150]),{8:ee,9:ne,10:J,14:111,21:114},{8:ee,9:ne,10:J,14:115,21:114},{8:ee,9:ne,10:J,14:116,21:114},{8:ee,9:ne,10:J,14:117,21:114},{8:ee,9:ne,10:J,14:118,21:114},e(M,[2,30]),e(M,[2,38]),e(M,[2,39]),e(M,[2,40]),e(M,[2,31]),e(M,[2,32]),e(M,[2,33]),e(M,[2,34]),e(M,[2,35]),{8:S,9:C,10:F,11:T,12:L,13:B,15:N,16:O,17:I,18:q,24:119,30:R,32:P,43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(re,o,{5:121}),e(ie,[2,88]),e(ie,[2,131]),e(ie,[2,132]),e(ie,[2,133]),e(ie,[2,134]),e(ie,[2,135]),e(ie,[2,136]),e(ie,[2,137]),e(ie,[2,138]),e(ie,[2,139]),e(ie,[2,140]),e(ie,[2,141]),e(ie,[2,92]),e(ie,[2,93]),e(ie,[2,94]),e(ie,[2,95]),e(ie,[2,96]),e(ie,[2,97]),e(ie,[2,98]),e(ie,[2,99]),e(ie,[2,100]),e(ie,[2,101]),e(ie,[2,102]),{13:h,33:122,35:29,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(ae,[2,62],{46:123,62:[1,124]}),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:125,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:126,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:127,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(oe,[2,75]),e(oe,[2,76]),e(oe,[2,77]),e(oe,[2,78]),e(oe,[2,79]),e(oe,[2,80]),e(oe,[2,81]),e(oe,[2,82]),e(oe,[2,83]),e(oe,[2,84]),e(oe,[2,85]),e(oe,[2,86]),{13:h,35:128,42:30,43:32,76:[1,129],77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{74:[1,130],77:[1,131]},{13:h,35:133,42:30,43:32,74:[1,132],77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{13:h,35:134,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{13:h,35:135,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:136,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:138,32:P,38:[1,137],43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:139,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:140,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(K,[2,54]),e(Q,[2,56]),e(K,[2,29],{21:141,10:J}),{43:142,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(a,[2,11]),e(a,[2,21]),e(a,[2,22]),{9:[1,143]},e(a,[2,12]),e(a,[2,13]),e(a,[2,14]),e(a,[2,15]),e(re,o,{5:144}),e(ie,[2,89]),{6:10,7:11,8:u,9:s,10:c,11:l,13:h,23:16,25:17,26:18,27:19,28:20,29:21,30:f,32:[1,145],33:23,35:29,42:30,43:32,67:d,68:p,69:g,70:y,71:m,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(X,[2,41]),e(ae,[2,60],{10:[1,146]}),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:147,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,48:[1,148],49:[1,149],50:[1,150],51:[1,151],57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,53:[1,152],54:[1,153],55:[1,154],56:[1,155],57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,57:j,58:[1,156],59:[1,157],60:[1,158],61:[1,159],63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:[1,160],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:[1,161]},{10:[1,162]},{10:[1,163]},{10:[1,164]},{10:[1,165],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:[1,166],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:[1,167],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,37:[1,168],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:169,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,39:[1,170],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,41:[1,171],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,37:[1,172],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(K,[2,28]),e(Q,[2,59]),e(a,[2,23]),{6:10,7:11,8:u,9:s,10:c,11:l,13:h,23:16,25:17,26:18,27:19,28:20,29:21,30:f,32:[1,173],33:23,35:29,42:30,43:32,67:d,68:p,69:g,70:y,71:m,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{8:S,9:C,11:T,24:174},e(ae,[2,61]),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,57:j,62:[1,175],63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(ae,[2,63]),e(ae,[2,64]),e(ae,[2,65]),e(ae,[2,66]),e(ae,[2,67]),e(ae,[2,68]),e(ae,[2,69]),e(ae,[2,70]),e(ae,[2,71]),e(ae,[2,72]),e(ae,[2,73]),e(ae,[2,74]),{10:ue,44:se,67:ce,75:176,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:190,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:191,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:192,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:193,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:194,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{13:h,35:195,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{13:h,35:196,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(K,[2,43],{21:197,10:J}),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,39:[1,198],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(K,[2,47],{21:199,10:J}),e(K,[2,49],{21:200,10:J}),e(K,[2,51],{21:201,10:J}),{8:S,9:C,11:T,24:202},e(M,[2,37]),e([10,13,77,81,83,84,86,87,89,90,91],[2,87]),e(X,[2,109],{81:ve}),e(be,[2,114],{82:204,10:ue,44:se,67:ce,76:le,77:he,79:fe,83:de,84:pe,85:ge,86:ye,87:me}),e(_e,[2,116]),e(_e,[2,118]),e(_e,[2,119]),e(_e,[2,120]),e(_e,[2,121]),e(_e,[2,122]),e(_e,[2,123]),e(_e,[2,124]),e(_e,[2,125]),e(_e,[2,126]),e(_e,[2,127]),e(_e,[2,128]),e(X,[2,110],{81:ve}),e(X,[2,111],{81:ve}),e(X,[2,112],{81:ve}),e(X,[2,105],{81:ve}),e(X,[2,106],{81:ve}),e(X,[2,107],{43:32,42:108,13:h,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D}),e(X,[2,108],{43:32,42:108,13:h,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D}),e(K,[2,44]),{39:[1,205]},e(K,[2,48]),e(K,[2,50]),e(K,[2,52]),e(M,[2,36]),{10:ue,44:se,67:ce,76:le,77:he,79:fe,80:206,82:178,83:de,84:pe,85:ge,86:ye,87:me},e(_e,[2,117]),e(K,[2,45],{21:207,10:J}),e(be,[2,115],{82:204,10:ue,44:se,67:ce,76:le,77:he,79:fe,83:de,84:pe,85:ge,86:ye,87:me}),e(K,[2,46])],defaultActions:{},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,k,A,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(A in o[x])this.terminals_[A]&&A>h&&M.push("'"+this.terminals_[A]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),k=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof k)return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},we=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!1):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:break; case 1:return 67;case 2:return 74;case 3:return 68;case 4:return 69;case 5:return 70;case 6:return 71;case 7:return 12;case 8:return 30;case 9:return 32;case 10:return 13;case 11:return 13;case 12:return 13;case 13:return 13;case 14:return 13;case 15:return 13;case 16:return 77;case 17:return 86;case 18:return 84;case 19:return 8;case 20:return 81;case 21:return 91;case 22:return 16;case 23:return 15;case 24:return 17;case 25:return 18;case 26:return 50;case 27:return 48;case 28:return 49;case 29:return 51;case 30:return 55;case 31:return 53;case 32:return 54;case 33:return 56;case 34:return 55;case 35:return 53;case 36:return 54;case 37:return 56;case 38:return 60;case 39:return 58;case 40:return 59;case 41:return 61;case 42:return 47;case 43:return 52;case 44:return 57;case 45:return 44;case 46:return 87;case 47:return 89;case 48:return 79;case 49:return 90;case 50:return 90;case 51:return 83;case 52:return 62;case 53:return 38;case 54:return 39;case 55:return 36;case 56:return 37;case 57:return 40;case 58:return 41;case 59:return 94;case 60:return 9;case 61:return 10;case 62:return 11}},rules:[/^(?:%%[^\n]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:click\b)/,/^(?:graph\b)/,/^(?:subgraph\b)/,/^(?:end\b)/,/^(?:LR\b)/,/^(?:RL\b)/,/^(?:TB\b)/,/^(?:BT\b)/,/^(?:TD\b)/,/^(?:BR\b)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:v\b)/,/^(?:\s*--[x]\s*)/,/^(?:\s*-->\s*)/,/^(?:\s*--[o]\s*)/,/^(?:\s*---\s*)/,/^(?:\s*-\.-[x]\s*)/,/^(?:\s*-\.->\s*)/,/^(?:\s*-\.-[o]\s*)/,/^(?:\s*-\.-\s*)/,/^(?:\s*.-[x]\s*)/,/^(?:\s*\.->\s*)/,/^(?:\s*\.-[o]\s*)/,/^(?:\s*\.-\s*)/,/^(?:\s*==[x]\s*)/,/^(?:\s*==>\s*)/,/^(?:\s*==[o]\s*)/,/^(?:\s*==[\=]\s*)/,/^(?:\s*--\s*)/,/^(?:\s*-\.\s*)/,/^(?:\s*==\s*)/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:[\u0021-\u0027\u002A-\u002E\u003F\u0041-\u005A\u005C\u005F-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC_\/])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:\n+)/,/^(?:\s)/,/^(?:$)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62],inclusive:!0}}};return t}();return xe.lexer=we,t.prototype=xe,xe.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],94:[function(t,e){e.exports=t(88)},{d3:1}],95:[function(t,e,n){var r=t("moment"),i="",a="",o=[],u=[],s="";n.clear=function(){o=[],u=[],s="",a="",f=0,c=void 0},n.setDateFormat=function(t){i=t},n.getDateFormat=function(){return i},n.setTitle=function(t){a=t},n.getTitle=function(){return a},n.addSection=function(t){s=t,o.push(t)},n.findTaskById=function(t){var e;for(e=0;en-e?n+i+1.5*o.sidePadding>u?e+r-5:n+r+5:(n-e)/2+e+r}).attr("y",function(t,r){return r*e+o.barHeight/2+(o.fontSize/2-2)+n}).attr("text-height",i).attr("class",function(t){for(var e=w(t.startTime),n=w(t.endTime),r=this.getBBox().width,i=0,a=0;an-e?n+r+1.5*o.sidePadding>u?"taskTextOutsideLeft taskTextOutside"+i+" "+s:"taskTextOutsideRight taskTextOutside"+i+" "+s:"taskText taskText"+i+" "+s})}}function l(t,e,n,a){var u,s=[[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["h1 %I:%M",function(t){return t.getMinutes()}]],c=[["%Y",function(){return!0}]],l=[["%I:%M",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}]];"undefined"!=typeof o.axisFormatter&&(l=[],o.axisFormatter.forEach(function(t){var e=[];e[0]=t[0],e[1]=t[1],l.push(e)})),u=s.concat(l).concat(c);var h=i.svg.axis().scale(w).orient("bottom").tickSize(-a+e+o.gridLineStartPadding,0,0).tickFormat(i.time.format.multi(u));r>7&&230>r&&(h=h.ticks(i.time.monday.range));b.append("g").attr("class","grid").attr("transform","translate("+t+", "+(a-50)+")").call(h).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em")}function h(t,e){for(var n=[],r=0,i=0;i0))return i[1]*t/2+e;for(var o=0;a>o;o++)return r+=n[a-1][1],i[1]*t/2+r*t+e}).attr("class",function(t){for(var e=0;er;++r)e.hasOwnProperty(t[r])||(e[t[r]]=!0,n.push(t[r]));return n}function p(t){for(var e=t.length,n={};e;)n[t[--e]]=(n[t[e]]||0)+1;return n}function g(t,e){return p(e)[t]||0}n.yy.clear(),n.parse(t);var y=document.getElementById(e);u=y.offsetWidth,"undefined"==typeof u&&(u=800);var m=n.yy.getTasks(),v=m.length*(o.barHeight+o.barGap)+2*o.topPadding;y.style.height=v+"px";var b=i.select("#"+e),_=(i.time.format("%Y-%m-%d"),i.min(m,function(t){return t.startTime})),x=i.max(m,function(t){return t.endTime}),w=i.time.scale().domain([i.min(m,function(t){return t.startTime}),i.max(m,function(t){return t.endTime})]).rangeRound([0,u-150]),k=[];r=a.duration(x-_).asDays();for(var A=0;Ah&&M.push("'"+this.terminals_[A]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),k=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof k)return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},s=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!1):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 10;case 1:break;case 2:break;case 3:break;case 4:return 4;case 5:return 11;case 6:return"date";case 7:return 12;case 8:return 13;case 9:return 14;case 10:return 15;case 11:return":";case 12:return 6;case 13:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};return t}();return u.lexer=s,t.prototype=u,u.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],98:[function(t,e){e.exports=t(88)},{d3:1}],99:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[6,8,10,11,15,17,19,20,22,33],r=[2,2],i=[1,6],a=[1,8],o=[1,9],u=[1,12],s=[1,13],c=[1,14],l=[1,15],h=[1,17],f=[1,18],d=[2,7],p=[6,8,10,11,15,17,18,19,20,21,22,33],g=[6,8,10,11,15,17,18,19,20,22,33],y=[1,46],m=[1,49],v=[1,53],b={trace:function(){},yy:{},symbols_:{error:2,start:3,SD:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,participant:11,actor:12,signal:13,note_statement:14,title:15,text:16,loop:17,end:18,opt:19,alt:20,"else":21,note:22,placement:23,text2:24,over:25,spaceList:26,actor_pair:27,",":28,left_of:29,right_of:30,signaltype:31,actors:32,ACTOR:33,SOLID_OPEN_ARROW:34,DOTTED_OPEN_ARROW:35,SOLID_ARROW:36,DOTTED_ARROW:37,SOLID_CROSS:38,DOTTED_CROSS:39,TXT:40,$accept:0,$end:1},terminals_:{2:"error",4:"SD",6:"EOF",8:"SPACE",10:"NL",11:"participant",15:"title",16:"text",17:"loop",18:"end",19:"opt",20:"alt",21:"else",22:"note",25:"over",28:",",29:"left_of",30:"right_of",33:"ACTOR",34:"SOLID_OPEN_ARROW",35:"DOTTED_OPEN_ARROW",36:"SOLID_ARROW",37:"DOTTED_ARROW",38:"SOLID_CROSS",39:"DOTTED_CROSS",40:"TXT"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,3],[9,2],[9,2],[9,4],[9,4],[9,4],[9,7],[14,4],[14,5],[26,2],[26,1],[27,1],[27,3],[23,1],[23,1],[13,4],[32,2],[32,1],[12,1],[31,1],[31,1],[31,1],[31,1],[31,1],[31,1],[24,1]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 1:return r.apply(a[o-1]),a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:this.$=a[o-1];break;case 12:a[o-1].unshift({type:"loopStart",loopText:a[o-2].actor,signalType:r.LINETYPE.LOOP_START}),a[o-1].push({type:"loopEnd",loopText:a[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[o-1];break;case 13:a[o-1].unshift({type:"optStart",optText:a[o-2].actor,signalType:r.LINETYPE.OPT_START}),a[o-1].push({type:"optEnd",optText:a[o-2].actor,signalType:r.LINETYPE.OPT_END}),this.$=a[o-1];break;case 14:a[o-4].unshift({type:"altStart",altText:a[o-5].actor,signalType:r.LINETYPE.ALT_START}),a[o-4].push({type:"else",altText:a[o-2].actor,signalType:r.LINETYPE.ALT_ELSE}),a[o-4]=a[o-4].concat(a[o-1]),a[o-4].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=a[o-4];break;case 15:this.$=[a[o-1],{type:"addNote",placement:a[o-2],actor:a[o-1].actor,text:a[o]}];break;case 19:this.$=a[o];break;case 20:this.$=[a[o-2],a[o]];break;case 21:this.$=r.PLACEMENT.LEFTOF;break;case 22:this.$=r.PLACEMENT.RIGHTOF;break;case 23:this.$=[a[o-3],a[o-1],{type:"addMessage",from:a[o-3].actor,to:a[o-1].actor,signalType:a[o-2],msg:a[o]}];break;case 26:this.$={type:"addActor",actor:a[o]};break;case 27:this.$=r.LINETYPE.SOLID_OPEN;break;case 28:this.$=r.LINETYPE.DOTTED_OPEN;break;case 29:this.$=r.LINETYPE.SOLID;break;case 30:this.$=r.LINETYPE.DOTTED;break;case 31:this.$=r.LINETYPE.SOLID_CROSS;break;case 32:this.$=r.LINETYPE.DOTTED_CROSS;break;case 33:this.$=a[o].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:[1,2]},{1:[3]},e(n,r,{5:3}),{6:[1,4],7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,22:h,33:f},e(n,d,{1:[2,1]}),e(p,[2,3]),{9:19,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,22:h,33:f},e(p,[2,5]),e(p,[2,6]),{12:20,33:f},{10:[1,21]},{10:[1,22]},{8:[1,23]},{12:24,33:f},{12:25,33:f},{12:26,33:f},{31:27,34:[1,28],35:[1,29],36:[1,30],37:[1,31],38:[1,32],39:[1,33]},{23:34,25:[1,35],29:[1,36],30:[1,37]},e([6,8,10,11,15,17,18,19,20,21,22,28,33,34,35,36,37,38,39,40],[2,26]),e(p,[2,4]),{10:[1,38]},e(p,[2,9]),e(p,[2,10]),{16:[1,39]},e(g,r,{5:40}),e(g,r,{5:41}),e([6,8,10,11,15,17,19,20,21,22,33],r,{5:42}),{12:43,33:f},{33:[2,27]},{33:[2,28]},{33:[2,29]},{33:[2,30]},{33:[2,31]},{33:[2,32]},{12:44,33:f},{8:y,26:45},{33:[2,21]},{33:[2,22]},e(p,[2,8]),{10:[1,47]},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,48],19:c,20:l,22:h,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,50],19:c,20:l,22:h,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,21:[1,51],22:h,33:f},{24:52,40:v},{24:54,40:v},{12:56,27:55,33:f},{8:y,26:57,33:[2,18]},e(p,[2,11]),e(p,[2,12]),e(p,d),e(p,[2,13]),{12:58,33:f},{10:[2,23]},{10:[2,33]},{10:[2,15]},{12:59,33:f},{28:[1,60],33:[2,19]},{33:[2,17]},e(g,r,{5:61}),{10:[2,16]},{12:62,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,63],19:c,20:l,22:h,33:f},{33:[2,20]},e(p,[2,14])],defaultActions:{28:[2,27],29:[2,28],30:[2,29],31:[2,30],32:[2,31],33:[2,32],36:[2,21],37:[2,22],52:[2,23],53:[2,33],54:[2,15],57:[2,17],59:[2,16],62:[2,20]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,k,A,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(A in o[x])this.terminals_[A]&&A>h&&M.push("'"+this.terminals_[A]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),k=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof k)return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},_=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno}) -},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!1):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 10;case 1:return 38;case 2:return 39;case 3:return 36;case 4:return 37;case 5:break;case 6:break;case 7:break;case 8:return 11;case 9:return 19;case 10:return 17;case 11:return 20;case 12:return 21;case 13:return 18;case 14:return 29;case 15:return 30;case 16:return 25;case 17:return 22;case 18:return 15;case 19:return 4;case 20:return 28;case 21:return 10;case 22:return 33;case 23:return 34;case 24:return 35;case 25:return 36;case 26:return 37;case 27:return 40;case 28:return 6;case 29:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:[\-][x])/i,/^(?:[\-][\-][x])/i,/^(?:[\-][>][>])/i,/^(?:[\-][\-][>][>])/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:participant\b)/i,/^(?:opt\b)/i,/^(?:loop\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:title\b)/i,/^(?:sequenceDiagram\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\->:\n,;]+)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?::[^#\n;]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29],inclusive:!0}}};return t}();return b.lexer=_,t.prototype=b,b.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],100:[function(t,e,n){var r={},i=[],a=[],o=[];n.addActor=function(t,e,n){r[t]={name:e,description:n},i.push(t)},n.addMessage=function(t,e,n,r){a.push({from:t,to:e,message:n,answer:r})},n.addSignal=function(t,e,n,r){a.push({from:t,to:e,message:n,type:r})},n.getMessages=function(){return a},n.getActors=function(){return r},n.getActor=function(t){return r[t]},n.getActorKeys=function(){return Object.keys(r)},n.clear=function(){r={},a=[]},n.LINETYPE={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16},n.ARROWTYPE={FILLED:0,OPEN:1},n.PLACEMENT={LEFTOF:0,RIGHTOF:1,OVER:2},n.addNote=function(t,e,r){var i={actor:t,placement:e,message:r};o.push(i),a.push({from:t,to:t,message:r,type:n.LINETYPE.NOTE,placement:e})},n.parseError=function(t,e){mermaid.parseError(t,e)},n.apply=function(t){if(t instanceof Array)t.forEach(function(t){n.apply(t)});else switch(t.type){case"addActor":n.addActor(t.actor,t.actor,t.actor);break;case"addNote":n.addNote(t.actor,t.placement,t.text);break;case"addMessage":n.addSignal(t.from,t.to,t.msg,t.signalType);break;case"loopStart":n.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":n.addSignal(void 0,void 0,void 0,t.signalType);break;case"optStart":n.addSignal(void 0,void 0,t.optText,t.signalType);break;case"optEnd":n.addSignal(void 0,void 0,void 0,t.signalType);break;case"altStart":n.addSignal(void 0,void 0,t.altText,t.signalType);break;case"else":n.addSignal(void 0,void 0,t.altText,t.signalType);break;case"altEnd":n.addSignal(void 0,void 0,void 0,t.signalType)}}},{}],101:[function(t,e,n){var r=t("./parser/sequenceDiagram").parser;r.yy=t("./sequenceDb");var i=t("./svgDraw"),a=t("./d3"),o={diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!1,bottomMarginAdj:1};n.bounds={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,list:[],init:function(){this.list=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,n,r){t[e]="undefined"==typeof t[e]?n:r(n,t[e])},updateLoops:function(t,e,r,i){var a=this,u=0;this.list.forEach(function(s){u++;var c=a.list.length-u+1;a.updateVal(s,"startx",t-c*o.boxMargin,Math.min),a.updateVal(s,"starty",e-c*o.boxMargin,Math.min),a.updateVal(s,"stopx",r+c*o.boxMargin,Math.max),a.updateVal(s,"stopy",i+c*o.boxMargin,Math.max),a.updateVal(n.bounds.data,"startx",t-c*o.boxMargin,Math.min),a.updateVal(n.bounds.data,"starty",e-c*o.boxMargin,Math.min),a.updateVal(n.bounds.data,"stopx",r+c*o.boxMargin,Math.max),a.updateVal(n.bounds.data,"stopy",i+c*o.boxMargin,Math.max)})},insert:function(t,e,r,i){var a,o,u,s;a=Math.min(t,r),u=Math.max(t,r),o=Math.min(e,i),s=Math.max(e,i),this.updateVal(n.bounds.data,"startx",a,Math.min),this.updateVal(n.bounds.data,"starty",o,Math.min),this.updateVal(n.bounds.data,"stopx",u,Math.max),this.updateVal(n.bounds.data,"stopy",s,Math.max),this.updateLoops(a,o,u,s)},newLoop:function(t){this.list.push({startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t})},endLoop:function(){var t=this.list.pop();return t},addElseToLoop:function(t){var e=this.list.pop();e.elsey=n.bounds.getVerticalPos(),e.elseText=t,this.list.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}};var u=function(t,e,r,a){var u=i.getNoteRect();u.x=e,u.y=r,u.width=o.width,u.class="note";var s=t.append("g"),c=i.drawRect(s,u),l=i.getTextObj();l.x=e,l.y=r+o.noteMargin,l.textMargin=o.noteMargin,l.dy="1em",l.text=a.message,l.class="noteText";var h=i.drawText(s,l),f=h[0][0].getBBox().height;n.bounds.insert(e,r,e+o.width,r+2*o.noteMargin+f),c.attr("height",f+2*o.noteMargin),n.bounds.bumpVerticalPos(f+2*o.noteMargin)},s=function(t,e,i,a,o){var u,s=t.append("g"),c=e+(i-e)/2,l=s.append("text").attr("x",c).attr("y",a-7).style("text-anchor","middle").attr("class","messageText").text(o.message),h=l[0][0].getBBox().width;if(e===i){u=s.append("path").attr("d","M "+e+","+a+" C "+(e+60)+","+(a-10)+" "+(e+60)+","+(a+30)+" "+e+","+(a+20)),n.bounds.bumpVerticalPos(30);var f=Math.max(h/2,100);n.bounds.insert(e-f,n.bounds.getVerticalPos()-10,i+f,n.bounds.getVerticalPos())}else u=s.append("line"),u.attr("x1",e),u.attr("y1",a),u.attr("x2",i),u.attr("y2",a),n.bounds.insert(e,n.bounds.getVerticalPos()-10,i,n.bounds.getVerticalPos());o.type===r.yy.LINETYPE.DOTTED||o.type===r.yy.LINETYPE.DOTTED_CROSS||o.type===r.yy.LINETYPE.DOTTED_OPEN?(u.style("stroke-dasharray","3, 3"),u.attr("class","messageLine1")):u.attr("class","messageLine0"),u.attr("stroke-width",2),u.attr("stroke","black"),u.style("fill","none"),(o.type===r.yy.LINETYPE.SOLID||o.type===r.yy.LINETYPE.DOTTED)&&u.attr("marker-end","url(#arrowhead)"),(o.type===r.yy.LINETYPE.SOLID_CROSS||o.type===r.yy.LINETYPE.DOTTED_CROSS)&&u.attr("marker-end","url(#crosshead)")};e.exports.drawActors=function(t,e,r,a){var u;for(u=0;u/gi).forEach(function(t){var r=n.append("tspan");r.attr("x",e.x+e.textMargin),r.attr("dy",e.dy),r.text(t)}),"undefined"!=typeof e.class&&n.attr("class",e.class),n},n.drawLabel=function(t,e){var r=n.getNoteRect();r.x=e.x,r.y=e.y,r.width=50,r.height=20,r.fill="#526e52",r.stroke="none",r.class="labelBox",n.drawRect(t,r),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,e.fill="white",n.drawText(t,e)},n.drawActor=function(t,e,r,i,a){var o=e+a.width/2,u=t.append("g");0===r&&u.append("line").attr("x1",o).attr("y1",5).attr("x2",o).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999");var s=n.getNoteRect();s.x=e,s.y=r,s.fill="#eaeaea",s.width=a.width,s.height=a.height,s.class="actor",s.rx=3,s.ry=3,n.drawRect(u,s),u.append("text").attr("x",o).attr("y",r+a.height/2+5).attr("class","actor").style("text-anchor","middle").text(i)},n.drawLoop=function(t,e,r,i){var a=t.append("g"),o=function(t,e,n,r){a.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",r).attr("stroke-width",2).attr("stroke","#526e52").attr("class","loopLine")};o(e.startx,e.starty,e.stopx,e.starty),o(e.stopx,e.starty,e.stopx,e.stopy),o(e.startx,e.stopy,e.stopx,e.stopy),o(e.startx,e.starty,e.startx,e.stopy),"undefined"!=typeof e.elsey&&o(e.startx,e.elsey,e.stopx,e.elsey);var u=n.getTextObj();u.text=r,u.x=e.startx,u.y=e.starty,u.labelMargin=1.5*i.boxMargin,u.class="labelText",u.fill="white",n.drawLabel(a,u),u=n.getTextObj(),u.text="[ "+e.title+" ]",u.x=e.startx+(e.stopx-e.startx)/2,u.y=e.starty+1.5*i.boxMargin,u.anchor="middle",u.class="loopText",n.drawText(a,u),"undefined"!=typeof e.elseText&&(u.text="[ "+e.elseText+" ]",u.y=e.elsey+1.5*i.boxMargin,n.drawText(a,u))},n.insertArrowHead=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},n.insertArrowCrossHead=function(t){var e=t.append("defs"),n=e.append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);n.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),n.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},n.getTextObj=function(){var t={x:0,y:0,fill:"black","text-anchor":"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0};return t},n.getNoteRect=function(){var t={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0};return t}},{}],103:[function(t,e,n){(function(e){var r=t("./diagrams/flowchart/graphDb"),i=t("./diagrams/flowchart/parser/flow"),a=t("./utils"),o=t("./diagrams/flowchart/flowRenderer"),u=t("./diagrams/sequenceDiagram/sequenceRenderer"),s=t("./diagrams/example/exampleRenderer"),c=t("he"),l=t("./diagrams/example/parser/example"),h=t("./diagrams/flowchart/parser/flow"),f=t("./diagrams/flowchart/parser/dot"),d=t("./diagrams/sequenceDiagram/parser/sequenceDiagram"),p=t("./diagrams/sequenceDiagram/sequenceDb"),g=t("./diagrams/example/exampleDb"),y=t("./diagrams/gantt/ganttRenderer"),m=t("./diagrams/gantt/parser/gantt"),v=t("./diagrams/gantt/ganttDb"),b=0,_=function(t){var e,n=a.detectType(t);switch(n){case"graph":e=h,e.parser.yy=r;break;case"dotGraph":e=f,e.parser.yy=r;break;case"sequenceDiagram":e=d,e.parser.yy=p;break;case"info":e=l,e.parser.yy=g;break;case"gantt":e=m,e.parser.yy=v}try{return e.parse(t),!0}catch(i){return!1}},x=function(t,e){e=null==e?document.querySelectorAll(".mermaid"):"string"==typeof e?document.querySelectorAll(e):e instanceof Node?[e]:e;var i;for("undefined"!==t&&"undefined"!=typeof t&&u.setConf("object"==typeof t?t:JSON.parse(t)),i=0;i/g,">"),h=h.replace(/';var f=a.detectType(h),d={};switch(f){case"graph":d=o.getClasses(h,!1),"object"==typeof mermaid.flowchartConfig&&o.setConf(mermaid.flowchartConfig),o.draw(h,id,!1),a.cloneCssStyles(l.firstChild,d),r.bindFunctions();break;case"dotGraph":d=o.getClasses(h,!0),o.draw(h,id,!0),a.cloneCssStyles(l.firstChild,d);break;case"sequenceDiagram":u.draw(h,id),a.cloneCssStyles(l.firstChild,[]);break;case"gantt":"object"==typeof mermaid.ganttConfig&&y.setConf(mermaid.ganttConfig),y.draw(h,id),a.cloneCssStyles(l.firstChild,[]);break;case"info":s.draw(h,id,n.version()),a.cloneCssStyles(l.firstChild,[])}}}};n.tester=function(){},n.version=function(){return t("../package.json").version};var w=function(t,e){return"undefined"==typeof e?!1:t===e};e.mermaid={startOnLoad:!0,htmlLabels:!0,init:function(){x.apply(null,arguments)},version:function(){return n.version()},getParser:function(){return i.parser},parse:function(t){return _(t)},parseError:function(t){console.log("Mermaid Syntax error:"),console.log(t)}},n.contentLoaded=function(){"undefined"!=typeof mermaid_config&&w(!1,mermaid_config.htmlLabels)&&(e.mermaid.htmlLabels=!1),e.mermaid.startOnLoad&&("undefined"!=typeof mermaid_config?w(!0,mermaid_config.startOnLoad)&&e.mermaid.init(mermaid.sequenceConfig):e.mermaid.init(mermaid.sequenceConfig))},"undefined"!=typeof document&&document.addEventListener("DOMContentLoaded",function(){n.contentLoaded()},!1)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../package.json":84,"./diagrams/example/exampleDb":85,"./diagrams/example/exampleRenderer":86,"./diagrams/example/parser/example":87,"./diagrams/flowchart/flowRenderer":90,"./diagrams/flowchart/graphDb":91,"./diagrams/flowchart/parser/dot":92,"./diagrams/flowchart/parser/flow":93,"./diagrams/gantt/ganttDb":95,"./diagrams/gantt/ganttRenderer":96,"./diagrams/gantt/parser/gantt":97,"./diagrams/sequenceDiagram/parser/sequenceDiagram":99,"./diagrams/sequenceDiagram/sequenceDb":100,"./diagrams/sequenceDiagram/sequenceRenderer":101,"./utils":104,he:81}],104:[function(t,e){e.exports.detectType=function(t){return t.match(/^\s*sequenceDiagram/)?"sequenceDiagram":t.match(/^\s*sequence/)?"sequence":t.match(/^\s*digraph/)?"dotGraph":t.match(/^\s*info/)?"info":t.match(/^\s*gantt/)?"gantt":"graph"},e.exports.cloneCssStyles=function(t,e){for(var n="",r=document.styleSheets,i=0;i0&&(n+=u.selectorText+" { "+u.style.cssText+" }\n")}}}catch(c){"undefined"!=typeof console&&"undefined"!==console.warn&&console.warn('Invalid CSS selector "'+u.selectorText+'"',c)}var l="",h="";for(var f in e)e.hasOwnProperty(f)&&"undefined"!=typeof f&&("default"===f?(e.default.styles instanceof Array&&(l+="#"+t.id.trim()+" .node { "+e[f].styles.join("; ")+"; }\n"),e.default.nodeLabelStyles instanceof Array&&(l+="#"+t.id.trim()+" .node text { "+e[f].nodeLabelStyles.join("; ")+"; }\n"),e.default.edgeLabelStyles instanceof Array&&(l+="#"+t.id.trim()+" .edgeLabel text { "+e[f].edgeLabelStyles.join("; ")+"; }\n")):e[f].styles instanceof Array&&(h+="#"+t.id.trim()+" ."+f+" { "+e[f].styles.join("; ")+"; }\n"));if(""!==n||""!==l||""!==h){var d=document.createElement("style");d.setAttribute("type","text/css"),d.setAttribute("title","mermaid-svg-internal-css"),d.innerHTML="/* */\n",t.insertBefore(d,t.firstChild)}}},{}]},{},[103])}(); \ No newline at end of file +},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!1):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 10;case 1:return 38;case 2:return 39;case 3:return 36;case 4:return 37;case 5:break;case 6:break;case 7:break;case 8:return 11;case 9:return 19;case 10:return 17;case 11:return 20;case 12:return 21;case 13:return 18;case 14:return 29;case 15:return 30;case 16:return 25;case 17:return 22;case 18:return 15;case 19:return 4;case 20:return 28;case 21:return 10;case 22:return 33;case 23:return 34;case 24:return 35;case 25:return 36;case 26:return 37;case 27:return 40;case 28:return 6;case 29:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:[\-][x])/i,/^(?:[\-][\-][x])/i,/^(?:[\-][>][>])/i,/^(?:[\-][\-][>][>])/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:participant\b)/i,/^(?:opt\b)/i,/^(?:loop\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:title\b)/i,/^(?:sequenceDiagram\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\->:\n,;]+)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?::[^#\n;]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29],inclusive:!0}}};return t}();return b.lexer=_,t.prototype=b,b.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],100:[function(t,e,n){var r={},i=[],a=[],o=[];n.addActor=function(t,e,n){r[t]={name:e,description:n},i.push(t)},n.addMessage=function(t,e,n,r){a.push({from:t,to:e,message:n,answer:r})},n.addSignal=function(t,e,n,r){a.push({from:t,to:e,message:n,type:r})},n.getMessages=function(){return a},n.getActors=function(){return r},n.getActor=function(t){return r[t]},n.getActorKeys=function(){return Object.keys(r)},n.clear=function(){r={},a=[]},n.LINETYPE={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16},n.ARROWTYPE={FILLED:0,OPEN:1},n.PLACEMENT={LEFTOF:0,RIGHTOF:1,OVER:2},n.addNote=function(t,e,r){var i={actor:t,placement:e,message:r};o.push(i),a.push({from:t,to:t,message:r,type:n.LINETYPE.NOTE,placement:e})},n.parseError=function(t,e){mermaid.parseError(t,e)},n.apply=function(t){if(t instanceof Array)t.forEach(function(t){n.apply(t)});else switch(t.type){case"addActor":n.addActor(t.actor,t.actor,t.actor);break;case"addNote":n.addNote(t.actor,t.placement,t.text);break;case"addMessage":n.addSignal(t.from,t.to,t.msg,t.signalType);break;case"loopStart":n.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":n.addSignal(void 0,void 0,void 0,t.signalType);break;case"optStart":n.addSignal(void 0,void 0,t.optText,t.signalType);break;case"optEnd":n.addSignal(void 0,void 0,void 0,t.signalType);break;case"altStart":n.addSignal(void 0,void 0,t.altText,t.signalType);break;case"else":n.addSignal(void 0,void 0,t.altText,t.signalType);break;case"altEnd":n.addSignal(void 0,void 0,void 0,t.signalType)}}},{}],101:[function(t,e,n){var r=t("./parser/sequenceDiagram").parser;r.yy=t("./sequenceDb");var i=t("./svgDraw"),a=t("./d3"),o={diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!1,bottomMarginAdj:1};n.bounds={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,list:[],init:function(){this.list=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,n,r){t[e]="undefined"==typeof t[e]?n:r(n,t[e])},updateLoops:function(t,e,r,i){var a=this,u=0;this.list.forEach(function(s){u++;var c=a.list.length-u+1;a.updateVal(s,"startx",t-c*o.boxMargin,Math.min),a.updateVal(s,"starty",e-c*o.boxMargin,Math.min),a.updateVal(s,"stopx",r+c*o.boxMargin,Math.max),a.updateVal(s,"stopy",i+c*o.boxMargin,Math.max),a.updateVal(n.bounds.data,"startx",t-c*o.boxMargin,Math.min),a.updateVal(n.bounds.data,"starty",e-c*o.boxMargin,Math.min),a.updateVal(n.bounds.data,"stopx",r+c*o.boxMargin,Math.max),a.updateVal(n.bounds.data,"stopy",i+c*o.boxMargin,Math.max)})},insert:function(t,e,r,i){var a,o,u,s;a=Math.min(t,r),u=Math.max(t,r),o=Math.min(e,i),s=Math.max(e,i),this.updateVal(n.bounds.data,"startx",a,Math.min),this.updateVal(n.bounds.data,"starty",o,Math.min),this.updateVal(n.bounds.data,"stopx",u,Math.max),this.updateVal(n.bounds.data,"stopy",s,Math.max),this.updateLoops(a,o,u,s)},newLoop:function(t){this.list.push({startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t})},endLoop:function(){var t=this.list.pop();return t},addElseToLoop:function(t){var e=this.list.pop();e.elsey=n.bounds.getVerticalPos(),e.elseText=t,this.list.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}};var u=function(t,e,r,a){var u=i.getNoteRect();u.x=e,u.y=r,u.width=o.width,u.class="note";var s=t.append("g"),c=i.drawRect(s,u),l=i.getTextObj();l.x=e,l.y=r+o.noteMargin,l.textMargin=o.noteMargin,l.dy="1em",l.text=a.message,l.class="noteText";var h=i.drawText(s,l),f=h[0][0].getBBox().height;n.bounds.insert(e,r,e+o.width,r+2*o.noteMargin+f),c.attr("height",f+2*o.noteMargin),n.bounds.bumpVerticalPos(f+2*o.noteMargin)},s=function(t,e,i,a,o){var u,s=t.append("g"),c=e+(i-e)/2,l=s.append("text").attr("x",c).attr("y",a-7).style("text-anchor","middle").attr("class","messageText").text(o.message),h=l[0][0].getBBox().width;if(e===i){u=s.append("path").attr("d","M "+e+","+a+" C "+(e+60)+","+(a-10)+" "+(e+60)+","+(a+30)+" "+e+","+(a+20)),n.bounds.bumpVerticalPos(30);var f=Math.max(h/2,100);n.bounds.insert(e-f,n.bounds.getVerticalPos()-10,i+f,n.bounds.getVerticalPos())}else u=s.append("line"),u.attr("x1",e),u.attr("y1",a),u.attr("x2",i),u.attr("y2",a),n.bounds.insert(e,n.bounds.getVerticalPos()-10,i,n.bounds.getVerticalPos());o.type===r.yy.LINETYPE.DOTTED||o.type===r.yy.LINETYPE.DOTTED_CROSS||o.type===r.yy.LINETYPE.DOTTED_OPEN?(u.style("stroke-dasharray","3, 3"),u.attr("class","messageLine1")):u.attr("class","messageLine0"),u.attr("stroke-width",2),u.attr("stroke","black"),u.style("fill","none"),(o.type===r.yy.LINETYPE.SOLID||o.type===r.yy.LINETYPE.DOTTED)&&u.attr("marker-end","url(#arrowhead)"),(o.type===r.yy.LINETYPE.SOLID_CROSS||o.type===r.yy.LINETYPE.DOTTED_CROSS)&&u.attr("marker-end","url(#crosshead)")};e.exports.drawActors=function(t,e,r,a){var u;for(u=0;u/gi).forEach(function(t){var r=n.append("tspan");r.attr("x",e.x+e.textMargin),r.attr("dy",e.dy),r.text(t)}),"undefined"!=typeof e.class&&n.attr("class",e.class),n},n.drawLabel=function(t,e){var r=n.getNoteRect();r.x=e.x,r.y=e.y,r.width=50,r.height=20,r.fill="#526e52",r.stroke="none",r.class="labelBox",n.drawRect(t,r),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,e.fill="white",n.drawText(t,e)},n.drawActor=function(t,e,r,i,a){var o=e+a.width/2,u=t.append("g");0===r&&u.append("line").attr("x1",o).attr("y1",5).attr("x2",o).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999");var s=n.getNoteRect();s.x=e,s.y=r,s.fill="#eaeaea",s.width=a.width,s.height=a.height,s.class="actor",s.rx=3,s.ry=3,n.drawRect(u,s),u.append("text").attr("x",o).attr("y",r+a.height/2+5).attr("class","actor").style("text-anchor","middle").text(i)},n.drawLoop=function(t,e,r,i){var a=t.append("g"),o=function(t,e,n,r){a.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",r).attr("stroke-width",2).attr("stroke","#526e52").attr("class","loopLine")};o(e.startx,e.starty,e.stopx,e.starty),o(e.stopx,e.starty,e.stopx,e.stopy),o(e.startx,e.stopy,e.stopx,e.stopy),o(e.startx,e.starty,e.startx,e.stopy),"undefined"!=typeof e.elsey&&o(e.startx,e.elsey,e.stopx,e.elsey);var u=n.getTextObj();u.text=r,u.x=e.startx,u.y=e.starty,u.labelMargin=1.5*i.boxMargin,u.class="labelText",u.fill="white",n.drawLabel(a,u),u=n.getTextObj(),u.text="[ "+e.title+" ]",u.x=e.startx+(e.stopx-e.startx)/2,u.y=e.starty+1.5*i.boxMargin,u.anchor="middle",u.class="loopText",n.drawText(a,u),"undefined"!=typeof e.elseText&&(u.text="[ "+e.elseText+" ]",u.y=e.elsey+1.5*i.boxMargin,n.drawText(a,u))},n.insertArrowHead=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},n.insertArrowCrossHead=function(t){var e=t.append("defs"),n=e.append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);n.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),n.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},n.getTextObj=function(){var t={x:0,y:0,fill:"black","text-anchor":"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0};return t},n.getNoteRect=function(){var t={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0};return t}},{}],103:[function(t,e,n){(function(e){var r=t("./diagrams/flowchart/graphDb"),i=t("./diagrams/flowchart/parser/flow"),a=t("./utils"),o=t("./diagrams/flowchart/flowRenderer"),u=t("./diagrams/sequenceDiagram/sequenceRenderer"),s=t("./diagrams/example/exampleRenderer"),c=t("he"),l=t("./diagrams/example/parser/example"),h=t("./diagrams/flowchart/parser/flow"),f=t("./diagrams/flowchart/parser/dot"),d=t("./diagrams/sequenceDiagram/parser/sequenceDiagram"),p=t("./diagrams/sequenceDiagram/sequenceDb"),g=t("./diagrams/example/exampleDb"),y=t("./diagrams/gantt/ganttRenderer"),m=t("./diagrams/gantt/parser/gantt"),v=t("./diagrams/gantt/ganttDb"),b=0,_=function(t){var e,n=a.detectType(t);switch(n){case"graph":e=h,e.parser.yy=r;break;case"dotGraph":e=f,e.parser.yy=r;break;case"sequenceDiagram":e=d,e.parser.yy=p;break;case"info":e=l,e.parser.yy=g;break;case"gantt":e=m,e.parser.yy=v}try{return e.parse(t),!0}catch(i){return!1}},x=function(){var t;2===arguments.length?("undefined"!=typeof arguments[0]&&(mermaid.sequenceConfig=arguments[0]),t=arguments[1]):t=arguments[0],t=void 0===t?document.querySelectorAll(".mermaid"):"string"==typeof t?document.querySelectorAll(t):t instanceof Node?[t]:t;var e;for(e=0;e/g,">"),h=h.replace(/';var f=a.detectType(h),d={};switch(f){case"graph":d=o.getClasses(h,!1),"object"==typeof mermaid.flowchartConfig&&o.setConf(mermaid.flowchartConfig),o.draw(h,l,!1),a.cloneCssStyles(i.firstChild,d),r.bindFunctions();break;case"dotGraph":d=o.getClasses(h,!0),o.draw(h,l,!0),a.cloneCssStyles(i.firstChild,d);break;case"sequenceDiagram":"object"==typeof mermaid.sequenceConfig&&u.setConf(mermaid.sequenceConfig),u.draw(h,l),a.cloneCssStyles(i.firstChild,[]);break;case"gantt":"object"==typeof mermaid.ganttConfig&&y.setConf(mermaid.ganttConfig),y.draw(h,l),a.cloneCssStyles(i.firstChild,[]);break;case"info":s.draw(h,l,n.version()),a.cloneCssStyles(i.firstChild,[])}}}};n.tester=function(){},n.version=function(){return t("../package.json").version};var w=function(t,e){return"undefined"==typeof e?!1:t===e};e.mermaid={startOnLoad:!0,htmlLabels:!0,init:function(){x.apply(null,arguments)},version:function(){return n.version()},getParser:function(){return i.parser},parse:function(t){return _(t)},parseError:function(t){console.log("Mermaid Syntax error:"),console.log(t)}},n.contentLoaded=function(){"undefined"!=typeof mermaid_config&&w(!1,mermaid_config.htmlLabels)&&(e.mermaid.htmlLabels=!1),e.mermaid.startOnLoad&&("undefined"!=typeof mermaid_config?w(!0,mermaid_config.startOnLoad)&&e.mermaid.init(mermaid.sequenceConfig):e.mermaid.init(mermaid.sequenceConfig))},"undefined"!=typeof document&&document.addEventListener("DOMContentLoaded",function(){n.contentLoaded()},!1)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../package.json":84,"./diagrams/example/exampleDb":85,"./diagrams/example/exampleRenderer":86,"./diagrams/example/parser/example":87,"./diagrams/flowchart/flowRenderer":90,"./diagrams/flowchart/graphDb":91,"./diagrams/flowchart/parser/dot":92,"./diagrams/flowchart/parser/flow":93,"./diagrams/gantt/ganttDb":95,"./diagrams/gantt/ganttRenderer":96,"./diagrams/gantt/parser/gantt":97,"./diagrams/sequenceDiagram/parser/sequenceDiagram":99,"./diagrams/sequenceDiagram/sequenceDb":100,"./diagrams/sequenceDiagram/sequenceRenderer":101,"./utils":104,he:81}],104:[function(t,e){e.exports.detectType=function(t){return t.match(/^\s*sequenceDiagram/)?"sequenceDiagram":t.match(/^\s*sequence/)?"sequence":t.match(/^\s*digraph/)?"dotGraph":t.match(/^\s*info/)?"info":t.match(/^\s*gantt/)?"gantt":"graph"},e.exports.cloneCssStyles=function(t,e){for(var n="",r=document.styleSheets,i=0;i0&&(n+=u.selectorText+" { "+u.style.cssText+" }\n")}}}catch(c){"undefined"!=typeof console&&"undefined"!==console.warn&&console.warn('Invalid CSS selector "'+u.selectorText+'"',c)}var l="",h="";for(var f in e)e.hasOwnProperty(f)&&"undefined"!=typeof f&&("default"===f?(e.default.styles instanceof Array&&(l+="#"+t.id.trim()+" .node { "+e[f].styles.join("; ")+"; }\n"),e.default.nodeLabelStyles instanceof Array&&(l+="#"+t.id.trim()+" .node text { "+e[f].nodeLabelStyles.join("; ")+"; }\n"),e.default.edgeLabelStyles instanceof Array&&(l+="#"+t.id.trim()+" .edgeLabel text { "+e[f].edgeLabelStyles.join("; ")+"; }\n")):e[f].styles instanceof Array&&(h+="#"+t.id.trim()+" ."+f+" { "+e[f].styles.join("; ")+"; }\n"));if(""!==n||""!==l||""!==h){var d=document.createElement("style");d.setAttribute("type","text/css"),d.setAttribute("title","mermaid-svg-internal-css"),d.innerHTML="/* */\n",t.insertBefore(d,t.firstChild)}}},{}]},{},[103])}(); \ No newline at end of file diff --git a/dist/mermaid.slim.js b/dist/mermaid.slim.js index 202c9a7f5..83ac9ebaf 100644 --- a/dist/mermaid.slim.js +++ b/dist/mermaid.slim.js @@ -30829,25 +30829,34 @@ var parse = function(text){ * c-->|No |d(Transform); * ``` */ -var init = function (sequenceConfig, arr) { - arr = arr == null ? document.querySelectorAll('.mermaid') - : typeof arr === "string" ? document.querySelectorAll(arr) - : arr instanceof Node ? [arr] - : arr; - //arr = document.querySelectorAll('.mermaid'); - var i; - - if (sequenceConfig !== 'undefined' && (typeof sequenceConfig !== 'undefined')) { - if(typeof sequenceConfig === 'object'){ - seq.setConf(sequenceConfig); - } else{ - seq.setConf(JSON.parse(sequenceConfig)); +/** + * Renders the mermaid diagrams + * @* param nodes- a css selector or an array of nodes + */ +var init = function () { + var nodes; + if(arguments.length === 2){ + // sequence config was passed as #1 + if(typeof arguments[0] !== 'undefined'){ + mermaid.sequenceConfig = arguments[0]; } - } - for (i = 0; i < arr.length; i++) { - var element = arr[i]; + nodes = arguments[1]; + } + else{ + nodes = arguments[0]; + } + + nodes = nodes === undefined ? document.querySelectorAll('.mermaid') + : typeof nodes === "string" ? document.querySelectorAll(nodes) + : nodes instanceof Node ? [nodes] + // Last case - sequence config was passed pick next + : nodes; + + var i; + for (i = 0; i < nodes.length; i++) { + var element = nodes[i]; // Check if previously processed if(!element.getAttribute("data-processed")) { @@ -30856,7 +30865,7 @@ var init = function (sequenceConfig, arr) { continue; } - id = 'mermaidChart' + nextId++; + var id = 'mermaidChart' + nextId++; var txt = element.innerHTML; txt = txt.replace(/>/g,'>'); @@ -30887,6 +30896,9 @@ var init = function (sequenceConfig, arr) { utils.cloneCssStyles(element.firstChild, classes); break; case 'sequenceDiagram': + if(typeof mermaid.sequenceConfig === 'object'){ + seq.setConf(mermaid.sequenceConfig); + } seq.draw(txt,id); utils.cloneCssStyles(element.firstChild, []); break; @@ -30984,8 +30996,6 @@ if(typeof document !== 'undefined'){ }, false); } - - }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) },{"../package.json":84,"./diagrams/example/exampleDb":85,"./diagrams/example/exampleRenderer":86,"./diagrams/example/parser/example":87,"./diagrams/flowchart/flowRenderer":90,"./diagrams/flowchart/graphDb":91,"./diagrams/flowchart/parser/dot":92,"./diagrams/flowchart/parser/flow":93,"./diagrams/gantt/ganttDb":95,"./diagrams/gantt/ganttRenderer":96,"./diagrams/gantt/parser/gantt":97,"./diagrams/sequenceDiagram/parser/sequenceDiagram":99,"./diagrams/sequenceDiagram/sequenceDb":100,"./diagrams/sequenceDiagram/sequenceRenderer":101,"./utils":104,"he":81}],104:[function(require,module,exports){ /** diff --git a/dist/mermaid.slim.min.js b/dist/mermaid.slim.min.js index 93231c999..25edc529d 100644 --- a/dist/mermaid.slim.min.js +++ b/dist/mermaid.slim.min.js @@ -10,4 +10,4 @@ return 0>e-a?(n=t.clone().add(i-1,"months"),r=(e-a)/(a-n)):(n=t.clone().add(i+1, case"second":return 24*e*60*60+this._milliseconds/1e3;case"millisecond":return Math.floor(24*e*60*60*1e3)+this._milliseconds;default:throw new Error("Unknown unit "+t)}},lang:Ae.fn.lang,locale:Ae.fn.locale,toIsoString:s("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var t=Math.abs(this.years()),e=Math.abs(this.months()),n=Math.abs(this.days()),r=Math.abs(this.hours()),i=Math.abs(this.minutes()),a=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(t?t+"Y":"")+(e?e+"M":"")+(n?n+"D":"")+(r||i||a?"T":"")+(r?r+"H":"")+(i?i+"M":"")+(a?a+"S":""):"P0D"},localeData:function(){return this._locale},toJSON:function(){return this.toISOString()}}),Ae.duration.fn.toString=Ae.duration.fn.toISOString;for(De in pn)a(pn,De)&&we(De.toLowerCase());Ae.duration.fn.asMilliseconds=function(){return this.as("ms")},Ae.duration.fn.asSeconds=function(){return this.as("s")},Ae.duration.fn.asMinutes=function(){return this.as("m")},Ae.duration.fn.asHours=function(){return this.as("h")},Ae.duration.fn.asDays=function(){return this.as("d")},Ae.duration.fn.asWeeks=function(){return this.as("weeks")},Ae.duration.fn.asMonths=function(){return this.as("M")},Ae.duration.fn.asYears=function(){return this.as("y")},Ae.locale("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=1===F(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n}}),Ue?e.exports=Ae:"function"==typeof define&&define.amd?(define(function(t,e,n){return n.config&&n.config()&&n.config().noGlobal===!0&&(Se.moment=Ee),Ae}),ke(!0)):ke()}).call(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],84:[function(t,e){e.exports={name:"mermaid",version:"0.4.0",description:"Markdownish syntax for generating flowcharts, sequence diagrams and gantt charts.",main:"src/main.js",keywords:["diagram","markdown","flowchart","sequence diagram","gantt"],bin:{mermaid:"./bin/mermaid.js"},scripts:{test:"gulp test"},repository:{type:"git",url:"https://github.com/knsv/mermaid"},author:"Knut Sveidqvist",license:"MIT",dependencies:{chalk:"^0.5.1",d3:"~3.4.13","dagre-d3":"~0.4.2",he:"^0.5.0",minimist:"^1.1.0",mkdirp:"^0.5.0",moment:"^2.9.0",semver:"^4.1.1",which:"^1.0.8"},devDependencies:{async:"^0.9.0",browserify:"~6.2.0",clone:"^0.2.0","codeclimate-test-reporter":"0.0.4",d3:"~3.4.13","dagre-d3":"~0.3.3",dateformat:"^1.0.11","event-stream":"^3.2.0",foundation:"^4.2.1-1","front-matter":"^0.2.0",gulp:"~3.8.9","gulp-browserify":"^0.5.0","gulp-bump":"^0.1.11","gulp-concat":"~2.4.1","gulp-data":"^1.1.1","gulp-ext-replace":"~0.1.0","gulp-hogan":"^1.1.0","gulp-insert":"^0.4.0","gulp-istanbul":"^0.4.0","gulp-jasmine":"~1.0.1","gulp-jison":"~1.0.0","gulp-jshint":"^1.9.0","gulp-less":"^3.0.1","gulp-rename":"~1.2.0","gulp-shell":"^0.2.10","gulp-tag-version":"^1.2.1","gulp-uglify":"~1.0.1",he:"^0.5.0","hogan.js":"^3.0.2",jasmine:"~2.0.1",jison:"~0.4.15","jshint-stylish":"^1.0.0",karma:"~0.12.20","karma-chrome-launcher":"~0.1.5","karma-jasmine":"~0.2.1","karma-requirejs":"~0.2.2",lodash:"^2.4.1","lodash._escapestringchar":"^2.4.1","lodash._objecttypes":"^2.4.1","lodash._reinterpolate":"^2.4.1","lodash._reunescapedhtml":"^2.4.1","lodash.defaults":"^2.4.1","lodash.templatesettings":"^2.4.1","lodash.values":"^2.4.1",marked:"^0.3.2","mock-browser":"^0.90.27",path:"^0.4.9",phantomjs:"^1.9.12",proxyquire:"^1.3.1",rewire:"^2.1.3",rimraf:"^2.2.8",tape:"^3.0.3"}}},{}],85:[function(t,e,n){var r="",i=!1;n.setMessage=function(t){r=t},n.getMessage=function(){return r},n.setInfo=function(t){i=t},n.getInfo=function(){return i},n.parseError=function(t,e){mermaid.parseError(t,e)}},{}],86:[function(t,e,n){var r=t("./exampleDb"),i=t("./parser/example.js");n.draw=function(t,e,n){var a;a=i.parser,a.yy=r,a.parse(t);var o=d3.select("#"+e),u=o.append("g");u.append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("mermaid "+n),o.attr("height",100),o.attr("width",400)}},{"./exampleDb":85,"./parser/example.js":87}],87:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[6,9,10,12],r={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,message:11,say:12,TXT:13,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo",12:"say",13:"TXT"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1],[8,1],[11,2]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 1:return r;case 4:break;case 6:r.setInfo(!0);break;case 7:r.setMessage(a[o]);break;case 8:this.$=a[o-1].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8],11:9,12:[1,10]},{1:[2,1]},e(n,[2,3]),e(n,[2,4]),e(n,[2,5]),e(n,[2,6]),e(n,[2,7]),{13:[1,11]},e(n,[2,8])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,k,A,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(A in o[x])this.terminals_[A]&&A>h&&M.push("'"+this.terminals_[A]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),k=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof k)return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},i=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!1):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 9;case 1:return 10;case 2:return 4;case 3:return 12;case 4:return 13;case 5:return 6;case 6:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:showInfo\b)/i,/^(?:info\b)/i,/^(?:say\b)/i,/^(?::[^#\n;]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6],inclusive:!0}}};return t}();return r.lexer=i,t.prototype=r,r.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],88:[function(t,e){var n;if(t)try{n=t("d3")}catch(r){}n||(n=window.d3),e.exports=n},{d3:1}],89:[function(t,e){var n;if(t)try{n=t("dagre-d3")}catch(r){}n||(n=window.dagreD3),e.exports=n},{"dagre-d3":2}],90:[function(t,e,n){(function(r){var i=t("./graphDb"),a=t("./parser/flow"),o=t("./parser/dot"),u=t("./dagre-d3"),s=t("./d3"),c={};e.exports.setConf=function(t){var e,n=Object.keys(t);for(e=0;e0&&(u=o.classes.join(" "));var s="";s=i(s,o.styles),a="undefined"==typeof o.text?o.id:o.text;var c="";r.mermaid.htmlLabels?c="html":(a=a.replace(/
/g,"\n"),c="text");var l=0,h="";switch(o.type){case"round":l=5,h="rect";break;case"square":h="rect";break;case"diamond":h="question";break;case"odd":h="rect_left_inv_arrow";break;case"odd_right":h="rect_left_inv_arrow";break;case"circle":h="circle";break;default:h="rect"}e.setNode(o.id,{labelType:c,shape:h,label:a,rx:l,ry:l,"class":u,style:s,id:o.id})})},n.addEdges=function(t,e){var n,i,a=0;"undefined"!=typeof t.defaultStyle&&(i=t.defaultStyle.toString().replace(/,/g,";")),t.forEach(function(t){a++,n="arrow_open"===t.type?"none":"normal";var o="";if("undefined"!=typeof t.style)t.style.forEach(function(t){o=o+t+";"});else switch(t.stroke){case"normal":o="fill:none","undefined"!=typeof i&&(o=i);break;case"dotted":o="stroke: #333; fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":o="stroke: #333; stroke-width: 3.5px;fill:none"}if("undefined"==typeof t.text)"undefined"==typeof t.style?e.setEdge(t.start,t.end,{style:o,arrowhead:n},a):e.setEdge(t.start,t.end,{style:o,arrowheadStyle:"fill: #333",arrowhead:n},a);else{var u=t.text.replace(/
/g,"\n");"undefined"==typeof t.style?r.mermaid.htmlLabels?e.setEdge(t.start,t.end,{labelType:"html",style:o,labelpos:"c",label:''+t.text+"",arrowheadStyle:"fill: #333",arrowhead:n},a):e.setEdge(t.start,t.end,{labelType:"text",style:"stroke: #333; stroke-width: 1.5px;fill:none",labelpos:"c",label:u,arrowheadStyle:"fill: #333",arrowhead:n},a):e.setEdge(t.start,t.end,{labelType:"text",style:o,arrowheadStyle:"fill: #333",label:u,arrowhead:n},a)}})},n.getClasses=function(t,e){var n;i.clear(),n=e?o.parser:a.parser,n.yy=i,n.parse(t);var r=i.getClasses();return"undefined"==typeof r.default&&(r.default={id:"default"},r.default.styles=["fill:#ffa","stroke:#666","stroke-width:3px"],r.default.nodeLabelStyles=["fill:#000","stroke:none","font-weight:300",'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf',"font-size:14px"],r.default.edgeLabelStyles=["fill:#000","stroke:none","font-weight:300",'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf',"font-size:14px"]),r},n.draw=function(t,e,r){var l;i.clear(),l=r?o.parser:a.parser,l.yy=i;try{l.parse(t)}catch(h){}var f;f=i.getDirection(),"undefined"==typeof f&&(f="TD");var d=new u.graphlib.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:f,marginx:20,marginy:20}).setDefaultEdgeLabel(function(){return{}}),p=i.getSubGraphs(),g=0;p.forEach(function(){g+=1;var t="subG"+g;i.addVertex(t,void 0,void 0,void 0)});var y=i.getVertices(),m=i.getEdges();g=0,p.forEach(function(t){g+=1;var e="subG"+g;s.selectAll("cluster").append("text"),t.nodes.forEach(function(t){d.setParent(t,e)})}),n.addVertices(y,d),n.addEdges(m,d);var v=new u.render;v.shapes().question=function(t,e,n){var r=e.width,i=e.height,a=.8*(r+i),o=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}],s=t.insert("polygon",":first-child").attr("points",o.map(function(t){return t.x+","+t.y}).join(" ")).attr("rx",5).attr("ry",5).attr("transform","translate("+-a/2+","+2*a/4+")");return n.intersect=function(t){return u.intersect.polygon(n,o,t)},s},v.shapes().rect_left_inv_arrow=function(t,e,n){var r=e.width,i=e.height,a=[{x:-i/2,y:0},{x:r,y:0},{x:r,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}],o=t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+-r/2+","+2*i/4+")");return n.intersect=function(t){return u.intersect.polygon(n,a,t)},o},v.shapes().rect_right_inv_arrow=function(t,e,n){var r=e.width,i=e.height,a=[{x:0,y:0},{x:r+i/2,y:0},{x:r,y:-i/2},{x:r+i/2,y:-i},{x:0,y:-i}],o=t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+-r/2+","+2*i/4+")");return n.intersect=function(t){return u.intersect.polygon(n,a,t)},o},v.arrows().none=function(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),a=i.append("path").attr("d","M 0 0 L 0 0 L 0 0 z");u.util.applyStyle(a,n[r+"Style"])};var b=s.select("#"+e);svgGroup=s.select("#"+e+" g"),v(s.select("#"+e+" g"),d);document.querySelector("#"+e);b.attr("height",d.graph().height),"undefined"==typeof c.width?(console.log("Undefined it is"),b.attr("width",d.graph().width)):(console.log("Defined it is"+c.width),b.attr("width",c.width)),b.attr("viewBox","0 0 "+(d.graph().width+20)+" "+(d.graph().height+20)),setTimeout(function(){var t=0;p.forEach(function(n){var r=document.querySelectorAll("#"+e+" .clusters rect"),i=document.querySelectorAll("#"+e+" .cluster");if("undefined"!==n.title){var a=r[t].x.baseVal.value,o=r[t].y.baseVal.value,u=r[t].width.baseVal.value,c=s.select(i[t]),l=c.append("text");l.attr("x",a+u/2),l.attr("y",o+14),l.attr("fill","black"),l.attr("stroke","none"),l.attr("id",e+"Text"),l.style("text-anchor","middle"),l.text(n.title)}t+=1})},20)}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./d3":88,"./dagre-d3":89,"./graphDb":91,"./parser/dot":92,"./parser/flow":93}],91:[function(require,module,exports){var vertices={},edges=[],classes=[],subGraphs=[],direction,funs=[];exports.addVertex=function(t,e,n,r){"undefined"!=typeof t&&0!==t.trim().length&&("undefined"==typeof vertices[t]&&(vertices[t]={id:t,styles:[],classes:[]}),"undefined"!=typeof e&&(vertices[t].text=e),"undefined"!=typeof n&&(vertices[t].type=n),"undefined"!=typeof n&&(vertices[t].type=n),"undefined"!=typeof r&&null!==r&&r.forEach(function(e){vertices[t].styles.push(e)}))},exports.addLink=function(t,e,n,r){var i={start:t,end:e,type:void 0,text:""};r=n.text,"undefined"!=typeof r&&(i.text=r),"undefined"!=typeof n&&(i.type=n.type,i.stroke=n.stroke),edges.push(i)},exports.updateLink=function(t,e){t.substr(1);"default"===t?edges.defaultStyle=e:edges[t].style=e},exports.addClass=function(t,e){"undefined"==typeof classes[t]&&(classes[t]={id:t,styles:[]}),"undefined"!=typeof e&&null!==e&&e.forEach(function(e){classes[t].styles.push(e)})},exports.setDirection=function(t){direction=t},exports.setClass=function(t,e){t.indexOf(",")>0?t.split(",").forEach(function(t){"undefined"!=typeof vertices[t]&&vertices[t].classes.push(e)}):"undefined"!=typeof vertices[t]&&vertices[t].classes.push(e)},exports.setClickEvent=function(id,functionName){id.indexOf(",")>0?id.split(",").forEach(function(id2){"undefined"!=typeof vertices[id2]&&funs.push(function(){var elem=document.getElementById(id2);null!==elem&&(elem.onclick=function(){eval(functionName+"('"+id2+"')")})})}):"undefined"!=typeof vertices[id]&&funs.push(function(){var elem=document.getElementById(id);null!==elem&&(elem.onclick=function(){eval(functionName+"('"+id+"')")})})},exports.bindFunctions=function(){funs.forEach(function(t){t()})},exports.getDirection=function(){return direction},exports.getVertices=function(){return vertices},exports.getEdges=function(){return edges},exports.getClasses=function(){return classes},exports.clear=function(){vertices={},classes={},edges=[],funs=[],subGraphs=[]},exports.defaultStyle=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},exports.addSubGraph=function(t,e){function n(t){var e={"boolean":{},number:{},string:{}},n=[];return t.filter(function(t){var r=typeof t;return" "===t?!1:r in e?e[r].hasOwnProperty(t)?!1:e[r][t]=!0:n.indexOf(t)>=0?!1:n.push(t)})}var r=[];r=n(r.concat.apply(r,t)),subGraphs.push({nodes:r,title:e})},exports.getSubGraphs=function(){return subGraphs},exports.parseError=function(t,e){mermaid.parseError(t,e)}},{}],92:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,5],r=[1,6],i=[1,12],a=[1,13],o=[1,14],u=[1,15],s=[1,16],c=[1,17],l=[1,18],h=[1,19],f=[1,20],d=[1,21],p=[1,22],g=[8,16,17,18,19,20,21,22,23,24,25,26],y=[1,37],m=[1,33],v=[1,34],b=[1,35],_=[1,36],x=[8,10,16,17,18,19,20,21,22,23,24,25,26,28,32,37,39,40,45,57,58],w=[10,28],k=[10,28,37,57,58],A=[2,49],E=[1,45],D=[1,48],M=[1,49],S=[1,52],C=[2,65],T=[1,65],F=[1,66],L=[1,67],B=[1,68],N=[1,69],O=[1,70],I=[1,71],q=[1,72],R=[1,73],P=[8,16,17,18,19,20,21,22,23,24,25,26,47],U=[10,28,37],Y={trace:function(){},yy:{},symbols_:{error:2,expressions:3,graph:4,EOF:5,graphStatement:6,idStatement:7,"{":8,stmt_list:9,"}":10,strict:11,GRAPH:12,DIGRAPH:13,textNoTags:14,textNoTagsToken:15,ALPHA:16,NUM:17,COLON:18,PLUS:19,EQUALS:20,MULT:21,DOT:22,BRKT:23,SPACE:24,MINUS:25,keywords:26,stmt:27,";":28,node_stmt:29,edge_stmt:30,attr_stmt:31,"=":32,subgraph:33,attr_list:34,NODE:35,EDGE:36,"[":37,a_list:38,"]":39,",":40,edgeRHS:41,node_id:42,edgeop:43,port:44,":":45,compass_pt:46,SUBGRAPH:47,n:48,ne:49,e:50,se:51,s:52,sw:53,w:54,nw:55,c:56,ARROW_POINT:57,ARROW_OPEN:58,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",8:"{",10:"}",11:"strict",12:"GRAPH",13:"DIGRAPH",16:"ALPHA",17:"NUM",18:"COLON",19:"PLUS",20:"EQUALS",21:"MULT",22:"DOT",23:"BRKT",24:"SPACE",25:"MINUS",26:"keywords",28:";",32:"=",35:"NODE",36:"EDGE",37:"[",39:"]",40:",",45:":",47:"SUBGRAPH",48:"n",49:"ne",50:"e",51:"se",52:"s",53:"sw",54:"w",55:"nw",56:"c",57:"ARROW_POINT",58:"ARROW_OPEN"},productions_:[0,[3,2],[4,5],[4,6],[4,4],[6,1],[6,1],[7,1],[14,1],[14,2],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[9,1],[9,3],[27,1],[27,1],[27,1],[27,3],[27,1],[31,2],[31,2],[31,2],[34,4],[34,3],[34,3],[34,2],[38,5],[38,5],[38,3],[30,3],[30,3],[30,2],[30,2],[41,3],[41,3],[41,2],[41,2],[29,2],[29,1],[42,2],[42,1],[44,4],[44,2],[44,2],[33,5],[33,4],[33,3],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,0],[43,1],[43,1]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 1:this.$=a[o-1];break;case 2:this.$=a[o-4];break;case 3:this.$=a[o-5];break;case 4:this.$=a[o-3];break;case 8:case 10:case 11:this.$=a[o];break;case 9:this.$=a[o-1]+""+a[o];break;case 12:case 13:case 14:case 15:case 16:case 18:case 19:case 20:this.$=a[o];break;case 17:this.$="
";break;case 39:this.$="oy";break;case 40:r.addLink(a[o-1],a[o].id,a[o].op),this.$="oy";break;case 42:r.addLink(a[o-1],a[o].id,a[o].op),this.$={op:a[o-2],id:a[o-1]};break;case 44:this.$={op:a[o-1],id:a[o]};break;case 48:r.addVertex(a[o-1]),this.$=a[o-1];break;case 49:r.addVertex(a[o]),this.$=a[o];break;case 66:this.$="arrow";break;case 67:this.$="arrow_open"}},table:[{3:1,4:2,6:3,11:[1,4],12:n,13:r},{1:[3]},{5:[1,7]},{7:8,8:[1,9],14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{6:23,12:n,13:r},e(g,[2,5]),e(g,[2,6]),{1:[2,1]},{8:[1,24]},{7:30,8:y,9:25,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},e([8,10,28,32,37,39,40,45,57,58],[2,7],{15:38,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p}),e(x,[2,8]),e(x,[2,10]),e(x,[2,11]),e(x,[2,12]),e(x,[2,13]),e(x,[2,14]),e(x,[2,15]),e(x,[2,16]),e(x,[2,17]),e(x,[2,18]),e(x,[2,19]),e(x,[2,20]),{7:39,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{7:30,8:y,9:40,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{10:[1,41]},{10:[2,21],28:[1,42]},e(w,[2,23]),e(w,[2,24]),e(w,[2,25]),e(k,A,{44:44,32:[1,43],45:E}),e(w,[2,27],{41:46,43:47,57:D,58:M}),e(w,[2,47],{43:47,34:50,41:51,37:S,57:D,58:M}),{34:53,37:S},{34:54,37:S},{34:55,37:S},{7:56,8:[1,57],14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{7:30,8:y,9:58,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},e(x,[2,9]),{8:[1,59]},{10:[1,60]},{5:[2,4]},{7:30,8:y,9:61,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{7:62,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},e(k,[2,48]),e(k,C,{14:10,15:11,7:63,46:64,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,48:T,49:F,50:L,51:B,52:N,53:O,54:I,55:q,56:R}),e(w,[2,41],{34:74,37:S}),{7:77,8:y,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,33:76,42:75,47:_},e(P,[2,66]),e(P,[2,67]),e(w,[2,46]),e(w,[2,40],{34:78,37:S}),{7:81,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:79,39:[1,80]},e(w,[2,28]),e(w,[2,29]),e(w,[2,30]),{8:[1,82]},{7:30,8:y,9:83,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{10:[1,84]},{7:30,8:y,9:85,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{5:[2,2]},{10:[2,22]},e(w,[2,26]),e(k,[2,51],{45:[1,86]}),e(k,[2,52]),e(k,[2,56]),e(k,[2,57]),e(k,[2,58]),e(k,[2,59]),e(k,[2,60]),e(k,[2,61]),e(k,[2,62]),e(k,[2,63]),e(k,[2,64]),e(w,[2,38]),e(U,[2,44],{43:47,41:87,57:D,58:M}),e(U,[2,45],{43:47,41:88,57:D,58:M}),e(k,A,{44:44,45:E}),e(w,[2,39]),{39:[1,89]},e(w,[2,34],{34:90,37:S}),{32:[1,91]},{7:30,8:y,9:92,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{10:[1,93]},e(k,[2,55]),{10:[1,94]},e(k,C,{46:95,48:T,49:F,50:L,51:B,52:N,53:O,54:I,55:q,56:R}),e(U,[2,42]),e(U,[2,43]),e(w,[2,33],{34:96,37:S}),e(w,[2,32]),{7:97,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{10:[1,98]},e(k,[2,54]),{5:[2,3]},e(k,[2,50]),e(w,[2,31]),{28:[1,99],39:[2,37],40:[1,100]},e(k,[2,53]),{7:81,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:101},{7:81,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:102},{39:[2,35]},{39:[2,36]}],defaultActions:{7:[2,1],41:[2,4],60:[2,2],61:[2,22],94:[2,3],101:[2,35],102:[2,36]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,k,A,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(A in o[x])this.terminals_[A]&&A>h&&M.push("'"+this.terminals_[A]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),k=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof k)return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},j=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n; if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!1):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:return"STYLE";case 1:return"LINKSTYLE";case 2:return"CLASSDEF";case 3:return"CLASS";case 4:return"CLICK";case 5:return 12;case 6:return 13;case 7:return 47;case 8:return 35;case 9:return 36;case 10:return"DIR";case 11:return"DIR";case 12:return"DIR";case 13:return"DIR";case 14:return"DIR";case 15:return"DIR";case 16:return 17;case 17:return 23;case 18:return 18;case 19:return 28;case 20:return 40;case 21:return 32;case 22:return 21;case 23:return 22;case 24:return"ARROW_CROSS";case 25:return 57;case 26:return"ARROW_CIRCLE";case 27:return 58;case 28:return 25;case 29:return 19;case 30:return 20;case 31:return 16;case 32:return"PIPE";case 33:return"PS";case 34:return"PE";case 35:return 37;case 36:return 39;case 37:return 8;case 38:return 10;case 39:return"QUOTE";case 40:return 24;case 41:return"NEWLINE";case 42:return 5}},rules:[/^(?:style\b)/,/^(?:linkStyle\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:click\b)/,/^(?:graph\b)/,/^(?:digraph\b)/,/^(?:subgraph\b)/,/^(?:node\b)/,/^(?:edge\b)/,/^(?:LR\b)/,/^(?:RL\b)/,/^(?:TB\b)/,/^(?:BT\b)/,/^(?:TD\b)/,/^(?:BR\b)/,/^(?:[0-9])/,/^(?:#)/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:=)/,/^(?:\*)/,/^(?:\.)/,/^(?:--[x])/,/^(?:->)/,/^(?:--[o])/,/^(?:--)/,/^(?:-)/,/^(?:\+)/,/^(?:=)/,/^(?:[\u0021-\u0027\u002A-\u002E\u003F\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC_])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:\s)/,/^(?:\n)/,/^(?:$)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],inclusive:!0}}};return t}();return Y.lexer=j,t.prototype=Y,Y.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],93:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,4],r=[1,3],i=[1,5],a=[1,8,9,10,11,13,30,67,68,69,70,71,77,81,83,84,86,87,89,90,91],o=[2,2],u=[1,12],s=[1,13],c=[1,14],l=[1,15],h=[1,31],f=[1,22],d=[1,24],p=[1,25],g=[1,26],y=[1,27],m=[1,28],v=[1,34],b=[1,36],_=[1,33],x=[1,35],w=[1,41],k=[1,40],A=[1,37],E=[1,38],D=[1,39],M=[1,8,9,10,11,13,30,32,67,68,69,70,71,77,81,83,84,86,87,89,90,91],S=[1,49],C=[1,48],T=[1,50],F=[1,67],L=[1,75],B=[1,76],N=[1,61],O=[1,60],I=[1,80],q=[1,79],R=[1,77],P=[1,78],U=[1,68],Y=[1,63],j=[1,62],z=[1,70],V=[1,71],H=[1,72],G=[1,73],$=[1,74],W=[1,65],Z=[1,64],X=[8,9,11],K=[8,9,11,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61],J=[1,109],Q=[8,9,10,11,13,15,36,38,40,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,77,81,83,84,86,87,89,90,91],te=[8,9,10,11,12,13,15,16,17,18,30,32,36,37,38,39,40,41,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,67,68,69,70,71,74,77,79,81,83,84,86,87,89,90,91],ee=[1,112],ne=[1,113],re=[8,9,10,11,13,30,32,67,68,69,70,71,77,81,83,84,86,87,89,90,91],ie=[8,9,10,11,12,13,15,16,17,18,30,32,37,39,41,44,47,48,49,50,51,53,54,55,56,57,58,59,60,61,62,67,68,69,70,71,74,77,79,81,83,84,86,87,89,90,91],ae=[13,77,81,83,84,86,87,89,90,91],oe=[13,62,77,81,83,84,86,87,89,90,91],ue=[1,184],se=[1,181],ce=[1,188],le=[1,185],he=[1,182],fe=[1,189],de=[1,179],pe=[1,180],ge=[1,183],ye=[1,186],me=[1,187],ve=[1,203],be=[8,9,11,81],_e=[8,9,10,11,44,67,76,77,79,81,83,84,85,86,87],xe={trace:function(){},yy:{},symbols_:{error:2,mermaidDoc:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,DIR:13,FirstStmtSeperator:14,TAGEND:15,TAGSTART:16,UP:17,DOWN:18,ending:19,endToken:20,spaceList:21,spaceListNewline:22,verticeStatement:23,separator:24,styleStatement:25,linkStyleStatement:26,classDefStatement:27,classStatement:28,clickStatement:29,subgraph:30,text:31,end:32,vertex:33,link:34,alphaNum:35,SQS:36,SQE:37,PS:38,PE:39,DIAMOND_START:40,DIAMOND_STOP:41,alphaNumStatement:42,alphaNumToken:43,MINUS:44,linkStatement:45,arrowText:46,"--":47,ARROW_POINT:48,ARROW_CIRCLE:49,ARROW_CROSS:50,ARROW_OPEN:51,"-.":52,DOTTED_ARROW_POINT:53,DOTTED_ARROW_CIRCLE:54,DOTTED_ARROW_CROSS:55,DOTTED_ARROW_OPEN:56,"==":57,THICK_ARROW_POINT:58,THICK_ARROW_CIRCLE:59,THICK_ARROW_CROSS:60,THICK_ARROW_OPEN:61,PIPE:62,textToken:63,commentText:64,commentToken:65,keywords:66,STYLE:67,LINKSTYLE:68,CLASSDEF:69,CLASS:70,CLICK:71,textNoTags:72,textNoTagsToken:73,DEFAULT:74,stylesOpt:75,HEX:76,NUM:77,commentStatement:78,PCT:79,style:80,COMMA:81,styleComponent:82,ALPHA:83,COLON:84,UNIT:85,BRKT:86,DOT:87,graphCodeTokens:88,PLUS:89,EQUALS:90,MULT:91,TAG_START:92,TAG_END:93,QUOTE:94,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"DIR",15:"TAGEND",16:"TAGSTART",17:"UP",18:"DOWN",30:"subgraph",32:"end",36:"SQS",37:"SQE",38:"PS",39:"PE",40:"DIAMOND_START",41:"DIAMOND_STOP",44:"MINUS",47:"--",48:"ARROW_POINT",49:"ARROW_CIRCLE",50:"ARROW_CROSS",51:"ARROW_OPEN",52:"-.",53:"DOTTED_ARROW_POINT",54:"DOTTED_ARROW_CIRCLE",55:"DOTTED_ARROW_CROSS",56:"DOTTED_ARROW_OPEN",57:"==",58:"THICK_ARROW_POINT",59:"THICK_ARROW_CIRCLE",60:"THICK_ARROW_CROSS",61:"THICK_ARROW_OPEN",62:"PIPE",67:"STYLE",68:"LINKSTYLE",69:"CLASSDEF",70:"CLASS",71:"CLICK",74:"DEFAULT",76:"HEX",77:"NUM",79:"PCT",81:"COMMA",83:"ALPHA",84:"COLON",85:"UNIT",86:"BRKT",87:"DOT",89:"PLUS",90:"EQUALS",91:"MULT",92:"TAG_START",93:"TAG_END",94:"QUOTE"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,4],[4,4],[4,4],[4,4],[4,4],[19,2],[19,1],[20,1],[20,1],[20,1],[14,1],[14,1],[14,2],[22,2],[22,2],[22,1],[22,1],[21,2],[21,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,6],[7,5],[24,1],[24,1],[24,1],[23,3],[23,1],[33,4],[33,5],[33,6],[33,7],[33,4],[33,5],[33,4],[33,5],[33,4],[33,5],[33,1],[33,2],[35,1],[35,2],[42,1],[42,1],[42,3],[34,2],[34,3],[34,1],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[46,3],[31,1],[31,2],[64,1],[64,2],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[72,1],[72,2],[27,5],[27,5],[28,5],[29,5],[25,5],[25,5],[26,5],[26,5],[78,3],[75,1],[75,3],[80,1],[80,2],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[65,1],[65,1],[63,1],[63,1],[63,1],[63,1],[63,1],[63,1],[63,1],[73,1],[73,1],[73,1],[73,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 2:this.$=[];break;case 3:a[o]!==[]&&a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 55:case 57:case 58:case 88:case 90:case 103:this.$=a[o];break;case 11:r.setDirection(a[o-1]),this.$=a[o-1];break;case 12:r.setDirection("LR"),this.$=a[o-1];break;case 13:r.setDirection("RL"),this.$=a[o-1];break;case 14:r.setDirection("BT"),this.$=a[o-1];break;case 15:r.setDirection("TB"),this.$=a[o-1];break;case 30:this.$=a[o-1];break;case 31:case 32:case 33:case 34:case 35:this.$=[];break;case 36:r.addSubGraph(a[o-2],a[o-4]);break;case 37:r.addSubGraph(a[o-2],void 0);break;case 41:r.addLink(a[o-2],a[o],a[o-1]),this.$=[a[o-2],a[o]];break;case 42:this.$=[a[o]];break;case 43:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"square");break;case 44:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"square");break;case 45:this.$=a[o-5],r.addVertex(a[o-5],a[o-2],"circle");break;case 46:this.$=a[o-6],r.addVertex(a[o-6],a[o-3],"circle");break;case 47:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"round");break;case 48:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"round");break;case 49:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"diamond");break;case 50:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"diamond");break;case 51:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"odd");break;case 52:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"odd");break;case 53:this.$=a[o],r.addVertex(a[o]);break;case 54:this.$=a[o-1],r.addVertex(a[o-1]);break;case 56:case 89:case 91:case 104:this.$=a[o-1]+""+a[o];break;case 59:this.$=a[o-2]+"-"+a[o];break;case 60:a[o-1].text=a[o],this.$=a[o-1];break;case 61:a[o-2].text=a[o-1],this.$=a[o-2];break;case 62:this.$=a[o];break;case 63:this.$={type:"arrow",stroke:"normal",text:a[o-1]};break;case 64:this.$={type:"arrow_circle",stroke:"normal",text:a[o-1]};break;case 65:this.$={type:"arrow_cross",stroke:"normal",text:a[o-1]};break;case 66:this.$={type:"arrow_open",stroke:"normal",text:a[o-1]};break;case 67:this.$={type:"arrow",stroke:"dotted",text:a[o-1]};break;case 68:this.$={type:"arrow_circle",stroke:"dotted",text:a[o-1]};break;case 69:this.$={type:"arrow_cross",stroke:"dotted",text:a[o-1]};break;case 70:this.$={type:"arrow_open",stroke:"dotted",text:a[o-1]};break;case 71:this.$={type:"arrow",stroke:"thick",text:a[o-1]};break;case 72:this.$={type:"arrow_circle",stroke:"thick",text:a[o-1]};break;case 73:this.$={type:"arrow_cross",stroke:"thick",text:a[o-1]};break;case 74:this.$={type:"arrow_open",stroke:"thick",text:a[o-1]};break;case 75:this.$={type:"arrow",stroke:"normal"};break;case 76:this.$={type:"arrow_circle",stroke:"normal"};break;case 77:this.$={type:"arrow_cross",stroke:"normal"};break;case 78:this.$={type:"arrow_open",stroke:"normal"};break;case 79:this.$={type:"arrow",stroke:"dotted"};break;case 80:this.$={type:"arrow_circle",stroke:"dotted"};break;case 81:this.$={type:"arrow_cross",stroke:"dotted"};break;case 82:this.$={type:"arrow_open",stroke:"dotted"};break;case 83:this.$={type:"arrow",stroke:"thick"};break;case 84:this.$={type:"arrow_circle",stroke:"thick"};break;case 85:this.$={type:"arrow_cross",stroke:"thick"};break;case 86:this.$={type:"arrow_open",stroke:"thick"};break;case 87:this.$=a[o-1];break;case 105:case 106:this.$=a[o-4],r.addClass(a[o-2],a[o]);break;case 107:this.$=a[o-4],r.setClass(a[o-2],a[o]);break;case 108:this.$=a[o-4],r.setClickEvent(a[o-2],a[o]);break;case 109:this.$=a[o-4],r.addVertex(a[o-2],void 0,void 0,a[o]);break;case 110:case 111:case 112:this.$=a[o-4],r.updateLink(a[o-2],a[o]);break;case 114:this.$=[a[o]];break;case 115:a[o-2].push(a[o]),this.$=a[o-2];break;case 117:this.$=a[o-1]+a[o]}},table:[{3:1,4:2,9:n,10:r,12:i},{1:[3]},e(a,o,{5:6}),{4:7,9:n,10:r,12:i},{4:8,9:n,10:r,12:i},{10:[1,9]},{1:[2,1],6:10,7:11,8:u,9:s,10:c,11:l,13:h,23:16,25:17,26:18,27:19,28:20,29:21,30:f,33:23,35:29,42:30,43:32,67:d,68:p,69:g,70:y,71:m,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(a,[2,9]),e(a,[2,10]),{13:[1,42],15:[1,43],16:[1,44],17:[1,45],18:[1,46]},e(M,[2,3]),e(M,[2,4]),e(M,[2,5]),e(M,[2,6]),e(M,[2,7]),e(M,[2,8]),{8:S,9:C,11:T,24:47},{8:S,9:C,11:T,24:51},{8:S,9:C,11:T,24:52},{8:S,9:C,11:T,24:53},{8:S,9:C,11:T,24:54},{8:S,9:C,11:T,24:55},{8:S,9:C,10:F,11:T,12:L,13:B,15:N,16:O,17:I,18:q,24:57,30:R,31:56,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(X,[2,42],{34:81,45:82,47:[1,83],48:[1,86],49:[1,87],50:[1,88],51:[1,89],52:[1,84],53:[1,90],54:[1,91],55:[1,92],56:[1,93],57:[1,85],58:[1,94],59:[1,95],60:[1,96],61:[1,97]}),{10:[1,98]},{10:[1,99]},{10:[1,100]},{10:[1,101]},{10:[1,102]},e(K,[2,53],{43:32,21:107,42:108,10:J,13:h,15:[1,106],36:[1,103],38:[1,104],40:[1,105],77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D}),e(Q,[2,55]),e(Q,[2,57]),e(Q,[2,58],{44:[1,110]}),e(te,[2,142]),e(te,[2,143]),e(te,[2,144]),e(te,[2,145]),e(te,[2,146]),e(te,[2,147]),e(te,[2,148]),e(te,[2,149]),e(te,[2,150]),{8:ee,9:ne,10:J,14:111,21:114},{8:ee,9:ne,10:J,14:115,21:114},{8:ee,9:ne,10:J,14:116,21:114},{8:ee,9:ne,10:J,14:117,21:114},{8:ee,9:ne,10:J,14:118,21:114},e(M,[2,30]),e(M,[2,38]),e(M,[2,39]),e(M,[2,40]),e(M,[2,31]),e(M,[2,32]),e(M,[2,33]),e(M,[2,34]),e(M,[2,35]),{8:S,9:C,10:F,11:T,12:L,13:B,15:N,16:O,17:I,18:q,24:119,30:R,32:P,43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(re,o,{5:121}),e(ie,[2,88]),e(ie,[2,131]),e(ie,[2,132]),e(ie,[2,133]),e(ie,[2,134]),e(ie,[2,135]),e(ie,[2,136]),e(ie,[2,137]),e(ie,[2,138]),e(ie,[2,139]),e(ie,[2,140]),e(ie,[2,141]),e(ie,[2,92]),e(ie,[2,93]),e(ie,[2,94]),e(ie,[2,95]),e(ie,[2,96]),e(ie,[2,97]),e(ie,[2,98]),e(ie,[2,99]),e(ie,[2,100]),e(ie,[2,101]),e(ie,[2,102]),{13:h,33:122,35:29,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(ae,[2,62],{46:123,62:[1,124]}),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:125,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:126,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:127,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(oe,[2,75]),e(oe,[2,76]),e(oe,[2,77]),e(oe,[2,78]),e(oe,[2,79]),e(oe,[2,80]),e(oe,[2,81]),e(oe,[2,82]),e(oe,[2,83]),e(oe,[2,84]),e(oe,[2,85]),e(oe,[2,86]),{13:h,35:128,42:30,43:32,76:[1,129],77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{74:[1,130],77:[1,131]},{13:h,35:133,42:30,43:32,74:[1,132],77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{13:h,35:134,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{13:h,35:135,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:136,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:138,32:P,38:[1,137],43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:139,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:140,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(K,[2,54]),e(Q,[2,56]),e(K,[2,29],{21:141,10:J}),{43:142,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(a,[2,11]),e(a,[2,21]),e(a,[2,22]),{9:[1,143]},e(a,[2,12]),e(a,[2,13]),e(a,[2,14]),e(a,[2,15]),e(re,o,{5:144}),e(ie,[2,89]),{6:10,7:11,8:u,9:s,10:c,11:l,13:h,23:16,25:17,26:18,27:19,28:20,29:21,30:f,32:[1,145],33:23,35:29,42:30,43:32,67:d,68:p,69:g,70:y,71:m,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(X,[2,41]),e(ae,[2,60],{10:[1,146]}),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:147,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,48:[1,148],49:[1,149],50:[1,150],51:[1,151],57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,53:[1,152],54:[1,153],55:[1,154],56:[1,155],57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,57:j,58:[1,156],59:[1,157],60:[1,158],61:[1,159],63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:[1,160],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:[1,161]},{10:[1,162]},{10:[1,163]},{10:[1,164]},{10:[1,165],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:[1,166],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:[1,167],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,37:[1,168],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:169,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,39:[1,170],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,41:[1,171],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,37:[1,172],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(K,[2,28]),e(Q,[2,59]),e(a,[2,23]),{6:10,7:11,8:u,9:s,10:c,11:l,13:h,23:16,25:17,26:18,27:19,28:20,29:21,30:f,32:[1,173],33:23,35:29,42:30,43:32,67:d,68:p,69:g,70:y,71:m,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{8:S,9:C,11:T,24:174},e(ae,[2,61]),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,57:j,62:[1,175],63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(ae,[2,63]),e(ae,[2,64]),e(ae,[2,65]),e(ae,[2,66]),e(ae,[2,67]),e(ae,[2,68]),e(ae,[2,69]),e(ae,[2,70]),e(ae,[2,71]),e(ae,[2,72]),e(ae,[2,73]),e(ae,[2,74]),{10:ue,44:se,67:ce,75:176,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:190,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:191,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:192,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:193,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:194,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{13:h,35:195,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{13:h,35:196,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(K,[2,43],{21:197,10:J}),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,39:[1,198],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(K,[2,47],{21:199,10:J}),e(K,[2,49],{21:200,10:J}),e(K,[2,51],{21:201,10:J}),{8:S,9:C,11:T,24:202},e(M,[2,37]),e([10,13,77,81,83,84,86,87,89,90,91],[2,87]),e(X,[2,109],{81:ve}),e(be,[2,114],{82:204,10:ue,44:se,67:ce,76:le,77:he,79:fe,83:de,84:pe,85:ge,86:ye,87:me}),e(_e,[2,116]),e(_e,[2,118]),e(_e,[2,119]),e(_e,[2,120]),e(_e,[2,121]),e(_e,[2,122]),e(_e,[2,123]),e(_e,[2,124]),e(_e,[2,125]),e(_e,[2,126]),e(_e,[2,127]),e(_e,[2,128]),e(X,[2,110],{81:ve}),e(X,[2,111],{81:ve}),e(X,[2,112],{81:ve}),e(X,[2,105],{81:ve}),e(X,[2,106],{81:ve}),e(X,[2,107],{43:32,42:108,13:h,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D}),e(X,[2,108],{43:32,42:108,13:h,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D}),e(K,[2,44]),{39:[1,205]},e(K,[2,48]),e(K,[2,50]),e(K,[2,52]),e(M,[2,36]),{10:ue,44:se,67:ce,76:le,77:he,79:fe,80:206,82:178,83:de,84:pe,85:ge,86:ye,87:me},e(_e,[2,117]),e(K,[2,45],{21:207,10:J}),e(be,[2,115],{82:204,10:ue,44:se,67:ce,76:le,77:he,79:fe,83:de,84:pe,85:ge,86:ye,87:me}),e(K,[2,46])],defaultActions:{},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,k,A,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(A in o[x])this.terminals_[A]&&A>h&&M.push("'"+this.terminals_[A]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),k=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof k)return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},we=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!1):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:break; case 1:return 67;case 2:return 74;case 3:return 68;case 4:return 69;case 5:return 70;case 6:return 71;case 7:return 12;case 8:return 30;case 9:return 32;case 10:return 13;case 11:return 13;case 12:return 13;case 13:return 13;case 14:return 13;case 15:return 13;case 16:return 77;case 17:return 86;case 18:return 84;case 19:return 8;case 20:return 81;case 21:return 91;case 22:return 16;case 23:return 15;case 24:return 17;case 25:return 18;case 26:return 50;case 27:return 48;case 28:return 49;case 29:return 51;case 30:return 55;case 31:return 53;case 32:return 54;case 33:return 56;case 34:return 55;case 35:return 53;case 36:return 54;case 37:return 56;case 38:return 60;case 39:return 58;case 40:return 59;case 41:return 61;case 42:return 47;case 43:return 52;case 44:return 57;case 45:return 44;case 46:return 87;case 47:return 89;case 48:return 79;case 49:return 90;case 50:return 90;case 51:return 83;case 52:return 62;case 53:return 38;case 54:return 39;case 55:return 36;case 56:return 37;case 57:return 40;case 58:return 41;case 59:return 94;case 60:return 9;case 61:return 10;case 62:return 11}},rules:[/^(?:%%[^\n]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:click\b)/,/^(?:graph\b)/,/^(?:subgraph\b)/,/^(?:end\b)/,/^(?:LR\b)/,/^(?:RL\b)/,/^(?:TB\b)/,/^(?:BT\b)/,/^(?:TD\b)/,/^(?:BR\b)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:v\b)/,/^(?:\s*--[x]\s*)/,/^(?:\s*-->\s*)/,/^(?:\s*--[o]\s*)/,/^(?:\s*---\s*)/,/^(?:\s*-\.-[x]\s*)/,/^(?:\s*-\.->\s*)/,/^(?:\s*-\.-[o]\s*)/,/^(?:\s*-\.-\s*)/,/^(?:\s*.-[x]\s*)/,/^(?:\s*\.->\s*)/,/^(?:\s*\.-[o]\s*)/,/^(?:\s*\.-\s*)/,/^(?:\s*==[x]\s*)/,/^(?:\s*==>\s*)/,/^(?:\s*==[o]\s*)/,/^(?:\s*==[\=]\s*)/,/^(?:\s*--\s*)/,/^(?:\s*-\.\s*)/,/^(?:\s*==\s*)/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:[\u0021-\u0027\u002A-\u002E\u003F\u0041-\u005A\u005C\u005F-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC_\/])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:\n+)/,/^(?:\s)/,/^(?:$)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62],inclusive:!0}}};return t}();return xe.lexer=we,t.prototype=xe,xe.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],94:[function(t,e){e.exports=t(88)},{d3:1}],95:[function(t,e,n){var r=t("moment"),i="",a="",o=[],u=[],s="";n.clear=function(){o=[],u=[],s="",a="",f=0,c=void 0},n.setDateFormat=function(t){i=t},n.getDateFormat=function(){return i},n.setTitle=function(t){a=t},n.getTitle=function(){return a},n.addSection=function(t){s=t,o.push(t)},n.findTaskById=function(t){var e;for(e=0;en-e?n+i+1.5*o.sidePadding>u?e+r-5:n+r+5:(n-e)/2+e+r}).attr("y",function(t,r){return r*e+o.barHeight/2+(o.fontSize/2-2)+n}).attr("text-height",i).attr("class",function(t){for(var e=w(t.startTime),n=w(t.endTime),r=this.getBBox().width,i=0,a=0;an-e?n+r+1.5*o.sidePadding>u?"taskTextOutsideLeft taskTextOutside"+i+" "+s:"taskTextOutsideRight taskTextOutside"+i+" "+s:"taskText taskText"+i+" "+s})}}function l(t,e,n,a){var u,s=[[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["h1 %I:%M",function(t){return t.getMinutes()}]],c=[["%Y",function(){return!0}]],l=[["%I:%M",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}]];"undefined"!=typeof o.axisFormatter&&(l=[],o.axisFormatter.forEach(function(t){var e=[];e[0]=t[0],e[1]=t[1],l.push(e)})),u=s.concat(l).concat(c);var h=i.svg.axis().scale(w).orient("bottom").tickSize(-a+e+o.gridLineStartPadding,0,0).tickFormat(i.time.format.multi(u));r>7&&230>r&&(h=h.ticks(i.time.monday.range));b.append("g").attr("class","grid").attr("transform","translate("+t+", "+(a-50)+")").call(h).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em")}function h(t,e){for(var n=[],r=0,i=0;i0))return i[1]*t/2+e;for(var o=0;a>o;o++)return r+=n[a-1][1],i[1]*t/2+r*t+e}).attr("class",function(t){for(var e=0;er;++r)e.hasOwnProperty(t[r])||(e[t[r]]=!0,n.push(t[r]));return n}function p(t){for(var e=t.length,n={};e;)n[t[--e]]=(n[t[e]]||0)+1;return n}function g(t,e){return p(e)[t]||0}n.yy.clear(),n.parse(t);var y=document.getElementById(e);u=y.offsetWidth,"undefined"==typeof u&&(u=800);var m=n.yy.getTasks(),v=m.length*(o.barHeight+o.barGap)+2*o.topPadding;y.style.height=v+"px";var b=i.select("#"+e),_=(i.time.format("%Y-%m-%d"),i.min(m,function(t){return t.startTime})),x=i.max(m,function(t){return t.endTime}),w=i.time.scale().domain([i.min(m,function(t){return t.startTime}),i.max(m,function(t){return t.endTime})]).rangeRound([0,u-150]),k=[];r=a.duration(x-_).asDays();for(var A=0;Ah&&M.push("'"+this.terminals_[A]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),k=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof k)return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},s=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!1):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 10;case 1:break;case 2:break;case 3:break;case 4:return 4;case 5:return 11;case 6:return"date";case 7:return 12;case 8:return 13;case 9:return 14;case 10:return 15;case 11:return":";case 12:return 6;case 13:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};return t}();return u.lexer=s,t.prototype=u,u.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],98:[function(t,e){e.exports=t(88)},{d3:1}],99:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[6,8,10,11,15,17,19,20,22,33],r=[2,2],i=[1,6],a=[1,8],o=[1,9],u=[1,12],s=[1,13],c=[1,14],l=[1,15],h=[1,17],f=[1,18],d=[2,7],p=[6,8,10,11,15,17,18,19,20,21,22,33],g=[6,8,10,11,15,17,18,19,20,22,33],y=[1,46],m=[1,49],v=[1,53],b={trace:function(){},yy:{},symbols_:{error:2,start:3,SD:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,participant:11,actor:12,signal:13,note_statement:14,title:15,text:16,loop:17,end:18,opt:19,alt:20,"else":21,note:22,placement:23,text2:24,over:25,spaceList:26,actor_pair:27,",":28,left_of:29,right_of:30,signaltype:31,actors:32,ACTOR:33,SOLID_OPEN_ARROW:34,DOTTED_OPEN_ARROW:35,SOLID_ARROW:36,DOTTED_ARROW:37,SOLID_CROSS:38,DOTTED_CROSS:39,TXT:40,$accept:0,$end:1},terminals_:{2:"error",4:"SD",6:"EOF",8:"SPACE",10:"NL",11:"participant",15:"title",16:"text",17:"loop",18:"end",19:"opt",20:"alt",21:"else",22:"note",25:"over",28:",",29:"left_of",30:"right_of",33:"ACTOR",34:"SOLID_OPEN_ARROW",35:"DOTTED_OPEN_ARROW",36:"SOLID_ARROW",37:"DOTTED_ARROW",38:"SOLID_CROSS",39:"DOTTED_CROSS",40:"TXT"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,3],[9,2],[9,2],[9,4],[9,4],[9,4],[9,7],[14,4],[14,5],[26,2],[26,1],[27,1],[27,3],[23,1],[23,1],[13,4],[32,2],[32,1],[12,1],[31,1],[31,1],[31,1],[31,1],[31,1],[31,1],[24,1]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 1:return r.apply(a[o-1]),a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:this.$=a[o-1];break;case 12:a[o-1].unshift({type:"loopStart",loopText:a[o-2].actor,signalType:r.LINETYPE.LOOP_START}),a[o-1].push({type:"loopEnd",loopText:a[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[o-1];break;case 13:a[o-1].unshift({type:"optStart",optText:a[o-2].actor,signalType:r.LINETYPE.OPT_START}),a[o-1].push({type:"optEnd",optText:a[o-2].actor,signalType:r.LINETYPE.OPT_END}),this.$=a[o-1];break;case 14:a[o-4].unshift({type:"altStart",altText:a[o-5].actor,signalType:r.LINETYPE.ALT_START}),a[o-4].push({type:"else",altText:a[o-2].actor,signalType:r.LINETYPE.ALT_ELSE}),a[o-4]=a[o-4].concat(a[o-1]),a[o-4].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=a[o-4];break;case 15:this.$=[a[o-1],{type:"addNote",placement:a[o-2],actor:a[o-1].actor,text:a[o]}];break;case 19:this.$=a[o];break;case 20:this.$=[a[o-2],a[o]];break;case 21:this.$=r.PLACEMENT.LEFTOF;break;case 22:this.$=r.PLACEMENT.RIGHTOF;break;case 23:this.$=[a[o-3],a[o-1],{type:"addMessage",from:a[o-3].actor,to:a[o-1].actor,signalType:a[o-2],msg:a[o]}];break;case 26:this.$={type:"addActor",actor:a[o]};break;case 27:this.$=r.LINETYPE.SOLID_OPEN;break;case 28:this.$=r.LINETYPE.DOTTED_OPEN;break;case 29:this.$=r.LINETYPE.SOLID;break;case 30:this.$=r.LINETYPE.DOTTED;break;case 31:this.$=r.LINETYPE.SOLID_CROSS;break;case 32:this.$=r.LINETYPE.DOTTED_CROSS;break;case 33:this.$=a[o].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:[1,2]},{1:[3]},e(n,r,{5:3}),{6:[1,4],7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,22:h,33:f},e(n,d,{1:[2,1]}),e(p,[2,3]),{9:19,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,22:h,33:f},e(p,[2,5]),e(p,[2,6]),{12:20,33:f},{10:[1,21]},{10:[1,22]},{8:[1,23]},{12:24,33:f},{12:25,33:f},{12:26,33:f},{31:27,34:[1,28],35:[1,29],36:[1,30],37:[1,31],38:[1,32],39:[1,33]},{23:34,25:[1,35],29:[1,36],30:[1,37]},e([6,8,10,11,15,17,18,19,20,21,22,28,33,34,35,36,37,38,39,40],[2,26]),e(p,[2,4]),{10:[1,38]},e(p,[2,9]),e(p,[2,10]),{16:[1,39]},e(g,r,{5:40}),e(g,r,{5:41}),e([6,8,10,11,15,17,19,20,21,22,33],r,{5:42}),{12:43,33:f},{33:[2,27]},{33:[2,28]},{33:[2,29]},{33:[2,30]},{33:[2,31]},{33:[2,32]},{12:44,33:f},{8:y,26:45},{33:[2,21]},{33:[2,22]},e(p,[2,8]),{10:[1,47]},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,48],19:c,20:l,22:h,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,50],19:c,20:l,22:h,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,21:[1,51],22:h,33:f},{24:52,40:v},{24:54,40:v},{12:56,27:55,33:f},{8:y,26:57,33:[2,18]},e(p,[2,11]),e(p,[2,12]),e(p,d),e(p,[2,13]),{12:58,33:f},{10:[2,23]},{10:[2,33]},{10:[2,15]},{12:59,33:f},{28:[1,60],33:[2,19]},{33:[2,17]},e(g,r,{5:61}),{10:[2,16]},{12:62,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,63],19:c,20:l,22:h,33:f},{33:[2,20]},e(p,[2,14])],defaultActions:{28:[2,27],29:[2,28],30:[2,29],31:[2,30],32:[2,31],33:[2,32],36:[2,21],37:[2,22],52:[2,23],53:[2,33],54:[2,15],57:[2,17],59:[2,16],62:[2,20]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,k,A,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(A in o[x])this.terminals_[A]&&A>h&&M.push("'"+this.terminals_[A]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),k=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof k)return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},_=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno}) -},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!1):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 10;case 1:return 38;case 2:return 39;case 3:return 36;case 4:return 37;case 5:break;case 6:break;case 7:break;case 8:return 11;case 9:return 19;case 10:return 17;case 11:return 20;case 12:return 21;case 13:return 18;case 14:return 29;case 15:return 30;case 16:return 25;case 17:return 22;case 18:return 15;case 19:return 4;case 20:return 28;case 21:return 10;case 22:return 33;case 23:return 34;case 24:return 35;case 25:return 36;case 26:return 37;case 27:return 40;case 28:return 6;case 29:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:[\-][x])/i,/^(?:[\-][\-][x])/i,/^(?:[\-][>][>])/i,/^(?:[\-][\-][>][>])/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:participant\b)/i,/^(?:opt\b)/i,/^(?:loop\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:title\b)/i,/^(?:sequenceDiagram\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\->:\n,;]+)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?::[^#\n;]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29],inclusive:!0}}};return t}();return b.lexer=_,t.prototype=b,b.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],100:[function(t,e,n){var r={},i=[],a=[],o=[];n.addActor=function(t,e,n){r[t]={name:e,description:n},i.push(t)},n.addMessage=function(t,e,n,r){a.push({from:t,to:e,message:n,answer:r})},n.addSignal=function(t,e,n,r){a.push({from:t,to:e,message:n,type:r})},n.getMessages=function(){return a},n.getActors=function(){return r},n.getActor=function(t){return r[t]},n.getActorKeys=function(){return Object.keys(r)},n.clear=function(){r={},a=[]},n.LINETYPE={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16},n.ARROWTYPE={FILLED:0,OPEN:1},n.PLACEMENT={LEFTOF:0,RIGHTOF:1,OVER:2},n.addNote=function(t,e,r){var i={actor:t,placement:e,message:r};o.push(i),a.push({from:t,to:t,message:r,type:n.LINETYPE.NOTE,placement:e})},n.parseError=function(t,e){mermaid.parseError(t,e)},n.apply=function(t){if(t instanceof Array)t.forEach(function(t){n.apply(t)});else switch(t.type){case"addActor":n.addActor(t.actor,t.actor,t.actor);break;case"addNote":n.addNote(t.actor,t.placement,t.text);break;case"addMessage":n.addSignal(t.from,t.to,t.msg,t.signalType);break;case"loopStart":n.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":n.addSignal(void 0,void 0,void 0,t.signalType);break;case"optStart":n.addSignal(void 0,void 0,t.optText,t.signalType);break;case"optEnd":n.addSignal(void 0,void 0,void 0,t.signalType);break;case"altStart":n.addSignal(void 0,void 0,t.altText,t.signalType);break;case"else":n.addSignal(void 0,void 0,t.altText,t.signalType);break;case"altEnd":n.addSignal(void 0,void 0,void 0,t.signalType)}}},{}],101:[function(t,e,n){var r=t("./parser/sequenceDiagram").parser;r.yy=t("./sequenceDb");var i=t("./svgDraw"),a=t("./d3"),o={diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!1,bottomMarginAdj:1};n.bounds={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,list:[],init:function(){this.list=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,n,r){t[e]="undefined"==typeof t[e]?n:r(n,t[e])},updateLoops:function(t,e,r,i){var a=this,u=0;this.list.forEach(function(s){u++;var c=a.list.length-u+1;a.updateVal(s,"startx",t-c*o.boxMargin,Math.min),a.updateVal(s,"starty",e-c*o.boxMargin,Math.min),a.updateVal(s,"stopx",r+c*o.boxMargin,Math.max),a.updateVal(s,"stopy",i+c*o.boxMargin,Math.max),a.updateVal(n.bounds.data,"startx",t-c*o.boxMargin,Math.min),a.updateVal(n.bounds.data,"starty",e-c*o.boxMargin,Math.min),a.updateVal(n.bounds.data,"stopx",r+c*o.boxMargin,Math.max),a.updateVal(n.bounds.data,"stopy",i+c*o.boxMargin,Math.max)})},insert:function(t,e,r,i){var a,o,u,s;a=Math.min(t,r),u=Math.max(t,r),o=Math.min(e,i),s=Math.max(e,i),this.updateVal(n.bounds.data,"startx",a,Math.min),this.updateVal(n.bounds.data,"starty",o,Math.min),this.updateVal(n.bounds.data,"stopx",u,Math.max),this.updateVal(n.bounds.data,"stopy",s,Math.max),this.updateLoops(a,o,u,s)},newLoop:function(t){this.list.push({startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t})},endLoop:function(){var t=this.list.pop();return t},addElseToLoop:function(t){var e=this.list.pop();e.elsey=n.bounds.getVerticalPos(),e.elseText=t,this.list.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}};var u=function(t,e,r,a){var u=i.getNoteRect();u.x=e,u.y=r,u.width=o.width,u.class="note";var s=t.append("g"),c=i.drawRect(s,u),l=i.getTextObj();l.x=e,l.y=r+o.noteMargin,l.textMargin=o.noteMargin,l.dy="1em",l.text=a.message,l.class="noteText";var h=i.drawText(s,l),f=h[0][0].getBBox().height;n.bounds.insert(e,r,e+o.width,r+2*o.noteMargin+f),c.attr("height",f+2*o.noteMargin),n.bounds.bumpVerticalPos(f+2*o.noteMargin)},s=function(t,e,i,a,o){var u,s=t.append("g"),c=e+(i-e)/2,l=s.append("text").attr("x",c).attr("y",a-7).style("text-anchor","middle").attr("class","messageText").text(o.message),h=l[0][0].getBBox().width;if(e===i){u=s.append("path").attr("d","M "+e+","+a+" C "+(e+60)+","+(a-10)+" "+(e+60)+","+(a+30)+" "+e+","+(a+20)),n.bounds.bumpVerticalPos(30);var f=Math.max(h/2,100);n.bounds.insert(e-f,n.bounds.getVerticalPos()-10,i+f,n.bounds.getVerticalPos())}else u=s.append("line"),u.attr("x1",e),u.attr("y1",a),u.attr("x2",i),u.attr("y2",a),n.bounds.insert(e,n.bounds.getVerticalPos()-10,i,n.bounds.getVerticalPos());o.type===r.yy.LINETYPE.DOTTED||o.type===r.yy.LINETYPE.DOTTED_CROSS||o.type===r.yy.LINETYPE.DOTTED_OPEN?(u.style("stroke-dasharray","3, 3"),u.attr("class","messageLine1")):u.attr("class","messageLine0"),u.attr("stroke-width",2),u.attr("stroke","black"),u.style("fill","none"),(o.type===r.yy.LINETYPE.SOLID||o.type===r.yy.LINETYPE.DOTTED)&&u.attr("marker-end","url(#arrowhead)"),(o.type===r.yy.LINETYPE.SOLID_CROSS||o.type===r.yy.LINETYPE.DOTTED_CROSS)&&u.attr("marker-end","url(#crosshead)")};e.exports.drawActors=function(t,e,r,a){var u;for(u=0;u/gi).forEach(function(t){var r=n.append("tspan");r.attr("x",e.x+e.textMargin),r.attr("dy",e.dy),r.text(t)}),"undefined"!=typeof e.class&&n.attr("class",e.class),n},n.drawLabel=function(t,e){var r=n.getNoteRect();r.x=e.x,r.y=e.y,r.width=50,r.height=20,r.fill="#526e52",r.stroke="none",r.class="labelBox",n.drawRect(t,r),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,e.fill="white",n.drawText(t,e)},n.drawActor=function(t,e,r,i,a){var o=e+a.width/2,u=t.append("g");0===r&&u.append("line").attr("x1",o).attr("y1",5).attr("x2",o).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999");var s=n.getNoteRect();s.x=e,s.y=r,s.fill="#eaeaea",s.width=a.width,s.height=a.height,s.class="actor",s.rx=3,s.ry=3,n.drawRect(u,s),u.append("text").attr("x",o).attr("y",r+a.height/2+5).attr("class","actor").style("text-anchor","middle").text(i)},n.drawLoop=function(t,e,r,i){var a=t.append("g"),o=function(t,e,n,r){a.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",r).attr("stroke-width",2).attr("stroke","#526e52").attr("class","loopLine")};o(e.startx,e.starty,e.stopx,e.starty),o(e.stopx,e.starty,e.stopx,e.stopy),o(e.startx,e.stopy,e.stopx,e.stopy),o(e.startx,e.starty,e.startx,e.stopy),"undefined"!=typeof e.elsey&&o(e.startx,e.elsey,e.stopx,e.elsey);var u=n.getTextObj();u.text=r,u.x=e.startx,u.y=e.starty,u.labelMargin=1.5*i.boxMargin,u.class="labelText",u.fill="white",n.drawLabel(a,u),u=n.getTextObj(),u.text="[ "+e.title+" ]",u.x=e.startx+(e.stopx-e.startx)/2,u.y=e.starty+1.5*i.boxMargin,u.anchor="middle",u.class="loopText",n.drawText(a,u),"undefined"!=typeof e.elseText&&(u.text="[ "+e.elseText+" ]",u.y=e.elsey+1.5*i.boxMargin,n.drawText(a,u))},n.insertArrowHead=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},n.insertArrowCrossHead=function(t){var e=t.append("defs"),n=e.append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);n.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),n.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},n.getTextObj=function(){var t={x:0,y:0,fill:"black","text-anchor":"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0};return t},n.getNoteRect=function(){var t={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0};return t}},{}],103:[function(t,e,n){(function(e){var r=t("./diagrams/flowchart/graphDb"),i=t("./diagrams/flowchart/parser/flow"),a=t("./utils"),o=t("./diagrams/flowchart/flowRenderer"),u=t("./diagrams/sequenceDiagram/sequenceRenderer"),s=t("./diagrams/example/exampleRenderer"),c=t("he"),l=t("./diagrams/example/parser/example"),h=t("./diagrams/flowchart/parser/flow"),f=t("./diagrams/flowchart/parser/dot"),d=t("./diagrams/sequenceDiagram/parser/sequenceDiagram"),p=t("./diagrams/sequenceDiagram/sequenceDb"),g=t("./diagrams/example/exampleDb"),y=t("./diagrams/gantt/ganttRenderer"),m=t("./diagrams/gantt/parser/gantt"),v=t("./diagrams/gantt/ganttDb"),b=0,_=function(t){var e,n=a.detectType(t);switch(n){case"graph":e=h,e.parser.yy=r;break;case"dotGraph":e=f,e.parser.yy=r;break;case"sequenceDiagram":e=d,e.parser.yy=p;break;case"info":e=l,e.parser.yy=g;break;case"gantt":e=m,e.parser.yy=v}try{return e.parse(t),!0}catch(i){return!1}},x=function(t,e){e=null==e?document.querySelectorAll(".mermaid"):"string"==typeof e?document.querySelectorAll(e):e instanceof Node?[e]:e;var i;for("undefined"!==t&&"undefined"!=typeof t&&u.setConf("object"==typeof t?t:JSON.parse(t)),i=0;i/g,">"),h=h.replace(/';var f=a.detectType(h),d={};switch(f){case"graph":d=o.getClasses(h,!1),"object"==typeof mermaid.flowchartConfig&&o.setConf(mermaid.flowchartConfig),o.draw(h,id,!1),a.cloneCssStyles(l.firstChild,d),r.bindFunctions();break;case"dotGraph":d=o.getClasses(h,!0),o.draw(h,id,!0),a.cloneCssStyles(l.firstChild,d);break;case"sequenceDiagram":u.draw(h,id),a.cloneCssStyles(l.firstChild,[]);break;case"gantt":"object"==typeof mermaid.ganttConfig&&y.setConf(mermaid.ganttConfig),y.draw(h,id),a.cloneCssStyles(l.firstChild,[]);break;case"info":s.draw(h,id,n.version()),a.cloneCssStyles(l.firstChild,[])}}}};n.tester=function(){},n.version=function(){return t("../package.json").version};var w=function(t,e){return"undefined"==typeof e?!1:t===e};e.mermaid={startOnLoad:!0,htmlLabels:!0,init:function(){x.apply(null,arguments)},version:function(){return n.version()},getParser:function(){return i.parser},parse:function(t){return _(t)},parseError:function(t){console.log("Mermaid Syntax error:"),console.log(t)}},n.contentLoaded=function(){"undefined"!=typeof mermaid_config&&w(!1,mermaid_config.htmlLabels)&&(e.mermaid.htmlLabels=!1),e.mermaid.startOnLoad&&("undefined"!=typeof mermaid_config?w(!0,mermaid_config.startOnLoad)&&e.mermaid.init(mermaid.sequenceConfig):e.mermaid.init(mermaid.sequenceConfig))},"undefined"!=typeof document&&document.addEventListener("DOMContentLoaded",function(){n.contentLoaded()},!1)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../package.json":84,"./diagrams/example/exampleDb":85,"./diagrams/example/exampleRenderer":86,"./diagrams/example/parser/example":87,"./diagrams/flowchart/flowRenderer":90,"./diagrams/flowchart/graphDb":91,"./diagrams/flowchart/parser/dot":92,"./diagrams/flowchart/parser/flow":93,"./diagrams/gantt/ganttDb":95,"./diagrams/gantt/ganttRenderer":96,"./diagrams/gantt/parser/gantt":97,"./diagrams/sequenceDiagram/parser/sequenceDiagram":99,"./diagrams/sequenceDiagram/sequenceDb":100,"./diagrams/sequenceDiagram/sequenceRenderer":101,"./utils":104,he:81}],104:[function(t,e){e.exports.detectType=function(t){return t.match(/^\s*sequenceDiagram/)?"sequenceDiagram":t.match(/^\s*sequence/)?"sequence":t.match(/^\s*digraph/)?"dotGraph":t.match(/^\s*info/)?"info":t.match(/^\s*gantt/)?"gantt":"graph"},e.exports.cloneCssStyles=function(t,e){for(var n="",r=document.styleSheets,i=0;i0&&(n+=u.selectorText+" { "+u.style.cssText+" }\n")}}}catch(c){"undefined"!=typeof console&&"undefined"!==console.warn&&console.warn('Invalid CSS selector "'+u.selectorText+'"',c)}var l="",h="";for(var f in e)e.hasOwnProperty(f)&&"undefined"!=typeof f&&("default"===f?(e.default.styles instanceof Array&&(l+="#"+t.id.trim()+" .node { "+e[f].styles.join("; ")+"; }\n"),e.default.nodeLabelStyles instanceof Array&&(l+="#"+t.id.trim()+" .node text { "+e[f].nodeLabelStyles.join("; ")+"; }\n"),e.default.edgeLabelStyles instanceof Array&&(l+="#"+t.id.trim()+" .edgeLabel text { "+e[f].edgeLabelStyles.join("; ")+"; }\n")):e[f].styles instanceof Array&&(h+="#"+t.id.trim()+" ."+f+" { "+e[f].styles.join("; ")+"; }\n"));if(""!==n||""!==l||""!==h){var d=document.createElement("style");d.setAttribute("type","text/css"),d.setAttribute("title","mermaid-svg-internal-css"),d.innerHTML="/* */\n",t.insertBefore(d,t.firstChild)}}},{}]},{},[103])}(); \ No newline at end of file +},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!1):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 10;case 1:return 38;case 2:return 39;case 3:return 36;case 4:return 37;case 5:break;case 6:break;case 7:break;case 8:return 11;case 9:return 19;case 10:return 17;case 11:return 20;case 12:return 21;case 13:return 18;case 14:return 29;case 15:return 30;case 16:return 25;case 17:return 22;case 18:return 15;case 19:return 4;case 20:return 28;case 21:return 10;case 22:return 33;case 23:return 34;case 24:return 35;case 25:return 36;case 26:return 37;case 27:return 40;case 28:return 6;case 29:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:[\-][x])/i,/^(?:[\-][\-][x])/i,/^(?:[\-][>][>])/i,/^(?:[\-][\-][>][>])/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:participant\b)/i,/^(?:opt\b)/i,/^(?:loop\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:title\b)/i,/^(?:sequenceDiagram\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\->:\n,;]+)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?::[^#\n;]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29],inclusive:!0}}};return t}();return b.lexer=_,t.prototype=b,b.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],100:[function(t,e,n){var r={},i=[],a=[],o=[];n.addActor=function(t,e,n){r[t]={name:e,description:n},i.push(t)},n.addMessage=function(t,e,n,r){a.push({from:t,to:e,message:n,answer:r})},n.addSignal=function(t,e,n,r){a.push({from:t,to:e,message:n,type:r})},n.getMessages=function(){return a},n.getActors=function(){return r},n.getActor=function(t){return r[t]},n.getActorKeys=function(){return Object.keys(r)},n.clear=function(){r={},a=[]},n.LINETYPE={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16},n.ARROWTYPE={FILLED:0,OPEN:1},n.PLACEMENT={LEFTOF:0,RIGHTOF:1,OVER:2},n.addNote=function(t,e,r){var i={actor:t,placement:e,message:r};o.push(i),a.push({from:t,to:t,message:r,type:n.LINETYPE.NOTE,placement:e})},n.parseError=function(t,e){mermaid.parseError(t,e)},n.apply=function(t){if(t instanceof Array)t.forEach(function(t){n.apply(t)});else switch(t.type){case"addActor":n.addActor(t.actor,t.actor,t.actor);break;case"addNote":n.addNote(t.actor,t.placement,t.text);break;case"addMessage":n.addSignal(t.from,t.to,t.msg,t.signalType);break;case"loopStart":n.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":n.addSignal(void 0,void 0,void 0,t.signalType);break;case"optStart":n.addSignal(void 0,void 0,t.optText,t.signalType);break;case"optEnd":n.addSignal(void 0,void 0,void 0,t.signalType);break;case"altStart":n.addSignal(void 0,void 0,t.altText,t.signalType);break;case"else":n.addSignal(void 0,void 0,t.altText,t.signalType);break;case"altEnd":n.addSignal(void 0,void 0,void 0,t.signalType)}}},{}],101:[function(t,e,n){var r=t("./parser/sequenceDiagram").parser;r.yy=t("./sequenceDb");var i=t("./svgDraw"),a=t("./d3"),o={diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!1,bottomMarginAdj:1};n.bounds={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,list:[],init:function(){this.list=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,n,r){t[e]="undefined"==typeof t[e]?n:r(n,t[e])},updateLoops:function(t,e,r,i){var a=this,u=0;this.list.forEach(function(s){u++;var c=a.list.length-u+1;a.updateVal(s,"startx",t-c*o.boxMargin,Math.min),a.updateVal(s,"starty",e-c*o.boxMargin,Math.min),a.updateVal(s,"stopx",r+c*o.boxMargin,Math.max),a.updateVal(s,"stopy",i+c*o.boxMargin,Math.max),a.updateVal(n.bounds.data,"startx",t-c*o.boxMargin,Math.min),a.updateVal(n.bounds.data,"starty",e-c*o.boxMargin,Math.min),a.updateVal(n.bounds.data,"stopx",r+c*o.boxMargin,Math.max),a.updateVal(n.bounds.data,"stopy",i+c*o.boxMargin,Math.max)})},insert:function(t,e,r,i){var a,o,u,s;a=Math.min(t,r),u=Math.max(t,r),o=Math.min(e,i),s=Math.max(e,i),this.updateVal(n.bounds.data,"startx",a,Math.min),this.updateVal(n.bounds.data,"starty",o,Math.min),this.updateVal(n.bounds.data,"stopx",u,Math.max),this.updateVal(n.bounds.data,"stopy",s,Math.max),this.updateLoops(a,o,u,s)},newLoop:function(t){this.list.push({startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t})},endLoop:function(){var t=this.list.pop();return t},addElseToLoop:function(t){var e=this.list.pop();e.elsey=n.bounds.getVerticalPos(),e.elseText=t,this.list.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}};var u=function(t,e,r,a){var u=i.getNoteRect();u.x=e,u.y=r,u.width=o.width,u.class="note";var s=t.append("g"),c=i.drawRect(s,u),l=i.getTextObj();l.x=e,l.y=r+o.noteMargin,l.textMargin=o.noteMargin,l.dy="1em",l.text=a.message,l.class="noteText";var h=i.drawText(s,l),f=h[0][0].getBBox().height;n.bounds.insert(e,r,e+o.width,r+2*o.noteMargin+f),c.attr("height",f+2*o.noteMargin),n.bounds.bumpVerticalPos(f+2*o.noteMargin)},s=function(t,e,i,a,o){var u,s=t.append("g"),c=e+(i-e)/2,l=s.append("text").attr("x",c).attr("y",a-7).style("text-anchor","middle").attr("class","messageText").text(o.message),h=l[0][0].getBBox().width;if(e===i){u=s.append("path").attr("d","M "+e+","+a+" C "+(e+60)+","+(a-10)+" "+(e+60)+","+(a+30)+" "+e+","+(a+20)),n.bounds.bumpVerticalPos(30);var f=Math.max(h/2,100);n.bounds.insert(e-f,n.bounds.getVerticalPos()-10,i+f,n.bounds.getVerticalPos())}else u=s.append("line"),u.attr("x1",e),u.attr("y1",a),u.attr("x2",i),u.attr("y2",a),n.bounds.insert(e,n.bounds.getVerticalPos()-10,i,n.bounds.getVerticalPos());o.type===r.yy.LINETYPE.DOTTED||o.type===r.yy.LINETYPE.DOTTED_CROSS||o.type===r.yy.LINETYPE.DOTTED_OPEN?(u.style("stroke-dasharray","3, 3"),u.attr("class","messageLine1")):u.attr("class","messageLine0"),u.attr("stroke-width",2),u.attr("stroke","black"),u.style("fill","none"),(o.type===r.yy.LINETYPE.SOLID||o.type===r.yy.LINETYPE.DOTTED)&&u.attr("marker-end","url(#arrowhead)"),(o.type===r.yy.LINETYPE.SOLID_CROSS||o.type===r.yy.LINETYPE.DOTTED_CROSS)&&u.attr("marker-end","url(#crosshead)")};e.exports.drawActors=function(t,e,r,a){var u;for(u=0;u/gi).forEach(function(t){var r=n.append("tspan");r.attr("x",e.x+e.textMargin),r.attr("dy",e.dy),r.text(t)}),"undefined"!=typeof e.class&&n.attr("class",e.class),n},n.drawLabel=function(t,e){var r=n.getNoteRect();r.x=e.x,r.y=e.y,r.width=50,r.height=20,r.fill="#526e52",r.stroke="none",r.class="labelBox",n.drawRect(t,r),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,e.fill="white",n.drawText(t,e)},n.drawActor=function(t,e,r,i,a){var o=e+a.width/2,u=t.append("g");0===r&&u.append("line").attr("x1",o).attr("y1",5).attr("x2",o).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999");var s=n.getNoteRect();s.x=e,s.y=r,s.fill="#eaeaea",s.width=a.width,s.height=a.height,s.class="actor",s.rx=3,s.ry=3,n.drawRect(u,s),u.append("text").attr("x",o).attr("y",r+a.height/2+5).attr("class","actor").style("text-anchor","middle").text(i)},n.drawLoop=function(t,e,r,i){var a=t.append("g"),o=function(t,e,n,r){a.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",r).attr("stroke-width",2).attr("stroke","#526e52").attr("class","loopLine")};o(e.startx,e.starty,e.stopx,e.starty),o(e.stopx,e.starty,e.stopx,e.stopy),o(e.startx,e.stopy,e.stopx,e.stopy),o(e.startx,e.starty,e.startx,e.stopy),"undefined"!=typeof e.elsey&&o(e.startx,e.elsey,e.stopx,e.elsey);var u=n.getTextObj();u.text=r,u.x=e.startx,u.y=e.starty,u.labelMargin=1.5*i.boxMargin,u.class="labelText",u.fill="white",n.drawLabel(a,u),u=n.getTextObj(),u.text="[ "+e.title+" ]",u.x=e.startx+(e.stopx-e.startx)/2,u.y=e.starty+1.5*i.boxMargin,u.anchor="middle",u.class="loopText",n.drawText(a,u),"undefined"!=typeof e.elseText&&(u.text="[ "+e.elseText+" ]",u.y=e.elsey+1.5*i.boxMargin,n.drawText(a,u))},n.insertArrowHead=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},n.insertArrowCrossHead=function(t){var e=t.append("defs"),n=e.append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);n.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),n.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},n.getTextObj=function(){var t={x:0,y:0,fill:"black","text-anchor":"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0};return t},n.getNoteRect=function(){var t={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0};return t}},{}],103:[function(t,e,n){(function(e){var r=t("./diagrams/flowchart/graphDb"),i=t("./diagrams/flowchart/parser/flow"),a=t("./utils"),o=t("./diagrams/flowchart/flowRenderer"),u=t("./diagrams/sequenceDiagram/sequenceRenderer"),s=t("./diagrams/example/exampleRenderer"),c=t("he"),l=t("./diagrams/example/parser/example"),h=t("./diagrams/flowchart/parser/flow"),f=t("./diagrams/flowchart/parser/dot"),d=t("./diagrams/sequenceDiagram/parser/sequenceDiagram"),p=t("./diagrams/sequenceDiagram/sequenceDb"),g=t("./diagrams/example/exampleDb"),y=t("./diagrams/gantt/ganttRenderer"),m=t("./diagrams/gantt/parser/gantt"),v=t("./diagrams/gantt/ganttDb"),b=0,_=function(t){var e,n=a.detectType(t);switch(n){case"graph":e=h,e.parser.yy=r;break;case"dotGraph":e=f,e.parser.yy=r;break;case"sequenceDiagram":e=d,e.parser.yy=p;break;case"info":e=l,e.parser.yy=g;break;case"gantt":e=m,e.parser.yy=v}try{return e.parse(t),!0}catch(i){return!1}},x=function(){var t;2===arguments.length?("undefined"!=typeof arguments[0]&&(mermaid.sequenceConfig=arguments[0]),t=arguments[1]):t=arguments[0],t=void 0===t?document.querySelectorAll(".mermaid"):"string"==typeof t?document.querySelectorAll(t):t instanceof Node?[t]:t;var e;for(e=0;e/g,">"),h=h.replace(/';var f=a.detectType(h),d={};switch(f){case"graph":d=o.getClasses(h,!1),"object"==typeof mermaid.flowchartConfig&&o.setConf(mermaid.flowchartConfig),o.draw(h,l,!1),a.cloneCssStyles(i.firstChild,d),r.bindFunctions();break;case"dotGraph":d=o.getClasses(h,!0),o.draw(h,l,!0),a.cloneCssStyles(i.firstChild,d);break;case"sequenceDiagram":"object"==typeof mermaid.sequenceConfig&&u.setConf(mermaid.sequenceConfig),u.draw(h,l),a.cloneCssStyles(i.firstChild,[]);break;case"gantt":"object"==typeof mermaid.ganttConfig&&y.setConf(mermaid.ganttConfig),y.draw(h,l),a.cloneCssStyles(i.firstChild,[]);break;case"info":s.draw(h,l,n.version()),a.cloneCssStyles(i.firstChild,[])}}}};n.tester=function(){},n.version=function(){return t("../package.json").version};var w=function(t,e){return"undefined"==typeof e?!1:t===e};e.mermaid={startOnLoad:!0,htmlLabels:!0,init:function(){x.apply(null,arguments)},version:function(){return n.version()},getParser:function(){return i.parser},parse:function(t){return _(t)},parseError:function(t){console.log("Mermaid Syntax error:"),console.log(t)}},n.contentLoaded=function(){"undefined"!=typeof mermaid_config&&w(!1,mermaid_config.htmlLabels)&&(e.mermaid.htmlLabels=!1),e.mermaid.startOnLoad&&("undefined"!=typeof mermaid_config?w(!0,mermaid_config.startOnLoad)&&e.mermaid.init(mermaid.sequenceConfig):e.mermaid.init(mermaid.sequenceConfig))},"undefined"!=typeof document&&document.addEventListener("DOMContentLoaded",function(){n.contentLoaded()},!1)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../package.json":84,"./diagrams/example/exampleDb":85,"./diagrams/example/exampleRenderer":86,"./diagrams/example/parser/example":87,"./diagrams/flowchart/flowRenderer":90,"./diagrams/flowchart/graphDb":91,"./diagrams/flowchart/parser/dot":92,"./diagrams/flowchart/parser/flow":93,"./diagrams/gantt/ganttDb":95,"./diagrams/gantt/ganttRenderer":96,"./diagrams/gantt/parser/gantt":97,"./diagrams/sequenceDiagram/parser/sequenceDiagram":99,"./diagrams/sequenceDiagram/sequenceDb":100,"./diagrams/sequenceDiagram/sequenceRenderer":101,"./utils":104,he:81}],104:[function(t,e){e.exports.detectType=function(t){return t.match(/^\s*sequenceDiagram/)?"sequenceDiagram":t.match(/^\s*sequence/)?"sequence":t.match(/^\s*digraph/)?"dotGraph":t.match(/^\s*info/)?"info":t.match(/^\s*gantt/)?"gantt":"graph"},e.exports.cloneCssStyles=function(t,e){for(var n="",r=document.styleSheets,i=0;i0&&(n+=u.selectorText+" { "+u.style.cssText+" }\n")}}}catch(c){"undefined"!=typeof console&&"undefined"!==console.warn&&console.warn('Invalid CSS selector "'+u.selectorText+'"',c)}var l="",h="";for(var f in e)e.hasOwnProperty(f)&&"undefined"!=typeof f&&("default"===f?(e.default.styles instanceof Array&&(l+="#"+t.id.trim()+" .node { "+e[f].styles.join("; ")+"; }\n"),e.default.nodeLabelStyles instanceof Array&&(l+="#"+t.id.trim()+" .node text { "+e[f].nodeLabelStyles.join("; ")+"; }\n"),e.default.edgeLabelStyles instanceof Array&&(l+="#"+t.id.trim()+" .edgeLabel text { "+e[f].edgeLabelStyles.join("; ")+"; }\n")):e[f].styles instanceof Array&&(h+="#"+t.id.trim()+" ."+f+" { "+e[f].styles.join("; ")+"; }\n"));if(""!==n||""!==l||""!==h){var d=document.createElement("style");d.setAttribute("type","text/css"),d.setAttribute("title","mermaid-svg-internal-css"),d.innerHTML="/* */\n",t.insertBefore(d,t.firstChild)}}},{}]},{},[103])}(); \ No newline at end of file diff --git a/src/main.js b/src/main.js index 1b556e81f..8a861d1da 100644 --- a/src/main.js +++ b/src/main.js @@ -75,25 +75,34 @@ var parse = function(text){ * c-->|No |d(Transform); * ``` */ -var init = function (sequenceConfig, arr) { - arr = arr == null ? document.querySelectorAll('.mermaid') - : typeof arr === "string" ? document.querySelectorAll(arr) - : arr instanceof Node ? [arr] - : arr; - //arr = document.querySelectorAll('.mermaid'); - var i; - - if (sequenceConfig !== 'undefined' && (typeof sequenceConfig !== 'undefined')) { - if(typeof sequenceConfig === 'object'){ - seq.setConf(sequenceConfig); - } else{ - seq.setConf(JSON.parse(sequenceConfig)); +/** + * Renders the mermaid diagrams + * @* param nodes- a css selector or an array of nodes + */ +var init = function () { + var nodes; + if(arguments.length === 2){ + // sequence config was passed as #1 + if(typeof arguments[0] !== 'undefined'){ + mermaid.sequenceConfig = arguments[0]; } - } - for (i = 0; i < arr.length; i++) { - var element = arr[i]; + nodes = arguments[1]; + } + else{ + nodes = arguments[0]; + } + + nodes = nodes === undefined ? document.querySelectorAll('.mermaid') + : typeof nodes === "string" ? document.querySelectorAll(nodes) + : nodes instanceof Node ? [nodes] + // Last case - sequence config was passed pick next + : nodes; + + var i; + for (i = 0; i < nodes.length; i++) { + var element = nodes[i]; // Check if previously processed if(!element.getAttribute("data-processed")) { @@ -102,7 +111,7 @@ var init = function (sequenceConfig, arr) { continue; } - id = 'mermaidChart' + nextId++; + var id = 'mermaidChart' + nextId++; var txt = element.innerHTML; txt = txt.replace(/>/g,'>'); @@ -133,6 +142,9 @@ var init = function (sequenceConfig, arr) { utils.cloneCssStyles(element.firstChild, classes); break; case 'sequenceDiagram': + if(typeof mermaid.sequenceConfig === 'object'){ + seq.setConf(mermaid.sequenceConfig); + } seq.draw(txt,id); utils.cloneCssStyles(element.firstChild, []); break; @@ -229,5 +241,3 @@ if(typeof document !== 'undefined'){ exports.contentLoaded(); }, false); } - -