@schmitech/chatbot-widget 0.5.3 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/Tableau10-D7jGxypv-BNlEL2G_.js +9 -0
  2. package/dist/arc-D-ZI5fuh-CvDHBzlN.js +84 -0
  3. package/dist/blockDiagram-c4efeb88-DUnNxfIR-Bhh-x1q6.js +1221 -0
  4. package/dist/c4Diagram-c83219d4-cC4OxfBG-DRTO_jy5.js +1580 -0
  5. package/dist/channel-hcYozyrT-BSOc2Hp-.js +6 -0
  6. package/dist/chatbot-widget.bundle.js +3881 -1586
  7. package/dist/chatbot-widget.css +1 -1
  8. package/dist/chatbot-widget.es.js +12 -63659
  9. package/dist/chatbot-widget.umd.js +3880 -1585
  10. package/dist/classDiagram-beda092f-BLYhf5Mr-vk4Ko58U.js +218 -0
  11. package/dist/classDiagram-v2-2358418a-VBkbF8mr-Ca0l1fEs.js +201 -0
  12. package/dist/clone-BZIkCMuw-B9owNq6E.js +9 -0
  13. package/dist/config/index.d.ts +2 -2
  14. package/dist/createText-1719965b-UejsQ47k-B1DYw0WW.js +2955 -0
  15. package/dist/edges-96097737-1M5QvjOd-BpQVVoQN.js +1088 -0
  16. package/dist/erDiagram-0228fc6a-CjBNxHoC-DXDVlH55.js +929 -0
  17. package/dist/flowDb-c6c81e3f-Q2aoOxdz-DfrfI3H1.js +1127 -0
  18. package/dist/flowDiagram-50d868cf-zizL6ppE-BAH-_juu.js +788 -0
  19. package/dist/flowDiagram-v2-4f6560a1-DVx_vlO5-bkcRE0UW.js +18 -0
  20. package/dist/flowchart-elk-definition-6af322e1-Eyez36go-B_lk3oHt.js +48132 -0
  21. package/dist/ganttDiagram-a2739b55-C82Jv-TO-DoS-s1Yu.js +1743 -0
  22. package/dist/gitGraphDiagram-82fe8481-D9o_9-U8-DJF-ZeR8.js +1265 -0
  23. package/dist/graph-BjmGDpTe-DgbYS1Ie.js +848 -0
  24. package/dist/index-5325376f-CJL5w-Sw-BXp44Ej5.js +374 -0
  25. package/dist/index-s6Yb6o1D.js +116386 -0
  26. package/dist/infoDiagram-8eee0895-FpS-TLK_-BnvO_wUe.js +320 -0
  27. package/dist/journeyDiagram-c64418c1-CMj1efQ9-CshcRDhm.js +802 -0
  28. package/dist/layout-D_6hdlf3-B7guhEBN.js +1470 -0
  29. package/dist/mindmap-definition-8da855dc-D4SxHjUd-jFZFomnk.js +21924 -0
  30. package/dist/pieDiagram-a8764435-BF5ZqOjB-Mqzg2J4Q.js +498 -0
  31. package/dist/quadrantDiagram-1e28029f-GtQb80VU-DCy1QjzW.js +903 -0
  32. package/dist/requirementDiagram-08caed73-CHtPj3FO-AHEP0cIt.js +767 -0
  33. package/dist/sankeyDiagram-a04cb91d-CBlXzOgd-CWJTc5AX.js +802 -0
  34. package/dist/sequenceDiagram-c5b8d532-Cs1iyw97-oayOJE8v.js +2235 -0
  35. package/dist/shared/styles.d.ts +1 -1
  36. package/dist/stateDiagram-1ecb1508-CpRKICMQ-C5OFJeRZ.js +266 -0
  37. package/dist/stateDiagram-v2-c2b004d7-BtkhFyQ5-DxzE8Je5.js +185 -0
  38. package/dist/styles-b4e223ce-D0oeHeKH-BmNvk4NR.js +1090 -0
  39. package/dist/styles-ca3715f6-BouNgl-L-_qXsPDP3.js +961 -0
  40. package/dist/styles-d45a18b0-Cvhb8Ltu-43I3Cd_I.js +437 -0
  41. package/dist/svgDrawCommon-b86b1483-mg-1NjZY-DrmnILcc.js +65 -0
  42. package/dist/timeline-definition-faaaa080-3olbep_P-BqKpgsPZ.js +793 -0
  43. package/dist/ui/Message.d.ts +1 -5
  44. package/dist/ui/MessagesList.d.ts +1 -5
  45. package/dist/xychartDiagram-f5964ef8-BN6HXpmW-C-g_F1w2.js +1238 -0
  46. package/package.json +3 -3
  47. package/dist/ui/TypingEffect.d.ts +0 -18
