mermaid/dist/mermaid.slim.min.js
knsv d61da879d8 Using browserify for module management, updated build scripts
mermaid_config can be used to config start on load.
2014-11-21 08:03:43 +01:00

1 line
20 KiB
JavaScript

!function t(e,n,r){function i(o,a){if(!n[o]){if(!e[o]){var c="function"==typeof require&&require;if(!a&&c)return c(o,!0);if(s)return s(o,!0);throw new Error("Cannot find module '"+o+"'")}var l=n[o]={exports:{}};e[o][0].call(l.exports,function(t){var n=e[o][1][t];return i(n?n:t)},l,l.exports,t,e,n,r)}return n[o].exports}for(var s="function"==typeof require&&require,o=0;o<r.length;o++)i(r[o]);return i}({1:[function(){},{}],2:[function(t,e,n){(function(t){function e(t,e){for(var n=0,r=t.length-1;r>=0;r--){var i=t[r];"."===i?t.splice(r,1):".."===i?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function r(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r<t.length;r++)e(t[r],r,t)&&n.push(t[r]);return n}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,s=function(t){return i.exec(t).slice(1)};n.resolve=function(){for(var n="",i=!1,s=arguments.length-1;s>=-1&&!i;s--){var o=s>=0?arguments[s]:t.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(n=o+"/"+n,i="/"===o.charAt(0))}return n=e(r(n.split("/"),function(t){return!!t}),!i).join("/"),(i?"/":"")+n||"."},n.normalize=function(t){var i=n.isAbsolute(t),s="/"===o(t,-1);return t=e(r(t.split("/"),function(t){return!!t}),!i).join("/"),t||i||(t="."),t&&s&&(t+="/"),(i?"/":"")+t},n.isAbsolute=function(t){return"/"===t.charAt(0)},n.join=function(){var t=Array.prototype.slice.call(arguments,0);return n.normalize(r(t,function(t){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},n.relative=function(t,e){function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var n=t.length-1;n>=0&&""===t[n];n--);return e>n?[]:t.slice(e,n-e+1)}t=n.resolve(t).substr(1),e=n.resolve(e).substr(1);for(var i=r(t.split("/")),s=r(e.split("/")),o=Math.min(i.length,s.length),a=o,c=0;o>c;c++)if(i[c]!==s[c]){a=c;break}for(var l=[],c=a;c<i.length;c++)l.push("..");return l=l.concat(s.slice(a)),l.join("/")},n.sep="/",n.delimiter=":",n.dirname=function(t){var e=s(t),n=e[0],r=e[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},n.basename=function(t,e){var n=s(t)[2];return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},n.extname=function(t){return s(t)[3]};var o="b"==="ab".substr(-1)?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return 0>e&&(e=t.length+e),t.substr(e,n)}}).call(this,t("1YiZ5S"))},{"1YiZ5S":3}],3:[function(t,e){function n(){}var r=e.exports={};r.nextTick=function(){var t="undefined"!=typeof window&&window.setImmediate,e="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(t)return function(t){return window.setImmediate(t)};if(e){var n=[];return window.addEventListener("message",function(t){var e=t.source;if((e===window||null===e)&&"process-tick"===t.data&&(t.stopPropagation(),n.length>0)){var r=n.shift();r()}},!0),function(t){n.push(t),window.postMessage("process-tick","*")}}return function(t){setTimeout(t,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.on=n,r.addListener=n,r.once=n,r.off=n,r.removeListener=n,r.removeAllListeners=n,r.emit=n,r.binding=function(){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(){throw new Error("process.chdir is not supported")}},{}],4:[function(t,e,n){(function(e){var r=t("./graphDb"),s=t("./parser/flow"),o=function(t,e){var n=Object.keys(t);n.forEach(function(n){var r,i,s=t[n],o="";for(i=0;i<s.styles.length;i++)"undefined"!=typeof s.styles[i]&&(o=o+s.styles[i]+";");r=void 0===s.text?s.id:s.text,"round"===s.type?e.setNode(s.id,{label:r,rx:5,ry:5,style:o}):"diamond"===s.type?e.setNode(s.id,{shape:"question",label:r,rx:0,ry:0,style:o}):e.setNode(s.id,{label:r,rx:0,ry:0,style:o})})},a=function(t,e){t.forEach(function(t){aHead="arrow_open"===t.type?"none":"vee","undefined"===t.text?"undefined"==typeof t.style?e.setEdge(t.start,t.end,{arrowheadStyle:"fill: #333",arrowhead:aHead}):e.setEdge(t.start,t.end,{style:t.style,arrowheadStyle:"fill: #333",arrowhead:aHead}):"undefined"==typeof t.style?e.setEdge(t.start,t.end,{label:t.text,arrowheadStyle:"fill: #33f",arrowhead:aHead}):e.setEdge(t.start,t.end,{style:t.style,arrowheadStyle:"fill: #333",label:t.text,arrowhead:aHead})})},c=function(t,e){r.clear(),s.parser.yy=r,s.parser.parse(t);var n;n=r.getDirection(),"undefined"==typeof n&&(n="TD");var i=(new dagreD3.graphlib.Graph).setGraph({rankdir:n,marginx:20,marginy:20}).setDefaultEdgeLabel(function(){return{}}),c=r.getVertices(),l=r.getEdges();o(c,i),a(l,i);var h=new dagreD3.render;h.shapes().question=function(t,e,n){var r=e.width,i=3*e.height,s=[{x:r/2,y:0},{x:r,y:-i/2},{x:r/2,y:-i},{x:0,y:-i/2}];return shapeSvg=t.insert("polygon",":first-child").attr("points",s.map(function(t){return t.x+","+t.y}).join(" ")).style("fill","#fff").style("stroke","#333").attr("rx",5).attr("ry",5).attr("transform","translate("+-r/2+","+2*i/4+")"),n.intersect=function(t){return dagreD3.intersect.polygon(n,s,t)},shapeSvg},h.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"),s=i.append("path").attr("d","M 0 0 L 0 0 L 0 0 z");dagreD3.util.applyStyle(s,n[r+"Style"])};var u=d3.select("#"+e);svgGroup=d3.select("#"+e+" g"),h(d3.select("#"+e+" g"),i);(u.attr("width")-i.graph().width)/2;u.attr("height",i.graph().height+40)},l=function(){console.log("Mermaid v"+n.version()+" starting");var t=document.querySelectorAll(".mermaid"),e=0;for(i=0;i<t.length;i++){var r,s=t[i];r="mermaidChart"+e,e++;var o=s.textContent.trim();s.innerHTML='<svg id="'+r+'" width="100%"><g /></svg>',c(o,r)}};n.version=function(){return"0.2.1"};var h=function(t,e){return"undefined"!=typeof e?!1:t===e};document.addEventListener("DOMContentLoaded",function(){"undefined"!=typeof mermaid_config?h(!0,mermaid_config.startOnLoad)&&l():l()},!1),e.mermaid={init:function(){l()},version:function(){n.version()}}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./graphDb":5,"./parser/flow":6}],5:[function(t,e,n){var r,i={},s=[];n.addVertex=function(t,e,n,r){console.log("Got node "+t+" "+n+" "+e+" styles: "+JSON.stringify(r)),"undefined"==typeof i[t]&&(i[t]={id:t,styles:[]}),"undefined"!=typeof e&&(i[t].text=e),"undefined"!=typeof n&&(i[t].type=n),"undefined"!=typeof r&&null!==r&&r.forEach(function(e){i[t].styles.push(e)})},n.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),s.push(i)},n.updateLink=function(t,e){var n=t.substr(1);s[n].style=e},n.setDirection=function(t){r=t},n.getDirection=function(){return r},n.getVertices=function(){return i},n.getEdges=function(){return s},n.clear=function(){i={},s=[]},n.defaultStyle=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}},{}],6:[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,7],r=[2,10],i=[1,15],s=[1,16],o=[1,11],a=[6,9],c=[11,27,28,29,37],l=[2,7],h=[11,32,33,34,35],u=[9,11,18,20,21,22,23,24,32,33,34,35,36],f=[9,11,18,20,21,22,23,24,28,29,32,33,34,35,36],y=[9,11,18,20,21,22,23,24,27,28,29,32,33,34,35,36],d=[28,29],p=[28,29,36],g=[20,22,24,36],m=[1,67],_=[1,64],v=[1,62],b=[1,65],k=[1,68],x=[1,63],w=[1,66],S=[1,72],E=[11,41],A=[9,11,27,28,29,39,41,43,44],O={trace:function(){},yy:{},symbols_:{error:2,expressions:3,graphConfig:4,statements:5,EOF:6,spaceList:7,GRAPH:8,SPACE:9,DIR:10,SEMI:11,statement:12,verticeStatement:13,styleStatement:14,vertex:15,link:16,alphaNum:17,SQS:18,text:19,SQE:20,PS:21,PE:22,DIAMOND_START:23,DIAMOND_STOP:24,alphaNumStatement:25,alphaNumToken:26,MINUS:27,ALPHA:28,NUM:29,linkStatement:30,arrowText:31,ARROW_POINT:32,ARROW_CIRCLE:33,ARROW_CROSS:34,ARROW_OPEN:35,PIPE:36,STYLE:37,stylesOpt:38,HEX:39,style:40,COMMA:41,styleComponent:42,COLON:43,UNIT:44,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",8:"GRAPH",9:"SPACE",10:"DIR",11:"SEMI",18:"SQS",20:"SQE",21:"PS",22:"PE",23:"DIAMOND_START",24:"DIAMOND_STOP",27:"MINUS",28:"ALPHA",29:"NUM",32:"ARROW_POINT",33:"ARROW_CIRCLE",34:"ARROW_CROSS",35:"ARROW_OPEN",36:"PIPE",37:"STYLE",39:"HEX",41:"COMMA",43:"COLON",44:"UNIT"},productions_:[0,[3,3],[3,4],[4,4],[5,3],[5,1],[7,2],[7,1],[12,2],[12,2],[13,0],[13,3],[13,1],[15,4],[15,4],[15,4],[15,1],[17,1],[17,2],[25,1],[25,3],[26,1],[26,1],[16,2],[16,1],[30,1],[30,1],[30,1],[30,1],[31,3],[19,3],[19,5],[19,1],[14,5],[14,5],[38,1],[38,3],[40,1],[40,2],[42,1],[42,1],[42,1],[42,1],[42,1],[42,1],[42,1]],performAction:function(t,e,n,r,i,s){var o=s.length-1;switch(i){case 2:this.$=s[o-3];break;case 3:r.setDirection(s[o-1]),this.$=s[o-1];break;case 11:r.addLink(s[o-2],s[o],s[o-1]),this.$="oy";break;case 12:this.$="yo";break;case 13:this.$=s[o-3],r.addVertex(s[o-3],s[o-1],"square");break;case 14:this.$=s[o-3],r.addVertex(s[o-3],s[o-1],"round");break;case 15:this.$=s[o-3],r.addVertex(s[o-3],s[o-1],"diamond");break;case 16:this.$=s[o],r.addVertex(s[o]);break;case 17:case 19:case 21:case 22:case 37:this.$=s[o];break;case 18:this.$=s[o-1]+""+s[o];break;case 20:this.$=s[o-2]+"-"+s[o];break;case 23:s[o-1].text=s[o],this.$=s[o-1];break;case 24:case 32:this.$=s[o];break;case 25:this.$={type:"arrow"};break;case 26:this.$={type:"arrow_circle"};break;case 27:this.$={type:"arrow_cross"};break;case 28:this.$={type:"arrow_open"};break;case 29:this.$=s[o-1];break;case 30:this.$=s[o-2]+" "+s[o];break;case 31:this.$=s[o-4]+" - "+s[o];break;case 33:this.$=s[o-4],r.addVertex(s[o-2],void 0,void 0,s[o]);break;case 34:this.$=s[o-4],r.updateLink(s[o-2],s[o]);break;case 35:this.$=[s[o]];break;case 36:s[o-2].push(s[o]),this.$=s[o-2];break;case 38:this.$=s[o-1]+s[o];break;case 39:case 40:case 41:case 42:case 43:case 44:case 45:this.$=s[o]}},table:[{3:1,4:2,8:[1,3]},{1:[3]},{5:4,7:5,9:n,11:r,12:6,13:8,14:9,15:10,17:12,25:13,26:14,28:i,29:s,37:o},{9:[1,17]},{6:[1,18],7:19,9:n},{5:20,11:r,12:6,13:8,14:9,15:10,17:12,25:13,26:14,28:i,29:s,37:o},e(a,[2,5]),e(c,l,{7:21,9:n}),{11:[1,22]},{11:[1,23]},{11:[2,12],16:24,30:25,32:[1,26],33:[1,27],34:[1,28],35:[1,29]},{9:[1,30]},e(h,[2,16],{18:[1,31],21:[1,32],23:[1,33]}),e(u,[2,17],{25:13,26:14,17:34,28:i,29:s}),e(f,[2,19],{27:[1,35]}),e(y,[2,21]),e(y,[2,22]),{10:[1,36]},{1:[2,1]},{11:r,12:37,13:8,14:9,15:10,17:12,25:13,26:14,28:i,29:s,37:o},{6:[1,38],7:19,9:n},e(c,[2,6]),e(a,[2,8]),e(a,[2,9]),{15:39,17:12,25:13,26:14,28:i,29:s},e(d,[2,24],{31:40,36:[1,41]}),e(p,[2,25]),e(p,[2,26]),e(p,[2,27]),e(p,[2,28]),{17:42,25:13,26:14,28:i,29:s,39:[1,43]},{17:45,19:44,25:13,26:14,28:i,29:s},{17:45,19:46,25:13,26:14,28:i,29:s},{17:45,19:47,25:13,26:14,28:i,29:s},e(u,[2,18]),{26:48,28:i,29:s},{11:[1,49]},e(a,[2,4]),{1:[2,2]},{11:[2,11]},e(d,[2,23]),{17:45,19:50,25:13,26:14,28:i,29:s},{9:[1,51]},{9:[1,52]},{20:[1,53]},e(g,[2,32],{7:55,9:[1,54]}),{22:[1,56]},{24:[1,57]},e(f,[2,20]),e([9,11,28,29,37],[2,3]),{36:[1,58]},{9:m,27:_,28:v,29:b,38:59,39:k,40:60,42:61,43:x,44:w},{9:m,27:_,28:v,29:b,38:69,39:k,40:60,42:61,43:x,44:w},e(h,[2,13]),{7:21,9:n,17:45,19:70,25:13,26:14,27:l,28:i,29:s},{27:[1,71]},e(h,[2,14]),e(h,[2,15]),e(d,[2,29]),{11:[2,33],41:S},e(E,[2,35],{42:73,9:m,27:_,28:v,29:b,39:k,43:x,44:w}),e(A,[2,37]),e(A,[2,39]),e(A,[2,40]),e(A,[2,41]),e(A,[2,42]),e(A,[2,43]),e(A,[2,44]),e(A,[2,45]),{11:[2,34],41:S},e(g,[2,30]),{7:74,9:n},{9:m,27:_,28:v,29:b,39:k,40:75,42:61,43:x,44:w},e(A,[2,38]),{17:45,19:76,25:13,26:14,28:i,29:s},e(E,[2,36],{42:73,9:m,27:_,28:v,29:b,39:k,43:x,44:w}),e(g,[2,31])],defaultActions:{18:[2,1],38:[2,2],39:[2,11]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=d.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],s=[],o=this.table,a="",c=0,l=0,h=0,u=2,f=1,y=s.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,"undefined"==typeof d.yylloc&&(d.yylloc={});var m=d.yylloc;s.push(m);var _=d.options&&d.options.ranges;this.parseError="function"==typeof p.yy.parseError?p.yy.parseError:Object.getPrototypeOf(this).parseError;for(var v,b,k,x,w,S,E,A,O,I={};;){if(k=r[r.length-1],this.defaultActions[k]?x=this.defaultActions[k]:((null===v||"undefined"==typeof v)&&(v=e()),x=o[k]&&o[k][v]),"undefined"==typeof x||!x.length||!x[0]){var $="";O=[];for(S in o[k])this.terminals_[S]&&S>u&&O.push("'"+this.terminals_[S]+"'");$=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+O.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(c+1)+": Unexpected "+(v==f?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError($,{text:d.match,token:this.terminals_[v]||v,line:d.yylineno,loc:m,expected:O})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+v);switch(x[0]){case 1:r.push(v),i.push(d.yytext),s.push(d.yylloc),r.push(x[1]),v=null,b?(v=b,b=null):(l=d.yyleng,a=d.yytext,c=d.yylineno,m=d.yylloc,h>0&&h--);break;case 2:if(E=this.productions_[x[1]][1],I.$=i[i.length-E],I._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},_&&(I._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),w=this.performAction.apply(I,[a,l,c,p.yy,x[1],i,s].concat(y)),"undefined"!=typeof w)return w;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),s=s.slice(0,-1*E)),r.push(this.productions_[x[1]][0]),i.push(I.$),s.push(I._$),A=o[r[r.length-2]][r[r.length-1]],r.push(A);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 s in i)this[s]=i[s];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(),s=0;s<i.length;s++)if(n=this._input.match(this.rules[i[s]]),n&&(!e||n[0].length>e[0].length)){if(e=n,r=s,this.options.backtrack_lexer){if(t=this.test_match(n,i[s]),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 37;case 1:return 8;case 2:return 10;case 3:return 10;case 4:return 39;case 5:return 29;case 6:return"BRKT";case 7:return 44;case 8:return 44;case 9:return 44;case 10:return 43;case 11:return 11;case 12:return 41;case 13:return 34;case 14:return 32;case 15:return 33;case 16:return 35;case 17:return 27;case 18:return 28;case 19:return 36;case 20:return 21;case 21:return 22;case 22:return 18;case 23:return 20;case 24:return 23;case 25:return 24;case 26:return 9;case 27:return"NEWLINE";case 28:return 6}},rules:[/^(?:style\b)/,/^(?:graph\b)/,/^(?:LR\b)/,/^(?:TD\b)/,/^(?:#[a-f0-9]+)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?:px\b)/,/^(?:pt\b)/,/^(?:dot\b)/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:--[x])/,/^(?:-->)/,/^(?:--[o])/,/^(?:---)/,/^(?:-)/,/^(?:[a-zåäöæøA-ZÅÄÖÆØ]+)/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:\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],inclusive:!0}}};return t}();return O.lexer=I,t.prototype=O,O.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":3,fs:1,path:2}]},{},[4]);