mermaid
Version:
Markdown-ish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.
1,118 lines (1,097 loc) • 104 kB
JavaScript
import { m as be, q as we } from "./mermaidAPI-04b5c286.js";
import { g as ct, l as K, b as Lt, e as Pt, c as _e, f as kt } from "./config-e567ef17.js";
import { g as ke, e as Le, d as Pe, s as te, b as Ie, a as Ne, f as ve } from "./commonDb-4dc3d465.js";
import { s as It, Z as ee, u as C } from "./utils-aa888deb.js";
import { c as Ae } from "./setupGraphViewbox-a4603a92.js";
import { s as Se } from "./selectAll-8155f162.js";
import "./errorRenderer-a3c4bedb.js";
var Bt = function() {
var t = function(rt, E, w, k) {
for (w = w || {}, k = rt.length; k--; w[rt[k]] = E)
;
return w;
}, e = [1, 2], s = [1, 3], n = [1, 5], i = [1, 7], a = [2, 5], o = [1, 15], l = [1, 17], u = [1, 19], h = [1, 21], T = [1, 22], y = [1, 23], p = [1, 29], x = [1, 30], b = [1, 31], L = [1, 32], v = [1, 33], M = [1, 34], I = [1, 35], B = [1, 36], V = [1, 37], z = [1, 38], G = [1, 39], Y = [1, 40], D = [1, 42], X = [1, 43], q = [1, 45], F = [1, 46], H = [1, 47], J = [1, 48], Z = [1, 49], m = [1, 50], P = [1, 53], _ = [1, 4, 5, 19, 21, 23, 26, 28, 34, 35, 36, 38, 40, 41, 42, 43, 44, 46, 48, 50, 51, 52, 53, 54, 56, 57, 62, 63, 64, 65, 73, 83], U = [4, 5, 21, 54, 56], N = [4, 5, 19, 21, 23, 26, 28, 34, 35, 36, 38, 40, 41, 42, 43, 44, 46, 48, 50, 54, 56, 57, 62, 63, 64, 65, 73, 83], Kt = [4, 5, 19, 21, 23, 26, 28, 34, 35, 36, 38, 40, 41, 42, 43, 44, 46, 48, 50, 53, 54, 56, 57, 62, 63, 64, 65, 73, 83], Gt = [4, 5, 19, 21, 23, 26, 28, 34, 35, 36, 38, 40, 41, 42, 43, 44, 46, 48, 50, 52, 54, 56, 57, 62, 63, 64, 65, 73, 83], Xt = [4, 5, 19, 21, 23, 26, 28, 34, 35, 36, 38, 40, 41, 42, 43, 44, 46, 48, 50, 51, 54, 56, 57, 62, 63, 64, 65, 73, 83], at = [71, 72, 73], et = [1, 125], Jt = [1, 4, 5, 7, 19, 21, 23, 26, 28, 34, 35, 36, 38, 40, 41, 42, 43, 44, 46, 48, 50, 51, 52, 53, 54, 56, 57, 62, 63, 64, 65, 73, 83], Mt = {
trace: function() {
},
yy: {},
symbols_: { error: 2, start: 3, SPACE: 4, NEWLINE: 5, directive: 6, SD: 7, document: 8, line: 9, statement: 10, box_section: 11, box_line: 12, participant_statement: 13, openDirective: 14, typeDirective: 15, closeDirective: 16, ":": 17, argDirective: 18, box: 19, restOfLine: 20, end: 21, signal: 22, autonumber: 23, NUM: 24, off: 25, activate: 26, actor: 27, deactivate: 28, note_statement: 29, links_statement: 30, link_statement: 31, properties_statement: 32, details_statement: 33, title: 34, legacy_title: 35, acc_title: 36, acc_title_value: 37, acc_descr: 38, acc_descr_value: 39, acc_descr_multiline_value: 40, loop: 41, rect: 42, opt: 43, alt: 44, else_sections: 45, par: 46, par_sections: 47, critical: 48, option_sections: 49, break: 50, option: 51, and: 52, else: 53, participant: 54, AS: 55, participant_actor: 56, note: 57, placement: 58, text2: 59, over: 60, actor_pair: 61, links: 62, link: 63, properties: 64, details: 65, spaceList: 66, ",": 67, left_of: 68, right_of: 69, signaltype: 70, "+": 71, "-": 72, ACTOR: 73, SOLID_OPEN_ARROW: 74, DOTTED_OPEN_ARROW: 75, SOLID_ARROW: 76, DOTTED_ARROW: 77, SOLID_CROSS: 78, DOTTED_CROSS: 79, SOLID_POINT: 80, DOTTED_POINT: 81, TXT: 82, open_directive: 83, type_directive: 84, arg_directive: 85, close_directive: 86, $accept: 0, $end: 1 },
terminals_: { 2: "error", 4: "SPACE", 5: "NEWLINE", 7: "SD", 17: ":", 19: "box", 20: "restOfLine", 21: "end", 23: "autonumber", 24: "NUM", 25: "off", 26: "activate", 28: "deactivate", 34: "title", 35: "legacy_title", 36: "acc_title", 37: "acc_title_value", 38: "acc_descr", 39: "acc_descr_value", 40: "acc_descr_multiline_value", 41: "loop", 42: "rect", 43: "opt", 44: "alt", 46: "par", 48: "critical", 50: "break", 51: "option", 52: "and", 53: "else", 54: "participant", 55: "AS", 56: "participant_actor", 57: "note", 60: "over", 62: "links", 63: "link", 64: "properties", 65: "details", 67: ",", 68: "left_of", 69: "right_of", 71: "+", 72: "-", 73: "ACTOR", 74: "SOLID_OPEN_ARROW", 75: "DOTTED_OPEN_ARROW", 76: "SOLID_ARROW", 77: "DOTTED_ARROW", 78: "SOLID_CROSS", 79: "DOTTED_CROSS", 80: "SOLID_POINT", 81: "DOTTED_POINT", 82: "TXT", 83: "open_directive", 84: "type_directive", 85: "arg_directive", 86: "close_directive" },
productions_: [0, [3, 2], [3, 2], [3, 2], [3, 2], [8, 0], [8, 2], [9, 2], [9, 1], [9, 1], [11, 0], [11, 2], [12, 2], [12, 1], [12, 1], [6, 4], [6, 6], [10, 1], [10, 4], [10, 2], [10, 4], [10, 3], [10, 3], [10, 2], [10, 3], [10, 3], [10, 2], [10, 2], [10, 2], [10, 2], [10, 2], [10, 1], [10, 1], [10, 2], [10, 2], [10, 1], [10, 4], [10, 4], [10, 4], [10, 4], [10, 4], [10, 4], [10, 4], [10, 1], [49, 1], [49, 4], [47, 1], [47, 4], [45, 1], [45, 4], [13, 5], [13, 3], [13, 5], [13, 3], [29, 4], [29, 4], [30, 3], [31, 3], [32, 3], [33, 3], [66, 2], [66, 1], [61, 3], [61, 1], [58, 1], [58, 1], [22, 5], [22, 5], [22, 4], [27, 1], [70, 1], [70, 1], [70, 1], [70, 1], [70, 1], [70, 1], [70, 1], [70, 1], [59, 1], [14, 1], [15, 1], [18, 1], [16, 1]],
performAction: function(E, w, k, g, A, c, Tt) {
var d = c.length - 1;
switch (A) {
case 4:
return g.apply(c[d]), c[d];
case 5:
case 10:
this.$ = [];
break;
case 6:
case 11:
c[d - 1].push(c[d]), this.$ = c[d - 1];
break;
case 7:
case 8:
case 12:
case 13:
this.$ = c[d];
break;
case 9:
case 14:
this.$ = [];
break;
case 18:
c[d - 1].unshift({ type: "boxStart", boxData: g.parseBoxData(c[d - 2]) }), c[d - 1].push({ type: "boxEnd", boxText: c[d - 2] }), this.$ = c[d - 1];
break;
case 20:
this.$ = { type: "sequenceIndex", sequenceIndex: Number(c[d - 2]), sequenceIndexStep: Number(c[d - 1]), sequenceVisible: !0, signalType: g.LINETYPE.AUTONUMBER };
break;
case 21:
this.$ = { type: "sequenceIndex", sequenceIndex: Number(c[d - 1]), sequenceIndexStep: 1, sequenceVisible: !0, signalType: g.LINETYPE.AUTONUMBER };
break;
case 22:
this.$ = { type: "sequenceIndex", sequenceVisible: !1, signalType: g.LINETYPE.AUTONUMBER };
break;
case 23:
this.$ = { type: "sequenceIndex", sequenceVisible: !0, signalType: g.LINETYPE.AUTONUMBER };
break;
case 24:
this.$ = { type: "activeStart", signalType: g.LINETYPE.ACTIVE_START, actor: c[d - 1] };
break;
case 25:
this.$ = { type: "activeEnd", signalType: g.LINETYPE.ACTIVE_END, actor: c[d - 1] };
break;
case 31:
g.setDiagramTitle(c[d].substring(6)), this.$ = c[d].substring(6);
break;
case 32:
g.setDiagramTitle(c[d].substring(7)), this.$ = c[d].substring(7);
break;
case 33:
this.$ = c[d].trim(), g.setAccTitle(this.$);
break;
case 34:
case 35:
this.$ = c[d].trim(), g.setAccDescription(this.$);
break;
case 36:
c[d - 1].unshift({ type: "loopStart", loopText: g.parseMessage(c[d - 2]), signalType: g.LINETYPE.LOOP_START }), c[d - 1].push({ type: "loopEnd", loopText: c[d - 2], signalType: g.LINETYPE.LOOP_END }), this.$ = c[d - 1];
break;
case 37:
c[d - 1].unshift({ type: "rectStart", color: g.parseMessage(c[d - 2]), signalType: g.LINETYPE.RECT_START }), c[d - 1].push({ type: "rectEnd", color: g.parseMessage(c[d - 2]), signalType: g.LINETYPE.RECT_END }), this.$ = c[d - 1];
break;
case 38:
c[d - 1].unshift({ type: "optStart", optText: g.parseMessage(c[d - 2]), signalType: g.LINETYPE.OPT_START }), c[d - 1].push({ type: "optEnd", optText: g.parseMessage(c[d - 2]), signalType: g.LINETYPE.OPT_END }), this.$ = c[d - 1];
break;
case 39:
c[d - 1].unshift({ type: "altStart", altText: g.parseMessage(c[d - 2]), signalType: g.LINETYPE.ALT_START }), c[d - 1].push({ type: "altEnd", signalType: g.LINETYPE.ALT_END }), this.$ = c[d - 1];
break;
case 40:
c[d - 1].unshift({ type: "parStart", parText: g.parseMessage(c[d - 2]), signalType: g.LINETYPE.PAR_START }), c[d - 1].push({ type: "parEnd", signalType: g.LINETYPE.PAR_END }), this.$ = c[d - 1];
break;
case 41:
c[d - 1].unshift({ type: "criticalStart", criticalText: g.parseMessage(c[d - 2]), signalType: g.LINETYPE.CRITICAL_START }), c[d - 1].push({ type: "criticalEnd", signalType: g.LINETYPE.CRITICAL_END }), this.$ = c[d - 1];
break;
case 42:
c[d - 1].unshift({ type: "breakStart", breakText: g.parseMessage(c[d - 2]), signalType: g.LINETYPE.BREAK_START }), c[d - 1].push({ type: "breakEnd", optText: g.parseMessage(c[d - 2]), signalType: g.LINETYPE.BREAK_END }), this.$ = c[d - 1];
break;
case 45:
this.$ = c[d - 3].concat([{ type: "option", optionText: g.parseMessage(c[d - 1]), signalType: g.LINETYPE.CRITICAL_OPTION }, c[d]]);
break;
case 47:
this.$ = c[d - 3].concat([{ type: "and", parText: g.parseMessage(c[d - 1]), signalType: g.LINETYPE.PAR_AND }, c[d]]);
break;
case 49:
this.$ = c[d - 3].concat([{ type: "else", altText: g.parseMessage(c[d - 1]), signalType: g.LINETYPE.ALT_ELSE }, c[d]]);
break;
case 50:
c[d - 3].type = "addParticipant", c[d - 3].description = g.parseMessage(c[d - 1]), this.$ = c[d - 3];
break;
case 51:
c[d - 1].type = "addParticipant", this.$ = c[d - 1];
break;
case 52:
c[d - 3].type = "addActor", c[d - 3].description = g.parseMessage(c[d - 1]), this.$ = c[d - 3];
break;
case 53:
c[d - 1].type = "addActor", this.$ = c[d - 1];
break;
case 54:
this.$ = [c[d - 1], { type: "addNote", placement: c[d - 2], actor: c[d - 1].actor, text: c[d] }];
break;
case 55:
c[d - 2] = [].concat(c[d - 1], c[d - 1]).slice(0, 2), c[d - 2][0] = c[d - 2][0].actor, c[d - 2][1] = c[d - 2][1].actor, this.$ = [c[d - 1], { type: "addNote", placement: g.PLACEMENT.OVER, actor: c[d - 2].slice(0, 2), text: c[d] }];
break;
case 56:
this.$ = [c[d - 1], { type: "addLinks", actor: c[d - 1].actor, text: c[d] }];
break;
case 57:
this.$ = [c[d - 1], { type: "addALink", actor: c[d - 1].actor, text: c[d] }];
break;
case 58:
this.$ = [c[d - 1], { type: "addProperties", actor: c[d - 1].actor, text: c[d] }];
break;
case 59:
this.$ = [c[d - 1], { type: "addDetails", actor: c[d - 1].actor, text: c[d] }];
break;
case 62:
this.$ = [c[d - 2], c[d]];
break;
case 63:
this.$ = c[d];
break;
case 64:
this.$ = g.PLACEMENT.LEFTOF;
break;
case 65:
this.$ = g.PLACEMENT.RIGHTOF;
break;
case 66:
this.$ = [
c[d - 4],
c[d - 1],
{ type: "addMessage", from: c[d - 4].actor, to: c[d - 1].actor, signalType: c[d - 3], msg: c[d] },
{ type: "activeStart", signalType: g.LINETYPE.ACTIVE_START, actor: c[d - 1] }
];
break;
case 67:
this.$ = [
c[d - 4],
c[d - 1],
{ type: "addMessage", from: c[d - 4].actor, to: c[d - 1].actor, signalType: c[d - 3], msg: c[d] },
{ type: "activeEnd", signalType: g.LINETYPE.ACTIVE_END, actor: c[d - 4] }
];
break;
case 68:
this.$ = [c[d - 3], c[d - 1], { type: "addMessage", from: c[d - 3].actor, to: c[d - 1].actor, signalType: c[d - 2], msg: c[d] }];
break;
case 69:
this.$ = { type: "addParticipant", actor: c[d] };
break;
case 70:
this.$ = g.LINETYPE.SOLID_OPEN;
break;
case 71:
this.$ = g.LINETYPE.DOTTED_OPEN;
break;
case 72:
this.$ = g.LINETYPE.SOLID;
break;
case 73:
this.$ = g.LINETYPE.DOTTED;
break;
case 74:
this.$ = g.LINETYPE.SOLID_CROSS;
break;
case 75:
this.$ = g.LINETYPE.DOTTED_CROSS;
break;
case 76:
this.$ = g.LINETYPE.SOLID_POINT;
break;
case 77:
this.$ = g.LINETYPE.DOTTED_POINT;
break;
case 78:
this.$ = g.parseMessage(c[d].trim().substring(1));
break;
case 79:
g.parseDirective("%%{", "open_directive");
break;
case 80:
g.parseDirective(c[d], "type_directive");
break;
case 81:
c[d] = c[d].trim().replace(/'/g, '"'), g.parseDirective(c[d], "arg_directive");
break;
case 82:
g.parseDirective("}%%", "close_directive", "sequence");
break;
}
},
table: [{ 3: 1, 4: e, 5: s, 6: 4, 7: n, 14: 6, 83: i }, { 1: [3] }, { 3: 8, 4: e, 5: s, 6: 4, 7: n, 14: 6, 83: i }, { 3: 9, 4: e, 5: s, 6: 4, 7: n, 14: 6, 83: i }, { 3: 10, 4: e, 5: s, 6: 4, 7: n, 14: 6, 83: i }, t([1, 4, 5, 19, 23, 26, 28, 34, 35, 36, 38, 40, 41, 42, 43, 44, 46, 48, 50, 54, 56, 57, 62, 63, 64, 65, 73, 83], a, { 8: 11 }), { 15: 12, 84: [1, 13] }, { 84: [2, 79] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, { 1: [2, 4], 4: o, 5: l, 6: 41, 9: 14, 10: 16, 13: 18, 14: 6, 19: u, 22: 20, 23: h, 26: T, 27: 44, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: p, 35: x, 36: b, 38: L, 40: v, 41: M, 42: I, 43: B, 44: V, 46: z, 48: G, 50: Y, 54: D, 56: X, 57: q, 62: F, 63: H, 64: J, 65: Z, 73: m, 83: i }, { 16: 51, 17: [1, 52], 86: P }, t([17, 86], [2, 80]), t(_, [2, 6]), { 6: 41, 10: 54, 13: 18, 14: 6, 19: u, 22: 20, 23: h, 26: T, 27: 44, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: p, 35: x, 36: b, 38: L, 40: v, 41: M, 42: I, 43: B, 44: V, 46: z, 48: G, 50: Y, 54: D, 56: X, 57: q, 62: F, 63: H, 64: J, 65: Z, 73: m, 83: i }, t(_, [2, 8]), t(_, [2, 9]), t(_, [2, 17]), { 20: [1, 55] }, { 5: [1, 56] }, { 5: [1, 59], 24: [1, 57], 25: [1, 58] }, { 27: 60, 73: m }, { 27: 61, 73: m }, { 5: [1, 62] }, { 5: [1, 63] }, { 5: [1, 64] }, { 5: [1, 65] }, { 5: [1, 66] }, t(_, [2, 31]), t(_, [2, 32]), { 37: [1, 67] }, { 39: [1, 68] }, t(_, [2, 35]), { 20: [1, 69] }, { 20: [1, 70] }, { 20: [1, 71] }, { 20: [1, 72] }, { 20: [1, 73] }, { 20: [1, 74] }, { 20: [1, 75] }, t(_, [2, 43]), { 27: 76, 73: m }, { 27: 77, 73: m }, { 70: 78, 74: [1, 79], 75: [1, 80], 76: [1, 81], 77: [1, 82], 78: [1, 83], 79: [1, 84], 80: [1, 85], 81: [1, 86] }, { 58: 87, 60: [1, 88], 68: [1, 89], 69: [1, 90] }, { 27: 91, 73: m }, { 27: 92, 73: m }, { 27: 93, 73: m }, { 27: 94, 73: m }, t([5, 55, 67, 74, 75, 76, 77, 78, 79, 80, 81, 82], [2, 69]), { 5: [1, 95] }, { 18: 96, 85: [1, 97] }, { 5: [2, 82] }, t(_, [2, 7]), t(U, [2, 10], { 11: 98 }), t(_, [2, 19]), { 5: [1, 100], 24: [1, 99] }, { 5: [1, 101] }, t(_, [2, 23]), { 5: [1, 102] }, { 5: [1, 103] }, t(_, [2, 26]), t(_, [2, 27]), t(_, [2, 28]), t(_, [2, 29]), t(_, [2, 30]), t(_, [2, 33]), t(_, [2, 34]), t(N, a, { 8: 104 }), t(N, a, { 8: 105 }), t(N, a, { 8: 106 }), t(Kt, a, { 45: 107, 8: 108 }), t(Gt, a, { 47: 109, 8: 110 }), t(Xt, a, { 49: 111, 8: 112 }), t(N, a, { 8: 113 }), { 5: [1, 115], 55: [1, 114] }, { 5: [1, 117], 55: [1, 116] }, { 27: 120, 71: [1, 118], 72: [1, 119], 73: m }, t(at, [2, 70]), t(at, [2, 71]), t(at, [2, 72]), t(at, [2, 73]), t(at, [2, 74]), t(at, [2, 75]), t(at, [2, 76]), t(at, [2, 77]), { 27: 121, 73: m }, { 27: 123, 61: 122, 73: m }, { 73: [2, 64] }, { 73: [2, 65] }, { 59: 124, 82: et }, { 59: 126, 82: et }, { 59: 127, 82: et }, { 59: 128, 82: et }, t(Jt, [2, 15]), { 16: 129, 86: P }, { 86: [2, 81] }, { 4: [1, 132], 5: [1, 134], 12: 131, 13: 133, 21: [1, 130], 54: D, 56: X }, { 5: [1, 135] }, t(_, [2, 21]), t(_, [2, 22]), t(_, [2, 24]), t(_, [2, 25]), { 4: o, 5: l, 6: 41, 9: 14, 10: 16, 13: 18, 14: 6, 19: u, 21: [1, 136], 22: 20, 23: h, 26: T, 27: 44, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: p, 35: x, 36: b, 38: L, 40: v, 41: M, 42: I, 43: B, 44: V, 46: z, 48: G, 50: Y, 54: D, 56: X, 57: q, 62: F, 63: H, 64: J, 65: Z, 73: m, 83: i }, { 4: o, 5: l, 6: 41, 9: 14, 10: 16, 13: 18, 14: 6, 19: u, 21: [1, 137], 22: 20, 23: h, 26: T, 27: 44, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: p, 35: x, 36: b, 38: L, 40: v, 41: M, 42: I, 43: B, 44: V, 46: z, 48: G, 50: Y, 54: D, 56: X, 57: q, 62: F, 63: H, 64: J, 65: Z, 73: m, 83: i }, { 4: o, 5: l, 6: 41, 9: 14, 10: 16, 13: 18, 14: 6, 19: u, 21: [1, 138], 22: 20, 23: h, 26: T, 27: 44, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: p, 35: x, 36: b, 38: L, 40: v, 41: M, 42: I, 43: B, 44: V, 46: z, 48: G, 50: Y, 54: D, 56: X, 57: q, 62: F, 63: H, 64: J, 65: Z, 73: m, 83: i }, { 21: [1, 139] }, { 4: o, 5: l, 6: 41, 9: 14, 10: 16, 13: 18, 14: 6, 19: u, 21: [2, 48], 22: 20, 23: h, 26: T, 27: 44, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: p, 35: x, 36: b, 38: L, 40: v, 41: M, 42: I, 43: B, 44: V, 46: z, 48: G, 50: Y, 53: [1, 140], 54: D, 56: X, 57: q, 62: F, 63: H, 64: J, 65: Z, 73: m, 83: i }, { 21: [1, 141] }, { 4: o, 5: l, 6: 41, 9: 14, 10: 16, 13: 18, 14: 6, 19: u, 21: [2, 46], 22: 20, 23: h, 26: T, 27: 44, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: p, 35: x, 36: b, 38: L, 40: v, 41: M, 42: I, 43: B, 44: V, 46: z, 48: G, 50: Y, 52: [1, 142], 54: D, 56: X, 57: q, 62: F, 63: H, 64: J, 65: Z, 73: m, 83: i }, { 21: [1, 143] }, { 4: o, 5: l, 6: 41, 9: 14, 10: 16, 13: 18, 14: 6, 19: u, 21: [2, 44], 22: 20, 23: h, 26: T, 27: 44, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: p, 35: x, 36: b, 38: L, 40: v, 41: M, 42: I, 43: B, 44: V, 46: z, 48: G, 50: Y, 51: [1, 144], 54: D, 56: X, 57: q, 62: F, 63: H, 64: J, 65: Z, 73: m, 83: i }, { 4: o, 5: l, 6: 41, 9: 14, 10: 16, 13: 18, 14: 6, 19: u, 21: [1, 145], 22: 20, 23: h, 26: T, 27: 44, 28: y, 29: 24, 30: 25, 31: 26, 32: 27, 33: 28, 34: p, 35: x, 36: b, 38: L, 40: v, 41: M, 42: I, 43: B, 44: V, 46: z, 48: G, 50: Y, 54: D, 56: X, 57: q, 62: F, 63: H, 64: J, 65: Z, 73: m, 83: i }, { 20: [1, 146] }, t(_, [2, 51]), { 20: [1, 147] }, t(_, [2, 53]), { 27: 148, 73: m }, { 27: 149, 73: m }, { 59: 150, 82: et }, { 59: 151, 82: et }, { 59: 152, 82: et }, { 67: [1, 153], 82: [2, 63] }, { 5: [2, 56] }, { 5: [2, 78] }, { 5: [2, 57] }, { 5: [2, 58] }, { 5: [2, 59] }, { 5: [1, 154] }, t(_, [2, 18]), t(U, [2, 11]), { 13: 155, 54: D, 56: X }, t(U, [2, 13]), t(U, [2, 14]), t(_, [2, 20]), t(_, [2, 36]), t(_, [2, 37]), t(_, [2, 38]), t(_, [2, 39]), { 20: [1, 156] }, t(_, [2, 40]), { 20: [1, 157] }, t(_, [2, 41]), { 20: [1, 158] }, t(_, [2, 42]), { 5: [1, 159] }, { 5: [1, 160] }, { 59: 161, 82: et }, { 59: 162, 82: et }, { 5: [2, 68] }, { 5: [2, 54] }, { 5: [2, 55] }, { 27: 163, 73: m }, t(Jt, [2, 16]), t(U, [2, 12]), t(Kt, a, { 8: 108, 45: 164 }), t(Gt, a, { 8: 110, 47: 165 }), t(Xt, a, { 8: 112, 49: 166 }), t(_, [2, 50]), t(_, [2, 52]), { 5: [2, 66] }, { 5: [2, 67] }, { 82: [2, 62] }, { 21: [2, 49] }, { 21: [2, 47] }, { 21: [2, 45] }],
defaultActions: { 7: [2, 79], 8: [2, 1], 9: [2, 2], 10: [2, 3], 53: [2, 82], 89: [2, 64], 90: [2, 65], 97: [2, 81], 124: [2, 56], 125: [2, 78], 126: [2, 57], 127: [2, 58], 128: [2, 59], 150: [2, 68], 151: [2, 54], 152: [2, 55], 161: [2, 66], 162: [2, 67], 163: [2, 62], 164: [2, 49], 165: [2, 47], 166: [2, 45] },
parseError: function(E, w) {
if (w.recoverable)
this.trace(E);
else {
var k = new Error(E);
throw k.hash = w, k;
}
},
parse: function(E) {
var w = this, k = [0], g = [], A = [null], c = [], Tt = this.table, d = "", bt = 0, Zt = 0, Te = 2, Qt = 1, ye = c.slice.call(arguments, 1), O = Object.create(this.lexer), lt = { yy: {} };
for (var Dt in this.yy)
Object.prototype.hasOwnProperty.call(this.yy, Dt) && (lt.yy[Dt] = this.yy[Dt]);
O.setInput(E, lt.yy), lt.yy.lexer = O, lt.yy.parser = this, typeof O.yylloc > "u" && (O.yylloc = {});
var Vt = O.yylloc;
c.push(Vt);
var me = O.options && O.options.ranges;
typeof lt.yy.parseError == "function" ? this.parseError = lt.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
function Ee() {
var it;
return it = g.pop() || O.lex() || Qt, typeof it != "number" && (it instanceof Array && (g = it, it = g.pop()), it = w.symbols_[it] || it), it;
}
for (var W, ht, Q, Ct, pt = {}, wt, nt, jt, _t; ; ) {
if (ht = k[k.length - 1], this.defaultActions[ht] ? Q = this.defaultActions[ht] : ((W === null || typeof W > "u") && (W = Ee()), Q = Tt[ht] && Tt[ht][W]), typeof Q > "u" || !Q.length || !Q[0]) {
var Ot = "";
_t = [];
for (wt in Tt[ht])
this.terminals_[wt] && wt > Te && _t.push("'" + this.terminals_[wt] + "'");
O.showPosition ? Ot = "Parse error on line " + (bt + 1) + `:
` + O.showPosition() + `
Expecting ` + _t.join(", ") + ", got '" + (this.terminals_[W] || W) + "'" : Ot = "Parse error on line " + (bt + 1) + ": Unexpected " + (W == Qt ? "end of input" : "'" + (this.terminals_[W] || W) + "'"), this.parseError(Ot, {
text: O.match,
token: this.terminals_[W] || W,
line: O.yylineno,
loc: Vt,
expected: _t
});
}
if (Q[0] instanceof Array && Q.length > 1)
throw new Error("Parse Error: multiple actions possible at state: " + ht + ", token: " + W);
switch (Q[0]) {
case 1:
k.push(W), A.push(O.yytext), c.push(O.yylloc), k.push(Q[1]), W = null, Zt = O.yyleng, d = O.yytext, bt = O.yylineno, Vt = O.yylloc;
break;
case 2:
if (nt = this.productions_[Q[1]][1], pt.$ = A[A.length - nt], pt._$ = {
first_line: c[c.length - (nt || 1)].first_line,
last_line: c[c.length - 1].last_line,
first_column: c[c.length - (nt || 1)].first_column,
last_column: c[c.length - 1].last_column
}, me && (pt._$.range = [
c[c.length - (nt || 1)].range[0],
c[c.length - 1].range[1]
]), Ct = this.performAction.apply(pt, [
d,
Zt,
bt,
lt.yy,
Q[1],
A,
c
].concat(ye)), typeof Ct < "u")
return Ct;
nt && (k = k.slice(0, -1 * nt * 2), A = A.slice(0, -1 * nt), c = c.slice(0, -1 * nt)), k.push(this.productions_[Q[1]][0]), A.push(pt.$), c.push(pt._$), jt = Tt[k[k.length - 2]][k[k.length - 1]], k.push(jt);
break;
case 3:
return !0;
}
}
return !0;
}
}, ge = function() {
var rt = {
EOF: 1,
parseError: function(w, k) {
if (this.yy.parser)
this.yy.parser.parseError(w, k);
else
throw new Error(w);
},
// resets the lexer, sets new input
setInput: function(E, w) {
return this.yy = w || this.yy || {}, this._input = E, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
first_line: 1,
first_column: 0,
last_line: 1,
last_column: 0
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
},
// consumes and returns one char from the input
input: function() {
var E = this._input[0];
this.yytext += E, this.yyleng++, this.offset++, this.match += E, this.matched += E;
var w = E.match(/(?:\r\n?|\n).*/g);
return w ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), E;
},
// unshifts one char (or a string) into the input
unput: function(E) {
var w = E.length, k = E.split(/(?:\r\n?|\n)/g);
this._input = E + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - w), this.offset -= w;
var g = this.match.split(/(?:\r\n?|\n)/g);
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), k.length - 1 && (this.yylineno -= k.length - 1);
var A = this.yylloc.range;
return this.yylloc = {
first_line: this.yylloc.first_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.first_column,
last_column: k ? (k.length === g.length ? this.yylloc.first_column : 0) + g[g.length - k.length].length - k[0].length : this.yylloc.first_column - w
}, this.options.ranges && (this.yylloc.range = [A[0], A[0] + this.yyleng - w]), this.yyleng = this.yytext.length, this;
},
// When called from action, caches matched text and appends it on next action
more: function() {
return this._more = !0, this;
},
// 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.
reject: function() {
if (this.options.backtrack_lexer)
this._backtrack = !0;
else
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).
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
return this;
},
// retain first n characters of the match
less: function(E) {
this.unput(this.match.slice(E));
},
// displays already matched input, i.e. for error messages
pastInput: function() {
var E = this.matched.substr(0, this.matched.length - this.match.length);
return (E.length > 20 ? "..." : "") + E.substr(-20).replace(/\n/g, "");
},
// displays upcoming input, i.e. for error messages
upcomingInput: function() {
var E = this.match;
return E.length < 20 && (E += this._input.substr(0, 20 - E.length)), (E.substr(0, 20) + (E.length > 20 ? "..." : "")).replace(/\n/g, "");
},
// displays the character position where the lexing error occurred, i.e. for error messages
showPosition: function() {
var E = this.pastInput(), w = new Array(E.length + 1).join("-");
return E + this.upcomingInput() + `
` + w + "^";
},
// test the lexed token: return FALSE when not a match, otherwise return token
test_match: function(E, w) {
var k, g, A;
if (this.options.backtrack_lexer && (A = {
yylineno: this.yylineno,
yylloc: {
first_line: this.yylloc.first_line,
last_line: this.last_line,
first_column: this.yylloc.first_column,
last_column: this.yylloc.last_column
},
yytext: this.yytext,
match: this.match,
matches: this.matches,
matched: this.matched,
yyleng: this.yyleng,
offset: this.offset,
_more: this._more,
_input: this._input,
yy: this.yy,
conditionStack: this.conditionStack.slice(0),
done: this.done
}, this.options.ranges && (A.yylloc.range = this.yylloc.range.slice(0))), g = E[0].match(/(?:\r\n?|\n).*/g), g && (this.yylineno += g.length), this.yylloc = {
first_line: this.yylloc.last_line,
last_line: this.yylineno + 1,
first_column: this.yylloc.last_column,
last_column: g ? g[g.length - 1].length - g[g.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + E[0].length
}, this.yytext += E[0], this.match += E[0], this.matches = E, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(E[0].length), this.matched += E[0], k = this.performAction.call(this, this.yy, this, w, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), k)
return k;
if (this._backtrack) {
for (var c in A)
this[c] = A[c];
return !1;
}
return !1;
},
// return next match in input
next: function() {
if (this.done)
return this.EOF;
this._input || (this.done = !0);
var E, w, k, g;
this._more || (this.yytext = "", this.match = "");
for (var A = this._currentRules(), c = 0; c < A.length; c++)
if (k = this._input.match(this.rules[A[c]]), k && (!w || k[0].length > w[0].length)) {
if (w = k, g = c, this.options.backtrack_lexer) {
if (E = this.test_match(k, A[c]), E !== !1)
return E;
if (this._backtrack) {
w = !1;
continue;
} else
return !1;
} else if (!this.options.flex)
break;
}
return w ? (E = this.test_match(w, A[g]), E !== !1 ? E : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
` + this.showPosition(), {
text: "",
token: null,
line: this.yylineno
});
},
// return next match that has a token
lex: function() {
var w = this.next();
return w || this.lex();
},
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
begin: function(w) {
this.conditionStack.push(w);
},
// pop the previously active lexer condition state off the condition stack
popState: function() {
var w = this.conditionStack.length - 1;
return w > 0 ? this.conditionStack.pop() : this.conditionStack[0];
},
// produce the lexer rule set which is active for the currently active lexer condition state
_currentRules: function() {
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
},
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
topState: function(w) {
return w = this.conditionStack.length - 1 - Math.abs(w || 0), w >= 0 ? this.conditionStack[w] : "INITIAL";
},
// alias for begin(condition)
pushState: function(w) {
this.begin(w);
},
// return the number of states currently on the stack
stateStackSize: function() {
return this.conditionStack.length;
},
options: { "case-insensitive": !0 },
performAction: function(w, k, g, A) {
switch (g) {
case 0:
return this.begin("open_directive"), 83;
case 1:
return this.begin("type_directive"), 84;
case 2:
return this.popState(), this.begin("arg_directive"), 17;
case 3:
return this.popState(), this.popState(), 86;
case 4:
return 85;
case 5:
return 5;
case 6:
break;
case 7:
break;
case 8:
break;
case 9:
break;
case 10:
break;
case 11:
return 24;
case 12:
return this.begin("LINE"), 19;
case 13:
return this.begin("ID"), 54;
case 14:
return this.begin("ID"), 56;
case 15:
return k.yytext = k.yytext.trim(), this.begin("ALIAS"), 73;
case 16:
return this.popState(), this.popState(), this.begin("LINE"), 55;
case 17:
return this.popState(), this.popState(), 5;
case 18:
return this.begin("LINE"), 41;
case 19:
return this.begin("LINE"), 42;
case 20:
return this.begin("LINE"), 43;
case 21:
return this.begin("LINE"), 44;
case 22:
return this.begin("LINE"), 53;
case 23:
return this.begin("LINE"), 46;
case 24:
return this.begin("LINE"), 52;
case 25:
return this.begin("LINE"), 48;
case 26:
return this.begin("LINE"), 51;
case 27:
return this.begin("LINE"), 50;
case 28:
return this.popState(), 20;
case 29:
return 21;
case 30:
return 68;
case 31:
return 69;
case 32:
return 62;
case 33:
return 63;
case 34:
return 64;
case 35:
return 65;
case 36:
return 60;
case 37:
return 57;
case 38:
return this.begin("ID"), 26;
case 39:
return this.begin("ID"), 28;
case 40:
return 34;
case 41:
return 35;
case 42:
return this.begin("acc_title"), 36;
case 43:
return this.popState(), "acc_title_value";
case 44:
return this.begin("acc_descr"), 38;
case 45:
return this.popState(), "acc_descr_value";
case 46:
this.begin("acc_descr_multiline");
break;
case 47:
this.popState();
break;
case 48:
return "acc_descr_multiline_value";
case 49:
return 7;
case 50:
return 23;
case 51:
return 25;
case 52:
return 67;
case 53:
return 5;
case 54:
return k.yytext = k.yytext.trim(), 73;
case 55:
return 76;
case 56:
return 77;
case 57:
return 74;
case 58:
return 75;
case 59:
return 78;
case 60:
return 79;
case 61:
return 80;
case 62:
return 81;
case 63:
return 82;
case 64:
return 71;
case 65:
return 72;
case 66:
return 5;
case 67:
return "INVALID";
}
},
rules: [/^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\n)*))/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[0-9]+(?=[ \n]+))/i, /^(?:box\b)/i, /^(?:participant\b)/i, /^(?:actor\b)/i, /^(?:[^\->:\n,;]+?([\-]*[^\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i, /^(?:as\b)/i, /^(?:(?:))/i, /^(?:loop\b)/i, /^(?:rect\b)/i, /^(?:opt\b)/i, /^(?:alt\b)/i, /^(?:else\b)/i, /^(?:par\b)/i, /^(?:and\b)/i, /^(?:critical\b)/i, /^(?:option\b)/i, /^(?:break\b)/i, /^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i, /^(?:end\b)/i, /^(?:left of\b)/i, /^(?:right of\b)/i, /^(?:links\b)/i, /^(?:link\b)/i, /^(?:properties\b)/i, /^(?:details\b)/i, /^(?:over\b)/i, /^(?:note\b)/i, /^(?:activate\b)/i, /^(?:deactivate\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:title:\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:sequenceDiagram\b)/i, /^(?:autonumber\b)/i, /^(?:off\b)/i, /^(?:,)/i, /^(?:;)/i, /^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i, /^(?:->>)/i, /^(?:-->>)/i, /^(?:->)/i, /^(?:-->)/i, /^(?:-[x])/i, /^(?:--[x])/i, /^(?:-[\)])/i, /^(?:--[\)])/i, /^(?::(?:(?:no)?wrap)?[^#\n;]+)/i, /^(?:\+)/i, /^(?:-)/i, /^(?:$)/i, /^(?:.)/i],
conditions: { acc_descr_multiline: { rules: [47, 48], inclusive: !1 }, acc_descr: { rules: [45], inclusive: !1 }, acc_title: { rules: [43], inclusive: !1 }, open_directive: { rules: [1, 8], inclusive: !1 }, type_directive: { rules: [2, 3, 8], inclusive: !1 }, arg_directive: { rules: [3, 4, 8], inclusive: !1 }, ID: { rules: [7, 8, 15], inclusive: !1 }, ALIAS: { rules: [7, 8, 16, 17], inclusive: !1 }, LINE: { rules: [7, 8, 28], inclusive: !1 }, INITIAL: { rules: [0, 5, 6, 8, 9, 10, 11, 12, 13, 14, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 44, 46, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67], inclusive: !0 } }
};
return rt;
}();
Mt.lexer = ge;
function Rt() {
this.yy = {};
}
return Rt.prototype = Mt, Mt.Parser = Rt, new Rt();
}();
Bt.parser = Bt;
const Me = Bt;
let yt, ot = {}, xt = [], j = [], Nt = !1, Yt, st;
const Re = function(t, e, s) {
be.parseDirective(this, t, e, s);
}, De = function(t) {
xt.push({
name: t.text,
wrap: t.wrap === void 0 && dt() || !!t.wrap,
fill: t.color,
actorKeys: []
}), st = xt.slice(-1)[0];
}, Ft = function(t, e, s, n) {
let i = st;
const a = ot[t];
if (a) {
if (st && a.box && st !== a.box)
throw new Error(
"A same participant should only be defined in one Box: " + a.name + " can't be in '" + a.box.name + "' and in '" + st.name + "' at the same time."
);
if (i = a.box ? a.box : st, a.box = i, a && e === a.name && s == null)
return;
}
(s == null || s.text == null) && (s = { text: e, wrap: null, type: n }), (n == null || s.text == null) && (s = { text: e, wrap: null, type: n }), ot[t] = {
box: i,
name: e,
description: s.text,
wrap: s.wrap === void 0 && dt() || !!s.wrap,
prevActor: yt,
links: {},
properties: {},
actorCnt: null,
rectData: null,
type: n || "participant"
}, yt && ot[yt] && (ot[yt].nextActor = t), st && st.actorKeys.push(t), yt = t;
}, Ve = (t) => {
let e, s = 0;
for (e = 0; e < j.length; e++)
j[e].type === mt.ACTIVE_START && j[e].from.actor === t && s++, j[e].type === mt.ACTIVE_END && j[e].from.actor === t && s--;
return s;
}, Ce = function(t, e, s, n) {
j.push({
from: t,
to: e,
message: s.text,
wrap: s.wrap === void 0 && dt() || !!s.wrap,
answer: n
});
}, R = function(t, e, s = { text: void 0, wrap: void 0 }, n) {
if (n === mt.ACTIVE_END && Ve(t.actor) < 1) {
let a = new Error("Trying to inactivate an inactive participant (" + t.actor + ")");
throw a.hash = {
text: "->>-",
token: "->>-",
line: "1",
loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
expected: ["'ACTIVE_PARTICIPANT'"]
}, a;
}
return j.push({
from: t,
to: e,
message: s.text,
wrap: s.wrap === void 0 && dt() || !!s.wrap,
type: n
}), !0;
}, Oe = function() {
return xt.length > 0;
}, Be = function() {
return xt.some((t) => t.name);
}, Ye = function() {
return j;
}, Fe = function() {
return xt;
}, We = function() {
return ot;
}, Et = function(t) {
return ot[t];
}, ze = function() {
return Object.keys(ot);
}, qe = function() {
Nt = !0;
}, He = function() {
Nt = !1;
}, Ue = () => Nt, Ke = function(t) {
Yt = t;
}, dt = () => Yt !== void 0 ? Yt : ct().sequence.wrap, Ge = function() {
ot = {}, xt = [], j = [], Nt = !1, ve();
}, Xe = function(t) {
const e = t.trim(), s = {
text: e.replace(/^:?(?:no)?wrap:/, "").trim(),
wrap: e.match(/^:?wrap:/) !== null ? !0 : e.match(/^:?nowrap:/) !== null ? !1 : void 0
};
return K.debug("parseMessage:", s), s;
}, Je = function(t) {
const e = t.match(/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/);
let s = e != null && e[1] ? e[1].trim() : "transparent", n = e != null && e[2] ? e[2].trim() : void 0;
if (window && window.CSS)
window.CSS.supports("color", s) || (s = "transparent", n = t.trim());
else {
const a = new Option().style;
a.color = s, a.color !== s && (s = "transparent", n = t.trim());
}
return {
color: s,
text: n !== void 0 ? Lt(n.replace(/^:?(?:no)?wrap:/, ""), ct()) : void 0,
wrap: n !== void 0 ? n.match(/^:?wrap:/) !== null ? !0 : n.match(/^:?nowrap:/) !== null ? !1 : void 0 : void 0
};
}, mt = {
SOLID: 0,
DOTTED: 1,
NOTE: 2,
SOLID_CROSS: 3,
DOTTED_CROSS: 4,
SOLID_OPEN: 5,
DOTTED_OPEN: 6,
LOOP_START: 10,
LOOP_END: 11,
ALT_START: 12,
ALT_ELSE: 13,
ALT_END: 14,
OPT_START: 15,
OPT_END: 16,
ACTIVE_START: 17,
ACTIVE_END: 18,
PAR_START: 19,
PAR_AND: 20,
PAR_END: 21,
RECT_START: 22,
RECT_END: 23,
SOLID_POINT: 24,
DOTTED_POINT: 25,
AUTONUMBER: 26,
CRITICAL_START: 27,
CRITICAL_OPTION: 28,
CRITICAL_END: 29,
BREAK_START: 30,
BREAK_END: 31
}, Ze = {
FILLED: 0,
OPEN: 1
}, Qe = {
LEFTOF: 0,
RIGHTOF: 1,
OVER: 2
}, ne = function(t, e, s) {
s.text, s.wrap === void 0 && dt() || s.wrap;
const n = [].concat(t, t);
j.push({
from: n[0],
to: n[1],
message: s.text,
wrap: s.wrap === void 0 && dt() || !!s.wrap,
type: mt.NOTE,
placement: e
});
}, ie = function(t, e) {
const s = Et(t);
try {
let n = Lt(e.text, ct());
n = n.replace(/&/g, "&"), n = n.replace(/=/g, "=");
const i = JSON.parse(n);
Ht(s, i);
} catch (n) {
K.error("error while parsing actor link text", n);
}
}, je = function(t, e) {
const s = Et(t);
try {
const o = {};
let l = Lt(e.text, ct());
var n = l.indexOf("@");
l = l.replace(/&/g, "&"), l = l.replace(/=/g, "=");
var i = l.slice(0, n - 1).trim(), a = l.slice(n + 1).trim();
o[i] = a, Ht(s, o);
} catch (o) {
K.error("error while parsing actor link text", o);
}
};
function Ht(t, e) {
if (t.links == null)
t.links = e;
else
for (let s in e)
t.links[s] = e[s];
}
const se = function(t, e) {
const s = Et(t);
try {
let n = Lt(e.text, ct());
const i = JSON.parse(n);
ae(s, i);
} catch (n) {
K.error("error while parsing actor properties text", n);
}
};
function ae(t, e) {
if (t.properties == null)
t.properties = e;
else
for (let s in e)
t.properties[s] = e[s];
}
function $e() {
st = void 0;
}
const re = function(t, e) {
const s = Et(t), n = document.getElementById(e.text);
try {
const i = n.innerHTML, a = JSON.parse(i);
a.properties && ae(s, a.properties), a.links && Ht(s, a.links);
} catch (i) {
K.error("error while parsing actor details text", i);
}
}, t0 = function(t, e) {
if (t !== void 0 && t.properties !== void 0)
return t.properties[e];
}, oe = function(t) {
if (Array.isArray(t))
t.forEach(function(e) {
oe(e);
});
else
switch (t.type) {
case "sequenceIndex":
j.push({
from: void 0,
to: void 0,
message: {
start: t.sequenceIndex,
step: t.sequenceIndexStep,
visible: t.sequenceVisible
},
wrap: !1,
type: t.signalType
});
break;
case "addParticipant":
Ft(t.actor, t.actor, t.description, "participant");
break;
case "addActor":
Ft(t.actor, t.actor, t.description, "actor");
break;
case "activeStart":
R(t.actor, void 0, void 0, t.signalType);
break;
case "activeEnd":
R(t.actor, void 0, void 0, t.signalType);
break;
case "addNote":
ne(t.actor, t.placement, t.text);
break;
case "addLinks":
ie(t.actor, t.text);
break;
case "addALink":
je(t.actor, t.text);
break;
case "addProperties":
se(t.actor, t.text);
break;
case "addDetails":
re(t.actor, t.text);
break;
case "addMessage":
R(t.from, t.to, t.msg, t.signalType);
break;
case "boxStart":
De(t.boxData);
break;
case "boxEnd":
$e();
break;
case "loopStart":
R(void 0, void 0, t.loopText, t.signalType);
break;
case "loopEnd":
R(void 0, void 0, void 0, t.signalType);
break;
case "rectStart":
R(void 0, void 0, t.color, t.signalType);
break;
case "rectEnd":
R(void 0, void 0, void 0, t.signalType);
break;
case "optStart":
R(void 0, void 0, t.optText, t.signalType);
break;
case "optEnd":
R(void 0, void 0, void 0, t.signalType);
break;
case "altStart":
R(void 0, void 0, t.altText, t.signalType);
break;
case "else":
R(void 0, void 0, t.altText, t.signalType);
break;
case "altEnd":
R(void 0, void 0, void 0, t.signalType);
break;
case "setAccTitle":
te(t.text);
break;
case "parStart":
R(void 0, void 0, t.parText, t.signalType);
break;
case "and":
R(void 0, void 0, t.parText, t.signalType);
break;
case "parEnd":
R(void 0, void 0, void 0, t.signalType);
break;
case "criticalStart":
R(void 0, void 0, t.criticalText, t.signalType);
break;
case "option":
R(void 0, void 0, t.optionText, t.signalType);
break;
case "criticalEnd":
R(void 0, void 0, void 0, t.signalType);
break;
case "breakStart":
R(void 0, void 0, t.breakText, t.signalType);
break;
case "breakEnd":
R(void 0, void 0, void 0, t.signalType);
break;
}
}, e0 = {
addActor: Ft,
addMessage: Ce,
addSignal: R,
addLinks: ie,
addDetails: re,
addProperties: se,
autoWrap: dt,
setWrap: Ke,
enableSequenceNumbers: qe,
disableSequenceNumbers: He,
showSequenceNumbers: Ue,
getMessages: Ye,
getActors: We,
getActor: Et,
getActorKeys: ze,
getActorProperty: t0,
getAccTitle: ke,
getBoxes: Fe,
getDiagramTitle: Le,
setDiagramTitle: Pe,
parseDirective: Re,
getConfig: () => ct().sequence,
clear: Ge,
parseMessage: Xe,
parseBoxData: Je,
LINETYPE: mt,
ARROWTYPE: Ze,
PLACEMENT: Qe,
addNote: ne,
setAccTitle: te,
apply: oe,
setAccDescription: Ie,
getAccDescription: Ne,
hasAtLeastOneBox: Oe,
hasAtLeastOneBoxWithTitle: Be
}, n0 = (t) => `.actor {
stroke: ${t.actorBorder};
fill: ${t.actorBkg};
}
text.actor > tspan {
fill: ${t.actorTextColor};
stroke: none;
}
.actor-line {
stroke: ${t.actorLineColor};
}
.messageLine0 {
stroke-width: 1.5;
stroke-dasharray: none;
stroke: ${t.signalColor};
}
.messageLine1 {
stroke-width: 1.5;
stroke-dasharray: 2, 2;
stroke: ${t.signalColor};
}
#arrowhead path {
fill: ${t.signalColor};
stroke: ${t.signalColor};
}
.sequenceNumber {
fill: ${t.sequenceNumberColor};
}
#sequencenumber {
fill: ${t.signalColor};
}
#crosshead path {
fill: ${t.signalColor};
stroke: ${t.signalColor};
}
.messageText {
fill: ${t.signalTextColor};
stroke: none;
}
.labelBox {
stroke: ${t.labelBoxBorderColor};
fill: ${t.labelBoxBkgColor};
}
.labelText, .labelText > tspan {
fill: ${t.labelTextColor};
stroke: none;
}
.loopText, .loopText > tspan {
fill: ${t.loopTextColor};
stroke: none;
}
.loopLine {
stroke-width: 2px;
stroke-dasharray: 2, 2;
stroke: ${t.labelBoxBorderColor};
fill: ${t.labelBoxBorderColor};
}
.note {
//stroke: #decc93;
stroke: ${t.noteBorderColor};
fill: ${t.noteBkgColor};
}
.noteText, .noteText > tspan {
fill: ${t.noteTextColor};
stroke: none;
}
.activation0 {
fill: ${t.activationBkgColor};
stroke: ${t.activationBorderColor};
}
.activation1 {
fill: ${t.activationBkgColor};
stroke: ${t.activationBorderColor};
}
.activation2 {
fill: ${t.activationBkgColor};
stroke: ${t.activationBorderColor};
}
.actorPopupMenu {
position: absolute;
}
.actorPopupMenuPanel {
position: absolute;
fill: ${t.actorBkg};
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
}
.actor-man line {
stroke: ${t.actorBorder};
fill: ${t.actorBkg};
}
.actor-man circle, line {
stroke: ${t.actorBorder};
fill: ${t.actorBkg};
stroke-width: 2px;
}
`, i0 = n0, vt = function(t, e) {
const s = t.append("rect");
return s.attr("x", e.x), s.attr("y", e.y), s.attr("fill", e.fill), s.attr("stroke", e.stroke), s.attr("width", e.width), s.attr("height", e.height), s.attr("rx", e.rx), s.attr("ry", e.ry), e.class !== void 0 && s.attr("class", e.class), s;
}, ce = (t, e) => {
we(() => {
const s = document.querySelectorAll(t);
s.length !== 0 && (s[0].addEventListener("mouseover", function() {
o0("actor" + e + "_popup");
}), s[0].addEventListener("mouseout", function() {
c0("actor" + e + "_popup");
}));
});
}, s0 = function(t, e, s, n, i) {
if (e.links === void 0 || e.links === null || Object.keys(e.links).length === 0)
return { height: 0, width: 0 };
const a = e.links, o = e.actorCnt, l = e.rectData;
var u = "none";
i && (u = "block !important");
const h = t.append("g");
h.attr("id", "actor" + o + "_popup"), h.attr("class", "actorPopupMenu"), h.attr("display", u), ce("#actor" + o + "_popup", o);
var T = "";
l.class !== void 0 && (T = " " + l.class);
let y = l.width > s ? l.width : s;
const p = h.append("rect");
if (p.attr("class", "actorPopupMenuPanel" + T), p.attr("x", l.x), p.attr("y", l.height), p.attr("fill", l.fill), p.attr("stroke", l.stroke), p.attr("width", y), p.attr("height", l.height), p.attr("rx", l.rx), p.attr("ry", l.ry), a != null) {
var x = 20;
for (let v in a) {
var b = h.append("a"), L = It(a[v]);
b.attr("xlink:href", L), b.attr("target", "_blank"), _0(n)(
v,
b,