mermaid/dist/mermaid.slim.min.js

7 lines
235 KiB
JavaScript
Raw Normal View History

!function e(t,r,n){function i(u,o){if(!r[u]){if(!t[u]){var s="function"==typeof require&&require;if(!o&&s)return s(u,!0);if(a)return a(u,!0);throw new Error("Cannot find module '"+u+"'")}var c=r[u]={exports:{}};t[u][0].call(c.exports,function(e){var r=t[u][1][e];return i(r?r:e)},c,c.exports,e,t,r,n)}return r[u].exports}for(var a="function"==typeof require&&require,u=0;u<n.length;u++)i(n[u]);return i}({1:[function(e,t){t.exports={graphlib:e("./lib/graphlib"),dagre:e("./lib/dagre"),intersect:e("./lib/intersect"),render:e("./lib/render"),util:e("./lib/util"),version:e("./lib/version")}},{"./lib/dagre":8,"./lib/graphlib":9,"./lib/intersect":10,"./lib/render":23,"./lib/util":25,"./lib/version":26}],2:[function(e,t){function r(e,t,r,n){var a=e.append("marker").attr("id",t).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),u=a.append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");i.applyStyle(u,r[n+"Style"])}function n(e,t,r,n){var a=e.append("marker").attr("id",t).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),u=a.append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");i.applyStyle(u,r[n+"Style"])}var i=e("./util");t.exports={"default":r,normal:r,vee:n}},{"./util":25}],3:[function(e,t){function r(e,t){var r=t.nodes().filter(function(e){return n.isSubgraph(t,e)}),i=e.selectAll("g.cluster").data(r,function(e){return e});i.enter().append("g").attr("class","cluster").style("opacity",0).append("rect"),n.applyTransition(i.exit(),t).style("opacity",0).remove(),n.applyTransition(i,t).style("opacity",1),n.applyTransition(i.selectAll("rect"),t).attr("width",function(e){return t.node(e).width}).attr("height",function(e){return t.node(e).height}).attr("x",function(e){var r=t.node(e);return r.x-r.width/2}).attr("y",function(e){var r=t.node(e);return r.y-r.height/2})}var n=e("./util");t.exports=r},{"./util":25}],4:[function(e,t){"use strict";function r(e,t){var r=e.selectAll("g.edgeLabel").data(t.edges(),function(e){return a.edgeToId(e)}).classed("update",!0);return r.selectAll("*").remove(),r.enter().append("g").classed("edgeLabel",!0).style("opacity",0),r.each(function(e){var r=t.edge(e),a=i(u.select(this),t.edge(e),0,0).classed("label",!0),o=a.node().getBBox();r.labelId&&a.attr("id",r.labelId),n.has(r,"width")||(r.width=o.width),n.has(r,"height")||(r.height=o.height)}),a.applyTransition(r.exit(),t).style("opacity",0).remove(),r}var n=e("./lodash"),i=e("./label/add-label"),a=e("./util"),u=e("./d3");t.exports=r},{"./d3":7,"./label/add-label":18,"./lodash":20,"./util":25}],5:[function(e,t){"use strict";function r(e,t,r){var i=e.selectAll("g.edgePath").data(t.edges(),function(e){return l.edgeToId(e)}).classed("update",!0);return u(i,t),o(i,t),l.applyTransition(i,t).style("opacity",1),i.selectAll("path.path").each(function(e){var r=t.edge(e);r.arrowheadId=s.uniqueId("arrowhead");var i=h.select(this).attr("marker-end",function(){return"url(#"+r.arrowheadId+")"}).style("fill","none");l.applyTransition(i,t).attr("d",function(e){return n(t,e)}),r.id&&i.attr("id",r.id),l.applyStyle(i,r.style)}),i.selectAll("defs *").remove(),i.selectAll("defs").each(function(e){var n=t.edge(e),i=r[n.arrowhead];i(h.select(this),n.arrowheadId,n,"arrowhead")}),i}function n(e,t){var r=e.edge(t),n=e.node(t.v),a=e.node(t.w),u=r.points.slice(1,r.points.length-1);return u.unshift(c(n,u[0])),u.push(c(a,u[u.length-1])),i(r,u)}function i(e,t){var r=h.svg.line().x(function(e){return e.x}).y(function(e){return e.y});return s.has(e,"lineInterpolate")&&r.interpolate(e.lineInterpolate),s.has(e,"lineTension")&&r.tension(Number(e.lineTension)),r(t)}function a(e){var t=e.getBBox(),r=e.getTransformToElement(e.ownerSVGElement).translate(t.width/2,t.height/2);return{x:r.e,y:r.f}}function u(e,t){var r=e.enter().append("g").attr("class","edgePath").style("opacity",0
2014-12-23 18:06:07 +01:00
}return v}function n(e,t){a.each(e,function(e){e.vs=a.flatten(e.vs.map(function(e){return t[e]?t[e].vs:e}),!0)})}function i(e,t){a.isUndefined(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}var a=e("../lodash"),u=e("./barycenter"),o=e("./resolve-conflicts"),s=e("./sort");t.exports=r},{"../lodash":36,"./barycenter":40,"./resolve-conflicts":45,"./sort":47}],47:[function(e,t){function r(e,t){var r=u.partition(e,function(e){return a.has(e,"barycenter")}),o=r.lhs,s=a.sortBy(r.rhs,function(e){return-e.i}),c=[],l=0,h=0,d=0;o.sort(i(!!t)),d=n(c,s,d),a.each(o,function(e){d+=e.vs.length,c.push(e.vs),l+=e.barycenter*e.weight,h+=e.weight,d=n(c,s,d)});var p={vs:a.flatten(c,!0)};return h&&(p.barycenter=l/h,p.weight=h),p}function n(e,t,r){for(var n;t.length&&(n=a.last(t)).i<=r;)t.pop(),e.push(n.vs),r++;return r}function i(e){return function(t,r){return t.barycenter<r.barycenter?-1:t.barycenter>r.barycenter?1:e?r.i-t.i:t.i-r.i}}var a=e("../lodash"),u=e("../util");t.exports=r},{"../lodash":36,"../util":55}],48:[function(e,t){function r(e){var t=i(e);a.each(e.graph().dummyChains,function(r){for(var i=e.node(r),a=i.edgeObj,u=n(e,t,a.v,a.w),o=u.path,s=u.lca,c=0,l=o[c],h=!0;r!==a.w;){if(i=e.node(r),h){for(;(l=o[c])!==s&&e.node(l).maxRank<i.rank;)c++;l===s&&(h=!1)}if(!h){for(;c<o.length-1&&e.node(l=o[c+1]).minRank<=i.rank;)c++;l=o[c]}e.setParent(r,l),r=e.successors(r)[0]}})}function n(e,t,r,n){var i,a,u=[],o=[],s=Math.min(t[r].low,t[n].low),c=Math.max(t[r].lim,t[n].lim);i=r;do i=e.parent(i),u.push(i);while(i&&(t[i].low>s||c>t[i].lim));for(a=i,i=n;(i=e.parent(i))!==a;)o.push(i);return{path:u.concat(o.reverse()),lca:a}}function i(e){function t(i){var u=n;a.each(e.children(i),t),r[i]={low:u,lim:n++}}var r={},n=0;return a.each(e.children(),t),r}var a=e("./lodash");t.exports=r},{"./lodash":36}],49:[function(e,t){"use strict";function r(e,t){function r(t,r){var u=0,o=0,s=t.length,c=y.last(r);return y.each(r,function(t,l){var h=i(e,t),d=h?e.node(h).order:s;(h||t===c)&&(y.each(r.slice(o,l+1),function(t){y.each(e.predecessors(t),function(r){var i=e.node(r),o=i.order;!(u>o||o>d)||i.dummy&&e.node(t).dummy||a(n,r,t)})}),o=l+1,u=d)}),r}var n={};return y.reduce(t,r),n}function n(e,t){function r(t,r,n,u,o){var s;y.each(y.range(r,n),function(r){s=t[r],e.node(s).dummy&&y.each(e.predecessors(s),function(t){var r=e.node(t);r.dummy&&(r.order<u||r.order>o)&&a(i,t,s)})})}function n(t,n){var i,a=-1,u=0;return y.each(n,function(o,s){if("border"===e.node(o).dummy){var c=e.predecessors(o);c.length&&(i=e.node(c[0]).order,r(n,u,s,a,i),u=s,a=i)}r(n,u,n.length,i,t.length)}),n}var i={};return y.reduce(t,n),i}function i(e,t){return e.node(t).dummy?y.find(e.predecessors(t),function(t){return e.node(t).dummy}):void 0}function a(e,t,r){if(t>r){var n=t;t=r,r=n}var i=e[t];i||(e[t]=i={}),i[r]=!0}function u(e,t,r){if(t>r){var n=t;t=r,r=n}return y.has(e[t],r)}function o(e,t,r,n){var i={},a={},o={};return y.each(t,function(e){y.each(e,function(e,t){i[e]=e,a[e]=e,o[e]=t})}),y.each(t,function(e){var t=-1;y.each(e,function(e){var s=n(e);if(s.length){s=y.sortBy(s,function(e){return o[e]});for(var c=(s.length-1)/2,l=Math.floor(c),h=Math.ceil(c);h>=l;++l){var d=s[l];a[e]===e&&t<o[d]&&!u(r,e,d)&&(a[d]=e,a[e]=i[e]=i[d],t=o[d])}}})}),{root:i,align:a}}function s(e,t,r,n,i){var a={},u={},o={},s={},l={},h=e.graph(),d=f(h.nodesep,h.edgesep,i);return y.each(t,function(e){y.each(e,function(t,r){o[t]=t,a[t]=Number.POSITIVE_INFINITY,l[t]=e[r-1]})}),y.each(e.nodes(),function(i){r[i]===i&&c(e,t,d,r,n,a,u,o,l,s,i)}),y.each(t,function(e){y.each(e,function(e){if(s[e]=s[r[e]],e===r[e]&&a[o[r[e]]]<Number.POSITIVE_INFINITY){s[e]+=a[o[r[e]]];var t=u[o[r[e]]];t&&a[t]!==Number.POSITIVE_INFINITY&&(s[e]+=a[t])}})}),s}function c(e,t,r,n,i,a,u,o,s,l,h){if(!y.has(l,h)){l[h]=0;var d,p=h;do{if(s[p]){d=n[s[p]],c(e,t,r,n,i,a,u,o,s,l,d),o[h]===h&&(o[h]=o[d]);var f=r(e,p,s[p]);o[h]!==o[d]?(a[o[d]]=Math.min(a[o[d]],l[h]-l[d]-f),u[o[d]]=o[h]):l[h]=Math.max(l[h],l[d]+f)}p=i[p]}while(p!==h)}}function l(e,t){retur
2015-01-05 13:41:32 +01:00
return u&&(e=u.v,t=u.w,delete this._edgeLabels[n],delete this._edgeObjs[n],i(this._preds[t],e),i(this._sucs[e],t),delete this._in[t][n],delete this._out[e][n],this._edgeCount--),this},r.prototype.inEdges=function(e,t){var r=this._in[e];if(r){var n=s.values(r);return t?s.filter(n,function(e){return e.v===t}):n}},r.prototype.outEdges=function(e,t){var r=this._out[e];if(r){var n=s.values(r);return t?s.filter(n,function(e){return e.w===t}):n}},r.prototype.nodeEdges=function(e,t){var r=this.inEdges(e,t);return r?r.concat(this.outEdges(e,t)):void 0}},{"./lodash":95}],93:[function(e,t,r){arguments[4][73][0].apply(r,arguments)},{"./graph":92,"./version":96}],94:[function(e,t,r){arguments[4][74][0].apply(r,arguments)},{"./graph":92,"./lodash":95}],95:[function(e,t){t.exports=e(20)},{lodash:101}],96:[function(e,t){t.exports="0.9.1"},{}],97:[function(){},{}],98:[function(e,t,r){(function(e){function t(e,t){for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function n(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n<e.length;n++)t(e[n],n,e)&&r.push(e[n]);return r}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,a=function(e){return i.exec(e).slice(1)};r.resolve=function(){for(var r="",i=!1,a=arguments.length-1;a>=-1&&!i;a--){var u=a>=0?arguments[a]:e.cwd();if("string"!=typeof u)throw new TypeError("Arguments to path.resolve must be strings");u&&(r=u+"/"+r,i="/"===u.charAt(0))}return r=t(n(r.split("/"),function(e){return!!e}),!i).join("/"),(i?"/":"")+r||"."},r.normalize=function(e){var i=r.isAbsolute(e),a="/"===u(e,-1);return e=t(n(e.split("/"),function(e){return!!e}),!i).join("/"),e||i||(e="."),e&&a&&(e+="/"),(i?"/":"")+e},r.isAbsolute=function(e){return"/"===e.charAt(0)},r.join=function(){var e=Array.prototype.slice.call(arguments,0);return r.normalize(n(e,function(e){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},r.relative=function(e,t){function n(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=r.resolve(e).substr(1),t=r.resolve(t).substr(1);for(var i=n(e.split("/")),a=n(t.split("/")),u=Math.min(i.length,a.length),o=u,s=0;u>s;s++)if(i[s]!==a[s]){o=s;break}for(var c=[],s=o;s<i.length;s++)c.push("..");return c=c.concat(a.slice(o)),c.join("/")},r.sep="/",r.delimiter=":",r.dirname=function(e){var t=a(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},r.basename=function(e,t){var r=a(e)[2];return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},r.extname=function(e){return a(e)[3]};var u="b"==="ab".substr(-1)?function(e,t,r){return e.substr(t,r)}:function(e,t,r){return 0>t&&(t=e.length+t),e.substr(t,r)}}).call(this,e("1YiZ5S"))},{"1YiZ5S":99}],99:[function(e,t){function r(){}var n=t.exports={};n.nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,t="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};if(t){var r=[];return window.addEventListener("message",function(e){var t=e.source;if((t===window||null===t)&&"process-tick"===e.data&&(e.stopPropagation(),r.length>0)){var n=r.shift();n()}},!0),function(e){r.push(e),window.postMessage("process-tick","*")}}return function(e){setTimeout(e,0)}}(),n.title="browser",n.browser=!0,n.env={},n.argv=[],n.on=r,n.addListener=r,n.once=r,n.off=r,n.removeListener=r,n.removeAllListeners=r,n.emit=r,n.binding=function(){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(){throw new Error("process.chdir is not supported")}},{}],100:[function(e,t,r){(function(e){!function(n){var i="object"==typeof r&&r,a="object"==typeof t&&t&&t.exports==i&&t,u="object"==typeof e&&e;(u.global===u||u.window===u)&&(n=u);var o=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,s=/[\x01-\x7F]/g,c=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,l=/<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u
},D=function(e,t){for(var r=-1,n=e.length;++r<n;)if(e[r]==t)return!0;return!1},k=function(e,t){if(!e)return t;var r,n={};for(r in t)n[r]=_(e,r)?e[r]:t[r];return n},C=function(e,t){var r="";return e>=55296&&57343>=e||e>1114111?(t&&B("character reference outside the permissible Unicode range"),"<22>"):_(b,e)?(t&&B("disallowed character reference"),b[e]):(t&&D(A,e)&&B("disallowed character reference"),e>65535&&(e-=65536,r+=E(e>>>10&1023|55296),e=56320|1023&e),r+=E(e))},F=function(e){return"&#x"+e.charCodeAt(0).toString(16).toUpperCase()+";"},B=function(e){throw Error("Parse error: "+e)},T=function(e,t){t=k(t,T.options);var r=t.strict;r&&g.test(e)&&B("forbidden code point");var n=t.encodeEverything,i=t.useNamedReferences,a=t.allowUnsafeSymbols;return n?(e=e.replace(s,function(e){return i&&_(h,e)?"&"+h[e]+";":F(e)}),i&&(e=e.replace(/&gt;\u20D2/g,"&nvgt;").replace(/&lt;\u20D2/g,"&nvlt;").replace(/&#x66;&#x6A;/g,"&fjlig;")),i&&(e=e.replace(l,function(e){return"&"+h[e]+";"}))):i?(a||(e=e.replace(d,function(e){return"&"+h[e]+";"})),e=e.replace(/&gt;\u20D2/g,"&nvgt;").replace(/&lt;\u20D2/g,"&nvlt;"),e=e.replace(l,function(e){return"&"+h[e]+";"})):a||(e=e.replace(d,F)),e.replace(o,function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),n=1024*(t-55296)+r-56320+65536;return"&#x"+n.toString(16).toUpperCase()+";"}).replace(c,F)};T.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1};var S=function(e,t){t=k(t,S.options);var r=t.strict;return r&&f.test(e)&&B("malformed character reference"),e.replace(y,function(e,n,i,a,u,o,s,c){var l,h,d,p,f;return n?(l=n,h=i,r&&!h&&B("character reference was not terminated by a semicolon"),C(l,r)):a?(d=a,h=u,r&&!h&&B("character reference was not terminated by a semicolon"),l=parseInt(d,16),C(l,r)):o?(p=o,_(m,p)?m[p]:(r&&B("named character reference was not terminated by a semicolon"),e)):(p=s,f=c,f&&t.isAttributeValue?(r&&"="==f&&B("`&` did not start a character reference"),e):(r&&B("named character reference was not terminated by a semicolon"),v[p]+(f||"")))})};S.options={isAttributeValue:!1,strict:!1};var L=function(e){return e.replace(d,function(e){return p[e]})},N={version:"0.5.0",encode:T,decode:S,escape:L,unescape:S};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define(function(){return N});else if(i&&!i.nodeType)if(a)a.exports=N;else for(var O in N)_(N,O)&&(i[O]=N[O]);else n.he=N}(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],101:[function(e,t,r){(function(e){(function(){function n(e,t,r){for(var n=(r||0)-1,i=e?e.length:0;++n<i;)if(e[n]===t)return n;return-1}function i(e,t){var r=typeof t;if(e=e.cache,"boolean"==r||null==t)return e[t]?0:-1;"number"!=r&&"string"!=r&&(r="object");var i="number"==r?t:A+t;return e=(e=e[r])&&e[i],"object"==r?e&&n(e,t)>-1?0:-1:e?0:-1}function a(e){var t=this.cache,r=typeof e;if("boolean"==r||null==e)t[e]=!0;else{"number"!=r&&"string"!=r&&(r="object");var n="number"==r?e:A+e,i=t[r]||(t[r]={});"object"==r?(i[n]||(i[n]=[])).push(e):i[n]=!0}}function u(e){return e.charCodeAt(0)}function o(e,t){for(var r=e.criteria,n=t.criteria,i=-1,a=r.length;++i<a;){var u=r[i],o=n[i];if(u!==o){if(u>o||"undefined"==typeof u)return 1;if(o>u||"undefined"==typeof o)return-1}}return e.index-t.index}function s(e){var t=-1,r=e.length,n=e[0],i=e[r/2|0],u=e[r-1];if(n&&"object"==typeof n&&i&&"object"==typeof i&&u&&"object"==typeof u)return!1;var o=h();o["false"]=o["null"]=o["true"]=o.undefined=!1;var s=h();for(s.array=e,s.cache=o,s.push=a;++t<r;)s.push(e[t]);return s}function c(e){return"\\"+Z[e]}function l(){return m.pop()||[]}function h(){return v.pop()||{array:null,cache:null,criteria:null,"false":!1,index:0,"null":!1,number:null,object:null,push:null,string:null,"true":!1,undefined:!1,value:null}}function d(e){e.length=0,m.length<x&&m.push(e)}function p(e){var t=e.cache;t&&p(t),e.array=e.cache=e.criteria=e.object=e.number=e.string=e.value=null,v.length<x&&v.push(e)}function f(e,t,r){t||(t=0),"undefined"==typeof r&&(r=e?e.length:0);for(var n=-1,i=r-t||0,a=Array(0>i?0:i);++n<i;)a[n]=e[t+n];return a}fu
},{}],103:[function(e,t,r){var n=e("./graphDb"),i=e("./parser/flow"),a=e("./parser/dot"),u=e("dagre-d3");r.addVertices=function(e,t){var r=Object.keys(e),n=function(e,t){var r;for(r=0;r<t.length;r++)"undefined"!=typeof t[r]&&(e=e+t[r]+";");return e};r.forEach(function(r){var i,a=e[r],u="";a.classes.length>0&&(u=a.classes.join(" "));var o="";o=n(o,a.styles),i="undefined"==typeof a.text?a.id:a.text;var s=0,c="";switch(a.type){case"round":s=5,c="rect";break;case"square":c="rect";break;case"diamond":c="question";break;case"odd":c="rect_left_inv_arrow";break;case"circle":c="circle";break;default:c="rect"}t.setNode(a.id,{labelType:"html",shape:c,label:i,rx:s,ry:s,"class":u,style:o,id:a.id})})},r.addEdges=function(e,t){var r,n=0;e.forEach(function(e){n++,r="arrow_open"===e.type?"none":"normal";var i="";if("undefined"!=typeof e.style)e.style.forEach(function(e){i=i+e+";"});else switch(e.stroke){case"normal":i="stroke: #333; stroke-width: 1.5px;fill:none";break;case"dotted":i="stroke: #333; fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":i="stroke: #333; stroke-width: 3.5px;fill:none"}"undefined"==typeof e.text?"undefined"==typeof e.style?t.setEdge(e.start,e.end,{style:i,arrowhead:r},n):t.setEdge(e.start,e.end,{style:i,arrowheadStyle:"fill: #333",arrowhead:r},n):"undefined"==typeof e.style?t.setEdge(e.start,e.end,{labelType:"html",style:i,labelpos:"c",label:'<span style="background:#e8e8e8">'+e.text+"</span>",arrowheadStyle:"fill: #333",arrowhead:r},n):t.setEdge(e.start,e.end,{labelType:"html",style:i,arrowheadStyle:"fill: #333",label:e.text,arrowhead:r},n)})},r.getClasses=function(e,t){var r;n.clear(),r=t?a.parser:i.parser,r.yy=n,r.parse(e);var u=n.getClasses();return"undefined"==typeof u.default&&(u.default={id:"default"},u.default.styles=["fill:#eaeaea","stroke:#666","stroke-width:1.5px"]),u},r.draw=function(e,t,o){var s;n.clear(),s=o?a.parser:i.parser,s.yy=n,s.parse(e);var c;c=n.getDirection(),"undefined"==typeof c&&(c="TD");var l=new u.graphlib.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:c,marginx:20,marginy:20}).setDefaultEdgeLabel(function(){return{}}),h=n.getSubGraphs(),d=0;h.forEach(function(){d+=1;var e="subG"+d;n.addVertex(e,void 0,void 0,void 0)});var p=n.getVertices(),f=n.getEdges();d=0,h.forEach(function(e){d+=1;var t="subG"+d;e.forEach(function(e){l.setParent(e,t)})}),r.addVertices(p,l),r.addEdges(f,l);var g=new u.render;g.shapes().question=function(e,t,r){var n=t.width,i=t.height,a=.8*(n+i),o=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}],s=e.insert("polygon",":first-child").attr("points",o.map(function(e){return e.x+","+e.y}).join(" ")).attr("rx",5).attr("ry",5).attr("transform","translate("+-a/2+","+2*a/4+")");return r.intersect=function(e){return u.intersect.polygon(r,o,e)},s},g.shapes().rect_left_inv_arrow=function(e,t,r){var n=t.width,i=t.height,a=[{x:-i/2,y:0},{x:n,y:0},{x:n,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}],o=e.insert("polygon",":first-child").attr("points",a.map(function(e){return e.x+","+e.y}).join(" ")).attr("transform","translate("+-n/2+","+2*i/4+")");return r.intersect=function(e){return u.intersect.polygon(r,a,e)},o},g.arrows().none=function(e,t,r,n){var i=e.append("marker").attr("id",t).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,r[n+"Style"])};var y=d3.select("#"+t);svgGroup=d3.select("#"+t+" g"),g(d3.select("#"+t+" g"),l);var m=document.querySelector("#mermaidChart0");y.attr("height",l.graph().height),y.attr("width",l.graph().width),y.attr("viewBox",m.getBBox().x+" 0 "+l.graph().width+" "+l.graph().height)}},{"./graphDb":104,"./parser/dot":105,"./parser/flow":106,"dagre-d3":1}],104:[function(require,module,exports){var vertices={},edges=[],classes=[],subGraphs=[],direction,funs=[];exports.addVertex=function(e,t,r,n){"undefined"!=typeof e&&0!==e.trim().length&&("undefined"==typeof vertices[e]&&(vertices[e]={id:e,styles:[],classes:[]}),"undefined"!=typeof t&&(vertices[e].text=t),"unde
break;case 47:this.$=a[u],n.addVertex(a[u]);break;case 48:this.$=a[u-1],n.addVertex(a[u-1]);break;case 50:case 77:case 79:case 90:this.$=a[u-1]+""+a[u];break;case 52:this.$=a[u-2]+"-"+a[u];break;case 53:a[u-1].text=a[u],this.$=a[u-1];break;case 54:a[u-2].text=a[u-1],this.$=a[u-2];break;case 55:this.$=a[u];break;case 56:case 75:this.$=a[u-1];break;case 57:case 59:case 61:a[u].text=a[u-2],this.$=a[u];break;case 58:case 60:case 62:a[u-1].text=a[u-3],this.$=a[u-1];break;case 63:this.$={type:"arrow",stroke:"normal"};break;case 64:this.$={type:"arrow_circle",stroke:"normal"};break;case 65:this.$={type:"arrow_cross",stroke:"normal"};break;case 66:this.$={type:"arrow_open",stroke:"normal"};break;case 67:this.$={type:"arrow",stroke:"dotted"};break;case 68:this.$={type:"arrow_circle",stroke:"dotted"};break;case 69:this.$={type:"arrow_cross",stroke:"dotted"};break;case 70:this.$={type:"arrow_open",stroke:"dotted"};break;case 71:this.$={type:"arrow",stroke:"thick"};break;case 72:this.$={type:"arrow_circle",stroke:"thick"};break;case 73:this.$={type:"arrow_cross",stroke:"thick"};break;case 74:this.$={type:"arrow_open",stroke:"thick"};break;case 91:this.$=a[u-4],n.addClass(a[u-2],a[u]);break;case 92:this.$=a[u-4],n.setClass(a[u-2],a[u]);break;case 93:this.$=a[u-4],n.setClickEvent(a[u-2],a[u]);break;case 94:this.$=a[u-4],n.addVertex(a[u-2],void 0,void 0,a[u]);break;case 95:case 96:this.$=a[u-4],n.updateLink(a[u-2],a[u]);break;case 98:this.$=[a[u]];break;case 99:a[u-2].push(a[u]),this.$=a[u-2];break;case 101:this.$=a[u-1]+a[u]}},table:[{3:1,4:2,11:[1,3]},{1:[3]},t(r,n,{5:4}),{12:[1,5]},{1:[2,1],6:6,7:7,8:8,9:i,10:a,12:u,19:o,21:13,22:14,24:15,25:16,26:17,27:18,28:19,29:s,32:22,34:28,42:29,43:30,67:c,68:l,69:h,70:d,71:p,76:f,77:g,79:y,81:m,82:v,84:b,85:A,87:E,88:x,89:w},{13:[1,40],15:[1,41],16:[1,42],17:[1,43],18:[1,44]},t(_,[2,3]),{8:45,21:13,22:14,24:15,25:16,26:17,27:18,28:19,29:s,32:22,34:28,42:29,43:30,67:c,68:l,69:h,70:d,71:p,76:f,77:g,79:y,81:m,82:v,84:b,85:A,87:E,88:x,89:w},t(_,[2,5]),t(_,[2,6]),t(_,[2,7]),t(D,k,{7:46,12:u,19:o}),t(D,[2,18],{7:47,12:u,19:o}),{19:[1,48]},{9:C,10:F,19:B,23:49},{9:C,10:F,19:B,23:53},{9:C,10:F,19:B,23:54},{9:C,10:F,19:B,23:55},{9:C,10:F,19:B,23:56},{9:C,10:F,19:B,23:57},t([9,10,12,19,29,31,67,68,69,70,71,76,77,79,81,82,84,85,87,88,89],n,{5:58}),{77:[1,59]},t(T,[2,36],{33:60,45:61,47:[1,62],48:[1,63],49:[1,64],50:S,51:L,52:N,53:O,54:R,55:I,56:q,57:P,58:M,59:j,60:V,61:U}),{12:[1,77]},{12:[1,78]},{12:[1,79]},{12:[1,80]},{12:[1,81]},t(G,[2,47],{43:30,42:87,12:[1,86],15:[1,85],35:[1,82],38:[1,83],40:[1,84],76:f,79:y,81:m,82:v,84:b,85:A,87:E,88:x,89:w}),t($,[2,49]),t($,[2,51],{44:[1,88]}),t(H,[2,124]),t(H,[2,125]),t(H,[2,126]),t(H,[2,127]),t(H,[2,128]),t(H,[2,129]),t(H,[2,130]),t(H,[2,131]),t(H,[2,132]),{9:Y,12:z,14:89,19:W,20:92},{9:Y,12:z,14:94,19:W,20:92},{9:Y,12:z,14:95,19:W,20:92},{9:Y,12:z,14:96,19:W,20:92},{9:Y,12:z,14:97,19:W,20:92},t(_,[2,4]),t(D,[2,16]),t(D,[2,17]),t(_,[2,22]),t(_,[2,23]),t(_,[2,32]),t(_,[2,33]),t(_,[2,34]),t(_,[2,24]),t(_,[2,25]),t(_,[2,26]),t(_,[2,27]),t(_,[2,28]),{6:6,7:7,8:8,9:i,10:a,12:K,19:o,21:13,22:14,24:15,25:16,26:17,27:18,28:19,29:s,30:98,31:Z,32:22,34:28,42:29,43:30,67:c,68:l,69:h,70:d,71:p,76:f,77:g,79:y,81:m,82:v,84:b,85:A,87:E,88:x,89:w},{9:X,11:J,12:Q,13:et,15:tt,16:rt,29:nt,31:it,35:at,37:ut,38:ot,39:st,40:ct,41:lt,43:125,44:ht,47:dt,49:pt,50:ft,51:gt,52:yt,53:mt,62:vt,63:103,64:101,65:102,66:128,67:bt,68:At,69:Et,70:xt,71:wt,73:105,76:f,79:y,81:m,82:v,84:b,85:A,86:104,87:E,88:x,89:w,90:_t,91:Dt,92:kt},{32:138,34:28,42:29,43:30,76:f,79:y,81:m,82:v,84:b,85:A,87:E,88:x,89:w},t(Ct,[2,55],{46:139,12:[1,140],62:[1,141]}),{12:[1,142]},{12:[1,143]},{12:[1,144]},t(Ft,[2,63]),t(Ft,[2,64]),t(Ft,[2,65]),t(Ft,[2,66]),t(Ft,[2,67]),t(Ft,[2,68]),t(Ft,[2,69]),t(Ft,[2,70]),t(Ft,[2,71]),t(Ft,[2,72]),t(Ft,[2,73]),t(Ft,[2,74]),{34:145,42:29,43:30,75:[1,146],76:f,79:y,81:m,82:v,84:b,85:A,87:E,88:x,89:w},{76:[1,147]},{34:148,42:29,43:30,76:f,79:y,81:m,82:v,84:b,85:A,87:E,88:x,89:w},{34:149,42:29,43:30,76:f,79:y,81:m,82:v,84:b,85:A,87:E,88:x,89:w},{34:150,42:29,43:30,76:f,79:y,81:m,82
},unput:function(e){var t=e.length,r=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),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(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var r,n,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))),n=e[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],r=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;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 e,t,r,n;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if(r=this._input.match(this.rules[i[a]]),r&&(!t||r[0].length>t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(e=this.test_match(r,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[n]),e!==!1?e:!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 e=this.next();return e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){var e=this.conditionStack.length-1;return e>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(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:funct