@@ -0,0 +1,1580 @@
1
+ import { g as Tt, y as Oe, v as ke, b as ve, a as we, P as Bt, O as re, W as Te, N as Re, S as kt, q as he, h as De, B as Ne, l as Ht, z as le } from "./index-s6Yb6o1D.js";
2
+ import { l as Pe, p as Be } from "./svgDrawCommon-b86b1483-mg-1NjZY-DrmnILcc.js";
3
+ typeof window < "u" && (window.global = window);
4
+ var Yt = function() {
5
+ var e = function(F, g, x, b) {
6
+ for (x = x || {}, b = F.length; b--; x[F[b]] = g)
7
+ ;
8
+ return x;
9
+ }, t = [1, 24], r = [1, 25], o = [1, 26], l = [1, 27], n = [1, 28], i = [1, 63], s = [1, 64], a = [1, 65], d = [1, 66], u = [1, 67], p = [1, 68], f = [1, 69], m = [1, 29], v = [1, 30], w = [1, 31], P = [1, 32], U = [1, 33], Y = [1, 34], q = [1, 35], V = [1, 36], H = [1, 37], G = [1, 38], K = [1, 39], J = [1, 40], Z = [1, 41], tt = [1, 42], et = [1, 43], nt = [1, 44], at = [1, 45], it = [1, 46], st = [1, 47], rt = [1, 48], lt = [1, 50], ot = [1, 51], ct = [1, 52], ht = [1, 53], dt = [1, 54], pt = [1, 55], ut = [1, 56], yt = [1, 57], ft = [1, 58], bt = [1, 59], gt = [1, 60], Ct = [14, 42], Ft = [14, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74], vt = [12, 14, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74], E = [1, 82], A = [1, 83], S = [1, 84], C = [1, 85], O = [12, 14, 42], ne = [12, 14, 33, 42], Dt = [12, 14, 33, 42, 76, 77, 79, 80], mt = [12, 33], Xt = [34, 36, 37, 38, 39, 40, 41, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74], Wt = {
10
+ trace: function() {
11
+ },
12
+ yy: {},
13
+ symbols_: { error: 2, start: 3, mermaidDoc: 4, direction: 5, direction_tb: 6, direction_bt: 7, direction_rl: 8, direction_lr: 9, graphConfig: 10, C4_CONTEXT: 11, NEWLINE: 12, statements: 13, EOF: 14, C4_CONTAINER: 15, C4_COMPONENT: 16, C4_DYNAMIC: 17, C4_DEPLOYMENT: 18, otherStatements: 19, diagramStatements: 20, otherStatement: 21, title: 22, accDescription: 23, acc_title: 24, acc_title_value: 25, acc_descr: 26, acc_descr_value: 27, acc_descr_multiline_value: 28, boundaryStatement: 29, boundaryStartStatement: 30, boundaryStopStatement: 31, boundaryStart: 32, LBRACE: 33, ENTERPRISE_BOUNDARY: 34, attributes: 35, SYSTEM_BOUNDARY: 36, BOUNDARY: 37, CONTAINER_BOUNDARY: 38, NODE: 39, NODE_L: 40, NODE_R: 41, RBRACE: 42, diagramStatement: 43, PERSON: 44, PERSON_EXT: 45, SYSTEM: 46, SYSTEM_DB: 47, SYSTEM_QUEUE: 48, SYSTEM_EXT: 49, SYSTEM_EXT_DB: 50, SYSTEM_EXT_QUEUE: 51, CONTAINER: 52, CONTAINER_DB: 53, CONTAINER_QUEUE: 54, CONTAINER_EXT: 55, CONTAINER_EXT_DB: 56, CONTAINER_EXT_QUEUE: 57, COMPONENT: 58, COMPONENT_DB: 59, COMPONENT_QUEUE: 60, COMPONENT_EXT: 61, COMPONENT_EXT_DB: 62, COMPONENT_EXT_QUEUE: 63, REL: 64, BIREL: 65, REL_U: 66, REL_D: 67, REL_L: 68, REL_R: 69, REL_B: 70, REL_INDEX: 71, UPDATE_EL_STYLE: 72, UPDATE_REL_STYLE: 73, UPDATE_LAYOUT_CONFIG: 74, attribute: 75, STR: 76, STR_KEY: 77, STR_VALUE: 78, ATTRIBUTE: 79, ATTRIBUTE_EMPTY: 80, $accept: 0, $end: 1 },
14
+ terminals_: { 2: "error", 6: "direction_tb", 7: "direction_bt", 8: "direction_rl", 9: "direction_lr", 11: "C4_CONTEXT", 12: "NEWLINE", 14: "EOF", 15: "C4_CONTAINER", 16: "C4_COMPONENT", 17: "C4_DYNAMIC", 18: "C4_DEPLOYMENT", 22: "title", 23: "accDescription", 24: "acc_title", 25: "acc_title_value", 26: "acc_descr", 27: "acc_descr_value", 28: "acc_descr_multiline_value", 33: "LBRACE", 34: "ENTERPRISE_BOUNDARY", 36: "SYSTEM_BOUNDARY", 37: "BOUNDARY", 38: "CONTAINER_BOUNDARY", 39: "NODE", 40: "NODE_L", 41: "NODE_R", 42: "RBRACE", 44: "PERSON", 45: "PERSON_EXT", 46: "SYSTEM", 47: "SYSTEM_DB", 48: "SYSTEM_QUEUE", 49: "SYSTEM_EXT", 50: "SYSTEM_EXT_DB", 51: "SYSTEM_EXT_QUEUE", 52: "CONTAINER", 53: "CONTAINER_DB", 54: "CONTAINER_QUEUE", 55: "CONTAINER_EXT", 56: "CONTAINER_EXT_DB", 57: "CONTAINER_EXT_QUEUE", 58: "COMPONENT", 59: "COMPONENT_DB", 60: "COMPONENT_QUEUE", 61: "COMPONENT_EXT", 62: "COMPONENT_EXT_DB", 63: "COMPONENT_EXT_QUEUE", 64: "REL", 65: "BIREL", 66: "REL_U", 67: "REL_D", 68: "REL_L", 69: "REL_R", 70: "REL_B", 71: "REL_INDEX", 72: "UPDATE_EL_STYLE", 73: "UPDATE_REL_STYLE", 74: "UPDATE_LAYOUT_CONFIG", 76: "STR", 77: "STR_KEY", 78: "STR_VALUE", 79: "ATTRIBUTE", 80: "ATTRIBUTE_EMPTY" },
15
+ productions_: [0, [3, 1], [3, 1], [5, 1], [5, 1], [5, 1], [5, 1], [4, 1], [10, 4], [10, 4], [10, 4], [10, 4], [10, 4], [13, 1], [13, 1], [13, 2], [19, 1], [19, 2], [19, 3], [21, 1], [21, 1], [21, 2], [21, 2], [21, 1], [29, 3], [30, 3], [30, 3], [30, 4], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [31, 1], [20, 1], [20, 2], [20, 3], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 1], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [35, 1], [35, 2], [75, 1], [75, 2], [75, 1], [75, 1]],
16
+ performAction: function(F, g, x, b, k, h, D) {
17
+ var y = h.length - 1;
18
+ switch (k) {
19
+ case 3:
20
+ b.setDirection("TB");
21
+ break;
22
+ case 4:
23
+ b.setDirection("BT");
24
+ break;
25
+ case 5:
26
+ b.setDirection("RL");
27
+ break;
28
+ case 6:
29
+ b.setDirection("LR");
30
+ break;
31
+ case 8:
32
+ case 9:
33
+ case 10:
34
+ case 11:
35
+ case 12:
36
+ b.setC4Type(h[y - 3]);
37
+ break;
38
+ case 19:
39
+ b.setTitle(h[y].substring(6)), this.$ = h[y].substring(6);
40
+ break;
41
+ case 20:
42
+ b.setAccDescription(h[y].substring(15)), this.$ = h[y].substring(15);
43
+ break;
44
+ case 21:
45
+ this.$ = h[y].trim(), b.setTitle(this.$);
46
+ break;
47
+ case 22:
48
+ case 23:
49
+ this.$ = h[y].trim(), b.setAccDescription(this.$);
50
+ break;
51
+ case 28:
52
+ case 29:
53
+ h[y].splice(2, 0, "ENTERPRISE"), b.addPersonOrSystemBoundary(...h[y]), this.$ = h[y];
54
+ break;
55
+ case 30:
56
+ b.addPersonOrSystemBoundary(...h[y]), this.$ = h[y];
57
+ break;
58
+ case 31:
59
+ h[y].splice(2, 0, "CONTAINER"), b.addContainerBoundary(...h[y]), this.$ = h[y];
60
+ break;
61
+ case 32:
62
+ b.addDeploymentNode("node", ...h[y]), this.$ = h[y];
63
+ break;
64
+ case 33:
65
+ b.addDeploymentNode("nodeL", ...h[y]), this.$ = h[y];
66
+ break;
67
+ case 34:
68
+ b.addDeploymentNode("nodeR", ...h[y]), this.$ = h[y];
69
+ break;
70
+ case 35:
71
+ b.popBoundaryParseStack();
72
+ break;
73
+ case 39:
74
+ b.addPersonOrSystem("person", ...h[y]), this.$ = h[y];
75
+ break;
76
+ case 40:
77
+ b.addPersonOrSystem("external_person", ...h[y]), this.$ = h[y];
78
+ break;
79
+ case 41:
80
+ b.addPersonOrSystem("system", ...h[y]), this.$ = h[y];
81
+ break;
82
+ case 42:
83
+ b.addPersonOrSystem("system_db", ...h[y]), this.$ = h[y];
84
+ break;
85
+ case 43:
86
+ b.addPersonOrSystem("system_queue", ...h[y]), this.$ = h[y];
87
+ break;
88
+ case 44:
89
+ b.addPersonOrSystem("external_system", ...h[y]), this.$ = h[y];
90
+ break;
91
+ case 45:
92
+ b.addPersonOrSystem("external_system_db", ...h[y]), this.$ = h[y];
93
+ break;
94
+ case 46:
95
+ b.addPersonOrSystem("external_system_queue", ...h[y]), this.$ = h[y];
96
+ break;
97
+ case 47:
98
+ b.addContainer("container", ...h[y]), this.$ = h[y];
99
+ break;
100
+ case 48:
101
+ b.addContainer("container_db", ...h[y]), this.$ = h[y];
102
+ break;
103
+ case 49:
104
+ b.addContainer("container_queue", ...h[y]), this.$ = h[y];
105
+ break;
106
+ case 50:
107
+ b.addContainer("external_container", ...h[y]), this.$ = h[y];
108
+ break;
109
+ case 51:
110
+ b.addContainer("external_container_db", ...h[y]), this.$ = h[y];
111
+ break;
112
+ case 52:
113
+ b.addContainer("external_container_queue", ...h[y]), this.$ = h[y];
114
+ break;
115
+ case 53:
116
+ b.addComponent("component", ...h[y]), this.$ = h[y];
117
+ break;
118
+ case 54:
119
+ b.addComponent("component_db", ...h[y]), this.$ = h[y];
120
+ break;
121
+ case 55:
122
+ b.addComponent("component_queue", ...h[y]), this.$ = h[y];
123
+ break;
124
+ case 56:
125
+ b.addComponent("external_component", ...h[y]), this.$ = h[y];
126
+ break;
127
+ case 57:
128
+ b.addComponent("external_component_db", ...h[y]), this.$ = h[y];
129
+ break;
130
+ case 58:
131
+ b.addComponent("external_component_queue", ...h[y]), this.$ = h[y];
132
+ break;
133
+ case 60:
134
+ b.addRel("rel", ...h[y]), this.$ = h[y];
135
+ break;
136
+ case 61:
137
+ b.addRel("birel", ...h[y]), this.$ = h[y];
138
+ break;
139
+ case 62:
140
+ b.addRel("rel_u", ...h[y]), this.$ = h[y];
141
+ break;
142
+ case 63:
143
+ b.addRel("rel_d", ...h[y]), this.$ = h[y];
144
+ break;
145
+ case 64:
146
+ b.addRel("rel_l", ...h[y]), this.$ = h[y];
147
+ break;
148
+ case 65:
149
+ b.addRel("rel_r", ...h[y]), this.$ = h[y];
150
+ break;
151
+ case 66:
152
+ b.addRel("rel_b", ...h[y]), this.$ = h[y];
153
+ break;
154
+ case 67:
155
+ h[y].splice(0, 1), b.addRel("rel", ...h[y]), this.$ = h[y];
156
+ break;
157
+ case 68:
158
+ b.updateElStyle("update_el_style", ...h[y]), this.$ = h[y];
159
+ break;
160
+ case 69:
161
+ b.updateRelStyle("update_rel_style", ...h[y]), this.$ = h[y];
162
+ break;
163
+ case 70:
164
+ b.updateLayoutConfig("update_layout_config", ...h[y]), this.$ = h[y];
165
+ break;
166
+ case 71:
167
+ this.$ = [h[y]];
168
+ break;
169
+ case 72:
170
+ h[y].unshift(h[y - 1]), this.$ = h[y];
171
+ break;
172
+ case 73:
173
+ case 75:
174
+ this.$ = h[y].trim();
175
+ break;
176
+ case 74:
177
+ let Et = {};
178
+ Et[h[y - 1].trim()] = h[y].trim(), this.$ = Et;
179
+ break;
180
+ case 76:
181
+ this.$ = "";
182
+ break;
183
+ }
184
+ },
185
+ table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 7: [1, 6], 8: [1, 7], 9: [1, 8], 10: 4, 11: [1, 9], 15: [1, 10], 16: [1, 11], 17: [1, 12], 18: [1, 13] }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 7] }, { 1: [2, 3] }, { 1: [2, 4] }, { 1: [2, 5] }, { 1: [2, 6] }, { 12: [1, 14] }, { 12: [1, 15] }, { 12: [1, 16] }, { 12: [1, 17] }, { 12: [1, 18] }, { 13: 19, 19: 20, 20: 21, 21: 22, 22: t, 23: r, 24: o, 26: l, 28: n, 29: 49, 30: 61, 32: 62, 34: i, 36: s, 37: a, 38: d, 39: u, 40: p, 41: f, 43: 23, 44: m, 45: v, 46: w, 47: P, 48: U, 49: Y, 50: q, 51: V, 52: H, 53: G, 54: K, 55: J, 56: Z, 57: tt, 58: et, 59: nt, 60: at, 61: it, 62: st, 63: rt, 64: lt, 65: ot, 66: ct, 67: ht, 68: dt, 69: pt, 70: ut, 71: yt, 72: ft, 73: bt, 74: gt }, { 13: 70, 19: 20, 20: 21, 21: 22, 22: t, 23: r, 24: o, 26: l, 28: n, 29: 49, 30: 61, 32: 62, 34: i, 36: s, 37: a, 38: d, 39: u, 40: p, 41: f, 43: 23, 44: m, 45: v, 46: w, 47: P, 48: U, 49: Y, 50: q, 51: V, 52: H, 53: G, 54: K, 55: J, 56: Z, 57: tt, 58: et, 59: nt, 60: at, 61: it, 62: st, 63: rt, 64: lt, 65: ot, 66: ct, 67: ht, 68: dt, 69: pt, 70: ut, 71: yt, 72: ft, 73: bt, 74: gt }, { 13: 71, 19: 20, 20: 21, 21: 22, 22: t, 23: r, 24: o, 26: l, 28: n, 29: 49, 30: 61, 32: 62, 34: i, 36: s, 37: a, 38: d, 39: u, 40: p, 41: f, 43: 23, 44: m, 45: v, 46: w, 47: P, 48: U, 49: Y, 50: q, 51: V, 52: H, 53: G, 54: K, 55: J, 56: Z, 57: tt, 58: et, 59: nt, 60: at, 61: it, 62: st, 63: rt, 64: lt, 65: ot, 66: ct, 67: ht, 68: dt, 69: pt, 70: ut, 71: yt, 72: ft, 73: bt, 74: gt }, { 13: 72, 19: 20, 20: 21, 21: 22, 22: t, 23: r, 24: o, 26: l, 28: n, 29: 49, 30: 61, 32: 62, 34: i, 36: s, 37: a, 38: d, 39: u, 40: p, 41: f, 43: 23, 44: m, 45: v, 46: w, 47: P, 48: U, 49: Y, 50: q, 51: V, 52: H, 53: G, 54: K, 55: J, 56: Z, 57: tt, 58: et, 59: nt, 60: at, 61: it, 62: st, 63: rt, 64: lt, 65: ot, 66: ct, 67: ht, 68: dt, 69: pt, 70: ut, 71: yt, 72: ft, 73: bt, 74: gt }, { 13: 73, 19: 20, 20: 21, 21: 22, 22: t, 23: r, 24: o, 26: l, 28: n, 29: 49, 30: 61, 32: 62, 34: i, 36: s, 37: a, 38: d, 39: u, 40: p, 41: f, 43: 23, 44: m, 45: v, 46: w, 47: P, 48: U, 49: Y, 50: q, 51: V, 52: H, 53: G, 54: K, 55: J, 56: Z, 57: tt, 58: et, 59: nt, 60: at, 61: it, 62: st, 63: rt, 64: lt, 65: ot, 66: ct, 67: ht, 68: dt, 69: pt, 70: ut, 71: yt, 72: ft, 73: bt, 74: gt }, { 14: [1, 74] }, e(Ct, [2, 13], { 43: 23, 29: 49, 30: 61, 32: 62, 20: 75, 34: i, 36: s, 37: a, 38: d, 39: u, 40: p, 41: f, 44: m, 45: v, 46: w, 47: P, 48: U, 49: Y, 50: q, 51: V, 52: H, 53: G, 54: K, 55: J, 56: Z, 57: tt, 58: et, 59: nt, 60: at, 61: it, 62: st, 63: rt, 64: lt, 65: ot, 66: ct, 67: ht, 68: dt, 69: pt, 70: ut, 71: yt, 72: ft, 73: bt, 74: gt }), e(Ct, [2, 14]), e(Ft, [2, 16], { 12: [1, 76] }), e(Ct, [2, 36], { 12: [1, 77] }), e(vt, [2, 19]), e(vt, [2, 20]), { 25: [1, 78] }, { 27: [1, 79] }, e(vt, [2, 23]), { 35: 80, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 86, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 87, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 88, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 89, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 90, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 91, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 92, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 93, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 94, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 95, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 96, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 97, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 98, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 99, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 100, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 101, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 102, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 103, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 104, 75: 81, 76: E, 77: A, 79: S, 80: C }, e(O, [2, 59]), { 35: 105, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 106, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 107, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 108, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 109, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 110, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 111, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 112, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 113, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 114, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 115, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 20: 116, 29: 49, 30: 61, 32: 62, 34: i, 36: s, 37: a, 38: d, 39: u, 40: p, 41: f, 43: 23, 44: m, 45: v, 46: w, 47: P, 48: U, 49: Y, 50: q, 51: V, 52: H, 53: G, 54: K, 55: J, 56: Z, 57: tt, 58: et, 59: nt, 60: at, 61: it, 62: st, 63: rt, 64: lt, 65: ot, 66: ct, 67: ht, 68: dt, 69: pt, 70: ut, 71: yt, 72: ft, 73: bt, 74: gt }, { 12: [1, 118], 33: [1, 117] }, { 35: 119, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 120, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 121, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 122, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 123, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 124, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 35: 125, 75: 81, 76: E, 77: A, 79: S, 80: C }, { 14: [1, 126] }, { 14: [1, 127] }, { 14: [1, 128] }, { 14: [1, 129] }, { 1: [2, 8] }, e(Ct, [2, 15]), e(Ft, [2, 17], { 21: 22, 19: 130, 22: t, 23: r, 24: o, 26: l, 28: n }), e(Ct, [2, 37], { 19: 20, 20: 21, 21: 22, 43: 23, 29: 49, 30: 61, 32: 62, 13: 131, 22: t, 23: r, 24: o, 26: l, 28: n, 34: i, 36: s, 37: a, 38: d, 39: u, 40: p, 41: f, 44: m, 45: v, 46: w, 47: P, 48: U, 49: Y, 50: q, 51: V, 52: H, 53: G, 54: K, 55: J, 56: Z, 57: tt, 58: et, 59: nt, 60: at, 61: it, 62: st, 63: rt, 64: lt, 65: ot, 66: ct, 67: ht, 68: dt, 69: pt, 70: ut, 71: yt, 72: ft, 73: bt, 74: gt }), e(vt, [2, 21]), e(vt, [2, 22]), e(O, [2, 39]), e(ne, [2, 71], { 75: 81, 35: 132, 76: E, 77: A, 79: S, 80: C }), e(Dt, [2, 73]), { 78: [1, 133] }, e(Dt, [2, 75]), e(Dt, [2, 76]), e(O, [2, 40]), e(O, [2, 41]), e(O, [2, 42]), e(O, [2, 43]), e(O, [2, 44]), e(O, [2, 45]), e(O, [2, 46]), e(O, [2, 47]), e(O, [2, 48]), e(O, [2, 49]), e(O, [2, 50]), e(O, [2, 51]), e(O, [2, 52]), e(O, [2, 53]), e(O, [2, 54]), e(O, [2, 55]), e(O, [2, 56]), e(O, [2, 57]), e(O, [2, 58]), e(O, [2, 60]), e(O, [2, 61]), e(O, [2, 62]), e(O, [2, 63]), e(O, [2, 64]), e(O, [2, 65]), e(O, [2, 66]), e(O, [2, 67]), e(O, [2, 68]), e(O, [2, 69]), e(O, [2, 70]), { 31: 134, 42: [1, 135] }, { 12: [1, 136] }, { 33: [1, 137] }, e(mt, [2, 28]), e(mt, [2, 29]), e(mt, [2, 30]), e(mt, [2, 31]), e(mt, [2, 32]), e(mt, [2, 33]), e(mt, [2, 34]), { 1: [2, 9] }, { 1: [2, 10] }, { 1: [2, 11] }, { 1: [2, 12] }, e(Ft, [2, 18]), e(Ct, [2, 38]), e(ne, [2, 72]), e(Dt, [2, 74]), e(O, [2, 24]), e(O, [2, 35]), e(Xt, [2, 25]), e(Xt, [2, 26], { 12: [1, 138] }), e(Xt, [2, 27])],
186
+ defaultActions: { 2: [2, 1], 3: [2, 2], 4: [2, 7], 5: [2, 3], 6: [2, 4], 7: [2, 5], 8: [2, 6], 74: [2, 8], 126: [2, 9], 127: [2, 10], 128: [2, 11], 129: [2, 12] },
187
+ parseError: function(F, g) {
188
+ if (g.recoverable)
189
+ this.trace(F);
190
+ else {
191
+ var x = new Error(F);
192
+ throw x.hash = g, x;
193
+ }
194
+ },
195
+ parse: function(F) {
196
+ var g = this, x = [0], b = [], k = [null], h = [], D = this.table, y = "", Et = 0, ae = 0, Ee = 2, ie = 1, Ae = h.slice.call(arguments, 1), T = Object.create(this.lexer), At = { yy: {} };
197
+ for (var Qt in this.yy)
198
+ Object.prototype.hasOwnProperty.call(this.yy, Qt) && (At.yy[Qt] = this.yy[Qt]);
199
+ T.setInput(F, At.yy), At.yy.lexer = T, At.yy.parser = this, typeof T.yylloc > "u" && (T.yylloc = {});
200
+ var $t = T.yylloc;
201
+ h.push($t);
202
+ var Se = T.options && T.options.ranges;
203
+ typeof At.yy.parseError == "function" ? this.parseError = At.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
204
+ function Ce() {
205
+ var Q;
206
+ return Q = b.pop() || T.lex() || ie, typeof Q != "number" && (Q instanceof Array && (b = Q, Q = b.pop()), Q = g.symbols_[Q] || Q), Q;
207
+ }
208
+ for (var N, St, B, qt, Ot = {}, Nt, z, se, Pt; ; ) {
209
+ if (St = x[x.length - 1], this.defaultActions[St] ? B = this.defaultActions[St] : ((N === null || typeof N > "u") && (N = Ce()), B = D[St] && D[St][N]), typeof B > "u" || !B.length || !B[0]) {
210
+ var Vt = "";
211
+ Pt = [];
212
+ for (Nt in D[St])
213
+ this.terminals_[Nt] && Nt > Ee && Pt.push("'" + this.terminals_[Nt] + "'");
214
+ T.showPosition ? Vt = "Parse error on line " + (Et + 1) + `:
215
+ ` + T.showPosition() + `
216
+ Expecting ` + Pt.join(", ") + ", got '" + (this.terminals_[N] || N) + "'" : Vt = "Parse error on line " + (Et + 1) + ": Unexpected " + (N == ie ? "end of input" : "'" + (this.terminals_[N] || N) + "'"), this.parseError(Vt, {
217
+ text: T.match,
218
+ token: this.terminals_[N] || N,
219
+ line: T.yylineno,
220
+ loc: $t,
221
+ expected: Pt
222
+ });
223
+ }
224
+ if (B[0] instanceof Array && B.length > 1)
225
+ throw new Error("Parse Error: multiple actions possible at state: " + St + ", token: " + N);
226
+ switch (B[0]) {
227
+ case 1:
228
+ x.push(N), k.push(T.yytext), h.push(T.yylloc), x.push(B[1]), N = null, ae = T.yyleng, y = T.yytext, Et = T.yylineno, $t = T.yylloc;
229
+ break;
230
+ case 2:
231
+ if (z = this.productions_[B[1]][1], Ot.$ = k[k.length - z], Ot._$ = {
232
+ first_line: h[h.length - (z || 1)].first_line,
233
+ last_line: h[h.length - 1].last_line,
234
+ first_column: h[h.length - (z || 1)].first_column,
235
+ last_column: h[h.length - 1].last_column
236
+ }, Se && (Ot._$.range = [
237
+ h[h.length - (z || 1)].range[0],
238
+ h[h.length - 1].range[1]
239
+ ]), qt = this.performAction.apply(Ot, [
240
+ y,
241
+ ae,
242
+ Et,
243
+ At.yy,
244
+ B[1],
245
+ k,
246
+ h
247
+ ].concat(Ae)), typeof qt < "u")
248
+ return qt;
249
+ z && (x = x.slice(0, -1 * z * 2), k = k.slice(0, -1 * z), h = h.slice(0, -1 * z)), x.push(this.productions_[B[1]][0]), k.push(Ot.$), h.push(Ot._$), se = D[x[x.length - 2]][x[x.length - 1]], x.push(se);
250
+ break;
251
+ case 3:
252
+ return !0;
253
+ }
254
+ }
255
+ return !0;
256
+ }
257
+ }, me = /* @__PURE__ */ function() {
258
+ var F = {
259
+ EOF: 1,
260
+ parseError: function(g, x) {
261
+ if (this.yy.parser)
262
+ this.yy.parser.parseError(g, x);
263
+ else
264
+ throw new Error(g);
265
+ },
266
+ // resets the lexer, sets new input
267
+ setInput: function(g, x) {
268
+ return this.yy = x || this.yy || {}, this._input = g, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
269
+ first_line: 1,
270
+ first_column: 0,
271
+ last_line: 1,
272
+ last_column: 0
273
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
274
+ },
275
+ // consumes and returns one char from the input
276
+ input: function() {
277
+ var g = this._input[0];
278
+ this.yytext += g, this.yyleng++, this.offset++, this.match += g, this.matched += g;
279
+ var x = g.match(/(?:\r\n?|\n).*/g);
280
+ return x ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), g;
281
+ },
282
+ // unshifts one char (or a string) into the input
283
+ unput: function(g) {
284
+ var x = g.length, b = g.split(/(?:\r\n?|\n)/g);
285
+ this._input = g + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - x), this.offset -= x;
286
+ var k = this.match.split(/(?:\r\n?|\n)/g);
287
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), b.length - 1 && (this.yylineno -= b.length - 1);
288
+ var h = this.yylloc.range;
289
+ return this.yylloc = {
290
+ first_line: this.yylloc.first_line,
291
+ last_line: this.yylineno + 1,
292
+ first_column: this.yylloc.first_column,
293
+ last_column: b ? (b.length === k.length ? this.yylloc.first_column : 0) + k[k.length - b.length].length - b[0].length : this.yylloc.first_column - x
294
+ }, this.options.ranges && (this.yylloc.range = [h[0], h[0] + this.yyleng - x]), this.yyleng = this.yytext.length, this;
295
+ },
296
+ // When called from action, caches matched text and appends it on next action
297
+ more: function() {
298
+ return this._more = !0, this;
299
+ },
300
+ // 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.
301
+ reject: function() {
302
+ if (this.options.backtrack_lexer)
303
+ this._backtrack = !0;
304
+ else
305
+ 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).
306
+ ` + this.showPosition(), {
307
+ text: "",
308
+ token: null,
309
+ line: this.yylineno
310
+ });
311
+ return this;
312
+ },
313
+ // retain first n characters of the match
314
+ less: function(g) {
315
+ this.unput(this.match.slice(g));
316
+ },
317
+ // displays already matched input, i.e. for error messages
318
+ pastInput: function() {
319
+ var g = this.matched.substr(0, this.matched.length - this.match.length);
320
+ return (g.length > 20 ? "..." : "") + g.substr(-20).replace(/\n/g, "");
321
+ },
322
+ // displays upcoming input, i.e. for error messages
323
+ upcomingInput: function() {
324
+ var g = this.match;
325
+ return g.length < 20 && (g += this._input.substr(0, 20 - g.length)), (g.substr(0, 20) + (g.length > 20 ? "..." : "")).replace(/\n/g, "");
326
+ },
327
+ // displays the character position where the lexing error occurred, i.e. for error messages
328
+ showPosition: function() {
329
+ var g = this.pastInput(), x = new Array(g.length + 1).join("-");
330
+ return g + this.upcomingInput() + `
331
+ ` + x + "^";
332
+ },
333
+ // test the lexed token: return FALSE when not a match, otherwise return token
334
+ test_match: function(g, x) {
335
+ var b, k, h;
336
+ if (this.options.backtrack_lexer && (h = {
337
+ yylineno: this.yylineno,
338
+ yylloc: {
339
+ first_line: this.yylloc.first_line,
340
+ last_line: this.last_line,
341
+ first_column: this.yylloc.first_column,
342
+ last_column: this.yylloc.last_column
343
+ },
344
+ yytext: this.yytext,
345
+ match: this.match,
346
+ matches: this.matches,
347
+ matched: this.matched,
348
+ yyleng: this.yyleng,
349
+ offset: this.offset,
350
+ _more: this._more,
351
+ _input: this._input,
352
+ yy: this.yy,
353
+ conditionStack: this.conditionStack.slice(0),
354
+ done: this.done
355
+ }, this.options.ranges && (h.yylloc.range = this.yylloc.range.slice(0))), k = g[0].match(/(?:\r\n?|\n).*/g), k && (this.yylineno += k.length), this.yylloc = {
356
+ first_line: this.yylloc.last_line,
357
+ last_line: this.yylineno + 1,
358
+ first_column: this.yylloc.last_column,
359
+ last_column: k ? k[k.length - 1].length - k[k.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + g[0].length
360
+ }, this.yytext += g[0], this.match += g[0], this.matches = g, 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(g[0].length), this.matched += g[0], b = this.performAction.call(this, this.yy, this, x, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), b)
361
+ return b;
362
+ if (this._backtrack) {
363
+ for (var D in h)
364
+ this[D] = h[D];
365
+ return !1;
366
+ }
367
+ return !1;
368
+ },
369
+ // return next match in input
370
+ next: function() {
371
+ if (this.done)
372
+ return this.EOF;
373
+ this._input || (this.done = !0);
374
+ var g, x, b, k;
375
+ this._more || (this.yytext = "", this.match = "");
376
+ for (var h = this._currentRules(), D = 0; D < h.length; D++)
377
+ if (b = this._input.match(this.rules[h[D]]), b && (!x || b[0].length > x[0].length)) {
378
+ if (x = b, k = D, this.options.backtrack_lexer) {
379
+ if (g = this.test_match(b, h[D]), g !== !1)
380
+ return g;
381
+ if (this._backtrack) {
382
+ x = !1;
383
+ continue;
384
+ } else
385
+ return !1;
386
+ } else if (!this.options.flex)
387
+ break;
388
+ }
389
+ return x ? (g = this.test_match(x, h[k]), g !== !1 ? g : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
390
+ ` + this.showPosition(), {
391
+ text: "",
392
+ token: null,
393
+ line: this.yylineno
394
+ });
395
+ },
396
+ // return next match that has a token
397
+ lex: function() {
398
+ var g = this.next();
399
+ return g || this.lex();
400
+ },
401
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
402
+ begin: function(g) {
403
+ this.conditionStack.push(g);
404
+ },
405
+ // pop the previously active lexer condition state off the condition stack
406
+ popState: function() {
407
+ var g = this.conditionStack.length - 1;
408
+ return g > 0 ? this.conditionStack.pop() : this.conditionStack[0];
409
+ },
410
+ // produce the lexer rule set which is active for the currently active lexer condition state
411
+ _currentRules: function() {
412
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
413
+ },
414
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
415
+ topState: function(g) {
416
+ return g = this.conditionStack.length - 1 - Math.abs(g || 0), g >= 0 ? this.conditionStack[g] : "INITIAL";
417
+ },
418
+ // alias for begin(condition)
419
+ pushState: function(g) {
420
+ this.begin(g);
421
+ },
422
+ // return the number of states currently on the stack
423
+ stateStackSize: function() {
424
+ return this.conditionStack.length;
425
+ },
426
+ options: {},
427
+ performAction: function(g, x, b, k) {
428
+ switch (b) {
429
+ case 0:
430
+ return 6;
431
+ case 1:
432
+ return 7;
433
+ case 2:
434
+ return 8;
435
+ case 3:
436
+ return 9;
437
+ case 4:
438
+ return 22;
439
+ case 5:
440
+ return 23;
441
+ case 6:
442
+ return this.begin("acc_title"), 24;
443
+ case 7:
444
+ return this.popState(), "acc_title_value";
445
+ case 8:
446
+ return this.begin("acc_descr"), 26;
447
+ case 9:
448
+ return this.popState(), "acc_descr_value";
449
+ case 10:
450
+ this.begin("acc_descr_multiline");
451
+ break;
452
+ case 11:
453
+ this.popState();
454
+ break;
455
+ case 12:
456
+ return "acc_descr_multiline_value";
457
+ case 13:
458
+ break;
459
+ case 14:
460
+ c;
461
+ break;
462
+ case 15:
463
+ return 12;
464
+ case 16:
465
+ break;
466
+ case 17:
467
+ return 11;
468
+ case 18:
469
+ return 15;
470
+ case 19:
471
+ return 16;
472
+ case 20:
473
+ return 17;
474
+ case 21:
475
+ return 18;
476
+ case 22:
477
+ return this.begin("person_ext"), 45;
478
+ case 23:
479
+ return this.begin("person"), 44;
480
+ case 24:
481
+ return this.begin("system_ext_queue"), 51;
482
+ case 25:
483
+ return this.begin("system_ext_db"), 50;
484
+ case 26:
485
+ return this.begin("system_ext"), 49;
486
+ case 27:
487
+ return this.begin("system_queue"), 48;
488
+ case 28:
489
+ return this.begin("system_db"), 47;
490
+ case 29:
491
+ return this.begin("system"), 46;
492
+ case 30:
493
+ return this.begin("boundary"), 37;
494
+ case 31:
495
+ return this.begin("enterprise_boundary"), 34;
496
+ case 32:
497
+ return this.begin("system_boundary"), 36;
498
+ case 33:
499
+ return this.begin("container_ext_queue"), 57;
500
+ case 34:
501
+ return this.begin("container_ext_db"), 56;
502
+ case 35:
503
+ return this.begin("container_ext"), 55;
504
+ case 36:
505
+ return this.begin("container_queue"), 54;
506
+ case 37:
507
+ return this.begin("container_db"), 53;
508
+ case 38:
509
+ return this.begin("container"), 52;
510
+ case 39:
511
+ return this.begin("container_boundary"), 38;
512
+ case 40:
513
+ return this.begin("component_ext_queue"), 63;
514
+ case 41:
515
+ return this.begin("component_ext_db"), 62;
516
+ case 42:
517
+ return this.begin("component_ext"), 61;
518
+ case 43:
519
+ return this.begin("component_queue"), 60;
520
+ case 44:
521
+ return this.begin("component_db"), 59;
522
+ case 45:
523
+ return this.begin("component"), 58;
524
+ case 46:
525
+ return this.begin("node"), 39;
526
+ case 47:
527
+ return this.begin("node"), 39;
528
+ case 48:
529
+ return this.begin("node_l"), 40;
530
+ case 49:
531
+ return this.begin("node_r"), 41;
532
+ case 50:
533
+ return this.begin("rel"), 64;
534
+ case 51:
535
+ return this.begin("birel"), 65;
536
+ case 52:
537
+ return this.begin("rel_u"), 66;
538
+ case 53:
539
+ return this.begin("rel_u"), 66;
540
+ case 54:
541
+ return this.begin("rel_d"), 67;
542
+ case 55:
543
+ return this.begin("rel_d"), 67;
544
+ case 56:
545
+ return this.begin("rel_l"), 68;
546
+ case 57:
547
+ return this.begin("rel_l"), 68;
548
+ case 58:
549
+ return this.begin("rel_r"), 69;
550
+ case 59:
551
+ return this.begin("rel_r"), 69;
552
+ case 60:
553
+ return this.begin("rel_b"), 70;
554
+ case 61:
555
+ return this.begin("rel_index"), 71;
556
+ case 62:
557
+ return this.begin("update_el_style"), 72;
558
+ case 63:
559
+ return this.begin("update_rel_style"), 73;
560
+ case 64:
561
+ return this.begin("update_layout_config"), 74;
562
+ case 65:
563
+ return "EOF_IN_STRUCT";
564
+ case 66:
565
+ return this.begin("attribute"), "ATTRIBUTE_EMPTY";
566
+ case 67:
567
+ this.begin("attribute");
568
+ break;
569
+ case 68:
570
+ this.popState(), this.popState();
571
+ break;
572
+ case 69:
573
+ return 80;
574
+ case 70:
575
+ break;
576
+ case 71:
577
+ return 80;
578
+ case 72:
579
+ this.begin("string");
580
+ break;
581
+ case 73:
582
+ this.popState();
583
+ break;
584
+ case 74:
585
+ return "STR";
586
+ case 75:
587
+ this.begin("string_kv");
588
+ break;
589
+ case 76:
590
+ return this.begin("string_kv_key"), "STR_KEY";
591
+ case 77:
592
+ this.popState(), this.begin("string_kv_value");
593
+ break;
594
+ case 78:
595
+ return "STR_VALUE";
596
+ case 79:
597
+ this.popState(), this.popState();
598
+ break;
599
+ case 80:
600
+ return "STR";
601
+ case 81:
602
+ return "LBRACE";
603
+ case 82:
604
+ return "RBRACE";
605
+ case 83:
606
+ return "SPACE";
607
+ case 84:
608
+ return "EOL";
609
+ case 85:
610
+ return 14;
611
+ }
612
+ },
613
+ rules: [/^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:title\s[^#\n;]+)/, /^(?:accDescription\s[^#\n;]+)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/, /^(?:%%[^\n]*(\r?\n)*)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:C4Context\b)/, /^(?:C4Container\b)/, /^(?:C4Component\b)/, /^(?:C4Dynamic\b)/, /^(?:C4Deployment\b)/, /^(?:Person_Ext\b)/, /^(?:Person\b)/, /^(?:SystemQueue_Ext\b)/, /^(?:SystemDb_Ext\b)/, /^(?:System_Ext\b)/, /^(?:SystemQueue\b)/, /^(?:SystemDb\b)/, /^(?:System\b)/, /^(?:Boundary\b)/, /^(?:Enterprise_Boundary\b)/, /^(?:System_Boundary\b)/, /^(?:ContainerQueue_Ext\b)/, /^(?:ContainerDb_Ext\b)/, /^(?:Container_Ext\b)/, /^(?:ContainerQueue\b)/, /^(?:ContainerDb\b)/, /^(?:Container\b)/, /^(?:Container_Boundary\b)/, /^(?:ComponentQueue_Ext\b)/, /^(?:ComponentDb_Ext\b)/, /^(?:Component_Ext\b)/, /^(?:ComponentQueue\b)/, /^(?:ComponentDb\b)/, /^(?:Component\b)/, /^(?:Deployment_Node\b)/, /^(?:Node\b)/, /^(?:Node_L\b)/, /^(?:Node_R\b)/, /^(?:Rel\b)/, /^(?:BiRel\b)/, /^(?:Rel_Up\b)/, /^(?:Rel_U\b)/, /^(?:Rel_Down\b)/, /^(?:Rel_D\b)/, /^(?:Rel_Left\b)/, /^(?:Rel_L\b)/, /^(?:Rel_Right\b)/, /^(?:Rel_R\b)/, /^(?:Rel_Back\b)/, /^(?:RelIndex\b)/, /^(?:UpdateElementStyle\b)/, /^(?:UpdateRelStyle\b)/, /^(?:UpdateLayoutConfig\b)/, /^(?:$)/, /^(?:[(][ ]*[,])/, /^(?:[(])/, /^(?:[)])/, /^(?:,,)/, /^(?:,)/, /^(?:[ ]*["]["])/, /^(?:[ ]*["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:[ ]*[\$])/, /^(?:[^=]*)/, /^(?:[=][ ]*["])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:[^,]+)/, /^(?:\{)/, /^(?:\})/, /^(?:[\s]+)/, /^(?:[\n\r]+)/, /^(?:$)/],
614
+ conditions: { acc_descr_multiline: { rules: [11, 12], inclusive: !1 }, acc_descr: { rules: [9], inclusive: !1 }, acc_title: { rules: [7], inclusive: !1 }, string_kv_value: { rules: [78, 79], inclusive: !1 }, string_kv_key: { rules: [77], inclusive: !1 }, string_kv: { rules: [76], inclusive: !1 }, string: { rules: [73, 74], inclusive: !1 }, attribute: { rules: [68, 69, 70, 71, 72, 75, 80], inclusive: !1 }, update_layout_config: { rules: [65, 66, 67, 68], inclusive: !1 }, update_rel_style: { rules: [65, 66, 67, 68], inclusive: !1 }, update_el_style: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_b: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_r: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_l: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_d: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_u: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_bi: { rules: [], inclusive: !1 }, rel: { rules: [65, 66, 67, 68], inclusive: !1 }, node_r: { rules: [65, 66, 67, 68], inclusive: !1 }, node_l: { rules: [65, 66, 67, 68], inclusive: !1 }, node: { rules: [65, 66, 67, 68], inclusive: !1 }, index: { rules: [], inclusive: !1 }, rel_index: { rules: [65, 66, 67, 68], inclusive: !1 }, component_ext_queue: { rules: [], inclusive: !1 }, component_ext_db: { rules: [65, 66, 67, 68], inclusive: !1 }, component_ext: { rules: [65, 66, 67, 68], inclusive: !1 }, component_queue: { rules: [65, 66, 67, 68], inclusive: !1 }, component_db: { rules: [65, 66, 67, 68], inclusive: !1 }, component: { rules: [65, 66, 67, 68], inclusive: !1 }, container_boundary: { rules: [65, 66, 67, 68], inclusive: !1 }, container_ext_queue: { rules: [65, 66, 67, 68], inclusive: !1 }, container_ext_db: { rules: [65, 66, 67, 68], inclusive: !1 }, container_ext: { rules: [65, 66, 67, 68], inclusive: !1 }, container_queue: { rules: [65, 66, 67, 68], inclusive: !1 }, container_db: { rules: [65, 66, 67, 68], inclusive: !1 }, container: { rules: [65, 66, 67, 68], inclusive: !1 }, birel: { rules: [65, 66, 67, 68], inclusive: !1 }, system_boundary: { rules: [65, 66, 67, 68], inclusive: !1 }, enterprise_boundary: { rules: [65, 66, 67, 68], inclusive: !1 }, boundary: { rules: [65, 66, 67, 68], inclusive: !1 }, system_ext_queue: { rules: [65, 66, 67, 68], inclusive: !1 }, system_ext_db: { rules: [65, 66, 67, 68], inclusive: !1 }, system_ext: { rules: [65, 66, 67, 68], inclusive: !1 }, system_queue: { rules: [65, 66, 67, 68], inclusive: !1 }, system_db: { rules: [65, 66, 67, 68], inclusive: !1 }, system: { rules: [65, 66, 67, 68], inclusive: !1 }, person_ext: { rules: [65, 66, 67, 68], inclusive: !1 }, person: { rules: [65, 66, 67, 68], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 8, 10, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 81, 82, 83, 84, 85], inclusive: !0 } }
615
+ };
616
+ return F;
617
+ }();
618
+ Wt.lexer = me;
619
+ function zt() {
620
+ this.yy = {};
621
+ }
622
+ return zt.prototype = Wt, Wt.Parser = zt, new zt();
623
+ }();
624
+ Yt.parser = Yt;
625
+ const je = Yt;
626
+ let M = [], _t = [""], R = "global", I = "", W = [
627
+ {
628
+ alias: "global",
629
+ label: { text: "global" },
630
+ type: { text: "global" },
631
+ tags: null,
632
+ link: null,
633
+ parentBoundary: ""
634
+ }
635
+ ], Rt = [], Zt = "", te = !1, Lt = 4, It = 2;
636
+ var de;
637
+ const Ye = function() {
638
+ return de;
639
+ }, Le = function(e) {
640
+ de = he(e, Tt());
641
+ }, Ie = function(e, t, r, o, l, n, i, s, a) {
642
+ if (e == null || t === void 0 || t === null || r === void 0 || r === null || o === void 0 || o === null)
643
+ return;
644
+ let d = {};
645
+ const u = Rt.find((p) => p.from === t && p.to === r);
646
+ if (u ? d = u : Rt.push(d), d.type = e, d.from = t, d.to = r, d.label = { text: o }, l == null)
647
+ d.techn = { text: "" };
648
+ else if (typeof l == "object") {
649
+ let [p, f] = Object.entries(l)[0];
650
+ d[p] = { text: f };
651
+ } else
652
+ d.techn = { text: l };
653
+ if (n == null)
654
+ d.descr = { text: "" };
655
+ else if (typeof n == "object") {
656
+ let [p, f] = Object.entries(n)[0];
657
+ d[p] = { text: f };
658
+ } else
659
+ d.descr = { text: n };
660
+ if (typeof i == "object") {
661
+ let [p, f] = Object.entries(i)[0];
662
+ d[p] = f;
663
+ } else
664
+ d.sprite = i;
665
+ if (typeof s == "object") {
666
+ let [p, f] = Object.entries(s)[0];
667
+ d[p] = f;
668
+ } else
669
+ d.tags = s;
670
+ if (typeof a == "object") {
671
+ let [p, f] = Object.entries(a)[0];
672
+ d[p] = f;
673
+ } else
674
+ d.link = a;
675
+ d.wrap = xt();
676
+ }, Me = function(e, t, r, o, l, n, i) {
677
+ if (t === null || r === null)
678
+ return;
679
+ let s = {};
680
+ const a = M.find((d) => d.alias === t);
681
+ if (a && t === a.alias ? s = a : (s.alias = t, M.push(s)), r == null ? s.label = { text: "" } : s.label = { text: r }, o == null)
682
+ s.descr = { text: "" };
683
+ else if (typeof o == "object") {
684
+ let [d, u] = Object.entries(o)[0];
685
+ s[d] = { text: u };
686
+ } else
687
+ s.descr = { text: o };
688
+ if (typeof l == "object") {
689
+ let [d, u] = Object.entries(l)[0];
690
+ s[d] = u;
691
+ } else
692
+ s.sprite = l;
693
+ if (typeof n == "object") {
694
+ let [d, u] = Object.entries(n)[0];
695
+ s[d] = u;
696
+ } else
697
+ s.tags = n;
698
+ if (typeof i == "object") {
699
+ let [d, u] = Object.entries(i)[0];
700
+ s[d] = u;
701
+ } else
702
+ s.link = i;
703
+ s.typeC4Shape = { text: e }, s.parentBoundary = R, s.wrap = xt();
704
+ }, Ue = function(e, t, r, o, l, n, i, s) {
705
+ if (t === null || r === null)
706
+ return;
707
+ let a = {};
708
+ const d = M.find((u) => u.alias === t);
709
+ if (d && t === d.alias ? a = d : (a.alias = t, M.push(a)), r == null ? a.label = { text: "" } : a.label = { text: r }, o == null)
710
+ a.techn = { text: "" };
711
+ else if (typeof o == "object") {
712
+ let [u, p] = Object.entries(o)[0];
713
+ a[u] = { text: p };
714
+ } else
715
+ a.techn = { text: o };
716
+ if (l == null)
717
+ a.descr = { text: "" };
718
+ else if (typeof l == "object") {
719
+ let [u, p] = Object.entries(l)[0];
720
+ a[u] = { text: p };
721
+ } else
722
+ a.descr = { text: l };
723
+ if (typeof n == "object") {
724
+ let [u, p] = Object.entries(n)[0];
725
+ a[u] = p;
726
+ } else
727
+ a.sprite = n;
728
+ if (typeof i == "object") {
729
+ let [u, p] = Object.entries(i)[0];
730
+ a[u] = p;
731
+ } else
732
+ a.tags = i;
733
+ if (typeof s == "object") {
734
+ let [u, p] = Object.entries(s)[0];
735
+ a[u] = p;
736
+ } else
737
+ a.link = s;
738
+ a.wrap = xt(), a.typeC4Shape = { text: e }, a.parentBoundary = R;
739
+ }, Fe = function(e, t, r, o, l, n, i, s) {
740
+ if (t === null || r === null)
741
+ return;
742
+ let a = {};
743
+ const d = M.find((u) => u.alias === t);
744
+ if (d && t === d.alias ? a = d : (a.alias = t, M.push(a)), r == null ? a.label = { text: "" } : a.label = { text: r }, o == null)
745
+ a.techn = { text: "" };
746
+ else if (typeof o == "object") {
747
+ let [u, p] = Object.entries(o)[0];
748
+ a[u] = { text: p };
749
+ } else
750
+ a.techn = { text: o };
751
+ if (l == null)
752
+ a.descr = { text: "" };
753
+ else if (typeof l == "object") {
754
+ let [u, p] = Object.entries(l)[0];
755
+ a[u] = { text: p };
756
+ } else
757
+ a.descr = { text: l };
758
+ if (typeof n == "object") {
759
+ let [u, p] = Object.entries(n)[0];
760
+ a[u] = p;
761
+ } else
762
+ a.sprite = n;
763
+ if (typeof i == "object") {
764
+ let [u, p] = Object.entries(i)[0];
765
+ a[u] = p;
766
+ } else
767
+ a.tags = i;
768
+ if (typeof s == "object") {
769
+ let [u, p] = Object.entries(s)[0];
770
+ a[u] = p;
771
+ } else
772
+ a.link = s;
773
+ a.wrap = xt(), a.typeC4Shape = { text: e }, a.parentBoundary = R;
774
+ }, Xe = function(e, t, r, o, l) {
775
+ if (e === null || t === null)
776
+ return;
777
+ let n = {};
778
+ const i = W.find((s) => s.alias === e);
779
+ if (i && e === i.alias ? n = i : (n.alias = e, W.push(n)), t == null ? n.label = { text: "" } : n.label = { text: t }, r == null)
780
+ n.type = { text: "system" };
781
+ else if (typeof r == "object") {
782
+ let [s, a] = Object.entries(r)[0];
783
+ n[s] = { text: a };
784
+ } else
785
+ n.type = { text: r };
786
+ if (typeof o == "object") {
787
+ let [s, a] = Object.entries(o)[0];
788
+ n[s] = a;
789
+ } else
790
+ n.tags = o;
791
+ if (typeof l == "object") {
792
+ let [s, a] = Object.entries(l)[0];
793
+ n[s] = a;
794
+ } else
795
+ n.link = l;
796
+ n.parentBoundary = R, n.wrap = xt(), I = R, R = e, _t.push(I);
797
+ }, We = function(e, t, r, o, l) {
798
+ if (e === null || t === null)
799
+ return;
800
+ let n = {};
801
+ const i = W.find((s) => s.alias === e);
802
+ if (i && e === i.alias ? n = i : (n.alias = e, W.push(n)), t == null ? n.label = { text: "" } : n.label = { text: t }, r == null)
803
+ n.type = { text: "container" };
804
+ else if (typeof r == "object") {
805
+ let [s, a] = Object.entries(r)[0];
806
+ n[s] = { text: a };
807
+ } else
808
+ n.type = { text: r };
809
+ if (typeof o == "object") {
810
+ let [s, a] = Object.entries(o)[0];
811
+ n[s] = a;
812
+ } else
813
+ n.tags = o;
814
+ if (typeof l == "object") {
815
+ let [s, a] = Object.entries(l)[0];
816
+ n[s] = a;
817
+ } else
818
+ n.link = l;
819
+ n.parentBoundary = R, n.wrap = xt(), I = R, R = e, _t.push(I);
820
+ }, ze = function(e, t, r, o, l, n, i, s) {
821
+ if (t === null || r === null)
822
+ return;
823
+ let a = {};
824
+ const d = W.find((u) => u.alias === t);
825
+ if (d && t === d.alias ? a = d : (a.alias = t, W.push(a)), r == null ? a.label = { text: "" } : a.label = { text: r }, o == null)
826
+ a.type = { text: "node" };
827
+ else if (typeof o == "object") {
828
+ let [u, p] = Object.entries(o)[0];
829
+ a[u] = { text: p };
830
+ } else
831
+ a.type = { text: o };
832
+ if (l == null)
833
+ a.descr = { text: "" };
834
+ else if (typeof l == "object") {
835
+ let [u, p] = Object.entries(l)[0];
836
+ a[u] = { text: p };
837
+ } else
838
+ a.descr = { text: l };
839
+ if (typeof i == "object") {
840
+ let [u, p] = Object.entries(i)[0];
841
+ a[u] = p;
842
+ } else
843
+ a.tags = i;
844
+ if (typeof s == "object") {
845
+ let [u, p] = Object.entries(s)[0];
846
+ a[u] = p;
847
+ } else
848
+ a.link = s;
849
+ a.nodeType = e, a.parentBoundary = R, a.wrap = xt(), I = R, R = t, _t.push(I);
850
+ }, Qe = function() {
851
+ R = I, _t.pop(), I = _t.pop(), _t.push(I);
852
+ }, $e = function(e, t, r, o, l, n, i, s, a, d, u) {
853
+ let p = M.find((f) => f.alias === t);
854
+ if (!(p === void 0 && (p = W.find((f) => f.alias === t), p === void 0))) {
855
+ if (r != null)
856
+ if (typeof r == "object") {
857
+ let [f, m] = Object.entries(r)[0];
858
+ p[f] = m;
859
+ } else
860
+ p.bgColor = r;
861
+ if (o != null)
862
+ if (typeof o == "object") {
863
+ let [f, m] = Object.entries(o)[0];
864
+ p[f] = m;
865
+ } else
866
+ p.fontColor = o;
867
+ if (l != null)
868
+ if (typeof l == "object") {
869
+ let [f, m] = Object.entries(l)[0];
870
+ p[f] = m;
871
+ } else
872
+ p.borderColor = l;
873
+ if (n != null)
874
+ if (typeof n == "object") {
875
+ let [f, m] = Object.entries(n)[0];
876
+ p[f] = m;
877
+ } else
878
+ p.shadowing = n;
879
+ if (i != null)
880
+ if (typeof i == "object") {
881
+ let [f, m] = Object.entries(i)[0];
882
+ p[f] = m;
883
+ } else
884
+ p.shape = i;
885
+ if (s != null)
886
+ if (typeof s == "object") {
887
+ let [f, m] = Object.entries(s)[0];
888
+ p[f] = m;
889
+ } else
890
+ p.sprite = s;
891
+ if (a != null)
892
+ if (typeof a == "object") {
893
+ let [f, m] = Object.entries(a)[0];
894
+ p[f] = m;
895
+ } else
896
+ p.techn = a;
897
+ if (d != null)
898
+ if (typeof d == "object") {
899
+ let [f, m] = Object.entries(d)[0];
900
+ p[f] = m;
901
+ } else
902
+ p.legendText = d;
903
+ if (u != null)
904
+ if (typeof u == "object") {
905
+ let [f, m] = Object.entries(u)[0];
906
+ p[f] = m;
907
+ } else
908
+ p.legendSprite = u;
909
+ }
910
+ }, qe = function(e, t, r, o, l, n, i) {
911
+ const s = Rt.find((a) => a.from === t && a.to === r);
912
+ if (s !== void 0) {
913
+ if (o != null)
914
+ if (typeof o == "object") {
915
+ let [a, d] = Object.entries(o)[0];
916
+ s[a] = d;
917
+ } else
918
+ s.textColor = o;
919
+ if (l != null)
920
+ if (typeof l == "object") {
921
+ let [a, d] = Object.entries(l)[0];
922
+ s[a] = d;
923
+ } else
924
+ s.lineColor = l;
925
+ if (n != null)
926
+ if (typeof n == "object") {
927
+ let [a, d] = Object.entries(n)[0];
928
+ s[a] = parseInt(d);
929
+ } else
930
+ s.offsetX = parseInt(n);
931
+ if (i != null)
932
+ if (typeof i == "object") {
933
+ let [a, d] = Object.entries(i)[0];
934
+ s[a] = parseInt(d);
935
+ } else
936
+ s.offsetY = parseInt(i);
937
+ }
938
+ }, Ve = function(e, t, r) {
939
+ let o = Lt, l = It;
940
+ if (typeof t == "object") {
941
+ const n = Object.values(t)[0];
942
+ o = parseInt(n);
943
+ } else
944
+ o = parseInt(t);
945
+ if (typeof r == "object") {
946
+ const n = Object.values(r)[0];
947
+ l = parseInt(n);
948
+ } else
949
+ l = parseInt(r);
950
+ o >= 1 && (Lt = o), l >= 1 && (It = l);
951
+ }, He = function() {
952
+ return Lt;
953
+ }, Ge = function() {
954
+ return It;
955
+ }, Ke = function() {
956
+ return R;
957
+ }, Je = function() {
958
+ return I;
959
+ }, pe = function(e) {
960
+ return e == null ? M : M.filter((t) => t.parentBoundary === e);
961
+ }, Ze = function(e) {
962
+ return M.find((t) => t.alias === e);
963
+ }, t0 = function(e) {
964
+ return Object.keys(pe(e));
965
+ }, ue = function(e) {
966
+ return e == null ? W : W.filter((t) => t.parentBoundary === e);
967
+ }, e0 = ue, n0 = function() {
968
+ return Rt;
969
+ }, a0 = function() {
970
+ return Zt;
971
+ }, i0 = function(e) {
972
+ te = e;
973
+ }, xt = function() {
974
+ return te;
975
+ }, s0 = function() {
976
+ M = [], W = [
977
+ {
978
+ alias: "global",
979
+ label: { text: "global" },
980
+ type: { text: "global" },
981
+ tags: null,
982
+ link: null,
983
+ parentBoundary: ""
984
+ }
985
+ ], I = "", R = "global", _t = [""], Rt = [], _t = [""], Zt = "", te = !1, Lt = 4, It = 2;
986
+ }, r0 = {
987
+ SOLID: 0,
988
+ DOTTED: 1,
989
+ NOTE: 2,
990
+ SOLID_CROSS: 3,
991
+ DOTTED_CROSS: 4,
992
+ SOLID_OPEN: 5,
993
+ DOTTED_OPEN: 6,
994
+ LOOP_START: 10,
995
+ LOOP_END: 11,
996
+ ALT_START: 12,
997
+ ALT_ELSE: 13,
998
+ ALT_END: 14,
999
+ OPT_START: 15,
1000
+ OPT_END: 16,
1001
+ ACTIVE_START: 17,
1002
+ ACTIVE_END: 18,
1003
+ PAR_START: 19,
1004
+ PAR_AND: 20,
1005
+ PAR_END: 21,
1006
+ RECT_START: 22,
1007
+ RECT_END: 23,
1008
+ SOLID_POINT: 24,
1009
+ DOTTED_POINT: 25
1010
+ }, l0 = {
1011
+ FILLED: 0,
1012
+ OPEN: 1
1013
+ }, o0 = {
1014
+ LEFTOF: 0,
1015
+ RIGHTOF: 1,
1016
+ OVER: 2
1017
+ }, c0 = function(e) {
1018
+ Zt = he(e, Tt());
1019
+ }, Gt = {
1020
+ addPersonOrSystem: Me,
1021
+ addPersonOrSystemBoundary: Xe,
1022
+ addContainer: Ue,
1023
+ addContainerBoundary: We,
1024
+ addComponent: Fe,
1025
+ addDeploymentNode: ze,
1026
+ popBoundaryParseStack: Qe,
1027
+ addRel: Ie,
1028
+ updateElStyle: $e,
1029
+ updateRelStyle: qe,
1030
+ updateLayoutConfig: Ve,
1031
+ autoWrap: xt,
1032
+ setWrap: i0,
1033
+ getC4ShapeArray: pe,
1034
+ getC4Shape: Ze,
1035
+ getC4ShapeKeys: t0,
1036
+ getBoundaries: ue,
1037
+ getBoundarys: e0,
1038
+ getCurrentBoundaryParse: Ke,
1039
+ getParentBoundaryParse: Je,
1040
+ getRels: n0,
1041
+ getTitle: a0,
1042
+ getC4Type: Ye,
1043
+ getC4ShapeInRow: He,
1044
+ getC4BoundaryInRow: Ge,
1045
+ setAccTitle: we,
1046
+ getAccTitle: ve,
1047
+ getAccDescription: ke,
1048
+ setAccDescription: Oe,
1049
+ getConfig: () => Tt().c4,
1050
+ clear: s0,
1051
+ LINETYPE: r0,
1052
+ ARROWTYPE: l0,
1053
+ PLACEMENT: o0,
1054
+ setTitle: c0,
1055
+ setC4Type: Le
1056
+ // apply,
1057
+ }, ee = function(e, t) {
1058
+ return Pe(e, t);
1059
+ }, ye = function(e, t, r, o, l, n) {
1060
+ const i = e.append("image");
1061
+ i.attr("width", t), i.attr("height", r), i.attr("x", o), i.attr("y", l);
1062
+ let s = n.startsWith("data:image/png;base64") ? n : De.sanitizeUrl(n);
1063
+ i.attr("xlink:href", s);
1064
+ }, h0 = (e, t, r) => {
1065
+ const o = e.append("g");
1066
+ let l = 0;
1067
+ for (let n of t) {
1068
+ let i = n.textColor ? n.textColor : "#444444", s = n.lineColor ? n.lineColor : "#444444", a = n.offsetX ? parseInt(n.offsetX) : 0, d = n.offsetY ? parseInt(n.offsetY) : 0, u = "";
1069
+ if (l === 0) {
1070
+ let f = o.append("line");
1071
+ f.attr("x1", n.startPoint.x), f.attr("y1", n.startPoint.y), f.attr("x2", n.endPoint.x), f.attr("y2", n.endPoint.y), f.attr("stroke-width", "1"), f.attr("stroke", s), f.style("fill", "none"), n.type !== "rel_b" && f.attr("marker-end", "url(" + u + "#arrowhead)"), (n.type === "birel" || n.type === "rel_b") && f.attr("marker-start", "url(" + u + "#arrowend)"), l = -1;
1072
+ } else {
1073
+ let f = o.append("path");
1074
+ f.attr("fill", "none").attr("stroke-width", "1").attr("stroke", s).attr(
1075
+ "d",
1076
+ "Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx", n.startPoint.x).replaceAll("starty", n.startPoint.y).replaceAll(
1077
+ "controlx",
1078
+ n.startPoint.x + (n.endPoint.x - n.startPoint.x) / 2 - (n.endPoint.x - n.startPoint.x) / 4
1079
+ ).replaceAll("controly", n.startPoint.y + (n.endPoint.y - n.startPoint.y) / 2).replaceAll("stopx", n.endPoint.x).replaceAll("stopy", n.endPoint.y)
1080
+ ), n.type !== "rel_b" && f.attr("marker-end", "url(" + u + "#arrowhead)"), (n.type === "birel" || n.type === "rel_b") && f.attr("marker-start", "url(" + u + "#arrowend)");
1081
+ }
1082
+ let p = r.messageFont();
1083
+ $(r)(
1084
+ n.label.text,
1085
+ o,
1086
+ Math.min(n.startPoint.x, n.endPoint.x) + Math.abs(n.endPoint.x - n.startPoint.x) / 2 + a,
1087
+ Math.min(n.startPoint.y, n.endPoint.y) + Math.abs(n.endPoint.y - n.startPoint.y) / 2 + d,
1088
+ n.label.width,
1089
+ n.label.height,
1090
+ { fill: i },
1091
+ p
1092
+ ), n.techn && n.techn.text !== "" && (p = r.messageFont(), $(r)(
1093
+ "[" + n.techn.text + "]",
1094
+ o,
1095
+ Math.min(n.startPoint.x, n.endPoint.x) + Math.abs(n.endPoint.x - n.startPoint.x) / 2 + a,
1096
+ Math.min(n.startPoint.y, n.endPoint.y) + Math.abs(n.endPoint.y - n.startPoint.y) / 2 + r.messageFontSize + 5 + d,
1097
+ Math.max(n.label.width, n.techn.width),
1098
+ n.techn.height,
1099
+ { fill: i, "font-style": "italic" },
1100
+ p
1101
+ ));
1102
+ }
1103
+ }, d0 = function(e, t, r) {
1104
+ const o = e.append("g");
1105
+ let l = t.bgColor ? t.bgColor : "none", n = t.borderColor ? t.borderColor : "#444444", i = t.fontColor ? t.fontColor : "black", s = { "stroke-width": 1, "stroke-dasharray": "7.0,7.0" };
1106
+ t.nodeType && (s = { "stroke-width": 1 });
1107
+ let a = {
1108
+ x: t.x,
1109
+ y: t.y,
1110
+ fill: l,
1111
+ stroke: n,
1112
+ width: t.width,
1113
+ height: t.height,
1114
+ rx: 2.5,
1115
+ ry: 2.5,
1116
+ attrs: s
1117
+ };
1118
+ ee(o, a);
1119
+ let d = r.boundaryFont();
1120
+ d.fontWeight = "bold", d.fontSize = d.fontSize + 2, d.fontColor = i, $(r)(
1121
+ t.label.text,
1122
+ o,
1123
+ t.x,
1124
+ t.y + t.label.Y,
1125
+ t.width,
1126
+ t.height,
1127
+ { fill: "#444444" },
1128
+ d
1129
+ ), t.type && t.type.text !== "" && (d = r.boundaryFont(), d.fontColor = i, $(r)(
1130
+ t.type.text,
1131
+ o,
1132
+ t.x,
1133
+ t.y + t.type.Y,
1134
+ t.width,
1135
+ t.height,
1136
+ { fill: "#444444" },
1137
+ d
1138
+ )), t.descr && t.descr.text !== "" && (d = r.boundaryFont(), d.fontSize = d.fontSize - 2, d.fontColor = i, $(r)(
1139
+ t.descr.text,
1140
+ o,
1141
+ t.x,
1142
+ t.y + t.descr.Y,
1143
+ t.width,
1144
+ t.height,
1145
+ { fill: "#444444" },
1146
+ d
1147
+ ));
1148
+ }, p0 = function(e, t, r) {
1149
+ var o;
1150
+ let l = t.bgColor ? t.bgColor : r[t.typeC4Shape.text + "_bg_color"], n = t.borderColor ? t.borderColor : r[t.typeC4Shape.text + "_border_color"], i = t.fontColor ? t.fontColor : "#FFFFFF", s = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";
1151
+ switch (t.typeC4Shape.text) {
1152
+ case "person":
1153
+ s = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";
1154
+ break;
1155
+ case "external_person":
1156
+ s = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";
1157
+ break;
1158
+ }
1159
+ const a = e.append("g");
1160
+ a.attr("class", "person-man");
1161
+ const d = Be();
1162
+ switch (t.typeC4Shape.text) {
1163
+ case "person":
1164
+ case "external_person":
1165
+ case "system":
1166
+ case "external_system":
1167
+ case "container":
1168
+ case "external_container":
1169
+ case "component":
1170
+ case "external_component":
1171
+ d.x = t.x, d.y = t.y, d.fill = l, d.width = t.width, d.height = t.height, d.stroke = n, d.rx = 2.5, d.ry = 2.5, d.attrs = { "stroke-width": 0.5 }, ee(a, d);
1172
+ break;
1173
+ case "system_db":
1174
+ case "external_system_db":
1175
+ case "container_db":
1176
+ case "external_container_db":
1177
+ case "component_db":
1178
+ case "external_component_db":
1179
+ a.append("path").attr("fill", l).attr("stroke-width", "0.5").attr("stroke", n).attr(
1180
+ "d",
1181
+ "Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx", t.x).replaceAll("starty", t.y).replaceAll("half", t.width / 2).replaceAll("height", t.height)
1182
+ ), a.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", n).attr(
1183
+ "d",
1184
+ "Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx", t.x).replaceAll("starty", t.y).replaceAll("half", t.width / 2)
1185
+ );
1186
+ break;
1187
+ case "system_queue":
1188
+ case "external_system_queue":
1189
+ case "container_queue":
1190
+ case "external_container_queue":
1191
+ case "component_queue":
1192
+ case "external_component_queue":
1193
+ a.append("path").attr("fill", l).attr("stroke-width", "0.5").attr("stroke", n).attr(
1194
+ "d",
1195
+ "Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx", t.x).replaceAll("starty", t.y).replaceAll("width", t.width).replaceAll("half", t.height / 2)
1196
+ ), a.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", n).attr(
1197
+ "d",
1198
+ "Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx", t.x + t.width).replaceAll("starty", t.y).replaceAll("half", t.height / 2)
1199
+ );
1200
+ break;
1201
+ }
1202
+ let u = E0(r, t.typeC4Shape.text);
1203
+ switch (a.append("text").attr("fill", i).attr("font-family", u.fontFamily).attr("font-size", u.fontSize - 2).attr("font-style", "italic").attr("lengthAdjust", "spacing").attr("textLength", t.typeC4Shape.width).attr("x", t.x + t.width / 2 - t.typeC4Shape.width / 2).attr("y", t.y + t.typeC4Shape.Y).text("<<" + t.typeC4Shape.text + ">>"), t.typeC4Shape.text) {
1204
+ case "person":
1205
+ case "external_person":
1206
+ ye(
1207
+ a,
1208
+ 48,
1209
+ 48,
1210
+ t.x + t.width / 2 - 24,
1211
+ t.y + t.image.Y,
1212
+ s
1213
+ );
1214
+ break;
1215
+ }
1216
+ let p = r[t.typeC4Shape.text + "Font"]();
1217
+ return p.fontWeight = "bold", p.fontSize = p.fontSize + 2, p.fontColor = i, $(r)(
1218
+ t.label.text,
1219
+ a,
1220
+ t.x,
1221
+ t.y + t.label.Y,
1222
+ t.width,
1223
+ t.height,
1224
+ { fill: i },
1225
+ p
1226
+ ), p = r[t.typeC4Shape.text + "Font"](), p.fontColor = i, t.techn && ((o = t.techn) == null ? void 0 : o.text) !== "" ? $(r)(
1227
+ t.techn.text,
1228
+ a,
1229
+ t.x,
1230
+ t.y + t.techn.Y,
1231
+ t.width,
1232
+ t.height,
1233
+ { fill: i, "font-style": "italic" },
1234
+ p
1235
+ ) : t.type && t.type.text !== "" && $(r)(
1236
+ t.type.text,
1237
+ a,
1238
+ t.x,
1239
+ t.y + t.type.Y,
1240
+ t.width,
1241
+ t.height,
1242
+ { fill: i, "font-style": "italic" },
1243
+ p
1244
+ ), t.descr && t.descr.text !== "" && (p = r.personFont(), p.fontColor = i, $(r)(
1245
+ t.descr.text,
1246
+ a,
1247
+ t.x,
1248
+ t.y + t.descr.Y,
1249
+ t.width,
1250
+ t.height,
1251
+ { fill: i },
1252
+ p
1253
+ )), t.height;
1254
+ }, u0 = function(e) {
1255
+ e.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr(
1256
+ "d",
1257
+ "M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z"
1258
+ );
1259
+ }, y0 = function(e) {
1260
+ e.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
1261
+ "d",
1262
+ "M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z"
1263
+ );
1264
+ }, f0 = function(e) {
1265
+ e.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
1266
+ "d",
1267
+ "M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z"
1268
+ );
1269
+ }, b0 = function(e) {
1270
+ e.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 9).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z");
1271
+ }, g0 = function(e) {
1272
+ e.append("defs").append("marker").attr("id", "arrowend").attr("refX", 1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 10 0 L 0 5 L 10 10 z");
1273
+ }, _0 = function(e) {
1274
+ e.append("defs").append("marker").attr("id", "filled-head").attr("refX", 18).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
1275
+ }, x0 = function(e) {
1276
+ e.append("defs").append("marker").attr("id", "sequencenumber").attr("refX", 15).attr("refY", 15).attr("markerWidth", 60).attr("markerHeight", 40).attr("orient", "auto").append("circle").attr("cx", 15).attr("cy", 15).attr("r", 6);
1277
+ }, m0 = function(e) {
1278
+ const t = e.append("defs").append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 16).attr("refY", 4);
1279
+ t.append("path").attr("fill", "black").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 9,2 V 6 L16,4 Z"), t.append("path").attr("fill", "none").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 0,1 L 6,7 M 6,1 L 0,7");
1280
+ }, E0 = (e, t) => ({
1281
+ fontFamily: e[t + "FontFamily"],
1282
+ fontSize: e[t + "FontSize"],
1283
+ fontWeight: e[t + "FontWeight"]
1284
+ }), $ = /* @__PURE__ */ function() {
1285
+ function e(l, n, i, s, a, d, u) {
1286
+ const p = n.append("text").attr("x", i + a / 2).attr("y", s + d / 2 + 5).style("text-anchor", "middle").text(l);
1287
+ o(p, u);
1288
+ }
1289
+ function t(l, n, i, s, a, d, u, p) {
1290
+ const { fontSize: f, fontFamily: m, fontWeight: v } = p, w = l.split(Ht.lineBreakRegex);
1291
+ for (let P = 0; P < w.length; P++) {
1292
+ const U = P * f - f * (w.length - 1) / 2, Y = n.append("text").attr("x", i + a / 2).attr("y", s).style("text-anchor", "middle").attr("dominant-baseline", "middle").style("font-size", f).style("font-weight", v).style("font-family", m);
1293
+ Y.append("tspan").attr("dy", U).text(w[P]).attr("alignment-baseline", "mathematical"), o(Y, u);
1294
+ }
1295
+ }
1296
+ function r(l, n, i, s, a, d, u, p) {
1297
+ const f = n.append("switch"), m = f.append("foreignObject").attr("x", i).attr("y", s).attr("width", a).attr("height", d).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
1298
+ m.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(l), t(l, f, i, s, a, d, u, p), o(m, u);
1299
+ }
1300
+ function o(l, n) {
1301
+ for (const i in n)
1302
+ n.hasOwnProperty(i) && l.attr(i, n[i]);
1303
+ }
1304
+ return function(l) {
1305
+ return l.textPlacement === "fo" ? r : l.textPlacement === "old" ? e : t;
1306
+ };
1307
+ }(), X = {
1308
+ drawRect: ee,
1309
+ drawBoundary: d0,
1310
+ drawC4Shape: p0,
1311
+ drawRels: h0,
1312
+ drawImage: ye,
1313
+ insertArrowHead: b0,
1314
+ insertArrowEnd: g0,
1315
+ insertArrowFilledHead: _0,
1316
+ insertDynamicNumber: x0,
1317
+ insertArrowCrossHead: m0,
1318
+ insertDatabaseIcon: u0,
1319
+ insertComputerIcon: y0,
1320
+ insertClockIcon: f0
1321
+ };
1322
+ let Mt = 0, Ut = 0, fe = 4, Kt = 2;
1323
+ Yt.yy = Gt;
1324
+ let _ = {};
1325
+ class be {
1326
+ constructor(t) {
1327
+ this.name = "", this.data = {}, this.data.startx = void 0, this.data.stopx = void 0, this.data.starty = void 0, this.data.stopy = void 0, this.data.widthLimit = void 0, this.nextData = {}, this.nextData.startx = void 0, this.nextData.stopx = void 0, this.nextData.starty = void 0, this.nextData.stopy = void 0, this.nextData.cnt = 0, Jt(t.db.getConfig());
1328
+ }
1329
+ setData(t, r, o, l) {
1330
+ this.nextData.startx = this.data.startx = t, this.nextData.stopx = this.data.stopx = r, this.nextData.starty = this.data.starty = o, this.nextData.stopy = this.data.stopy = l;
1331
+ }
1332
+ updateVal(t, r, o, l) {
1333
+ t[r] === void 0 ? t[r] = o : t[r] = l(o, t[r]);
1334
+ }
1335
+ insert(t) {
1336
+ this.nextData.cnt = this.nextData.cnt + 1;
1337
+ let r = this.nextData.startx === this.nextData.stopx ? this.nextData.stopx + t.margin : this.nextData.stopx + t.margin * 2, o = r + t.width, l = this.nextData.starty + t.margin * 2, n = l + t.height;
1338
+ (r >= this.data.widthLimit || o >= this.data.widthLimit || this.nextData.cnt > fe) && (r = this.nextData.startx + t.margin + _.nextLinePaddingX, l = this.nextData.stopy + t.margin * 2, this.nextData.stopx = o = r + t.width, this.nextData.starty = this.nextData.stopy, this.nextData.stopy = n = l + t.height, this.nextData.cnt = 1), t.x = r, t.y = l, this.updateVal(this.data, "startx", r, Math.min), this.updateVal(this.data, "starty", l, Math.min), this.updateVal(this.data, "stopx", o, Math.max), this.updateVal(this.data, "stopy", n, Math.max), this.updateVal(this.nextData, "startx", r, Math.min), this.updateVal(this.nextData, "starty", l, Math.min), this.updateVal(this.nextData, "stopx", o, Math.max), this.updateVal(this.nextData, "stopy", n, Math.max);
1339
+ }
1340
+ init(t) {
1341
+ this.name = "", this.data = {
1342
+ startx: void 0,
1343
+ stopx: void 0,
1344
+ starty: void 0,
1345
+ stopy: void 0,
1346
+ widthLimit: void 0
1347
+ }, this.nextData = {
1348
+ startx: void 0,
1349
+ stopx: void 0,
1350
+ starty: void 0,
1351
+ stopy: void 0,
1352
+ cnt: 0
1353
+ }, Jt(t.db.getConfig());
1354
+ }
1355
+ bumpLastMargin(t) {
1356
+ this.data.stopx += t, this.data.stopy += t;
1357
+ }
1358
+ }
1359
+ const Jt = function(e) {
1360
+ Re(_, e), e.fontFamily && (_.personFontFamily = _.systemFontFamily = _.messageFontFamily = e.fontFamily), e.fontSize && (_.personFontSize = _.systemFontSize = _.messageFontSize = e.fontSize), e.fontWeight && (_.personFontWeight = _.systemFontWeight = _.messageFontWeight = e.fontWeight);
1361
+ }, wt = (e, t) => ({
1362
+ fontFamily: e[t + "FontFamily"],
1363
+ fontSize: e[t + "FontSize"],
1364
+ fontWeight: e[t + "FontWeight"]
1365
+ }), jt = (e) => ({
1366
+ fontFamily: e.boundaryFontFamily,
1367
+ fontSize: e.boundaryFontSize,
1368
+ fontWeight: e.boundaryFontWeight
1369
+ }), A0 = (e) => ({
1370
+ fontFamily: e.messageFontFamily,
1371
+ fontSize: e.messageFontSize,
1372
+ fontWeight: e.messageFontWeight
1373
+ });
1374
+ function L(e, t, r, o, l) {
1375
+ if (!t[e].width)
1376
+ if (r)
1377
+ t[e].text = Ne(t[e].text, l, o), t[e].textLines = t[e].text.split(Ht.lineBreakRegex).length, t[e].width = l, t[e].height = le(t[e].text, o);
1378
+ else {
1379
+ let n = t[e].text.split(Ht.lineBreakRegex);
1380
+ t[e].textLines = n.length;
1381
+ let i = 0;
1382
+ t[e].height = 0, t[e].width = 0;
1383
+ for (const s of n)
1384
+ t[e].width = Math.max(
1385
+ kt(s, o),
1386
+ t[e].width
1387
+ ), i = le(s, o), t[e].height = t[e].height + i;
1388
+ }
1389
+ }
1390
+ const ge = function(e, t, r) {
1391
+ t.x = r.data.startx, t.y = r.data.starty, t.width = r.data.stopx - r.data.startx, t.height = r.data.stopy - r.data.starty, t.label.y = _.c4ShapeMargin - 35;
1392
+ let o = t.wrap && _.wrap, l = jt(_);
1393
+ l.fontSize = l.fontSize + 2, l.fontWeight = "bold";
1394
+ let n = kt(t.label.text, l);
1395
+ L("label", t, o, l, n), X.drawBoundary(e, t, _);
1396
+ }, _e = function(e, t, r, o) {
1397
+ let l = 0;
1398
+ for (const n of o) {
1399
+ l = 0;
1400
+ const i = r[n];
1401
+ let s = wt(_, i.typeC4Shape.text);
1402
+ switch (s.fontSize = s.fontSize - 2, i.typeC4Shape.width = kt(
1403
+ "«" + i.typeC4Shape.text + "»",
1404
+ s
1405
+ ), i.typeC4Shape.height = s.fontSize + 2, i.typeC4Shape.Y = _.c4ShapePadding, l = i.typeC4Shape.Y + i.typeC4Shape.height - 4, i.image = { width: 0, height: 0, Y: 0 }, i.typeC4Shape.text) {
1406
+ case "person":
1407
+ case "external_person":
1408
+ i.image.width = 48, i.image.height = 48, i.image.Y = l, l = i.image.Y + i.image.height;
1409
+ break;
1410
+ }
1411
+ i.sprite && (i.image.width = 48, i.image.height = 48, i.image.Y = l, l = i.image.Y + i.image.height);
1412
+ let a = i.wrap && _.wrap, d = _.width - _.c4ShapePadding * 2, u = wt(_, i.typeC4Shape.text);
1413
+ if (u.fontSize = u.fontSize + 2, u.fontWeight = "bold", L("label", i, a, u, d), i.label.Y = l + 8, l = i.label.Y + i.label.height, i.type && i.type.text !== "") {
1414
+ i.type.text = "[" + i.type.text + "]";
1415
+ let m = wt(_, i.typeC4Shape.text);
1416
+ L("type", i, a, m, d), i.type.Y = l + 5, l = i.type.Y + i.type.height;
1417
+ } else if (i.techn && i.techn.text !== "") {
1418
+ i.techn.text = "[" + i.techn.text + "]";
1419
+ let m = wt(_, i.techn.text);
1420
+ L("techn", i, a, m, d), i.techn.Y = l + 5, l = i.techn.Y + i.techn.height;
1421
+ }
1422
+ let p = l, f = i.label.width;
1423
+ if (i.descr && i.descr.text !== "") {
1424
+ let m = wt(_, i.typeC4Shape.text);
1425
+ L("descr", i, a, m, d), i.descr.Y = l + 20, l = i.descr.Y + i.descr.height, f = Math.max(i.label.width, i.descr.width), p = l - i.descr.textLines * 5;
1426
+ }
1427
+ f = f + _.c4ShapePadding, i.width = Math.max(i.width || _.width, f, _.width), i.height = Math.max(i.height || _.height, p, _.height), i.margin = i.margin || _.c4ShapeMargin, e.insert(i), X.drawC4Shape(t, i, _);
1428
+ }
1429
+ e.bumpLastMargin(_.c4ShapeMargin);
1430
+ };
1431
+ class j {
1432
+ constructor(t, r) {
1433
+ this.x = t, this.y = r;
1434
+ }
1435
+ }
1436
+ let oe = function(e, t) {
1437
+ let r = e.x, o = e.y, l = t.x, n = t.y, i = r + e.width / 2, s = o + e.height / 2, a = Math.abs(r - l), d = Math.abs(o - n), u = d / a, p = e.height / e.width, f = null;
1438
+ return o == n && r < l ? f = new j(r + e.width, s) : o == n && r > l ? f = new j(r, s) : r == l && o < n ? f = new j(i, o + e.height) : r == l && o > n && (f = new j(i, o)), r > l && o < n ? p >= u ? f = new j(r, s + u * e.width / 2) : f = new j(
1439
+ i - a / d * e.height / 2,
1440
+ o + e.height
1441
+ ) : r < l && o < n ? p >= u ? f = new j(r + e.width, s + u * e.width / 2) : f = new j(
1442
+ i + a / d * e.height / 2,
1443
+ o + e.height
1444
+ ) : r < l && o > n ? p >= u ? f = new j(r + e.width, s - u * e.width / 2) : f = new j(i + e.height / 2 * a / d, o) : r > l && o > n && (p >= u ? f = new j(r, s - e.width / 2 * u) : f = new j(i - e.height / 2 * a / d, o)), f;
1445
+ }, S0 = function(e, t) {
1446
+ let r = { x: 0, y: 0 };
1447
+ r.x = t.x + t.width / 2, r.y = t.y + t.height / 2;
1448
+ let o = oe(e, r);
1449
+ r.x = e.x + e.width / 2, r.y = e.y + e.height / 2;
1450
+ let l = oe(t, r);
1451
+ return { startPoint: o, endPoint: l };
1452
+ };
1453
+ const C0 = function(e, t, r, o) {
1454
+ let l = 0;
1455
+ for (let n of t) {
1456
+ l = l + 1;
1457
+ let i = n.wrap && _.wrap, s = A0(_);
1458
+ o.db.getC4Type() === "C4Dynamic" && (n.label.text = l + ": " + n.label.text);
1459
+ let a = kt(n.label.text, s);
1460
+ L("label", n, i, s, a), n.techn && n.techn.text !== "" && (a = kt(n.techn.text, s), L("techn", n, i, s, a)), n.descr && n.descr.text !== "" && (a = kt(n.descr.text, s), L("descr", n, i, s, a));
1461
+ let d = r(n.from), u = r(n.to), p = S0(d, u);
1462
+ n.startPoint = p.startPoint, n.endPoint = p.endPoint;
1463
+ }
1464
+ X.drawRels(e, t, _);
1465
+ };
1466
+ function xe(e, t, r, o, l) {
1467
+ let n = new be(l);
1468
+ n.data.widthLimit = r.data.widthLimit / Math.min(Kt, o.length);
1469
+ for (let [i, s] of o.entries()) {
1470
+ let a = 0;
1471
+ s.image = { width: 0, height: 0, Y: 0 }, s.sprite && (s.image.width = 48, s.image.height = 48, s.image.Y = a, a = s.image.Y + s.image.height);
1472
+ let d = s.wrap && _.wrap, u = jt(_);
1473
+ if (u.fontSize = u.fontSize + 2, u.fontWeight = "bold", L(
1474
+ "label",
1475
+ s,
1476
+ d,
1477
+ u,
1478
+ n.data.widthLimit
1479
+ ), s.label.Y = a + 8, a = s.label.Y + s.label.height, s.type && s.type.text !== "") {
1480
+ s.type.text = "[" + s.type.text + "]";
1481
+ let v = jt(_);
1482
+ L(
1483
+ "type",
1484
+ s,
1485
+ d,
1486
+ v,
1487
+ n.data.widthLimit
1488
+ ), s.type.Y = a + 5, a = s.type.Y + s.type.height;
1489
+ }
1490
+ if (s.descr && s.descr.text !== "") {
1491
+ let v = jt(_);
1492
+ v.fontSize = v.fontSize - 2, L(
1493
+ "descr",
1494
+ s,
1495
+ d,
1496
+ v,
1497
+ n.data.widthLimit
1498
+ ), s.descr.Y = a + 20, a = s.descr.Y + s.descr.height;
1499
+ }
1500
+ if (i == 0 || i % Kt === 0) {
1501
+ let v = r.data.startx + _.diagramMarginX, w = r.data.stopy + _.diagramMarginY + a;
1502
+ n.setData(v, v, w, w);
1503
+ } else {
1504
+ let v = n.data.stopx !== n.data.startx ? n.data.stopx + _.diagramMarginX : n.data.startx, w = n.data.starty;
1505
+ n.setData(v, v, w, w);
1506
+ }
1507
+ n.name = s.alias;
1508
+ let p = l.db.getC4ShapeArray(s.alias), f = l.db.getC4ShapeKeys(s.alias);
1509
+ f.length > 0 && _e(
1510
+ n,
1511
+ e,
1512
+ p,
1513
+ f
1514
+ ), t = s.alias;
1515
+ let m = l.db.getBoundarys(t);
1516
+ m.length > 0 && xe(
1517
+ e,
1518
+ t,
1519
+ n,
1520
+ m,
1521
+ l
1522
+ ), s.alias !== "global" && ge(e, s, n), r.data.stopy = Math.max(
1523
+ n.data.stopy + _.c4ShapeMargin,
1524
+ r.data.stopy
1525
+ ), r.data.stopx = Math.max(
1526
+ n.data.stopx + _.c4ShapeMargin,
1527
+ r.data.stopx
1528
+ ), Mt = Math.max(Mt, r.data.stopx), Ut = Math.max(Ut, r.data.stopy);
1529
+ }
1530
+ }
1531
+ const O0 = function(e, t, r, o) {
1532
+ _ = Tt().c4;
1533
+ const l = Tt().securityLevel;
1534
+ let n;
1535
+ l === "sandbox" && (n = Bt("#i" + t));
1536
+ const i = l === "sandbox" ? Bt(n.nodes()[0].contentDocument.body) : Bt("body");
1537
+ let s = o.db;
1538
+ o.db.setWrap(_.wrap), fe = s.getC4ShapeInRow(), Kt = s.getC4BoundaryInRow(), re.debug(`C:${JSON.stringify(_, null, 2)}`);
1539
+ const a = l === "sandbox" ? i.select(`[id="${t}"]`) : Bt(`[id="${t}"]`);
1540
+ X.insertComputerIcon(a), X.insertDatabaseIcon(a), X.insertClockIcon(a);
1541
+ let d = new be(o);
1542
+ d.setData(
1543
+ _.diagramMarginX,
1544
+ _.diagramMarginX,
1545
+ _.diagramMarginY,
1546
+ _.diagramMarginY
1547
+ ), d.data.widthLimit = screen.availWidth, Mt = _.diagramMarginX, Ut = _.diagramMarginY;
1548
+ const u = o.db.getTitle();
1549
+ let p = o.db.getBoundarys("");
1550
+ xe(a, "", d, p, o), X.insertArrowHead(a), X.insertArrowEnd(a), X.insertArrowCrossHead(a), X.insertArrowFilledHead(a), C0(a, o.db.getRels(), o.db.getC4Shape, o), d.data.stopx = Mt, d.data.stopy = Ut;
1551
+ const f = d.data;
1552
+ let m = f.stopy - f.starty + 2 * _.diagramMarginY;
1553
+ const v = f.stopx - f.startx + 2 * _.diagramMarginX;
1554
+ u && a.append("text").text(u).attr("x", (f.stopx - f.startx) / 2 - 4 * _.diagramMarginX).attr("y", f.starty + _.diagramMarginY), Te(a, m, v, _.useMaxWidth);
1555
+ const w = u ? 60 : 0;
1556
+ a.attr(
1557
+ "viewBox",
1558
+ f.startx - _.diagramMarginX + " -" + (_.diagramMarginY + w) + " " + v + " " + (m + w)
1559
+ ), re.debug("models:", f);
1560
+ }, ce = {
1561
+ drawPersonOrSystemArray: _e,
1562
+ drawBoundary: ge,
1563
+ setConf: Jt,
1564
+ draw: O0
1565
+ }, k0 = (e) => `.person {
1566
+ stroke: ${e.personBorder};
1567
+ fill: ${e.personBkg};
1568
+ }
1569
+ `, v0 = k0, R0 = {
1570
+ parser: je,
1571
+ db: Gt,
1572
+ renderer: ce,
1573
+ styles: v0,
1574
+ init: ({ c4: e, wrap: t }) => {
1575
+ ce.setConf(e), Gt.setWrap(t);
1576
+ }
1577
+ };
1578
+ export {
1579
+ R0 as diagram
1580
+ };