diff --git a/dist/mermaid.core.js b/dist/mermaid.core.js index 04de42025..8bda34e4d 100644 --- a/dist/mermaid.core.js +++ b/dist/mermaid.core.js @@ -656,7 +656,7 @@ module.exports = function(module) { /*! exports provided: name, version, description, main, keywords, scripts, repository, author, license, standard, dependencies, devDependencies, files, sideEffects, husky, default */ /***/ (function(module) { -module.exports = JSON.parse("{\"name\":\"mermaid\",\"version\":\"8.11.4\",\"description\":\"Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.\",\"main\":\"dist/mermaid.core.js\",\"keywords\":[\"diagram\",\"markdown\",\"flowchart\",\"sequence diagram\",\"gantt\",\"class diagram\",\"git graph\"],\"scripts\":{\"build:development\":\"webpack --progress --color\",\"build:production\":\"yarn build:development --mode production --config webpack.config.prod.babel.js\",\"build\":\"yarn build:development && yarn build:production\",\"postbuild\":\"documentation build src/mermaidAPI.js src/config.js src/defaultConfig.js --shallow -f md --markdown-toc false > docs/Setup.md\",\"build:watch\":\"yarn build --watch\",\"release\":\"yarn build\",\"lint\":\"eslint src\",\"e2e:depr\":\"yarn lint && jest e2e --config e2e/jest.config.js\",\"cypress\":\"percy exec -- cypress run\",\"e2e\":\"start-server-and-test dev http://localhost:9000/ cypress\",\"e2e-upd\":\"yarn lint && jest e2e -u --config e2e/jest.config.js\",\"dev\":\"webpack serve --config webpack.config.e2e.js\",\"test\":\"yarn lint && jest src/.*\",\"test:watch\":\"jest --watch src\",\"prepublishOnly\":\"yarn build && yarn test\",\"prepare\":\"yarn build\"},\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/knsv/mermaid\"},\"author\":\"Knut Sveidqvist\",\"license\":\"MIT\",\"standard\":{\"ignore\":[\"**/parser/*.js\",\"dist/**/*.js\",\"cypress/**/*.js\"],\"globals\":[\"page\"]},\"dependencies\":{\"@braintree/sanitize-url\":\"^3.1.0\",\"d3\":\"^7.0.0\",\"dagre\":\"^0.8.5\",\"dagre-d3\":\"^0.6.4\",\"dompurify\":\"2.3.1\",\"graphlib\":\"^2.1.8\",\"khroma\":\"^1.4.1\",\"moment-mini\":\"^2.24.0\",\"stylis\":\"^4.0.10\"},\"devDependencies\":{\"@babel/core\":\"^7.14.6\",\"@babel/eslint-parser\":\"^7.14.7\",\"@babel/preset-env\":\"^7.14.7\",\"@babel/register\":\"^7.14.5\",\"@percy/cli\":\"^1.0.0-beta.58\",\"@percy/cypress\":\"^3.1.0\",\"@percy/migrate\":\"^0.11.0\",\"babel-jest\":\"^27.0.6\",\"babel-loader\":\"^8.2.2\",\"coveralls\":\"^3.0.2\",\"css-to-string-loader\":\"^0.1.3\",\"cypress\":\"8.1.0\",\"documentation\":\"13.2.0\",\"eslint\":\"^7.30.0\",\"eslint-config-prettier\":\"^8.3.0\",\"eslint-plugin-prettier\":\"^3.4.0\",\"husky\":\"^7.0.1\",\"identity-obj-proxy\":\"^3.0.0\",\"jest\":\"^27.0.6\",\"jison\":\"^0.4.18\",\"js-base64\":\"3.6.1\",\"moment\":\"^2.23.0\",\"prettier\":\"^2.3.2\",\"start-server-and-test\":\"^1.12.6\",\"terser-webpack-plugin\":\"^4.2.3\",\"webpack\":\"^4.41.2\",\"webpack-cli\":\"^4.7.2\",\"webpack-dev-server\":\"^3.4.1\",\"webpack-node-externals\":\"^3.0.0\"},\"files\":[\"dist\"],\"sideEffects\":[\"**/*.css\",\"**/*.scss\"],\"husky\":{\"hooks\":{\"pre-push\":\"yarn test\"}}}"); +module.exports = JSON.parse("{\"name\":\"mermaid\",\"version\":\"8.12.0\",\"description\":\"Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.\",\"main\":\"dist/mermaid.core.js\",\"keywords\":[\"diagram\",\"markdown\",\"flowchart\",\"sequence diagram\",\"gantt\",\"class diagram\",\"git graph\"],\"scripts\":{\"build:development\":\"webpack --progress --color\",\"build:production\":\"yarn build:development --mode production --config webpack.config.prod.babel.js\",\"build\":\"yarn build:development && yarn build:production\",\"postbuild\":\"documentation build src/mermaidAPI.js src/config.js src/defaultConfig.js --shallow -f md --markdown-toc false > docs/Setup.md\",\"build:watch\":\"yarn build --watch\",\"release\":\"yarn build\",\"lint\":\"eslint src\",\"e2e:depr\":\"yarn lint && jest e2e --config e2e/jest.config.js\",\"cypress\":\"percy exec -- cypress run\",\"e2e\":\"start-server-and-test dev http://localhost:9000/ cypress\",\"e2e-upd\":\"yarn lint && jest e2e -u --config e2e/jest.config.js\",\"dev\":\"webpack serve --config webpack.config.e2e.js\",\"test\":\"yarn lint && jest src/.*\",\"test:watch\":\"jest --watch src\",\"prepublishOnly\":\"yarn build && yarn test\",\"prepare\":\"yarn build\"},\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/knsv/mermaid\"},\"author\":\"Knut Sveidqvist\",\"license\":\"MIT\",\"standard\":{\"ignore\":[\"**/parser/*.js\",\"dist/**/*.js\",\"cypress/**/*.js\"],\"globals\":[\"page\"]},\"dependencies\":{\"@braintree/sanitize-url\":\"^3.1.0\",\"d3\":\"^7.0.0\",\"dagre\":\"^0.8.5\",\"dagre-d3\":\"^0.6.4\",\"dompurify\":\"2.3.1\",\"graphlib\":\"^2.1.8\",\"khroma\":\"^1.4.1\",\"moment-mini\":\"^2.24.0\",\"stylis\":\"^4.0.10\"},\"devDependencies\":{\"@babel/core\":\"^7.14.6\",\"@babel/eslint-parser\":\"^7.14.7\",\"@babel/preset-env\":\"^7.14.7\",\"@babel/register\":\"^7.14.5\",\"@percy/cli\":\"^1.0.0-beta.58\",\"@percy/cypress\":\"^3.1.0\",\"@percy/migrate\":\"^0.11.0\",\"babel-jest\":\"^27.0.6\",\"babel-loader\":\"^8.2.2\",\"coveralls\":\"^3.0.2\",\"css-to-string-loader\":\"^0.1.3\",\"cypress\":\"8.1.0\",\"documentation\":\"13.2.0\",\"eslint\":\"^7.30.0\",\"eslint-config-prettier\":\"^8.3.0\",\"eslint-plugin-prettier\":\"^3.4.0\",\"husky\":\"^7.0.1\",\"identity-obj-proxy\":\"^3.0.0\",\"jest\":\"^27.0.6\",\"jison\":\"^0.4.18\",\"js-base64\":\"3.6.1\",\"moment\":\"^2.23.0\",\"prettier\":\"^2.3.2\",\"start-server-and-test\":\"^1.12.6\",\"terser-webpack-plugin\":\"^4.2.3\",\"webpack\":\"^4.41.2\",\"webpack-cli\":\"^4.7.2\",\"webpack-dev-server\":\"^3.4.1\",\"webpack-node-externals\":\"^3.0.0\"},\"files\":[\"dist\"],\"sideEffects\":[\"**/*.css\",\"**/*.scss\"],\"husky\":{\"hooks\":{\"pre-push\":\"yarn test\"}}}"); /***/ }), @@ -1296,7 +1296,7 @@ var insertEdgeLabel = function insertEdgeLabel(elem, edge) { } terminalLabels[edge.id].startLeft = startEdgeLabelLeft; - setTerminalWidth(fo, bbox); + setTerminalWidth(fo, edge.startLabelLeft); } if (edge.startLabelRight) { @@ -1320,7 +1320,7 @@ var insertEdgeLabel = function insertEdgeLabel(elem, edge) { } terminalLabels[edge.id].startRight = startEdgeLabelRight; - setTerminalWidth(fo, bbox); + setTerminalWidth(fo, edge.startLabelRight); } if (edge.endLabelLeft) { @@ -1343,7 +1343,7 @@ var insertEdgeLabel = function insertEdgeLabel(elem, edge) { } terminalLabels[edge.id].endLeft = endEdgeLabelLeft; - setTerminalWidth(fo, bbox); + setTerminalWidth(fo, edge.endLabelLeft); } if (edge.endLabelRight) { @@ -1367,14 +1367,14 @@ var insertEdgeLabel = function insertEdgeLabel(elem, edge) { } terminalLabels[edge.id].endRight = endEdgeLabelRight; - setTerminalWidth(fo, bbox); + setTerminalWidth(fo, edge.endLabelRight); } }; -function setTerminalWidth(fo, box) { +function setTerminalWidth(fo, value) { if (Object(_config__WEBPACK_IMPORTED_MODULE_3__["getConfig"])().flowchart.htmlLabels && fo) { - fo.style.width = box.width; - fo.style.height = box.height; + fo.style.width = value.length * 9 + 'px'; + fo.style.height = '12px'; } } @@ -1405,7 +1405,7 @@ var positionEdgeLabel = function positionEdgeLabel(edge, paths) { if (path) { // debugger; - var _pos = _utils__WEBPACK_IMPORTED_MODULE_4__["default"].calcTerminalLabelPosition(0, 'start_left', path); + var _pos = _utils__WEBPACK_IMPORTED_MODULE_4__["default"].calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, 'start_left', path); _x2 = _pos.x; _y2 = _pos.y; @@ -1421,7 +1421,7 @@ var positionEdgeLabel = function positionEdgeLabel(edge, paths) { if (path) { // debugger; - var _pos2 = _utils__WEBPACK_IMPORTED_MODULE_4__["default"].calcTerminalLabelPosition(0, 'start_right', path); + var _pos2 = _utils__WEBPACK_IMPORTED_MODULE_4__["default"].calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, 'start_right', path); _x3 = _pos2.x; _y3 = _pos2.y; @@ -1437,7 +1437,7 @@ var positionEdgeLabel = function positionEdgeLabel(edge, paths) { if (path) { // debugger; - var _pos3 = _utils__WEBPACK_IMPORTED_MODULE_4__["default"].calcTerminalLabelPosition(0, 'end_left', path); + var _pos3 = _utils__WEBPACK_IMPORTED_MODULE_4__["default"].calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, 'end_left', path); _x4 = _pos3.x; _y4 = _pos3.y; @@ -1453,7 +1453,7 @@ var positionEdgeLabel = function positionEdgeLabel(edge, paths) { if (path) { // debugger; - var _pos4 = _utils__WEBPACK_IMPORTED_MODULE_4__["default"].calcTerminalLabelPosition(0, 'end_right', path); + var _pos4 = _utils__WEBPACK_IMPORTED_MODULE_4__["default"].calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, 'end_right', path); _x5 = _pos4.x; _y5 = _pos4.y; @@ -2172,9 +2172,9 @@ function intersectEllipse(node, rx, ry, point) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* - * Returns the point at which two lines, p and q, intersect or returns - * undefined if they do not intersect. +/* + * Returns the point at which two lines, p and q, intersect or returns + * undefined if they do not intersect. */ function intersectLine(p1, p2, q1, q2) { // Algorithm from J. Avro, (ed.) Graphics Gems, No 2, Morgan Kaufmann, 1994, @@ -4788,7 +4788,7 @@ var config = { * * Default value: 'dagre-d3' */ - defaultRenderer: 'dagre-d3' + defaultRenderer: 'dagre-wrapper' }, git: { arrowMarkerAbsolute: false, @@ -5406,6 +5406,16 @@ var setupToolTips = function setupToolTips(element) { }; funs.push(setupToolTips); +var direction = 'TB'; + +var getDirection = function getDirection() { + return direction; +}; + +var setDirection = function setDirection(dir) { + direction = dir; +}; + /* harmony default export */ __webpack_exports__["default"] = ({ parseDirective: parseDirective, getConfig: function getConfig() { @@ -5419,6 +5429,8 @@ funs.push(setupToolTips); addAnnotation: addAnnotation, getRelations: getRelations, addRelation: addRelation, + getDirection: getDirection, + setDirection: setDirection, addMember: addMember, addMembers: addMembers, cleanupLabel: cleanupLabel, @@ -5787,8 +5799,8 @@ var draw = function draw(text, id) { // log.debug('Parsing failed'); // } // Fetch the default direction, use TD if none was found + //let dir = 'TD'; - var dir = 'TD'; var conf = Object(_config__WEBPACK_IMPORTED_MODULE_7__["getConfig"])().flowchart; _logger__WEBPACK_IMPORTED_MODULE_3__["log"].info('config:', conf); var nodeSpacing = conf.nodeSpacing || 50; @@ -5798,7 +5810,7 @@ var draw = function draw(text, id) { multigraph: true, compound: true }).setGraph({ - rankdir: dir, + rankdir: _classDb__WEBPACK_IMPORTED_MODULE_4__["default"].getDirection(), nodesep: nodeSpacing, ranksep: rankSpacing, marginx: 8, @@ -5861,8 +5873,8 @@ var draw = function draw(text, id) { rect.setAttribute('rx', 0); rect.setAttribute('ry', 0); rect.setAttribute('width', dim.width); - rect.setAttribute('height', dim.height); - rect.setAttribute('style', 'fill:#e8e8e8;'); + rect.setAttribute('height', dim.height); // rect.setAttribute('style', 'fill:#e8e8e8;'); + label.insertBefore(rect, label.firstChild); } } // If node has a link, wrap it in an anchor SVG object. @@ -6162,153 +6174,165 @@ var draw = function draw(text, id) { } */ var parser = (function(){ -var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,7],$V1=[1,6],$V2=[1,14],$V3=[1,25],$V4=[1,28],$V5=[1,26],$V6=[1,27],$V7=[1,29],$V8=[1,30],$V9=[1,31],$Va=[1,32],$Vb=[1,35],$Vc=[1,36],$Vd=[1,37],$Ve=[1,38],$Vf=[10,19],$Vg=[1,50],$Vh=[1,51],$Vi=[1,52],$Vj=[1,53],$Vk=[1,54],$Vl=[1,55],$Vm=[10,19,26,33,34,42,45,46,47,48,49,50,55,57],$Vn=[10,19,24,26,33,34,38,42,45,46,47,48,49,50,55,57,72,73,74,75],$Vo=[10,13,17,19],$Vp=[42,72,73,74,75],$Vq=[42,49,50,72,73,74,75],$Vr=[42,45,46,47,48,72,73,74,75],$Vs=[10,19,26],$Vt=[1,87]; +var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,6],$V1=[1,7],$V2=[1,8],$V3=[1,9],$V4=[1,12],$V5=[1,11],$V6=[1,15,24],$V7=[1,19],$V8=[1,31],$V9=[1,34],$Va=[1,32],$Vb=[1,33],$Vc=[1,35],$Vd=[1,36],$Ve=[1,37],$Vf=[1,38],$Vg=[1,41],$Vh=[1,42],$Vi=[1,43],$Vj=[1,44],$Vk=[15,24],$Vl=[1,56],$Vm=[1,57],$Vn=[1,58],$Vo=[1,59],$Vp=[1,60],$Vq=[1,61],$Vr=[15,24,31,38,39,47,50,51,52,53,54,55,60,62],$Vs=[15,24,29,31,38,39,43,47,50,51,52,53,54,55,60,62,77,78,79,80],$Vt=[7,8,9,10,15,18,22,24],$Vu=[47,77,78,79,80],$Vv=[47,54,55,77,78,79,80],$Vw=[47,50,51,52,53,77,78,79,80],$Vx=[15,24,31],$Vy=[1,93]; var parser = {trace: function trace () { }, yy: {}, -symbols_: {"error":2,"start":3,"mermaidDoc":4,"directive":5,"graphConfig":6,"openDirective":7,"typeDirective":8,"closeDirective":9,"NEWLINE":10,":":11,"argDirective":12,"open_directive":13,"type_directive":14,"arg_directive":15,"close_directive":16,"CLASS_DIAGRAM":17,"statements":18,"EOF":19,"statement":20,"className":21,"alphaNumToken":22,"classLiteralName":23,"GENERICTYPE":24,"relationStatement":25,"LABEL":26,"classStatement":27,"methodStatement":28,"annotationStatement":29,"clickStatement":30,"cssClassStatement":31,"CLASS":32,"STYLE_SEPARATOR":33,"STRUCT_START":34,"members":35,"STRUCT_STOP":36,"ANNOTATION_START":37,"ANNOTATION_END":38,"MEMBER":39,"SEPARATOR":40,"relation":41,"STR":42,"relationType":43,"lineType":44,"AGGREGATION":45,"EXTENSION":46,"COMPOSITION":47,"DEPENDENCY":48,"LINE":49,"DOTTED_LINE":50,"CALLBACK":51,"LINK":52,"LINK_TARGET":53,"CLICK":54,"CALLBACK_NAME":55,"CALLBACK_ARGS":56,"HREF":57,"CSSCLASS":58,"commentToken":59,"textToken":60,"graphCodeTokens":61,"textNoTagsToken":62,"TAGSTART":63,"TAGEND":64,"==":65,"--":66,"PCT":67,"DEFAULT":68,"SPACE":69,"MINUS":70,"keywords":71,"UNICODE_TEXT":72,"NUM":73,"ALPHA":74,"BQUOTE_STR":75,"$accept":0,"$end":1}, -terminals_: {2:"error",10:"NEWLINE",11:":",13:"open_directive",14:"type_directive",15:"arg_directive",16:"close_directive",17:"CLASS_DIAGRAM",19:"EOF",24:"GENERICTYPE",26:"LABEL",32:"CLASS",33:"STYLE_SEPARATOR",34:"STRUCT_START",36:"STRUCT_STOP",37:"ANNOTATION_START",38:"ANNOTATION_END",39:"MEMBER",40:"SEPARATOR",42:"STR",45:"AGGREGATION",46:"EXTENSION",47:"COMPOSITION",48:"DEPENDENCY",49:"LINE",50:"DOTTED_LINE",51:"CALLBACK",52:"LINK",53:"LINK_TARGET",54:"CLICK",55:"CALLBACK_NAME",56:"CALLBACK_ARGS",57:"HREF",58:"CSSCLASS",61:"graphCodeTokens",63:"TAGSTART",64:"TAGEND",65:"==",66:"--",67:"PCT",68:"DEFAULT",69:"SPACE",70:"MINUS",71:"keywords",72:"UNICODE_TEXT",73:"NUM",74:"ALPHA",75:"BQUOTE_STR"}, -productions_: [0,[3,1],[3,2],[4,1],[5,4],[5,6],[7,1],[8,1],[12,1],[9,1],[6,4],[18,1],[18,2],[18,3],[21,1],[21,1],[21,2],[21,2],[21,2],[20,1],[20,2],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[27,2],[27,4],[27,5],[27,7],[29,4],[35,1],[35,2],[28,1],[28,2],[28,1],[28,1],[25,3],[25,4],[25,4],[25,5],[41,3],[41,2],[41,2],[41,1],[43,1],[43,1],[43,1],[43,1],[44,1],[44,1],[30,3],[30,4],[30,3],[30,4],[30,4],[30,5],[30,3],[30,4],[30,4],[30,5],[30,3],[30,4],[30,4],[30,5],[31,3],[59,1],[59,1],[60,1],[60,1],[60,1],[60,1],[60,1],[60,1],[60,1],[62,1],[62,1],[62,1],[62,1],[22,1],[22,1],[22,1],[23,1]], +symbols_: {"error":2,"start":3,"mermaidDoc":4,"direction":5,"directive":6,"direction_tb":7,"direction_bt":8,"direction_rl":9,"direction_lr":10,"graphConfig":11,"openDirective":12,"typeDirective":13,"closeDirective":14,"NEWLINE":15,":":16,"argDirective":17,"open_directive":18,"type_directive":19,"arg_directive":20,"close_directive":21,"CLASS_DIAGRAM":22,"statements":23,"EOF":24,"statement":25,"className":26,"alphaNumToken":27,"classLiteralName":28,"GENERICTYPE":29,"relationStatement":30,"LABEL":31,"classStatement":32,"methodStatement":33,"annotationStatement":34,"clickStatement":35,"cssClassStatement":36,"CLASS":37,"STYLE_SEPARATOR":38,"STRUCT_START":39,"members":40,"STRUCT_STOP":41,"ANNOTATION_START":42,"ANNOTATION_END":43,"MEMBER":44,"SEPARATOR":45,"relation":46,"STR":47,"relationType":48,"lineType":49,"AGGREGATION":50,"EXTENSION":51,"COMPOSITION":52,"DEPENDENCY":53,"LINE":54,"DOTTED_LINE":55,"CALLBACK":56,"LINK":57,"LINK_TARGET":58,"CLICK":59,"CALLBACK_NAME":60,"CALLBACK_ARGS":61,"HREF":62,"CSSCLASS":63,"commentToken":64,"textToken":65,"graphCodeTokens":66,"textNoTagsToken":67,"TAGSTART":68,"TAGEND":69,"==":70,"--":71,"PCT":72,"DEFAULT":73,"SPACE":74,"MINUS":75,"keywords":76,"UNICODE_TEXT":77,"NUM":78,"ALPHA":79,"BQUOTE_STR":80,"$accept":0,"$end":1}, +terminals_: {2:"error",7:"direction_tb",8:"direction_bt",9:"direction_rl",10:"direction_lr",15:"NEWLINE",16:":",18:"open_directive",19:"type_directive",20:"arg_directive",21:"close_directive",22:"CLASS_DIAGRAM",24:"EOF",29:"GENERICTYPE",31:"LABEL",37:"CLASS",38:"STYLE_SEPARATOR",39:"STRUCT_START",41:"STRUCT_STOP",42:"ANNOTATION_START",43:"ANNOTATION_END",44:"MEMBER",45:"SEPARATOR",47:"STR",50:"AGGREGATION",51:"EXTENSION",52:"COMPOSITION",53:"DEPENDENCY",54:"LINE",55:"DOTTED_LINE",56:"CALLBACK",57:"LINK",58:"LINK_TARGET",59:"CLICK",60:"CALLBACK_NAME",61:"CALLBACK_ARGS",62:"HREF",63:"CSSCLASS",66:"graphCodeTokens",68:"TAGSTART",69:"TAGEND",70:"==",71:"--",72:"PCT",73:"DEFAULT",74:"SPACE",75:"MINUS",76:"keywords",77:"UNICODE_TEXT",78:"NUM",79:"ALPHA",80:"BQUOTE_STR"}, +productions_: [0,[3,1],[3,1],[3,2],[5,1],[5,1],[5,1],[5,1],[4,1],[6,4],[6,6],[12,1],[13,1],[17,1],[14,1],[11,4],[23,1],[23,2],[23,3],[26,1],[26,1],[26,2],[26,2],[26,2],[25,1],[25,2],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[32,2],[32,4],[32,5],[32,7],[34,4],[40,1],[40,2],[33,1],[33,2],[33,1],[33,1],[30,3],[30,4],[30,4],[30,5],[46,3],[46,2],[46,2],[46,1],[48,1],[48,1],[48,1],[48,1],[49,1],[49,1],[35,3],[35,4],[35,3],[35,4],[35,4],[35,5],[35,3],[35,4],[35,4],[35,5],[35,3],[35,4],[35,4],[35,5],[36,3],[64,1],[64,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[65,1],[67,1],[67,1],[67,1],[67,1],[27,1],[27,1],[27,1],[28,1]], performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { /* this == yyval */ var $0 = $$.length - 1; switch (yystate) { +case 4: + yy.setDirection('TB'); +break; +case 5: + yy.setDirection('BT'); +break; case 6: - yy.parseDirective('%%{', 'open_directive'); + yy.setDirection('RL'); break; case 7: + yy.setDirection('LR'); +break; +case 11: + yy.parseDirective('%%{', 'open_directive'); +break; +case 12: yy.parseDirective($$[$0], 'type_directive'); break; -case 8: +case 13: $$[$0] = $$[$0].trim().replace(/'/g, '"'); yy.parseDirective($$[$0], 'arg_directive'); break; -case 9: +case 14: yy.parseDirective('}%%', 'close_directive', 'class'); break; -case 14: case 15: +case 19: case 20: this.$=$$[$0]; break; -case 16: +case 21: this.$=$$[$0-1]+$$[$0]; break; -case 17: case 18: +case 22: case 23: this.$=$$[$0-1]+'~'+$$[$0]; break; -case 19: +case 24: yy.addRelation($$[$0]); break; -case 20: +case 25: $$[$0-1].title = yy.cleanupLabel($$[$0]); yy.addRelation($$[$0-1]); break; -case 27: +case 33: yy.addClass($$[$0]); break; -case 28: +case 34: yy.addClass($$[$0-2]);yy.setCssClass($$[$0-2], $$[$0]); break; -case 29: +case 35: /*console.log($$[$0-3],JSON.stringify($$[$0-1]));*/yy.addClass($$[$0-3]);yy.addMembers($$[$0-3],$$[$0-1]); break; -case 30: +case 36: yy.addClass($$[$0-5]);yy.setCssClass($$[$0-5], $$[$0-3]);yy.addMembers($$[$0-5],$$[$0-1]); break; -case 31: +case 37: yy.addAnnotation($$[$0],$$[$0-2]); break; -case 32: +case 38: this.$ = [$$[$0]]; break; -case 33: +case 39: $$[$0].push($$[$0-1]);this.$=$$[$0]; break; -case 34: +case 40: /*console.log('Rel found',$$[$0]);*/ break; -case 35: +case 41: yy.addMember($$[$0-1],yy.cleanupLabel($$[$0])); break; -case 36: +case 42: /*console.warn('Member',$$[$0]);*/ break; -case 37: +case 43: /*console.log('sep found',$$[$0]);*/ break; -case 38: +case 44: this.$ = {'id1':$$[$0-2],'id2':$$[$0], relation:$$[$0-1], relationTitle1:'none', relationTitle2:'none'}; break; -case 39: +case 45: this.$ = {id1:$$[$0-3], id2:$$[$0], relation:$$[$0-1], relationTitle1:$$[$0-2], relationTitle2:'none'} break; -case 40: +case 46: this.$ = {id1:$$[$0-3], id2:$$[$0], relation:$$[$0-2], relationTitle1:'none', relationTitle2:$$[$0-1]}; break; -case 41: +case 47: this.$ = {id1:$$[$0-4], id2:$$[$0], relation:$$[$0-2], relationTitle1:$$[$0-3], relationTitle2:$$[$0-1]} break; -case 42: +case 48: this.$={type1:$$[$0-2],type2:$$[$0],lineType:$$[$0-1]}; break; -case 43: +case 49: this.$={type1:'none',type2:$$[$0],lineType:$$[$0-1]}; break; -case 44: +case 50: this.$={type1:$$[$0-1],type2:'none',lineType:$$[$0]}; break; -case 45: +case 51: this.$={type1:'none',type2:'none',lineType:$$[$0]}; break; -case 46: +case 52: this.$=yy.relationType.AGGREGATION; break; -case 47: +case 53: this.$=yy.relationType.EXTENSION; break; -case 48: +case 54: this.$=yy.relationType.COMPOSITION; break; -case 49: +case 55: this.$=yy.relationType.DEPENDENCY; break; -case 50: +case 56: this.$=yy.lineType.LINE; break; -case 51: +case 57: this.$=yy.lineType.DOTTED_LINE; break; -case 52: case 58: +case 58: case 64: this.$ = $$[$0-2];yy.setClickEvent($$[$0-1], $$[$0]); break; -case 53: case 59: +case 59: case 65: this.$ = $$[$0-3];yy.setClickEvent($$[$0-2], $$[$0-1]);yy.setTooltip($$[$0-2], $$[$0]); break; -case 54: case 62: +case 60: case 68: this.$ = $$[$0-2];yy.setLink($$[$0-1], $$[$0]); break; -case 55: +case 61: this.$ = $$[$0-3];yy.setLink($$[$0-2], $$[$0-1],$$[$0]); break; -case 56: case 64: +case 62: case 70: this.$ = $$[$0-3];yy.setLink($$[$0-2], $$[$0-1]);yy.setTooltip($$[$0-2], $$[$0]); break; -case 57: case 65: +case 63: case 71: this.$ = $$[$0-4];yy.setLink($$[$0-3], $$[$0-2], $$[$0]);yy.setTooltip($$[$0-3], $$[$0-1]); break; -case 60: +case 66: this.$ = $$[$0-3];yy.setClickEvent($$[$0-2], $$[$0-1], $$[$0]); break; -case 61: +case 67: this.$ = $$[$0-4];yy.setClickEvent($$[$0-3], $$[$0-2], $$[$0-1]);yy.setTooltip($$[$0-3], $$[$0]); break; -case 63: +case 69: this.$ = $$[$0-3];yy.setLink($$[$0-2], $$[$0-1], $$[$0]); break; -case 66: +case 72: yy.setCssClass($$[$0-1], $$[$0]); break; } }, -table: [{3:1,4:2,5:3,6:4,7:5,13:$V0,17:$V1},{1:[3]},{1:[2,1]},{3:8,4:2,5:3,6:4,7:5,13:$V0,17:$V1},{1:[2,3]},{8:9,14:[1,10]},{10:[1,11]},{14:[2,6]},{1:[2,2]},{9:12,11:[1,13],16:$V2},o([11,16],[2,7]),{5:23,7:5,13:$V0,18:15,20:16,21:24,22:33,23:34,25:17,27:18,28:19,29:20,30:21,31:22,32:$V3,37:$V4,39:$V5,40:$V6,51:$V7,52:$V8,54:$V9,58:$Va,72:$Vb,73:$Vc,74:$Vd,75:$Ve},{10:[1,39]},{12:40,15:[1,41]},{10:[2,9]},{19:[1,42]},{10:[1,43],19:[2,11]},o($Vf,[2,19],{26:[1,44]}),o($Vf,[2,21]),o($Vf,[2,22]),o($Vf,[2,23]),o($Vf,[2,24]),o($Vf,[2,25]),o($Vf,[2,26]),o($Vf,[2,34],{41:45,43:48,44:49,26:[1,47],42:[1,46],45:$Vg,46:$Vh,47:$Vi,48:$Vj,49:$Vk,50:$Vl}),{21:56,22:33,23:34,72:$Vb,73:$Vc,74:$Vd,75:$Ve},o($Vf,[2,36]),o($Vf,[2,37]),{22:57,72:$Vb,73:$Vc,74:$Vd},{21:58,22:33,23:34,72:$Vb,73:$Vc,74:$Vd,75:$Ve},{21:59,22:33,23:34,72:$Vb,73:$Vc,74:$Vd,75:$Ve},{21:60,22:33,23:34,72:$Vb,73:$Vc,74:$Vd,75:$Ve},{42:[1,61]},o($Vm,[2,14],{22:33,23:34,21:62,24:[1,63],72:$Vb,73:$Vc,74:$Vd,75:$Ve}),o($Vm,[2,15],{24:[1,64]}),o($Vn,[2,80]),o($Vn,[2,81]),o($Vn,[2,82]),o([10,19,24,26,33,34,42,45,46,47,48,49,50,55,57],[2,83]),o($Vo,[2,4]),{9:65,16:$V2},{16:[2,8]},{1:[2,10]},{5:23,7:5,13:$V0,18:66,19:[2,12],20:16,21:24,22:33,23:34,25:17,27:18,28:19,29:20,30:21,31:22,32:$V3,37:$V4,39:$V5,40:$V6,51:$V7,52:$V8,54:$V9,58:$Va,72:$Vb,73:$Vc,74:$Vd,75:$Ve},o($Vf,[2,20]),{21:67,22:33,23:34,42:[1,68],72:$Vb,73:$Vc,74:$Vd,75:$Ve},{41:69,43:48,44:49,45:$Vg,46:$Vh,47:$Vi,48:$Vj,49:$Vk,50:$Vl},o($Vf,[2,35]),{44:70,49:$Vk,50:$Vl},o($Vp,[2,45],{43:71,45:$Vg,46:$Vh,47:$Vi,48:$Vj}),o($Vq,[2,46]),o($Vq,[2,47]),o($Vq,[2,48]),o($Vq,[2,49]),o($Vr,[2,50]),o($Vr,[2,51]),o($Vf,[2,27],{33:[1,72],34:[1,73]}),{38:[1,74]},{42:[1,75]},{42:[1,76]},{55:[1,77],57:[1,78]},{22:79,72:$Vb,73:$Vc,74:$Vd},o($Vm,[2,16]),o($Vm,[2,17]),o($Vm,[2,18]),{10:[1,80]},{19:[2,13]},o($Vs,[2,38]),{21:81,22:33,23:34,72:$Vb,73:$Vc,74:$Vd,75:$Ve},{21:82,22:33,23:34,42:[1,83],72:$Vb,73:$Vc,74:$Vd,75:$Ve},o($Vp,[2,44],{43:84,45:$Vg,46:$Vh,47:$Vi,48:$Vj}),o($Vp,[2,43]),{22:85,72:$Vb,73:$Vc,74:$Vd},{35:86,39:$Vt},{21:88,22:33,23:34,72:$Vb,73:$Vc,74:$Vd,75:$Ve},o($Vf,[2,52],{42:[1,89]}),o($Vf,[2,54],{42:[1,91],53:[1,90]}),o($Vf,[2,58],{42:[1,92],56:[1,93]}),o($Vf,[2,62],{42:[1,95],53:[1,94]}),o($Vf,[2,66]),o($Vo,[2,5]),o($Vs,[2,40]),o($Vs,[2,39]),{21:96,22:33,23:34,72:$Vb,73:$Vc,74:$Vd,75:$Ve},o($Vp,[2,42]),o($Vf,[2,28],{34:[1,97]}),{36:[1,98]},{35:99,36:[2,32],39:$Vt},o($Vf,[2,31]),o($Vf,[2,53]),o($Vf,[2,55]),o($Vf,[2,56],{53:[1,100]}),o($Vf,[2,59]),o($Vf,[2,60],{42:[1,101]}),o($Vf,[2,63]),o($Vf,[2,64],{53:[1,102]}),o($Vs,[2,41]),{35:103,39:$Vt},o($Vf,[2,29]),{36:[2,33]},o($Vf,[2,57]),o($Vf,[2,61]),o($Vf,[2,65]),{36:[1,104]},o($Vf,[2,30])], -defaultActions: {2:[2,1],4:[2,3],7:[2,6],8:[2,2],14:[2,9],41:[2,8],42:[2,10],66:[2,13],99:[2,33]}, +table: [{3:1,4:2,5:3,6:4,7:$V0,8:$V1,9:$V2,10:$V3,11:5,12:10,18:$V4,22:$V5},{1:[3]},{1:[2,1]},{1:[2,2]},{3:13,4:2,5:3,6:4,7:$V0,8:$V1,9:$V2,10:$V3,11:5,12:10,18:$V4,22:$V5},{1:[2,8]},o($V6,[2,4]),o($V6,[2,5]),o($V6,[2,6]),o($V6,[2,7]),{13:14,19:[1,15]},{15:[1,16]},{19:[2,11]},{1:[2,3]},{14:17,16:[1,18],21:$V7},o([16,21],[2,12]),{5:29,6:28,7:$V0,8:$V1,9:$V2,10:$V3,12:10,18:$V4,23:20,25:21,26:30,27:39,28:40,30:22,32:23,33:24,34:25,35:26,36:27,37:$V8,42:$V9,44:$Va,45:$Vb,56:$Vc,57:$Vd,59:$Ve,63:$Vf,77:$Vg,78:$Vh,79:$Vi,80:$Vj},{15:[1,45]},{17:46,20:[1,47]},{15:[2,14]},{24:[1,48]},{15:[1,49],24:[2,16]},o($Vk,[2,24],{31:[1,50]}),o($Vk,[2,26]),o($Vk,[2,27]),o($Vk,[2,28]),o($Vk,[2,29]),o($Vk,[2,30]),o($Vk,[2,31]),o($Vk,[2,32]),o($Vk,[2,40],{46:51,48:54,49:55,31:[1,53],47:[1,52],50:$Vl,51:$Vm,52:$Vn,53:$Vo,54:$Vp,55:$Vq}),{26:62,27:39,28:40,77:$Vg,78:$Vh,79:$Vi,80:$Vj},o($Vk,[2,42]),o($Vk,[2,43]),{27:63,77:$Vg,78:$Vh,79:$Vi},{26:64,27:39,28:40,77:$Vg,78:$Vh,79:$Vi,80:$Vj},{26:65,27:39,28:40,77:$Vg,78:$Vh,79:$Vi,80:$Vj},{26:66,27:39,28:40,77:$Vg,78:$Vh,79:$Vi,80:$Vj},{47:[1,67]},o($Vr,[2,19],{27:39,28:40,26:68,29:[1,69],77:$Vg,78:$Vh,79:$Vi,80:$Vj}),o($Vr,[2,20],{29:[1,70]}),o($Vs,[2,86]),o($Vs,[2,87]),o($Vs,[2,88]),o([15,24,29,31,38,39,47,50,51,52,53,54,55,60,62],[2,89]),o($Vt,[2,9]),{14:71,21:$V7},{21:[2,13]},{1:[2,15]},{5:29,6:28,7:$V0,8:$V1,9:$V2,10:$V3,12:10,18:$V4,23:72,24:[2,17],25:21,26:30,27:39,28:40,30:22,32:23,33:24,34:25,35:26,36:27,37:$V8,42:$V9,44:$Va,45:$Vb,56:$Vc,57:$Vd,59:$Ve,63:$Vf,77:$Vg,78:$Vh,79:$Vi,80:$Vj},o($Vk,[2,25]),{26:73,27:39,28:40,47:[1,74],77:$Vg,78:$Vh,79:$Vi,80:$Vj},{46:75,48:54,49:55,50:$Vl,51:$Vm,52:$Vn,53:$Vo,54:$Vp,55:$Vq},o($Vk,[2,41]),{49:76,54:$Vp,55:$Vq},o($Vu,[2,51],{48:77,50:$Vl,51:$Vm,52:$Vn,53:$Vo}),o($Vv,[2,52]),o($Vv,[2,53]),o($Vv,[2,54]),o($Vv,[2,55]),o($Vw,[2,56]),o($Vw,[2,57]),o($Vk,[2,33],{38:[1,78],39:[1,79]}),{43:[1,80]},{47:[1,81]},{47:[1,82]},{60:[1,83],62:[1,84]},{27:85,77:$Vg,78:$Vh,79:$Vi},o($Vr,[2,21]),o($Vr,[2,22]),o($Vr,[2,23]),{15:[1,86]},{24:[2,18]},o($Vx,[2,44]),{26:87,27:39,28:40,77:$Vg,78:$Vh,79:$Vi,80:$Vj},{26:88,27:39,28:40,47:[1,89],77:$Vg,78:$Vh,79:$Vi,80:$Vj},o($Vu,[2,50],{48:90,50:$Vl,51:$Vm,52:$Vn,53:$Vo}),o($Vu,[2,49]),{27:91,77:$Vg,78:$Vh,79:$Vi},{40:92,44:$Vy},{26:94,27:39,28:40,77:$Vg,78:$Vh,79:$Vi,80:$Vj},o($Vk,[2,58],{47:[1,95]}),o($Vk,[2,60],{47:[1,97],58:[1,96]}),o($Vk,[2,64],{47:[1,98],61:[1,99]}),o($Vk,[2,68],{47:[1,101],58:[1,100]}),o($Vk,[2,72]),o($Vt,[2,10]),o($Vx,[2,46]),o($Vx,[2,45]),{26:102,27:39,28:40,77:$Vg,78:$Vh,79:$Vi,80:$Vj},o($Vu,[2,48]),o($Vk,[2,34],{39:[1,103]}),{41:[1,104]},{40:105,41:[2,38],44:$Vy},o($Vk,[2,37]),o($Vk,[2,59]),o($Vk,[2,61]),o($Vk,[2,62],{58:[1,106]}),o($Vk,[2,65]),o($Vk,[2,66],{47:[1,107]}),o($Vk,[2,69]),o($Vk,[2,70],{58:[1,108]}),o($Vx,[2,47]),{40:109,44:$Vy},o($Vk,[2,35]),{41:[2,39]},o($Vk,[2,63]),o($Vk,[2,67]),o($Vk,[2,71]),{41:[1,110]},o($Vk,[2,36])], +defaultActions: {2:[2,1],3:[2,2],5:[2,8],12:[2,11],13:[2,3],19:[2,14],47:[2,13],48:[2,15],72:[2,18],105:[2,39]}, parseError: function parseError (str, hash) { if (hash.recoverable) { this.trace(str); @@ -6787,146 +6811,154 @@ options: {}, performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { var YYSTATE=YY_START; switch($avoiding_name_collisions) { -case 0: this.begin('open_directive'); return 13; +case 0: this.begin('open_directive'); return 18; break; -case 1: this.begin('type_directive'); return 14; +case 1:return 7; break; -case 2: this.popState(); this.begin('arg_directive'); return 11; +case 2:return 8; break; -case 3: this.popState(); this.popState(); return 16; +case 3:return 9; break; -case 4:return 15; +case 4:return 10; break; -case 5:/* skip comments */ +case 5: this.begin('type_directive'); return 19; break; -case 6:/* skip comments */ +case 6: this.popState(); this.begin('arg_directive'); return 16; break; -case 7:return 10; +case 7: this.popState(); this.popState(); return 21; break; -case 8:/* skip whitespace */ +case 8:return 20; break; -case 9:return 17; +case 9:/* skip comments */ break; -case 10:return 17; +case 10:/* skip comments */ break; -case 11: this.begin("struct"); /*console.log('Starting struct');*/ return 34; +case 11:return 15; break; -case 12:return "EOF_IN_STRUCT"; +case 12:/* skip whitespace */ break; -case 13:return "OPEN_IN_STRUCT"; +case 13:return 22; break; -case 14: /*console.log('Ending struct');*/this.popState(); return 36; +case 14:return 22; break; -case 15:/* nothing */ +case 15: this.begin("struct"); /*console.log('Starting struct');*/ return 39; break; -case 16: /*console.log('lex-member: ' + yy_.yytext);*/ return "MEMBER"; +case 16:return "EOF_IN_STRUCT"; break; -case 17:return 32; +case 17:return "OPEN_IN_STRUCT"; break; -case 18:return 58; +case 18: /*console.log('Ending struct');*/this.popState(); return 41; break; -case 19:return 51; +case 19:/* nothing */ break; -case 20:return 52; +case 20: /*console.log('lex-member: ' + yy_.yytext);*/ return "MEMBER"; break; -case 21:return 54; +case 21:return 37; break; -case 22:return 37; +case 22:return 63; break; -case 23:return 38; +case 23:return 56; break; -case 24:this.begin("generic"); +case 24:return 57; break; -case 25:this.popState(); +case 25:return 59; break; -case 26:return "GENERICTYPE"; +case 26:return 42; break; -case 27:this.begin("string"); +case 27:return 43; break; -case 28:this.popState(); +case 28:this.begin("generic"); break; -case 29:return "STR"; +case 29:this.popState(); break; -case 30:this.begin("bqstring"); +case 30:return "GENERICTYPE"; break; -case 31:this.popState(); +case 31:this.begin("string"); break; -case 32:return "BQUOTE_STR"; +case 32:this.popState(); break; -case 33:this.begin("href"); +case 33:return "STR"; break; -case 34:this.popState(); +case 34:this.begin("bqstring"); break; -case 35:return 57; +case 35:this.popState(); break; -case 36:this.begin("callback_name"); +case 36:return "BQUOTE_STR"; break; -case 37:this.popState(); +case 37:this.begin("href"); break; -case 38:this.popState(); this.begin("callback_args"); +case 38:this.popState(); break; -case 39:return 55; +case 39:return 62; break; -case 40:this.popState(); +case 40:this.begin("callback_name"); break; -case 41:return 56; +case 41:this.popState(); break; -case 42:return 53; +case 42:this.popState(); this.begin("callback_args"); break; -case 43:return 53; +case 43:return 60; break; -case 44:return 53; +case 44:this.popState(); break; -case 45:return 53; +case 45:return 61; break; -case 46:return 46; +case 46:return 58; break; -case 47:return 46; +case 47:return 58; break; -case 48:return 48; +case 48:return 58; break; -case 49:return 48; +case 49:return 58; break; -case 50:return 47; +case 50:return 51; break; -case 51:return 45; +case 51:return 51; break; -case 52:return 49; +case 52:return 53; break; -case 53:return 50; +case 53:return 53; break; -case 54:return 26; +case 54:return 52; break; -case 55:return 33; +case 55:return 50; break; -case 56:return 70; +case 56:return 54; break; -case 57:return 'DOT'; +case 57:return 55; break; -case 58:return 'PLUS'; +case 58:return 31; break; -case 59:return 67; +case 59:return 38; break; -case 60:return 'EQUALS'; +case 60:return 75; break; -case 61:return 'EQUALS'; +case 61:return 'DOT'; break; -case 62:return 74; +case 62:return 'PLUS'; break; -case 63:return 'PUNCTUATION'; +case 63:return 72; break; -case 64:return 73; +case 64:return 'EQUALS'; break; -case 65:return 72; +case 65:return 'EQUALS'; break; -case 66:return 69; +case 66:return 79; break; -case 67:return 19; +case 67:return 'PUNCTUATION'; +break; +case 68:return 78; +break; +case 69:return 77; +break; +case 70:return 74; +break; +case 71:return 24; break; } }, -rules: [/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:[{])/,/^(?:$)/,/^(?:[{])/,/^(?:[}])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:class\b)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[`])/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\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)/,/^(?:$)/], -conditions: {"arg_directive":{"rules":[3,4],"inclusive":false},"type_directive":{"rules":[2,3],"inclusive":false},"open_directive":{"rules":[1],"inclusive":false},"callback_args":{"rules":[40,41],"inclusive":false},"callback_name":{"rules":[37,38,39],"inclusive":false},"href":{"rules":[34,35],"inclusive":false},"struct":{"rules":[12,13,14,15,16],"inclusive":false},"generic":{"rules":[25,26],"inclusive":false},"bqstring":{"rules":[31,32],"inclusive":false},"string":{"rules":[28,29],"inclusive":false},"INITIAL":{"rules":[0,5,6,7,8,9,10,11,17,18,19,20,21,22,23,24,27,30,33,36,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],"inclusive":true}} +rules: [/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:[{])/,/^(?:$)/,/^(?:[{])/,/^(?:[}])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:class\b)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[`])/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\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)/,/^(?:$)/], +conditions: {"arg_directive":{"rules":[7,8],"inclusive":false},"type_directive":{"rules":[6,7],"inclusive":false},"open_directive":{"rules":[5],"inclusive":false},"callback_args":{"rules":[44,45],"inclusive":false},"callback_name":{"rules":[41,42,43],"inclusive":false},"href":{"rules":[38,39],"inclusive":false},"struct":{"rules":[16,17,18,19,20],"inclusive":false},"generic":{"rules":[29,30],"inclusive":false},"bqstring":{"rules":[35,36],"inclusive":false},"string":{"rules":[32,33],"inclusive":false},"INITIAL":{"rules":[0,1,2,3,4,9,10,11,12,13,14,15,21,22,23,24,25,26,27,28,31,34,37,40,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71],"inclusive":true}} }); return lexer; })(); @@ -6969,7 +7001,7 @@ if ( true && __webpack_require__.c[__webpack_require__.s] === module) { "use strict"; __webpack_require__.r(__webpack_exports__); var getStyles = function getStyles(options) { - return "g.classGroup text {\n fill: ".concat(options.nodeBorder, ";\n fill: ").concat(options.classText, ";\n stroke: none;\n font-family: ").concat(options.fontFamily, ";\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(options.mainBkg, ";\n stroke: ").concat(options.nodeBorder, ";\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ").concat(options.nodeBorder, ";\n stroke: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ").concat(options.mainBkg, ";\n stroke: ").concat(options.nodeBorder, ";\n}\n\ng.classGroup line {\n stroke: ").concat(options.nodeBorder, ";\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ").concat(options.mainBkg, ";\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ").concat(options.nodeBorder, ";\n font-size: 10px;\n}\n\n.relation {\n stroke: ").concat(options.lineColor, ";\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n#compositionStart, .composition {\n fill: ").concat(options.lineColor, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ").concat(options.lineColor, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ").concat(options.lineColor, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ").concat(options.lineColor, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: ").concat(options.lineColor, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: ").concat(options.lineColor, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: ").concat(options.mainBkg, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: ").concat(options.mainBkg, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n}\n\n"); + return "g.classGroup text {\n fill: ".concat(options.nodeBorder, ";\n fill: ").concat(options.classText, ";\n stroke: none;\n font-family: ").concat(options.fontFamily, ";\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n.nodeLabel, .edgeLabel {\n color: ").concat(options.classText, ";\n}\n.edgeLabel .label rect {\n fill: ").concat(options.mainBkg, ";\n}\n.label text {\n fill: ").concat(options.classText, ";\n}\n.edgeLabel .label span {\n background: ").concat(options.mainBkg, ";\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(options.mainBkg, ";\n stroke: ").concat(options.nodeBorder, ";\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ").concat(options.nodeBorder, ";\n stroke: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ").concat(options.mainBkg, ";\n stroke: ").concat(options.nodeBorder, ";\n}\n\ng.classGroup line {\n stroke: ").concat(options.nodeBorder, ";\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ").concat(options.mainBkg, ";\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ").concat(options.nodeBorder, ";\n font-size: 10px;\n}\n\n.relation {\n stroke: ").concat(options.lineColor, ";\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n#compositionStart, .composition {\n fill: ").concat(options.lineColor, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ").concat(options.lineColor, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ").concat(options.lineColor, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ").concat(options.lineColor, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: ").concat(options.lineColor, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: ").concat(options.lineColor, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: ").concat(options.mainBkg, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: ").concat(options.mainBkg, " !important;\n stroke: ").concat(options.lineColor, " !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n}\n\n"); }; /* harmony default export */ __webpack_exports__["default"] = (getStyles); @@ -8098,19 +8130,19 @@ case 7: case 8: this.$=[]; break; case 12: - - yy.addEntity($$[$0-4]); - yy.addEntity($$[$0-2]); - yy.addRelationship($$[$0-4], $$[$0], $$[$0-2], $$[$0-3]); - /*console.log($$[$0-4] + $$[$0-3] + $$[$0-2] + ':' + $$[$0]);*/ + + yy.addEntity($$[$0-4]); + yy.addEntity($$[$0-2]); + yy.addRelationship($$[$0-4], $$[$0], $$[$0-2], $$[$0-3]); + /*console.log($$[$0-4] + $$[$0-3] + $$[$0-2] + ':' + $$[$0]);*/ break; case 13: - - /* console.log('detected block'); */ - yy.addEntity($$[$0-3]); - yy.addAttributes($$[$0-3], $$[$0-1]); - /* console.log('handled block'); */ + + /* console.log('detected block'); */ + yy.addEntity($$[$0-3]); + yy.addAttributes($$[$0-3], $$[$0-1]); + /* console.log('handled block'); */ break; case 14: @@ -8135,9 +8167,9 @@ case 20: case 21: this.$=$$[$0]; break; case 22: - - this.$ = { cardA: $$[$0], relType: $$[$0-1], cardB: $$[$0-2] }; - /*console.log('relSpec: ' + $$[$0] + $$[$0-1] + $$[$0-2]);*/ + + this.$ = { cardA: $$[$0], relType: $$[$0-1], cardB: $$[$0-2] }; + /*console.log('relSpec: ' + $$[$0] + $$[$0-1] + $$[$0-2]);*/ break; case 23: @@ -8329,7 +8361,7 @@ parse: function parse(input) { } return true; }}; - + /* generated by jison-lex 0.3.4 */ var lexer = (function(){ var lexer = ({ @@ -12151,7 +12183,7 @@ if ( true && __webpack_require__.c[__webpack_require__.s] === module) { "use strict"; __webpack_require__.r(__webpack_exports__); var getStyles = function getStyles(options) { - return ".label {\n font-family: ".concat(options.fontFamily, ";\n color: ").concat(options.nodeTextColor || options.textColor, ";\n }\n .cluster-label text {\n fill: ").concat(options.titleColor, ";\n }\n .cluster-label span {\n color: ").concat(options.titleColor, ";\n }\n\n .label text,span {\n fill: ").concat(options.nodeTextColor || options.textColor, ";\n color: ").concat(options.nodeTextColor || options.textColor, ";\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(options.mainBkg, ";\n stroke: ").concat(options.nodeBorder, ";\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ").concat(options.arrowheadColor, ";\n }\n\n .edgePath .path {\n stroke: ").concat(options.lineColor, ";\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ").concat(options.lineColor, ";\n fill: none;\n }\n\n .edgeLabel {\n background-color: ").concat(options.edgeLabelBackground, ";\n rect {\n opacity: 0.5;\n background-color: ").concat(options.edgeLabelBackground, ";\n fill: ").concat(options.edgeLabelBackground, ";\n }\n text-align: center;\n }\n\n .cluster rect {\n fill: ").concat(options.clusterBkg, ";\n stroke: ").concat(options.clusterBorder, ";\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ").concat(options.titleColor, ";\n }\n\n .cluster span {\n color: ").concat(options.titleColor, ";\n }\n // .cluster div {\n // color: ").concat(options.titleColor, ";\n // }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ").concat(options.fontFamily, ";\n font-size: 12px;\n background: ").concat(options.tertiaryColor, ";\n border: 1px solid ").concat(options.border2, ";\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n"); + return ".label {\n font-family: ".concat(options.fontFamily, ";\n color: ").concat(options.nodeTextColor || options.textColor, ";\n }\n .cluster-label text {\n fill: ").concat(options.titleColor, ";\n }\n .cluster-label span {\n color: ").concat(options.titleColor, ";\n }\n\n .label text,span {\n fill: ").concat(options.nodeTextColor || options.textColor, ";\n color: ").concat(options.nodeTextColor || options.textColor, ";\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(options.mainBkg, ";\n stroke: ").concat(options.nodeBorder, ";\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ").concat(options.arrowheadColor, ";\n }\n\n .edgePath .path {\n stroke: ").concat(options.lineColor, ";\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ").concat(options.lineColor, ";\n fill: none;\n }\n\n .edgeLabel {\n background-color: ").concat(options.edgeLabelBackground, ";\n rect {\n opacity: 0.5;\n background-color: ").concat(options.edgeLabelBackground, ";\n fill: ").concat(options.edgeLabelBackground, ";\n }\n text-align: center;\n }\n\n .cluster rect {\n fill: ").concat(options.clusterBkg, ";\n stroke: ").concat(options.clusterBorder, ";\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ").concat(options.titleColor, ";\n }\n\n .cluster span {\n color: ").concat(options.titleColor, ";\n }\n // .cluster div {\n // color: ").concat(options.titleColor, ";\n // }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ").concat(options.fontFamily, ";\n font-size: 12px;\n background: ").concat(options.tertiaryColor, ";\n border: 1px solid ").concat(options.border2, ";\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n"); }; /* harmony default export */ __webpack_exports__["default"] = (getStyles); @@ -13601,7 +13633,7 @@ parse: function parse(input) { } return true; }}; - + /* generated by jison-lex 0.3.4 */ var lexer = (function(){ var lexer = ({ @@ -15746,7 +15778,7 @@ parse: function parse(input) { } return true; }}; - + /* generated by jison-lex 0.3.4 */ var lexer = (function(){ var lexer = ({ @@ -16072,8 +16104,8 @@ stateStackSize:function stateStackSize() { return this.conditionStack.length; }, options: {"case-insensitive":true}, -performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { - // Pre-lexer code can go here +performAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) { + // Pre-lexer code can go here var YYSTATE=YY_START; switch($avoiding_name_collisions) { @@ -16411,7 +16443,7 @@ parse: function parse(input) { } return true; }}; - + /* generated by jison-lex 0.3.4 */ var lexer = (function(){ var lexer = ({ @@ -17396,7 +17428,7 @@ parse: function parse(input) { } return true; }}; - + /* generated by jison-lex 0.3.4 */ var lexer = (function(){ var lexer = ({ @@ -18478,39 +18510,39 @@ case 19: this.$=[{type:'setTitle', text:$$[$0-1]}] break; case 20: - - $$[$0-1].unshift({type: 'loopStart', loopText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.LOOP_START}); - $$[$0-1].push({type: 'loopEnd', loopText:$$[$0-2], signalType: yy.LINETYPE.LOOP_END}); + + $$[$0-1].unshift({type: 'loopStart', loopText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.LOOP_START}); + $$[$0-1].push({type: 'loopEnd', loopText:$$[$0-2], signalType: yy.LINETYPE.LOOP_END}); this.$=$$[$0-1]; break; case 21: - - $$[$0-1].unshift({type: 'rectStart', color:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.RECT_START }); - $$[$0-1].push({type: 'rectEnd', color:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.RECT_END }); + + $$[$0-1].unshift({type: 'rectStart', color:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.RECT_START }); + $$[$0-1].push({type: 'rectEnd', color:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.RECT_END }); this.$=$$[$0-1]; break; case 22: - - $$[$0-1].unshift({type: 'optStart', optText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.OPT_START}); - $$[$0-1].push({type: 'optEnd', optText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.OPT_END}); + + $$[$0-1].unshift({type: 'optStart', optText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.OPT_START}); + $$[$0-1].push({type: 'optEnd', optText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.OPT_END}); this.$=$$[$0-1]; break; case 23: - - // Alt start - $$[$0-1].unshift({type: 'altStart', altText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.ALT_START}); - // Content in alt is already in $$[$0-1] - // End - $$[$0-1].push({type: 'altEnd', signalType: yy.LINETYPE.ALT_END}); + + // Alt start + $$[$0-1].unshift({type: 'altStart', altText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.ALT_START}); + // Content in alt is already in $$[$0-1] + // End + $$[$0-1].push({type: 'altEnd', signalType: yy.LINETYPE.ALT_END}); this.$=$$[$0-1]; break; case 24: - - // Parallel start - $$[$0-1].unshift({type: 'parStart', parText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.PAR_START}); - // Content in par is already in $$[$0-1] - // End - $$[$0-1].push({type: 'parEnd', signalType: yy.LINETYPE.PAR_END}); + + // Parallel start + $$[$0-1].unshift({type: 'parStart', parText:yy.parseMessage($$[$0-2]), signalType: yy.LINETYPE.PAR_START}); + // Content in par is already in $$[$0-1] + // End + $$[$0-1].push({type: 'parEnd', signalType: yy.LINETYPE.PAR_END}); this.$=$$[$0-1]; break; case 27: @@ -18520,15 +18552,15 @@ case 29: this.$ = $$[$0-3].concat([{type: 'else', altText:yy.parseMessage($$[$0-1]), signalType: yy.LINETYPE.ALT_ELSE}, $$[$0]]); break; case 30: - + this.$ = [$$[$0-1], {type:'addNote', placement:$$[$0-2], actor:$$[$0-1].actor, text:$$[$0]}]; break; case 31: - - // Coerce actor_pair into a [to, from, ...] array - $$[$0-2] = [].concat($$[$0-1], $$[$0-1]).slice(0, 2); - $$[$0-2][0] = $$[$0-2][0].actor; - $$[$0-2][1] = $$[$0-2][1].actor; + + // Coerce actor_pair into a [to, from, ...] array + $$[$0-2] = [].concat($$[$0-1], $$[$0-1]).slice(0, 2); + $$[$0-2][0] = $$[$0-2][0].actor; + $$[$0-2][1] = $$[$0-2][1].actor; this.$ = [$$[$0-1], {type:'addNote', placement:yy.PLACEMENT.OVER, actor:$$[$0-2].slice(0, 2), text:$$[$0]}]; break; case 34: @@ -18544,13 +18576,13 @@ case 37: this.$ = yy.PLACEMENT.RIGHTOF; break; case 38: - this.$ = [$$[$0-4],$$[$0-1],{type: 'addMessage', from:$$[$0-4].actor, to:$$[$0-1].actor, signalType:$$[$0-3], msg:$$[$0]}, - {type: 'activeStart', signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0-1]} + this.$ = [$$[$0-4],$$[$0-1],{type: 'addMessage', from:$$[$0-4].actor, to:$$[$0-1].actor, signalType:$$[$0-3], msg:$$[$0]}, + {type: 'activeStart', signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0-1]} ] break; case 39: - this.$ = [$$[$0-4],$$[$0-1],{type: 'addMessage', from:$$[$0-4].actor, to:$$[$0-1].actor, signalType:$$[$0-3], msg:$$[$0]}, - {type: 'activeEnd', signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0-4]} + this.$ = [$$[$0-4],$$[$0-1],{type: 'addMessage', from:$$[$0-4].actor, to:$$[$0-1].actor, signalType:$$[$0-3], msg:$$[$0]}, + {type: 'activeEnd', signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0-4]} ] break; case 40: @@ -18751,7 +18783,7 @@ parse: function parse(input) { } return true; }}; - + /* generated by jison-lex 0.3.4 */ var lexer = (function(){ var lexer = ({ @@ -21194,11 +21226,11 @@ case 5: this.$ = [] break; case 6: - - if($$[$0]!='nl'){ - $$[$0-1].push($$[$0]);this.$ = $$[$0-1] - } - // console.warn('Got document',$$[$0-1], $$[$0]); + + if($$[$0]!='nl'){ + $$[$0-1].push($$[$0]);this.$ = $$[$0-1] + } + // console.warn('Got document',$$[$0-1], $$[$0]); break; case 7: case 8: @@ -21214,66 +21246,66 @@ case 11: /*console.warn('got id and descr', $$[$0-1], $$[$0].trim());*/this.$={ stmt: 'state', id: $$[$0-1], type: 'default', description: yy.trimColon($$[$0])}; break; case 12: - - /*console.warn('got id', $$[$0-2]);yy.addRelation($$[$0-2], $$[$0]);*/ - this.$={ stmt: 'relation', state1: { stmt: 'state', id: $$[$0-2], type: 'default', description: '' }, state2:{ stmt: 'state', id: $$[$0] ,type: 'default', description: ''}}; + + /*console.warn('got id', $$[$0-2]);yy.addRelation($$[$0-2], $$[$0]);*/ + this.$={ stmt: 'relation', state1: { stmt: 'state', id: $$[$0-2], type: 'default', description: '' }, state2:{ stmt: 'state', id: $$[$0] ,type: 'default', description: ''}}; break; case 13: - - /*yy.addRelation($$[$0-3], $$[$0-1], $$[$0].substr(1).trim());*/ - this.$={ stmt: 'relation', state1: { stmt: 'state', id: $$[$0-3], type: 'default', description: '' }, state2:{ stmt: 'state', id: $$[$0-1] ,type: 'default', description: ''}, description: $$[$0].substr(1).trim()}; + + /*yy.addRelation($$[$0-3], $$[$0-1], $$[$0].substr(1).trim());*/ + this.$={ stmt: 'relation', state1: { stmt: 'state', id: $$[$0-3], type: 'default', description: '' }, state2:{ stmt: 'state', id: $$[$0-1] ,type: 'default', description: ''}, description: $$[$0].substr(1).trim()}; break; case 17: - - /* console.warn('Adding document for state without id ', $$[$0-3]);*/ - this.$={ stmt: 'state', id: $$[$0-3], type: 'default', description: '', doc: $$[$0-1] } + + /* console.warn('Adding document for state without id ', $$[$0-3]);*/ + this.$={ stmt: 'state', id: $$[$0-3], type: 'default', description: '', doc: $$[$0-1] } break; case 18: - - var id=$$[$0]; - var description = $$[$0-2].trim(); - if($$[$0].match(':')){ - var parts = $$[$0].split(':'); - id=parts[0]; - description = [description, parts[1]]; - } - this.$={stmt: 'state', id: id, type: 'default', description: description}; - + + var id=$$[$0]; + var description = $$[$0-2].trim(); + if($$[$0].match(':')){ + var parts = $$[$0].split(':'); + id=parts[0]; + description = [description, parts[1]]; + } + this.$={stmt: 'state', id: id, type: 'default', description: description}; + break; case 19: - - // console.warn('Adding document for state with id zxzx', $$[$0-3], $$[$0-2], yy.getDirection()); yy.addDocument($$[$0-3]); - this.$={ stmt: 'state', id: $$[$0-3], type: 'default', description: $$[$0-5], doc: $$[$0-1] } + + // console.warn('Adding document for state with id zxzx', $$[$0-3], $$[$0-2], yy.getDirection()); yy.addDocument($$[$0-3]); + this.$={ stmt: 'state', id: $$[$0-3], type: 'default', description: $$[$0-5], doc: $$[$0-1] } break; case 20: - - this.$={ stmt: 'state', id: $$[$0], type: 'fork' } + + this.$={ stmt: 'state', id: $$[$0], type: 'fork' } break; case 21: - - this.$={ stmt: 'state', id: $$[$0], type: 'join' } + + this.$={ stmt: 'state', id: $$[$0], type: 'join' } break; case 22: - - this.$={ stmt: 'state', id: $$[$0], type: 'choice' } + + this.$={ stmt: 'state', id: $$[$0], type: 'choice' } break; case 23: - - this.$={ stmt: 'state', id: yy.getDividerId(), type: 'divider' } + + this.$={ stmt: 'state', id: yy.getDividerId(), type: 'divider' } break; case 24: - - /* console.warn('got NOTE, position: ', $$[$0-2].trim(), 'id = ', $$[$0-1].trim(), 'note: ', $$[$0]);*/ - this.$={ stmt: 'state', id: $$[$0-1].trim(), note:{position: $$[$0-2].trim(), text: $$[$0].trim()}}; + + /* console.warn('got NOTE, position: ', $$[$0-2].trim(), 'id = ', $$[$0-1].trim(), 'note: ', $$[$0]);*/ + this.$={ stmt: 'state', id: $$[$0-1].trim(), note:{position: $$[$0-2].trim(), text: $$[$0].trim()}}; break; case 30: @@ -21456,7 +21488,7 @@ parse: function parse(input) { } return true; }}; - + /* generated by jison-lex 0.3.4 */ var lexer = (function(){ var lexer = ({ @@ -24029,7 +24061,7 @@ parse: function parse(input) { } return true; }}; - + /* generated by jison-lex 0.3.4 */ var lexer = (function(){ var lexer = ({ @@ -27873,7 +27905,7 @@ var calcTerminalLabelPosition = function calcTerminalLabelPosition(terminalMarke prevPoint = point; }); // Traverse only 25 total distance along points to find cardinality point - var distanceToCardinalityPoint = 25; + var distanceToCardinalityPoint = 25 + terminalMarkerSize; var remainingDistance = distanceToCardinalityPoint; var center; prevPoint = undefined; @@ -27905,7 +27937,7 @@ var calcTerminalLabelPosition = function calcTerminalLabelPosition(terminalMarke prevPoint = point; }); // if relation is present (Arrows will be added), change cardinality point off-set distance (d) - var d = 10; //Calculate Angle for x and y axis + var d = 10 + terminalMarkerSize * 0.5; //Calculate Angle for x and y axis var angle = Math.atan2(points[0].y - center.y, points[0].x - center.x); var cardinalityPosition = { diff --git a/dist/mermaid.core.js.map b/dist/mermaid.core.js.map index 88ed38823..0d806777a 100644 --- a/dist/mermaid.core.js.map +++ b/dist/mermaid.core.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://mermaid/webpack/universalModuleDefinition","webpack://mermaid/webpack/bootstrap","webpack://mermaid/./node_modules/path-browserify/index.js","webpack://mermaid/./node_modules/process/browser.js","webpack://mermaid/(webpack)/buildin/module.js","webpack://mermaid/./src/config.js","webpack://mermaid/./src/dagre-wrapper/clusters.js","webpack://mermaid/./src/dagre-wrapper/createLabel.js","webpack://mermaid/./src/dagre-wrapper/edges.js","webpack://mermaid/./src/dagre-wrapper/index.js","webpack://mermaid/./src/dagre-wrapper/intersect/index.js","webpack://mermaid/./src/dagre-wrapper/intersect/intersect-circle.js","webpack://mermaid/./src/dagre-wrapper/intersect/intersect-ellipse.js","webpack://mermaid/./src/dagre-wrapper/intersect/intersect-line.js","webpack://mermaid/./src/dagre-wrapper/intersect/intersect-node.js","webpack://mermaid/./src/dagre-wrapper/intersect/intersect-polygon.js","webpack://mermaid/./src/dagre-wrapper/intersect/intersect-rect.js","webpack://mermaid/./src/dagre-wrapper/markers.js","webpack://mermaid/./src/dagre-wrapper/mermaid-graphlib.js","webpack://mermaid/./src/dagre-wrapper/nodes.js","webpack://mermaid/./src/dagre-wrapper/shapes/note.js","webpack://mermaid/./src/dagre-wrapper/shapes/util.js","webpack://mermaid/./src/defaultConfig.js","webpack://mermaid/./src/diagrams/class/classDb.js","webpack://mermaid/./src/diagrams/class/classRenderer-v2.js","webpack://mermaid/./src/diagrams/class/classRenderer.js","webpack://mermaid/./src/diagrams/class/parser/classDiagram.jison","webpack://mermaid/./src/diagrams/class/styles.js","webpack://mermaid/./src/diagrams/class/svgDraw.js","webpack://mermaid/./src/diagrams/common/common.js","webpack://mermaid/./src/diagrams/er/erDb.js","webpack://mermaid/./src/diagrams/er/erMarkers.js","webpack://mermaid/./src/diagrams/er/erRenderer.js","webpack://mermaid/./src/diagrams/er/parser/erDiagram.jison","webpack://mermaid/./src/diagrams/er/styles.js","webpack://mermaid/./src/diagrams/flowchart/flowChartShapes.js","webpack://mermaid/./src/diagrams/flowchart/flowDb.js","webpack://mermaid/./src/diagrams/flowchart/flowRenderer-v2.js","webpack://mermaid/./src/diagrams/flowchart/flowRenderer.js","webpack://mermaid/./src/diagrams/flowchart/parser/flow.jison","webpack://mermaid/./src/diagrams/flowchart/styles.js","webpack://mermaid/./src/diagrams/gantt/ganttDb.js","webpack://mermaid/./src/diagrams/gantt/ganttRenderer.js","webpack://mermaid/./src/diagrams/gantt/parser/gantt.jison","webpack://mermaid/./src/diagrams/gantt/styles.js","webpack://mermaid/./src/diagrams/git/gitGraphAst.js","webpack://mermaid/./src/diagrams/git/gitGraphRenderer.js","webpack://mermaid/./src/diagrams/git/parser/gitGraph.jison","webpack://mermaid/./src/diagrams/git/styles.js","webpack://mermaid/./src/diagrams/info/infoDb.js","webpack://mermaid/./src/diagrams/info/infoRenderer.js","webpack://mermaid/./src/diagrams/info/parser/info.jison","webpack://mermaid/./src/diagrams/info/styles.js","webpack://mermaid/./src/diagrams/pie/parser/pie.jison","webpack://mermaid/./src/diagrams/pie/pieDb.js","webpack://mermaid/./src/diagrams/pie/pieRenderer.js","webpack://mermaid/./src/diagrams/pie/styles.js","webpack://mermaid/./src/diagrams/requirement/parser/requirementDiagram.jison","webpack://mermaid/./src/diagrams/requirement/requirementDb.js","webpack://mermaid/./src/diagrams/requirement/requirementMarkers.js","webpack://mermaid/./src/diagrams/requirement/requirementRenderer.js","webpack://mermaid/./src/diagrams/requirement/styles.js","webpack://mermaid/./src/diagrams/sequence/parser/sequenceDiagram.jison","webpack://mermaid/./src/diagrams/sequence/sequenceDb.js","webpack://mermaid/./src/diagrams/sequence/sequenceRenderer.js","webpack://mermaid/./src/diagrams/sequence/styles.js","webpack://mermaid/./src/diagrams/sequence/svgDraw.js","webpack://mermaid/./src/diagrams/state/id-cache.js","webpack://mermaid/./src/diagrams/state/parser/stateDiagram.jison","webpack://mermaid/./src/diagrams/state/shapes.js","webpack://mermaid/./src/diagrams/state/stateDb.js","webpack://mermaid/./src/diagrams/state/stateRenderer-v2.js","webpack://mermaid/./src/diagrams/state/stateRenderer.js","webpack://mermaid/./src/diagrams/state/styles.js","webpack://mermaid/./src/diagrams/user-journey/journeyDb.js","webpack://mermaid/./src/diagrams/user-journey/journeyRenderer.js","webpack://mermaid/./src/diagrams/user-journey/parser/journey.jison","webpack://mermaid/./src/diagrams/user-journey/styles.js","webpack://mermaid/./src/diagrams/user-journey/svgDraw.js","webpack://mermaid/./src/errorRenderer.js","webpack://mermaid/./src/logger.js","webpack://mermaid/./src/mermaid.js","webpack://mermaid/./src/mermaidAPI.js","webpack://mermaid/./src/styles.js","webpack://mermaid/./src/themes/index.js","webpack://mermaid/./src/themes/theme-base.js","webpack://mermaid/./src/themes/theme-dark.js","webpack://mermaid/./src/themes/theme-default.js","webpack://mermaid/./src/themes/theme-forest.js","webpack://mermaid/./src/themes/theme-helpers.js","webpack://mermaid/./src/themes/theme-neutral.js","webpack://mermaid/./src/utils.js","webpack://mermaid/external \"@braintree/sanitize-url\"","webpack://mermaid/external \"d3\"","webpack://mermaid/external \"dagre\"","webpack://mermaid/external \"dagre-d3\"","webpack://mermaid/external \"dagre-d3/lib/label/add-html-label.js\"","webpack://mermaid/external \"dompurify\"","webpack://mermaid/external \"graphlib\"","webpack://mermaid/external \"khroma\"","webpack://mermaid/external \"moment-mini\"","webpack://mermaid/external \"stylis\""],"names":["defaultConfig","Object","freeze","config","siteConfig","assignWithDepth","configFromInitialize","directives","currentConfig","updateCurrentConfig","siteCfg","_directives","cfg","sumOfDirectives","i","length","d","sanitize","theme","tmpConfigFromInitialize","themeVariables","getThemeVariables","setSiteConfig","conf","saveConfigFromInitilize","updateSiteConfig","getSiteConfig","setConfig","getConfig","options","keys","secure","forEach","key","log","debug","indexOf","addDirective","directive","fontFamily","push","reset","rect","parent","node","trace","id","shapeSvg","insert","attr","class","label","text","appendChild","createLabel","labelText","labelStyle","undefined","bbox","getBBox","evaluate","flowchart","htmlLabels","div","children","dv","select","getBoundingClientRect","width","height","padding","halfPadding","diff","JSON","stringify","style","rx","ry","x","y","rectBox","intersect","point","intersectRect","noteGroup","roundedWithTitle","classes","innerRect","append","divider","shapes","clusterElems","insertCluster","elem","shape","getClusterTitleWidth","removeChild","clear","positionCluster","info","el","applyStyle","dom","styleFn","addHtmlLabel","fo","document","createElementNS","labelClass","isNode","html","_vertexText","isTitle","vertexText","replace","s","vertexNode","svgLabel","setAttribute","rows","split","Array","isArray","j","tspan","setAttributeNS","textContent","trim","edgeLabels","terminalLabels","insertEdgeLabel","edge","labelElement","edgeLabel","startLabelLeft","startLabelElement","startEdgeLabelLeft","inner","slBox","startLeft","setTerminalWidth","startLabelRight","startEdgeLabelRight","startRight","endLabelLeft","endLabelElement","endEdgeLabelLeft","endLeft","endLabelRight","endEdgeLabelRight","endRight","box","positionEdgeLabel","paths","path","updatedPath","originalPath","pos","utils","calcLabelPosition","calcTerminalLabelPosition","outsideNode","dx","Math","abs","dy","w","h","intersection","outsidePoint","insidePoint","warn","r","Q","R","q","res","_x","_y","cutPathAtIntersect","_points","boundryNode","points","lastPointOutside","isInside","inter","pointPresent","p","find","e","insertEdge","clusterDb","diagramType","graph","pointsHasChanged","tail","v","head","slice","unshift","toCluster","fromCluster","reverse","lineData","filter","Number","isNaN","curve","curveBasis","lineFunction","line","strokeClasses","thickness","pattern","svgPath","url","state","arrowMarkerAbsolute","window","location","protocol","host","pathname","search","arrowTypeStart","arrowTypeEnd","recursiveRender","_elem","diagramtype","parentCluster","graphlib","json","write","dir","rankdir","nodes","edges","clusters","edgePaths","data","parse","clusterData","setNode","setParent","clusterNode","o","newEl","updateNodeBounds","setNodeElem","findNonClusterChild","insertNode","name","dagre","layout","sortNodesByHierarchy","positionNode","n","type","render","markers","insertMarkers","clearNodes","clearEdges","clearClusters","clearGraphlib","adjustClustersAndEdges","circle","ellipse","polygon","intersectCircle","intersectEllipse","cx","cy","px","py","det","sqrt","intersectLine","p1","p2","q1","q2","a1","a2","b1","b2","c1","c2","r1","r2","r3","r4","denom","offset","num","sameSign","module","exports","intersectNode","intersectPolygon","polyPoints","x1","y1","intersections","minX","POSITIVE_INFINITY","minY","entry","min","left","top","sort","pdx","pdy","distp","qdx","qdy","distq","sx","sy","markerArray","markerName","extension","composition","aggregation","dependency","cross","barb","decendants","parents","isDecendant","ancenstorId","edgeInCluster","clusterId","copy","newGraph","rootId","setEdge","error","removeNode","extractDecendants","concat","validate","_id","getAnchorId","externalConnections","depth","d1","d2","removeEdge","extractor","hasChildren","graphSettings","clusterGraph","Graph","multigraph","compound","setGraph","nodesep","ranksep","marginx","marginy","setDefaultEdgeLabel","sorter","result","assign","sorted","question","labelHelper","questionElem","insertPolygonShape","choice","domId","map","join","hexagon","f","m","hex","rect_left_inv_arrow","lean_right","lean_left","trapezoid","inv_trapezoid","rect_right_inv_arrow","cylinder","rectWithTitle","innerLine","text2","flat","title","textRows","titleBox","descr","stadium","subroutine","start","forkJoin","end","innerCircle","class_box","rowPadding","lineHeight","topLine","bottomLine","maxWidth","maxHeight","labelContainer","verticalPos","hasInterface","classData","annotations","interfaceLabelText","interfaceLabel","interfaceBBox","classTitleString","classTitleLabel","classTitleBBox","classAttributes","members","str","parsedText","parseMember","displayText","lbl","classMethods","methods","parsedInfo","cssStyle","diffX","note","fork","nodeElems","link","linkTarget","tooltip","haveCallback","_classes","element","themeCSS","maxTextSize","logLevel","securityLevel","startOnLoad","deterministicIds","deterministicIDSeed","diagramPadding","nodeSpacing","rankSpacing","useMaxWidth","defaultRenderer","sequence","activationWidth","diagramMarginX","diagramMarginY","actorMargin","boxMargin","boxTextMargin","noteMargin","messageMargin","messageAlign","mirrorActors","bottomMarginAdj","rightAngles","showSequenceNumbers","actorFontSize","actorFontFamily","actorFontWeight","noteFontSize","noteFontFamily","noteFontWeight","noteAlign","messageFontSize","messageFontFamily","messageFontWeight","wrap","wrapPadding","labelBoxWidth","labelBoxHeight","messageFont","fontSize","fontWeight","noteFont","actorFont","gantt","titleTopMargin","barHeight","barGap","topPadding","rightPadding","leftPadding","gridLineStartPadding","sectionFontSize","numberSectionStyles","axisFormat","topAxis","useWidth","journey","leftMargin","taskFontSize","taskFontFamily","taskMargin","textPlacement","actorColours","sectionFills","sectionColours","git","dividerMargin","sizeUnit","textHeight","titleShift","forkWidth","forkHeight","miniPadding","fontSizeFactor","labelHeight","edgeLengthFactor","compositTitleSize","radius","er","layoutDirection","minEntityWidth","minEntityHeight","entityPadding","stroke","fill","pie","requirement","rect_fill","text_color","rect_border_size","rect_border_color","rect_min_width","rect_min_height","rect_padding","line_height","keyify","obj","prefix","reduce","configKeys","MERMAID_DOM_ID_PREFIX","relations","classCounter","funs","parseDirective","statement","context","mermaidAPI","splitClassNameAndType","genericType","className","addClass","classId","cssClasses","lookUpDomId","classKeys","setupToolTips","getClass","getClasses","getRelations","addRelation","relation","id1","id2","addAnnotation","annotation","validatedClassName","addMember","member","theClass","memberString","startsWith","endsWith","substring","addMembers","cleanupLabel","substr","setCssClass","ids","match","setTooltip","configApi","common","sanitizeText","setLink","linkStr","target","formatUrl","setClickEvent","functionName","functionArgs","setClickFunc","elemId","argList","item","charAt","querySelector","addEventListener","runFunc","bindFunctions","fun","lineType","LINE","DOTTED_LINE","relationType","AGGREGATION","EXTENSION","COMPOSITION","DEPENDENCY","tooltipElem","_groups","svg","selectAll","on","transition","duration","scrollX","right","scrollY","body","scrollTop","classed","parser","yy","classDb","idCache","addClasses","g","vertex","cssClassStr","styles","radious","_shape","addRelations","cnt","defaultStyle","defaultLabelStyle","edgeData","arrowhead","relationTitle1","relationTitle2","getArrowMarker","type1","type2","getStylesFromArray","interpolate","interpolateToCurve","curveLinear","defaultInterpolate","arrowheadStyle","labelpos","labelType","lineBreakRegex","getGraphId","setConf","cnf","drawOld","diagram","isMultiGraph","classDef","svgDraw","drawClass","drawEdge","svgBounds","configureSvgSize","vBox","draw","_label","labels","querySelectorAll","k","dim","insertBefore","firstChild","marker","getStyles","nodeBorder","classText","mainBkg","lineColor","edgeCount","getRelationType","l","labelPosition","p1_card_x","p1_card_y","p2_card_x","p2_card_y","cardinality_1_point","calcCardinalityPosition","cardinality_2_point","bounds","classInfo","isFirst","titleText2","classTitle","titleHeight","membersLine","addTspan","membersBox","methodsLine","method","classBox","rectWidth","childNodes","fieldRegEx","methodRegEx","fieldMatch","methodMatch","buildFieldDisplay","buildMethodDisplay","buildLegacyDisplay","visibility","fieldType","parseGenericTypes","fieldName","err","methodName","parameters","classifier","returnType","parseClassifier","memberText","methodStart","methodEnd","firstChar","textEl","txt","tSpan","cleanedText","getRows","breakToPlaceholder","removeScript","rs","idx","sanitizeMore","level","placeholderToBreak","DOMPurify","hasBreaks","test","splitBreaks","getUrl","useAbsolute","val","entities","relationships","Cardinality","ZERO_OR_ONE","ZERO_OR_MORE","ONE_OR_MORE","ONLY_ONE","Identification","NON_IDENTIFYING","IDENTIFYING","addEntity","attributes","getEntities","addAttributes","entityName","attribs","entity","attributeName","addRelationship","entA","rolA","entB","rSpec","rel","entityA","roleA","entityB","relSpec","getRelationships","setTitle","getTitle","ERMarkers","ONLY_ONE_START","ONLY_ONE_END","ZERO_OR_ONE_START","ZERO_OR_ONE_END","ONE_OR_MORE_START","ONE_OR_MORE_END","ZERO_OR_MORE_START","ZERO_OR_MORE_END","drawAttributes","groupNode","entityTextNode","heightPadding","widthPadding","attrFontSize","labelBBox","attributeNodes","maxTypeWidth","maxNameWidth","cumulativeHeight","attrNum","attrPrefix","typeNode","attributeType","nameNode","tn","nn","typeBBox","nameBBox","max","bBox","spareWidth","heightOffset","attribStyle","nodePair","alignY","typeRect","parseFloat","drawEntities","svgNode","firstOne","textId","textNode","entityWidth","entityHeight","rectNode","rectBBox","adjustEntities","getEdgeName","addRelationships","relationship","relCnt","drawRelationshipFromLayout","relType","erDb","cardA","erMarkers","cardB","len","getTotalLength","labelPoint","getPointAtLength","labelId","labelNode","erParser","directed","edgesep","firstEntity","tertiaryColor","dagreD3","addToRender","addToRenderV2","addShape","vertexCounter","vertices","subGraphs","subGraphLookup","tooltips","subCount","firstGraphFlag","direction","version","veritceKeys","addVertex","addSingleLink","_start","_end","linktext","addLink","updateLinkInterpolate","positions","interp","updateLink","isSubstringInArray","textStyles","newStyle1","newStyle2","setDirection","setClass","setClickFun","getTooltip","getDirection","getVertices","getEdges","ver","setGen","addSubGraph","list","_title","uniq","a","prims","boolean","number","string","objs","nodeList","stmt","value","hasOwnProperty","apply","nl","subGraph","makeUniq","getPosForId","secCount","posCrossRef","indexNodes2","count","posCount","childPos","getDepthFirstPos","indexNodes","getSubGraphs","firstGraph","destructStartLink","_str","countChar","char","destructEndLink","dots","destructLink","_startStr","startInfo","exists","allSgs","sg","allSubgraphs","lex","addVertices","vert","svgId","classStr","parentNode","flowDb","addEdges","linkIdCnt","defaultStyles","linkIdBase","linkId","linkNameStart","linkNameEnd","minlen","flow","subG","linkNode","Render","flowChartShapes","arrows","none","normal","util","clusterRects","clusterEl","xPos","baseVal","yPos","cluster","te","classList","add","nodeTextColor","textColor","titleColor","arrowheadColor","edgeLabelBackground","clusterBkg","clusterBorder","border2","dateFormat","todayMarker","excludes","sections","tasks","currentSection","tags","inclusiveEndDates","lastOrder","taskCnt","lastTask","lastTaskID","rawTasks","setAxisFormat","getAxisFormat","setTodayMarker","getTodayMarker","setDateFormat","enableInclusiveEndDates","endDatesAreInclusive","enableTopAxis","topAxisEnabled","getDateFormat","setExcludes","toLowerCase","getExcludes","addSection","getSections","getTasks","allItemsPricessed","compileTasks","maxDepth","iterationCount","isInvalidDate","date","isoWeekday","format","checkTaskDates","task","manualEndTime","startTime","moment","endTime","renderEndTime","fixTaskDates","toDate","invalid","getStartDate","prevTime","re","afterStatement","exec","latestEndingTask","findTaskById","dt","Date","setHours","mDate","isValid","durationToDate","durationStatement","relativeTime","getEndDate","inclusive","parseId","idStr","compileData","prevTask","dataStr","ds","getTaskTags","endTimeData","parseData","prevTaskId","startData","taskDb","addTask","rawTask","section","processed","raw","taskInfo","active","done","crit","milestone","order","addTaskOrg","newTask","description","compileTask","allProcessed","_linkStr","sanitizeUrl","pushFun","open","callbackFunction","matchFound","t","regex","RegExp","shift","ganttDb","getElementById","parentElement","offsetWidth","taskArray","timeScale","scaleTime","domain","rangeRound","categories","catsUnfiltered","checkUnique","taskCompare","b","taskA","taskB","makeGant","pageWidth","pageHeight","gap","colorScale","scaleLinear","range","interpolateHcl","makeGrid","drawRects","vertLabels","drawToday","theArray","theGap","theTopPad","theSidePad","theBarHeight","theColorScale","enter","rectangles","toString","secNum","taskClass","startX","endX","textWidth","taskType","bottomXAxis","axisBottom","tickSize","tickFormat","timeFormat","call","topXAxis","axisTop","numOccurances","prevGap","getCount","todayG","today","todayLine","arr","hash","getCounts","word","sectionBkgColor","sectionBkgColor2","altSectionBkgColor","ganttFontSize","gridColor","todayLineColor","taskTextDarkColor","taskTextClickableColor","taskTextColor","taskBkgColor","taskBorderColor","taskTextOutsideColor","activeTaskBkgColor","activeTaskBorderColor","doneTaskBorderColor","doneTaskBkgColor","critBorderColor","critBkgColor","commits","branches","master","curBranch","seq","getId","random","isfastforwardable","currentCommit","otherCommit","isReachableFrom","currentSeq","otherSeq","uniqBy","fn","recordMap","create","out","setOptions","rawOptString","message","getOptions","commit","msg","branch","merge","otherBranch","checkout","commitRef","ref","parentCount","parseInt","upsert","newval","index","splice","prettyPrintCommitHistory","commitArr","c","newCommit","nextCommit","prettyPrint","getCommitsArray","getBranchesAsObjArray","branchArr","getBranches","getCommits","getCurrentBranch","getHead","allCommitsDict","branchNum","nodeFillColor","nodeStrokeWidth","nodeStrokeColor","lineStrokeWidth","branchOffset","branchColors","nodeRadius","nodeLabel","apiConfig","svgCreateDefs","svgDrawLine","colorIdx","color","lineGen","round","getElementCoords","coords","ctm","getCTM","xn","yn","svgDrawLineForCommits","fromId","toId","fromBbox","toBbox","lineStart","lineEnd","cloneNode","selector","renderCommitHistory","commitid","numCommits","size","branchName","renderLines","branchColor","lineDrawn","gitGraphParser","db","setMessage","getMessage","setInfo","inf","getInfo","infoParser","showData","setShowData","toggle","getShowData","cleanupValue","pieParser","pieData","margin","legendRectSize","legendSpacing","sum","myGeneratedColors","pie1","pie2","pie3","pie4","pie5","pie6","pie7","pie8","pie9","pie10","pie11","pie12","scaleOrdinal","d3pie","dataReady","entries","arcGenerator","arc","innerRadius","outerRadius","toFixed","centroid","legend","horz","pieStrokeColor","pieStrokeWidth","pieOpacity","pieTitleTextSize","pieTitleTextColor","pieSectionTextColor","pieSectionTextSize","pieLegendTextColor","pieLegendTextSize","latestRequirement","requirements","latestElement","elements","RequirementType","REQUIREMENT","FUNCTIONAL_REQUIREMENT","INTERFACE_REQUIREMENT","PERFORMANCE_REQUIREMENT","PHYSICAL_REQUIREMENT","DESIGN_CONSTRAINT","RiskLevel","LOW_RISK","MED_RISK","HIGH_RISK","VerifyType","VERIFY_ANALYSIS","VERIFY_DEMONSTRATION","VERIFY_INSPECTION","VERIFY_TEST","Relationships","CONTAINS","COPIES","DERIVES","SATISFIES","VERIFIES","REFINES","TRACES","addRequirement","risk","verifyMethod","getRequirements","setNewReqId","setNewReqText","setNewReqRisk","setNewReqVerifyMethod","addElement","docRef","getElements","setNewElementType","setNewElementDocRef","src","dst","req","ReqMarkers","ARROW","insertLineEndings","containsNode","newRectNode","newTitleNode","txts","textStr","yPadding","linePadding","totalY","titleNode","newBodyNode","yStart","currentRow","charLimit","wrappedTxts","currentTextLen","firstPart","lastStr","addEdgeLabel","elementString","requirementDb","drawReqs","reqs","reqName","titleNodeInfo","bodyNode","drawElements","els","elName","relationColor","requirementBackground","requirementBorderColor","requirementBorderSize","requirementTextColor","relationLabelBackground","relationLabelColor","prevActor","actors","messages","notes","titleWrapped","sequenceNumbersEnabled","wrapEnabled","addActor","old","autoWrap","nextActor","activationCount","part","LINETYPE","ACTIVE_START","from","actor","ACTIVE_END","addMessage","idFrom","idTo","answer","to","addSignal","messageType","Error","token","loc","first_line","last_line","first_column","last_column","expected","getMessages","getActors","getActor","getActorKeys","getTitleWrapped","enableSequenceNumbers","setWrap","wrapSetting","parseMessage","SOLID","DOTTED","NOTE","SOLID_CROSS","DOTTED_CROSS","SOLID_OPEN","DOTTED_OPEN","LOOP_START","LOOP_END","ALT_START","ALT_ELSE","ALT_END","OPT_START","OPT_END","PAR_START","PAR_AND","PAR_END","RECT_START","RECT_END","SOLID_POINT","DOTTED_POINT","ARROWTYPE","FILLED","OPEN","PLACEMENT","LEFTOF","RIGHTOF","OVER","addNote","placement","titleWrap","param","signalType","loopText","optText","altText","parText","sequenceDb","startx","stopx","starty","stopy","sequenceItems","activations","models","getHeight","loops","it","acc","actorModel","addLoop","loopModel","msgModel","noteModel","lastActor","lastLoop","lastMessage","lastNote","init","updateVal","updateBounds","_self","updateFn","updateItemBounds","_startx","_stopx","_starty","_stopy","newActivation","actorRect","stackedSize","actorActivations","anchored","anchorElement","endActivation","lastActorActivationIdx","activation","lastIndexOf","createLoop","newLoop","endLoop","pop","addSectionToLoop","loop","sectionTitles","getVerticalPos","bumpVerticalPos","bump","getBounds","drawNote","getNoteRect","rectElem","drawRect","textObj","getTextObj","anchor","textMargin","valign","textElem","drawText","curr","drawMessage","sequenceIndex","lines","textDims","calculateTextDimensions","totalOffset","lineStarty","fromBounds","toBounds","drawActors","actorKeys","prevWidth","prevMargin","drawActor","activationBounds","actorObj","adjustLoopHeightForWrap","loopWidths","preMargin","postMargin","addLoopFn","heightAdjust","loopWidth","textConf","wrapLabel","maxMessageWidthPerActor","getMaxMessageWidthPerActor","calculateActorMargins","calculateLoopBounds","insertArrowHead","insertArrowCrossHead","insertArrowFilledHead","insertSequenceNumber","activeEnd","activationData","drawActivation","drawLoop","drawBackgroundRect","includes","actorLines","extraVertForTitle","isNote","isMessage","textFont","wrappedMessage","messageDimensions","messageWidth","actorToMessageWidth","prop","actDims","actorKey","actorWidth","buildNoteModel","shouldWrap","textDimensions","buildMessageModel","process","fromIdx","toIdx","allBounds","boundedWidth","msgDims","stack","current","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","toAdd","enabled","stk","actorBorder","actorBkg","actorTextColor","actorLineColor","signalColor","sequenceNumberColor","signalTextColor","labelBoxBorderColor","labelBoxBkgColor","labelTextColor","loopTextColor","noteBorderColor","noteBkgColor","noteTextColor","activationBkgColor","activationBorderColor","rectData","textData","prevTextHeight","textElems","yfunc","dominantBaseline","alignmentBaseline","span","drawLabel","txtObject","genPoints","cut","actorCnt","center","_drawTextCandidateFunc","drawLoopLine","sectionHeight","lower","defs","byText","content","textAttrs","_setTextAttrs","byTspan","byFo","toText","fromTextAttrsDict","set","get","drawStartState","drawDivider","drawSimpleState","stateDef","drawDescrState","descriptions","isSecond","descrLine","descrBox","addTitleAndBox","altBkg","pad","dblPad","orgBox","orgWidth","orgX","titleWidth","graphBox","doc","lineY","drawEndState","drawForkJoinState","parentId","tmp","nText","_drawLongText","_text","tHeight","textBounds","drawState","stateInfo","stateBox","stateDb","titleRows","boundstmp","boxHeight","heightAdj","clone","rootDoc","setRootDoc","getRootDoc","docTranslator","first","state1","state2","currentDoc","newNode","generateId","docNode","getRootDocV2","extract","_doc","addState","newDoc","states","documents","root","currentDocument","startCnt","endCnt","addDescription","des","getState","getStates","logDocuments","_id1","_id2","_descr","theState","dividerCnt","getDividerId","trimColon","nodeDb","setupNode","altFlag","getDir","nodeData","noteData","groupData","position","arrowType","setupDoc","startId","endId","defaultDir","transformationLog","renderDoc","svgWidth","getLabelWidth","edgeFreeDoc","ranker","nodeSep","sub","boxBounds","noteDef","nodeCount","svgElem","dividers","pWidth","pShift","getAttribute","transitionColor","stateLabelColor","background","labelBackgroundColor","transitionLabelColor","tertiaryTextColor","specialStateColor","innerEndBackground","compositeBackground","stateBkg","stateBorder","compositeTitleBackground","altBackground","allItemsProcessed","updateActors","tempActors","people","unique","Set","taskData","pieces","score","peeps","peopleList","journeyDb","drawActorLegend","person","colour","circleData","drawCircle","labelData","LEFT_MARGIN","initGraphics","actorNames","actorPos","actorName","drawTasks","fills","textColours","lastSection","sectionVHeight","taskPos","sectionNumber","drawSection","taskActors","drawTask","faceColor","fillType0","fillType1","fillType2","fillType3","fillType4","fillType5","fillType6","fillType7","actor0","actor1","actor2","actor3","actor4","actor5","drawFace","faceData","circleElement","face","smile","d3arc","startAngle","PI","endAngle","sad","ambivalent","labelMargin","taskCount","graphics","LEVELS","fatal","setLogLevel","console","bind","time","arguments","mermaid","sequenceConfig","callback","Node","ganttConfig","idGeneratior","initIdGeneratior","next","innerHTML","entityDecode","detectInit","svgCode","parseError","initialize","contentLoaded","graphInit","reinitialize","graphType","detectType","gitGraphAst","flowParser","sequenceParser","ganttParser","classParser","stateParser","infoDb","pieDb","journeyParser","requirementParser","encodeEntities","innerTxt","isInt","decodeEntities","_txt","cb","container","existingSvg","remove","userStyles","altFontFamily","flowRenderer","stylis","serialize","compile","rules","style1","createElement","gitGraphRenderer","flowRendererV2","sequenceDiagram","sequenceRenderer","ganttRenderer","classRenderer","classRendererV2","stateRenderer","stateRendererV2","infoRenderer","pkg","pieRenderer","erRenderer","journeyRenderer","requirementRenderer","errorRenderer","currentDirective","args","handleDirective","directiveSanitizer","updateRendererConfigs","default","globalReset","themes","classDiagram","stateDiagram","calcThemeVariables","userOverRides","calcColors","errorBkgColor","errorTextColor","base","baseThemeVariables","dark","darkThemeVariables","defaultThemeVariables","forest","forestThemeVariables","neutral","neutralThemeVariables","Theme","darkMode","primaryColor","primaryTextColor","secondaryColor","adjust","primaryBorderColor","mkBorder","secondaryBorderColor","tertiaryBorderColor","secondaryTextColor","invert","nodeBkg","defaultLinkColor","darken","lighten","taskTextLightColor","compositeBorder","overrides","updateColors","userOverrides","calculate","secondBkg","mainContrastColor","darkTextColor","border1","rgba","labelBackground","labelColor","col","contrast","critical","d3CurveTypes","curveBasisClosed","curveBasisOpen","curveLinearClosed","curveMonotoneX","curveMonotoneY","curveNatural","curveStep","curveStepAfter","curveStepBefore","directiveWithoutOpen","anyComment","inits","detectDirective","results","commentWithoutDirectives","source","lastIndex","memoize","resolver","cache","defaultCurve","curveName","toUpperCase","arrPaths","fnName","params","distance","pow","traverseEdge","prevPoint","totalDistance","remainingDistance","vectorDistance","distanceRatio","isRelationTypePresent","initialPosition","distanceToCardinalityPoint","angle","atan2","cardinalityPosition","sin","cos","terminalMarkerSize","makeid","characters","charactersLength","floor","clobber","drawSimpleText","joinWith","words","completedLines","nextLine","wordLength","calculateTextWidth","nextLineLength","breakString","hyphenatedStrings","remainingWord","Boolean","currentWord","isLastWord","hyphenCharacter","currentLine","character","lineWidth","currentCharacter","isLastLine","hyphenatedNextLine","calculateTextHeight","fontFamilies","dims","cheight","d3Attrs","d3Elem","attrs","calculateSvgSizeAttrs","Map","deterministic","seed","now","decoder","escape","unescape","arg"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;;;;;;;;;;;AClFA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,QAAQ;AACxC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,MAAM;AAChB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,oCAAoC,8BAA8B;AAClE;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,oBAAoB;AAC9B;AACA;;AAEA;AACA,UAAU,UAAU;AACpB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,iBAAiB,YAAY;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA,+BAA+B,sBAAsB;AACrD;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,QAAQ;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,QAAQ;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB,eAAe;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC7SA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qCAAqC;;AAErC;AACA;AACA;;AAEA,2BAA2B;AAC3B;AACA;AACA;AACA,4BAA4B,UAAU;;;;;;;;;;;;ACvLtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACrBA;AACA;AACA;CAGA;;AAEO,IAAMA,aAAa,GAAGC,MAAM,CAACC,MAAP,CAAcC,sDAAd,CAAtB;AAEP,IAAIC,UAAU,GAAGC,8DAAe,CAAC,EAAD,EAAKL,aAAL,CAAhC;AACA,IAAIM,oBAAJ;AACA,IAAIC,UAAU,GAAG,EAAjB;AACA,IAAIC,aAAa,GAAGH,8DAAe,CAAC,EAAD,EAAKL,aAAL,CAAnC;AAEO,IAAMS,mBAAmB,GAAG,SAAtBA,mBAAsB,CAACC,OAAD,EAAUC,WAAV,EAA0B;AAC3D;AACA,MAAIC,GAAG,GAAGP,8DAAe,CAAC,EAAD,EAAKK,OAAL,CAAzB,CAF2D,CAG3D;AAEA;;AACA,MAAIG,eAAe,GAAG,EAAtB;;AACA,OAAK,IAAIC,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAA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Bb;AACA+X,aAAW,EAAE,KAnBA;;AAqBb;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACEjZ,YAAU,EAAE,6CA7BC;;AA+Bb;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACEkZ,UAAQ,EAAE,CA7CG;;AA+Cb;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACEC,eAAa,EAAE,QA1DF;;AA4Db;AACF;AACA;AACA;AACA;AACA;AACA;AACEC,aAAW,EAAE,IAnEA;;AAqEb;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACElO,qBAAmB,EAAE,KAjFR;;AAmFb;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEE1L,QAAM,EAAE,CAAC,QAAD,EAAW,eAAX,EAA4B,aAA5B,EAA2C,aAA3C,CA7FK;;AA+Fb;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACE6Z,kBAAgB,EAAE,KAzGL;;AA2Gb;AACF;AACA;AACA;AACEC,qBAAmB,EAAEpY,SA/GR;;AAiHb;AACF;AACA;AACEI,WAAS,EAAE;AACT;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACIiY,kBAAc,EAAE,CAZP;;AAcT;AACJ;AACA;AACA;AACA;AACA;AACA;AACIhY,cAAU,EAAE,IArBH;;AAuBT;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACIiY,eAAW,EAAE,EAlCJ;;AAoCT;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACIC,eAAW,EAAE,EA/CJ;;AAiDT;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACIjP,SAAK,EAAE,OA1DE;AA2DT;AACA;AACAzI,WAAO,EAAE,EA7DA;;AA+DT;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACI2X,eAAW,EAAE,IA3EJ;;AA6ET;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACIC,mBAAe,EAAE;AA1FR,GApHE;;AAiNb;AACF;AACA;AACEC,UAAQ,EAAE;AACR;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACIC,mBAAe,EAAE,EATT;;AAWR;AACJ;AACA;AACA;AACA;AACA;AACA;AACIC,kBAAc,EAAE,EAlBR;;AAoBR;AACJ;AACA;AACA;AACA;AACA;AACA;AACIC,kBAAc,EAAE,EA3BR;;AA6BR;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACIC,eAAW,EAAE,EArCL;;AAuCR;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACInY,SAAK,EAAE,GA/CC;;AAiDR;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACIC,UAAM,EAAE,EAzDA;;AA2DR;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACImY,aAAS,EAAE,EAnEH;;AAqER;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACIC,iBAAa,EAAE,CA7EP;;AA+ER;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACIC,cAAU,EAAE,EAvFJ;;AAyFR;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACIC,iBAAa,EAAE,EAjGP;;AAmGR;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACIC,gBAAY,EAAE,QA3GN;;AA6GR;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACIC,gBAAY,EAAE,IArHN;;AAuHR;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACIC,mBAAe,EAAE,CAlIT;;AAoIR;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACIb,eAAW,EAAE,IA/IL;;AAiJR;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACIc,eAAW,EAAE,KA5JL;;AA8JR;AAC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AKZ,YAFV;AAGLa,kBAAU,EAAE,KAAKX;AAHZ,OAAP;AAKD,KAnTO;AAoTRa,aAAS,EAAE,qBAAY;AACrB,aAAO;AACL5b,kBAAU,EAAE,KAAK2a,eADZ;AAELc,gBAAQ,EAAE,KAAKf,aAFV;AAGLgB,kBAAU,EAAE,KAAKd;AAHZ,OAAP;AAKD;AA1TO,GApNG;;AAihBb;AACF;AACA;AACEiB,OAAK,EAAE;AACL;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACIC,kBAAc,EAAE,EAXX;;AAaL;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACIC,aAAS,EAAE,EArBN;;AAuBL;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACIC,UAAM,EAAE,CA/BH;;AAiCL;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACIC,cAAU,EAAE,EAzCP;;AA2CL;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACIC,gBAAY,EAAE,EAnDT;;AAqDL;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACIC,eAAW,EAAE,EA7DR;;AA+DL;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACIC,wBAAoB,EAAE,EAvEjB;;AAyEL;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACIX,YAAQ,EAAE,EAjFL;;AAmFL;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACIY,mBAAe,EAAE,EA3FZ;;AA6FL;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACIC,uBAAmB,EAAE,CArGhB;;AAuGL;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACIC,cAAU,EAAE,UAlHP;;AAoHL;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACI7C,eAAW,EAAE,IAhIR;;AAkIL;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACI8C,WAAO,EAAE,KA5IJ;AA8ILC,YAAQ,EAAEvb;AA9IL,GAphBM;;AAqqBb;AACF;AACA;AACEwb,SAAO,EAAE;AACP;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACI5C,kBAAc,EAAE,EATT;;AAWP;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACIC,kBAAc,EAAE,EAnBT;;AAqBP;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACI4C,cAAU,EAAE,GA7BL;;AA+BP;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACI9a,SAAK,EAAE,GAvCA;;AAyCP;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACIC,UAAM,EAAE,EAjDD;;AAmDP;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACImY,aAAS,EAAE,EA3DJ;;AA6DP;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACIC,iBAAa,EAAE,CArER;;AAuEP;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACIC,cAAU,EAAE,EA/EL;;AAiFP;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACIC,iBAAa,EAAE,EA5FR;;AA8FP;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACIC,gBAAY,EAAE,QAtGP;;AAwGP;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACIE,mBAAe,EAAE,CAnHV;;AAqHP;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACIb,eAAW,EAAE,IAjIN;;AAmIP;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACIc,eAAW,EAAE,KA9IN;AA+IPoC,gBAAY,EAAE,EA/IP;AAgJPC,kBAAc,EAAE,2BAhJT;AAiJPC,cAAU,EAAE,EAjJL;AAkJP;AACAjD,mBAAe,EAAE,EAnJV;AAqJP;AACAkD,iBAAa,EAAE,IAtJR;AAuJPC,gBAAY,EAAE,CAAC,SAAD,EAAY,SAAZ,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ACA;AACA;AACA;AACA;AACA;AACIC,mBAAe,EAAE;AA7CZ,GAt3BM;;AAs6Bb;AACF;AACA;AACEqE,IAAE,EAAE;AACF;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACIzE,kBAAc,EAAE,EAZd;;AAcF;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACI0E,mBAAe,EAAE,IA3Bf;;AA6BF;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACIC,kBAAc,EAAE,GAtCd;;AAwCF;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACIC,mBAAe,EAAE,EAjDf;;AAmDF;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACIC,iBAAa,EAAE,EA9Db;;AAgEF;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACIC,UAAM,EAAE,MAxEN;;AA0EF;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACIC,QAAI,EAAE,UAlFJ;;AAoFF;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACI7C,YAAQ,EAAE,EA9FR;;AAgGF;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACI/B,eAAW,EAAE;AA7GX,GAz6BS;;AAyhCb;AACF;AACA;AACE6E,KAAG,EAAE;AACH9B,YAAQ,EAAEvb,SADP;;AAGH;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACIwY,eAAW,EAAE;AAhBV,GA5hCQ;;AA+iCb;AACF;AACA;AACE8E,aAAW,EAAE;AACX/B,YAAQ,EAAEvb,SADC;;AAGX;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACIwY,eAAW,EAAE,IAhBF;AAkBX+E,aAAS,EAAE,SAlBA;AAmBXC,cAAU,EAAE,MAnBD;AAoBXC,oBAAgB,EA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C,aAAa,orBAAorB;AACjsB;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB,qB;AACvB;AACA;AACA,6C;AACA;AACA;AACA,2CAA2C,4C;AAC3C;AACA;AACA,qBAAqB,iC;AACrB;AACA;AACA,e;AACA;AACA;AACA,wB;AACA;AACA;AACA,4B;AACA;AACA;AACA,wB;AACA;AACA;AACA,2CAA2C,0B;AAC3C;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA,iDAAiD,wBAAwB;AACzE;AACA;AACA,sBAAsB,mCAAmC;AACzD;AACA;AACA,mC;AACA;AACA;AACA,mB;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA,kCAAkC;AAClC;AACA;AACA,WAAW,8F;AACX;AACA;AACA,WAAW;AACX;AACA;AACA,WAAW,6F;AACX;AACA;AACA,WAAW,8F;AACX;AACA;AACA,SAAS,+C;AACT;AACA;AACA,SAAS,6C;AACT;AACA;AACA,SAAS,6C;AACT;AACA;AACA,SAAS,2C;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB,qCAAqC;AACvD;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB,+BAA+B;AACjD;AACA;AACA,kBAAkB,uCAAuC;AACzD;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB,+CAA+C;AACjE;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,SAAS,kCAAkC,EAAE,MAAM,EAAE,QAAQ,EAAE,kCAAkC,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,sBAAsB,mBAAmB,sKAAsK,EAAE,UAAU,EAAE,gBAAgB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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL,qDAAqD;AACrD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL,WAAW;AACX;AACA;AACA;AACA,qCAAqC,W;AACrC;AACA,qCAAqC,W;AACrC;AACA,wBAAwB,6BAA6B,W;AACrD;AACA,wBAAwB,iBAAiB,W;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,kCAAkC;AAChE;AACA;AACA;AACA;AACA;AACA,wCAAwC,kBAAkB;AAC1D;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iBAAiB,iBAAiB,8BAA8B,mBAAmB,yBAAyB,6HAA6H,oBAAoB,WAAW,yBAAyB,0fAA0f,EAAE,MAAM,YAAY,EAAE;AACjzB,aAAa,iBAAiB,gCAAgC,mBAAmB,gCAAgC,mBAAmB,8BAA8B,kBAAkB,kCAAkC,kBAAkB,qCAAqC,SAAS,kCAAkC,WAAW,2CAA2C,YAAY,kCAAkC,aAAa,kCAAkC,WAAW,kCAAkC,YAAY;AACpgB,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,CAAC;;;AAGD,IAAI,IAAgE;AACpE;AACA;AACA,6BAA6B,8CAA8C;AAC3E;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAO,CAAC,0DAAI,eAAe,mBAAO,CAAC,qDAAM;AAC1D;AACA;AACA,IAAI,KAA6B,IAAI,4CAAY;AACjD;AACA;AACA,C;;;;;;;;;;;;;ACl2BA;AAAA,IAAMS,SAAS,GAAG,SAAZA,SAAY,CAACvoB,OAAD;AAAA,gDAERA,OAAO,CAACwoB,UAFA,wBAGRxoB,OAAO,CAACyoB,SAHA,gDAKDzoB,OAAO,CAACU,UALP,8NAsBNV,OAAO,CAAC0oB,OAtBF,4BAuBJ1oB,OAAO,CAACwoB,UAvBJ,uEA6BNxoB,OAAO,CAACwoB,UA7BF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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uEAAuE;;AAEvE;AACA;;AAEA,2CAA2C;AAC3C;AACA;AACA,0CAA0C;;AAE1C;AACA;AACA,wB;AACA;AACA;AACA,sB;AACA;AACA;AACA,iBAAiB,oCAAoC;AACrD;AACA;AACA,mB;AACA;AACA;AACA,uBAAuB,e;AACvB;AACA;AACA,WAAW,kD;AACX;AACA;AACA,e;AACA;AACA;;AAEA,kBAAkB;AAClB,kEAAkE;;AAElE;AACA;AACA,qC;AACA;AACA;AACA,sC;AACA;AACA;AACA,qC;AACA;AACA;AACA,kC;AACA;AACA;AACA,4C;AACA;AACA;AACA,wC;AACA;AACA;AACA,mC;AACA;AACA;AACA,iB;AACA;AACA;AACA,uBAAuB,qB;AACvB;AACA;AACA,6C;AACA;AACA;AACA,2CAA2C,4C;AAC3C;AACA;AACA,qBAAqB,8B;AACrB;AACA;AACA,CAAC;AACD,SAAS,0BAA0B,EAAE,MAAM,cAAc,IAAI,GAAG,0BAA0B,EAAE,cAAc,EAAE,UAAU,EAAE,qEAAqE,EAAE,QAAQ,EAAE,uBAAuB,gCAAgC,QAAQ,gBAAgB,oCAAoC,uDAAuD,kDAAkD,8CAA8C,UAAU,EAAE,gBAAgB,EAAE,UAAU,eAAe,aAAa,EAAE,mCAAmC,EAAE,0BAA0B,uEAAuE,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,gBAAgB,mCAAmC,EAAE,gBAAgB,EAAE,UAAU,EAAE,kCAAkC,8BAA8B,UAAU,EAAE,0BAA0B,gBAAgB,UAAU,8BAA8B,UAAU;AAC38B,iBAAiB,mEAAmE;AACpF;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL,qDAAqD;AACrD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL,UAAU,wBAAwB;AAClC;AACA;AACA;AACA,qCAAqC,W;AACrC;AACA,qCAAqC,W;AACrC;AACA,wBAAwB,6BAA6B,W;AACrD;AACA,wBAAw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A2B;AAC3B;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,8CAA8C,WAAW,qD;AACrG;AACA;AACA,8CAA8C,gDAAgD,WAAW,yD;AACzG;AACA;AACA,iCAAiC,aAAa;AAC9C;AACA;AACA,gCAAgC,aAAa;AAC7C;AACA;AACA,gCAAgC;AAChC;AACA;AACA,kCAAkC,qDAAqD;AACvF;AACA;AACA,oBAAoB;AACpB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,+BAA+B,kBAAkB;AACjD;AACA;AACA,uBAAuB;AACvB;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA,4CAA4C,WAAW;AACvD;AACA;AACA,kCAAkC,UAAU;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB,qCAAqC;AACvD;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB,+CAA+C;AACjE;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB,+BAA+B;AACjD;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB,uCAAuC;AACzD;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB,8CAA8C;AAChE;AACA;AACA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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL,qDAAqD;AACrD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL,WAAW;AACX;AACA;AACA;AACA,qCAAqC,W;AACrC;AACA,qCAAqC,W;AACrC;AACA,wBAAwB,6BAA6B,W;AACrD;AACA,wBAAwB,iBAAiB,W;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,mBAAmB;AACnD;AACA,gCAAgC,mBAAmB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,Y;AAC3B;AACA,2BAA2B,Y;AAC3B;AACA,2BAA2B,Y;AAC3B;AACA,2BAA2B,Y;AAC3B;AACA,2BAA2B,Y;AAC3B;AACA,2BAA2B,Y;AAC3B;AACA,2BAA2B,Y;AAC3B;AACA,2BAA2B,Y;AAC3B;AACA,2BAA2B,Y;AAC3B;AACA,2BAA2B,Y;AAC3B;AACA,2BAA2B,Y;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mJAAmJ;AACnJ,SAAS;;AAET;AACA;AACA,qBAAqB,+BAA+B;AACpD;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW,YAAY,IAAI,WAAW,SAAS;AACvE,cAAc,0BAA0B,EAAE;AAC1C,MAAM;AACN,WAAW,+hBAA+hB;AAC1iB,aAAa,oVAAoV;AACjW;AACA;AACA;;AAEA;AACA;AACA;AACA,iB;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA,6BAA6B;AAC7B;AACA;AACA,aAAa;AACb;AACA;AACA,oCAAoC;AACpC;AACA;AACA,iCAAiC;AACjC;AACA;AACA,qCAAqC;AACrC;AACA;AACA,8BAA8B;AAC9B;AACA;AACA,gCAAgC;AAChC;AACA;AACA,4BAA4B;AAC5B;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB;AAClB;AACA;AACA,kBAAkB,2CAA2C;AAC7D;AACA;AACA,kBAAkB,+CAA+C;AACjE;AACA;AACA,kBAAkB,yCAAyC;AAC3D;AACA;AACA,kBAAkB,6CAA6C;AAC/D;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qB;AACvB;AACA;AACA,6C;AACA;AACA;AACA,2CAA2C,4C;AAC3C;AACA;AACA,qBAAqB,iC;AACrB;AACA;AACA,CAAC;AACD,SAAS,0BAA0B,EAAE,MAAM,EAAE,0BAA0B,cAAc,IAAI,GAAG,cAAc,EAAE,UAAU,EAAE,QAAQ,EAAE,oIAAoI,EAAE,uBAAuB,gCAAgC,QAAQ,gBAAgB,mGAAmG,yJAAyJ,UAAU,gBAAgB,oBAAoB,EAAE,UAAU,EAAE,gBAAgB,EAAE,UAAU,0CAA0C,oBAAoB,gBAAgB,UAAU,iBAAiB,aAAa,EAAE,UAAU,eAAe,UAAU,8BAA8B,UAAU,GAAG,UAAU;AAC33B,iBAAiB,qCAAqC;AACtD;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL,qDAAqD;AACrD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL,UAAU,wBAAwB;AAClC;AACA;AACA;AACA,qCAAqC,W;AACrC;AACA,qCAAqC,W;AACrC;AACA,wBAAwB,6BAA6B,W;AACrD;AACA,wBAAwB,iBAAiB,W;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iBAAiB,kBAAkB,gCAAgC,oBAAoB,0BAA0B,qBAAqB,8TAA8T,2EAA2E,2BAA2B,6BAA6B,qDAAqD,2BAA2B,kBAAkB,kBAAkB;AAC3rB,aAAa,mBAAmB,6BAA6B,kBAAkB,gCAAgC,mBAAmB,gCAAgC,mBAAmB,8BAA8B,iBAAiB,kCAAkC,iBAAiB,qCAAqC,SAAS,kCAAkC,UAAU,kCAAkC,YAAY;AAC/Z,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,CAAC;;;AAGD,IAAI,IAAgE;AACpE;AACA;AACA,6BAA6B,8CAA8C;AAC3E;AACA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;AAClB;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,SAAS,YAAY,EAAE,MAAM,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,QAAQ,EAAE,QAAQ,cAAc,gBAAgB,gBAAgB,sBAAsB,EAAE,QAAQ,EAAE,gFAAgF,eAAe,SAAS,eAAe,UAAU,gBAAgB,0BAA0B,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,0BAA0B,EAAE,QAAQ,eAAe,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,UAAU,EAAE,oBAAoB,EAAE,UAAU,EAAE,UAAU;AAC1lB,iBAAiB,2GAA2G;AAC5H;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL,qDAAqD;AACrD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL,UAAU,wBAAwB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,aAAa,WAAW,kCAAkC,WAAW,kCAAkC,YAAY;AACnH,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,CAAC;;;AAGD,IAAI,IAAgE;AACpE;AACA;AACA,6BAA6B,8CAA8C;AAC3E;AACA;AACA;AACA;AACA;AACA,iBAAi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JA;AAFa,CAAf,E;;;;;;;;;;;ACpDA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA,eAAe,kCAAkC;AACjD,iBAAiB,kCAAkC;AACnD;AACA;AACA;AACA,qBAAqB,IAAI;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mJAAmJ;AACnJ,SAAS;;AAET;AACA;AACA,qBAAqB,+BAA+B;AACpD;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW,YAAY,IAAI,WAAW,SAAS;AACvE,cAAc,0BAA0B,EAAE;AAC1C,MAAM;AACN,WAAW,mHAAmH;AAC9H,aAAa,gDAAgD;AAC7D;AACA;AACA;;AAEA;AACA;AACA;AACA,W;AACA;AACA;;AAEA;AACA;AACA,kB;AACA;AACA;AACA,CAAC;AACD,SAAS,YAAY,EAAE,MAAM,cAAc,IAAI,GAAG,iCAAiC,EAAE,QAAQ;AAC7F,iBAAiB,QAAQ;AACzB;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL,qDAAqD;AACrD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL,UAAU,wBAAwB;AAClC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,aAAa,WAAW;AACxB,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,CAAC;;;AAGD,IAAI,IAAgE;AACpE;AACA;AACA,6BAA6B,8CAA8C;AAC3E;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAO,CAAC,0DAAI,eAAe,mBAAO,CAAC,qDAAM;AAC1D;AACA;AACA,IAAI,KAA6B,IA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AACA,KAAK;AACL;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL,qDAAqD;AACrD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;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,CAACsuC,gBATP,0BAUNtuC,OAAO,CAACuuC,iBAVF,iCAWCvuC,OAAO,CAACU,UAXT,kDAcCV,OAAO,CAACU,UAdT,0BAeNV,OAAO,CAACwuC,mBAfF,8BAgBFxuC,OAAO,CAACyuC,kBAhBN,sEAoBNzuC,OAAO,CAAC0uC,kBApBF,iCAqBC1uC,OAAO,CAACU,UArBT,+BAsBDV,OAAO,CAAC2uC,iBAtBP;AAAA,CAAlB;;AA0BepmB,wEAAf,E;;;;;;;;;;;AC1BA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA,eAAe,kCAAkC;AACjD,iBAAiB,kCAAkC;AACnD;AACA;AACA;AACA,qBAAqB,IAAI;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mJAAmJ;AACnJ,SAAS;;AAET;AACA;AACA,qBAAqB,+BAA+B;AACpD;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW,YAAY,IAAI,WAAW,SAAS;AACvE,cAAc,0BAA0B,EAAE;AAC1C,MAAM;AACN,WAAW,6iCAA6iC;AACxjC,aAAa,yrBAAyrB;AACtsB;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB,qB;AACvB;AACA;AACA,6C;AACA;AACA;AACA,2CAA2C,4C;AAC3C;AACA;AACA,qBAAqB,+B;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0B;AACA;AACA;AACA,4B;AACA;AACA;AACA,4B;AACA;AACA;AACA,oC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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AAS,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,gDAAgD,EAAE,gDAAgD,EAAE,gDAAgD,EAAE,gDAAgD,EAAE,kCAAkC,EAAE,kCAAkC;AAC5qF,iBAAiB,2QAA2Q;AAC5R;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL,qDAAqD;AACrD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL,UAAU,wBAAwB;AAClC;AACA;AACA;AACA,qCAAqC,W;AACrC;AACA,qCAAqC,W;AACrC;AACA,wBAAwB,6BAA6B,W;AACrD;AACA,wBAAwB,iBAAiB,W;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8B;AACA;AACA,yB;AACA;AACA,0B;AACA;AACA,wCAAwC;AACxC;AACA;AACA,CAAC;AACD,iBAAiB,kBAAkB,gCAAgC,oBAAoB,yHAAyH,WAAW,qoBAAqoB;AACh2B,aAAa,mBAAmB,6BAA6B,kBAAkB,gCAAgC,mBAAmB,gCAAgC,mBAAmB,8BAA8B,cAAc,6BAA6B,UAAU,6BAA6B,WAAW,kCAAkC,YAAY;AAC9V,CAAC;AACD;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,CAAC;;;AAGD,IAAI,IAAgE;AACpE;AACA;AACA,6BAA6B,8CAA8C;AAC3E;AACA;AACA;AACA;AACA;AACA,iBAAiB,mBAAO,CAAC,0DAA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ACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,WAAW,YAAY,IAAI,WAAW,SAAS;AACvE,cAAc,0BAA0B,EAAE;AAC1C,MAAM;AACN,WAAW,g1BAAg1B;AAC31B,aAAa,yhBAAyhB;AACtiB;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,c;AAClB;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA,W;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,QAAQ;AACR;AACA;AACA,SAAS,+BAA+B;AACxC;AACA;;AAEA,oBAAoB,0FAA0F;AAC9G,iBAAiB,qEAAqE;AACtF;AACA;AACA;;AAEA,oBAAoB,wFAAwF;AAC5G,iBAAiB,oFAAoF;AACrG;AACA;AACA;;AAEA,oBAAoB,uFAAuF;AAC3G,iBAAiB,mFAAmF;AACpG;AACA;AACA;;AAEA;AACA,oBAAoB,uFAAuF;AAC3G;AACA;AACA,iBAAiB,gDAAgD;AACjE;AACA;AACA;;AAEA;AACA,oBAAoB,uFAAuF;AAC3G;AACA;AACA,iBAAiB,gDAAgD;AACjE;AACA;AACA;AACA,4BAA4B,gFAAgF,W;AAC5G;AACA;AACA,4BAA4B,kFAAkF,W;AAC9G;AACA;;AAEA,uBAAuB,sEAAsE;AAC7F;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAuB,qFAAqF;AAC5G;AACA;AACA,6B;AACA;AACA;AACA,iB;AACA;AACA;AACA,8B;AACA;AACA;AACA,+B;AACA;AACA;AACA,8BAA8B,4FAA4F;AAC1H,gBAAgB;AAChB;AACA;AACA;AACA,8BAA8B,4FAA4F;AAC1H,eAAe;AACf;AACA;AACA;AACA,8BAA8B,4FAA4F;AAC1H;AACA;AACA,QAAQ;AACR;AACA;AAC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AAa,YAAY,GAAG,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU;AAC5vF,iBAAiB,yKAAyK;AAC1L;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL,qDAAqD;AACrD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL,UAAU,wBAAwB;AAClC;AACA;AACA;AACA,qCAAqC,W;AACrC;AACA,qCAAqC,W;AACrC;AACA,wBAAwB,6BAA6B,W;AACrD;AACA,wBAAwB,iBAAiB,W;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,W;AAC1B;AACA,wCAAwC,qBAAqB,W;AAC7D;AACA,yBAAyB,iBAAiB,oBAAoB,W;AAC9D;AACA,yBAAyB,iBAAiB,U;AAC1C;AACA,4BAA4B,W;AAC5B;AACA,4BAA4B,W;AAC5B;AACA,4BAA4B,W;AAC5B;AACA,4BAA4B,W;AAC5B;AACA,4BAA4B,W;AAC5B;AACA,4BAA4B,W;AAC5B;AACA,4BAA4B,W;AAC5B;AACA,yBAAyB,W;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,W;AAC1B;AACA,0BAA0B,W;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,W;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,iBAAiB,kBAAkB,gCAAgC,oBAAoB,uFAAuF,oBAAoB,kDAAkD,iCAAiC,sKAAsK,8MAA8M,qBAAqB,yCAAyC,4IAA4I;AACn1B,aAAa,kBAAkB,gCAAgC,mBAAmB,kCAAkC,kBAAkB,kCAAkC,OAAO,mCAAmC,UAAU,sCAAsC,SAAS,mCAAmC,YAAY;AAC1T,C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C/D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL,qDAAqD;AACrD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;AACL,UAAU,wBAAwB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC,W;AACrC;AACA,qCAAqC,W;AACrC;AACA,wBAAwB,6BAA6B,W;AACrD;AACA,wBAAwB,iBAAiB,W;AACzC;AACA;AACA;AACA;AACA;AACA,4BAA4B,m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;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+DAA+D;AAC/D;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;;AAEb;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kBAAkB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,iCAAiC;AACjC,qBAAqB;AACrB;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;;AAEL,qDAAqD;AACrD;AACA;AACA;AACA;AACA,SAAS;AACT;AACA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zD,GAAD,CAAL,CAAlB;AACD;AACF;AACF,OAzBD;AA0BD;AACF;AACF,CApCM;AAsCQ;AACb5B,iBAAe,EAAfA,eADa;AAEb6/C,WAAS,EAATA,SAFa;AAGb8c,qBAAmB,EAAnBA,mBAHa;AAIbf,oBAAkB,EAAlBA,kBAJa;AAKbnd,yBAAuB,EAAvBA,uBALa;AAMbye,uBAAqB,EAArBA,qBANa;AAOb9zC,kBAAgB,EAAhBA,gBAPa;AAQbooC,YAAU,EAAVA,UARa;AASb0H,iBAAe,EAAfA,eATa;AAUblH,YAAU,EAAVA,UAVa;AAWb/7B,oBAAkB,EAAlBA,kBAXa;AAYb/N,oBAAkB,EAAlBA,kBAZa;AAabxe,mBAAiB,EAAjBA,iBAba;AAcbmhB,yBAAuB,EAAvBA,uBAda;AAeblhB,2BAAyB,EAAzBA,yBAfa;AAgBb4a,WAAS,EAATA,SAhBa;AAiBbyD,oBAAkB,EAAlBA,kBAjBa;AAkBbsgC,YAAU,EAAVA,UAlBa;AAmBb1gB,QAAM,EAANA,MAnBa;AAoBb2xB,SAAO,EAAPA,OApBa;AAqBbr0C,SAAO,EAAPA,OArBa;AAsBbqsC,cAAY,EAAZA,YAtBa;AAuBbH,kBAAgB,EAAhBA,gBAvBa;AAwBb4D,oBAAkB,EAAlBA;AAxBa,CAAf,E;;;;;;;;;;;AC31BA,oD;;;;;;;;;;;ACAA,+B;;;;;;;;;;;ACAA,kC;;;;;;;;;;;ACAA,qC;;;;;;;;;;;ACAA,iE;;;;;;;;;;;ACAA,sC;;;;;;;;;;;ACAA,qC;;;;;;;;;;;ACAA,mC;;;;;;;;;;;ACAA,wC;;;;;;;;;;;ACAA,mC","file":"mermaid.core.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"mermaid\"] = factory();\n\telse\n\t\troot[\"mermaid\"] = factory();\n})(typeof self !== \"undefined\" ? self : this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/mermaid.js\");\n","// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,\n// backported and transplited with Babel, with backwards-compat fixes\n\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// resolves . and .. elements in a path array with directory names there\n// must be no slashes, empty elements, or device names (c:\\) in the array\n// (so also no leading and trailing slashes - it does not distinguish\n// relative and absolute paths)\nfunction normalizeArray(parts, allowAboveRoot) {\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = parts.length - 1; i >= 0; i--) {\n var last = parts[i];\n if (last === '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n up++;\n } else if (up) {\n parts.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n}\n\n// path.resolve([from ...], to)\n// posix version\nexports.resolve = function() {\n var resolvedPath = '',\n resolvedAbsolute = false;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path = (i >= 0) ? arguments[i] : process.cwd();\n\n // Skip empty and invalid entries\n if (typeof path !== 'string') {\n throw new TypeError('Arguments to path.resolve must be strings');\n } else if (!path) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {\n return !!p;\n }), !resolvedAbsolute).join('/');\n\n return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\n};\n\n// path.normalize(path)\n// posix version\nexports.normalize = function(path) {\n var isAbsolute = exports.isAbsolute(path),\n trailingSlash = substr(path, -1) === '/';\n\n // Normalize the path\n path = normalizeArray(filter(path.split('/'), function(p) {\n return !!p;\n }), !isAbsolute).join('/');\n\n if (!path && !isAbsolute) {\n path = '.';\n }\n if (path && trailingSlash) {\n path += '/';\n }\n\n return (isAbsolute ? '/' : '') + path;\n};\n\n// posix version\nexports.isAbsolute = function(path) {\n return path.charAt(0) === '/';\n};\n\n// posix version\nexports.join = function() {\n var paths = Array.prototype.slice.call(arguments, 0);\n return exports.normalize(filter(paths, function(p, index) {\n if (typeof p !== 'string') {\n throw new TypeError('Arguments to path.join must be strings');\n }\n return p;\n }).join('/'));\n};\n\n\n// path.relative(from, to)\n// posix version\nexports.relative = function(from, to) {\n from = exports.resolve(from).substr(1);\n to = exports.resolve(to).substr(1);\n\n function trim(arr) {\n var start = 0;\n for (; start < arr.length; start++) {\n if (arr[start] !== '') break;\n }\n\n var end = arr.length - 1;\n for (; end >= 0; end--) {\n if (arr[end] !== '') break;\n }\n\n if (start > end) return [];\n return arr.slice(start, end - start + 1);\n }\n\n var fromParts = trim(from.split('/'));\n var toParts = trim(to.split('/'));\n\n var length = Math.min(fromParts.length, toParts.length);\n var samePartsLength = length;\n for (var i = 0; i < length; i++) {\n if (fromParts[i] !== toParts[i]) {\n samePartsLength = i;\n break;\n }\n }\n\n var outputParts = [];\n for (var i = samePartsLength; i < fromParts.length; i++) {\n outputParts.push('..');\n }\n\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n return outputParts.join('/');\n};\n\nexports.sep = '/';\nexports.delimiter = ':';\n\nexports.dirname = function (path) {\n if (typeof path !== 'string') path = path + '';\n if (path.length === 0) return '.';\n var code = path.charCodeAt(0);\n var hasRoot = code === 47 /*/*/;\n var end = -1;\n var matchedSlash = true;\n for (var i = path.length - 1; i >= 1; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n if (!matchedSlash) {\n end = i;\n break;\n }\n } else {\n // We saw the first non-path separator\n matchedSlash = false;\n }\n }\n\n if (end === -1) return hasRoot ? '/' : '.';\n if (hasRoot && end === 1) {\n // return '//';\n // Backwards-compat fix:\n return '/';\n }\n return path.slice(0, end);\n};\n\nfunction basename(path) {\n if (typeof path !== 'string') path = path + '';\n\n var start = 0;\n var end = -1;\n var matchedSlash = true;\n var i;\n\n for (i = path.length - 1; i >= 0; --i) {\n if (path.charCodeAt(i) === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // path component\n matchedSlash = false;\n end = i + 1;\n }\n }\n\n if (end === -1) return '';\n return path.slice(start, end);\n}\n\n// Uses a mixed approach for backwards-compatibility, as ext behavior changed\n// in new Node.js versions, so only basename() above is backported here\nexports.basename = function (path, ext) {\n var f = basename(path);\n if (ext && f.substr(-1 * ext.length) === ext) {\n f = f.substr(0, f.length - ext.length);\n }\n return f;\n};\n\nexports.extname = function (path) {\n if (typeof path !== 'string') path = path + '';\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n for (var i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1)\n startDot = i;\n else if (preDotState !== 1)\n preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n return '';\n }\n return path.slice(startDot, end);\n};\n\nfunction filter (xs, f) {\n if (xs.filter) return xs.filter(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n if (f(xs[i], i, xs)) res.push(xs[i]);\n }\n return res;\n}\n\n// String.prototype.substr - negative index don't work in IE8\nvar substr = 'ab'.substr(-1) === 'b'\n ? function (str, start, len) { return str.substr(start, len) }\n : function (str, start, len) {\n if (start < 0) start = str.length + start;\n return str.substr(start, len);\n }\n;\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","import { assignWithDepth } from './utils';\nimport { log } from './logger';\nimport theme from './themes';\nimport config from './defaultConfig';\n\n// debugger;\n\nexport const defaultConfig = Object.freeze(config);\n\nlet siteConfig = assignWithDepth({}, defaultConfig);\nlet configFromInitialize;\nlet directives = [];\nlet currentConfig = assignWithDepth({}, defaultConfig);\n\nexport const updateCurrentConfig = (siteCfg, _directives) => {\n // start with config beeing the siteConfig\n let cfg = assignWithDepth({}, siteCfg);\n // let sCfg = assignWithDepth(defaultConfig, siteConfigDelta);\n\n // Join directives\n let sumOfDirectives = {};\n for (let i = 0; i < _directives.length; i++) {\n const d = _directives[i];\n sanitize(d);\n\n // Apply the data from the directive where the the overrides the themeVaraibles\n sumOfDirectives = assignWithDepth(sumOfDirectives, d);\n }\n\n cfg = assignWithDepth(cfg, sumOfDirectives);\n\n if (sumOfDirectives.theme) {\n const tmpConfigFromInitialize = assignWithDepth({}, configFromInitialize);\n const themeVariables = assignWithDepth(\n tmpConfigFromInitialize.themeVariables || {},\n sumOfDirectives.themeVariables\n );\n cfg.themeVariables = theme[cfg.theme].getThemeVariables(themeVariables);\n }\n\n currentConfig = cfg;\n return cfg;\n};\n/**\n *## setSiteConfig\n *| Function | Description | Type | Values |\n *| --------- | ------------------- | ------- | ------------------ |\n *| setSiteConfig|Sets the siteConfig to desired values | Put Request | Any Values, except ones in secure array|\n ***Notes:**\n *Sets the siteConfig. The siteConfig is a protected configuration for repeat use. Calls to reset() will reset\n *the currentConfig to siteConfig. Calls to reset(configApi.defaultConfig) will reset siteConfig and currentConfig\n *to the defaultConfig\n *Note: currentConfig is set in this function\n **Default value: At default, will mirror Global Config**\n * @param conf - the base currentConfig to use as siteConfig\n * @returns {*} - the siteConfig\n */\nexport const setSiteConfig = (conf) => {\n siteConfig = assignWithDepth({}, defaultConfig);\n siteConfig = assignWithDepth(siteConfig, conf);\n\n if (conf.theme) {\n siteConfig.themeVariables = theme[conf.theme].getThemeVariables(conf.themeVariables);\n }\n\n currentConfig = updateCurrentConfig(siteConfig, directives);\n return siteConfig;\n};\n\nexport const saveConfigFromInitilize = (conf) => {\n configFromInitialize = assignWithDepth({}, conf);\n};\n\nexport const updateSiteConfig = (conf) => {\n siteConfig = assignWithDepth(siteConfig, conf);\n updateCurrentConfig(siteConfig, directives);\n\n return siteConfig;\n};\n/**\n *## getSiteConfig\n *| Function | Description | Type | Values |\n *| --------- | ------------------- | ------- | ------------------ |\n *| setSiteConfig|Returns the current siteConfig base configuration | Get Request | Returns Any Values in siteConfig|\n ***Notes**:\n *Returns **any** values in siteConfig.\n * @returns {*}\n */\nexport const getSiteConfig = () => {\n return assignWithDepth({}, siteConfig);\n};\n/**\n *## setConfig\n *| Function | Description | Type | Values |\n *| --------- | ------------------- | ------- | ------------------ |\n *| setSiteConfig|Sets the siteConfig to desired values | Put Request| Any Values, except ones in secure array|\n ***Notes**:\n *Sets the currentConfig. The parameter conf is sanitized based on the siteConfig.secure keys. Any\n *values found in conf with key found in siteConfig.secure will be replaced with the corresponding\n *siteConfig value.\n * @param conf - the potential currentConfig\n * @returns {*} - the currentConfig merged with the sanitized conf\n */\nexport const setConfig = (conf) => {\n // sanitize(conf);\n // Object.keys(conf).forEach(key => {\n // const manipulator = manipulators[key];\n // conf[key] = manipulator ? manipulator(conf[key]) : conf[key];\n // });\n\n assignWithDepth(currentConfig, conf);\n\n return getConfig();\n};\n\n/**\n * ## getConfig\n *| Function | Description | Type | Return Values |\n *| --------- | ------------------- | ------- | ------------------ |\n *| getConfig |Obtains the currentConfig | Get Request | Any Values from currentConfig|\n ***Notes**:\n *Returns **any** the currentConfig\n * @returns {*} - the currentConfig\n */\nexport const getConfig = () => {\n return assignWithDepth({}, currentConfig);\n};\n/**\n *## sanitize\n *| Function | Description | Type | Values |\n *| --------- | ------------------- | ------- | ------------------ |\n *| sanitize |Sets the siteConfig to desired values. | Put Request |None|\n *Ensures options parameter does not attempt to override siteConfig secure keys\n *Note: modifies options in-place\n * @param options - the potential setConfig parameter\n */\nexport const sanitize = (options) => {\n // Checking that options are not in the list of excluded options\n Object.keys(siteConfig.secure).forEach((key) => {\n if (typeof options[siteConfig.secure[key]] !== 'undefined') {\n // DO NOT attempt to print options[siteConfig.secure[key]] within `${}` as a malicious script\n // can exploit the logger's attempt to stringify the value and execute arbitrary code\n log.debug(\n `Denied attempt to modify a secure key ${siteConfig.secure[key]}`,\n options[siteConfig.secure[key]]\n );\n delete options[siteConfig.secure[key]];\n }\n });\n\n // Check that there no attempts of prototype pollution\n Object.keys(options).forEach((key) => {\n if (key.indexOf('__') === 0) {\n delete options[key];\n }\n });\n // Check that there no attempts of xss, there should be no tags at all in the directive\n // blocking data urls as base64 urls can contain svgs with inline script tags\n Object.keys(options).forEach((key) => {\n if (typeof options[key] === 'string') {\n if (\n options[key].indexOf('<') > -1 ||\n options[key].indexOf('>') > -1 ||\n options[key].indexOf('url(data:') > -1\n ) {\n delete options[key];\n }\n }\n if (typeof options[key] === 'object') {\n sanitize(options[key]);\n }\n });\n};\n\nexport const addDirective = (directive) => {\n if (directive.fontFamily) {\n if (!directive.themeVariables) {\n directive.themeVariables = { fontFamily: directive.fontFamily };\n } else {\n if (!directive.themeVariables.fontFamily) {\n directive.themeVariables = { fontFamily: directive.fontFamily };\n }\n }\n }\n directives.push(directive);\n updateCurrentConfig(siteConfig, directives);\n};\n\n/**\n *## reset\n *| Function | Description | Type | Required | Values |\n *| --------- | ------------------- | ------- | -------- | ------------------ |\n *| reset|Resets currentConfig to conf| Put Request | Required | None|\n *\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| conf| base set of values, which currentConfig coul be **reset** to.| Dictionary | Required | Any Values, with respect to the secure Array|\n *\n **Notes :\n (default: current siteConfig ) (optional, default `getSiteConfig()`)\n * @param conf the base currentConfig to reset to (default: current siteConfig ) (optional, default `getSiteConfig()`)\n */\nexport const reset = () => {\n // Replace current config with siteConfig\n directives = [];\n updateCurrentConfig(siteConfig, directives);\n};\n","import intersectRect from './intersect/intersect-rect';\nimport { log } from '../logger';\nimport createLabel from './createLabel';\nimport { select } from 'd3';\nimport { getConfig } from '../config';\nimport { evaluate } from '../diagrams/common/common';\n\nconst rect = (parent, node) => {\n log.trace('Creating subgraph rect for ', node.id, node);\n\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'cluster' + (node.class ? ' ' + node.class : ''))\n .attr('id', node.id);\n\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n // Create the label and insert it after the rect\n const label = shapeSvg.insert('g').attr('class', 'cluster-label');\n\n const text = label\n .node()\n .appendChild(createLabel(node.labelText, node.labelStyle, undefined, true));\n\n // Get the size of the label\n let bbox = text.getBBox();\n\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n\n const width = node.width <= bbox.width + padding ? bbox.width + padding : node.width;\n if (node.width <= bbox.width + padding) {\n node.diff = (bbox.width - node.width) / 2;\n } else {\n node.diff = -node.padding / 2;\n }\n\n log.trace('Data ', node, JSON.stringify(node));\n // center the rect around its coordinate\n rect\n .attr('style', node.style)\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', node.x - width / 2)\n .attr('y', node.y - node.height / 2 - halfPadding)\n .attr('width', width)\n .attr('height', node.height + padding);\n\n // Center the label\n label.attr(\n 'transform',\n 'translate(' +\n (node.x - bbox.width / 2) +\n ', ' +\n (node.y - node.height / 2 + node.padding / 3) +\n ')'\n );\n\n const rectBox = rect.node().getBBox();\n node.width = rectBox.width;\n node.height = rectBox.height;\n\n node.intersect = function (point) {\n return intersectRect(node, point);\n };\n\n return shapeSvg;\n};\n\n/**\n * Non visiable cluster where the note is group with its\n */\nconst noteGroup = (parent, node) => {\n // Add outer g element\n const shapeSvg = parent.insert('g').attr('class', 'note-cluster').attr('id', node.id);\n\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n\n // center the rect around its coordinate\n rect\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', node.x - node.width / 2 - halfPadding)\n .attr('y', node.y - node.height / 2 - halfPadding)\n .attr('width', node.width + padding)\n .attr('height', node.height + padding)\n .attr('fill', 'none');\n\n const rectBox = rect.node().getBBox();\n node.width = rectBox.width;\n node.height = rectBox.height;\n\n node.intersect = function (point) {\n return intersectRect(node, point);\n };\n\n return shapeSvg;\n};\nconst roundedWithTitle = (parent, node) => {\n // Add outer g element\n const shapeSvg = parent.insert('g').attr('class', node.classes).attr('id', node.id);\n\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n // Create the label and insert it after the rect\n const label = shapeSvg.insert('g').attr('class', 'cluster-label');\n const innerRect = shapeSvg.append('rect');\n\n const text = label\n .node()\n .appendChild(createLabel(node.labelText, node.labelStyle, undefined, true));\n\n // Get the size of the label\n let bbox = text.getBBox();\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n bbox = text.getBBox();\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n\n const width = node.width <= bbox.width + node.padding ? bbox.width + node.padding : node.width;\n if (node.width <= bbox.width + node.padding) {\n node.diff = (bbox.width + node.padding * 0 - node.width) / 2;\n } else {\n node.diff = -node.padding / 2;\n }\n\n // center the rect around its coordinate\n rect\n .attr('class', 'outer')\n .attr('x', node.x - width / 2 - halfPadding)\n .attr('y', node.y - node.height / 2 - halfPadding)\n .attr('width', width + padding)\n .attr('height', node.height + padding);\n innerRect\n .attr('class', 'inner')\n .attr('x', node.x - width / 2 - halfPadding)\n .attr('y', node.y - node.height / 2 - halfPadding + bbox.height - 1)\n .attr('width', width + padding)\n .attr('height', node.height + padding - bbox.height - 3);\n\n // Center the label\n label.attr(\n 'transform',\n 'translate(' +\n (node.x - bbox.width / 2) +\n ', ' +\n (node.y -\n node.height / 2 -\n node.padding / 3 +\n (evaluate(getConfig().flowchart.htmlLabels) ? 5 : 3)) +\n ')'\n );\n\n const rectBox = rect.node().getBBox();\n node.height = rectBox.height;\n\n node.intersect = function (point) {\n return intersectRect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst divider = (parent, node) => {\n // Add outer g element\n const shapeSvg = parent.insert('g').attr('class', node.classes).attr('id', node.id);\n\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n\n // center the rect around its coordinate\n rect\n .attr('class', 'divider')\n .attr('x', node.x - node.width / 2 - halfPadding)\n .attr('y', node.y - node.height / 2)\n .attr('width', node.width + padding)\n .attr('height', node.height + padding);\n\n const rectBox = rect.node().getBBox();\n node.width = rectBox.width;\n node.height = rectBox.height;\n node.diff = -node.padding / 2;\n node.intersect = function (point) {\n return intersectRect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst shapes = { rect, roundedWithTitle, noteGroup, divider };\n\nlet clusterElems = {};\n\nexport const insertCluster = (elem, node) => {\n log.trace('Inserting cluster');\n const shape = node.shape || 'rect';\n clusterElems[node.id] = shapes[shape](elem, node);\n};\nexport const getClusterTitleWidth = (elem, node) => {\n const label = createLabel(node.labelText, node.labelStyle, undefined, true);\n elem.node().appendChild(label);\n const width = label.getBBox().width;\n elem.node().removeChild(label);\n return width;\n};\n\nexport const clear = () => {\n clusterElems = {};\n};\n\nexport const positionCluster = (node) => {\n log.info('Position cluster (' + node.id + ', ' + node.x + ', ' + node.y + ')');\n const el = clusterElems[node.id];\n\n el.attr('transform', 'translate(' + node.x + ', ' + node.y + ')');\n};\n","import { select } from 'd3';\nimport { log } from '../logger'; // eslint-disable-line\nimport { evaluate } from '../diagrams/common/common';\n// let vertexNode;\n// if (evaluate(getConfig().flowchart.htmlLabels)) {\n// // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that?\n// const node = {\n// label: vertexText.replace(/fa[lrsb]?:fa-[\\w-]+/g, s => ``)\n// };\n// vertexNode = addHtmlLabel(svg, node).node();\n// vertexNode.parentNode.removeChild(vertexNode);\n// } else {\n// const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n// svgLabel.setAttribute('style', styles.labelStyle.replace('color:', 'fill:'));\n\n// const rows = vertexText.split(common.lineBreakRegex);\n\n// for (let j = 0; j < rows.length; j++) {\n// const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n// tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n// tspan.setAttribute('dy', '1em');\n// tspan.setAttribute('x', '1');\n// tspan.textContent = rows[j];\n// svgLabel.appendChild(tspan);\n// }\n// vertexNode = svgLabel;\n// }\nimport { getConfig } from '../config';\n\nfunction applyStyle(dom, styleFn) {\n if (styleFn) {\n dom.attr('style', styleFn);\n }\n}\n\nfunction addHtmlLabel(node) {\n // var fo = root.append('foreignObject').attr('width', '100000');\n\n // var div = fo.append('xhtml:div');\n // div.attr('xmlns', 'http://www.w3.org/1999/xhtml');\n\n // var label = node.label;\n // switch (typeof label) {\n // case 'function':\n // div.insert(label);\n // break;\n // case 'object':\n // // Currently we assume this is a DOM object.\n // div.insert(function() {\n // return label;\n // });\n // break;\n // default:\n // div.html(label);\n // }\n\n // applyStyle(div, node.labelStyle);\n // div.style('display', 'inline-block');\n // // Fix for firefox\n // div.style('white-space', 'nowrap');\n\n // var client = div.node().getBoundingClientRect();\n // fo.attr('width', client.width).attr('height', client.height);\n const fo = select(document.createElementNS('http://www.w3.org/2000/svg', 'foreignObject'));\n const div = fo.append('xhtml:div');\n\n const label = node.label;\n const labelClass = node.isNode ? 'nodeLabel' : 'edgeLabel';\n div.html(\n '' +\n label +\n ''\n );\n\n applyStyle(div, node.labelStyle);\n div.style('display', 'inline-block');\n // Fix for firefox\n div.style('white-space', 'nowrap');\n div.attr('xmlns', 'http://www.w3.org/1999/xhtml');\n return fo.node();\n}\n\nconst createLabel = (_vertexText, style, isTitle, isNode) => {\n let vertexText = _vertexText || '';\n if (typeof vertexText === 'object') vertexText = vertexText[0];\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that?\n vertexText = vertexText.replace(/\\\\n|\\n/g, '
');\n log.info('vertexText' + vertexText);\n const node = {\n isNode,\n label: vertexText.replace(\n /fa[lrsb]?:fa-[\\w-]+/g,\n (s) => ``\n ),\n labelStyle: style.replace('fill:', 'color:'),\n };\n let vertexNode = addHtmlLabel(node);\n // vertexNode.parentNode.removeChild(vertexNode);\n return vertexNode;\n } else {\n const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n svgLabel.setAttribute('style', style.replace('color:', 'fill:'));\n let rows = [];\n if (typeof vertexText === 'string') {\n rows = vertexText.split(/\\\\n|\\n|/gi);\n } else if (Array.isArray(vertexText)) {\n rows = vertexText;\n } else {\n rows = [];\n }\n\n for (let j = 0; j < rows.length; j++) {\n const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n tspan.setAttribute('dy', '1em');\n tspan.setAttribute('x', '0');\n if (isTitle) {\n tspan.setAttribute('class', 'title-row');\n } else {\n tspan.setAttribute('class', 'row');\n }\n tspan.textContent = rows[j].trim();\n svgLabel.appendChild(tspan);\n }\n return svgLabel;\n }\n};\n\nexport default createLabel;\n","import { log } from '../logger'; // eslint-disable-line\nimport createLabel from './createLabel';\n// import { line, curveBasis, curveLinear, select } from 'd3';\nimport { line, curveBasis, select } from 'd3';\nimport { getConfig } from '../config';\nimport utils from '../utils';\nimport { evaluate } from '../diagrams/common/common';\n\nlet edgeLabels = {};\nlet terminalLabels = {};\n\nexport const clear = () => {\n edgeLabels = {};\n terminalLabels = {};\n};\n\nexport const insertEdgeLabel = (elem, edge) => {\n // Create the actual text element\n const labelElement = createLabel(edge.label, edge.labelStyle);\n\n // Create outer g, edgeLabel, this will be positioned after graph layout\n const edgeLabel = elem.insert('g').attr('class', 'edgeLabel');\n\n // Create inner g, label, this will be positioned now for centering the text\n const label = edgeLabel.insert('g').attr('class', 'label');\n label.node().appendChild(labelElement);\n\n // Center the label\n let bbox = labelElement.getBBox();\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = labelElement.children[0];\n const dv = select(labelElement);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n label.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')');\n\n // Make element accessible by id for positioning\n edgeLabels[edge.id] = edgeLabel;\n\n // Update the abstract data of the edge with the new information about its width and height\n edge.width = bbox.width;\n edge.height = bbox.height;\n\n let fo;\n if (edge.startLabelLeft) {\n // Create the actual text element\n const startLabelElement = createLabel(edge.startLabelLeft, edge.labelStyle);\n const startEdgeLabelLeft = elem.insert('g').attr('class', 'edgeTerminals');\n const inner = startEdgeLabelLeft.insert('g').attr('class', 'inner');\n fo = inner.node().appendChild(startLabelElement);\n const slBox = startLabelElement.getBBox();\n inner.attr('transform', 'translate(' + -slBox.width / 2 + ', ' + -slBox.height / 2 + ')');\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n terminalLabels[edge.id].startLeft = startEdgeLabelLeft;\n setTerminalWidth(fo, bbox);\n }\n if (edge.startLabelRight) {\n // Create the actual text element\n const startLabelElement = createLabel(edge.startLabelRight, edge.labelStyle);\n const startEdgeLabelRight = elem.insert('g').attr('class', 'edgeTerminals');\n const inner = startEdgeLabelRight.insert('g').attr('class', 'inner');\n fo = startEdgeLabelRight.node().appendChild(startLabelElement);\n inner.node().appendChild(startLabelElement);\n const slBox = startLabelElement.getBBox();\n inner.attr('transform', 'translate(' + -slBox.width / 2 + ', ' + -slBox.height / 2 + ')');\n\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n terminalLabels[edge.id].startRight = startEdgeLabelRight;\n setTerminalWidth(fo, bbox);\n }\n if (edge.endLabelLeft) {\n // Create the actual text element\n const endLabelElement = createLabel(edge.endLabelLeft, edge.labelStyle);\n const endEdgeLabelLeft = elem.insert('g').attr('class', 'edgeTerminals');\n const inner = endEdgeLabelLeft.insert('g').attr('class', 'inner');\n fo = inner.node().appendChild(endLabelElement);\n const slBox = endLabelElement.getBBox();\n inner.attr('transform', 'translate(' + -slBox.width / 2 + ', ' + -slBox.height / 2 + ')');\n\n endEdgeLabelLeft.node().appendChild(endLabelElement);\n\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n terminalLabels[edge.id].endLeft = endEdgeLabelLeft;\n setTerminalWidth(fo, bbox);\n }\n if (edge.endLabelRight) {\n // Create the actual text element\n const endLabelElement = createLabel(edge.endLabelRight, edge.labelStyle);\n const endEdgeLabelRight = elem.insert('g').attr('class', 'edgeTerminals');\n const inner = endEdgeLabelRight.insert('g').attr('class', 'inner');\n\n fo = inner.node().appendChild(endLabelElement);\n const slBox = endLabelElement.getBBox();\n inner.attr('transform', 'translate(' + -slBox.width / 2 + ', ' + -slBox.height / 2 + ')');\n\n endEdgeLabelRight.node().appendChild(endLabelElement);\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n terminalLabels[edge.id].endRight = endEdgeLabelRight;\n setTerminalWidth(fo, bbox);\n }\n};\n\nfunction setTerminalWidth(fo, box) {\n if (getConfig().flowchart.htmlLabels && fo) {\n fo.style.width = box.width;\n fo.style.height = box.height;\n }\n}\n\nexport const positionEdgeLabel = (edge, paths) => {\n log.info('Moving label abc78 ', edge.id, edge.label, edgeLabels[edge.id]);\n let path = paths.updatedPath ? paths.updatedPath : paths.originalPath;\n if (edge.label) {\n const el = edgeLabels[edge.id];\n let x = edge.x;\n let y = edge.y;\n if (path) {\n // // debugger;\n const pos = utils.calcLabelPosition(path);\n log.info('Moving label from (', x, ',', y, ') to (', pos.x, ',', pos.y, ') abc78');\n // x = pos.x;\n // y = pos.y;\n }\n el.attr('transform', 'translate(' + x + ', ' + y + ')');\n }\n\n //let path = paths.updatedPath ? paths.updatedPath : paths.originalPath;\n if (edge.startLabelLeft) {\n const el = terminalLabels[edge.id].startLeft;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n // debugger;\n const pos = utils.calcTerminalLabelPosition(0, 'start_left', path);\n x = pos.x;\n y = pos.y;\n }\n el.attr('transform', 'translate(' + x + ', ' + y + ')');\n }\n if (edge.startLabelRight) {\n const el = terminalLabels[edge.id].startRight;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n // debugger;\n const pos = utils.calcTerminalLabelPosition(0, 'start_right', path);\n x = pos.x;\n y = pos.y;\n }\n el.attr('transform', 'translate(' + x + ', ' + y + ')');\n }\n if (edge.endLabelLeft) {\n const el = terminalLabels[edge.id].endLeft;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n // debugger;\n const pos = utils.calcTerminalLabelPosition(0, 'end_left', path);\n x = pos.x;\n y = pos.y;\n }\n el.attr('transform', 'translate(' + x + ', ' + y + ')');\n }\n if (edge.endLabelRight) {\n const el = terminalLabels[edge.id].endRight;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n // debugger;\n const pos = utils.calcTerminalLabelPosition(0, 'end_right', path);\n x = pos.x;\n y = pos.y;\n }\n el.attr('transform', 'translate(' + x + ', ' + y + ')');\n }\n};\n\n// const getRelationType = function(type) {\n// switch (type) {\n// case stateDb.relationType.AGGREGATION:\n// return 'aggregation';\n// case stateDb.relationType.EXTENSION:\n// return 'extension';\n// case stateDb.relationType.COMPOSITION:\n// return 'composition';\n// case stateDb.relationType.DEPENDENCY:\n// return 'dependency';\n// }\n// };\n\nconst outsideNode = (node, point) => {\n // log.warn('Checking bounds ', node, point);\n const x = node.x;\n const y = node.y;\n const dx = Math.abs(point.x - x);\n const dy = Math.abs(point.y - y);\n const w = node.width / 2;\n const h = node.height / 2;\n if (dx >= w || dy >= h) {\n return true;\n }\n return false;\n};\n\nexport const intersection = (node, outsidePoint, insidePoint) => {\n log.warn(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(outsidePoint)}\n insidePoint : ${JSON.stringify(insidePoint)}\n node : x:${node.x} y:${node.y} w:${node.width} h:${node.height}`);\n const x = node.x;\n const y = node.y;\n\n const dx = Math.abs(x - insidePoint.x);\n // const dy = Math.abs(y - insidePoint.y);\n const w = node.width / 2;\n let r = insidePoint.x < outsidePoint.x ? w - dx : w + dx;\n const h = node.height / 2;\n\n // const edges = {\n // x1: x - w,\n // x2: x + w,\n // y1: y - h,\n // y2: y + h\n // };\n\n // if (\n // outsidePoint.x === edges.x1 ||\n // outsidePoint.x === edges.x2 ||\n // outsidePoint.y === edges.y1 ||\n // outsidePoint.y === edges.y2\n // ) {\n // log.warn('abc89 calc equals on edge', outsidePoint, edges);\n // return outsidePoint;\n // }\n\n const Q = Math.abs(outsidePoint.y - insidePoint.y);\n const R = Math.abs(outsidePoint.x - insidePoint.x);\n // log.warn();\n if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) { // eslint-disable-line\n // Intersection is top or bottom of rect.\n // let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y;\n let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y;\n r = (R * q) / Q;\n const res = {\n x: insidePoint.x < outsidePoint.x ? insidePoint.x + r : insidePoint.x - R + r,\n y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - Q + q,\n };\n\n if (r === 0) {\n res.x = outsidePoint.x;\n res.y = outsidePoint.y;\n }\n if (R === 0) {\n res.x = outsidePoint.x;\n }\n if (Q === 0) {\n res.y = outsidePoint.y;\n }\n\n log.warn(`abc89 topp/bott calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res);\n\n return res;\n } else {\n // Intersection onn sides of rect\n if (insidePoint.x < outsidePoint.x) {\n r = outsidePoint.x - w - x;\n } else {\n // r = outsidePoint.x - w - x;\n r = x - w - outsidePoint.x;\n }\n let q = (Q * r) / R;\n // OK let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x + dx - w;\n // OK let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : outsidePoint.x + r;\n let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - R + r;\n // let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : outsidePoint.x + r;\n let _y = insidePoint.y < outsidePoint.y ? insidePoint.y + q : insidePoint.y - q;\n log.warn(`sides calc abc89, Q ${Q}, q ${q}, R ${R}, r ${r}`, { _x, _y });\n if (r === 0) {\n _x = outsidePoint.x;\n _y = outsidePoint.y;\n }\n if (R === 0) {\n _x = outsidePoint.x;\n }\n if (Q === 0) {\n _y = outsidePoint.y;\n }\n\n return { x: _x, y: _y };\n }\n};\n/**\n * This function will page a path and node where the last point(s) in the path is inside the node\n * and return an update path ending by the border of the node.\n * @param {*} points\n * @param {*} boundryNode\n * @returns\n */\nconst cutPathAtIntersect = (_points, boundryNode) => {\n log.warn('abc88 cutPathAtIntersect', _points, boundryNode);\n let points = [];\n let lastPointOutside = _points[0];\n let isInside = false;\n _points.forEach((point) => {\n // const node = clusterDb[edge.toCluster].node;\n log.info('abc88 checking point', point, boundryNode);\n\n // check if point is inside the boundry rect\n if (!outsideNode(boundryNode, point) && !isInside) {\n // First point inside the rect found\n // Calc the intersection coord between the point anf the last opint ouside the rect\n const inter = intersection(boundryNode, lastPointOutside, point);\n log.warn('abc88 inside', point, lastPointOutside, inter);\n log.warn('abc88 intersection', inter);\n\n // // Check case where the intersection is the same as the last point\n let pointPresent = false;\n points.forEach((p) => {\n pointPresent = pointPresent || (p.x === inter.x && p.y === inter.y);\n });\n // // if (!pointPresent) {\n if (!points.find((e) => e.x === inter.x && e.y === inter.y)) {\n points.push(inter);\n } else {\n log.warn('abc88 no intersect', inter, points);\n }\n // points.push(inter);\n isInside = true;\n } else {\n // Outside\n log.warn('abc88 outside', point, lastPointOutside);\n lastPointOutside = point;\n // points.push(point);\n if (!isInside) points.push(point);\n }\n });\n log.warn('abc88 returning points', points);\n return points;\n};\n\n//(edgePaths, e, edge, clusterDb, diagramtype, graph)\nexport const insertEdge = function (elem, e, edge, clusterDb, diagramType, graph) {\n let points = edge.points;\n let pointsHasChanged = false;\n const tail = graph.node(e.v);\n var head = graph.node(e.w);\n\n log.info('abc88 InsertEdge: ', edge);\n if (head.intersect && tail.intersect) {\n points = points.slice(1, edge.points.length - 1);\n points.unshift(tail.intersect(points[0]));\n log.info(\n 'Last point',\n points[points.length - 1],\n head,\n head.intersect(points[points.length - 1])\n );\n points.push(head.intersect(points[points.length - 1]));\n }\n if (edge.toCluster) {\n log.info('to cluster abc88', clusterDb[edge.toCluster]);\n points = cutPathAtIntersect(edge.points, clusterDb[edge.toCluster].node);\n // log.trace('edge', edge);\n // points = [];\n // let lastPointOutside; // = edge.points[0];\n // let isInside = false;\n // edge.points.forEach(point => {\n // const node = clusterDb[edge.toCluster].node;\n // log.warn('checking from', edge.fromCluster, point, node);\n\n // if (!outsideNode(node, point) && !isInside) {\n // log.trace('inside', edge.toCluster, point, lastPointOutside);\n\n // // First point inside the rect\n // const inter = intersection(node, lastPointOutside, point);\n\n // let pointPresent = false;\n // points.forEach(p => {\n // pointPresent = pointPresent || (p.x === inter.x && p.y === inter.y);\n // });\n // // if (!pointPresent) {\n // if (!points.find(e => e.x === inter.x && e.y === inter.y)) {\n // points.push(inter);\n // } else {\n // log.warn('no intersect', inter, points);\n // }\n // isInside = true;\n // } else {\n // // outtside\n // lastPointOutside = point;\n // if (!isInside) points.push(point);\n // }\n // });\n pointsHasChanged = true;\n }\n\n if (edge.fromCluster) {\n log.info('from cluster abc88', clusterDb[edge.fromCluster]);\n points = cutPathAtIntersect(points.reverse(), clusterDb[edge.fromCluster].node).reverse();\n // log.warn('edge', edge);\n // log.warn('from cluster', clusterDb[edge.fromCluster], points);\n // const updatedPoints = [];\n // let lastPointOutside = edge.points[edge.points.length - 1];\n // let isInside = false;\n // for (let i = points.length - 1; i >= 0; i--) {\n // const point = points[i];\n // const node = clusterDb[edge.fromCluster].node;\n // log.warn('checking to', edge.fromCluster, point, node);\n\n // if (!outsideNode(node, point) && !isInside) {\n // log.warn('inside', edge.fromCluster, point, node);\n\n // // First point inside the rect\n // const inter = intersection(node, lastPointOutside, point);\n // log.warn('intersect', intersection(node, lastPointOutside, point));\n // let pointPresent = false;\n // points.forEach(p => {\n // pointPresent = pointPresent || (p.x === inter.x && p.y === inter.y);\n // });\n // // if (!pointPresent) {\n // if (!points.find(e => e.x === inter.x && e.y === inter.y)) {\n // updatedPoints.unshift(inter);\n // log.warn('Adding point -updated = ', updatedPoints);\n // } else {\n // log.warn('no intersect', inter, points);\n // }\n // // points.push(insterection);\n // isInside = true;\n // } else {\n // // at the outside\n // // if (!isInside) updatedPoints.unshift(point);\n // updatedPoints.unshift(point);\n // log.warn('Outside point', point, updatedPoints);\n // }\n // lastPointOutside = point;\n // }\n // points = updatedPoints;\n // points = edge.points;\n pointsHasChanged = true;\n }\n\n // The data for our line\n const lineData = points.filter((p) => !Number.isNaN(p.y));\n\n // This is the accessor function we talked about above\n let curve;\n // Currently only flowcharts get the curve from the settings, perhaps this should\n // be expanded to a common setting? Restricting it for now in order not to cause side-effects that\n // have not been thought through\n if (diagramType === 'graph' || diagramType === 'flowchart') {\n curve = edge.curve || curveBasis;\n } else {\n curve = curveBasis;\n }\n // curve = curveLinear;\n const lineFunction = line()\n .x(function (d) {\n return d.x;\n })\n .y(function (d) {\n return d.y;\n })\n .curve(curve);\n\n // Contruct stroke classes based on properties\n let strokeClasses;\n switch (edge.thickness) {\n case 'normal':\n strokeClasses = 'edge-thickness-normal';\n break;\n case 'thick':\n strokeClasses = 'edge-thickness-thick';\n break;\n default:\n strokeClasses = '';\n }\n switch (edge.pattern) {\n case 'solid':\n strokeClasses += ' edge-pattern-solid';\n break;\n case 'dotted':\n strokeClasses += ' edge-pattern-dotted';\n break;\n case 'dashed':\n strokeClasses += ' edge-pattern-dashed';\n break;\n }\n\n const svgPath = elem\n .append('path')\n .attr('d', lineFunction(lineData))\n .attr('id', edge.id)\n .attr('class', ' ' + strokeClasses + (edge.classes ? ' ' + edge.classes : ''))\n .attr('style', edge.style);\n\n // DEBUG code, adds a red circle at each edge coordinate\n // edge.points.forEach(point => {\n // elem\n // .append('circle')\n // .style('stroke', 'red')\n // .style('fill', 'red')\n // .attr('r', 1)\n // .attr('cx', point.x)\n // .attr('cy', point.y);\n // });\n\n let url = '';\n if (getConfig().state.arrowMarkerAbsolute) {\n url =\n window.location.protocol +\n '//' +\n window.location.host +\n window.location.pathname +\n window.location.search;\n url = url.replace(/\\(/g, '\\\\(');\n url = url.replace(/\\)/g, '\\\\)');\n }\n log.info('arrowTypeStart', edge.arrowTypeStart);\n log.info('arrowTypeEnd', edge.arrowTypeEnd);\n\n switch (edge.arrowTypeStart) {\n case 'arrow_cross':\n svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-crossStart' + ')');\n break;\n case 'arrow_point':\n svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-pointStart' + ')');\n break;\n case 'arrow_barb':\n svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-barbStart' + ')');\n break;\n case 'arrow_circle':\n svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-circleStart' + ')');\n break;\n case 'aggregation':\n svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-aggregationStart' + ')');\n break;\n case 'extension':\n svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-extensionStart' + ')');\n break;\n case 'composition':\n svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-compositionStart' + ')');\n break;\n case 'dependency':\n svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-dependencyStart' + ')');\n break;\n default:\n }\n switch (edge.arrowTypeEnd) {\n case 'arrow_cross':\n svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-crossEnd' + ')');\n break;\n case 'arrow_point':\n svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-pointEnd' + ')');\n break;\n case 'arrow_barb':\n svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-barbEnd' + ')');\n break;\n case 'arrow_circle':\n svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-circleEnd' + ')');\n break;\n case 'aggregation':\n svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-aggregationEnd' + ')');\n break;\n case 'extension':\n svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-extensionEnd' + ')');\n break;\n case 'composition':\n svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-compositionEnd' + ')');\n break;\n case 'dependency':\n svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-dependencyEnd' + ')');\n break;\n default:\n }\n let paths = {};\n if (pointsHasChanged) {\n paths.updatedPath = points;\n }\n paths.originalPath = edge.points;\n return paths;\n};\n","import dagre from 'dagre';\nimport graphlib from 'graphlib';\nimport insertMarkers from './markers';\nimport { updateNodeBounds } from './shapes/util';\nimport {\n clear as clearGraphlib,\n clusterDb,\n adjustClustersAndEdges,\n findNonClusterChild,\n sortNodesByHierarchy,\n} from './mermaid-graphlib';\nimport { insertNode, positionNode, clear as clearNodes, setNodeElem } from './nodes';\nimport { insertCluster, clear as clearClusters } from './clusters';\nimport { insertEdgeLabel, positionEdgeLabel, insertEdge, clear as clearEdges } from './edges';\nimport { log } from '../logger';\n\nconst recursiveRender = (_elem, graph, diagramtype, parentCluster) => {\n log.info('Graph in recursive render: XXX', graphlib.json.write(graph), parentCluster);\n const dir = graph.graph().rankdir;\n log.trace('Dir in recursive render - dir:', dir);\n\n const elem = _elem.insert('g').attr('class', 'root'); // eslint-disable-line\n if (!graph.nodes()) {\n log.info('No nodes found for', graph);\n } else {\n log.info('Recursive render XXX', graph.nodes());\n }\n if (graph.edges().length > 0) {\n log.trace('Recursive edges', graph.edge(graph.edges()[0]));\n }\n const clusters = elem.insert('g').attr('class', 'clusters'); // eslint-disable-line\n const edgePaths = elem.insert('g').attr('class', 'edgePaths');\n const edgeLabels = elem.insert('g').attr('class', 'edgeLabels');\n const nodes = elem.insert('g').attr('class', 'nodes');\n\n // Insert nodes, this will insert them into the dom and each node will get a size. The size is updated\n // to the abstract node and is later used by dagre for the layout\n graph.nodes().forEach(function (v) {\n const node = graph.node(v);\n if (typeof parentCluster !== 'undefined') {\n const data = JSON.parse(JSON.stringify(parentCluster.clusterData));\n // data.clusterPositioning = true;\n log.info('Setting data for cluster XXX (', v, ') ', data, parentCluster);\n graph.setNode(parentCluster.id, data);\n if (!graph.parent(v)) {\n log.trace('Setting parent', v, parentCluster.id);\n graph.setParent(v, parentCluster.id, data);\n }\n }\n log.info('(Insert) Node XXX' + v + ': ' + JSON.stringify(graph.node(v)));\n if (node && node.clusterNode) {\n // const children = graph.children(v);\n log.info('Cluster identified', v, node.width, graph.node(v));\n const o = recursiveRender(nodes, node.graph, diagramtype, graph.node(v));\n const newEl = o.elem;\n updateNodeBounds(node, newEl);\n node.diff = o.diff || 0;\n log.info('Node bounds (abc123)', v, node, node.width, node.x, node.y);\n setNodeElem(newEl, node);\n\n log.warn('Recursive render complete ', newEl, node);\n } else {\n if (graph.children(v).length > 0) {\n // This is a cluster but not to be rendered recusively\n // Render as before\n log.info('Cluster - the non recursive path XXX', v, node.id, node, graph);\n log.info(findNonClusterChild(node.id, graph));\n clusterDb[node.id] = { id: findNonClusterChild(node.id, graph), node };\n // insertCluster(clusters, graph.node(v));\n } else {\n log.info('Node - the non recursive path', v, node.id, node);\n insertNode(nodes, graph.node(v), dir);\n }\n }\n });\n\n // Insert labels, this will insert them into the dom so that the width can be calculated\n // Also figure out which edges point to/from clusters and adjust them accordingly\n // Edges from/to clusters really points to the first child in the cluster.\n // TODO: pick optimal child in the cluster to us as link anchor\n graph.edges().forEach(function (e) {\n const edge = graph.edge(e.v, e.w, e.name);\n log.info('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e));\n log.info('Edge ' + e.v + ' -> ' + e.w + ': ', e, ' ', JSON.stringify(graph.edge(e)));\n\n // Check if link is either from or to a cluster\n log.info('Fix', clusterDb, 'ids:', e.v, e.w, 'Translateing: ', clusterDb[e.v], clusterDb[e.w]);\n insertEdgeLabel(edgeLabels, edge);\n });\n\n graph.edges().forEach(function (e) {\n log.info('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e));\n });\n log.info('#############################################');\n log.info('### Layout ###');\n log.info('#############################################');\n log.info(graph);\n dagre.layout(graph);\n log.info('Graph after layout:', graphlib.json.write(graph));\n // Move the nodes to the correct place\n let diff = 0;\n sortNodesByHierarchy(graph).forEach(function (v) {\n const node = graph.node(v);\n log.info('Position ' + v + ': ' + JSON.stringify(graph.node(v)));\n log.info(\n 'Position ' + v + ': (' + node.x,\n ',' + node.y,\n ') width: ',\n node.width,\n ' height: ',\n node.height\n );\n if (node && node.clusterNode) {\n // clusterDb[node.id].node = node;\n\n positionNode(node);\n } else {\n // Non cluster node\n if (graph.children(v).length > 0) {\n // A cluster in the non-recurive way\n // positionCluster(node);\n insertCluster(clusters, node);\n clusterDb[node.id].node = node;\n } else {\n positionNode(node);\n }\n }\n });\n\n // Move the edge labels to the correct place after layout\n graph.edges().forEach(function (e) {\n const edge = graph.edge(e);\n log.info('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(edge), edge);\n\n const paths = insertEdge(edgePaths, e, edge, clusterDb, diagramtype, graph);\n positionEdgeLabel(edge, paths);\n });\n\n graph.nodes().forEach(function (v) {\n const n = graph.node(v);\n log.info(v, n.type, n.diff);\n if (n.type === 'group') {\n diff = n.diff;\n }\n });\n return { elem, diff };\n};\n\nexport const render = (elem, graph, markers, diagramtype, id) => {\n insertMarkers(elem, markers, diagramtype, id);\n clearNodes();\n clearEdges();\n clearClusters();\n clearGraphlib();\n\n log.warn('Graph at first:', graphlib.json.write(graph));\n adjustClustersAndEdges(graph);\n log.warn('Graph after:', graphlib.json.write(graph));\n // log.warn('Graph ever after:', graphlib.json.write(graph.node('A').graph));\n recursiveRender(elem, graph, diagramtype);\n};\n\n// const shapeDefinitions = {};\n// export const addShape = ({ shapeType: fun }) => {\n// shapeDefinitions[shapeType] = fun;\n// };\n\n// const arrowDefinitions = {};\n// export const addArrow = ({ arrowType: fun }) => {\n// arrowDefinitions[arrowType] = fun;\n// };\n","/*\n * Borrowed with love from from dagrge-d3. Many thanks to cpettitt!\n */\n\nimport node from './intersect-node.js';\nimport circle from './intersect-circle.js';\nimport ellipse from './intersect-ellipse.js';\nimport polygon from './intersect-polygon.js';\nimport rect from './intersect-rect.js';\n\nexport default {\n node,\n circle,\n ellipse,\n polygon,\n rect,\n};\n","import intersectEllipse from './intersect-ellipse';\n\nfunction intersectCircle(node, rx, point) {\n return intersectEllipse(node, rx, rx, point);\n}\n\nexport default intersectCircle;\n","function intersectEllipse(node, rx, ry, point) {\n // Formulae from: http://mathworld.wolfram.com/Ellipse-LineIntersection.html\n\n var cx = node.x;\n var cy = node.y;\n\n var px = cx - point.x;\n var py = cy - point.y;\n\n var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px);\n\n var dx = Math.abs((rx * ry * px) / det);\n if (point.x < cx) {\n dx = -dx;\n }\n var dy = Math.abs((rx * ry * py) / det);\n if (point.y < cy) {\n dy = -dy;\n }\n\n return { x: cx + dx, y: cy + dy };\n}\n\nexport default intersectEllipse;\n","/*\n * Returns the point at which two lines, p and q, intersect or returns\n * undefined if they do not intersect.\n */\nfunction intersectLine(p1, p2, q1, q2) {\n // Algorithm from J. Avro, (ed.) Graphics Gems, No 2, Morgan Kaufmann, 1994,\n // p7 and p473.\n\n var a1, a2, b1, b2, c1, c2;\n var r1, r2, r3, r4;\n var denom, offset, num;\n var x, y;\n\n // Compute a1, b1, c1, where line joining points 1 and 2 is F(x,y) = a1 x +\n // b1 y + c1 = 0.\n a1 = p2.y - p1.y;\n b1 = p1.x - p2.x;\n c1 = p2.x * p1.y - p1.x * p2.y;\n\n // Compute r3 and r4.\n r3 = a1 * q1.x + b1 * q1.y + c1;\n r4 = a1 * q2.x + b1 * q2.y + c1;\n\n // Check signs of r3 and r4. If both point 3 and point 4 lie on\n // same side of line 1, the line segments do not intersect.\n if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) {\n return /*DONT_INTERSECT*/;\n }\n\n // Compute a2, b2, c2 where line joining points 3 and 4 is G(x,y) = a2 x + b2 y + c2 = 0\n a2 = q2.y - q1.y;\n b2 = q1.x - q2.x;\n c2 = q2.x * q1.y - q1.x * q2.y;\n\n // Compute r1 and r2\n r1 = a2 * p1.x + b2 * p1.y + c2;\n r2 = a2 * p2.x + b2 * p2.y + c2;\n\n // Check signs of r1 and r2. If both point 1 and point 2 lie\n // on same side of second line segment, the line segments do\n // not intersect.\n if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) {\n return /*DONT_INTERSECT*/;\n }\n\n // Line segments intersect: compute intersection point.\n denom = a1 * b2 - a2 * b1;\n if (denom === 0) {\n return /*COLLINEAR*/;\n }\n\n offset = Math.abs(denom / 2);\n\n // The denom/2 is to get rounding instead of truncating. It\n // is added or subtracted to the numerator, depending upon the\n // sign of the numerator.\n num = b1 * c2 - b2 * c1;\n x = num < 0 ? (num - offset) / denom : (num + offset) / denom;\n\n num = a2 * c1 - a1 * c2;\n y = num < 0 ? (num - offset) / denom : (num + offset) / denom;\n\n return { x: x, y: y };\n}\n\nfunction sameSign(r1, r2) {\n return r1 * r2 > 0;\n}\n\nexport default intersectLine;\n","module.exports = intersectNode;\n\nfunction intersectNode(node, point) {\n // console.info('Intersect Node');\n return node.intersect(point);\n}\n","/* eslint \"no-console\": off */\n\nimport intersectLine from './intersect-line';\n\nexport default intersectPolygon;\n\n/*\n * Returns the point ({x, y}) at which the point argument intersects with the\n * node argument assuming that it has the shape specified by polygon.\n */\nfunction intersectPolygon(node, polyPoints, point) {\n var x1 = node.x;\n var y1 = node.y;\n\n var intersections = [];\n\n var minX = Number.POSITIVE_INFINITY;\n var minY = Number.POSITIVE_INFINITY;\n if (typeof polyPoints.forEach === 'function') {\n polyPoints.forEach(function (entry) {\n minX = Math.min(minX, entry.x);\n minY = Math.min(minY, entry.y);\n });\n } else {\n minX = Math.min(minX, polyPoints.x);\n minY = Math.min(minY, polyPoints.y);\n }\n\n var left = x1 - node.width / 2 - minX;\n var top = y1 - node.height / 2 - minY;\n\n for (var i = 0; i < polyPoints.length; i++) {\n var p1 = polyPoints[i];\n var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0];\n var intersect = intersectLine(\n node,\n point,\n { x: left + p1.x, y: top + p1.y },\n { x: left + p2.x, y: top + p2.y }\n );\n if (intersect) {\n intersections.push(intersect);\n }\n }\n\n if (!intersections.length) {\n // console.log('NO INTERSECTION FOUND, RETURN NODE CENTER', node);\n return node;\n }\n\n if (intersections.length > 1) {\n // More intersections, find the one nearest to edge end point\n intersections.sort(function (p, q) {\n var pdx = p.x - point.x;\n var pdy = p.y - point.y;\n var distp = Math.sqrt(pdx * pdx + pdy * pdy);\n\n var qdx = q.x - point.x;\n var qdy = q.y - point.y;\n var distq = Math.sqrt(qdx * qdx + qdy * qdy);\n\n return distp < distq ? -1 : distp === distq ? 0 : 1;\n });\n }\n return intersections[0];\n}\n","const intersectRect = (node, point) => {\n var x = node.x;\n var y = node.y;\n\n // Rectangle intersection algorithm from:\n // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes\n var dx = point.x - x;\n var dy = point.y - y;\n var w = node.width / 2;\n var h = node.height / 2;\n\n var sx, sy;\n if (Math.abs(dy) * w > Math.abs(dx) * h) {\n // Intersection is top or bottom of rect.\n if (dy < 0) {\n h = -h;\n }\n sx = dy === 0 ? 0 : (h * dx) / dy;\n sy = h;\n } else {\n // Intersection is left or right of rect.\n if (dx < 0) {\n w = -w;\n }\n sx = w;\n sy = dx === 0 ? 0 : (w * dy) / dx;\n }\n\n return { x: x + sx, y: y + sy };\n};\n\nexport default intersectRect;\n","/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n */\n\nimport { log } from '../logger';\n\n// Only add the number of markers that the diagram needs\nconst insertMarkers = (elem, markerArray, type, id) => {\n markerArray.forEach((markerName) => {\n markers[markerName](elem, type, id);\n });\n};\n\nconst extension = (elem, type, id) => {\n log.trace('Making markers for ', id);\n elem\n .append('defs')\n .append('marker')\n .attr('id', type + '-extensionStart')\n .attr('class', 'marker extension ' + type)\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 1,7 L18,13 V 1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', type + '-extensionEnd')\n .attr('class', 'marker extension ' + type)\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 1,1 V 13 L18,7 Z'); // this is actual shape for arrowhead\n};\n\nconst composition = (elem, type) => {\n elem\n .append('defs')\n .append('marker')\n .attr('id', type + '-compositionStart')\n .attr('class', 'marker composition ' + type)\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', type + '-compositionEnd')\n .attr('class', 'marker composition ' + type)\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n};\nconst aggregation = (elem, type) => {\n elem\n .append('defs')\n .append('marker')\n .attr('id', type + '-aggregationStart')\n .attr('class', 'marker aggregation ' + type)\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', type + '-aggregationEnd')\n .attr('class', 'marker aggregation ' + type)\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n};\nconst dependency = (elem, type) => {\n elem\n .append('defs')\n .append('marker')\n .attr('id', type + '-dependencyStart')\n .attr('class', 'marker dependency ' + type)\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 5,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', type + '-dependencyEnd')\n .attr('class', 'marker dependency ' + type)\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z');\n};\nconst point = (elem, type) => {\n elem\n .append('marker')\n .attr('id', type + '-pointEnd')\n .attr('class', 'marker ' + type)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', 9)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 12)\n .attr('markerHeight', 12)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 0 0 L 10 5 L 0 10 z')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 1)\n .style('stroke-dasharray', '1,0');\n elem\n .append('marker')\n .attr('id', type + '-pointStart')\n .attr('class', 'marker ' + type)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', 0)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 12)\n .attr('markerHeight', 12)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 0 5 L 10 10 L 10 0 z')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 1)\n .style('stroke-dasharray', '1,0');\n};\nconst circle = (elem, type) => {\n elem\n .append('marker')\n .attr('id', type + '-circleEnd')\n .attr('class', 'marker ' + type)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', 11)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 11)\n .attr('markerHeight', 11)\n .attr('orient', 'auto')\n .append('circle')\n .attr('cx', '5')\n .attr('cy', '5')\n .attr('r', '5')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 1)\n .style('stroke-dasharray', '1,0');\n\n elem\n .append('marker')\n .attr('id', type + '-circleStart')\n .attr('class', 'marker ' + type)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', -1)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 11)\n .attr('markerHeight', 11)\n .attr('orient', 'auto')\n .append('circle')\n .attr('cx', '5')\n .attr('cy', '5')\n .attr('r', '5')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 1)\n .style('stroke-dasharray', '1,0');\n};\nconst cross = (elem, type) => {\n elem\n .append('marker')\n .attr('id', type + '-crossEnd')\n .attr('class', 'marker cross ' + type)\n .attr('viewBox', '0 0 11 11')\n .attr('refX', 12)\n .attr('refY', 5.2)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 11)\n .attr('markerHeight', 11)\n .attr('orient', 'auto')\n .append('path')\n // .attr('stroke', 'black')\n .attr('d', 'M 1,1 l 9,9 M 10,1 l -9,9')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 2)\n .style('stroke-dasharray', '1,0');\n\n elem\n .append('marker')\n .attr('id', type + '-crossStart')\n .attr('class', 'marker cross ' + type)\n .attr('viewBox', '0 0 11 11')\n .attr('refX', -1)\n .attr('refY', 5.2)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 11)\n .attr('markerHeight', 11)\n .attr('orient', 'auto')\n .append('path')\n // .attr('stroke', 'black')\n .attr('d', 'M 1,1 l 9,9 M 10,1 l -9,9')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 2)\n .style('stroke-dasharray', '1,0');\n};\nconst barb = (elem, type) => {\n elem\n .append('defs')\n .append('marker')\n .attr('id', type + '-barbEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 14)\n .attr('markerUnits', 'strokeWidth')\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 19,7 L9,13 L14,7 L9,1 Z');\n};\n\n// TODO rename the class diagram markers to something shape descriptive and semanitc free\nconst markers = {\n extension,\n composition,\n aggregation,\n dependency,\n point,\n circle,\n cross,\n barb,\n};\nexport default insertMarkers;\n","/**\n * Decorates with functions required by mermaids dagre-wrapper.\n */\nimport { log } from '../logger';\nimport graphlib from 'graphlib';\n\nexport let clusterDb = {};\nlet decendants = {};\nlet parents = {};\n\nexport const clear = () => {\n decendants = {};\n parents = {};\n clusterDb = {};\n};\n\nconst isDecendant = (id, ancenstorId) => {\n // if (id === ancenstorId) return true;\n\n log.trace(\n 'In isDecendant',\n ancenstorId,\n ' ',\n id,\n ' = ',\n decendants[ancenstorId].indexOf(id) >= 0\n );\n if (decendants[ancenstorId].indexOf(id) >= 0) return true;\n\n return false;\n};\n\nconst edgeInCluster = (edge, clusterId) => {\n log.info('Decendants of ', clusterId, ' is ', decendants[clusterId]);\n log.info('Edge is ', edge);\n // Edges to/from the cluster is not in the cluster, they are in the parent\n if (edge.v === clusterId) return false;\n if (edge.w === clusterId) return false;\n\n if (!decendants[clusterId]) {\n log.debug('Tilt, ', clusterId, ',not in decendants');\n return false;\n }\n log.info('Here ');\n\n if (decendants[clusterId].indexOf(edge.v) >= 0) return true;\n if (isDecendant(edge.v, clusterId)) return true;\n if (isDecendant(edge.w, clusterId)) return true;\n if (decendants[clusterId].indexOf(edge.w) >= 0) return true;\n\n return false;\n};\n\nconst copy = (clusterId, graph, newGraph, rootId) => {\n log.warn(\n 'Copying children of ',\n clusterId,\n 'root',\n rootId,\n 'data',\n graph.node(clusterId),\n rootId\n );\n const nodes = graph.children(clusterId) || [];\n\n // Include cluster node if it is not the root\n if (clusterId !== rootId) {\n nodes.push(clusterId);\n }\n\n log.warn('Copying (nodes) clusterId', clusterId, 'nodes', nodes);\n\n nodes.forEach((node) => {\n if (graph.children(node).length > 0) {\n copy(node, graph, newGraph, rootId);\n } else {\n const data = graph.node(node);\n log.info('cp ', node, ' to ', rootId, ' with parent ', clusterId); //,node, data, ' parent is ', clusterId);\n newGraph.setNode(node, data);\n if (rootId !== graph.parent(node)) {\n log.warn('Setting parent', node, graph.parent(node));\n newGraph.setParent(node, graph.parent(node));\n }\n\n if (clusterId !== rootId && node !== clusterId) {\n log.debug('Setting parent', node, clusterId);\n newGraph.setParent(node, clusterId);\n } else {\n log.info('In copy ', clusterId, 'root', rootId, 'data', graph.node(clusterId), rootId);\n log.debug(\n 'Not Setting parent for node=',\n node,\n 'cluster!==rootId',\n clusterId !== rootId,\n 'node!==clusterId',\n node !== clusterId\n );\n }\n const edges = graph.edges(node);\n log.debug('Copying Edges', edges);\n edges.forEach((edge) => {\n log.info('Edge', edge);\n const data = graph.edge(edge.v, edge.w, edge.name);\n log.info('Edge data', data, rootId);\n try {\n // Do not copy edges in and out of the root cluster, they belong to the parent graph\n if (edgeInCluster(edge, rootId)) {\n log.info('Copying as ', edge.v, edge.w, data, edge.name);\n newGraph.setEdge(edge.v, edge.w, data, edge.name);\n log.info('newGraph edges ', newGraph.edges(), newGraph.edge(newGraph.edges()[0]));\n } else {\n log.info(\n 'Skipping copy of edge ',\n edge.v,\n '-->',\n edge.w,\n ' rootId: ',\n rootId,\n ' clusterId:',\n clusterId\n );\n }\n } catch (e) {\n log.error(e);\n }\n });\n }\n log.debug('Removing node', node);\n graph.removeNode(node);\n });\n};\nexport const extractDecendants = (id, graph) => {\n // log.debug('Extracting ', id);\n const children = graph.children(id);\n let res = [].concat(children);\n\n for (let i = 0; i < children.length; i++) {\n parents[children[i]] = id;\n res = res.concat(extractDecendants(children[i], graph));\n }\n\n return res;\n};\n\n/**\n * Validates the graph, checking that all parent child relation points to existing nodes and that\n * edges between nodes also ia correct. When not correct the function logs the discrepancies.\n * @param {graphlib graph} g\n */\nexport const validate = (graph) => {\n const edges = graph.edges();\n log.trace('Edges: ', edges);\n for (let i = 0; i < edges.length; i++) {\n if (graph.children(edges[i].v).length > 0) {\n log.trace('The node ', edges[i].v, ' is part of and edge even though it has children');\n return false;\n }\n if (graph.children(edges[i].w).length > 0) {\n log.trace('The node ', edges[i].w, ' is part of and edge even though it has children');\n return false;\n }\n }\n return true;\n};\n\n/**\n * Finds a child that is not a cluster. When faking a edge between a node and a cluster.\n * @param {Finds a } id\n * @param {*} graph\n */\nexport const findNonClusterChild = (id, graph) => {\n // const node = graph.node(id);\n log.trace('Searching', id);\n // const children = graph.children(id).reverse();\n const children = graph.children(id); //.reverse();\n log.trace('Searching children of id ', id, children);\n if (children.length < 1) {\n log.trace('This is a valid node', id);\n return id;\n }\n for (let i = 0; i < children.length; i++) {\n const _id = findNonClusterChild(children[i], graph);\n if (_id) {\n log.trace('Found replacement for', id, ' => ', _id);\n return _id;\n }\n }\n};\n\nconst getAnchorId = (id) => {\n if (!clusterDb[id]) {\n return id;\n }\n // If the cluster has no external connections\n if (!clusterDb[id].externalConnections) {\n return id;\n }\n\n // Return the replacement node\n if (clusterDb[id]) {\n return clusterDb[id].id;\n }\n return id;\n};\n\nexport const adjustClustersAndEdges = (graph, depth) => {\n if (!graph || depth > 10) {\n log.debug('Opting out, no graph ');\n return;\n } else {\n log.debug('Opting in, graph ');\n }\n // Go through the nodes and for each cluster found, save a replacment node, this can be used when\n // faking a link to a cluster\n graph.nodes().forEach(function (id) {\n const children = graph.children(id);\n if (children.length > 0) {\n log.warn(\n 'Cluster identified',\n id,\n ' Replacement id in edges: ',\n findNonClusterChild(id, graph)\n );\n decendants[id] = extractDecendants(id, graph);\n clusterDb[id] = { id: findNonClusterChild(id, graph), clusterData: graph.node(id) };\n }\n });\n\n // Check incoming and outgoing edges for each cluster\n graph.nodes().forEach(function (id) {\n const children = graph.children(id);\n const edges = graph.edges();\n if (children.length > 0) {\n log.debug('Cluster identified', id, decendants);\n edges.forEach((edge) => {\n // log.debug('Edge, decendants: ', edge, decendants[id]);\n\n // Check if any edge leaves the cluster (not the actual cluster, thats a link from the box)\n if (edge.v !== id && edge.w !== id) {\n // Any edge where either the one of the nodes is decending to the cluster but not the other\n // if (decendants[id].indexOf(edge.v) < 0 && decendants[id].indexOf(edge.w) < 0) {\n\n const d1 = isDecendant(edge.v, id);\n const d2 = isDecendant(edge.w, id);\n\n // d1 xor d2 - if either d1 is true and d2 is false or the other way around\n if (d1 ^ d2) {\n log.warn('Edge: ', edge, ' leaves cluster ', id);\n log.warn('Decendants of XXX ', id, ': ', decendants[id]);\n clusterDb[id].externalConnections = true;\n }\n }\n });\n } else {\n log.debug('Not a cluster ', id, decendants);\n }\n });\n\n // For clusters with incoming and/or outgoing edges translate those edges to a real node\n // in the cluster inorder to fake the edge\n graph.edges().forEach(function (e) {\n const edge = graph.edge(e);\n log.warn('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e));\n log.warn('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(graph.edge(e)));\n\n let v = e.v;\n let w = e.w;\n // Check if link is either from or to a cluster\n log.warn(\n 'Fix XXX',\n clusterDb,\n 'ids:',\n e.v,\n e.w,\n 'Translateing: ',\n clusterDb[e.v],\n ' --- ',\n clusterDb[e.w]\n );\n if (clusterDb[e.v] || clusterDb[e.w]) {\n log.warn('Fixing and trixing - removing XXX', e.v, e.w, e.name);\n v = getAnchorId(e.v);\n w = getAnchorId(e.w);\n graph.removeEdge(e.v, e.w, e.name);\n if (v !== e.v) edge.fromCluster = e.v;\n if (w !== e.w) edge.toCluster = e.w;\n log.warn('Fix Replacing with XXX', v, w, e.name);\n graph.setEdge(v, w, edge, e.name);\n }\n });\n log.warn('Adjusted Graph', graphlib.json.write(graph));\n extractor(graph, 0);\n\n log.trace(clusterDb);\n\n // Remove references to extracted cluster\n // graph.edges().forEach(edge => {\n // if (isDecendant(edge.v, clusterId) || isDecendant(edge.w, clusterId)) {\n // graph.removeEdge(edge);\n // }\n // });\n};\n\nexport const extractor = (graph, depth) => {\n log.warn('extractor - ', depth, graphlib.json.write(graph), graph.children('D'));\n if (depth > 10) {\n log.error('Bailing out');\n return;\n }\n // For clusters without incoming and/or outgoing edges, create a new cluster-node\n // containing the nodes and edges in the custer in a new graph\n // for (let i = 0;)\n let nodes = graph.nodes();\n let hasChildren = false;\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n const children = graph.children(node);\n hasChildren = hasChildren || children.length > 0;\n }\n\n if (!hasChildren) {\n log.debug('Done, no node has children', graph.nodes());\n return;\n }\n // const clusters = Object.keys(clusterDb);\n // clusters.forEach(clusterId => {\n log.debug('Nodes = ', nodes, depth);\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n\n log.debug(\n 'Extracting node',\n node,\n clusterDb,\n clusterDb[node] && !clusterDb[node].externalConnections,\n !graph.parent(node),\n graph.node(node),\n graph.children('D'),\n ' Depth ',\n depth\n );\n // Note that the node might have been removed after the Object.keys call so better check\n // that it still is in the game\n if (!clusterDb[node]) {\n // Skip if the node is not a cluster\n log.debug('Not a cluster', node, depth);\n // break;\n } else if (\n !clusterDb[node].externalConnections &&\n // !graph.parent(node) &&\n graph.children(node) &&\n graph.children(node).length > 0\n ) {\n log.warn(\n 'Cluster without external connections, without a parent and with children',\n node,\n depth\n );\n\n const graphSettings = graph.graph();\n let dir = graphSettings.rankdir === 'TB' ? 'LR' : 'TB';\n if (clusterDb[node]) {\n if (clusterDb[node].clusterData && clusterDb[node].clusterData.dir) {\n dir = clusterDb[node].clusterData.dir;\n log.warn('Fixing dir', clusterDb[node].clusterData.dir, dir);\n }\n }\n\n const clusterGraph = new graphlib.Graph({\n multigraph: true,\n compound: true,\n })\n .setGraph({\n rankdir: dir, // Todo: set proper spacing\n nodesep: 50,\n ranksep: 50,\n marginx: 8,\n marginy: 8,\n })\n .setDefaultEdgeLabel(function () {\n return {};\n });\n\n log.warn('Old graph before copy', graphlib.json.write(graph));\n copy(node, graph, clusterGraph, node);\n graph.setNode(node, {\n clusterNode: true,\n id: node,\n clusterData: clusterDb[node].clusterData,\n labelText: clusterDb[node].labelText,\n graph: clusterGraph,\n });\n log.warn('New graph after copy node: (', node, ')', graphlib.json.write(clusterGraph));\n log.debug('Old graph after copy', graphlib.json.write(graph));\n } else {\n log.warn(\n 'Cluster ** ',\n node,\n ' **not meeting the criteria !externalConnections:',\n !clusterDb[node].externalConnections,\n ' no parent: ',\n !graph.parent(node),\n ' children ',\n graph.children(node) && graph.children(node).length > 0,\n graph.children('D'),\n depth\n );\n log.debug(clusterDb);\n }\n }\n\n nodes = graph.nodes();\n log.warn('New list of nodes', nodes);\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n const data = graph.node(node);\n log.warn(' Now next level', node, data);\n if (data.clusterNode) {\n extractor(data.graph, depth + 1);\n }\n }\n};\n\nconst sorter = (graph, nodes) => {\n if (nodes.length === 0) return [];\n let result = Object.assign(nodes);\n nodes.forEach((node) => {\n const children = graph.children(node);\n const sorted = sorter(graph, children);\n result = result.concat(sorted);\n });\n\n return result;\n};\n\nexport const sortNodesByHierarchy = (graph) => sorter(graph, graph.children());\n","import { select } from 'd3';\nimport { log } from '../logger'; // eslint-disable-line\nimport { labelHelper, updateNodeBounds, insertPolygonShape } from './shapes/util';\nimport { getConfig } from '../config';\nimport intersect from './intersect/index.js';\nimport createLabel from './createLabel';\nimport note from './shapes/note';\nimport { parseMember } from '../diagrams/class/svgDraw';\nimport { evaluate } from '../diagrams/common/common';\n\nconst question = (parent, node) => {\n const { shapeSvg, bbox } = labelHelper(parent, node, undefined, true);\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const s = w + h;\n const points = [\n { x: s / 2, y: 0 },\n { x: s, y: -s / 2 },\n { x: s / 2, y: -s },\n { x: 0, y: -s / 2 },\n ];\n\n log.info('Question main (Circle)');\n\n const questionElem = insertPolygonShape(shapeSvg, s, s, points);\n questionElem.attr('style', node.style);\n updateNodeBounds(node, questionElem);\n\n node.intersect = function (point) {\n log.warn('Intersect called');\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst choice = (parent, node) => {\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'node default')\n .attr('id', node.domId || node.id);\n\n const s = 28;\n const points = [\n { x: 0, y: s / 2 },\n { x: s / 2, y: 0 },\n { x: 0, y: -s / 2 },\n { x: -s / 2, y: 0 },\n ];\n\n const choice = shapeSvg.insert('polygon', ':first-child').attr(\n 'points',\n points\n .map(function (d) {\n return d.x + ',' + d.y;\n })\n .join(' ')\n );\n // center the circle around its coordinate\n choice.attr('class', 'state-start').attr('r', 7).attr('width', 28).attr('height', 28);\n node.width = 28;\n node.height = 28;\n\n node.intersect = function (point) {\n return intersect.circle(node, 14, point);\n };\n\n return shapeSvg;\n};\n\nconst hexagon = (parent, node) => {\n const { shapeSvg, bbox } = labelHelper(parent, node, undefined, true);\n\n const f = 4;\n const h = bbox.height + node.padding;\n const m = h / f;\n const w = bbox.width + 2 * m + node.padding;\n const points = [\n { x: m, y: 0 },\n { x: w - m, y: 0 },\n { x: w, y: -h / 2 },\n { x: w - m, y: -h },\n { x: m, y: -h },\n { x: 0, y: -h / 2 },\n ];\n\n const hex = insertPolygonShape(shapeSvg, w, h, points);\n hex.attr('style', node.style);\n updateNodeBounds(node, hex);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst rect_left_inv_arrow = (parent, node) => {\n const { shapeSvg, bbox } = labelHelper(parent, node, undefined, true);\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: -h / 2, y: 0 },\n { x: w, y: 0 },\n { x: w, y: -h },\n { x: -h / 2, y: -h },\n { x: 0, y: -h / 2 },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n\n node.width = w + h;\n node.height = h;\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst lean_right = (parent, node) => {\n const { shapeSvg, bbox } = labelHelper(parent, node, undefined, true);\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: (-2 * h) / 6, y: 0 },\n { x: w - h / 6, y: 0 },\n { x: w + (2 * h) / 6, y: -h },\n { x: h / 6, y: -h },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst lean_left = (parent, node) => {\n const { shapeSvg, bbox } = labelHelper(parent, node, undefined, true);\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: (2 * h) / 6, y: 0 },\n { x: w + h / 6, y: 0 },\n { x: w - (2 * h) / 6, y: -h },\n { x: -h / 6, y: -h },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst trapezoid = (parent, node) => {\n const { shapeSvg, bbox } = labelHelper(parent, node, undefined, true);\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: (-2 * h) / 6, y: 0 },\n { x: w + (2 * h) / 6, y: 0 },\n { x: w - h / 6, y: -h },\n { x: h / 6, y: -h },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst inv_trapezoid = (parent, node) => {\n const { shapeSvg, bbox } = labelHelper(parent, node, undefined, true);\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: h / 6, y: 0 },\n { x: w - h / 6, y: 0 },\n { x: w + (2 * h) / 6, y: -h },\n { x: (-2 * h) / 6, y: -h },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst rect_right_inv_arrow = (parent, node) => {\n const { shapeSvg, bbox } = labelHelper(parent, node, undefined, true);\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: 0, y: 0 },\n { x: w + h / 2, y: 0 },\n { x: w, y: -h / 2 },\n { x: w + h / 2, y: -h },\n { x: 0, y: -h },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst cylinder = (parent, node) => {\n const { shapeSvg, bbox } = labelHelper(parent, node, undefined, true);\n\n const w = bbox.width + node.padding;\n const rx = w / 2;\n const ry = rx / (2.5 + w / 50);\n const h = bbox.height + ry + node.padding;\n\n const shape =\n 'M 0,' +\n ry +\n ' a ' +\n rx +\n ',' +\n ry +\n ' 0,0,0 ' +\n w +\n ' 0 a ' +\n rx +\n ',' +\n ry +\n ' 0,0,0 ' +\n -w +\n ' 0 l 0,' +\n h +\n ' a ' +\n rx +\n ',' +\n ry +\n ' 0,0,0 ' +\n w +\n ' 0 l 0,' +\n -h;\n\n const el = shapeSvg\n .attr('label-offset-y', ry)\n .insert('path', ':first-child')\n .attr('style', node.style)\n .attr('d', shape)\n .attr('transform', 'translate(' + -w / 2 + ',' + -(h / 2 + ry) + ')');\n\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n const pos = intersect.rect(node, point);\n const x = pos.x - node.x;\n\n if (\n rx != 0 &&\n (Math.abs(x) < node.width / 2 ||\n (Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry))\n ) {\n // ellipsis equation: x*x / a*a + y*y / b*b = 1\n // solve for y to get adjustion value for pos.y\n let y = ry * ry * (1 - (x * x) / (rx * rx));\n if (y != 0) y = Math.sqrt(y);\n y = ry - y;\n if (point.y - node.y > 0) y = -y;\n\n pos.y += y;\n }\n\n return pos;\n };\n\n return shapeSvg;\n};\n\nconst rect = (parent, node) => {\n const { shapeSvg, bbox, halfPadding } = labelHelper(parent, node, 'node ' + node.classes, true);\n\n log.trace('Classes = ', node.classes);\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n rect\n .attr('class', 'basic label-container')\n .attr('style', node.style)\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', -bbox.width / 2 - halfPadding)\n .attr('y', -bbox.height / 2 - halfPadding)\n .attr('width', bbox.width + node.padding)\n .attr('height', bbox.height + node.padding);\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst rectWithTitle = (parent, node) => {\n // const { shapeSvg, bbox, halfPadding } = labelHelper(parent, node, 'node ' + node.classes);\n\n let classes;\n if (!node.classes) {\n classes = 'node default';\n } else {\n classes = 'node ' + node.classes;\n }\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', classes)\n .attr('id', node.domId || node.id);\n\n // Create the title label and insert it after the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n // const innerRect = shapeSvg.insert('rect');\n const innerLine = shapeSvg.insert('line');\n\n const label = shapeSvg.insert('g').attr('class', 'label');\n\n const text2 = node.labelText.flat ? node.labelText.flat() : node.labelText;\n // const text2 = typeof text2prim === 'object' ? text2prim[0] : text2prim;\n\n let title = '';\n if (typeof text2 === 'object') {\n title = text2[0];\n } else {\n title = text2;\n }\n log.info('Label text abc79', title, text2, typeof text2 === 'object');\n\n const text = label.node().appendChild(createLabel(title, node.labelStyle, true, true));\n let bbox;\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n log.info('Text 2', text2);\n const textRows = text2.slice(1, text2.length);\n let titleBox = text.getBBox();\n const descr = label\n .node()\n .appendChild(\n createLabel(textRows.join ? textRows.join('
') : textRows, node.labelStyle, true, true)\n );\n\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = descr.children[0];\n const dv = select(descr);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n // bbox = label.getBBox();\n // log.info(descr);\n const halfPadding = node.padding / 2;\n select(descr).attr(\n 'transform',\n 'translate( ' +\n // (titleBox.width - bbox.width) / 2 +\n (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) +\n ', ' +\n (titleBox.height + halfPadding + 5) +\n ')'\n );\n select(text).attr(\n 'transform',\n 'translate( ' +\n // (titleBox.width - bbox.width) / 2 +\n (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) +\n ', ' +\n 0 +\n ')'\n );\n // Get the size of the label\n\n // Bounding box for title and text\n bbox = label.node().getBBox();\n\n // Center the label\n label.attr(\n 'transform',\n 'translate(' + -bbox.width / 2 + ', ' + (-bbox.height / 2 - halfPadding + 3) + ')'\n );\n\n rect\n .attr('class', 'outer title-state')\n .attr('x', -bbox.width / 2 - halfPadding)\n .attr('y', -bbox.height / 2 - halfPadding)\n .attr('width', bbox.width + node.padding)\n .attr('height', bbox.height + node.padding);\n\n innerLine\n .attr('class', 'divider')\n .attr('x1', -bbox.width / 2 - halfPadding)\n .attr('x2', bbox.width / 2 + halfPadding)\n .attr('y1', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding)\n .attr('y2', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding);\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst stadium = (parent, node) => {\n const { shapeSvg, bbox } = labelHelper(parent, node, undefined, true);\n\n const h = bbox.height + node.padding;\n const w = bbox.width + h / 4 + node.padding;\n\n // add the rect\n const rect = shapeSvg\n .insert('rect', ':first-child')\n .attr('style', node.style)\n .attr('rx', h / 2)\n .attr('ry', h / 2)\n .attr('x', -w / 2)\n .attr('y', -h / 2)\n .attr('width', w)\n .attr('height', h);\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst circle = (parent, node) => {\n const { shapeSvg, bbox, halfPadding } = labelHelper(parent, node, undefined, true);\n const circle = shapeSvg.insert('circle', ':first-child');\n\n // center the circle around its coordinate\n circle\n .attr('style', node.style)\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('r', bbox.width / 2 + halfPadding)\n .attr('width', bbox.width + node.padding)\n .attr('height', bbox.height + node.padding);\n\n log.info('Circle main');\n\n updateNodeBounds(node, circle);\n\n node.intersect = function (point) {\n log.info('Circle intersect', node, bbox.width / 2 + halfPadding, point);\n return intersect.circle(node, bbox.width / 2 + halfPadding, point);\n };\n\n return shapeSvg;\n};\n\nconst subroutine = (parent, node) => {\n const { shapeSvg, bbox } = labelHelper(parent, node, undefined, true);\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: 0, y: 0 },\n { x: w, y: 0 },\n { x: w, y: -h },\n { x: 0, y: -h },\n { x: 0, y: 0 },\n { x: -8, y: 0 },\n { x: w + 8, y: 0 },\n { x: w + 8, y: -h },\n { x: -8, y: -h },\n { x: -8, y: 0 },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst start = (parent, node) => {\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'node default')\n .attr('id', node.domId || node.id);\n const circle = shapeSvg.insert('circle', ':first-child');\n\n // center the circle around its coordinate\n circle.attr('class', 'state-start').attr('r', 7).attr('width', 14).attr('height', 14);\n\n updateNodeBounds(node, circle);\n\n node.intersect = function (point) {\n return intersect.circle(node, 7, point);\n };\n\n return shapeSvg;\n};\n\nconst forkJoin = (parent, node, dir) => {\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'node default')\n .attr('id', node.domId || node.id);\n\n let width = 70;\n let height = 10;\n\n if (dir === 'LR') {\n width = 10;\n height = 70;\n }\n\n const shape = shapeSvg\n .append('rect')\n .attr('x', (-1 * width) / 2)\n .attr('y', (-1 * height) / 2)\n .attr('width', width)\n .attr('height', height)\n .attr('class', 'fork-join');\n\n updateNodeBounds(node, shape);\n node.height = node.height + node.padding / 2;\n node.width = node.width + node.padding / 2;\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst end = (parent, node) => {\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'node default')\n .attr('id', node.domId || node.id);\n const innerCircle = shapeSvg.insert('circle', ':first-child');\n const circle = shapeSvg.insert('circle', ':first-child');\n\n circle.attr('class', 'state-start').attr('r', 7).attr('width', 14).attr('height', 14);\n\n innerCircle.attr('class', 'state-end').attr('r', 5).attr('width', 10).attr('height', 10);\n\n updateNodeBounds(node, circle);\n\n node.intersect = function (point) {\n return intersect.circle(node, 7, point);\n };\n\n return shapeSvg;\n};\n\nconst class_box = (parent, node) => {\n const halfPadding = node.padding / 2;\n const rowPadding = 4;\n const lineHeight = 8;\n\n let classes;\n if (!node.classes) {\n classes = 'node default';\n } else {\n classes = 'node ' + node.classes;\n }\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', classes)\n .attr('id', node.domId || node.id);\n\n // Create the title label and insert it after the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n const topLine = shapeSvg.insert('line');\n const bottomLine = shapeSvg.insert('line');\n let maxWidth = 0;\n let maxHeight = rowPadding;\n\n const labelContainer = shapeSvg.insert('g').attr('class', 'label');\n let verticalPos = 0;\n const hasInterface = node.classData.annotations && node.classData.annotations[0];\n\n // 1. Create the labels\n const interfaceLabelText = node.classData.annotations[0]\n ? '«' + node.classData.annotations[0] + '»'\n : '';\n const interfaceLabel = labelContainer\n .node()\n .appendChild(createLabel(interfaceLabelText, node.labelStyle, true, true));\n let interfaceBBox = interfaceLabel.getBBox();\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = interfaceLabel.children[0];\n const dv = select(interfaceLabel);\n interfaceBBox = div.getBoundingClientRect();\n dv.attr('width', interfaceBBox.width);\n dv.attr('height', interfaceBBox.height);\n }\n if (node.classData.annotations[0]) {\n maxHeight += interfaceBBox.height + rowPadding;\n maxWidth += interfaceBBox.width;\n }\n\n let classTitleString = node.classData.id;\n\n if (node.classData.type !== undefined && node.classData.type !== '') {\n if (getConfig().flowchart.htmlLabels) {\n classTitleString += '<' + node.classData.type + '>';\n } else {\n classTitleString += '<' + node.classData.type + '>';\n }\n }\n const classTitleLabel = labelContainer\n .node()\n .appendChild(createLabel(classTitleString, node.labelStyle, true, true));\n select(classTitleLabel).attr('class', 'classTitle');\n let classTitleBBox = classTitleLabel.getBBox();\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = classTitleLabel.children[0];\n const dv = select(classTitleLabel);\n classTitleBBox = div.getBoundingClientRect();\n dv.attr('width', classTitleBBox.width);\n dv.attr('height', classTitleBBox.height);\n }\n maxHeight += classTitleBBox.height + rowPadding;\n if (classTitleBBox.width > maxWidth) {\n maxWidth = classTitleBBox.width;\n }\n const classAttributes = [];\n node.classData.members.forEach((str) => {\n let parsedText = parseMember(str).displayText;\n if (getConfig().flowchart.htmlLabels) {\n parsedText = parsedText.replace(//g, '>');\n }\n const lbl = labelContainer\n .node()\n .appendChild(createLabel(parsedText, node.labelStyle, true, true));\n let bbox = lbl.getBBox();\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = lbl.children[0];\n const dv = select(lbl);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n if (bbox.width > maxWidth) {\n maxWidth = bbox.width;\n }\n maxHeight += bbox.height + rowPadding;\n classAttributes.push(lbl);\n });\n\n maxHeight += lineHeight;\n\n const classMethods = [];\n node.classData.methods.forEach((str) => {\n const parsedInfo = parseMember(str);\n let displayText = parsedInfo.displayText;\n if (getConfig().flowchart.htmlLabels) {\n displayText = displayText.replace(//g, '>');\n }\n const lbl = labelContainer\n .node()\n .appendChild(\n createLabel(\n displayText,\n parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle,\n true,\n true\n )\n );\n let bbox = lbl.getBBox();\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = lbl.children[0];\n const dv = select(lbl);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n if (bbox.width > maxWidth) {\n maxWidth = bbox.width;\n }\n maxHeight += bbox.height + rowPadding;\n\n classMethods.push(lbl);\n });\n\n maxHeight += lineHeight;\n\n // 2. Position the labels\n\n // position the interface label\n if (hasInterface) {\n let diffX = (maxWidth - interfaceBBox.width) / 2;\n select(interfaceLabel).attr(\n 'transform',\n 'translate( ' + ((-1 * maxWidth) / 2 + diffX) + ', ' + (-1 * maxHeight) / 2 + ')'\n );\n verticalPos = interfaceBBox.height + rowPadding;\n }\n // Positin the class title label\n let diffX = (maxWidth - classTitleBBox.width) / 2;\n select(classTitleLabel).attr(\n 'transform',\n 'translate( ' +\n ((-1 * maxWidth) / 2 + diffX) +\n ', ' +\n ((-1 * maxHeight) / 2 + verticalPos) +\n ')'\n );\n verticalPos += classTitleBBox.height + rowPadding;\n\n topLine\n .attr('class', 'divider')\n .attr('x1', -maxWidth / 2 - halfPadding)\n .attr('x2', maxWidth / 2 + halfPadding)\n .attr('y1', -maxHeight / 2 - halfPadding + lineHeight + verticalPos)\n .attr('y2', -maxHeight / 2 - halfPadding + lineHeight + verticalPos);\n\n verticalPos += lineHeight;\n\n classAttributes.forEach((lbl) => {\n select(lbl).attr(\n 'transform',\n 'translate( ' +\n -maxWidth / 2 +\n ', ' +\n ((-1 * maxHeight) / 2 + verticalPos + lineHeight / 2) +\n ')'\n );\n verticalPos += classTitleBBox.height + rowPadding;\n });\n\n verticalPos += lineHeight;\n bottomLine\n .attr('class', 'divider')\n .attr('x1', -maxWidth / 2 - halfPadding)\n .attr('x2', maxWidth / 2 + halfPadding)\n .attr('y1', -maxHeight / 2 - halfPadding + lineHeight + verticalPos)\n .attr('y2', -maxHeight / 2 - halfPadding + lineHeight + verticalPos);\n\n verticalPos += lineHeight;\n\n classMethods.forEach((lbl) => {\n select(lbl).attr(\n 'transform',\n 'translate( ' + -maxWidth / 2 + ', ' + ((-1 * maxHeight) / 2 + verticalPos) + ')'\n );\n verticalPos += classTitleBBox.height + rowPadding;\n });\n //\n // let bbox;\n // if (evaluate(getConfig().flowchart.htmlLabels)) {\n // const div = interfaceLabel.children[0];\n // const dv = select(interfaceLabel);\n // bbox = div.getBoundingClientRect();\n // dv.attr('width', bbox.width);\n // dv.attr('height', bbox.height);\n // }\n // bbox = labelContainer.getBBox();\n\n // log.info('Text 2', text2);\n // const textRows = text2.slice(1, text2.length);\n // let titleBox = text.getBBox();\n // const descr = label\n // .node()\n // .appendChild(createLabel(textRows.join('
'), node.labelStyle, true, true));\n\n // if (evaluate(getConfig().flowchart.htmlLabels)) {\n // const div = descr.children[0];\n // const dv = select(descr);\n // bbox = div.getBoundingClientRect();\n // dv.attr('width', bbox.width);\n // dv.attr('height', bbox.height);\n // }\n // // bbox = label.getBBox();\n // // log.info(descr);\n // select(descr).attr(\n // 'transform',\n // 'translate( ' +\n // // (titleBox.width - bbox.width) / 2 +\n // (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) +\n // ', ' +\n // (titleBox.height + halfPadding + 5) +\n // ')'\n // );\n // select(text).attr(\n // 'transform',\n // 'translate( ' +\n // // (titleBox.width - bbox.width) / 2 +\n // (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) +\n // ', ' +\n // 0 +\n // ')'\n // );\n // // Get the size of the label\n\n // // Bounding box for title and text\n // bbox = label.node().getBBox();\n\n // // Center the label\n // label.attr(\n // 'transform',\n // 'translate(' + -bbox.width / 2 + ', ' + (-bbox.height / 2 - halfPadding + 3) + ')'\n // );\n\n rect\n .attr('class', 'outer title-state')\n .attr('x', -maxWidth / 2 - halfPadding)\n .attr('y', -(maxHeight / 2) - halfPadding)\n .attr('width', maxWidth + node.padding)\n .attr('height', maxHeight + node.padding);\n\n // innerLine\n // .attr('class', 'divider')\n // .attr('x1', -bbox.width / 2 - halfPadding)\n // .attr('x2', bbox.width / 2 + halfPadding)\n // .attr('y1', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding)\n // .attr('y2', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding);\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst shapes = {\n question,\n rect,\n rectWithTitle,\n choice,\n circle,\n stadium,\n hexagon,\n rect_left_inv_arrow,\n lean_right,\n lean_left,\n trapezoid,\n inv_trapezoid,\n rect_right_inv_arrow,\n cylinder,\n start,\n end,\n note,\n subroutine,\n fork: forkJoin,\n join: forkJoin,\n class_box,\n};\n\nlet nodeElems = {};\n\nexport const insertNode = (elem, node, dir) => {\n let newEl;\n let el;\n\n // Add link when appropriate\n if (node.link) {\n newEl = elem\n .insert('svg:a')\n .attr('xlink:href', node.link)\n .attr('target', node.linkTarget || '_blank');\n el = shapes[node.shape](newEl, node, dir);\n } else {\n el = shapes[node.shape](elem, node, dir);\n newEl = el;\n }\n if (node.tooltip) {\n el.attr('title', node.tooltip);\n }\n if (node.class) {\n el.attr('class', 'node default ' + node.class);\n }\n\n nodeElems[node.id] = newEl;\n\n if (node.haveCallback) {\n nodeElems[node.id].attr('class', nodeElems[node.id].attr('class') + ' clickable');\n }\n};\nexport const setNodeElem = (elem, node) => {\n nodeElems[node.id] = elem;\n};\nexport const clear = () => {\n nodeElems = {};\n};\n\nexport const positionNode = (node) => {\n const el = nodeElems[node.id];\n log.trace(\n 'Transforming node',\n node.diff,\n node,\n 'translate(' + (node.x - node.width / 2 - 5) + ', ' + node.width / 2 + ')'\n );\n const padding = 8;\n const diff = node.diff || 0;\n if (node.clusterNode) {\n el.attr(\n 'transform',\n 'translate(' +\n (node.x + diff - node.width / 2) +\n ', ' +\n (node.y - node.height / 2 - padding) +\n ')'\n );\n } else {\n el.attr('transform', 'translate(' + node.x + ', ' + node.y + ')');\n }\n return diff;\n};\n","import { updateNodeBounds, labelHelper } from './util';\nimport { log } from '../../logger'; // eslint-disable-line\nimport intersect from '../intersect/index.js';\n\nconst note = (parent, node) => {\n const { shapeSvg, bbox, halfPadding } = labelHelper(parent, node, 'node ' + node.classes, true);\n\n log.info('Classes = ', node.classes);\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n rect\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', -bbox.width / 2 - halfPadding)\n .attr('y', -bbox.height / 2 - halfPadding)\n .attr('width', bbox.width + node.padding)\n .attr('height', bbox.height + node.padding);\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\nexport default note;\n","import createLabel from '../createLabel';\nimport { getConfig } from '../../config';\nimport { select } from 'd3';\nimport { evaluate } from '../../diagrams/common/common';\nexport const labelHelper = (parent, node, _classes, isNode) => {\n let classes;\n if (!_classes) {\n classes = 'node default';\n } else {\n classes = _classes;\n }\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', classes)\n .attr('id', node.domId || node.id);\n\n // Create the label and insert it after the rect\n const label = shapeSvg.insert('g').attr('class', 'label').attr('style', node.labelStyle);\n\n const text = label\n .node()\n .appendChild(createLabel(node.labelText, node.labelStyle, false, isNode));\n\n // Get the size of the label\n let bbox = text.getBBox();\n\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n\n const halfPadding = node.padding / 2;\n\n // Center the label\n label.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')');\n\n return { shapeSvg, bbox, halfPadding, label };\n};\n\nexport const updateNodeBounds = (node, element) => {\n const bbox = element.node().getBBox();\n node.width = bbox.width;\n node.height = bbox.height;\n};\n\nexport function insertPolygonShape(parent, w, h, points) {\n return parent\n .insert('polygon', ':first-child')\n .attr(\n 'points',\n points\n .map(function (d) {\n return d.x + ',' + d.y;\n })\n .join(' ')\n )\n .attr('class', 'label-container')\n .attr('transform', 'translate(' + -w / 2 + ',' + h / 2 + ')');\n}\n","import theme from './themes';\n/**\n * **Configuration methods in Mermaid version 8.6.0 have been updated, to learn more[[click here](8.6.0_docs.md)].**\n *\n * ## **What follows are config instructions for older versions**\n *\n * These are the default options which can be overridden with the initialization call like so:\n *\n * **Example 1:**\n *
\n * mermaid.initialize({\n *   flowchart:{\n *     htmlLabels: false\n *   }\n * });\n * 
\n *\n * **Example 2:**\n *
\n * <script>\n *   var config = {\n *     startOnLoad:true,\n *     flowchart:{\n *       useMaxWidth:true,\n *       htmlLabels:true,\n *       curve:'cardinal',\n *     },\n *\n *     securityLevel:'loose',\n *   };\n *   mermaid.initialize(config);\n * </script>\n * 
\n * A summary of all options and their defaults is found [here](#mermaidapi-configuration-defaults). A description of each option follows below.\n *\n * @name Configuration\n */\nconst config = {\n /**\n * theme , the CSS style sheet\n *\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | theme | Built in Themes | string | Optional | 'default', 'forest', 'dark', 'neutral', 'null'|\n *\n * **Notes:** To disable any pre-defined mermaid theme, use \"null\".\n *\n *
\n   *  \"theme\": \"forest\",\n   *  \"themeCSS\": \".node rect { fill: red; }\"\n   * 
\n */\n theme: 'default',\n themeVariables: theme['default'].getThemeVariables(),\n themeCSS: undefined,\n /* **maxTextSize** - The maximum allowed size of the users text diamgram */\n maxTextSize: 50000,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | fontFamily | specifies the font to be used in the rendered diagrams| string | Required | Any Posiable CSS FontFamily |\n *\n * **Notes:**\n * Default value: '\"trebuchet ms\", verdana, arial, sans-serif;'.\n */\n fontFamily: '\"trebuchet ms\", verdana, arial, sans-serif;',\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | logLevel |This option decides the amount of logging to be used.| string \\| number | Required | 1, 2, 3, 4, 5 |\n *\n *\n * **Notes:**\n *\n * - debug: 1\n * - info: 2\n * - warn: 3\n * - error: 4\n * - fatal: 5 (default)\n */\n logLevel: 5,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | securitylevel | Level of trust for parsed diagram|string | Required | 'strict', 'loose', 'antiscript' |\n *\n * **Notes**:\n *\n * - **strict**: (**default**) tags in text are encoded, click functionality is disabled\n * - **loose**: tags in text are allowed, click functionality is enabled\n * - **antiscript**: html tags in text are allowed, (only script element is removed), click functionality is enabled\n */\n securityLevel: 'strict',\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | startOnLoad | Dictates whether mermaind starts on Page load | boolean | Required | true, false |\n *\n * **Notes:** Default value: true\n */\n startOnLoad: true,\n\n /**\n * | Parameter | Description |Type | Required |Values|\n * | --- | --- | --- | --- | --- |\n * | arrowMarkerAbsolute | Controls whether or arrow markers in html code are absolute paths or anchors | boolean | Required | true, false |\n *\n *\n * **Notes**:\n *\n * This matters if you are using base tag settings.\n *\n * Default value: false\n */\n arrowMarkerAbsolute: false,\n\n /**\n * This option controls which currentConfig keys are considered _secure_ and can only be changed via\n * call to mermaidAPI.initialize. Calls to mermaidAPI.reinitialize cannot make changes to\n * the `secure` keys in the current currentConfig. This prevents malicious graph directives from\n * overriding a site's default security.\n\n * **Notes**:\n *\n * Default value: ['secure', 'securityLevel', 'startOnLoad', 'maxTextSize']\n */\n secure: ['secure', 'securityLevel', 'startOnLoad', 'maxTextSize'],\n\n /**\n * This option controls if the generated ids of nodes in the SVG are generated randomly or based on a seed.\n * If set to false, the IDs are generated based on the current date and thus are not deterministic. This is the default behaviour.\n *\n * **Notes**:\n *\n * This matters if your files are checked into sourcecontrol e.g. git and should not change unless content is changed.\n *\n * Default value: false\n */\n deterministicIds: false,\n\n /**\n * This option is the optional seed for deterministic ids. if set to undefined but deterministicIds is true, a simple number iterator is used.\n * You can set this attribute to base the seed on a static string.\n */\n deterministicIDSeed: undefined,\n\n /**\n * The object containing configurations specific for flowcharts\n */\n flowchart: {\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | diagramPadding | Amount of padding around the diagram as a whole | Integer | Required | Any Positive Value |\n *\n * **Notes:**\n *\n * The amount of padding around the diagram as a whole so that embedded diagrams have margins, expressed in pixels\n *\n * Default value: 8\n */\n diagramPadding: 8,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | htmlLabels | Flag for setting whether or not a html tag should be used for rendering labels on the edges. | boolean| Required | true, false |\n *\n * **Notes:** Default value: true.\n */\n htmlLabels: true,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | nodeSpacing | Defines the spacing between nodes on the same level | Integer | Required | Any positive Number |\n *\n * **Notes:**\n *\n * Pertains to horizontal spacing for TB (top to bottom) or BT (bottom to top) graphs, and the vertical spacing for LR as well as RL graphs.**\n *\n * Default value: 50\n */\n nodeSpacing: 50,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | rankSpacing | Defines the spacing between nodes on different levels | Integer | Required | Any Positive Number |\n *\n * **Notes**:\n *\n * pertains to vertical spacing for TB (top to bottom) or BT (bottom to top), and the horizontal spacing for LR as well as RL graphs.\n *\n * Default value 50\n */\n rankSpacing: 50,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | curve | Defines how mermaid renders curves for flowcharts. | string | Required | 'basis', 'linear', 'cardinal'|\n *\n * **Notes:**\n *\n * Default Vaue: 'basis'\n */\n curve: 'basis',\n // Only used in new experimental rendering\n // represents the padding between the labels and the shape\n padding: 15,\n\n /**\n * | Parameter | Description | Type | Required | Values|\n * | --- | --- | --- | --- | --- |\n * | useMaxWidth | See notes | boolean | 4 | true, false |\n *\n * **Notes:**\n *\n * When this flag is set the height and width is set to 100% and is then scaling with the\n * available space if not the absolute space required is used.\n *\n * Default value: true\n */\n useMaxWidth: true,\n\n /**\n * | Parameter | Description | Type | Required | Values|\n * | --- | --- | --- | --- | --- |\n * | defaultRenderer | See notes | boolean | 4 | dagre-d3, dagre-wrapper |\n *\n * **Notes:**\n *\n * Decides which rendering engine that is to be used for the rendering. Legal values are:\n * * dagre-d3\n * * dagre-wrapper - wrapper for dagre implemented in mermaid\n *\n * Default value: 'dagre-d3'\n */\n defaultRenderer: 'dagre-d3',\n },\n\n /**\n * The object containing configurations specific for sequence diagrams\n */\n sequence: {\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | activationWidth | Width of the activation rect | Integer | Required | Any Positive Value |\n *\n *\n * **Notes:** Default value :10\n */\n activationWidth: 10,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | diagramMarginX | Margin to the right and left of the sequence diagram | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 50\n */\n diagramMarginX: 50,\n\n /**\n *| Parameter | Description | Type | Required | Values |\n *| --- | --- | --- | --- | --- |\n *| diagramMarginY | Margin to the over and under the sequence diagram | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 10\n */\n diagramMarginY: 10,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | actorMargin | Margin between actors | Integer | Required | Any Positive Value |\n *\n * **Notes:**\n * Default value: 50\n */\n actorMargin: 50,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | width | Width of actor boxes | Integer | Required | Any Positive Value |\n *\n * **Notes:**\n * Default value: 150\n */\n width: 150,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | height | Height of actor boxes | Integer | Required | Any Positive Value|\n *\n * **Notes:**\n * Default value: 65\n */\n height: 65,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | boxMargin | Margin around loop boxes | Integer | Required | Any Positive Value |\n *\n * **Notes:**\n * Default value: 10\n */\n boxMargin: 10,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | boxTextMargin | Margin around the text in loop/alt/opt boxes | Integer | Required | Any Positive Value |\n *\n * **Notes:**\n * Default value: 5\n */\n boxTextMargin: 5,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | noteMargin | margin around notes | Integer | Required | Any Positive Value |\n *\n * **Notes:**\n * Default value: 10\n */\n noteMargin: 10,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | messageMargin | Space between messages | Integer | Required | Any Positive Value |\n *\n * **Notes:**\n * Default value: 35\n */\n messageMargin: 35,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | messageAlign | Multiline message alignment | string | Required | 'left', 'center', 'right' |\n *\n * **Notes:**\n * Default value: 'center'\n */\n messageAlign: 'center',\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | mirrorActors | Mirror actors under diagram | boolean | Required | true, false |\n *\n * **Notes:**\n * Default value: true\n */\n mirrorActors: true,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | bottomMarginAdj | Prolongs the edge of the diagram downwards | Integer | Required | Any Positive Value |\n *\n * **Notes:**\n *\n * Depending on css styling this might need adjustment.\n *\n * Default value: 1\n */\n bottomMarginAdj: 1,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | useMaxWidth | See Notes | boolean | Required | true, false |\n *\n * **Notes:**\n * When this flag is set to true, the height and width is set to 100% and is then scaling with the\n * available space. If set to false, the absolute space required is used.\n *\n * Default value: true\n */\n useMaxWidth: true,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | rightAngles | display curve arrows as right angles | boolean | Required | true, false |\n *\n * **Notes:**\n *\n * This will display arrows that start and begin at the same node as right angles, rather than a curve\n *\n * Default value: false\n */\n rightAngles: false,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | showSequenceNumbers | This will show the node numbers | boolean | Required | true, false |\n *\n * **Notes:**\n * Default value: false\n */\n showSequenceNumbers: false,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | actorFontSize| This sets the font size of the actor's description | Integer | Require | Any Positive Value |\n *\n ***Notes:**\n ***Default value 14**..\n */\n actorFontSize: 14,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | actorFontFamily |This sets the font family of the actor's description | string | Required | Any Posiable CSS FontFamily |\n *\n * **Notes:**\n * Default value: \"'Open-Sans\", \"sans-serif\"'\n */\n actorFontFamily: '\"Open-Sans\", \"sans-serif\"',\n\n /**\n * This sets the font weight of the actor's description\n *\n * **Notes:**\n * Default value: 400.\n */\n actorFontWeight: 400,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | noteFontSize | This sets the font size of actor-attached notes | Integer | Required | Any Positive Value |\n *\n * **Notes:**\n * Default value: 14\n */\n noteFontSize: 14,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | noteFontFamily| This sets the font family of actor-attached notes. | string | Required | Any Posiable CSS FontFamily |\n *\n * **Notes:**\n * Default value: ''\"trebuchet ms\", verdana, arial, sans-serif'\n */\n noteFontFamily: '\"trebuchet ms\", verdana, arial, sans-serif',\n\n /**\n * This sets the font weight of the note's description\n *\n * **Notes:**\n * Default value: 400\n */\n noteFontWeight: 400,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | noteAlign | This sets the text alignment of actor-attached notes | string | required | 'left', 'center', 'right'|\n *\n * **Notes:**\n * Default value: 'center'\n */\n noteAlign: 'center',\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | messageFontSize | This sets the font size of actor messages | Integer | Required | Any Positive Number |\n *\n * **Notes:**\n * Default value: 16\n */\n messageFontSize: 16,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | messageFontFamily | This sets the font family of actor messages | string | Required | Any Posiable CSS FontFamily |\n *\n * **Notes:**\n * Default value: '\"trebuchet ms\", verdana, arial, sans-serif'\n */\n messageFontFamily: '\"trebuchet ms\", verdana, arial, sans-serif',\n\n /**\n * This sets the font weight of the message's description\n *\n * **Notes:**\n * Default value: 400.\n */\n messageFontWeight: 400,\n\n /**\n * This sets the auto-wrap state for the diagram\n *\n * **Notes:**\n * Default value: false.\n */\n wrap: false,\n\n /**\n * This sets the auto-wrap padding for the diagram (sides only)\n *\n * **Notes:**\n * Default value: 0.\n */\n wrapPadding: 10,\n\n /**\n * This sets the width of the loop-box (loop, alt, opt, par)\n *\n * **Notes:**\n * Default value: 50.\n */\n labelBoxWidth: 50,\n\n /**\n * This sets the height of the loop-box (loop, alt, opt, par)\n *\n * **Notes:**\n * Default value: 20.\n */\n labelBoxHeight: 20,\n\n messageFont: function () {\n return {\n fontFamily: this.messageFontFamily,\n fontSize: this.messageFontSize,\n fontWeight: this.messageFontWeight,\n };\n },\n noteFont: function () {\n return {\n fontFamily: this.noteFontFamily,\n fontSize: this.noteFontSize,\n fontWeight: this.noteFontWeight,\n };\n },\n actorFont: function () {\n return {\n fontFamily: this.actorFontFamily,\n fontSize: this.actorFontSize,\n fontWeight: this.actorFontWeight,\n };\n },\n },\n\n /**\n * The object containing configurations specific for gantt diagrams\n */\n gantt: {\n /**\n * ### titleTopMargin\n *\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | titleTopMargin | Margin top for the text over the gantt diagram | Integer | Required | Any Positive Value |\n *\n * **Notes:**\n * Default value: 25\n */\n titleTopMargin: 25,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | barHeight | The height of the bars in the graph | Integer | Required | Any Positive Value |\n *\n * **Notes:**\n * Default value: 20\n */\n barHeight: 20,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | barGap | The margin between the different activities in the gantt diagram | Integer | Optional | Any Positive Value |\n *\n * **Notes:**\n * Default value: 4\n */\n barGap: 4,\n\n /**\n * | Parameter | Description | Type | Required | Values|\n * | --- | --- | --- | --- | --- |\n * | topPadding | Margin between title and gantt diagram and between axis and gantt diagram. | Integer | Required | Any Positive Value |\n *\n * **Notes:**\n * Default value: 50\n */\n topPadding: 50,\n\n /**\n * | Parameter | Description | Type | Required | Values|\n * | --- | --- | --- | --- | --- |\n * | rightPadding | The space allocated for the section name to the right of the activities | Integer | Required | Any Positive Value |\n *\n * **Notes:**\n * Default value: 75\n */\n rightPadding: 75,\n\n /**\n * | Parameter | Description | Type | Required | Values|\n * | --- | --- | --- | --- | --- |\n * | leftPadding | The space allocated for the section name to the left of the activities | Integer | Required | Any Positive Value |\n *\n * **Notes:**\n * Default value: 75\n */\n leftPadding: 75,\n\n /**\n * | Parameter | Description | Type | Required | Values|\n * | --- | --- | --- | --- | --- |\n * | gridLineStartPadding | Vertical starting position of the grid lines | Integer | Required | Any Positive Value |\n *\n * **Notes:**\n * Default value: 35\n */\n gridLineStartPadding: 35,\n\n /**\n * | Parameter | Description | Type | Required | Values|\n * | --- | --- | --- | --- | --- |\n * | fontSize | Font size | Integer | Required | Any Positive Value |\n *\n * **Notes:**\n * Default value: 11\n */\n fontSize: 11,\n\n /**\n * | Parameter | Description | Type | Required | Values|\n * | --- | --- | --- | --- | --- |\n * | sectionFontSize | Font size for secions| Integer | Required | Any Positive Value |\n *\n * **Notes:**\n * Default value: 11\n */\n sectionFontSize: 11,\n\n /**\n * | Parameter | Description | Type | Required | Values|\n * | --- | --- | --- | --- | --- |\n * | numberSectionStyles | The number of alternating section styles | Integer | 4 | Any Positive Value |\n *\n * **Notes:**\n * Default value: 4\n */\n numberSectionStyles: 4,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | axisFormat | Datetime format of the axis | 3 | Required | Date in yy-mm-dd |\n *\n * **Notes:**\n *\n * This might need adjustment to match your locale and preferences\n *\n * Default value: '%Y-%m-%d'.\n */\n axisFormat: '%Y-%m-%d',\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | useMaxWidth | See notes | boolean | 4 | true, false |\n *\n * **Notes:**\n *\n * When this flag is set the height and width is set to 100% and is then scaling with the\n * available space if not the absolute space required is used.\n *\n * Default value: true\n */\n useMaxWidth: true,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| topAxis | See notes | Boolean | 4 | True, False |\n *\n ***Notes:** when this flag is set date labels will be added to the\ntop of the chart\n *\n ***Default value false**.\n */\n topAxis: false,\n\n useWidth: undefined,\n },\n\n /**\n * The object containing configurations specific for journey diagrams\n */\n journey: {\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | diagramMarginX | Margin to the right and left of the sequence diagram | Integer | Required | Any Positive Value |\n *\n * **Notes:**\n * Default value: 50\n */\n diagramMarginX: 50,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | diagramMarginY | Margin to the over and under the sequence diagram. | Integer | Required | Any Positive Value |\n *\n * **Notes:**\n * Default value: 10\n */\n diagramMarginY: 10,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | actorMargin | Margin between actors | Integer | Required | Any Positive Value |\n *\n * **Notes:**\n * Default value: 50\n */\n leftMargin: 150,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | width | Width of actor boxes | Integer | Required | Any Positive Value |\n *\n * **Notes:**\n * Default value: 150\n */\n width: 150,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | height | Height of actor boxes | Integer | Required | Any Positive Value |\n *\n * **Notes:**\n * Default value: 65\n */\n height: 50,\n\n /**\n *| Parameter | Description |Type | Required | Values|\n *| --- | --- | --- | --- | --- |\n *| boxMargin | Margin around loop boxes | Integer | Required | Any Positive Value |\n *\n * **Notes:**\n * Default value: 10\n */\n boxMargin: 10,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | boxTextMargin | Margin around the text in loop/alt/opt boxes | Integer | Required | Any Positive Value |\n *\n * **Notes:**\n * Default value: 5\n */\n boxTextMargin: 5,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | noteMargin | Margin around notes | Integer | Required | Any Positive Value |\n *\n * **Notes:**\n * Default value: 10\n */\n noteMargin: 10,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | messageMargin |Space between messages. | Integer | Required | Any Positive Value |\n *\n * **Notes:**\n *\n * Space between messages.\n *\n * Default value: 35\n */\n messageMargin: 35,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | messageAlign | Multiline message alignment | 3 | 4 | 'left', 'center', 'right' |\n *\n * **Notes:**\n * Default value: 'center'\n */\n messageAlign: 'center',\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | bottomMarginAdj | Prolongs the edge of the diagram downwards | Integer | 4 | Any Positive Value |\n *\n * **Notes:**\n *\n * Depending on css styling this might need adjustment.\n *\n * Default value: 1\n */\n bottomMarginAdj: 1,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | useMaxWidth | See notes | boolean | 4 | true, false |\n *\n * **Notes:**\n *\n * When this flag is set the height and width is set to 100% and is then scaling with the\n * available space if not the absolute space required is used.\n *\n * Default value: true\n */\n useMaxWidth: true,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | rightAngles | Curved Arrows become Right Angles | 3 | 4 | true, false |\n *\n * **Notes:**\n *\n * This will display arrows that start and begin at the same node as right angles, rather than a curves\n *\n * Default value: false\n */\n rightAngles: false,\n taskFontSize: 14,\n taskFontFamily: '\"Open-Sans\", \"sans-serif\"',\n taskMargin: 50,\n // width of activation box\n activationWidth: 10,\n\n // text placement as: tspan | fo | old only text as before\n textPlacement: 'fo',\n actorColours: ['#8FBC8F', '#7CFC00', '#00FFFF', '#20B2AA', '#B0E0E6', '#FFFFE0'],\n\n sectionFills: ['#191970', '#8B008B', '#4B0082', '#2F4F4F', '#800000', '#8B4513', '#00008B'],\n sectionColours: ['#fff'],\n },\n class: {\n arrowMarkerAbsolute: false,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | useMaxWidth | See notes | boolean | 4 | true, false |\n *\n * **Notes:**\n *\n * When this flag is set the height and width is set to 100% and is then scaling with the\n * available space if not the absolute space required is used.\n *\n * Default value: true\n */\n useMaxWidth: true,\n /**\n * | Parameter | Description | Type | Required | Values|\n * | --- | --- | --- | --- | --- |\n * | defaultRenderer | See notes | boolean | 4 | dagre-d3, dagre-wrapper |\n *\n * **Notes:**\n *\n * Decides which rendering engine that is to be used for the rendering. Legal values are:\n * * dagre-d3\n * * dagre-wrapper - wrapper for dagre implemented in mermaid\n *\n * Default value: 'dagre-d3'\n */\n defaultRenderer: 'dagre-d3',\n },\n git: {\n arrowMarkerAbsolute: false,\n\n useWidth: undefined,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | useMaxWidth | See notes | boolean | 4 | true, false |\n *\n * **Notes:**\n *\n * When this flag is set the height and width is set to 100% and is then scaling with the\n * available space if not the absolute space required is used.\n *\n * Default value: true\n */\n useMaxWidth: true,\n },\n state: {\n dividerMargin: 10,\n sizeUnit: 5,\n padding: 8,\n textHeight: 10,\n titleShift: -15,\n noteMargin: 10,\n forkWidth: 70,\n forkHeight: 7,\n // Used\n miniPadding: 2,\n // Font size factor, this is used to guess the width of the edges labels before rendering by dagre\n // layout. This might need updating if/when switching font\n fontSizeFactor: 5.02,\n fontSize: 24,\n labelHeight: 16,\n edgeLengthFactor: '20',\n compositTitleSize: 35,\n radius: 5,\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | useMaxWidth | See notes | boolean | 4 | true, false |\n *\n * **Notes:**\n *\n * When this flag is set the height and width is set to 100% and is then scaling with the\n * available space if not the absolute space required is used.\n *\n * Default value: true\n */\n useMaxWidth: true,\n /**\n * | Parameter | Description | Type | Required | Values|\n * | --- | --- | --- | --- | --- |\n * | defaultRenderer | See notes | boolean | 4 | dagre-d3, dagre-wrapper |\n *\n * **Notes:**\n *\n * Decides which rendering engine that is to be used for the rendering. Legal values are:\n * * dagre-d3\n * * dagre-wrapper - wrapper for dagre implemented in mermaid\n *\n * Default value: 'dagre-d3'\n */\n defaultRenderer: 'dagre-wrapper',\n },\n\n /**\n * The object containing configurations specific for entity relationship diagrams\n */\n er: {\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | diagramPadding | Amount of padding around the diagram as a whole | Integer | Required | Any Positive Value |\n *\n * **Notes:**\n *\n * The amount of padding around the diagram as a whole so that embedded diagrams have margins, expressed in pixels\n *\n * Default value: 20\n */\n diagramPadding: 20,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | layoutDirection | Directional bias for layout of entities. | string | Required | \"TB\", \"BT\", \"LR\", \"RL\" |\n *\n * **Notes:**\n *\n * 'TB' for Top-Bottom, 'BT'for Bottom-Top, 'LR' for Left-Right, or 'RL' for Right to Left.\n *\n * T = top, B = bottom, L = left, and R = right.\n *\n * Default value: 'TB'\n */\n layoutDirection: 'TB',\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | minEntityWidth | The mimimum width of an entity box | Integer | Required | Any Positive Value |\n *\n * **Notes:**\n * Expressed in pixels.\n * Default value: 100\n */\n minEntityWidth: 100,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | minEntityHeight| The minimum height of an entity box | Integer | 4 | Any Positive Value |\n *\n * **Notes:**\n * Expressed in pixels\n * Default value: 75\n */\n minEntityHeight: 75,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | entityPadding | Minimum internal padding betweentext in box and box borders | Integer | 4 | Any Positive Value |\n *\n * **Notes:**\n *\n * The minimum internal padding betweentext in an entity box and the enclosing box borders, expressed in pixels.\n *\n * Default value: 15\n */\n entityPadding: 15,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | stroke | Stroke color of box edges and lines | string | 4 | Any recognized color |\n *\n * **Notes:**\n * Default value: 'gray'\n */\n stroke: 'gray',\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | fill | Fill color of entity boxes | string | 4 | Any recognized color |\n *\n * **Notes:**\n * Default value: 'honeydew'\n */\n fill: 'honeydew',\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | fontSize | Font Size in pixels | Integer | | Any Positive Value |\n *\n * **Notes:**\n *\n * Font size (expressed as an integer representing a number of pixels)\n * Default value: 12\n */\n fontSize: 12,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | useMaxWidth | See Notes | boolean | Required | true, false |\n *\n * **Notes:**\n *\n * When this flag is set to true, the diagram width is locked to 100% and\n * scaled based on available space. If set to false, the diagram reserves its\n * absolute width.\n *\n * Default value: true\n */\n useMaxWidth: true,\n },\n\n /**\n * The object containing configurations specific for pie diagrams\n */\n pie: {\n useWidth: undefined,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | useMaxWidth | See Notes | boolean | Required | true, false |\n *\n * **Notes:**\n *\n * When this flag is set to true, the diagram width is locked to 100% and\n * scaled based on available space. If set to false, the diagram reserves its\n * absolute width.\n *\n * Default value: true\n */\n useMaxWidth: true,\n },\n\n /**\n * The object containing configurations specific for req diagrams\n */\n requirement: {\n useWidth: undefined,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --- | --- | --- | --- | --- |\n * | useMaxWidth | See Notes | boolean | Required | true, false |\n *\n * **Notes:**\n *\n * When this flag is set to true, the diagram width is locked to 100% and\n * scaled based on available space. If set to false, the diagram reserves its\n * absolute width.\n *\n * Default value: true\n */\n useMaxWidth: true,\n\n rect_fill: '#f9f9f9',\n text_color: '#333',\n rect_border_size: '0.5px',\n rect_border_color: '#bbb',\n rect_min_width: 200,\n rect_min_height: 200,\n fontSize: 14,\n rect_padding: 10,\n line_height: 20,\n },\n};\n\nconfig.class.arrowMarkerAbsolute = config.arrowMarkerAbsolute;\nconfig.git.arrowMarkerAbsolute = config.arrowMarkerAbsolute;\n\nconst keyify = (obj, prefix = '') =>\n Object.keys(obj).reduce((res, el) => {\n if (Array.isArray(obj[el])) {\n return res;\n } else if (typeof obj[el] === 'object' && obj[el] !== null) {\n return [...res, prefix + el, ...keyify(obj[el], '')];\n }\n return [...res, prefix + el];\n }, []);\n\nexport const configKeys = keyify(config, '');\nexport default config;\n","import { select } from 'd3';\nimport { log } from '../../logger';\nimport * as configApi from '../../config';\nimport common from '../common/common';\nimport utils from '../../utils';\nimport mermaidAPI from '../../mermaidAPI';\n\nconst MERMAID_DOM_ID_PREFIX = 'classid-';\n\nlet relations = [];\nlet classes = {};\nlet classCounter = 0;\n\nlet funs = [];\n\nexport const parseDirective = function (statement, context, type) {\n mermaidAPI.parseDirective(this, statement, context, type);\n};\n\nconst splitClassNameAndType = function (id) {\n let genericType = '';\n let className = id;\n\n if (id.indexOf('~') > 0) {\n let split = id.split('~');\n className = split[0];\n\n genericType = split[1];\n }\n\n return { className: className, type: genericType };\n};\n\n/**\n * Function called by parser when a node definition has been found.\n * @param id\n * @public\n */\nexport const addClass = function (id) {\n let classId = splitClassNameAndType(id);\n // Only add class if not exists\n if (typeof classes[classId.className] !== 'undefined') return;\n\n classes[classId.className] = {\n id: classId.className,\n type: classId.type,\n cssClasses: [],\n methods: [],\n members: [],\n annotations: [],\n domId: MERMAID_DOM_ID_PREFIX + classId.className + '-' + classCounter,\n };\n\n classCounter++;\n};\n\n/**\n * Function to lookup domId from id in the graph definition.\n * @param id\n * @public\n */\nexport const lookUpDomId = function (id) {\n const classKeys = Object.keys(classes);\n for (let i = 0; i < classKeys.length; i++) {\n if (classes[classKeys[i]].id === id) {\n return classes[classKeys[i]].domId;\n }\n }\n};\n\nexport const clear = function () {\n relations = [];\n classes = {};\n funs = [];\n funs.push(setupToolTips);\n};\n\nexport const getClass = function (id) {\n return classes[id];\n};\nexport const getClasses = function () {\n return classes;\n};\n\nexport const getRelations = function () {\n return relations;\n};\n\nexport const addRelation = function (relation) {\n log.debug('Adding relation: ' + JSON.stringify(relation));\n addClass(relation.id1);\n addClass(relation.id2);\n\n relation.id1 = splitClassNameAndType(relation.id1).className;\n relation.id2 = splitClassNameAndType(relation.id2).className;\n\n relations.push(relation);\n};\n\n/**\n * Adds an annotation to the specified class\n * Annotations mark special properties of the given type (like 'interface' or 'service')\n * @param className The class name\n * @param annotation The name of the annotation without any brackets\n * @public\n */\nexport const addAnnotation = function (className, annotation) {\n const validatedClassName = splitClassNameAndType(className).className;\n classes[validatedClassName].annotations.push(annotation);\n};\n\n/**\n * Adds a member to the specified class\n * @param className The class name\n * @param member The full name of the member.\n * If the member is enclosed in <> it is treated as an annotation\n * If the member is ending with a closing bracket ) it is treated as a method\n * Otherwise the member will be treated as a normal property\n * @public\n */\nexport const addMember = function (className, member) {\n const validatedClassName = splitClassNameAndType(className).className;\n const theClass = classes[validatedClassName];\n\n if (typeof member === 'string') {\n // Member can contain white spaces, we trim them out\n const memberString = member.trim();\n\n if (memberString.startsWith('<<') && memberString.endsWith('>>')) {\n // Remove leading and trailing brackets\n theClass.annotations.push(memberString.substring(2, memberString.length - 2));\n } else if (memberString.indexOf(')') > 0) {\n theClass.methods.push(memberString);\n } else if (memberString) {\n theClass.members.push(memberString);\n }\n }\n};\n\nexport const addMembers = function (className, members) {\n if (Array.isArray(members)) {\n members.reverse();\n members.forEach((member) => addMember(className, member));\n }\n};\n\nexport const cleanupLabel = function (label) {\n if (label.substring(0, 1) === ':') {\n return label.substr(1).trim();\n } else {\n return label.trim();\n }\n};\n\n/**\n * Called by parser when a special node is found, e.g. a clickable element.\n * @param ids Comma separated list of ids\n * @param className Class to add\n */\nexport const setCssClass = function (ids, className) {\n ids.split(',').forEach(function (_id) {\n let id = _id;\n if (_id[0].match(/\\d/)) id = MERMAID_DOM_ID_PREFIX + id;\n if (typeof classes[id] !== 'undefined') {\n classes[id].cssClasses.push(className);\n }\n });\n};\n\n/**\n * Called by parser when a tooltip is found, e.g. a clickable element.\n * @param ids Comma separated list of ids\n * @param tooltip Tooltip to add\n */\nconst setTooltip = function (ids, tooltip) {\n const config = configApi.getConfig();\n ids.split(',').forEach(function (id) {\n if (typeof tooltip !== 'undefined') {\n classes[id].tooltip = common.sanitizeText(tooltip, config);\n }\n });\n};\n\n/**\n * Called by parser when a link is found. Adds the URL to the vertex data.\n * @param ids Comma separated list of ids\n * @param linkStr URL to create a link for\n * @param target Target of the link, _blank by default as originally defined in the svgDraw.js file\n */\nexport const setLink = function (ids, linkStr, target) {\n const config = configApi.getConfig();\n ids.split(',').forEach(function (_id) {\n let id = _id;\n if (_id[0].match(/\\d/)) id = MERMAID_DOM_ID_PREFIX + id;\n if (typeof classes[id] !== 'undefined') {\n classes[id].link = utils.formatUrl(linkStr, config);\n if (typeof target === 'string') {\n classes[id].linkTarget = target;\n } else {\n classes[id].linkTarget = '_blank';\n }\n }\n });\n setCssClass(ids, 'clickable');\n};\n\n/**\n * Called by parser when a click definition is found. Registers an event handler.\n * @param ids Comma separated list of ids\n * @param functionName Function to be called on click\n * @param functionArgs Function args the function should be called with\n */\nexport const setClickEvent = function (ids, functionName, functionArgs) {\n ids.split(',').forEach(function (id) {\n setClickFunc(id, functionName, functionArgs);\n classes[id].haveCallback = true;\n });\n setCssClass(ids, 'clickable');\n};\n\nconst setClickFunc = function (domId, functionName, functionArgs) {\n const config = configApi.getConfig();\n let id = domId;\n let elemId = lookUpDomId(id);\n\n if (config.securityLevel !== 'loose') {\n return;\n }\n if (typeof functionName === 'undefined') {\n return;\n }\n if (typeof classes[id] !== 'undefined') {\n let argList = [];\n if (typeof functionArgs === 'string') {\n /* Splits functionArgs by ',', ignoring all ',' in double quoted strings */\n argList = functionArgs.split(/,(?=(?:(?:[^\"]*\"){2})*[^\"]*$)/);\n for (let i = 0; i < argList.length; i++) {\n let item = argList[i].trim();\n /* Removes all double quotes at the start and end of an argument */\n /* This preserves all starting and ending whitespace inside */\n if (item.charAt(0) === '\"' && item.charAt(item.length - 1) === '\"') {\n item = item.substr(1, item.length - 2);\n }\n argList[i] = item;\n }\n }\n\n /* if no arguments passed into callback, default to passing in id */\n if (argList.length === 0) {\n argList.push(elemId);\n }\n\n funs.push(function () {\n const elem = document.querySelector(`[id=\"${elemId}\"]`);\n if (elem !== null) {\n elem.addEventListener(\n 'click',\n function () {\n utils.runFunc(functionName, ...argList);\n },\n false\n );\n }\n });\n }\n};\n\nexport const bindFunctions = function (element) {\n funs.forEach(function (fun) {\n fun(element);\n });\n};\n\nexport const lineType = {\n LINE: 0,\n DOTTED_LINE: 1,\n};\n\nexport const relationType = {\n AGGREGATION: 0,\n EXTENSION: 1,\n COMPOSITION: 2,\n DEPENDENCY: 3,\n};\n\nconst setupToolTips = function (element) {\n let tooltipElem = select('.mermaidTooltip');\n if ((tooltipElem._groups || tooltipElem)[0][0] === null) {\n tooltipElem = select('body').append('div').attr('class', 'mermaidTooltip').style('opacity', 0);\n }\n\n const svg = select(element).select('svg');\n\n const nodes = svg.selectAll('g.node');\n nodes\n .on('mouseover', function () {\n const el = select(this);\n const title = el.attr('title');\n // Dont try to draw a tooltip if no data is provided\n if (title === null) {\n return;\n }\n const rect = this.getBoundingClientRect();\n\n tooltipElem.transition().duration(200).style('opacity', '.9');\n tooltipElem\n .html(el.attr('title'))\n .style('left', window.scrollX + rect.left + (rect.right - rect.left) / 2 + 'px')\n .style('top', window.scrollY + rect.top - 14 + document.body.scrollTop + 'px');\n el.classed('hover', true);\n })\n .on('mouseout', function () {\n tooltipElem.transition().duration(500).style('opacity', 0);\n const el = select(this);\n el.classed('hover', false);\n });\n};\nfuns.push(setupToolTips);\n\nexport default {\n parseDirective,\n getConfig: () => configApi.getConfig().class,\n addClass,\n bindFunctions,\n clear,\n getClass,\n getClasses,\n addAnnotation,\n getRelations,\n addRelation,\n addMember,\n addMembers,\n cleanupLabel,\n lineType,\n relationType,\n setClickEvent,\n setCssClass,\n setLink,\n setTooltip,\n lookUpDomId,\n};\n","import { select } from 'd3';\nimport dagre from 'dagre';\nimport graphlib from 'graphlib';\nimport { log } from '../../logger';\nimport classDb, { lookUpDomId } from './classDb';\nimport { parser } from './parser/classDiagram';\nimport svgDraw from './svgDraw';\nimport { getConfig } from '../../config';\nimport { render } from '../../dagre-wrapper/index.js';\n// import addHtmlLabel from 'dagre-d3/lib/label/add-html-label.js';\nimport { curveLinear } from 'd3';\nimport { interpolateToCurve, getStylesFromArray, configureSvgSize } from '../../utils';\nimport common from '../common/common';\n\nparser.yy = classDb;\n\nlet idCache = {};\nconst padding = 20;\n\nconst conf = {\n dividerMargin: 10,\n padding: 5,\n textHeight: 10,\n};\n\n/**\n * Function that adds the vertices found during parsing to the graph to be rendered.\n * @param vert Object containing the vertices.\n * @param g The graph that is to be drawn.\n */\nexport const addClasses = function (classes, g) {\n // const svg = select(`[id=\"${svgId}\"]`);\n const keys = Object.keys(classes);\n log.info('keys:', keys);\n log.info(classes);\n\n // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition\n keys.forEach(function (id) {\n const vertex = classes[id];\n\n /**\n * Variable for storing the classes for the vertex\n * @type {string}\n */\n let cssClassStr = '';\n if (vertex.cssClasses.length > 0) {\n cssClassStr = cssClassStr + ' ' + vertex.cssClasses.join(' ');\n }\n // if (vertex.classes.length > 0) {\n // classStr = vertex.classes.join(' ');\n // }\n\n const styles = { labelStyle: '' }; //getStylesFromArray(vertex.styles);\n\n // Use vertex id as text in the box if no text is provided by the graph definition\n let vertexText = vertex.text !== undefined ? vertex.text : vertex.id;\n\n // We create a SVG label, either by delegating to addHtmlLabel or manually\n // let vertexNode;\n // if (evaluate(getConfig().flowchart.htmlLabels)) {\n // const node = {\n // label: vertexText.replace(\n // /fa[lrsb]?:fa-[\\w-]+/g,\n // s => ``\n // )\n // };\n // vertexNode = addHtmlLabel(svg, node).node();\n // vertexNode.parentNode.removeChild(vertexNode);\n // } else {\n // const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n // svgLabel.setAttribute('style', styles.labelStyle.replace('color:', 'fill:'));\n\n // const rows = vertexText.split(common.lineBreakRegex);\n\n // for (let j = 0; j < rows.length; j++) {\n // const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n // tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n // tspan.setAttribute('dy', '1em');\n // tspan.setAttribute('x', '1');\n // tspan.textContent = rows[j];\n // svgLabel.appendChild(tspan);\n // }\n // vertexNode = svgLabel;\n // }\n\n let radious = 0;\n let _shape = '';\n // Set the shape based parameters\n switch (vertex.type) {\n case 'class':\n _shape = 'class_box';\n break;\n default:\n _shape = 'class_box';\n }\n // Add the node\n g.setNode(vertex.id, {\n labelStyle: styles.labelStyle,\n shape: _shape,\n labelText: vertexText,\n classData: vertex,\n rx: radious,\n ry: radious,\n class: cssClassStr,\n style: styles.style,\n id: vertex.id,\n domId: vertex.domId,\n haveCallback: vertex.haveCallback,\n link: vertex.link,\n width: vertex.type === 'group' ? 500 : undefined,\n type: vertex.type,\n padding: getConfig().flowchart.padding,\n });\n\n log.info('setNode', {\n labelStyle: styles.labelStyle,\n shape: _shape,\n labelText: vertexText,\n rx: radious,\n ry: radious,\n class: cssClassStr,\n style: styles.style,\n id: vertex.id,\n width: vertex.type === 'group' ? 500 : undefined,\n type: vertex.type,\n padding: getConfig().flowchart.padding,\n });\n });\n};\n\n/**\n * Add edges to graph based on parsed graph defninition\n * @param {Object} edges The edges to add to the graph\n * @param {Object} g The graph object\n */\nexport const addRelations = function (relations, g) {\n let cnt = 0;\n\n let defaultStyle;\n let defaultLabelStyle;\n\n // if (typeof relations.defaultStyle !== 'undefined') {\n // const defaultStyles = getStylesFromArray(relations.defaultStyle);\n // defaultStyle = defaultStyles.style;\n // defaultLabelStyle = defaultStyles.labelStyle;\n // }\n\n relations.forEach(function (edge) {\n cnt++;\n const edgeData = {};\n //Set relationship style and line type\n edgeData.classes = 'relation';\n edgeData.pattern = edge.relation.lineType == 1 ? 'dashed' : 'solid';\n\n edgeData.id = 'id' + cnt;\n // Set link type for rendering\n if (edge.type === 'arrow_open') {\n edgeData.arrowhead = 'none';\n } else {\n edgeData.arrowhead = 'normal';\n }\n\n log.info(edgeData, edge);\n //Set edge extra labels\n //edgeData.startLabelLeft = edge.relationTitle1;\n edgeData.startLabelRight = edge.relationTitle1 === 'none' ? '' : edge.relationTitle1;\n edgeData.endLabelLeft = edge.relationTitle2 === 'none' ? '' : edge.relationTitle2;\n //edgeData.endLabelRight = edge.relationTitle2;\n\n //Set relation arrow types\n edgeData.arrowTypeStart = getArrowMarker(edge.relation.type1);\n edgeData.arrowTypeEnd = getArrowMarker(edge.relation.type2);\n let style = '';\n let labelStyle = '';\n\n if (typeof edge.style !== 'undefined') {\n const styles = getStylesFromArray(edge.style);\n style = styles.style;\n labelStyle = styles.labelStyle;\n } else {\n style = 'fill:none';\n if (typeof defaultStyle !== 'undefined') {\n style = defaultStyle;\n }\n if (typeof defaultLabelStyle !== 'undefined') {\n labelStyle = defaultLabelStyle;\n }\n }\n\n edgeData.style = style;\n edgeData.labelStyle = labelStyle;\n\n if (typeof edge.interpolate !== 'undefined') {\n edgeData.curve = interpolateToCurve(edge.interpolate, curveLinear);\n } else if (typeof relations.defaultInterpolate !== 'undefined') {\n edgeData.curve = interpolateToCurve(relations.defaultInterpolate, curveLinear);\n } else {\n edgeData.curve = interpolateToCurve(conf.curve, curveLinear);\n }\n\n edge.text = edge.title;\n if (typeof edge.text === 'undefined') {\n if (typeof edge.style !== 'undefined') {\n edgeData.arrowheadStyle = 'fill: #333';\n }\n } else {\n edgeData.arrowheadStyle = 'fill: #333';\n edgeData.labelpos = 'c';\n\n if (getConfig().flowchart.htmlLabels) { // eslint-disable-line\n edgeData.labelType = 'html';\n edgeData.label = '' + edge.text + '';\n } else {\n edgeData.labelType = 'text';\n edgeData.label = edge.text.replace(common.lineBreakRegex, '\\n');\n\n if (typeof edge.style === 'undefined') {\n edgeData.style = edgeData.style || 'stroke: #333; stroke-width: 1.5px;fill:none';\n }\n\n edgeData.labelStyle = edgeData.labelStyle.replace('color:', 'fill:');\n }\n }\n // Add the edge to the graph\n g.setEdge(edge.id1, edge.id2, edgeData, cnt);\n });\n};\n\n// Todo optimize\nconst getGraphId = function (label) {\n const keys = Object.keys(idCache);\n\n for (let i = 0; i < keys.length; i++) {\n if (idCache[keys[i]].label === label) {\n return keys[i];\n }\n }\n\n return undefined;\n};\n\nexport const setConf = function (cnf) {\n const keys = Object.keys(cnf);\n\n keys.forEach(function (key) {\n conf[key] = cnf[key];\n });\n};\n\n/**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n * @param text\n * @param id\n */\nexport const drawOld = function (text, id) {\n idCache = {};\n parser.yy.clear();\n parser.parse(text);\n\n log.info('Rendering diagram ' + text);\n\n // Fetch the default direction, use TD if none was found\n const diagram = select(`[id='${id}']`);\n // insertMarkers(diagram);\n\n // Layout graph, Create a new directed graph\n const g = new graphlib.Graph({\n multigraph: true,\n });\n\n // Set an object for the graph label\n g.setGraph({\n isMultiGraph: true,\n });\n\n // Default to assigning a new object as a label for each new edge.\n g.setDefaultEdgeLabel(function () {\n return {};\n });\n\n const classes = classDb.getClasses();\n log.info('classes:');\n log.info(classes);\n const keys = Object.keys(classes);\n for (let i = 0; i < keys.length; i++) {\n const classDef = classes[keys[i]];\n const node = svgDraw.drawClass(diagram, classDef, conf);\n idCache[node.id] = node;\n\n // Add nodes to the graph. The first argument is the node id. The second is\n // metadata about the node. In this case we're going to add labels to each of\n // our nodes.\n g.setNode(node.id, node);\n\n log.info('Org height: ' + node.height);\n }\n\n const relations = classDb.getRelations();\n log.info('relations:', relations);\n relations.forEach(function (relation) {\n log.info(\n 'tjoho' + getGraphId(relation.id1) + getGraphId(relation.id2) + JSON.stringify(relation)\n );\n g.setEdge(\n getGraphId(relation.id1),\n getGraphId(relation.id2),\n {\n relation: relation,\n },\n relation.title || 'DEFAULT'\n );\n });\n\n dagre.layout(g);\n g.nodes().forEach(function (v) {\n if (typeof v !== 'undefined' && typeof g.node(v) !== 'undefined') {\n log.debug('Node ' + v + ': ' + JSON.stringify(g.node(v)));\n select('#' + lookUpDomId(v)).attr(\n 'transform',\n 'translate(' +\n (g.node(v).x - g.node(v).width / 2) +\n ',' +\n (g.node(v).y - g.node(v).height / 2) +\n ' )'\n );\n }\n });\n\n g.edges().forEach(function (e) {\n if (typeof e !== 'undefined' && typeof g.edge(e) !== 'undefined') {\n log.debug('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(g.edge(e)));\n svgDraw.drawEdge(diagram, g.edge(e), g.edge(e).relation, conf);\n }\n });\n\n const svgBounds = diagram.node().getBBox();\n const width = svgBounds.width + padding * 2;\n const height = svgBounds.height + padding * 2;\n\n configureSvgSize(diagram, height, width, conf.useMaxWidth);\n\n // Ensure the viewBox includes the whole svgBounds area with extra space for padding\n const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`;\n log.debug(`viewBox ${vBox}`);\n diagram.attr('viewBox', vBox);\n};\n\nexport const draw = function (text, id) {\n log.info('Drawing class');\n classDb.clear();\n // const parser = classDb.parser;\n // parser.yy = classDb;\n\n // Parse the graph definition\n // try {\n parser.parse(text);\n // } catch (err) {\n // log.debug('Parsing failed');\n // }\n\n // Fetch the default direction, use TD if none was found\n let dir = 'TD';\n\n const conf = getConfig().flowchart;\n log.info('config:', conf);\n const nodeSpacing = conf.nodeSpacing || 50;\n const rankSpacing = conf.rankSpacing || 50;\n\n // Create the input mermaid.graph\n const g = new graphlib.Graph({\n multigraph: true,\n compound: true,\n })\n .setGraph({\n rankdir: dir,\n nodesep: nodeSpacing,\n ranksep: rankSpacing,\n marginx: 8,\n marginy: 8,\n })\n .setDefaultEdgeLabel(function () {\n return {};\n });\n\n // let subG;\n // const subGraphs = flowDb.getSubGraphs();\n // log.info('Subgraphs - ', subGraphs);\n // for (let i = subGraphs.length - 1; i >= 0; i--) {\n // subG = subGraphs[i];\n // log.info('Subgraph - ', subG);\n // flowDb.addVertex(subG.id, subG.title, 'group', undefined, subG.classes);\n // }\n\n // Fetch the verices/nodes and edges/links from the parsed graph definition\n const classes = classDb.getClasses();\n const relations = classDb.getRelations();\n\n log.info(relations);\n // let i = 0;\n // for (i = subGraphs.length - 1; i >= 0; i--) {\n // subG = subGraphs[i];\n\n // selectAll('cluster').append('text');\n\n // for (let j = 0; j < subG.nodes.length; j++) {\n // g.setParent(subG.nodes[j], subG.id);\n // }\n // }\n addClasses(classes, g, id);\n addRelations(relations, g);\n\n // Add custom shapes\n // flowChartShapes.addToRenderV2(addShape);\n\n // Set up an SVG group so that we can translate the final graph.\n const svg = select(`[id=\"${id}\"]`);\n svg.attr('xmlns:xlink', 'http://www.w3.org/1999/xlink');\n\n // Run the renderer. This is what draws the final graph.\n const element = select('#' + id + ' g');\n render(element, g, ['aggregation', 'extension', 'composition', 'dependency'], 'classDiagram', id);\n\n // element.selectAll('g.node').attr('title', function() {\n // return flowDb.getTooltip(this.id);\n // });\n\n const padding = 8;\n const svgBounds = svg.node().getBBox();\n const width = svgBounds.width + padding * 2;\n const height = svgBounds.height + padding * 2;\n log.debug(\n `new ViewBox 0 0 ${width} ${height}`,\n `translate(${padding - g._label.marginx}, ${padding - g._label.marginy})`\n );\n\n configureSvgSize(svg, height, width, conf.useMaxWidth);\n\n svg.attr('viewBox', `0 0 ${width} ${height}`);\n svg\n .select('g')\n .attr('transform', `translate(${padding - g._label.marginx}, ${padding - svgBounds.y})`);\n\n // Index nodes\n // flowDb.indexNodes('subGraph' + i);\n\n // Add label rects for non html labels\n if (!conf.htmlLabels) {\n const labels = document.querySelectorAll('[id=\"' + id + '\"] .edgeLabel .label');\n for (let k = 0; k < labels.length; k++) {\n const label = labels[k];\n\n // Get dimensions of label\n const dim = label.getBBox();\n\n const rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');\n rect.setAttribute('rx', 0);\n rect.setAttribute('ry', 0);\n rect.setAttribute('width', dim.width);\n rect.setAttribute('height', dim.height);\n rect.setAttribute('style', 'fill:#e8e8e8;');\n\n label.insertBefore(rect, label.firstChild);\n }\n }\n\n // If node has a link, wrap it in an anchor SVG object.\n // const keys = Object.keys(classes);\n // keys.forEach(function(key) {\n // const vertex = classes[key];\n\n // if (vertex.link) {\n // const node = select('#' + id + ' [id=\"' + key + '\"]');\n // if (node) {\n // const link = document.createElementNS('http://www.w3.org/2000/svg', 'a');\n // link.setAttributeNS('http://www.w3.org/2000/svg', 'class', vertex.classes.join(' '));\n // link.setAttributeNS('http://www.w3.org/2000/svg', 'href', vertex.link);\n // link.setAttributeNS('http://www.w3.org/2000/svg', 'rel', 'noopener');\n\n // const linkNode = node.insert(function() {\n // return link;\n // }, ':first-child');\n\n // const shape = node.select('.label-container');\n // if (shape) {\n // linkNode.append(function() {\n // return shape.node();\n // });\n // }\n\n // const label = node.select('.label');\n // if (label) {\n // linkNode.append(function() {\n // return label.node();\n // });\n // }\n // }\n // }\n // });\n};\n\nexport default {\n setConf,\n draw,\n};\nfunction getArrowMarker(type) {\n let marker;\n switch (type) {\n case 0:\n marker = 'aggregation';\n break;\n case 1:\n marker = 'extension';\n break;\n case 2:\n marker = 'composition';\n break;\n case 3:\n marker = 'dependency';\n break;\n default:\n marker = 'none';\n }\n return marker;\n}\n","import { select } from 'd3';\nimport dagre from 'dagre';\nimport graphlib from 'graphlib';\nimport { log } from '../../logger';\nimport classDb, { lookUpDomId } from './classDb';\nimport { parser } from './parser/classDiagram';\nimport svgDraw from './svgDraw';\nimport { configureSvgSize } from '../../utils';\n\nparser.yy = classDb;\n\nlet idCache = {};\nconst padding = 20;\n\nconst conf = {\n dividerMargin: 10,\n padding: 5,\n textHeight: 10,\n};\n\n// Todo optimize\nconst getGraphId = function (label) {\n const keys = Object.keys(idCache);\n\n for (let i = 0; i < keys.length; i++) {\n if (idCache[keys[i]].label === label) {\n return keys[i];\n }\n }\n\n return undefined;\n};\n\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n */\nconst insertMarkers = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'extensionStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 1,7 L18,13 V 1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'extensionEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 1,1 V 13 L18,7 Z'); // this is actual shape for arrowhead\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'compositionStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'compositionEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'aggregationStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'aggregationEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'dependencyStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 5,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'dependencyEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z');\n};\n\nexport const setConf = function (cnf) {\n const keys = Object.keys(cnf);\n\n keys.forEach(function (key) {\n conf[key] = cnf[key];\n });\n};\n\n/**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n * @param text\n * @param id\n */\nexport const draw = function (text, id) {\n idCache = {};\n parser.yy.clear();\n parser.parse(text);\n\n log.info('Rendering diagram ' + text);\n\n // Fetch the default direction, use TD if none was found\n const diagram = select(`[id='${id}']`);\n diagram.attr('xmlns:xlink', 'http://www.w3.org/1999/xlink');\n insertMarkers(diagram);\n\n // Layout graph, Create a new directed graph\n const g = new graphlib.Graph({\n multigraph: true,\n });\n\n // Set an object for the graph label\n g.setGraph({\n isMultiGraph: true,\n });\n\n // Default to assigning a new object as a label for each new edge.\n g.setDefaultEdgeLabel(function () {\n return {};\n });\n\n const classes = classDb.getClasses();\n const keys = Object.keys(classes);\n\n for (let i = 0; i < keys.length; i++) {\n const classDef = classes[keys[i]];\n const node = svgDraw.drawClass(diagram, classDef, conf);\n idCache[node.id] = node;\n\n // Add nodes to the graph. The first argument is the node id. The second is\n // metadata about the node. In this case we're going to add labels to each of\n // our nodes.\n g.setNode(node.id, node);\n\n log.info('Org height: ' + node.height);\n }\n\n const relations = classDb.getRelations();\n relations.forEach(function (relation) {\n log.info(\n 'tjoho' + getGraphId(relation.id1) + getGraphId(relation.id2) + JSON.stringify(relation)\n );\n g.setEdge(\n getGraphId(relation.id1),\n getGraphId(relation.id2),\n {\n relation: relation,\n },\n relation.title || 'DEFAULT'\n );\n });\n\n dagre.layout(g);\n g.nodes().forEach(function (v) {\n if (typeof v !== 'undefined' && typeof g.node(v) !== 'undefined') {\n log.debug('Node ' + v + ': ' + JSON.stringify(g.node(v)));\n select('#' + lookUpDomId(v)).attr(\n 'transform',\n 'translate(' +\n (g.node(v).x - g.node(v).width / 2) +\n ',' +\n (g.node(v).y - g.node(v).height / 2) +\n ' )'\n );\n }\n });\n\n g.edges().forEach(function (e) {\n if (typeof e !== 'undefined' && typeof g.edge(e) !== 'undefined') {\n log.debug('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(g.edge(e)));\n svgDraw.drawEdge(diagram, g.edge(e), g.edge(e).relation, conf);\n }\n });\n\n const svgBounds = diagram.node().getBBox();\n const width = svgBounds.width + padding * 2;\n const height = svgBounds.height + padding * 2;\n\n configureSvgSize(diagram, height, width, conf.useMaxWidth);\n\n // Ensure the viewBox includes the whole svgBounds area with extra space for padding\n const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`;\n log.debug(`viewBox ${vBox}`);\n diagram.attr('viewBox', vBox);\n};\n\nexport default {\n setConf,\n draw,\n};\n","/* parser generated by jison 0.4.18 */\n/*\n Returns a Parser object of the following structure:\n\n Parser: {\n yy: {}\n }\n\n Parser.prototype: {\n yy: {},\n trace: function(),\n symbols_: {associative list: name ==> number},\n terminals_: {associative list: number ==> name},\n productions_: [...],\n performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$),\n table: [...],\n defaultActions: {...},\n parseError: function(str, hash),\n parse: function(input),\n\n lexer: {\n EOF: 1,\n parseError: function(str, hash),\n setInput: function(input),\n input: function(),\n unput: function(str),\n more: function(),\n less: function(n),\n pastInput: function(),\n upcomingInput: function(),\n showPosition: function(),\n test_match: function(regex_match_array, rule_index),\n next: function(),\n lex: function(),\n begin: function(condition),\n popState: function(),\n _currentRules: function(),\n topState: function(),\n pushState: function(condition),\n\n options: {\n ranges: boolean (optional: true ==> token location info will include a .range[] member)\n flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match)\n backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code)\n },\n\n performAction: function(yy, yy_, $avoiding_name_collisions, YY_START),\n rules: [...],\n conditions: {associative list: name ==> set},\n }\n }\n\n\n token location info (@$, _$, etc.): {\n first_line: n,\n last_line: n,\n first_column: n,\n last_column: n,\n range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based)\n }\n\n\n the parseError function receives a 'hash' object with these members for lexer and parser errors: {\n text: (matched text)\n token: (the produced terminal token, if any)\n line: (yylineno)\n }\n while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: {\n loc: (yylloc)\n expected: (string describing the set of expected tokens)\n recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error)\n }\n*/\nvar parser = (function(){\nvar o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,7],$V1=[1,6],$V2=[1,14],$V3=[1,25],$V4=[1,28],$V5=[1,26],$V6=[1,27],$V7=[1,29],$V8=[1,30],$V9=[1,31],$Va=[1,32],$Vb=[1,35],$Vc=[1,36],$Vd=[1,37],$Ve=[1,38],$Vf=[10,19],$Vg=[1,50],$Vh=[1,51],$Vi=[1,52],$Vj=[1,53],$Vk=[1,54],$Vl=[1,55],$Vm=[10,19,26,33,34,42,45,46,47,48,49,50,55,57],$Vn=[10,19,24,26,33,34,38,42,45,46,47,48,49,50,55,57,72,73,74,75],$Vo=[10,13,17,19],$Vp=[42,72,73,74,75],$Vq=[42,49,50,72,73,74,75],$Vr=[42,45,46,47,48,72,73,74,75],$Vs=[10,19,26],$Vt=[1,87];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"mermaidDoc\":4,\"directive\":5,\"graphConfig\":6,\"openDirective\":7,\"typeDirective\":8,\"closeDirective\":9,\"NEWLINE\":10,\":\":11,\"argDirective\":12,\"open_directive\":13,\"type_directive\":14,\"arg_directive\":15,\"close_directive\":16,\"CLASS_DIAGRAM\":17,\"statements\":18,\"EOF\":19,\"statement\":20,\"className\":21,\"alphaNumToken\":22,\"classLiteralName\":23,\"GENERICTYPE\":24,\"relationStatement\":25,\"LABEL\":26,\"classStatement\":27,\"methodStatement\":28,\"annotationStatement\":29,\"clickStatement\":30,\"cssClassStatement\":31,\"CLASS\":32,\"STYLE_SEPARATOR\":33,\"STRUCT_START\":34,\"members\":35,\"STRUCT_STOP\":36,\"ANNOTATION_START\":37,\"ANNOTATION_END\":38,\"MEMBER\":39,\"SEPARATOR\":40,\"relation\":41,\"STR\":42,\"relationType\":43,\"lineType\":44,\"AGGREGATION\":45,\"EXTENSION\":46,\"COMPOSITION\":47,\"DEPENDENCY\":48,\"LINE\":49,\"DOTTED_LINE\":50,\"CALLBACK\":51,\"LINK\":52,\"LINK_TARGET\":53,\"CLICK\":54,\"CALLBACK_NAME\":55,\"CALLBACK_ARGS\":56,\"HREF\":57,\"CSSCLASS\":58,\"commentToken\":59,\"textToken\":60,\"graphCodeTokens\":61,\"textNoTagsToken\":62,\"TAGSTART\":63,\"TAGEND\":64,\"==\":65,\"--\":66,\"PCT\":67,\"DEFAULT\":68,\"SPACE\":69,\"MINUS\":70,\"keywords\":71,\"UNICODE_TEXT\":72,\"NUM\":73,\"ALPHA\":74,\"BQUOTE_STR\":75,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",10:\"NEWLINE\",11:\":\",13:\"open_directive\",14:\"type_directive\",15:\"arg_directive\",16:\"close_directive\",17:\"CLASS_DIAGRAM\",19:\"EOF\",24:\"GENERICTYPE\",26:\"LABEL\",32:\"CLASS\",33:\"STYLE_SEPARATOR\",34:\"STRUCT_START\",36:\"STRUCT_STOP\",37:\"ANNOTATION_START\",38:\"ANNOTATION_END\",39:\"MEMBER\",40:\"SEPARATOR\",42:\"STR\",45:\"AGGREGATION\",46:\"EXTENSION\",47:\"COMPOSITION\",48:\"DEPENDENCY\",49:\"LINE\",50:\"DOTTED_LINE\",51:\"CALLBACK\",52:\"LINK\",53:\"LINK_TARGET\",54:\"CLICK\",55:\"CALLBACK_NAME\",56:\"CALLBACK_ARGS\",57:\"HREF\",58:\"CSSCLASS\",61:\"graphCodeTokens\",63:\"TAGSTART\",64:\"TAGEND\",65:\"==\",66:\"--\",67:\"PCT\",68:\"DEFAULT\",69:\"SPACE\",70:\"MINUS\",71:\"keywords\",72:\"UNICODE_TEXT\",73:\"NUM\",74:\"ALPHA\",75:\"BQUOTE_STR\"},\nproductions_: [0,[3,1],[3,2],[4,1],[5,4],[5,6],[7,1],[8,1],[12,1],[9,1],[6,4],[18,1],[18,2],[18,3],[21,1],[21,1],[21,2],[21,2],[21,2],[20,1],[20,2],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[27,2],[27,4],[27,5],[27,7],[29,4],[35,1],[35,2],[28,1],[28,2],[28,1],[28,1],[25,3],[25,4],[25,4],[25,5],[41,3],[41,2],[41,2],[41,1],[43,1],[43,1],[43,1],[43,1],[44,1],[44,1],[30,3],[30,4],[30,3],[30,4],[30,4],[30,5],[30,3],[30,4],[30,4],[30,5],[30,3],[30,4],[30,4],[30,5],[31,3],[59,1],[59,1],[60,1],[60,1],[60,1],[60,1],[60,1],[60,1],[60,1],[62,1],[62,1],[62,1],[62,1],[22,1],[22,1],[22,1],[23,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 6:\n yy.parseDirective('%%{', 'open_directive'); \nbreak;\ncase 7:\n yy.parseDirective($$[$0], 'type_directive'); \nbreak;\ncase 8:\n $$[$0] = $$[$0].trim().replace(/'/g, '\"'); yy.parseDirective($$[$0], 'arg_directive'); \nbreak;\ncase 9:\n yy.parseDirective('}%%', 'close_directive', 'class'); \nbreak;\ncase 14: case 15:\n this.$=$$[$0]; \nbreak;\ncase 16:\n this.$=$$[$0-1]+$$[$0]; \nbreak;\ncase 17: case 18:\n this.$=$$[$0-1]+'~'+$$[$0]; \nbreak;\ncase 19:\n yy.addRelation($$[$0]); \nbreak;\ncase 20:\n $$[$0-1].title = yy.cleanupLabel($$[$0]); yy.addRelation($$[$0-1]); \nbreak;\ncase 27:\nyy.addClass($$[$0]);\nbreak;\ncase 28:\nyy.addClass($$[$0-2]);yy.setCssClass($$[$0-2], $$[$0]);\nbreak;\ncase 29:\n/*console.log($$[$0-3],JSON.stringify($$[$0-1]));*/yy.addClass($$[$0-3]);yy.addMembers($$[$0-3],$$[$0-1]);\nbreak;\ncase 30:\nyy.addClass($$[$0-5]);yy.setCssClass($$[$0-5], $$[$0-3]);yy.addMembers($$[$0-5],$$[$0-1]);\nbreak;\ncase 31:\n yy.addAnnotation($$[$0],$$[$0-2]); \nbreak;\ncase 32:\n this.$ = [$$[$0]]; \nbreak;\ncase 33:\n $$[$0].push($$[$0-1]);this.$=$$[$0];\nbreak;\ncase 34:\n/*console.log('Rel found',$$[$0]);*/\nbreak;\ncase 35:\nyy.addMember($$[$0-1],yy.cleanupLabel($$[$0]));\nbreak;\ncase 36:\n/*console.warn('Member',$$[$0]);*/\nbreak;\ncase 37:\n/*console.log('sep found',$$[$0]);*/\nbreak;\ncase 38:\n this.$ = {'id1':$$[$0-2],'id2':$$[$0], relation:$$[$0-1], relationTitle1:'none', relationTitle2:'none'}; \nbreak;\ncase 39:\n this.$ = {id1:$$[$0-3], id2:$$[$0], relation:$$[$0-1], relationTitle1:$$[$0-2], relationTitle2:'none'}\nbreak;\ncase 40:\n this.$ = {id1:$$[$0-3], id2:$$[$0], relation:$$[$0-2], relationTitle1:'none', relationTitle2:$$[$0-1]}; \nbreak;\ncase 41:\n this.$ = {id1:$$[$0-4], id2:$$[$0], relation:$$[$0-2], relationTitle1:$$[$0-3], relationTitle2:$$[$0-1]} \nbreak;\ncase 42:\n this.$={type1:$$[$0-2],type2:$$[$0],lineType:$$[$0-1]}; \nbreak;\ncase 43:\n this.$={type1:'none',type2:$$[$0],lineType:$$[$0-1]}; \nbreak;\ncase 44:\n this.$={type1:$$[$0-1],type2:'none',lineType:$$[$0]}; \nbreak;\ncase 45:\n this.$={type1:'none',type2:'none',lineType:$$[$0]}; \nbreak;\ncase 46:\n this.$=yy.relationType.AGGREGATION;\nbreak;\ncase 47:\n this.$=yy.relationType.EXTENSION;\nbreak;\ncase 48:\n this.$=yy.relationType.COMPOSITION;\nbreak;\ncase 49:\n this.$=yy.relationType.DEPENDENCY;\nbreak;\ncase 50:\nthis.$=yy.lineType.LINE;\nbreak;\ncase 51:\nthis.$=yy.lineType.DOTTED_LINE;\nbreak;\ncase 52: case 58:\nthis.$ = $$[$0-2];yy.setClickEvent($$[$0-1], $$[$0]);\nbreak;\ncase 53: case 59:\nthis.$ = $$[$0-3];yy.setClickEvent($$[$0-2], $$[$0-1]);yy.setTooltip($$[$0-2], $$[$0]);\nbreak;\ncase 54: case 62:\nthis.$ = $$[$0-2];yy.setLink($$[$0-1], $$[$0]);\nbreak;\ncase 55:\nthis.$ = $$[$0-3];yy.setLink($$[$0-2], $$[$0-1],$$[$0]);\nbreak;\ncase 56: case 64:\nthis.$ = $$[$0-3];yy.setLink($$[$0-2], $$[$0-1]);yy.setTooltip($$[$0-2], $$[$0]);\nbreak;\ncase 57: case 65:\nthis.$ = $$[$0-4];yy.setLink($$[$0-3], $$[$0-2], $$[$0]);yy.setTooltip($$[$0-3], $$[$0-1]);\nbreak;\ncase 60:\nthis.$ = $$[$0-3];yy.setClickEvent($$[$0-2], $$[$0-1], $$[$0]);\nbreak;\ncase 61:\nthis.$ = $$[$0-4];yy.setClickEvent($$[$0-3], $$[$0-2], $$[$0-1]);yy.setTooltip($$[$0-3], $$[$0]);\nbreak;\ncase 63:\nthis.$ = $$[$0-3];yy.setLink($$[$0-2], $$[$0-1], $$[$0]);\nbreak;\ncase 66:\nyy.setCssClass($$[$0-1], $$[$0]);\nbreak;\n}\n},\ntable: [{3:1,4:2,5:3,6:4,7:5,13:$V0,17:$V1},{1:[3]},{1:[2,1]},{3:8,4:2,5:3,6:4,7:5,13:$V0,17:$V1},{1:[2,3]},{8:9,14:[1,10]},{10:[1,11]},{14:[2,6]},{1:[2,2]},{9:12,11:[1,13],16:$V2},o([11,16],[2,7]),{5:23,7:5,13:$V0,18:15,20:16,21:24,22:33,23:34,25:17,27:18,28:19,29:20,30:21,31:22,32:$V3,37:$V4,39:$V5,40:$V6,51:$V7,52:$V8,54:$V9,58:$Va,72:$Vb,73:$Vc,74:$Vd,75:$Ve},{10:[1,39]},{12:40,15:[1,41]},{10:[2,9]},{19:[1,42]},{10:[1,43],19:[2,11]},o($Vf,[2,19],{26:[1,44]}),o($Vf,[2,21]),o($Vf,[2,22]),o($Vf,[2,23]),o($Vf,[2,24]),o($Vf,[2,25]),o($Vf,[2,26]),o($Vf,[2,34],{41:45,43:48,44:49,26:[1,47],42:[1,46],45:$Vg,46:$Vh,47:$Vi,48:$Vj,49:$Vk,50:$Vl}),{21:56,22:33,23:34,72:$Vb,73:$Vc,74:$Vd,75:$Ve},o($Vf,[2,36]),o($Vf,[2,37]),{22:57,72:$Vb,73:$Vc,74:$Vd},{21:58,22:33,23:34,72:$Vb,73:$Vc,74:$Vd,75:$Ve},{21:59,22:33,23:34,72:$Vb,73:$Vc,74:$Vd,75:$Ve},{21:60,22:33,23:34,72:$Vb,73:$Vc,74:$Vd,75:$Ve},{42:[1,61]},o($Vm,[2,14],{22:33,23:34,21:62,24:[1,63],72:$Vb,73:$Vc,74:$Vd,75:$Ve}),o($Vm,[2,15],{24:[1,64]}),o($Vn,[2,80]),o($Vn,[2,81]),o($Vn,[2,82]),o([10,19,24,26,33,34,42,45,46,47,48,49,50,55,57],[2,83]),o($Vo,[2,4]),{9:65,16:$V2},{16:[2,8]},{1:[2,10]},{5:23,7:5,13:$V0,18:66,19:[2,12],20:16,21:24,22:33,23:34,25:17,27:18,28:19,29:20,30:21,31:22,32:$V3,37:$V4,39:$V5,40:$V6,51:$V7,52:$V8,54:$V9,58:$Va,72:$Vb,73:$Vc,74:$Vd,75:$Ve},o($Vf,[2,20]),{21:67,22:33,23:34,42:[1,68],72:$Vb,73:$Vc,74:$Vd,75:$Ve},{41:69,43:48,44:49,45:$Vg,46:$Vh,47:$Vi,48:$Vj,49:$Vk,50:$Vl},o($Vf,[2,35]),{44:70,49:$Vk,50:$Vl},o($Vp,[2,45],{43:71,45:$Vg,46:$Vh,47:$Vi,48:$Vj}),o($Vq,[2,46]),o($Vq,[2,47]),o($Vq,[2,48]),o($Vq,[2,49]),o($Vr,[2,50]),o($Vr,[2,51]),o($Vf,[2,27],{33:[1,72],34:[1,73]}),{38:[1,74]},{42:[1,75]},{42:[1,76]},{55:[1,77],57:[1,78]},{22:79,72:$Vb,73:$Vc,74:$Vd},o($Vm,[2,16]),o($Vm,[2,17]),o($Vm,[2,18]),{10:[1,80]},{19:[2,13]},o($Vs,[2,38]),{21:81,22:33,23:34,72:$Vb,73:$Vc,74:$Vd,75:$Ve},{21:82,22:33,23:34,42:[1,83],72:$Vb,73:$Vc,74:$Vd,75:$Ve},o($Vp,[2,44],{43:84,45:$Vg,46:$Vh,47:$Vi,48:$Vj}),o($Vp,[2,43]),{22:85,72:$Vb,73:$Vc,74:$Vd},{35:86,39:$Vt},{21:88,22:33,23:34,72:$Vb,73:$Vc,74:$Vd,75:$Ve},o($Vf,[2,52],{42:[1,89]}),o($Vf,[2,54],{42:[1,91],53:[1,90]}),o($Vf,[2,58],{42:[1,92],56:[1,93]}),o($Vf,[2,62],{42:[1,95],53:[1,94]}),o($Vf,[2,66]),o($Vo,[2,5]),o($Vs,[2,40]),o($Vs,[2,39]),{21:96,22:33,23:34,72:$Vb,73:$Vc,74:$Vd,75:$Ve},o($Vp,[2,42]),o($Vf,[2,28],{34:[1,97]}),{36:[1,98]},{35:99,36:[2,32],39:$Vt},o($Vf,[2,31]),o($Vf,[2,53]),o($Vf,[2,55]),o($Vf,[2,56],{53:[1,100]}),o($Vf,[2,59]),o($Vf,[2,60],{42:[1,101]}),o($Vf,[2,63]),o($Vf,[2,64],{53:[1,102]}),o($Vs,[2,41]),{35:103,39:$Vt},o($Vf,[2,29]),{36:[2,33]},o($Vf,[2,57]),o($Vf,[2,61]),o($Vf,[2,65]),{36:[1,104]},o($Vf,[2,30])],\ndefaultActions: {2:[2,1],4:[2,3],7:[2,6],8:[2,2],14:[2,9],41:[2,8],42:[2,10],66:[2,13],99:[2,33]},\nparseError: function parseError (str, hash) {\n if (hash.recoverable) {\n this.trace(str);\n } else {\n var error = new Error(str);\n error.hash = hash;\n throw error;\n }\n},\nparse: function parse(input) {\n var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;\n var args = lstack.slice.call(arguments, 1);\n var lexer = Object.create(this.lexer);\n var sharedState = { yy: {} };\n for (var k in this.yy) {\n if (Object.prototype.hasOwnProperty.call(this.yy, k)) {\n sharedState.yy[k] = this.yy[k];\n }\n }\n lexer.setInput(input, sharedState.yy);\n sharedState.yy.lexer = lexer;\n sharedState.yy.parser = this;\n if (typeof lexer.yylloc == 'undefined') {\n lexer.yylloc = {};\n }\n var yyloc = lexer.yylloc;\n lstack.push(yyloc);\n var ranges = lexer.options && lexer.options.ranges;\n if (typeof sharedState.yy.parseError === 'function') {\n this.parseError = sharedState.yy.parseError;\n } else {\n this.parseError = Object.getPrototypeOf(this).parseError;\n }\n function popStack(n) {\n stack.length = stack.length - 2 * n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n function lex() {\n var token;\n token = tstack.pop() || lexer.lex() || EOF;\n if (typeof token !== 'number') {\n if (token instanceof Array) {\n tstack = token;\n token = tstack.pop();\n }\n token = self.symbols_[token] || token;\n }\n return token;\n }\n var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;\n while (true) {\n state = stack[stack.length - 1];\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || typeof symbol == 'undefined') {\n symbol = lex();\n }\n action = table[state] && table[state][symbol];\n }\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n var errStr = '';\n expected = [];\n for (p in table[state]) {\n if (this.terminals_[p] && p > TERROR) {\n expected.push('\\'' + this.terminals_[p] + '\\'');\n }\n }\n if (lexer.showPosition) {\n errStr = 'Parse error on line ' + (yylineno + 1) + ':\\n' + lexer.showPosition() + '\\nExpecting ' + expected.join(', ') + ', got \\'' + (this.terminals_[symbol] || symbol) + '\\'';\n } else {\n errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\\'' + (this.terminals_[symbol] || symbol) + '\\'');\n }\n this.parseError(errStr, {\n text: lexer.match,\n token: this.terminals_[symbol] || symbol,\n line: lexer.yylineno,\n loc: yyloc,\n expected: expected\n });\n }\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol);\n }\n switch (action[0]) {\n case 1:\n stack.push(symbol);\n vstack.push(lexer.yytext);\n lstack.push(lexer.yylloc);\n stack.push(action[1]);\n symbol = null;\n if (!preErrorSymbol) {\n yyleng = lexer.yyleng;\n yytext = lexer.yytext;\n yylineno = lexer.yylineno;\n yyloc = lexer.yylloc;\n if (recovering > 0) {\n recovering--;\n }\n } else {\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n case 2:\n len = this.productions_[action[1]][1];\n yyval.$ = vstack[vstack.length - len];\n yyval._$ = {\n first_line: lstack[lstack.length - (len || 1)].first_line,\n last_line: lstack[lstack.length - 1].last_line,\n first_column: lstack[lstack.length - (len || 1)].first_column,\n last_column: lstack[lstack.length - 1].last_column\n };\n if (ranges) {\n yyval._$.range = [\n lstack[lstack.length - (len || 1)].range[0],\n lstack[lstack.length - 1].range[1]\n ];\n }\n r = this.performAction.apply(yyval, [\n yytext,\n yyleng,\n yylineno,\n sharedState.yy,\n action[1],\n vstack,\n lstack\n ].concat(args));\n if (typeof r !== 'undefined') {\n return r;\n }\n if (len) {\n stack = stack.slice(0, -1 * len * 2);\n vstack = vstack.slice(0, -1 * len);\n lstack = lstack.slice(0, -1 * len);\n }\n stack.push(this.productions_[action[1]][0]);\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n newState = table[stack[stack.length - 2]][stack[stack.length - 1]];\n stack.push(newState);\n break;\n case 3:\n return true;\n }\n }\n return true;\n}};\n\n/* generated by jison-lex 0.3.4 */\nvar lexer = (function(){\nvar lexer = ({\n\nEOF:1,\n\nparseError:function parseError(str, hash) {\n if (this.yy.parser) {\n this.yy.parser.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\n\n// resets the lexer, sets new input\nsetInput:function (input, yy) {\n this.yy = yy || this.yy || {};\n this._input = input;\n this._more = this._backtrack = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {\n first_line: 1,\n first_column: 0,\n last_line: 1,\n last_column: 0\n };\n if (this.options.ranges) {\n this.yylloc.range = [0,0];\n }\n this.offset = 0;\n return this;\n },\n\n// consumes and returns one char from the input\ninput:function () {\n var ch = this._input[0];\n this.yytext += ch;\n this.yyleng++;\n this.offset++;\n this.match += ch;\n this.matched += ch;\n var lines = ch.match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno++;\n this.yylloc.last_line++;\n } else {\n this.yylloc.last_column++;\n }\n if (this.options.ranges) {\n this.yylloc.range[1]++;\n }\n\n this._input = this._input.slice(1);\n return ch;\n },\n\n// unshifts one char (or a string) into the input\nunput:function (ch) {\n var len = ch.length;\n var lines = ch.split(/(?:\\r\\n?|\\n)/g);\n\n this._input = ch + this._input;\n this.yytext = this.yytext.substr(0, this.yytext.length - len);\n //this.yyleng -= len;\n this.offset -= len;\n var oldLines = this.match.split(/(?:\\r\\n?|\\n)/g);\n this.match = this.match.substr(0, this.match.length - 1);\n this.matched = this.matched.substr(0, this.matched.length - 1);\n\n if (lines.length - 1) {\n this.yylineno -= lines.length - 1;\n }\n var r = this.yylloc.range;\n\n this.yylloc = {\n first_line: this.yylloc.first_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.first_column,\n last_column: lines ?\n (lines.length === oldLines.length ? this.yylloc.first_column : 0)\n + oldLines[oldLines.length - lines.length].length - lines[0].length :\n this.yylloc.first_column - len\n };\n\n if (this.options.ranges) {\n this.yylloc.range = [r[0], r[0] + this.yyleng - len];\n }\n this.yyleng = this.yytext.length;\n return this;\n },\n\n// When called from action, caches matched text and appends it on next action\nmore:function () {\n this._more = true;\n return this;\n },\n\n// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.\nreject:function () {\n if (this.options.backtrack_lexer) {\n this._backtrack = true;\n } else {\n return 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(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n\n }\n return this;\n },\n\n// retain first n characters of the match\nless:function (n) {\n this.unput(this.match.slice(n));\n },\n\n// displays already matched input, i.e. for error messages\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\n\n// displays upcoming input, i.e. for error messages\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20) + (next.length > 20 ? '...' : '')).replace(/\\n/g, \"\");\n },\n\n// displays the character position where the lexing error occurred, i.e. for error messages\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c + \"^\";\n },\n\n// test the lexed token: return FALSE when not a match, otherwise return token\ntest_match:function(match, indexed_rule) {\n var token,\n lines,\n backup;\n\n if (this.options.backtrack_lexer) {\n // save context\n backup = {\n yylineno: this.yylineno,\n yylloc: {\n first_line: this.yylloc.first_line,\n last_line: this.last_line,\n first_column: this.yylloc.first_column,\n last_column: this.yylloc.last_column\n },\n yytext: this.yytext,\n match: this.match,\n matches: this.matches,\n matched: this.matched,\n yyleng: this.yyleng,\n offset: this.offset,\n _more: this._more,\n _input: this._input,\n yy: this.yy,\n conditionStack: this.conditionStack.slice(0),\n done: this.done\n };\n if (this.options.ranges) {\n backup.yylloc.range = this.yylloc.range.slice(0);\n }\n }\n\n lines = match[0].match(/(?:\\r\\n?|\\n).*/g);\n if (lines) {\n this.yylineno += lines.length;\n }\n this.yylloc = {\n first_line: this.yylloc.last_line,\n last_line: this.yylineno + 1,\n first_column: this.yylloc.last_column,\n last_column: lines ?\n lines[lines.length - 1].length - lines[lines.length - 1].match(/\\r?\\n?/)[0].length :\n this.yylloc.last_column + match[0].length\n };\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n if (this.options.ranges) {\n this.yylloc.range = [this.offset, this.offset += this.yyleng];\n }\n this._more = false;\n this._backtrack = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);\n if (this.done && this._input) {\n this.done = false;\n }\n if (token) {\n return token;\n } else if (this._backtrack) {\n // recover context\n for (var k in backup) {\n this[k] = backup[k];\n }\n return false; // rule action called reject() implying the next rule should be tested instead.\n }\n return false;\n },\n\n// return next match in input\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) {\n this.done = true;\n }\n\n var token,\n match,\n tempMatch,\n index;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i = 0; i < rules.length; i++) {\n tempMatch = this._input.match(this.rules[rules[i]]);\n if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {\n match = tempMatch;\n index = i;\n if (this.options.backtrack_lexer) {\n token = this.test_match(tempMatch, rules[i]);\n if (token !== false) {\n return token;\n } else if (this._backtrack) {\n match = false;\n continue; // rule action called reject() implying a rule MISmatch.\n } else {\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n } else if (!this.options.flex) {\n break;\n }\n }\n }\n if (match) {\n token = this.test_match(match, rules[index]);\n if (token !== false) {\n return token;\n }\n // else: this is a lexer rule which consumes input without producing a token (e.g. whitespace)\n return false;\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\\n' + this.showPosition(), {\n text: \"\",\n token: null,\n line: this.yylineno\n });\n }\n },\n\n// return next match that has a token\nlex:function lex () {\n var r = this.next();\n if (r) {\n return r;\n } else {\n return this.lex();\n }\n },\n\n// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)\nbegin:function begin (condition) {\n this.conditionStack.push(condition);\n },\n\n// pop the previously active lexer condition state off the condition stack\npopState:function popState () {\n var n = this.conditionStack.length - 1;\n if (n > 0) {\n return this.conditionStack.pop();\n } else {\n return this.conditionStack[0];\n }\n },\n\n// produce the lexer rule set which is active for the currently active lexer condition state\n_currentRules:function _currentRules () {\n if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {\n return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;\n } else {\n return this.conditions[\"INITIAL\"].rules;\n }\n },\n\n// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available\ntopState:function topState (n) {\n n = this.conditionStack.length - 1 - Math.abs(n || 0);\n if (n >= 0) {\n return this.conditionStack[n];\n } else {\n return \"INITIAL\";\n }\n },\n\n// alias for begin(condition)\npushState:function pushState (condition) {\n this.begin(condition);\n },\n\n// return the number of states currently on the stack\nstateStackSize:function stateStackSize() {\n return this.conditionStack.length;\n },\noptions: {},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0: this.begin('open_directive'); return 13; \nbreak;\ncase 1: this.begin('type_directive'); return 14; \nbreak;\ncase 2: this.popState(); this.begin('arg_directive'); return 11; \nbreak;\ncase 3: this.popState(); this.popState(); return 16; \nbreak;\ncase 4:return 15;\nbreak;\ncase 5:/* skip comments */\nbreak;\ncase 6:/* skip comments */\nbreak;\ncase 7:return 10;\nbreak;\ncase 8:/* skip whitespace */\nbreak;\ncase 9:return 17;\nbreak;\ncase 10:return 17;\nbreak;\ncase 11: this.begin(\"struct\"); /*console.log('Starting struct');*/ return 34;\nbreak;\ncase 12:return \"EOF_IN_STRUCT\";\nbreak;\ncase 13:return \"OPEN_IN_STRUCT\";\nbreak;\ncase 14: /*console.log('Ending struct');*/this.popState(); return 36;\nbreak;\ncase 15:/* nothing */\nbreak;\ncase 16: /*console.log('lex-member: ' + yy_.yytext);*/ return \"MEMBER\";\nbreak;\ncase 17:return 32;\nbreak;\ncase 18:return 58;\nbreak;\ncase 19:return 51;\nbreak;\ncase 20:return 52;\nbreak;\ncase 21:return 54;\nbreak;\ncase 22:return 37;\nbreak;\ncase 23:return 38;\nbreak;\ncase 24:this.begin(\"generic\");\nbreak;\ncase 25:this.popState();\nbreak;\ncase 26:return \"GENERICTYPE\";\nbreak;\ncase 27:this.begin(\"string\");\nbreak;\ncase 28:this.popState();\nbreak;\ncase 29:return \"STR\";\nbreak;\ncase 30:this.begin(\"bqstring\");\nbreak;\ncase 31:this.popState();\nbreak;\ncase 32:return \"BQUOTE_STR\";\nbreak;\ncase 33:this.begin(\"href\");\nbreak;\ncase 34:this.popState();\nbreak;\ncase 35:return 57;\nbreak;\ncase 36:this.begin(\"callback_name\");\nbreak;\ncase 37:this.popState();\nbreak;\ncase 38:this.popState(); this.begin(\"callback_args\");\nbreak;\ncase 39:return 55;\nbreak;\ncase 40:this.popState();\nbreak;\ncase 41:return 56;\nbreak;\ncase 42:return 53;\nbreak;\ncase 43:return 53;\nbreak;\ncase 44:return 53;\nbreak;\ncase 45:return 53;\nbreak;\ncase 46:return 46;\nbreak;\ncase 47:return 46;\nbreak;\ncase 48:return 48;\nbreak;\ncase 49:return 48;\nbreak;\ncase 50:return 47;\nbreak;\ncase 51:return 45;\nbreak;\ncase 52:return 49;\nbreak;\ncase 53:return 50;\nbreak;\ncase 54:return 26;\nbreak;\ncase 55:return 33;\nbreak;\ncase 56:return 70;\nbreak;\ncase 57:return 'DOT';\nbreak;\ncase 58:return 'PLUS';\nbreak;\ncase 59:return 67;\nbreak;\ncase 60:return 'EQUALS';\nbreak;\ncase 61:return 'EQUALS';\nbreak;\ncase 62:return 74;\nbreak;\ncase 63:return 'PUNCTUATION';\nbreak;\ncase 64:return 73;\nbreak;\ncase 65:return 72;\nbreak;\ncase 66:return 69;\nbreak;\ncase 67:return 19;\nbreak;\n}\n},\nrules: [/^(?:%%\\{)/,/^(?:((?:(?!\\}%%)[^:.])*))/,/^(?::)/,/^(?:\\}%%)/,/^(?:((?:(?!\\}%%).|\\n)*))/,/^(?:%%(?!\\{)*[^\\n]*(\\r?\\n?)+)/,/^(?:%%[^\\n]*(\\r?\\n)*)/,/^(?:(\\r?\\n)+)/,/^(?:\\s+)/,/^(?:classDiagram-v2\\b)/,/^(?:classDiagram\\b)/,/^(?:[{])/,/^(?:$)/,/^(?:[{])/,/^(?:[}])/,/^(?:[\\n])/,/^(?:[^{}\\n]*)/,/^(?:class\\b)/,/^(?:cssClass\\b)/,/^(?:callback\\b)/,/^(?:link\\b)/,/^(?:click\\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:[\"])/,/^(?:[\"])/,/^(?:[^\"]*)/,/^(?:[`])/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:href[\\s]+[\"])/,/^(?:[\"])/,/^(?:[^\"]*)/,/^(?:call[\\s]+)/,/^(?:\\([\\s]*\\))/,/^(?:\\()/,/^(?:[^(]*)/,/^(?:\\))/,/^(?:[^)]*)/,/^(?:_self\\b)/,/^(?:_blank\\b)/,/^(?:_parent\\b)/,/^(?:_top\\b)/,/^(?:\\s*<\\|)/,/^(?:\\s*\\|>)/,/^(?:\\s*>)/,/^(?:\\s*<)/,/^(?:\\s*\\*)/,/^(?:\\s*o\\b)/,/^(?:--)/,/^(?:\\.\\.)/,/^(?::{1}[^:\\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\\.)/,/^(?:\\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\\w+)/,/^(?:[!\"#$%&'*+,-.`?\\\\/])/,/^(?:[0-9]+)/,/^(?:[\\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]|[\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\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)/,/^(?:$)/],\nconditions: {\"arg_directive\":{\"rules\":[3,4],\"inclusive\":false},\"type_directive\":{\"rules\":[2,3],\"inclusive\":false},\"open_directive\":{\"rules\":[1],\"inclusive\":false},\"callback_args\":{\"rules\":[40,41],\"inclusive\":false},\"callback_name\":{\"rules\":[37,38,39],\"inclusive\":false},\"href\":{\"rules\":[34,35],\"inclusive\":false},\"struct\":{\"rules\":[12,13,14,15,16],\"inclusive\":false},\"generic\":{\"rules\":[25,26],\"inclusive\":false},\"bqstring\":{\"rules\":[31,32],\"inclusive\":false},\"string\":{\"rules\":[28,29],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,5,6,7,8,9,10,11,17,18,19,20,21,22,23,24,27,30,33,36,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],\"inclusive\":true}}\n});\nreturn lexer;\n})();\nparser.lexer = lexer;\nfunction Parser () {\n this.yy = {};\n}\nParser.prototype = parser;parser.Parser = Parser;\nreturn new Parser;\n})();\n\n\nif (typeof require !== 'undefined' && typeof exports !== 'undefined') {\nexports.parser = parser;\nexports.Parser = parser.Parser;\nexports.parse = function () { return parser.parse.apply(parser, arguments); };\nexports.main = function commonjsMain (args) {\n if (!args[1]) {\n console.log('Usage: '+args[0]+' FILE');\n process.exit(1);\n }\n var source = require('fs').readFileSync(require('path').normalize(args[1]), \"utf8\");\n return exports.parser.parse(source);\n};\nif (typeof module !== 'undefined' && require.main === module) {\n exports.main(process.argv.slice(1));\n}\n}","const getStyles = (options) =>\n `g.classGroup text {\n fill: ${options.nodeBorder};\n fill: ${options.classText};\n stroke: none;\n font-family: ${options.fontFamily};\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ${options.nodeBorder};\n stroke: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n}\n\ng.classGroup line {\n stroke: ${options.nodeBorder};\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${options.mainBkg};\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ${options.nodeBorder};\n font-size: 10px;\n}\n\n.relation {\n stroke: ${options.lineColor};\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n#compositionStart, .composition {\n fill: ${options.lineColor} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ${options.lineColor} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${options.lineColor} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${options.lineColor} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: ${options.lineColor} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: ${options.lineColor} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: ${options.mainBkg} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: ${options.mainBkg} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n}\n\n`;\n\nexport default getStyles;\n","import { line, curveBasis } from 'd3';\nimport { lookUpDomId, relationType } from './classDb';\nimport utils from '../../utils';\nimport { log } from '../../logger';\n\nlet edgeCount = 0;\nexport const drawEdge = function (elem, path, relation, conf) {\n const getRelationType = function (type) {\n switch (type) {\n case relationType.AGGREGATION:\n return 'aggregation';\n case relationType.EXTENSION:\n return 'extension';\n case relationType.COMPOSITION:\n return 'composition';\n case relationType.DEPENDENCY:\n return 'dependency';\n }\n };\n\n path.points = path.points.filter((p) => !Number.isNaN(p.y));\n\n // The data for our line\n const lineData = path.points;\n\n // This is the accessor function we talked about above\n const lineFunction = line()\n .x(function (d) {\n return d.x;\n })\n .y(function (d) {\n return d.y;\n })\n .curve(curveBasis);\n\n const svgPath = elem\n .append('path')\n .attr('d', lineFunction(lineData))\n .attr('id', 'edge' + edgeCount)\n .attr('class', 'relation');\n let url = '';\n if (conf.arrowMarkerAbsolute) {\n url =\n window.location.protocol +\n '//' +\n window.location.host +\n window.location.pathname +\n window.location.search;\n url = url.replace(/\\(/g, '\\\\(');\n url = url.replace(/\\)/g, '\\\\)');\n }\n\n if (relation.relation.lineType == 1) {\n svgPath.attr('class', 'relation dashed-line');\n }\n if (relation.relation.type1 !== 'none') {\n svgPath.attr(\n 'marker-start',\n 'url(' + url + '#' + getRelationType(relation.relation.type1) + 'Start' + ')'\n );\n }\n if (relation.relation.type2 !== 'none') {\n svgPath.attr(\n 'marker-end',\n 'url(' + url + '#' + getRelationType(relation.relation.type2) + 'End' + ')'\n );\n }\n\n let x, y;\n const l = path.points.length;\n // Calculate Label position\n let labelPosition = utils.calcLabelPosition(path.points);\n x = labelPosition.x;\n y = labelPosition.y;\n\n let p1_card_x, p1_card_y;\n let p2_card_x, p2_card_y;\n\n if (l % 2 !== 0 && l > 1) {\n let cardinality_1_point = utils.calcCardinalityPosition(\n relation.relation.type1 !== 'none',\n path.points,\n path.points[0]\n );\n let cardinality_2_point = utils.calcCardinalityPosition(\n relation.relation.type2 !== 'none',\n path.points,\n path.points[l - 1]\n );\n\n log.debug('cardinality_1_point ' + JSON.stringify(cardinality_1_point));\n log.debug('cardinality_2_point ' + JSON.stringify(cardinality_2_point));\n\n p1_card_x = cardinality_1_point.x;\n p1_card_y = cardinality_1_point.y;\n p2_card_x = cardinality_2_point.x;\n p2_card_y = cardinality_2_point.y;\n }\n\n if (typeof relation.title !== 'undefined') {\n const g = elem.append('g').attr('class', 'classLabel');\n const label = g\n .append('text')\n .attr('class', 'label')\n .attr('x', x)\n .attr('y', y)\n .attr('fill', 'red')\n .attr('text-anchor', 'middle')\n .text(relation.title);\n\n window.label = label;\n const bounds = label.node().getBBox();\n\n g.insert('rect', ':first-child')\n .attr('class', 'box')\n .attr('x', bounds.x - conf.padding / 2)\n .attr('y', bounds.y - conf.padding / 2)\n .attr('width', bounds.width + conf.padding)\n .attr('height', bounds.height + conf.padding);\n }\n\n log.info('Rendering relation ' + JSON.stringify(relation));\n if (typeof relation.relationTitle1 !== 'undefined' && relation.relationTitle1 !== 'none') {\n const g = elem.append('g').attr('class', 'cardinality');\n g.append('text')\n .attr('class', 'type1')\n .attr('x', p1_card_x)\n .attr('y', p1_card_y)\n .attr('fill', 'black')\n .attr('font-size', '6')\n .text(relation.relationTitle1);\n }\n if (typeof relation.relationTitle2 !== 'undefined' && relation.relationTitle2 !== 'none') {\n const g = elem.append('g').attr('class', 'cardinality');\n g.append('text')\n .attr('class', 'type2')\n .attr('x', p2_card_x)\n .attr('y', p2_card_y)\n .attr('fill', 'black')\n .attr('font-size', '6')\n .text(relation.relationTitle2);\n }\n\n edgeCount++;\n};\n\nexport const drawClass = function (elem, classDef, conf) {\n log.info('Rendering class ' + classDef);\n\n const id = classDef.id;\n const classInfo = {\n id: id,\n label: classDef.id,\n width: 0,\n height: 0,\n };\n\n // add class group\n const g = elem.append('g').attr('id', lookUpDomId(id)).attr('class', 'classGroup');\n\n // add title\n let title;\n if (classDef.link) {\n title = g\n .append('svg:a')\n .attr('xlink:href', classDef.link)\n .attr('target', classDef.linkTarget)\n .append('text')\n .attr('y', conf.textHeight + conf.padding)\n .attr('x', 0);\n } else {\n title = g\n .append('text')\n .attr('y', conf.textHeight + conf.padding)\n .attr('x', 0);\n }\n\n // add annotations\n let isFirst = true;\n classDef.annotations.forEach(function (member) {\n const titleText2 = title.append('tspan').text('«' + member + '»');\n if (!isFirst) titleText2.attr('dy', conf.textHeight);\n isFirst = false;\n });\n\n let classTitleString = classDef.id;\n\n if (classDef.type !== undefined && classDef.type !== '') {\n classTitleString += '<' + classDef.type + '>';\n }\n\n const classTitle = title.append('tspan').text(classTitleString).attr('class', 'title');\n\n // If class has annotations the title needs to have an offset of the text height\n if (!isFirst) classTitle.attr('dy', conf.textHeight);\n\n const titleHeight = title.node().getBBox().height;\n\n const membersLine = g\n .append('line') // text label for the x axis\n .attr('x1', 0)\n .attr('y1', conf.padding + titleHeight + conf.dividerMargin / 2)\n .attr('y2', conf.padding + titleHeight + conf.dividerMargin / 2);\n\n const members = g\n .append('text') // text label for the x axis\n .attr('x', conf.padding)\n .attr('y', titleHeight + conf.dividerMargin + conf.textHeight)\n .attr('fill', 'white')\n .attr('class', 'classText');\n\n isFirst = true;\n classDef.members.forEach(function (member) {\n addTspan(members, member, isFirst, conf);\n isFirst = false;\n });\n\n const membersBox = members.node().getBBox();\n\n const methodsLine = g\n .append('line') // text label for the x axis\n .attr('x1', 0)\n .attr('y1', conf.padding + titleHeight + conf.dividerMargin + membersBox.height)\n .attr('y2', conf.padding + titleHeight + conf.dividerMargin + membersBox.height);\n\n const methods = g\n .append('text') // text label for the x axis\n .attr('x', conf.padding)\n .attr('y', titleHeight + 2 * conf.dividerMargin + membersBox.height + conf.textHeight)\n .attr('fill', 'white')\n .attr('class', 'classText');\n\n isFirst = true;\n\n classDef.methods.forEach(function (method) {\n addTspan(methods, method, isFirst, conf);\n isFirst = false;\n });\n\n const classBox = g.node().getBBox();\n var cssClassStr = ' ';\n\n if (classDef.cssClasses.length > 0) {\n cssClassStr = cssClassStr + classDef.cssClasses.join(' ');\n }\n\n const rect = g\n .insert('rect', ':first-child')\n .attr('x', 0)\n .attr('y', 0)\n .attr('width', classBox.width + 2 * conf.padding)\n .attr('height', classBox.height + conf.padding + 0.5 * conf.dividerMargin)\n .attr('class', cssClassStr);\n\n const rectWidth = rect.node().getBBox().width;\n\n // Center title\n // We subtract the width of each text element from the class box width and divide it by 2\n title.node().childNodes.forEach(function (x) {\n x.setAttribute('x', (rectWidth - x.getBBox().width) / 2);\n });\n\n if (classDef.tooltip) {\n title.insert('title').text(classDef.tooltip);\n }\n\n membersLine.attr('x2', rectWidth);\n methodsLine.attr('x2', rectWidth);\n\n classInfo.width = rectWidth;\n classInfo.height = classBox.height + conf.padding + 0.5 * conf.dividerMargin;\n\n return classInfo;\n};\n\nexport const parseMember = function (text) {\n const fieldRegEx = /(\\+|-|~|#)?(\\w+)(~\\w+~|\\[\\])?\\s+(\\w+)/;\n const methodRegEx = /^([+|\\-|~|#])?(\\w+) *\\( *(.*)\\) *(\\*|\\$)? *(\\w*[~|[\\]]*\\s*\\w*~?)$/;\n\n let fieldMatch = text.match(fieldRegEx);\n let methodMatch = text.match(methodRegEx);\n\n if (fieldMatch && !methodMatch) {\n return buildFieldDisplay(fieldMatch);\n } else if (methodMatch) {\n return buildMethodDisplay(methodMatch);\n } else {\n return buildLegacyDisplay(text);\n }\n};\n\nconst buildFieldDisplay = function (parsedText) {\n let displayText = '';\n\n try {\n let visibility = parsedText[1] ? parsedText[1].trim() : '';\n let fieldType = parsedText[2] ? parsedText[2].trim() : '';\n let genericType = parsedText[3] ? parseGenericTypes(parsedText[3].trim()) : '';\n let fieldName = parsedText[4] ? parsedText[4].trim() : '';\n\n displayText = visibility + fieldType + genericType + ' ' + fieldName;\n } catch (err) {\n displayText = parsedText;\n }\n\n return {\n displayText: displayText,\n cssStyle: '',\n };\n};\n\nconst buildMethodDisplay = function (parsedText) {\n let cssStyle = '';\n let displayText = '';\n\n try {\n let visibility = parsedText[1] ? parsedText[1].trim() : '';\n let methodName = parsedText[2] ? parsedText[2].trim() : '';\n let parameters = parsedText[3] ? parseGenericTypes(parsedText[3].trim()) : '';\n let classifier = parsedText[4] ? parsedText[4].trim() : '';\n let returnType = parsedText[5] ? ' : ' + parseGenericTypes(parsedText[5]).trim() : '';\n\n displayText = visibility + methodName + '(' + parameters + ')' + returnType;\n\n cssStyle = parseClassifier(classifier);\n } catch (err) {\n displayText = parsedText;\n }\n\n return {\n displayText: displayText,\n cssStyle: cssStyle,\n };\n};\n\nconst buildLegacyDisplay = function (text) {\n // if for some reason we dont have any match, use old format to parse text\n let displayText = '';\n let cssStyle = '';\n let memberText = '';\n let returnType = '';\n let methodStart = text.indexOf('(');\n let methodEnd = text.indexOf(')');\n\n if (methodStart > 1 && methodEnd > methodStart && methodEnd <= text.length) {\n let visibility = '';\n let methodName = '';\n\n let firstChar = text.substring(0, 1);\n if (firstChar.match(/\\w/)) {\n methodName = text.substring(0, methodStart).trim();\n } else {\n if (firstChar.match(/\\+|-|~|#/)) {\n visibility = firstChar;\n }\n\n methodName = text.substring(1, methodStart).trim();\n }\n\n let parameters = text.substring(methodStart + 1, methodEnd);\n let classifier = text.substring(methodEnd + 1, 1);\n cssStyle = parseClassifier(classifier);\n\n displayText = visibility + methodName + '(' + parseGenericTypes(parameters.trim()) + ')';\n\n if (methodEnd < memberText.length) {\n returnType = text.substring(methodEnd + 2).trim();\n if (returnType !== '') {\n returnType = ' : ' + parseGenericTypes(returnType);\n }\n }\n } else {\n // finally - if all else fails, just send the text back as written (other than parsing for generic types)\n displayText = parseGenericTypes(text);\n }\n\n return {\n displayText: displayText,\n cssStyle: cssStyle,\n };\n};\n\nconst addTspan = function (textEl, txt, isFirst, conf) {\n let member = parseMember(txt);\n\n const tSpan = textEl.append('tspan').attr('x', conf.padding).text(member.displayText);\n\n if (member.cssStyle !== '') {\n tSpan.attr('style', member.cssStyle);\n }\n\n if (!isFirst) {\n tSpan.attr('dy', conf.textHeight);\n }\n};\n\nconst parseGenericTypes = function (text) {\n let cleanedText = text;\n\n if (text.indexOf('~') != -1) {\n cleanedText = cleanedText.replace('~', '<');\n cleanedText = cleanedText.replace('~', '>');\n\n return parseGenericTypes(cleanedText);\n } else {\n return cleanedText;\n }\n};\n\nconst parseClassifier = function (classifier) {\n switch (classifier) {\n case '*':\n return 'font-style:italic;';\n case '$':\n return 'text-decoration:underline;';\n default:\n return '';\n }\n};\n\nexport default {\n drawClass,\n drawEdge,\n parseMember,\n};\n","import DOMPurify from 'dompurify';\n\nexport const getRows = (s) => {\n if (!s) return 1;\n let str = breakToPlaceholder(s);\n str = str.replace(/\\\\n/g, '#br#');\n return str.split('#br#');\n};\n\nexport const removeScript = (txt) => {\n var rs = '';\n var idx = 0;\n\n while (idx >= 0) {\n idx = txt.indexOf('= 0) {\n rs += txt.substr(0, idx);\n txt = txt.substr(idx + 1);\n\n idx = txt.indexOf('');\n if (idx >= 0) {\n idx += 9;\n txt = txt.substr(idx);\n }\n } else {\n rs += txt;\n idx = -1;\n break;\n }\n }\n\n rs = rs.replace(/javascript:/g, '#');\n rs = rs.replace(/onerror=/g, 'onerror:');\n rs = rs.replace(/