!functionr(e,t,s){functiona(i,o){if(!t[i]){if(!e[i]){varc="function"==typeofrequire&&require;if(!o&&c)returnc(i,!0);if(n)returnn(i,!0);thrownewError("Cannot find module '"+i+"'")}varu=t[i]={exports:{}};e[i][0].call(u.exports,function(r){vart=e[i][1][r];returna(t?t:r)},u,u.exports,r,e,t,s)}returnt[i].exports}for(varn="function"==typeofrequire&&require,i=0;i<s.length;i++)a(s[i]);returna}({1:[function(){},{}],2:[function(r,e,t){(function(r){functione(r,e){for(vart=0,s=r.length-1;s>=0;s--){vara=r[s];"."===a?r.splice(s,1):".."===a?(r.splice(s,1),t++):t&&(r.splice(s,1),t--)}if(e)for(;t--;t)r.unshift("..");returnr}functions(r,e){if(r.filter)returnr.filter(e);for(vart=[],s=0;s<r.length;s++)e(r[s],s,r)&&t.push(r[s]);returnt}vara=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,n=function(r){returna.exec(r).slice(1)};t.resolve=function(){for(vart="",a=!1,n=arguments.length-1;n>=-1&&!a;n--){vari=n>=0?arguments[n]:r.cwd();if("string"!=typeofi)thrownewTypeError("Arguments to path.resolve must be strings");i&&(t=i+"/"+t,a="/"===i.charAt(0))}returnt=e(s(t.split("/"),function(r){return!!r}),!a).join("/"),(a?"/":"")+t||"."},t.normalize=function(r){vara=t.isAbsolute(r),n="/"===i(r,-1);returnr=e(s(r.split("/"),function(r){return!!r}),!a).join("/"),r||a||(r="."),r&&n&&(r+="/"),(a?"/":"")+r},t.isAbsolute=function(r){return"/"===r.charAt(0)},t.join=function(){varr=Array.prototype.slice.call(arguments,0);returnt.normalize(s(r,function(r){if("string"!=typeofr)thrownewTypeError("Arguments to path.join must be strings");returnr}).join("/"))},t.relative=function(r,e){functions(r){for(vare=0;e<r.length&&""===r[e];e++);for(vart=r.length-1;t>=0&&""===r[t];t--);returne>t?[]:r.slice(e,t-e+1)}r=t.resolve(r).substr(1),e=t.resolve(e).substr(1);for(vara=s(r.split("/")),n=s(e.split("/")),i=Math.min(a.length,n.length),o=i,c=0;i>c;c++)if(a[c]!==n[c]){o=c;break}for(varu=[],c=o;c<a.length;c++)u.push("..");returnu=u.concat(n.slice(o)),u.join("/")},t.sep="/",t.delimiter=":",t.dirname=function(r){vare=n(r),t=e[0],s=e[1];returnt||s?(s&&(s=s.substr(0,s.length-1)),t+s):"."},t.basename=function(r,e){vart=n(r)[2];returne&&t.substr(-1*e.length)===e&&(t=t.substr(0,t.length-e.length)),t},t.extname=function(r){returnn(r)[3]};vari="b"==="ab".substr(-1)?function(r,e,t){returnr.substr(e,t)}:function(r,e,t){return0>e&&(e=r.length+e),r.substr(e,t)}}).call(this,r("1YiZ5S"))},{"1YiZ5S":3}],3:[function(r,e){functiont(){}vars=e.exports={};s.nextTick=function(){varr="undefined"!=typeofwindow&&window.setImmediate,e="undefined"!=typeofwindow&&window.postMessage&&window.addEventListener;if(r)returnfunction(r){returnwindow.setImmediate(r)};if(e){vart=[];returnwindow.addEventListener("message",function(r){vare=r.source;if((e===window||null===e)&&"process-tick"===r.data&&(r.stopPropagation(),t.length>0)){vars=t.shift();s()}},!0),function(r){t.push(r),window.postMessage("process-tick","*")}}returnfunction(r){setTimeout(r,0)}}(),s.title="browser",s.browser=!0,s.env={},s.argv=[],s.on=t,s.addListener=t,s.once=t,s.off=t,s.removeListener=t,s.removeAllListeners=t,s.emit=t,s.binding=function(){thrownewError("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(){thrownewError("process.chdir is not supported")}},{}],4:[function(r,e,t){(function(r){!function(s){vara="object"==typeoft&&t,n="object"==typeofe&&e&&e.exports==a&&e,i="object"==typeofr&&r;(i.global===i||i.window===i)&&(s=i);varo=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c=/[\x01-\x7F]/g,u=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,l=/<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4
},k=function(r,e){for(vart=-1,s=r.length;++t<s;)if(r[t]==e)return!0;return!1},q=function(r,e){if(!r)returne;vart,s={};for(tine)s[t]=x(r,t)?r[t]:e[t];returns},S=function(r,e){vart="";returnr>=55296&&57343>=r||r>1114111?(e&&C("character reference outside the permissible Unicode range"),"<22>"):x(v,r)?(e&&C("disallowed character reference"),v[r]):(e&&k(w,r)&&C("disallowed character reference"),r>65535&&(r-=65536,t+=D(r>>>10&1023|55296),r=56320|1023&r),t+=D(r))},L=function(r){return"&#x"+r.charCodeAt(0).toString(16).toUpperCase()+";"},C=function(r){throwError("Parse error: "+r)},_=function(r,e){e=q(e,_.options);vart=e.strict;t&&g.test(r)&&C("forbidden code point");vars=e.encodeEverything,a=e.useNamedReferences,n=e.allowUnsafeSymbols;returns?(r=r.replace(c,function(r){returna&&x(p,r)?"&"+p[r]+";":L(r)}),a&&(r=r.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒").replace(/fj/g,"fj")),a&&(r=r.replace(l,function(r){return"&"+p[r]+";"}))):a?(n||(r=r.replace(h,function(r){return"&"+p[r]+";"})),r=r.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒"),r=r.replace(l,function(r){return"&"+p[r]+";"})):n||(r=r.replace(h,L)),r.replace(o,function(r){vare=r.charCodeAt(0),t=r.charCodeAt(1),s=1024*(e-55296)+t-56320+65536;return"&#x"+s.toString(16).toUpperCase()+";"}).replace(u,L)};_.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1};varT=function(r,e){e=q(e,T.options);vart=e.strict;returnt&&f.test(r)&&C("malformed character reference"),r.replace(m,function(r,s,a,n,i,o,c,u){varl,p,h,d,f;returns?(l=s,p=a,t&&!p&&C("character reference was not terminated by a semicolon"),S(l,t)):n?(h=n,p=i,t&&!p&&C("character reference was not terminated by a semicolon"),l=parseInt(h,16),S(l,t)):o?(d=o,x(y,d)?y[d]:(t&&C("named character reference was not terminated by a semicolon"),r)):(d=c,f=u,f&&e.isAttributeValue?(t&&"="==f&&C("`&` did not start a character reference"),r):(t&&C("named character reference was not terminated by a semicolon"),b[d]+(f||"")))})};T.options={isAttributeValue:!1,strict:!1};varF=function(r){returnr.replace(h,function(r){returnd[r]})},B={version:"0.5.0",encode:_,decode:T,escape:F,unescape:T};if("function"==typeofdefine&&"object"==typeofdefine.amd&&define.amd)define(function(){returnB});elseif(a&&!a.nodeType)if(n)n.exports=B;elsefor(varNinB)x(B,N)&&(a[N]=B[N]);elses.he=B}(this)}).call(this,"undefined"!=typeofself?self:"undefined"!=typeofwindow?window:{})},{}],5:[function(r,e,t){(function(e){vars=r("./graphDb"),a=r("./parser/flow"),n=r("./utils"),o=r("./sequenceRenderer"),c=r("he"),u=function(r,e){vart=Object.keys(r),a=function(r,e){vart;for(t=0;t<e.length;t++)"undefined"!=typeofe[t]&&(r=r+e[t]+";");returnr};t.forEach(function(t){varn,i,o=r[t],c="",u=s.getClasses();if(o.classes.length>0)for(i=0;i<o.classes.length;i++)c=a(c,u[o.classes[i]].styles);elsec=a(c,u.default.styles);c=a(c,o.styles),n=void0===o.text?o.id:o.text;varl=0,p="";switch(o.type){case"round":l=5,p="rect";break;case"square":p="rect";break;case"diamond":p="question";break;case"odd":p="question"}e.setNode(o.id,{labelType:"html",shape:p,label:n,rx:l,ry:l,style:c,id:o.id})})},l=function(r,e){vart=0;r.forEach(function(r){t++,aHead="arrow_open"===r.type?"none":"vee";vars="";"undefined"!=typeofr.style&&r.style.forEach(function(r){s=s+r+";"}),"undefined"==typeofr.text?"undefined"==typeofr.style?e.setEdge(r.start,r.end,{style:"stroke: #333; stroke-width: 1.5px;fill:none",arrowheadStyle:"fill: #333",arrowhead:aHead},t):e.setEdge(r.start,r.end,{style:s,arrowheadStyle:"fill: #333",arrowhead:aHead},t):"undefined"==typeofr.style?e.setEdge(r.start,r.end,{labelType:"html",style:"stroke: #333; stroke-width: 1.5px;fill:none",labelpos:"c",label:'<span style="background:#e8e8e8">'+r.text+"</span>",arrowheadStyle:"fill: #333",arrowhead:aHead},t):e.setEdge(r.start,r.end,{labelType:"html",style:s,arrowheadStyle:"fill: #333",label:r.text,arrowhead:aHead},t)})},p=function(r,e){s.clear(),a.parser.yy=s,a.parser.parse(r);vart;t=s.getDirection(),"undefined"==typeoft&&(t="TD");varn=n
},less:function(r){this.unput(this.match.slice(r))},pastInput:function(){varr=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},upcomingInput:function(){varr=this.match;returnr.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){varr=this.pastInput(),e=newArray(r.length+1).join("-");returnr+this.upcomingInput()+"\n"+e+"^"},test_match:function(r,e){vart,s,a;if(this.options.backtrack_lexer&&(a={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&&(a.yylloc.range=this.yylloc.range.slice(0))),s=r[0].match(/(?:\r\n?|\n).*/g),s&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,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(r[0].length),this.matched+=r[0],t=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),t)returnt;if(this._backtrack){for(varnina)this[n]=a[n];return!1}return!1},next:function(){if(this.done)returnthis.EOF;this._input||(this.done=!0);varr,e,t,s;this._more||(this.yytext="",this.match="");for(vara=this._currentRules(),n=0;n<a.length;n++)if(t=this._input.match(this.rules[a[n]]),t&&(!e||t[0].length>e[0].length)){if(e=t,s=n,this.options.backtrack_lexer){if(r=this.test_match(t,a[n]),r!==!1)returnr;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}returne?(r=this.test_match(e,a[s]),r!==!1?r:!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(){varr=this.next();returnr?r:this.lex()},begin:function(r){this.conditionStack.push(r)},popState:function(){varr=this.conditionStack.length-1;returnr>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){returnthis.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(r){returnr=this.conditionStack.length-1-Math.abs(r||0),r>=0?this.conditionStack[r]:"INITIAL"},pushState:function(r){this.begin(r)},stateStackSize:function(){returnthis.conditionStack.length},options:{},performAction:function(r,e,t,s){switch(t){case0:return28;case1:return7;case2:return9;case3:return32;case4:return14;case5:return"MINUS";case6:return"PLUS";case7:return18;case8:return31;case9:return"SLASH";case10:return"PS";case11:return"PE";case12:return21;case13:return22;case14:return16;case15:return8;case16:return6}},rules:[/^(?:\n)/,/^(?:sequence\b)/,/^(?:TB\b)/,/^(?:[0-9]+)/,/^(?::)/,/^(?:-)/,/^(?:\+)/,/^(?:=)/,/^(?:[a-zåäöæøA-ZÅÄÖÆØ()]+)/,/^(?:\/)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\.)/,/^(?:\s)/,/^(?:$)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],inclusive:!0}}};returnr}();returnh.lexer=d,r.prototype=h,h.Parser=r,newr}();"undefined"!=typeofr&&"undefined"!=typeoft&&(t.parser=a,t.Parser=a.Parser,t.parse=function(){returna.parse.apply(a,arguments)},t.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),s.exit(1));vara=r("fs").readFileSync(r("path").normalize(e[1]),"utf8");returnt.parser.parse(a)},"undefined"!=typeofe&&r.main===e&&t.main