package.dist.chunks.mermaid.esm.chunk-63NMYVOQ.mjs.map Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mermaid Show documentation
Show all versions of mermaid Show documentation
Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.
{
"version": 3,
"sources": ["../../../src/diagrams/state/parser/stateDiagram.jison", "../../../src/diagrams/state/stateCommon.ts", "../../../src/diagrams/state/stateRenderer-v3-unified.ts", "../../../src/diagrams/state/dataFetcher.js", "../../../src/diagrams/state/stateDb.js", "../../../src/diagrams/state/styles.js"],
"sourcesContent": ["/* 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,2],$V1=[1,3],$V2=[1,4],$V3=[2,4],$V4=[1,9],$V5=[1,11],$V6=[1,16],$V7=[1,17],$V8=[1,18],$V9=[1,19],$Va=[1,32],$Vb=[1,20],$Vc=[1,21],$Vd=[1,22],$Ve=[1,23],$Vf=[1,24],$Vg=[1,26],$Vh=[1,27],$Vi=[1,28],$Vj=[1,29],$Vk=[1,30],$Vl=[1,31],$Vm=[1,34],$Vn=[1,35],$Vo=[1,36],$Vp=[1,37],$Vq=[1,33],$Vr=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],$Vs=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],$Vt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54];\nvar parser = {trace: function trace () { },\nyy: {},\nsymbols_: {\"error\":2,\"start\":3,\"SPACE\":4,\"NL\":5,\"SD\":6,\"document\":7,\"line\":8,\"statement\":9,\"classDefStatement\":10,\"styleStatement\":11,\"cssClassStatement\":12,\"idStatement\":13,\"DESCR\":14,\"-->\":15,\"HIDE_EMPTY\":16,\"scale\":17,\"WIDTH\":18,\"COMPOSIT_STATE\":19,\"STRUCT_START\":20,\"STRUCT_STOP\":21,\"STATE_DESCR\":22,\"AS\":23,\"ID\":24,\"FORK\":25,\"JOIN\":26,\"CHOICE\":27,\"CONCURRENT\":28,\"note\":29,\"notePosition\":30,\"NOTE_TEXT\":31,\"direction\":32,\"acc_title\":33,\"acc_title_value\":34,\"acc_descr\":35,\"acc_descr_value\":36,\"acc_descr_multiline_value\":37,\"classDef\":38,\"CLASSDEF_ID\":39,\"CLASSDEF_STYLEOPTS\":40,\"DEFAULT\":41,\"style\":42,\"STYLE_IDS\":43,\"STYLEDEF_STYLEOPTS\":44,\"class\":45,\"CLASSENTITY_IDS\":46,\"STYLECLASS\":47,\"direction_tb\":48,\"direction_bt\":49,\"direction_rl\":50,\"direction_lr\":51,\"eol\":52,\";\":53,\"EDGE_STATE\":54,\"STYLE_SEPARATOR\":55,\"left_of\":56,\"right_of\":57,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",4:\"SPACE\",5:\"NL\",6:\"SD\",14:\"DESCR\",15:\"-->\",16:\"HIDE_EMPTY\",17:\"scale\",18:\"WIDTH\",19:\"COMPOSIT_STATE\",20:\"STRUCT_START\",21:\"STRUCT_STOP\",22:\"STATE_DESCR\",23:\"AS\",24:\"ID\",25:\"FORK\",26:\"JOIN\",27:\"CHOICE\",28:\"CONCURRENT\",29:\"note\",31:\"NOTE_TEXT\",33:\"acc_title\",34:\"acc_title_value\",35:\"acc_descr\",36:\"acc_descr_value\",37:\"acc_descr_multiline_value\",38:\"classDef\",39:\"CLASSDEF_ID\",40:\"CLASSDEF_STYLEOPTS\",41:\"DEFAULT\",42:\"style\",43:\"STYLE_IDS\",44:\"STYLEDEF_STYLEOPTS\",45:\"class\",46:\"CLASSENTITY_IDS\",47:\"STYLECLASS\",48:\"direction_tb\",49:\"direction_bt\",50:\"direction_rl\",51:\"direction_lr\",53:\";\",54:\"EDGE_STATE\",55:\"STYLE_SEPARATOR\",56:\"left_of\",57:\"right_of\"},\nproductions_: [0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[52,1],[52,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],\nperformAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {\n/* this == yyval */\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 3:\n /* console.log('--> Root document', $$[$0]); */ yy.setRootDoc($$[$0]); return $$[$0]; \nbreak;\ncase 4:\n /*console.log('empty document'); */ this.$ = [] \nbreak;\ncase 5:\n\n if($$[$0] !='nl'){\n /* console.log(' document: 1: ', $$[$0-1], ' pushing 2: ', $$[$0]); */\n $$[$0-1].push($$[$0]); this.$ = $$[$0-1]\n }\n /* console.log('Got document',$$[$0-1], $$[$0]); */\n \nbreak;\ncase 6: case 7:\n this.$ = $$[$0] \nbreak;\ncase 8:\n this.$='nl';\nbreak;\ncase 12:\n /* console.log('got id', $$[$0]); */\n this.$=$$[$0];\n\t \nbreak;\ncase 13:\n\n const stateStmt = $$[$0-1];\n stateStmt.description = yy.trimColon($$[$0]);\n this.$ = stateStmt;\n\t \nbreak;\ncase 14:\n\n /* console.info('got ids: 1: ', $$[$0-2], ' 2:', $$[$0-1],' 3: ', $$[$0]); */\n // console.log(' idStatement --> idStatement : state1 =', $$[$0-2], ' state2 =', $$[$0]);\n this.$={ stmt: 'relation', state1: $$[$0-2], state2: $$[$0]};\n \nbreak;\ncase 15:\n\n const relDescription = yy.trimColon($$[$0]);\n /* console.log(' idStatement --> idStatement DESCR : state1 =', $$[$0-3], ' state2stmt =', $$[$0-1], ' description: ', relDescription); */\n this.$={ stmt: 'relation', state1: $$[$0-3], state2: $$[$0-1], description: relDescription};\n \nbreak;\ncase 19:\n\n // console.log('Adding document for state without id ', $$[$0-3]);\n this.$={ stmt: 'state', id: $$[$0-3], type: 'default', description: '', doc: $$[$0-1] }\n \nbreak;\ncase 20:\n\n var id=$$[$0];\n var description = $$[$0-2].trim();\n if($$[$0].match(':')){\n var parts = $$[$0].split(':');\n id=parts[0];\n description = [description, parts[1]];\n }\n this.$={stmt: 'state', id: id, type: 'default', description: description};\n\n \nbreak;\ncase 21:\n\n // console.log('state with id ', $$[$0-3],' document = ', $$[$0-1], );\n this.$={ stmt: 'state', id: $$[$0-3], type: 'default', description: $$[$0-5], doc: $$[$0-1] }\n \nbreak;\ncase 22:\n\n this.$={ stmt: 'state', id: $$[$0], type: 'fork' }\n \nbreak;\ncase 23:\n\n this.$={ stmt: 'state', id: $$[$0], type: 'join' }\n \nbreak;\ncase 24:\n\n this.$={ stmt: 'state', id: $$[$0], type: 'choice' }\n \nbreak;\ncase 25:\n\n this.$={ stmt: 'state', id: yy.getDividerId(), type: 'divider' }\n \nbreak;\ncase 26:\n\n /* console.warn('got NOTE, position: ', $$[$0-2].trim(), 'id = ', $$[$0-1].trim(), 'note: ', $$[$0]);*/\n this.$={ stmt: 'state', id: $$[$0-1].trim(), note:{position: $$[$0-2].trim(), text: $$[$0].trim()}};\n \nbreak;\ncase 29:\n this.$=$$[$0].trim();yy.setAccTitle(this.$); \nbreak;\ncase 30: case 31:\n this.$=$$[$0].trim();yy.setAccDescription(this.$); \nbreak;\ncase 32: case 33:\n\n this.$ = { stmt: 'classDef', id: $$[$0-1].trim(), classes: $$[$0].trim() };\n \nbreak;\ncase 34:\n\n this.$ = { stmt: 'style', id: $$[$0-1].trim(), styleClass: $$[$0].trim() };\n \nbreak;\ncase 35:\n\n //console.log('apply class: id(s): ',$$[$0-1], ' style class: ', $$[$0]);\n this.$={ stmt: 'applyClass', id: $$[$0-1].trim(), styleClass: $$[$0].trim() };\n \nbreak;\ncase 36:\n yy.setDirection('TB');this.$={stmt:'dir', value:'TB'};\nbreak;\ncase 37:\n yy.setDirection('BT');this.$={stmt:'dir', value:'BT'};\nbreak;\ncase 38:\n yy.setDirection('RL'); this.$={stmt:'dir', value:'RL'};\nbreak;\ncase 39:\n yy.setDirection('LR');this.$={stmt:'dir', value:'LR'};\nbreak;\ncase 42: case 43:\n /* console.log('idStatement id: ', $$[$0]); */\n this.$={ stmt: 'state', id: $$[$0].trim(), type: 'default', description: '' };\n \nbreak;\ncase 44:\n /*console.log('idStatement ID STYLE_SEPARATOR ID'); */\n this.$={ stmt: 'state', id: $$[$0-2].trim(), classes: [$$[$0].trim()], type: 'default', description: '' };\n \nbreak;\ncase 45:\n /*console.log('idStatement EDGE_STATE STYLE_SEPARATOR ID'); */\n this.$={ stmt: 'state', id: $$[$0-2].trim(), classes: [$$[$0].trim()], type: 'default', description: '' };\n \nbreak;\n}\n},\ntable: [{3:1,4:$V0,5:$V1,6:$V2},{1:[3]},{3:5,4:$V0,5:$V1,6:$V2},{3:6,4:$V0,5:$V1,6:$V2},o([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],$V3,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:$V4,5:$V5,8:8,9:10,10:12,11:13,12:14,13:15,16:$V6,17:$V7,19:$V8,22:$V9,24:$Va,25:$Vb,26:$Vc,27:$Vd,28:$Ve,29:$Vf,32:25,33:$Vg,35:$Vh,37:$Vi,38:$Vj,42:$Vk,45:$Vl,48:$Vm,49:$Vn,50:$Vo,51:$Vp,54:$Vq},o($Vr,[2,5]),{9:38,10:12,11:13,12:14,13:15,16:$V6,17:$V7,19:$V8,22:$V9,24:$Va,25:$Vb,26:$Vc,27:$Vd,28:$Ve,29:$Vf,32:25,33:$Vg,35:$Vh,37:$Vi,38:$Vj,42:$Vk,45:$Vl,48:$Vm,49:$Vn,50:$Vo,51:$Vp,54:$Vq},o($Vr,[2,7]),o($Vr,[2,8]),o($Vr,[2,9]),o($Vr,[2,10]),o($Vr,[2,11]),o($Vr,[2,12],{14:[1,39],15:[1,40]}),o($Vr,[2,16]),{18:[1,41]},o($Vr,[2,18],{20:[1,42]}),{23:[1,43]},o($Vr,[2,22]),o($Vr,[2,23]),o($Vr,[2,24]),o($Vr,[2,25]),{30:44,31:[1,45],56:[1,46],57:[1,47]},o($Vr,[2,28]),{34:[1,48]},{36:[1,49]},o($Vr,[2,31]),{39:[1,50],41:[1,51]},{43:[1,52]},{46:[1,53]},o($Vs,[2,42],{55:[1,54]}),o($Vs,[2,43],{55:[1,55]}),o($Vr,[2,36]),o($Vr,[2,37]),o($Vr,[2,38]),o($Vr,[2,39]),o($Vr,[2,6]),o($Vr,[2,13]),{13:56,24:$Va,54:$Vq},o($Vr,[2,17]),o($Vt,$V3,{7:57}),{24:[1,58]},{24:[1,59]},{23:[1,60]},{24:[2,46]},{24:[2,47]},o($Vr,[2,29]),o($Vr,[2,30]),{40:[1,61]},{40:[1,62]},{44:[1,63]},{47:[1,64]},{24:[1,65]},{24:[1,66]},o($Vr,[2,14],{14:[1,67]}),{4:$V4,5:$V5,8:8,9:10,10:12,11:13,12:14,13:15,16:$V6,17:$V7,19:$V8,21:[1,68],22:$V9,24:$Va,25:$Vb,26:$Vc,27:$Vd,28:$Ve,29:$Vf,32:25,33:$Vg,35:$Vh,37:$Vi,38:$Vj,42:$Vk,45:$Vl,48:$Vm,49:$Vn,50:$Vo,51:$Vp,54:$Vq},o($Vr,[2,20],{20:[1,69]}),{31:[1,70]},{24:[1,71]},o($Vr,[2,32]),o($Vr,[2,33]),o($Vr,[2,34]),o($Vr,[2,35]),o($Vs,[2,44]),o($Vs,[2,45]),o($Vr,[2,15]),o($Vr,[2,19]),o($Vt,$V3,{7:72}),o($Vr,[2,26]),o($Vr,[2,27]),{4:$V4,5:$V5,8:8,9:10,10:12,11:13,12:14,13:15,16:$V6,17:$V7,19:$V8,21:[1,73],22:$V9,24:$Va,25:$Vb,26:$Vc,27:$Vd,28:$Ve,29:$Vf,32:25,33:$Vg,35:$Vh,37:$Vi,38:$Vj,42:$Vk,45:$Vl,48:$Vm,49:$Vn,50:$Vo,51:$Vp,54:$Vq},o($Vr,[2,21])],\ndefaultActions: {5:[2,1],6:[2,2],46:[2,46],47:[2,47]},\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: {\"case-insensitive\":true},\nperformAction: function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:return 41;\nbreak;\ncase 1:return 48;\nbreak;\ncase 2:return 49;\nbreak;\ncase 3:return 50;\nbreak;\ncase 4:return 51;\nbreak;\ncase 5:/* skip comments */\nbreak;\ncase 6:/* skip comments */{ /*console.log('Crap after close');*/ }\nbreak;\ncase 7:return 5;\nbreak;\ncase 8:/* skip all whitespace */\nbreak;\ncase 9:/* skip same-line whitespace */\nbreak;\ncase 10:/* skip comments */\nbreak;\ncase 11:/* skip comments */\nbreak;\ncase 12: this.pushState('SCALE'); /* console.log('Got scale', yy_.yytext);*/ return 17; \nbreak;\ncase 13:return 18;\nbreak;\ncase 14: this.popState(); \nbreak;\ncase 15: this.begin(\"acc_title\");return 33; \nbreak;\ncase 16: this.popState(); return \"acc_title_value\"; \nbreak;\ncase 17: this.begin(\"acc_descr\");return 35; \nbreak;\ncase 18: this.popState(); return \"acc_descr_value\"; \nbreak;\ncase 19: this.begin(\"acc_descr_multiline\"); \nbreak;\ncase 20: this.popState(); \nbreak;\ncase 21:return \"acc_descr_multiline_value\";\nbreak;\ncase 22: this.pushState('CLASSDEF'); return 38; \nbreak;\ncase 23: this.popState(); this.pushState('CLASSDEFID'); return 'DEFAULT_CLASSDEF_ID' \nbreak;\ncase 24: this.popState(); this.pushState('CLASSDEFID'); return 39 \nbreak;\ncase 25: this.popState(); return 40 \nbreak;\ncase 26: this.pushState('CLASS'); return 45; \nbreak;\ncase 27: this.popState(); this.pushState('CLASS_STYLE'); return 46 \nbreak;\ncase 28: this.popState(); return 47 \nbreak;\ncase 29: this.pushState('STYLE'); return 42; \nbreak;\ncase 30: this.popState(); this.pushState('STYLEDEF_STYLES'); return 43 \nbreak;\ncase 31: this.popState(); return 44 \nbreak;\ncase 32: this.pushState('SCALE'); /* console.log('Got scale', yy_.yytext);*/ return 17; \nbreak;\ncase 33:return 18;\nbreak;\ncase 34:this.popState();\nbreak;\ncase 35: /* console.log('Starting STATE '); */ this.pushState('STATE'); \nbreak;\ncase 36:this.popState();yy_.yytext=yy_.yytext.slice(0,-8).trim(); /*console.warn('Fork Fork: ',yy_.yytext);*/return 25;\nbreak;\ncase 37:this.popState();yy_.yytext=yy_.yytext.slice(0,-8).trim();/*console.warn('Fork Join: ',yy_.yytext);*/return 26;\nbreak;\ncase 38:this.popState();yy_.yytext=yy_.yytext.slice(0,-10).trim();/*console.warn('Fork Join: ',yy_.yytext);*/return 27;\nbreak;\ncase 39:this.popState();yy_.yytext=yy_.yytext.slice(0,-8).trim();/*console.warn('Fork Fork: ',yy_.yytext);*/return 25;\nbreak;\ncase 40:this.popState();yy_.yytext=yy_.yytext.slice(0,-8).trim();/*console.warn('Fork Join: ',yy_.yytext);*/return 26;\nbreak;\ncase 41:this.popState();yy_.yytext=yy_.yytext.slice(0,-10).trim();/*console.warn('Fork Join: ',yy_.yytext);*/return 27;\nbreak;\ncase 42: return 48;\nbreak;\ncase 43: return 49;\nbreak;\ncase 44: return 50;\nbreak;\ncase 45: return 51;\nbreak;\ncase 46: /* console.log('Starting STATE_STRING'); */ this.pushState(\"STATE_STRING\"); \nbreak;\ncase 47: this.pushState('STATE_ID'); /* console.log('pushState(STATE_ID)'); */ return \"AS\"; \nbreak;\ncase 48: this.popState(); /* console.log('STATE_ID', yy_.yytext); */ return \"ID\"; \nbreak;\ncase 49: this.popState(); \nbreak;\ncase 50: /* console.log('Long description:', yy_.yytext); */ return \"STATE_DESCR\"; \nbreak;\ncase 51: /* console.log('COMPOSIT_STATE', yy_.yytext); */ return 19; \nbreak;\ncase 52: this.popState(); \nbreak;\ncase 53: this.popState(); this.pushState('struct'); /* console.log('begin struct', yy_.yytext); */ return 20; \nbreak;\ncase 54:/* skip comments inside state*/\nbreak;\ncase 55: /*console.log('Ending struct');*/ this.popState(); return 21;\nbreak;\ncase 56:/* nothing */\nbreak;\ncase 57: this.begin('NOTE'); return 29; \nbreak;\ncase 58: this.popState(); this.pushState('NOTE_ID'); return 56; \nbreak;\ncase 59: this.popState(); this.pushState('NOTE_ID'); return 57; \nbreak;\ncase 60: this.popState(); this.pushState('FLOATING_NOTE'); \nbreak;\ncase 61: this.popState(); this.pushState('FLOATING_NOTE_ID'); return \"AS\"; \nbreak;\ncase 62:/**/\nbreak;\ncase 63: /* console.log('Floating note text: ', yy_.yytext); */ return \"NOTE_TEXT\"; \nbreak;\ncase 64: this.popState(); /* console.log('Floating note ID', yy_.yytext);*/ return \"ID\"; \nbreak;\ncase 65: this.popState(); this.pushState('NOTE_TEXT'); /*console.log('Got ID for note', yy_.yytext);*/ return 24; \nbreak;\ncase 66: this.popState(); /* console.log('Got NOTE_TEXT for note',yy_.yytext);*/yy_.yytext = yy_.yytext.substr(2).trim(); return 31; \nbreak;\ncase 67: this.popState(); /* console.log('Got NOTE_TEXT for note',yy_.yytext);*/yy_.yytext = yy_.yytext.slice(0,-8).trim(); return 31; \nbreak;\ncase 68: /* console.log('Got state diagram', yy_.yytext,'#'); */ return 6; \nbreak;\ncase 69: /* console.log('Got state diagram', yy_.yytext,'#'); */ return 6; \nbreak;\ncase 70: /* console.log('HIDE_EMPTY', yy_.yytext,'#'); */ return 16; \nbreak;\ncase 71: /* console.log('EDGE_STATE=',yy_.yytext); */ return 54; \nbreak;\ncase 72: /* console.log('=>ID=',yy_.yytext); */ return 24; \nbreak;\ncase 73: yy_.yytext = yy_.yytext.trim(); /* console.log('Descr = ', yy_.yytext); */ return 14; \nbreak;\ncase 74:return 15;\nbreak;\ncase 75:return 28;\nbreak;\ncase 76:return 55;\nbreak;\ncase 77:return 5;\nbreak;\ncase 78:return 'INVALID';\nbreak;\n}\n},\nrules: [/^(?:default\\b)/i,/^(?:.*direction\\s+TB[^\\n]*)/i,/^(?:.*direction\\s+BT[^\\n]*)/i,/^(?:.*direction\\s+RL[^\\n]*)/i,/^(?:.*direction\\s+LR[^\\n]*)/i,/^(?:%%(?!\\{)[^\\n]*)/i,/^(?:[^\\}]%%[^\\n]*)/i,/^(?:[\\n]+)/i,/^(?:[\\s]+)/i,/^(?:((?!\\n)\\s)+)/i,/^(?:#[^\\n]*)/i,/^(?:%[^\\n]*)/i,/^(?:scale\\s+)/i,/^(?:\\d+)/i,/^(?:\\s+width\\b)/i,/^(?:accTitle\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*:\\s*)/i,/^(?:(?!\\n||)*[^\\n]*)/i,/^(?:accDescr\\s*\\{\\s*)/i,/^(?:[\\}])/i,/^(?:[^\\}]*)/i,/^(?:classDef\\s+)/i,/^(?:DEFAULT\\s+)/i,/^(?:\\w+\\s+)/i,/^(?:[^\\n]*)/i,/^(?:class\\s+)/i,/^(?:(\\w+)+((,\\s*\\w+)*))/i,/^(?:[^\\n]*)/i,/^(?:style\\s+)/i,/^(?:[\\w,]+\\s+)/i,/^(?:[^\\n]*)/i,/^(?:scale\\s+)/i,/^(?:\\d+)/i,/^(?:\\s+width\\b)/i,/^(?:state\\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\\[\\[fork\\]\\])/i,/^(?:.*\\[\\[join\\]\\])/i,/^(?:.*\\[\\[choice\\]\\])/i,/^(?:.*direction\\s+TB[^\\n]*)/i,/^(?:.*direction\\s+BT[^\\n]*)/i,/^(?:.*direction\\s+RL[^\\n]*)/i,/^(?:.*direction\\s+LR[^\\n]*)/i,/^(?:[\"])/i,/^(?:\\s*as\\s+)/i,/^(?:[^\\n\\{]*)/i,/^(?:[\"])/i,/^(?:[^\"]*)/i,/^(?:[^\\n\\s\\{]+)/i,/^(?:\\n)/i,/^(?:\\{)/i,/^(?:%%(?!\\{)[^\\n]*)/i,/^(?:\\})/i,/^(?:[\\n])/i,/^(?:note\\s+)/i,/^(?:left of\\b)/i,/^(?:right of\\b)/i,/^(?:\")/i,/^(?:\\s*as\\s*)/i,/^(?:[\"])/i,/^(?:[^\"]*)/i,/^(?:[^\\n]*)/i,/^(?:\\s*[^:\\n\\s\\-]+)/i,/^(?:\\s*:[^:\\n;]+)/i,/^(?:[\\s\\S]*?end note\\b)/i,/^(?:stateDiagram\\s+)/i,/^(?:stateDiagram-v2\\s+)/i,/^(?:hide empty description\\b)/i,/^(?:\\[\\*\\])/i,/^(?:[^:\\n\\s\\-\\{]+)/i,/^(?:\\s*:[^:\\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],\nconditions: {\"LINE\":{\"rules\":[9,10],\"inclusive\":false},\"struct\":{\"rules\":[9,10,22,26,29,35,42,43,44,45,54,55,56,57,71,72,73,74,75],\"inclusive\":false},\"FLOATING_NOTE_ID\":{\"rules\":[64],\"inclusive\":false},\"FLOATING_NOTE\":{\"rules\":[61,62,63],\"inclusive\":false},\"NOTE_TEXT\":{\"rules\":[66,67],\"inclusive\":false},\"NOTE_ID\":{\"rules\":[65],\"inclusive\":false},\"NOTE\":{\"rules\":[58,59,60],\"inclusive\":false},\"STYLEDEF_STYLEOPTS\":{\"rules\":[],\"inclusive\":false},\"STYLEDEF_STYLES\":{\"rules\":[31],\"inclusive\":false},\"STYLE_IDS\":{\"rules\":[],\"inclusive\":false},\"STYLE\":{\"rules\":[30],\"inclusive\":false},\"CLASS_STYLE\":{\"rules\":[28],\"inclusive\":false},\"CLASS\":{\"rules\":[27],\"inclusive\":false},\"CLASSDEFID\":{\"rules\":[25],\"inclusive\":false},\"CLASSDEF\":{\"rules\":[23,24],\"inclusive\":false},\"acc_descr_multiline\":{\"rules\":[20,21],\"inclusive\":false},\"acc_descr\":{\"rules\":[18],\"inclusive\":false},\"acc_title\":{\"rules\":[16],\"inclusive\":false},\"SCALE\":{\"rules\":[13,14,33,34],\"inclusive\":false},\"ALIAS\":{\"rules\":[],\"inclusive\":false},\"STATE_ID\":{\"rules\":[48],\"inclusive\":false},\"STATE_STRING\":{\"rules\":[49,50],\"inclusive\":false},\"FORK_STATE\":{\"rules\":[],\"inclusive\":false},\"STATE\":{\"rules\":[9,10,36,37,38,39,40,41,46,47,51,52,53],\"inclusive\":false},\"ID\":{\"rules\":[9,10],\"inclusive\":false},\"INITIAL\":{\"rules\":[0,1,2,3,4,5,6,7,8,10,11,12,15,17,19,22,26,29,32,35,53,57,68,69,70,71,72,73,74,76,77,78],\"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\tparser.parser = parser;\n\texport { parser };\n\texport default parser;\n\t", "/**\n * Constants common to all State Diagram code\n */\n\n// default diagram direction\nexport const DEFAULT_DIAGRAM_DIRECTION = 'LR';\n\n// default direction for any nested documents (composites)\nexport const DEFAULT_NESTED_DOC_DIR = 'TB';\n\n// parsed statement type for a state\nexport const STMT_STATE = 'state';\n// parsed statement type for a relation\nexport const STMT_RELATION = 'relation';\n// parsed statement type for a classDef\nexport const STMT_CLASSDEF = 'classDef';\nexport const STMT_STYLEDEF = 'style';\n// parsed statement type for applyClass\nexport const STMT_APPLYCLASS = 'applyClass';\n\nexport const DEFAULT_STATE_TYPE = 'default';\nexport const DIVIDER_TYPE = 'divider';\n\n// Graph edge settings\nexport const G_EDGE_STYLE = 'fill:none';\nexport const G_EDGE_ARROWHEADSTYLE = 'fill: #333';\nexport const G_EDGE_LABELPOS = 'c';\nexport const G_EDGE_LABELTYPE = 'text';\nexport const G_EDGE_THICKNESS = 'normal';\n\nexport const SHAPE_STATE = 'rect';\nexport const SHAPE_STATE_WITH_DESC = 'rectWithTitle';\nexport const SHAPE_START = 'stateStart';\nexport const SHAPE_END = 'stateEnd';\nexport const SHAPE_DIVIDER = 'divider';\nexport const SHAPE_GROUP = 'roundedWithTitle';\nexport const SHAPE_NOTE = 'note';\nexport const SHAPE_NOTEGROUP = 'noteGroup';\n\n// CSS classes\nexport const CSS_DIAGRAM = 'statediagram';\nexport const CSS_STATE = 'state';\nexport const CSS_DIAGRAM_STATE = `${CSS_DIAGRAM}-${CSS_STATE}`;\nexport const CSS_EDGE = 'transition';\nexport const CSS_NOTE = 'note';\nexport const CSS_NOTE_EDGE = 'note-edge';\nexport const CSS_EDGE_NOTE_EDGE = `${CSS_EDGE} ${CSS_NOTE_EDGE}`;\nexport const CSS_DIAGRAM_NOTE = `${CSS_DIAGRAM}-${CSS_NOTE}`;\nexport const CSS_CLUSTER = 'cluster';\nexport const CSS_DIAGRAM_CLUSTER = `${CSS_DIAGRAM}-${CSS_CLUSTER}`;\nexport const CSS_CLUSTER_ALT = 'cluster-alt';\nexport const CSS_DIAGRAM_CLUSTER_ALT = `${CSS_DIAGRAM}-${CSS_CLUSTER_ALT}`;\n\nexport const PARENT = 'parent';\nexport const NOTE = 'note';\nexport const DOMID_STATE = 'state';\nexport const DOMID_TYPE_SPACER = '----';\nexport const NOTE_ID = `${DOMID_TYPE_SPACER}${NOTE}`;\nexport const PARENT_ID = `${DOMID_TYPE_SPACER}${PARENT}`;\n// --------------------------------------\n\nexport default {\n DEFAULT_DIAGRAM_DIRECTION,\n DEFAULT_NESTED_DOC_DIR,\n STMT_STATE,\n STMT_RELATION,\n STMT_CLASSDEF,\n STMT_STYLEDEF,\n STMT_APPLYCLASS,\n DEFAULT_STATE_TYPE,\n DIVIDER_TYPE,\n G_EDGE_STYLE,\n G_EDGE_ARROWHEADSTYLE,\n G_EDGE_LABELPOS,\n G_EDGE_LABELTYPE,\n G_EDGE_THICKNESS,\n CSS_EDGE,\n CSS_DIAGRAM,\n SHAPE_STATE,\n SHAPE_STATE_WITH_DESC,\n SHAPE_START,\n SHAPE_END,\n SHAPE_DIVIDER,\n SHAPE_GROUP,\n SHAPE_NOTE,\n SHAPE_NOTEGROUP,\n CSS_STATE,\n CSS_DIAGRAM_STATE,\n CSS_NOTE,\n CSS_NOTE_EDGE,\n CSS_EDGE_NOTE_EDGE,\n CSS_DIAGRAM_NOTE,\n CSS_CLUSTER,\n CSS_DIAGRAM_CLUSTER,\n CSS_CLUSTER_ALT,\n CSS_DIAGRAM_CLUSTER_ALT,\n PARENT,\n NOTE,\n DOMID_STATE,\n DOMID_TYPE_SPACER,\n NOTE_ID,\n PARENT_ID,\n};\n", "import { getConfig } from '../../diagram-api/diagramAPI.js';\nimport type { DiagramStyleClassDef } from '../../diagram-api/types.js';\nimport { log } from '../../logger.js';\nimport { getDiagramElement } from '../../rendering-util/insertElementsForSize.js';\nimport { render } from '../../rendering-util/render.js';\nimport { setupViewPortForSVG } from '../../rendering-util/setupViewPortForSVG.js';\nimport type { LayoutData } from '../../rendering-util/types.js';\nimport utils from '../../utils.js';\nimport { CSS_DIAGRAM, DEFAULT_NESTED_DOC_DIR } from './stateCommon.js';\n\n/**\n * Get the direction from the statement items.\n * Look through all of the documents (docs) in the parsedItems\n * Because is a _document_ direction, the default direction is not necessarily the same as the overall default _diagram_ direction.\n * @param parsedItem - the parsed statement item to look through\n * @param defaultDir - the direction to use if none is found\n * @returns The direction to use\n */\nexport const getDir = (parsedItem: any, defaultDir = DEFAULT_NESTED_DOC_DIR) => {\n if (!parsedItem.doc) {\n return defaultDir;\n }\n\n let dir = defaultDir;\n\n for (const parsedItemDoc of parsedItem.doc) {\n if (parsedItemDoc.stmt === 'dir') {\n dir = parsedItemDoc.value;\n }\n }\n\n return dir;\n};\n\nexport const getClasses = function (\n text: string,\n diagramObj: any\n): Map {\n diagramObj.db.extract(diagramObj.db.getRootDocV2());\n return diagramObj.db.getClasses();\n};\n\nexport const draw = async function (text: string, id: string, _version: string, diag: any) {\n log.info('REF0:');\n log.info('Drawing state diagram (v2)', id);\n const { securityLevel, state: conf, layout } = getConfig();\n // Extracting the data from the parsed structure into a more usable form\n // Not related to the refactoring, but this is the first step in the rendering process\n diag.db.extract(diag.db.getRootDocV2());\n\n //const DIR = getDir(diag.db.getRootDocV2());\n\n // The getData method provided in all supported diagrams is used to extract the data from the parsed structure\n // into the Layout data format\n const data4Layout = diag.db.getData() as LayoutData;\n\n // Create the root SVG - the element is the div containing the SVG element\n const svg = getDiagramElement(id, securityLevel);\n\n data4Layout.type = diag.type;\n data4Layout.layoutAlgorithm = layout;\n\n // TODO: Should we move these two to baseConfig? These types are not there in StateConfig.\n\n data4Layout.nodeSpacing = conf?.nodeSpacing || 50;\n data4Layout.rankSpacing = conf?.rankSpacing || 50;\n data4Layout.markers = ['barb'];\n data4Layout.diagramId = id;\n // console.log('REF1:', data4Layout);\n await render(data4Layout, svg);\n const padding = 8;\n utils.insertTitle(\n svg,\n 'statediagramTitleText',\n conf?.titleTopMargin ?? 25,\n diag.db.getDiagramTitle()\n );\n setupViewPortForSVG(svg, padding, CSS_DIAGRAM, conf?.useMaxWidth ?? true);\n};\n\nexport default {\n getClasses,\n draw,\n getDir,\n};\n", "import { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { log } from '../../logger.js';\nimport common from '../common/common.js';\nimport {\n CSS_DIAGRAM_CLUSTER,\n CSS_DIAGRAM_CLUSTER_ALT,\n CSS_DIAGRAM_NOTE,\n CSS_DIAGRAM_STATE,\n CSS_EDGE,\n CSS_EDGE_NOTE_EDGE,\n DEFAULT_NESTED_DOC_DIR,\n DEFAULT_STATE_TYPE,\n DIVIDER_TYPE,\n DOMID_STATE,\n DOMID_TYPE_SPACER,\n G_EDGE_ARROWHEADSTYLE,\n G_EDGE_LABELPOS,\n G_EDGE_LABELTYPE,\n G_EDGE_STYLE,\n G_EDGE_THICKNESS,\n NOTE,\n NOTE_ID,\n PARENT,\n PARENT_ID,\n SHAPE_DIVIDER,\n SHAPE_END,\n SHAPE_GROUP,\n SHAPE_NOTE,\n SHAPE_NOTEGROUP,\n SHAPE_START,\n SHAPE_STATE,\n SHAPE_STATE_WITH_DESC,\n STMT_RELATION,\n STMT_STATE,\n} from './stateCommon.js';\n\n// List of nodes created from the parsed diagram statement items\nlet nodeDb = new Map();\n\nlet graphItemCount = 0; // used to construct ids, etc.\n\n/**\n * Create a standard string for the dom ID of an item.\n * If a type is given, insert that before the counter, preceded by the type spacer\n *\n * @param itemId\n * @param counter\n * @param {string | null} type\n * @param typeSpacer\n * @returns {string}\n */\nexport function stateDomId(itemId = '', counter = 0, type = '', typeSpacer = DOMID_TYPE_SPACER) {\n const typeStr = type !== null && type.length > 0 ? `${typeSpacer}${type}` : '';\n return `${DOMID_STATE}-${itemId}${typeStr}-${counter}`;\n}\n\nconst setupDoc = (parentParsedItem, doc, diagramStates, nodes, edges, altFlag, look, classes) => {\n // graphItemCount = 0;\n log.trace('items', doc);\n doc.forEach((item) => {\n switch (item.stmt) {\n case STMT_STATE:\n dataFetcher(parentParsedItem, item, diagramStates, nodes, edges, altFlag, look, classes);\n break;\n case DEFAULT_STATE_TYPE:\n dataFetcher(parentParsedItem, item, diagramStates, nodes, edges, altFlag, look, classes);\n break;\n case STMT_RELATION:\n {\n dataFetcher(\n parentParsedItem,\n item.state1,\n diagramStates,\n nodes,\n edges,\n altFlag,\n look,\n classes\n );\n dataFetcher(\n parentParsedItem,\n item.state2,\n diagramStates,\n nodes,\n edges,\n altFlag,\n look,\n classes\n );\n const edgeData = {\n id: 'edge' + graphItemCount,\n start: item.state1.id,\n end: item.state2.id,\n arrowhead: 'normal',\n arrowTypeEnd: 'arrow_barb',\n style: G_EDGE_STYLE,\n labelStyle: '',\n label: common.sanitizeText(item.description, getConfig()),\n arrowheadStyle: G_EDGE_ARROWHEADSTYLE,\n labelpos: G_EDGE_LABELPOS,\n labelType: G_EDGE_LABELTYPE,\n thickness: G_EDGE_THICKNESS,\n classes: CSS_EDGE,\n look,\n };\n edges.push(edgeData);\n graphItemCount++;\n }\n break;\n }\n });\n};\n\n/**\n * Get the direction from the statement items.\n * Look through all of the documents (docs) in the parsedItems\n * Because is a _document_ direction, the default direction is not necessarily the same as the overall default _diagram_ direction.\n * @param {object[]} parsedItem - the parsed statement item to look through\n * @param [defaultDir] - the direction to use if none is found\n * @returns {string}\n */\nconst getDir = (parsedItem, defaultDir = DEFAULT_NESTED_DOC_DIR) => {\n let dir = defaultDir;\n if (parsedItem.doc) {\n for (const parsedItemDoc of parsedItem.doc) {\n if (parsedItemDoc.stmt === 'dir') {\n dir = parsedItemDoc.value;\n }\n }\n }\n return dir;\n};\n\nfunction insertOrUpdateNode(nodes, nodeData, classes) {\n if (!nodeData.id || nodeData.id === ' ' || nodeData.id === '') {\n return;\n }\n\n //Populate node style attributes if nodeData has classes defined\n if (nodeData.cssClasses) {\n if (!Array.isArray(nodeData.cssCompiledStyles)) {\n nodeData.cssCompiledStyles = [];\n }\n\n nodeData.cssClasses.split(' ').forEach((cssClass) => {\n if (classes.get(cssClass)) {\n const classDef = classes.get(cssClass);\n nodeData.cssCompiledStyles = [...nodeData.cssCompiledStyles, ...classDef.styles];\n }\n });\n }\n const existingNodeData = nodes.find((node) => node.id === nodeData.id);\n if (existingNodeData) {\n //update the existing nodeData\n Object.assign(existingNodeData, nodeData);\n } else {\n nodes.push(nodeData);\n }\n}\n/**\n * Get classes from the db for the info item.\n * If there aren't any or if dbInfoItem isn't defined, return an empty string.\n * Else create 1 string from the list of classes found\n *\n * @param {undefined | null | object} dbInfoItem\n * @returns {string}\n */\nfunction getClassesFromDbInfo(dbInfoItem) {\n return dbInfoItem?.classes?.join(' ') ?? '';\n}\n\nfunction getStylesFromDbInfo(dbInfoItem) {\n return dbInfoItem?.styles ?? [];\n}\n\nexport const dataFetcher = (\n parent,\n parsedItem,\n diagramStates,\n nodes,\n edges,\n altFlag,\n look,\n classes\n) => {\n const itemId = parsedItem.id;\n const dbState = diagramStates.get(itemId);\n const classStr = getClassesFromDbInfo(dbState);\n const style = getStylesFromDbInfo(dbState);\n\n log.info('dataFetcher parsedItem', parsedItem, dbState, style);\n\n if (itemId !== 'root') {\n let shape = SHAPE_STATE;\n // The if === true / false can be removed if we can guarantee that the parsedItem.start is always a boolean\n if (parsedItem.start === true) {\n shape = SHAPE_START;\n } else if (parsedItem.start === false) {\n shape = SHAPE_END;\n }\n if (parsedItem.type !== DEFAULT_STATE_TYPE) {\n shape = parsedItem.type;\n }\n\n // Add the node to our list (nodeDb)\n if (!nodeDb.get(itemId)) {\n nodeDb.set(itemId, {\n id: itemId,\n shape,\n description: common.sanitizeText(itemId, getConfig()),\n cssClasses: `${classStr} ${CSS_DIAGRAM_STATE}`,\n cssStyles: style,\n });\n }\n\n const newNode = nodeDb.get(itemId);\n\n // Save data for description and group so that for instance a statement without description overwrites\n // one with description @todo TODO What does this mean? If important, add a test for it\n\n // Build of the array of description strings\n if (parsedItem.description) {\n if (Array.isArray(newNode.description)) {\n // There already is an array of strings,add to it\n newNode.shape = SHAPE_STATE_WITH_DESC;\n newNode.description.push(parsedItem.description);\n } else {\n if (newNode.description?.length > 0) {\n // if there is a description already transform it to an array\n newNode.shape = SHAPE_STATE_WITH_DESC;\n if (newNode.description === itemId) {\n // If the previous description was this, remove it\n newNode.description = [parsedItem.description];\n } else {\n newNode.description = [newNode.description, parsedItem.description];\n }\n } else {\n newNode.shape = SHAPE_STATE;\n newNode.description = parsedItem.description;\n }\n }\n newNode.description = common.sanitizeTextOrArray(newNode.description, getConfig());\n }\n\n // If there's only 1 description entry, just use a regular state shape\n if (newNode.description?.length === 1 && newNode.shape === SHAPE_STATE_WITH_DESC) {\n if (newNode.type === 'group') {\n newNode.shape = SHAPE_GROUP;\n } else {\n newNode.shape = SHAPE_STATE;\n }\n }\n\n // group\n if (!newNode.type && parsedItem.doc) {\n log.info('Setting cluster for XCX', itemId, getDir(parsedItem));\n newNode.type = 'group';\n newNode.isGroup = true;\n newNode.dir = getDir(parsedItem);\n newNode.shape = parsedItem.type === DIVIDER_TYPE ? SHAPE_DIVIDER : SHAPE_GROUP;\n newNode.cssClasses = `${newNode.cssClasses} ${CSS_DIAGRAM_CLUSTER} ${altFlag ? CSS_DIAGRAM_CLUSTER_ALT : ''}`;\n }\n\n // This is what will be added to the graph\n const nodeData = {\n labelStyle: '',\n shape: newNode.shape,\n label: newNode.description,\n cssClasses: newNode.cssClasses,\n cssCompiledStyles: [],\n cssStyles: newNode.cssStyles,\n id: itemId,\n dir: newNode.dir,\n domId: stateDomId(itemId, graphItemCount),\n type: newNode.type,\n isGroup: newNode.type === 'group',\n padding: 8,\n rx: 10,\n ry: 10,\n look,\n };\n\n // Clear the label for dividers who have no description\n if (nodeData.shape === SHAPE_DIVIDER) {\n nodeData.label = '';\n }\n\n if (parent && parent.id !== 'root') {\n log.trace('Setting node ', itemId, ' to be child of its parent ', parent.id);\n nodeData.parentId = parent.id;\n }\n\n nodeData.centerLabel = true;\n\n if (parsedItem.note) {\n // Todo: set random id\n const noteData = {\n labelStyle: '',\n shape: SHAPE_NOTE,\n label: parsedItem.note.text,\n cssClasses: CSS_DIAGRAM_NOTE,\n // useHtmlLabels: false,\n cssStyles: [],\n cssCompilesStyles: [],\n id: itemId + NOTE_ID + '-' + graphItemCount,\n domId: stateDomId(itemId, graphItemCount, NOTE),\n type: newNode.type,\n isGroup: newNode.type === 'group',\n padding: getConfig().flowchart.padding,\n look,\n position: parsedItem.note.position,\n };\n const parentNodeId = itemId + PARENT_ID;\n const groupData = {\n labelStyle: '',\n shape: SHAPE_NOTEGROUP,\n label: parsedItem.note.text,\n cssClasses: newNode.cssClasses,\n cssStyles: [],\n id: itemId + PARENT_ID,\n domId: stateDomId(itemId, graphItemCount, PARENT),\n type: 'group',\n isGroup: true,\n padding: 16, //getConfig().flowchart.padding\n look,\n position: parsedItem.note.position,\n };\n graphItemCount++;\n\n //add parent id to groupData\n groupData.id = parentNodeId;\n //add parent id to noteData\n noteData.parentId = parentNodeId;\n //nodeData.parentId = parentNodeId;\n\n //insert groupData\n insertOrUpdateNode(nodes, groupData, classes);\n //insert noteData\n insertOrUpdateNode(nodes, noteData, classes);\n //insert nodeData\n insertOrUpdateNode(nodes, nodeData, classes);\n\n let from = itemId;\n let to = noteData.id;\n\n if (parsedItem.note.position === 'left of') {\n from = noteData.id;\n to = itemId;\n }\n\n edges.push({\n id: from + '-' + to,\n start: from,\n end: to,\n arrowhead: 'none',\n arrowTypeEnd: '',\n style: G_EDGE_STYLE,\n labelStyle: '',\n classes: CSS_EDGE_NOTE_EDGE,\n arrowheadStyle: G_EDGE_ARROWHEADSTYLE,\n labelpos: G_EDGE_LABELPOS,\n labelType: G_EDGE_LABELTYPE,\n thickness: G_EDGE_THICKNESS,\n look,\n });\n } else {\n insertOrUpdateNode(nodes, nodeData, classes);\n }\n }\n if (parsedItem.doc) {\n log.trace('Adding nodes children ');\n setupDoc(parsedItem, parsedItem.doc, diagramStates, nodes, edges, !altFlag, look, classes);\n }\n};\n\nexport const reset = () => {\n nodeDb.clear();\n graphItemCount = 0;\n};\n", "import { log } from '../../logger.js';\nimport { generateId } from '../../utils.js';\nimport common from '../common/common.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport {\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n clear as commonClear,\n setDiagramTitle,\n getDiagramTitle,\n} from '../common/commonDb.js';\nimport { dataFetcher, reset as resetDataFetching } from './dataFetcher.js';\nimport { getDir } from './stateRenderer-v3-unified.js';\n\nimport {\n DEFAULT_DIAGRAM_DIRECTION,\n STMT_STATE,\n STMT_RELATION,\n STMT_CLASSDEF,\n STMT_STYLEDEF,\n STMT_APPLYCLASS,\n DEFAULT_STATE_TYPE,\n DIVIDER_TYPE,\n} from './stateCommon.js';\n\nconst START_NODE = '[*]';\nconst START_TYPE = 'start';\nconst END_NODE = START_NODE;\nconst END_TYPE = 'end';\n\nconst COLOR_KEYWORD = 'color';\nconst FILL_KEYWORD = 'fill';\nconst BG_FILL = 'bgFill';\nconst STYLECLASS_SEP = ',';\n\n/**\n * Returns a new list of classes.\n * In the future, this can be replaced with a class common to all diagrams.\n * ClassDef information = { id: id, styles: [], textStyles: [] }\n *\n * @returns {Map}\n */\nfunction newClassesList() {\n return new Map();\n}\n\nlet nodes = [];\nlet edges = [];\n\nlet direction = DEFAULT_DIAGRAM_DIRECTION;\nlet rootDoc = [];\nlet classes = newClassesList(); // style classes defined by a classDef\n\n// --------------------------------------\n\nconst newDoc = () => {\n return {\n /** @type {{ id1: string, id2: string, relationTitle: string }[]} */\n relations: [],\n states: new Map(),\n documents: {},\n };\n};\nlet documents = {\n root: newDoc(),\n};\n\nlet currentDocument = documents.root;\nlet startEndCount = 0;\nlet dividerCnt = 0;\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 clone = (o) => JSON.parse(JSON.stringify(o));\n\nconst setRootDoc = (o) => {\n log.info('Setting root doc', o);\n // rootDoc = { id: 'root', doc: o };\n rootDoc = o;\n};\n\nconst getRootDoc = () => rootDoc;\n\nconst docTranslator = (parent, node, first) => {\n if (node.stmt === STMT_RELATION) {\n docTranslator(parent, node.state1, true);\n docTranslator(parent, node.state2, false);\n } else {\n if (node.stmt === STMT_STATE) {\n if (node.id === '[*]') {\n node.id = first ? parent.id + '_start' : parent.id + '_end';\n node.start = first;\n } else {\n // This is just a plain state, not a start or end\n node.id = node.id.trim();\n }\n }\n\n if (node.doc) {\n const doc = [];\n // Check for concurrency\n let currentDoc = [];\n let i;\n for (i = 0; i < node.doc.length; i++) {\n if (node.doc[i].type === DIVIDER_TYPE) {\n // debugger;\n const newNode = clone(node.doc[i]);\n newNode.doc = clone(currentDoc);\n doc.push(newNode);\n currentDoc = [];\n } else {\n currentDoc.push(node.doc[i]);\n }\n }\n\n // If any divider was encountered\n if (doc.length > 0 && currentDoc.length > 0) {\n const newNode = {\n stmt: STMT_STATE,\n id: generateId(),\n type: 'divider',\n doc: clone(currentDoc),\n };\n doc.push(clone(newNode));\n node.doc = doc;\n }\n\n node.doc.forEach((docNode) => docTranslator(node, docNode, true));\n }\n }\n};\nconst getRootDocV2 = () => {\n docTranslator({ id: 'root' }, { id: 'root', doc: rootDoc }, true);\n return { id: 'root', doc: rootDoc };\n // Here\n};\n\n/**\n * Convert all of the statements (stmts) that were parsed into states and relationships.\n * This is done because a state diagram may have nested sections,\n * where each section is a 'document' and has its own set of statements.\n * Ex: the section within a fork has its own statements, and incoming and outgoing statements\n * refer to the fork as a whole (document).\n * See the parser grammar: the definition of a document is a document then a 'line', where a line can be a statement.\n * This will push the statement into the list of statements for the current document.\n *\n * @param _doc\n */\nconst extract = (_doc) => {\n // const res = { states: [], relations: [] };\n let doc;\n if (_doc.doc) {\n doc = _doc.doc;\n } else {\n doc = _doc;\n }\n // let doc = root.doc;\n // if (!doc) {\n // doc = root;\n // }\n log.info(doc);\n clear(true);\n\n log.info('Extract initial document:', doc);\n\n doc.forEach((item) => {\n log.warn('Statement', item.stmt);\n switch (item.stmt) {\n case STMT_STATE:\n addState(\n item.id.trim(),\n item.type,\n item.doc,\n item.description,\n item.note,\n item.classes,\n item.styles,\n item.textStyles\n );\n break;\n case STMT_RELATION:\n addRelation(item.state1, item.state2, item.description);\n break;\n case STMT_CLASSDEF:\n addStyleClass(item.id.trim(), item.classes);\n break;\n case STMT_STYLEDEF:\n {\n const ids = item.id.trim().split(',');\n const styles = item.styleClass.split(',');\n ids.forEach((id) => {\n let foundState = getState(id);\n if (foundState === undefined) {\n const trimmedId = id.trim();\n addState(trimmedId);\n foundState = getState(trimmedId);\n }\n foundState.styles = styles.map((s) => s.replace(/;/g, '')?.trim());\n });\n }\n break;\n case STMT_APPLYCLASS:\n setCssClass(item.id.trim(), item.styleClass);\n break;\n }\n });\n\n const diagramStates = getStates();\n const config = getConfig();\n const look = config.look;\n resetDataFetching();\n dataFetcher(undefined, getRootDocV2(), diagramStates, nodes, edges, true, look, classes);\n nodes.forEach((node) => {\n if (Array.isArray(node.label)) {\n // add the rest as description\n node.description = node.label.slice(1);\n if (node.isGroup && node.description.length > 0) {\n throw new Error(\n 'Group nodes can only have label. Remove the additional description for node [' +\n node.id +\n ']'\n );\n }\n // add first description as label\n node.label = node.label[0];\n }\n });\n};\n\n/**\n * Function called by parser when a node definition has been found.\n *\n * @param {null | string} id\n * @param {null | string} type\n * @param {null | string} doc\n * @param {null | string | string[]} descr - description for the state. Can be a string or a list or strings\n * @param {null | string} note\n * @param {null | string | string[]} classes - class styles to apply to this state. Can be a string (1 style) or an array of styles. If it's just 1 class, convert it to an array of that 1 class.\n * @param {null | string | string[]} styles - styles to apply to this state. Can be a string (1 style) or an array of styles. If it's just 1 style, convert it to an array of that 1 style.\n * @param {null | string | string[]} textStyles - text styles to apply to this state. Can be a string (1 text test) or an array of text styles. If it's just 1 text style, convert it to an array of that 1 text style.\n */\nexport const addState = function (\n id,\n type = DEFAULT_STATE_TYPE,\n doc = null,\n descr = null,\n note = null,\n classes = null,\n styles = null,\n textStyles = null\n) {\n const trimmedId = id?.trim();\n // add the state if needed\n if (!currentDocument.states.has(trimmedId)) {\n log.info('Adding state ', trimmedId, descr);\n currentDocument.states.set(trimmedId, {\n id: trimmedId,\n descriptions: [],\n type,\n doc,\n note,\n classes: [],\n styles: [],\n textStyles: [],\n });\n } else {\n if (!currentDocument.states.get(trimmedId).doc) {\n currentDocument.states.get(trimmedId).doc = doc;\n }\n if (!currentDocument.states.get(trimmedId).type) {\n currentDocument.states.get(trimmedId).type = type;\n }\n }\n\n if (descr) {\n log.info('Setting state description', trimmedId, descr);\n if (typeof descr === 'string') {\n addDescription(trimmedId, descr.trim());\n }\n\n if (typeof descr === 'object') {\n descr.forEach((des) => addDescription(trimmedId, des.trim()));\n }\n }\n\n if (note) {\n const doc2 = currentDocument.states.get(trimmedId);\n doc2.note = note;\n doc2.note.text = common.sanitizeText(doc2.note.text, getConfig());\n }\n\n if (classes) {\n log.info('Setting state classes', trimmedId, classes);\n const classesList = typeof classes === 'string' ? [classes] : classes;\n classesList.forEach((cssClass) => setCssClass(trimmedId, cssClass.trim()));\n }\n\n if (styles) {\n log.info('Setting state styles', trimmedId, styles);\n const stylesList = typeof styles === 'string' ? [styles] : styles;\n stylesList.forEach((style) => setStyle(trimmedId, style.trim()));\n }\n\n if (textStyles) {\n log.info('Setting state styles', trimmedId, styles);\n const textStylesList = typeof textStyles === 'string' ? [textStyles] : textStyles;\n textStylesList.forEach((textStyle) => setTextStyle(trimmedId, textStyle.trim()));\n }\n};\n\nexport const clear = function (saveCommon) {\n nodes = [];\n edges = [];\n documents = {\n root: newDoc(),\n };\n currentDocument = documents.root;\n\n // number of start and end nodes; used to construct ids\n startEndCount = 0;\n classes = newClassesList();\n if (!saveCommon) {\n commonClear();\n }\n};\n\nexport const getState = function (id) {\n return currentDocument.states.get(id);\n};\n\nexport const getStates = function () {\n return currentDocument.states;\n};\nexport const logDocuments = function () {\n log.info('Documents = ', documents);\n};\nexport const getRelations = function () {\n return currentDocument.relations;\n};\n\n/**\n * If the id is a start node ( [*] ), then return a new id constructed from\n * the start node name and the current start node count.\n * else return the given id\n *\n * @param {string} id\n * @returns {string} - the id (original or constructed)\n */\nfunction startIdIfNeeded(id = '') {\n let fixedId = id;\n if (id === START_NODE) {\n startEndCount++;\n fixedId = `${START_TYPE}${startEndCount}`;\n }\n return fixedId;\n}\n\n/**\n * If the id is a start node ( [*] ), then return the start type ('start')\n * else return the given type\n *\n * @param {string} id\n * @param {string} type\n * @returns {string} - the type that should be used\n */\nfunction startTypeIfNeeded(id = '', type = DEFAULT_STATE_TYPE) {\n return id === START_NODE ? START_TYPE : type;\n}\n\n/**\n * If the id is an end node ( [*] ), then return a new id constructed from\n * the end node name and the current start_end node count.\n * else return the given id\n *\n * @param {string} id\n * @returns {string} - the id (original or constructed)\n */\nfunction endIdIfNeeded(id = '') {\n let fixedId = id;\n if (id === END_NODE) {\n startEndCount++;\n fixedId = `${END_TYPE}${startEndCount}`;\n }\n return fixedId;\n}\n\n/**\n * If the id is an end node ( [*] ), then return the end type\n * else return the given type\n *\n * @param {string} id\n * @param {string} type\n * @returns {string} - the type that should be used\n */\nfunction endTypeIfNeeded(id = '', type = DEFAULT_STATE_TYPE) {\n return id === END_NODE ? END_TYPE : type;\n}\n\n/**\n *\n * @param item1\n * @param item2\n * @param relationTitle\n */\nexport function addRelationObjs(item1, item2, relationTitle) {\n let id1 = startIdIfNeeded(item1.id.trim());\n let type1 = startTypeIfNeeded(item1.id.trim(), item1.type);\n let id2 = startIdIfNeeded(item2.id.trim());\n let type2 = startTypeIfNeeded(item2.id.trim(), item2.type);\n\n addState(\n id1,\n type1,\n item1.doc,\n item1.description,\n item1.note,\n item1.classes,\n item1.styles,\n item1.textStyles\n );\n addState(\n id2,\n type2,\n item2.doc,\n item2.description,\n item2.note,\n item2.classes,\n item2.styles,\n item2.textStyles\n );\n\n currentDocument.relations.push({\n id1,\n id2,\n relationTitle: common.sanitizeText(relationTitle, getConfig()),\n });\n}\n\n/**\n * Add a relation between two items. The items may be full objects or just the string id of a state.\n *\n * @param {string | object} item1\n * @param {string | object} item2\n * @param {string} title\n */\nexport const addRelation = function (item1, item2, title) {\n if (typeof item1 === 'object') {\n addRelationObjs(item1, item2, title);\n } else {\n const id1 = startIdIfNeeded(item1.trim());\n const type1 = startTypeIfNeeded(item1);\n const id2 = endIdIfNeeded(item2.trim());\n const type2 = endTypeIfNeeded(item2);\n\n addState(id1, type1);\n addState(id2, type2);\n currentDocument.relations.push({\n id1,\n id2,\n title: common.sanitizeText(title, getConfig()),\n });\n }\n};\n\nexport const addDescription = function (id, descr) {\n const theState = currentDocument.states.get(id);\n const _descr = descr.startsWith(':') ? descr.replace(':', '').trim() : descr;\n theState.descriptions.push(common.sanitizeText(_descr, getConfig()));\n};\n\nexport const cleanupLabel = function (label) {\n if (label.substring(0, 1) === ':') {\n return label.substr(2).trim();\n } else {\n return label.trim();\n }\n};\n\nconst getDividerId = () => {\n dividerCnt++;\n return 'divider-id-' + dividerCnt;\n};\n\n/**\n * Called when the parser comes across a (style) class definition\n * @example classDef my-style fill:#f96;\n *\n * @param {string} id - the id of this (style) class\n * @param {string | null} styleAttributes - the string with 1 or more style attributes (each separated by a comma)\n */\nexport const addStyleClass = function (id, styleAttributes = '') {\n // create a new style class object with this id\n if (!classes.has(id)) {\n classes.set(id, { id: id, styles: [], textStyles: [] }); // This is a classDef\n }\n const foundClass = classes.get(id);\n if (styleAttributes !== undefined && styleAttributes !== null) {\n styleAttributes.split(STYLECLASS_SEP).forEach((attrib) => {\n // remove any trailing ;\n const fixedAttrib = attrib.replace(/([^;]*);/, '$1').trim();\n\n // replace some style keywords\n if (RegExp(COLOR_KEYWORD).exec(attrib)) {\n const newStyle1 = fixedAttrib.replace(FILL_KEYWORD, BG_FILL);\n const newStyle2 = newStyle1.replace(COLOR_KEYWORD, FILL_KEYWORD);\n foundClass.textStyles.push(newStyle2);\n }\n foundClass.styles.push(fixedAttrib);\n });\n }\n};\n\n/**\n * Return all of the style classes\n * @returns {{} | any | classes}\n */\nexport const getClasses = function () {\n return classes;\n};\n\n/**\n * Add a (style) class or css class to a state with the given id.\n * If the state isn't already in the list of known states, add it.\n * Might be called by parser when a style class or CSS class should be applied to a state\n *\n * @param {string | string[]} itemIds The id or a list of ids of the item(s) to apply the css class to\n * @param {string} cssClassName CSS class name\n */\nexport const setCssClass = function (itemIds, cssClassName) {\n itemIds.split(',').forEach(function (id) {\n let foundState = getState(id);\n if (foundState === undefined) {\n const trimmedId = id.trim();\n addState(trimmedId);\n foundState = getState(trimmedId);\n }\n foundState.classes.push(cssClassName);\n });\n};\n\n/**\n * Add a style to a state with the given id.\n * @example style stateId fill:#f9f,stroke:#333,stroke-width:4px\n * where 'style' is the keyword\n * stateId is the id of a state\n * the rest of the string is the styleText (all of the attributes to be applied to the state)\n *\n * @param itemId The id of item to apply the style to\n * @param styleText - the text of the attributes for the style\n */\nexport const setStyle = function (itemId, styleText) {\n const item = getState(itemId);\n if (item !== undefined) {\n item.styles.push(styleText);\n }\n};\n\n/**\n * Add a text style to a state with the given id\n *\n * @param itemId The id of item to apply the css class to\n * @param cssClassName CSS class name\n */\nexport const setTextStyle = function (itemId, cssClassName) {\n const item = getState(itemId);\n if (item !== undefined) {\n item.textStyles.push(cssClassName);\n }\n};\n\nconst getDirection = () => direction;\nconst setDirection = (dir) => {\n direction = dir;\n};\n\nconst trimColon = (str) => (str && str[0] === ':' ? str.substr(1).trim() : str.trim());\n\nexport const getData = () => {\n const config = getConfig();\n return { nodes, edges, other: {}, config, direction: getDir(getRootDocV2()) };\n};\n\nexport default {\n getConfig: () => getConfig().state,\n getData,\n addState,\n clear,\n getState,\n getStates,\n getRelations,\n getClasses,\n getDirection,\n addRelation,\n getDividerId,\n setDirection,\n cleanupLabel,\n lineType,\n relationType,\n logDocuments,\n getRootDoc,\n setRootDoc,\n getRootDocV2,\n extract,\n trimColon,\n getAccTitle,\n setAccTitle,\n getAccDescription,\n setAccDescription,\n addStyleClass,\n setCssClass,\n addDescription,\n setDiagramTitle,\n getDiagramTitle,\n};\n", "const getStyles = (options) =>\n `\ndefs #statediagram-barbEnd {\n fill: ${options.transitionColor};\n stroke: ${options.transitionColor};\n }\ng.stateGroup text {\n fill: ${options.nodeBorder};\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ${options.textColor};\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ${options.stateLabelColor};\n}\n\ng.stateGroup rect {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n}\n\ng.stateGroup line {\n stroke: ${options.lineColor};\n stroke-width: 1;\n}\n\n.transition {\n stroke: ${options.transitionColor};\n stroke-width: 1;\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ${options.background};\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ${options.noteBorderColor};\n fill: ${options.noteBkgColor};\n\n text {\n fill: ${options.noteTextColor};\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${options.mainBkg};\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ${options.labelBackgroundColor};\n opacity: 0.5;\n}\n.edgeLabel {\n background-color: ${options.edgeLabelBackground};\n p {\n background-color: ${options.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${options.edgeLabelBackground};\n fill: ${options.edgeLabelBackground};\n }\n text-align: center;\n}\n.edgeLabel .label text {\n fill: ${options.transitionLabelColor || options.tertiaryTextColor};\n}\n.label div .edgeLabel {\n color: ${options.transitionLabelColor || options.tertiaryTextColor};\n}\n\n.stateLabel text {\n fill: ${options.stateLabelColor};\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ${options.specialStateColor};\n stroke: ${options.specialStateColor};\n}\n\n.node .fork-join {\n fill: ${options.specialStateColor};\n stroke: ${options.specialStateColor};\n}\n\n.node circle.state-end {\n fill: ${options.innerEndBackground};\n stroke: ${options.background};\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ${options.compositeBackground || options.background};\n // stroke: ${options.background};\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ${options.stateBkg || options.mainBkg};\n stroke: ${options.stateBorder || options.nodeBorder};\n stroke-width: 1px;\n}\n.node polygon {\n fill: ${options.mainBkg};\n stroke: ${options.stateBorder || options.nodeBorder};;\n stroke-width: 1px;\n}\n#statediagram-barbEnd {\n fill: ${options.lineColor};\n}\n\n.statediagram-cluster rect {\n fill: ${options.compositeTitleBackground};\n stroke: ${options.stateBorder || options.nodeBorder};\n stroke-width: 1px;\n}\n\n.cluster-label, .nodeLabel {\n color: ${options.stateLabelColor};\n // line-height: 1;\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ${options.stateBorder || options.nodeBorder};\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ${options.compositeBackground || options.background};\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: ${options.altBackground ? options.altBackground : '#efefef'};\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ${options.altBackground ? options.altBackground : '#efefef'};\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ${options.noteBkgColor};\n stroke: ${options.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ${options.noteBkgColor};\n stroke: ${options.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ${options.noteTextColor};\n}\n\n.statediagram-note .nodeLabel {\n color: ${options.noteTextColor};\n}\n.statediagram .edgeLabel {\n color: red; // ${options.noteTextColor};\n}\n\n#dependencyStart, #dependencyEnd {\n fill: ${options.lineColor};\n stroke: ${options.lineColor};\n stroke-width: 1;\n}\n\n.statediagramTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${options.textColor};\n}\n`;\n\n// todo: change composit to composite\n// cspell:ignore composit\n\nexport default getStyles;\n"],
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyEA,IAAI,SAAU,WAAU;AACxB,MAAI,IAAE,gCAAS,GAAE,GAAEA,IAAE,GAAE;AAAC,SAAIA,KAAEA,MAAG,CAAC,GAAE,IAAE,EAAE,QAAO,KAAIA,GAAE,EAAE,CAAC,CAAC,IAAE,EAAE;AAAC,WAAOA;AAAA,EAAC,GAAhE,MAAkE,MAAI,CAAC,GAAE,CAAC,GAAE,MAAI,CAAC,GAAE,CAAC,GAAE,MAAI,CAAC,GAAE,CAAC,GAAE,MAAI,CAAC,GAAE,CAAC,GAAE,MAAI,CAAC,GAAE,CAAC,GAAE,MAAI,CAAC,GAAE,EAAE,GAAE,MAAI,CAAC,GAAE,EAAE,GAAE,MAAI,CAAC,GAAE,EAAE,GAAE,MAAI,CAAC,GAAE,EAAE,GAAE,MAAI,CAAC,GAAE,EAAE,GAAE,MAAI,CAAC,GAAE,EAAE,GAAE,MAAI,CAAC,GAAE,EAAE,GAAE,MAAI,CAAC,GAAE,EAAE,GAAE,MAAI,CAAC,GAAE,EAAE,GAAE,MAAI,CAAC,GAAE,EAAE,GAAE,MAAI,CAAC,GAAE,EAAE,GAAE,MAAI,CAAC,GAAE,EAAE,GAAE,MAAI,CAAC,GAAE,EAAE,GAAE,MAAI,CAAC,GAAE,EAAE,GAAE,MAAI,CAAC,GAAE,EAAE,GAAE,MAAI,CAAC,GAAE,EAAE,GAAE,MAAI,CAAC,GAAE,EAAE,GAAE,MAAI,CAAC,GAAE,EAAE,GAAE,MAAI,CAAC,GAAE,EAAE,GAAE,MAAI,CAAC,GAAE,EAAE,GAAE,MAAI,CAAC,GAAE,EAAE,GAAE,MAAI,CAAC,GAAE,EAAE,GAA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