@n8n-zengchao/chat 0.62.0

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 (151) hide show
  1. package/README.md +289 -0
  2. package/dist/App.vue.d.ts +2 -0
  3. package/dist/__stories__/App.stories.d.ts +18 -0
  4. package/dist/__tests__/Input.spec.d.ts +1 -0
  5. package/dist/__tests__/api/generic.spec.d.ts +1 -0
  6. package/dist/__tests__/api/message.spec.d.ts +1 -0
  7. package/dist/__tests__/index.spec.d.ts +1 -0
  8. package/dist/__tests__/plugins/chat.spec.d.ts +1 -0
  9. package/dist/__tests__/plugins/chat.test.d.ts +1 -0
  10. package/dist/__tests__/setup.d.ts +0 -0
  11. package/dist/__tests__/utils/create.d.ts +5 -0
  12. package/dist/__tests__/utils/fetch.d.ts +13 -0
  13. package/dist/__tests__/utils/index.d.ts +3 -0
  14. package/dist/__tests__/utils/selectors.d.ts +12 -0
  15. package/dist/__tests__/utils/streaming.spec.d.ts +1 -0
  16. package/dist/__tests__/utils/streamingHandlers.spec.d.ts +1 -0
  17. package/dist/_basePickBy-aQilsjEs.mjs +106 -0
  18. package/dist/_baseUniq-Agc10qFQ.mjs +232 -0
  19. package/dist/api/generic.d.ts +7 -0
  20. package/dist/api/index.d.ts +2 -0
  21. package/dist/api/message.d.ts +11 -0
  22. package/dist/arc-EhYU_DB1.mjs +79 -0
  23. package/dist/architecture-U656AL7Q-B1STlXpR.mjs +10 -0
  24. package/dist/architectureDiagram-VXUJARFQ-DOVAbXSw.mjs +4054 -0
  25. package/dist/array-B5w981Vk.mjs +5 -0
  26. package/dist/blockDiagram-VD42YOAC-BsX3Fkg3.mjs +3013 -0
  27. package/dist/c4Diagram-YG6GDRKO-B5JaLuX6.mjs +2957 -0
  28. package/dist/channel-CqrIo07y.mjs +4 -0
  29. package/dist/chat.bundle.es.js +37656 -0
  30. package/dist/chat.bundle.umd.js +2784 -0
  31. package/dist/chat.es.js +35738 -0
  32. package/dist/chat.umd.js +2776 -0
  33. package/dist/chunk-4BX2VUAB-dn0RXIrC.mjs +7 -0
  34. package/dist/chunk-55IACEB6-DrIttNoL.mjs +7 -0
  35. package/dist/chunk-76Q3JFCE-D7DMbWeQ.mjs +20 -0
  36. package/dist/chunk-ABZYJK2D-_NXv778f.mjs +2516 -0
  37. package/dist/chunk-ATLVNIR6-CBnG7Ev9.mjs +66 -0
  38. package/dist/chunk-B4BG7PRW-DElmmAse.mjs +3109 -0
  39. package/dist/chunk-CVBHYZKI-kPsSw5G9.mjs +11 -0
  40. package/dist/chunk-DI55MBZ5-Bw6uFFfD.mjs +1995 -0
  41. package/dist/chunk-DZXZ2BO8.mjs +19 -0
  42. package/dist/chunk-EXTU4WIE-DWzncOZf.mjs +8 -0
  43. package/dist/chunk-FMBD7UC4-CQf-nVrj.mjs +4 -0
  44. package/dist/chunk-FPAJGGOC-HRc6DGju.mjs +12254 -0
  45. package/dist/chunk-FWNWRKHM-CGiJVNMo.mjs +57 -0
  46. package/dist/chunk-HN2XXSSU-DMfVdeUE.mjs +75 -0
  47. package/dist/chunk-JA3XYJ7Z-b0Li4NN8.mjs +1834 -0
  48. package/dist/chunk-JZLCHNYA-C_4MLySW.mjs +4862 -0
  49. package/dist/chunk-KS23V3DP-BRKOfbU6.mjs +136 -0
  50. package/dist/chunk-LBM3YZW2-JIQK8wiH.mjs +20 -0
  51. package/dist/chunk-LHMN2FUI-PNCyIUgu.mjs +20 -0
  52. package/dist/chunk-MI3HLSF2-B9GTCmLp.mjs +1146 -0
  53. package/dist/chunk-N4CR4FBY-CjlmnCPD.mjs +40 -0
  54. package/dist/chunk-O7ZBX7Z2-DmJUfqJj.mjs +27 -0
  55. package/dist/chunk-QN33PNHL-nN1zLFSf.mjs +24 -0
  56. package/dist/chunk-QXUST7PY-CY78Btj9.mjs +487 -0
  57. package/dist/chunk-QZHKN3VN-BF5N1pfB.mjs +12 -0
  58. package/dist/chunk-S3R3BYOJ-BhFsv0Go.mjs +1076 -0
  59. package/dist/chunk-S6J4BHB3-BvrWTdbl.mjs +20 -0
  60. package/dist/chunk-T53DSG4Q-XzY06amw.mjs +25 -0
  61. package/dist/chunk-TZMSLE5B-DVmJQ8eg.mjs +57 -0
  62. package/dist/classDiagram-2ON5EDUG-CKxiEVX9.mjs +33 -0
  63. package/dist/classDiagram-v2-WZHVMYZB-sAa_2keq.mjs +33 -0
  64. package/dist/clone-nkGlb0Gn.mjs +8 -0
  65. package/dist/components/Button.vue.d.ts +17 -0
  66. package/dist/components/Chat.vue.d.ts +2 -0
  67. package/dist/components/ChatFile.vue.d.ts +11 -0
  68. package/dist/components/ChatWindow.vue.d.ts +2 -0
  69. package/dist/components/GetStarted.vue.d.ts +2 -0
  70. package/dist/components/GetStartedFooter.vue.d.ts +2 -0
  71. package/dist/components/Input.vue.d.ts +39 -0
  72. package/dist/components/Layout.vue.d.ts +23 -0
  73. package/dist/components/Message.vue.d.ts +39 -0
  74. package/dist/components/MessageTyping.vue.d.ts +76 -0
  75. package/dist/components/MessagesList.vue.d.ts +164 -0
  76. package/dist/components/PoweredBy.vue.d.ts +2 -0
  77. package/dist/components/index.d.ts +10 -0
  78. package/dist/composables/index.d.ts +3 -0
  79. package/dist/composables/useChat.d.ts +2 -0
  80. package/dist/composables/useI18n.d.ts +4 -0
  81. package/dist/composables/useOptions.d.ts +4 -0
  82. package/dist/constants/defaults.d.ts +3 -0
  83. package/dist/constants/index.d.ts +3 -0
  84. package/dist/constants/localStorage.d.ts +2 -0
  85. package/dist/constants/symbols.d.ts +4 -0
  86. package/dist/cose-bilkent-S5V4N54A-1lKG2PUg.mjs +2251 -0
  87. package/dist/cytoscape.esm-Dls1_mGy.mjs +18108 -0
  88. package/dist/dagre-6UL2VRFP-CbWFu9xQ.mjs +300 -0
  89. package/dist/dagre-DEdOheHq.mjs +1385 -0
  90. package/dist/defaultLocale-CyoQm63E.mjs +178 -0
  91. package/dist/diagram-PSM6KHXK-CJcHbrJH.mjs +499 -0
  92. package/dist/diagram-QEK2KX5R-XQ9XOVL4.mjs +228 -0
  93. package/dist/diagram-S2PKOQOG-CmRfaeSf.mjs +146 -0
  94. package/dist/dist-BT0fjU7K.mjs +50 -0
  95. package/dist/erDiagram-Q2GNP2WA-iuoUWHwm.mjs +1603 -0
  96. package/dist/event-buses/chatEventBus.d.ts +1 -0
  97. package/dist/event-buses/index.d.ts +1 -0
  98. package/dist/favicon.ico +0 -0
  99. package/dist/flowDiagram-NV44I4VS-D3GMS8-G.mjs +4132 -0
  100. package/dist/ganttDiagram-LVOFAZNH-DMTZVZDR.mjs +2832 -0
  101. package/dist/gitGraph-F6HP7TQM-CrdUzURw.mjs +10 -0
  102. package/dist/gitGraphDiagram-NY62KEGX-DipP5Fgt.mjs +636 -0
  103. package/dist/graphlib-D9eH5icd.mjs +224 -0
  104. package/dist/index.d.ts +2 -0
  105. package/dist/info-NVLQJR56-C-93Yf3U.mjs +10 -0
  106. package/dist/infoDiagram-F6ZHWCRC-jM50s26K.mjs +33 -0
  107. package/dist/init-CYeu4QfE.mjs +14 -0
  108. package/dist/isArrayLikeObject-BPcFdnyK.mjs +459 -0
  109. package/dist/isUndefined-BvarJ1wS.mjs +374 -0
  110. package/dist/journeyDiagram-XKPGCS4Q-BEEO_0Bh.mjs +885 -0
  111. package/dist/kanban-definition-3W4ZIXB7-B8u_HDmL.mjs +971 -0
  112. package/dist/katex-Dc1vXbUC.mjs +22094 -0
  113. package/dist/line-BJxACIPZ.mjs +31 -0
  114. package/dist/linear-DHHVI-cj.mjs +251 -0
  115. package/dist/math-Byg0NvhS.mjs +9 -0
  116. package/dist/mermaid-parser.core-YT4qvimq.mjs +49 -0
  117. package/dist/mindmap-definition-VGOIOE7T-ah41V88S.mjs +960 -0
  118. package/dist/now-DsJMgI1z.mjs +6 -0
  119. package/dist/ordinal-L0-EVPg8.mjs +62 -0
  120. package/dist/packet-BFZMPI3H-Cs4kRHct.mjs +10 -0
  121. package/dist/path-BcDHwjEr.mjs +80 -0
  122. package/dist/pie-7BOR55EZ-YZ5Xu4o6.mjs +10 -0
  123. package/dist/pieDiagram-ADFJNKIX-CqI33m1a.mjs +174 -0
  124. package/dist/plugins/chat.d.ts +3 -0
  125. package/dist/plugins/index.d.ts +1 -0
  126. package/dist/quadrantDiagram-AYHSOK5B-DDv2X9c1.mjs +1971 -0
  127. package/dist/radar-NHE76QYJ-TpirOFtv.mjs +10 -0
  128. package/dist/requirementDiagram-UZGBJVZJ-DXa77VzO.mjs +2194 -0
  129. package/dist/sankeyDiagram-TZEHDZUN--B9DInJC.mjs +885 -0
  130. package/dist/sequenceDiagram-WL72ISMW-Dqn9jJ3g.mjs +3562 -0
  131. package/dist/src-DdwtiGjk.mjs +1976 -0
  132. package/dist/stateDiagram-FKZM4ZOC-D3eEcVjS.mjs +226 -0
  133. package/dist/stateDiagram-v2-4FDKWEC3-dzwJ4caL.mjs +32 -0
  134. package/dist/style.css +3 -0
  135. package/dist/timeline-definition-IT6M3QCI-z93ry7RN.mjs +831 -0
  136. package/dist/toInteger-1S_4Byef.mjs +36 -0
  137. package/dist/treemap-KMMF4GRG-BlF0Ev1z.mjs +10 -0
  138. package/dist/types/chat.d.ts +13 -0
  139. package/dist/types/index.d.ts +5 -0
  140. package/dist/types/messages.d.ts +17 -0
  141. package/dist/types/options.d.ts +33 -0
  142. package/dist/types/streaming.d.ts +18 -0
  143. package/dist/types/webhook.d.ts +19 -0
  144. package/dist/utils/event-bus.d.ts +8 -0
  145. package/dist/utils/index.d.ts +3 -0
  146. package/dist/utils/mount.d.ts +1 -0
  147. package/dist/utils/streaming.d.ts +26 -0
  148. package/dist/utils/streamingHandlers.d.ts +6 -0
  149. package/dist/utils/utils.d.ts +1 -0
  150. package/dist/xychartDiagram-PRI3JC2R-C3aDcgBz.mjs +2022 -0
  151. package/package.json +78 -0
@@ -0,0 +1,2957 @@
1
+ /*! Package version @n8n/chat@0.62.0 */
2
+ import { o as __toESM } from "./chunk-DZXZ2BO8.mjs";
3
+ import "./isArrayLikeObject-BPcFdnyK.mjs";
4
+ import { _ as wrapLabel, n as calculateTextHeight, r as calculateTextWidth } from "./chunk-S3R3BYOJ-BhFsv0Go.mjs";
5
+ import { g as log, h as __name, p as select_default } from "./src-DdwtiGjk.mjs";
6
+ import { B as setAccTitle, I as sanitizeText, _ as getAccDescription, b as getConfig2, c as configureSvgSize, r as assignWithDepth_default, s as common_default, v as getAccTitle, z as setAccDescription } from "./chunk-ABZYJK2D-_NXv778f.mjs";
7
+ import "./math-Byg0NvhS.mjs";
8
+ import { t as require_dist } from "./dist-BT0fjU7K.mjs";
9
+ import { i as drawRect, o as getNoteRect } from "./chunk-TZMSLE5B-DVmJQ8eg.mjs";
10
+ var import_dist = /* @__PURE__ */ __toESM(require_dist(), 1), parser = (function() {
11
+ var e = /* @__PURE__ */ __name(function(e, t, n, r) {
12
+ for (n ||= {}, r = e.length; r--; n[e[r]] = t);
13
+ return n;
14
+ }, "o"), t = [1, 24], n = [1, 25], r = [1, 26], i = [1, 27], o = [1, 28], s = [1, 63], l = [1, 64], u = [1, 65], d = [1, 66], f = [1, 67], p = [1, 68], m = [1, 69], h = [1, 29], g = [1, 30], _ = [1, 31], v = [1, 32], y = [1, 33], b = [1, 34], x = [1, 35], S = [1, 36], C = [1, 37], w = [1, 38], T = [1, 39], E = [1, 40], D = [1, 41], O = [1, 42], k = [1, 43], A = [1, 44], j = [1, 45], M = [1, 46], N = [1, 47], P = [1, 48], F = [1, 50], I = [1, 51], L = [1, 52], R = [1, 53], z = [1, 54], B = [1, 55], V = [1, 56], H = [1, 57], U = [1, 58], W = [1, 59], G = [1, 60], K = [14, 42], Le = [
15
+ 14,
16
+ 34,
17
+ 36,
18
+ 37,
19
+ 38,
20
+ 39,
21
+ 40,
22
+ 41,
23
+ 42,
24
+ 44,
25
+ 45,
26
+ 46,
27
+ 47,
28
+ 48,
29
+ 49,
30
+ 50,
31
+ 51,
32
+ 52,
33
+ 53,
34
+ 54,
35
+ 55,
36
+ 56,
37
+ 57,
38
+ 58,
39
+ 59,
40
+ 60,
41
+ 61,
42
+ 62,
43
+ 63,
44
+ 64,
45
+ 65,
46
+ 66,
47
+ 67,
48
+ 68,
49
+ 69,
50
+ 70,
51
+ 71,
52
+ 72,
53
+ 73,
54
+ 74
55
+ ], q = [
56
+ 12,
57
+ 14,
58
+ 34,
59
+ 36,
60
+ 37,
61
+ 38,
62
+ 39,
63
+ 40,
64
+ 41,
65
+ 42,
66
+ 44,
67
+ 45,
68
+ 46,
69
+ 47,
70
+ 48,
71
+ 49,
72
+ 50,
73
+ 51,
74
+ 52,
75
+ 53,
76
+ 54,
77
+ 55,
78
+ 56,
79
+ 57,
80
+ 58,
81
+ 59,
82
+ 60,
83
+ 61,
84
+ 62,
85
+ 63,
86
+ 64,
87
+ 65,
88
+ 66,
89
+ 67,
90
+ 68,
91
+ 69,
92
+ 70,
93
+ 71,
94
+ 72,
95
+ 73,
96
+ 74
97
+ ], J = [1, 82], Y = [1, 83], X = [1, 84], Z = [1, 85], Q = [
98
+ 12,
99
+ 14,
100
+ 42
101
+ ], Re = [
102
+ 12,
103
+ 14,
104
+ 33,
105
+ 42
106
+ ], ze = [
107
+ 12,
108
+ 14,
109
+ 33,
110
+ 42,
111
+ 76,
112
+ 77,
113
+ 79,
114
+ 80
115
+ ], $ = [12, 33], Be = [
116
+ 34,
117
+ 36,
118
+ 37,
119
+ 38,
120
+ 39,
121
+ 40,
122
+ 41,
123
+ 44,
124
+ 45,
125
+ 46,
126
+ 47,
127
+ 48,
128
+ 49,
129
+ 50,
130
+ 51,
131
+ 52,
132
+ 53,
133
+ 54,
134
+ 55,
135
+ 56,
136
+ 57,
137
+ 58,
138
+ 59,
139
+ 60,
140
+ 61,
141
+ 62,
142
+ 63,
143
+ 64,
144
+ 65,
145
+ 66,
146
+ 67,
147
+ 68,
148
+ 69,
149
+ 70,
150
+ 71,
151
+ 72,
152
+ 73,
153
+ 74
154
+ ], Ve = {
155
+ trace: /* @__PURE__ */ __name(function() {}, "trace"),
156
+ yy: {},
157
+ symbols_: {
158
+ error: 2,
159
+ start: 3,
160
+ mermaidDoc: 4,
161
+ direction: 5,
162
+ direction_tb: 6,
163
+ direction_bt: 7,
164
+ direction_rl: 8,
165
+ direction_lr: 9,
166
+ graphConfig: 10,
167
+ C4_CONTEXT: 11,
168
+ NEWLINE: 12,
169
+ statements: 13,
170
+ EOF: 14,
171
+ C4_CONTAINER: 15,
172
+ C4_COMPONENT: 16,
173
+ C4_DYNAMIC: 17,
174
+ C4_DEPLOYMENT: 18,
175
+ otherStatements: 19,
176
+ diagramStatements: 20,
177
+ otherStatement: 21,
178
+ title: 22,
179
+ accDescription: 23,
180
+ acc_title: 24,
181
+ acc_title_value: 25,
182
+ acc_descr: 26,
183
+ acc_descr_value: 27,
184
+ acc_descr_multiline_value: 28,
185
+ boundaryStatement: 29,
186
+ boundaryStartStatement: 30,
187
+ boundaryStopStatement: 31,
188
+ boundaryStart: 32,
189
+ LBRACE: 33,
190
+ ENTERPRISE_BOUNDARY: 34,
191
+ attributes: 35,
192
+ SYSTEM_BOUNDARY: 36,
193
+ BOUNDARY: 37,
194
+ CONTAINER_BOUNDARY: 38,
195
+ NODE: 39,
196
+ NODE_L: 40,
197
+ NODE_R: 41,
198
+ RBRACE: 42,
199
+ diagramStatement: 43,
200
+ PERSON: 44,
201
+ PERSON_EXT: 45,
202
+ SYSTEM: 46,
203
+ SYSTEM_DB: 47,
204
+ SYSTEM_QUEUE: 48,
205
+ SYSTEM_EXT: 49,
206
+ SYSTEM_EXT_DB: 50,
207
+ SYSTEM_EXT_QUEUE: 51,
208
+ CONTAINER: 52,
209
+ CONTAINER_DB: 53,
210
+ CONTAINER_QUEUE: 54,
211
+ CONTAINER_EXT: 55,
212
+ CONTAINER_EXT_DB: 56,
213
+ CONTAINER_EXT_QUEUE: 57,
214
+ COMPONENT: 58,
215
+ COMPONENT_DB: 59,
216
+ COMPONENT_QUEUE: 60,
217
+ COMPONENT_EXT: 61,
218
+ COMPONENT_EXT_DB: 62,
219
+ COMPONENT_EXT_QUEUE: 63,
220
+ REL: 64,
221
+ BIREL: 65,
222
+ REL_U: 66,
223
+ REL_D: 67,
224
+ REL_L: 68,
225
+ REL_R: 69,
226
+ REL_B: 70,
227
+ REL_INDEX: 71,
228
+ UPDATE_EL_STYLE: 72,
229
+ UPDATE_REL_STYLE: 73,
230
+ UPDATE_LAYOUT_CONFIG: 74,
231
+ attribute: 75,
232
+ STR: 76,
233
+ STR_KEY: 77,
234
+ STR_VALUE: 78,
235
+ ATTRIBUTE: 79,
236
+ ATTRIBUTE_EMPTY: 80,
237
+ $accept: 0,
238
+ $end: 1
239
+ },
240
+ terminals_: {
241
+ 2: "error",
242
+ 6: "direction_tb",
243
+ 7: "direction_bt",
244
+ 8: "direction_rl",
245
+ 9: "direction_lr",
246
+ 11: "C4_CONTEXT",
247
+ 12: "NEWLINE",
248
+ 14: "EOF",
249
+ 15: "C4_CONTAINER",
250
+ 16: "C4_COMPONENT",
251
+ 17: "C4_DYNAMIC",
252
+ 18: "C4_DEPLOYMENT",
253
+ 22: "title",
254
+ 23: "accDescription",
255
+ 24: "acc_title",
256
+ 25: "acc_title_value",
257
+ 26: "acc_descr",
258
+ 27: "acc_descr_value",
259
+ 28: "acc_descr_multiline_value",
260
+ 33: "LBRACE",
261
+ 34: "ENTERPRISE_BOUNDARY",
262
+ 36: "SYSTEM_BOUNDARY",
263
+ 37: "BOUNDARY",
264
+ 38: "CONTAINER_BOUNDARY",
265
+ 39: "NODE",
266
+ 40: "NODE_L",
267
+ 41: "NODE_R",
268
+ 42: "RBRACE",
269
+ 44: "PERSON",
270
+ 45: "PERSON_EXT",
271
+ 46: "SYSTEM",
272
+ 47: "SYSTEM_DB",
273
+ 48: "SYSTEM_QUEUE",
274
+ 49: "SYSTEM_EXT",
275
+ 50: "SYSTEM_EXT_DB",
276
+ 51: "SYSTEM_EXT_QUEUE",
277
+ 52: "CONTAINER",
278
+ 53: "CONTAINER_DB",
279
+ 54: "CONTAINER_QUEUE",
280
+ 55: "CONTAINER_EXT",
281
+ 56: "CONTAINER_EXT_DB",
282
+ 57: "CONTAINER_EXT_QUEUE",
283
+ 58: "COMPONENT",
284
+ 59: "COMPONENT_DB",
285
+ 60: "COMPONENT_QUEUE",
286
+ 61: "COMPONENT_EXT",
287
+ 62: "COMPONENT_EXT_DB",
288
+ 63: "COMPONENT_EXT_QUEUE",
289
+ 64: "REL",
290
+ 65: "BIREL",
291
+ 66: "REL_U",
292
+ 67: "REL_D",
293
+ 68: "REL_L",
294
+ 69: "REL_R",
295
+ 70: "REL_B",
296
+ 71: "REL_INDEX",
297
+ 72: "UPDATE_EL_STYLE",
298
+ 73: "UPDATE_REL_STYLE",
299
+ 74: "UPDATE_LAYOUT_CONFIG",
300
+ 76: "STR",
301
+ 77: "STR_KEY",
302
+ 78: "STR_VALUE",
303
+ 79: "ATTRIBUTE",
304
+ 80: "ATTRIBUTE_EMPTY"
305
+ },
306
+ productions_: [
307
+ 0,
308
+ [3, 1],
309
+ [3, 1],
310
+ [5, 1],
311
+ [5, 1],
312
+ [5, 1],
313
+ [5, 1],
314
+ [4, 1],
315
+ [10, 4],
316
+ [10, 4],
317
+ [10, 4],
318
+ [10, 4],
319
+ [10, 4],
320
+ [13, 1],
321
+ [13, 1],
322
+ [13, 2],
323
+ [19, 1],
324
+ [19, 2],
325
+ [19, 3],
326
+ [21, 1],
327
+ [21, 1],
328
+ [21, 2],
329
+ [21, 2],
330
+ [21, 1],
331
+ [29, 3],
332
+ [30, 3],
333
+ [30, 3],
334
+ [30, 4],
335
+ [32, 2],
336
+ [32, 2],
337
+ [32, 2],
338
+ [32, 2],
339
+ [32, 2],
340
+ [32, 2],
341
+ [32, 2],
342
+ [31, 1],
343
+ [20, 1],
344
+ [20, 2],
345
+ [20, 3],
346
+ [43, 2],
347
+ [43, 2],
348
+ [43, 2],
349
+ [43, 2],
350
+ [43, 2],
351
+ [43, 2],
352
+ [43, 2],
353
+ [43, 2],
354
+ [43, 2],
355
+ [43, 2],
356
+ [43, 2],
357
+ [43, 2],
358
+ [43, 2],
359
+ [43, 2],
360
+ [43, 2],
361
+ [43, 2],
362
+ [43, 2],
363
+ [43, 2],
364
+ [43, 2],
365
+ [43, 2],
366
+ [43, 1],
367
+ [43, 2],
368
+ [43, 2],
369
+ [43, 2],
370
+ [43, 2],
371
+ [43, 2],
372
+ [43, 2],
373
+ [43, 2],
374
+ [43, 2],
375
+ [43, 2],
376
+ [43, 2],
377
+ [43, 2],
378
+ [35, 1],
379
+ [35, 2],
380
+ [75, 1],
381
+ [75, 2],
382
+ [75, 1],
383
+ [75, 1]
384
+ ],
385
+ performAction: /* @__PURE__ */ __name(function(e, t, n, r, i, a, o) {
386
+ var s = a.length - 1;
387
+ switch (i) {
388
+ case 3:
389
+ r.setDirection("TB");
390
+ break;
391
+ case 4:
392
+ r.setDirection("BT");
393
+ break;
394
+ case 5:
395
+ r.setDirection("RL");
396
+ break;
397
+ case 6:
398
+ r.setDirection("LR");
399
+ break;
400
+ case 8:
401
+ case 9:
402
+ case 10:
403
+ case 11:
404
+ case 12:
405
+ r.setC4Type(a[s - 3]);
406
+ break;
407
+ case 19:
408
+ r.setTitle(a[s].substring(6)), this.$ = a[s].substring(6);
409
+ break;
410
+ case 20:
411
+ r.setAccDescription(a[s].substring(15)), this.$ = a[s].substring(15);
412
+ break;
413
+ case 21:
414
+ this.$ = a[s].trim(), r.setTitle(this.$);
415
+ break;
416
+ case 22:
417
+ case 23:
418
+ this.$ = a[s].trim(), r.setAccDescription(this.$);
419
+ break;
420
+ case 28:
421
+ a[s].splice(2, 0, "ENTERPRISE"), r.addPersonOrSystemBoundary(...a[s]), this.$ = a[s];
422
+ break;
423
+ case 29:
424
+ a[s].splice(2, 0, "SYSTEM"), r.addPersonOrSystemBoundary(...a[s]), this.$ = a[s];
425
+ break;
426
+ case 30:
427
+ r.addPersonOrSystemBoundary(...a[s]), this.$ = a[s];
428
+ break;
429
+ case 31:
430
+ a[s].splice(2, 0, "CONTAINER"), r.addContainerBoundary(...a[s]), this.$ = a[s];
431
+ break;
432
+ case 32:
433
+ r.addDeploymentNode("node", ...a[s]), this.$ = a[s];
434
+ break;
435
+ case 33:
436
+ r.addDeploymentNode("nodeL", ...a[s]), this.$ = a[s];
437
+ break;
438
+ case 34:
439
+ r.addDeploymentNode("nodeR", ...a[s]), this.$ = a[s];
440
+ break;
441
+ case 35:
442
+ r.popBoundaryParseStack();
443
+ break;
444
+ case 39:
445
+ r.addPersonOrSystem("person", ...a[s]), this.$ = a[s];
446
+ break;
447
+ case 40:
448
+ r.addPersonOrSystem("external_person", ...a[s]), this.$ = a[s];
449
+ break;
450
+ case 41:
451
+ r.addPersonOrSystem("system", ...a[s]), this.$ = a[s];
452
+ break;
453
+ case 42:
454
+ r.addPersonOrSystem("system_db", ...a[s]), this.$ = a[s];
455
+ break;
456
+ case 43:
457
+ r.addPersonOrSystem("system_queue", ...a[s]), this.$ = a[s];
458
+ break;
459
+ case 44:
460
+ r.addPersonOrSystem("external_system", ...a[s]), this.$ = a[s];
461
+ break;
462
+ case 45:
463
+ r.addPersonOrSystem("external_system_db", ...a[s]), this.$ = a[s];
464
+ break;
465
+ case 46:
466
+ r.addPersonOrSystem("external_system_queue", ...a[s]), this.$ = a[s];
467
+ break;
468
+ case 47:
469
+ r.addContainer("container", ...a[s]), this.$ = a[s];
470
+ break;
471
+ case 48:
472
+ r.addContainer("container_db", ...a[s]), this.$ = a[s];
473
+ break;
474
+ case 49:
475
+ r.addContainer("container_queue", ...a[s]), this.$ = a[s];
476
+ break;
477
+ case 50:
478
+ r.addContainer("external_container", ...a[s]), this.$ = a[s];
479
+ break;
480
+ case 51:
481
+ r.addContainer("external_container_db", ...a[s]), this.$ = a[s];
482
+ break;
483
+ case 52:
484
+ r.addContainer("external_container_queue", ...a[s]), this.$ = a[s];
485
+ break;
486
+ case 53:
487
+ r.addComponent("component", ...a[s]), this.$ = a[s];
488
+ break;
489
+ case 54:
490
+ r.addComponent("component_db", ...a[s]), this.$ = a[s];
491
+ break;
492
+ case 55:
493
+ r.addComponent("component_queue", ...a[s]), this.$ = a[s];
494
+ break;
495
+ case 56:
496
+ r.addComponent("external_component", ...a[s]), this.$ = a[s];
497
+ break;
498
+ case 57:
499
+ r.addComponent("external_component_db", ...a[s]), this.$ = a[s];
500
+ break;
501
+ case 58:
502
+ r.addComponent("external_component_queue", ...a[s]), this.$ = a[s];
503
+ break;
504
+ case 60:
505
+ r.addRel("rel", ...a[s]), this.$ = a[s];
506
+ break;
507
+ case 61:
508
+ r.addRel("birel", ...a[s]), this.$ = a[s];
509
+ break;
510
+ case 62:
511
+ r.addRel("rel_u", ...a[s]), this.$ = a[s];
512
+ break;
513
+ case 63:
514
+ r.addRel("rel_d", ...a[s]), this.$ = a[s];
515
+ break;
516
+ case 64:
517
+ r.addRel("rel_l", ...a[s]), this.$ = a[s];
518
+ break;
519
+ case 65:
520
+ r.addRel("rel_r", ...a[s]), this.$ = a[s];
521
+ break;
522
+ case 66:
523
+ r.addRel("rel_b", ...a[s]), this.$ = a[s];
524
+ break;
525
+ case 67:
526
+ a[s].splice(0, 1), r.addRel("rel", ...a[s]), this.$ = a[s];
527
+ break;
528
+ case 68:
529
+ r.updateElStyle("update_el_style", ...a[s]), this.$ = a[s];
530
+ break;
531
+ case 69:
532
+ r.updateRelStyle("update_rel_style", ...a[s]), this.$ = a[s];
533
+ break;
534
+ case 70:
535
+ r.updateLayoutConfig("update_layout_config", ...a[s]), this.$ = a[s];
536
+ break;
537
+ case 71:
538
+ this.$ = [a[s]];
539
+ break;
540
+ case 72:
541
+ a[s].unshift(a[s - 1]), this.$ = a[s];
542
+ break;
543
+ case 73:
544
+ case 75:
545
+ this.$ = a[s].trim();
546
+ break;
547
+ case 74:
548
+ let e = {};
549
+ e[a[s - 1].trim()] = a[s].trim(), this.$ = e;
550
+ break;
551
+ case 76:
552
+ this.$ = "";
553
+ break;
554
+ }
555
+ }, "anonymous"),
556
+ table: [
557
+ {
558
+ 3: 1,
559
+ 4: 2,
560
+ 5: 3,
561
+ 6: [1, 5],
562
+ 7: [1, 6],
563
+ 8: [1, 7],
564
+ 9: [1, 8],
565
+ 10: 4,
566
+ 11: [1, 9],
567
+ 15: [1, 10],
568
+ 16: [1, 11],
569
+ 17: [1, 12],
570
+ 18: [1, 13]
571
+ },
572
+ { 1: [3] },
573
+ { 1: [2, 1] },
574
+ { 1: [2, 2] },
575
+ { 1: [2, 7] },
576
+ { 1: [2, 3] },
577
+ { 1: [2, 4] },
578
+ { 1: [2, 5] },
579
+ { 1: [2, 6] },
580
+ { 12: [1, 14] },
581
+ { 12: [1, 15] },
582
+ { 12: [1, 16] },
583
+ { 12: [1, 17] },
584
+ { 12: [1, 18] },
585
+ {
586
+ 13: 19,
587
+ 19: 20,
588
+ 20: 21,
589
+ 21: 22,
590
+ 22: t,
591
+ 23: n,
592
+ 24: r,
593
+ 26: i,
594
+ 28: o,
595
+ 29: 49,
596
+ 30: 61,
597
+ 32: 62,
598
+ 34: s,
599
+ 36: l,
600
+ 37: u,
601
+ 38: d,
602
+ 39: f,
603
+ 40: p,
604
+ 41: m,
605
+ 43: 23,
606
+ 44: h,
607
+ 45: g,
608
+ 46: _,
609
+ 47: v,
610
+ 48: y,
611
+ 49: b,
612
+ 50: x,
613
+ 51: S,
614
+ 52: C,
615
+ 53: w,
616
+ 54: T,
617
+ 55: E,
618
+ 56: D,
619
+ 57: O,
620
+ 58: k,
621
+ 59: A,
622
+ 60: j,
623
+ 61: M,
624
+ 62: N,
625
+ 63: P,
626
+ 64: F,
627
+ 65: I,
628
+ 66: L,
629
+ 67: R,
630
+ 68: z,
631
+ 69: B,
632
+ 70: V,
633
+ 71: H,
634
+ 72: U,
635
+ 73: W,
636
+ 74: G
637
+ },
638
+ {
639
+ 13: 70,
640
+ 19: 20,
641
+ 20: 21,
642
+ 21: 22,
643
+ 22: t,
644
+ 23: n,
645
+ 24: r,
646
+ 26: i,
647
+ 28: o,
648
+ 29: 49,
649
+ 30: 61,
650
+ 32: 62,
651
+ 34: s,
652
+ 36: l,
653
+ 37: u,
654
+ 38: d,
655
+ 39: f,
656
+ 40: p,
657
+ 41: m,
658
+ 43: 23,
659
+ 44: h,
660
+ 45: g,
661
+ 46: _,
662
+ 47: v,
663
+ 48: y,
664
+ 49: b,
665
+ 50: x,
666
+ 51: S,
667
+ 52: C,
668
+ 53: w,
669
+ 54: T,
670
+ 55: E,
671
+ 56: D,
672
+ 57: O,
673
+ 58: k,
674
+ 59: A,
675
+ 60: j,
676
+ 61: M,
677
+ 62: N,
678
+ 63: P,
679
+ 64: F,
680
+ 65: I,
681
+ 66: L,
682
+ 67: R,
683
+ 68: z,
684
+ 69: B,
685
+ 70: V,
686
+ 71: H,
687
+ 72: U,
688
+ 73: W,
689
+ 74: G
690
+ },
691
+ {
692
+ 13: 71,
693
+ 19: 20,
694
+ 20: 21,
695
+ 21: 22,
696
+ 22: t,
697
+ 23: n,
698
+ 24: r,
699
+ 26: i,
700
+ 28: o,
701
+ 29: 49,
702
+ 30: 61,
703
+ 32: 62,
704
+ 34: s,
705
+ 36: l,
706
+ 37: u,
707
+ 38: d,
708
+ 39: f,
709
+ 40: p,
710
+ 41: m,
711
+ 43: 23,
712
+ 44: h,
713
+ 45: g,
714
+ 46: _,
715
+ 47: v,
716
+ 48: y,
717
+ 49: b,
718
+ 50: x,
719
+ 51: S,
720
+ 52: C,
721
+ 53: w,
722
+ 54: T,
723
+ 55: E,
724
+ 56: D,
725
+ 57: O,
726
+ 58: k,
727
+ 59: A,
728
+ 60: j,
729
+ 61: M,
730
+ 62: N,
731
+ 63: P,
732
+ 64: F,
733
+ 65: I,
734
+ 66: L,
735
+ 67: R,
736
+ 68: z,
737
+ 69: B,
738
+ 70: V,
739
+ 71: H,
740
+ 72: U,
741
+ 73: W,
742
+ 74: G
743
+ },
744
+ {
745
+ 13: 72,
746
+ 19: 20,
747
+ 20: 21,
748
+ 21: 22,
749
+ 22: t,
750
+ 23: n,
751
+ 24: r,
752
+ 26: i,
753
+ 28: o,
754
+ 29: 49,
755
+ 30: 61,
756
+ 32: 62,
757
+ 34: s,
758
+ 36: l,
759
+ 37: u,
760
+ 38: d,
761
+ 39: f,
762
+ 40: p,
763
+ 41: m,
764
+ 43: 23,
765
+ 44: h,
766
+ 45: g,
767
+ 46: _,
768
+ 47: v,
769
+ 48: y,
770
+ 49: b,
771
+ 50: x,
772
+ 51: S,
773
+ 52: C,
774
+ 53: w,
775
+ 54: T,
776
+ 55: E,
777
+ 56: D,
778
+ 57: O,
779
+ 58: k,
780
+ 59: A,
781
+ 60: j,
782
+ 61: M,
783
+ 62: N,
784
+ 63: P,
785
+ 64: F,
786
+ 65: I,
787
+ 66: L,
788
+ 67: R,
789
+ 68: z,
790
+ 69: B,
791
+ 70: V,
792
+ 71: H,
793
+ 72: U,
794
+ 73: W,
795
+ 74: G
796
+ },
797
+ {
798
+ 13: 73,
799
+ 19: 20,
800
+ 20: 21,
801
+ 21: 22,
802
+ 22: t,
803
+ 23: n,
804
+ 24: r,
805
+ 26: i,
806
+ 28: o,
807
+ 29: 49,
808
+ 30: 61,
809
+ 32: 62,
810
+ 34: s,
811
+ 36: l,
812
+ 37: u,
813
+ 38: d,
814
+ 39: f,
815
+ 40: p,
816
+ 41: m,
817
+ 43: 23,
818
+ 44: h,
819
+ 45: g,
820
+ 46: _,
821
+ 47: v,
822
+ 48: y,
823
+ 49: b,
824
+ 50: x,
825
+ 51: S,
826
+ 52: C,
827
+ 53: w,
828
+ 54: T,
829
+ 55: E,
830
+ 56: D,
831
+ 57: O,
832
+ 58: k,
833
+ 59: A,
834
+ 60: j,
835
+ 61: M,
836
+ 62: N,
837
+ 63: P,
838
+ 64: F,
839
+ 65: I,
840
+ 66: L,
841
+ 67: R,
842
+ 68: z,
843
+ 69: B,
844
+ 70: V,
845
+ 71: H,
846
+ 72: U,
847
+ 73: W,
848
+ 74: G
849
+ },
850
+ { 14: [1, 74] },
851
+ e(K, [2, 13], {
852
+ 43: 23,
853
+ 29: 49,
854
+ 30: 61,
855
+ 32: 62,
856
+ 20: 75,
857
+ 34: s,
858
+ 36: l,
859
+ 37: u,
860
+ 38: d,
861
+ 39: f,
862
+ 40: p,
863
+ 41: m,
864
+ 44: h,
865
+ 45: g,
866
+ 46: _,
867
+ 47: v,
868
+ 48: y,
869
+ 49: b,
870
+ 50: x,
871
+ 51: S,
872
+ 52: C,
873
+ 53: w,
874
+ 54: T,
875
+ 55: E,
876
+ 56: D,
877
+ 57: O,
878
+ 58: k,
879
+ 59: A,
880
+ 60: j,
881
+ 61: M,
882
+ 62: N,
883
+ 63: P,
884
+ 64: F,
885
+ 65: I,
886
+ 66: L,
887
+ 67: R,
888
+ 68: z,
889
+ 69: B,
890
+ 70: V,
891
+ 71: H,
892
+ 72: U,
893
+ 73: W,
894
+ 74: G
895
+ }),
896
+ e(K, [2, 14]),
897
+ e(Le, [2, 16], { 12: [1, 76] }),
898
+ e(K, [2, 36], { 12: [1, 77] }),
899
+ e(q, [2, 19]),
900
+ e(q, [2, 20]),
901
+ { 25: [1, 78] },
902
+ { 27: [1, 79] },
903
+ e(q, [2, 23]),
904
+ {
905
+ 35: 80,
906
+ 75: 81,
907
+ 76: J,
908
+ 77: Y,
909
+ 79: X,
910
+ 80: Z
911
+ },
912
+ {
913
+ 35: 86,
914
+ 75: 81,
915
+ 76: J,
916
+ 77: Y,
917
+ 79: X,
918
+ 80: Z
919
+ },
920
+ {
921
+ 35: 87,
922
+ 75: 81,
923
+ 76: J,
924
+ 77: Y,
925
+ 79: X,
926
+ 80: Z
927
+ },
928
+ {
929
+ 35: 88,
930
+ 75: 81,
931
+ 76: J,
932
+ 77: Y,
933
+ 79: X,
934
+ 80: Z
935
+ },
936
+ {
937
+ 35: 89,
938
+ 75: 81,
939
+ 76: J,
940
+ 77: Y,
941
+ 79: X,
942
+ 80: Z
943
+ },
944
+ {
945
+ 35: 90,
946
+ 75: 81,
947
+ 76: J,
948
+ 77: Y,
949
+ 79: X,
950
+ 80: Z
951
+ },
952
+ {
953
+ 35: 91,
954
+ 75: 81,
955
+ 76: J,
956
+ 77: Y,
957
+ 79: X,
958
+ 80: Z
959
+ },
960
+ {
961
+ 35: 92,
962
+ 75: 81,
963
+ 76: J,
964
+ 77: Y,
965
+ 79: X,
966
+ 80: Z
967
+ },
968
+ {
969
+ 35: 93,
970
+ 75: 81,
971
+ 76: J,
972
+ 77: Y,
973
+ 79: X,
974
+ 80: Z
975
+ },
976
+ {
977
+ 35: 94,
978
+ 75: 81,
979
+ 76: J,
980
+ 77: Y,
981
+ 79: X,
982
+ 80: Z
983
+ },
984
+ {
985
+ 35: 95,
986
+ 75: 81,
987
+ 76: J,
988
+ 77: Y,
989
+ 79: X,
990
+ 80: Z
991
+ },
992
+ {
993
+ 35: 96,
994
+ 75: 81,
995
+ 76: J,
996
+ 77: Y,
997
+ 79: X,
998
+ 80: Z
999
+ },
1000
+ {
1001
+ 35: 97,
1002
+ 75: 81,
1003
+ 76: J,
1004
+ 77: Y,
1005
+ 79: X,
1006
+ 80: Z
1007
+ },
1008
+ {
1009
+ 35: 98,
1010
+ 75: 81,
1011
+ 76: J,
1012
+ 77: Y,
1013
+ 79: X,
1014
+ 80: Z
1015
+ },
1016
+ {
1017
+ 35: 99,
1018
+ 75: 81,
1019
+ 76: J,
1020
+ 77: Y,
1021
+ 79: X,
1022
+ 80: Z
1023
+ },
1024
+ {
1025
+ 35: 100,
1026
+ 75: 81,
1027
+ 76: J,
1028
+ 77: Y,
1029
+ 79: X,
1030
+ 80: Z
1031
+ },
1032
+ {
1033
+ 35: 101,
1034
+ 75: 81,
1035
+ 76: J,
1036
+ 77: Y,
1037
+ 79: X,
1038
+ 80: Z
1039
+ },
1040
+ {
1041
+ 35: 102,
1042
+ 75: 81,
1043
+ 76: J,
1044
+ 77: Y,
1045
+ 79: X,
1046
+ 80: Z
1047
+ },
1048
+ {
1049
+ 35: 103,
1050
+ 75: 81,
1051
+ 76: J,
1052
+ 77: Y,
1053
+ 79: X,
1054
+ 80: Z
1055
+ },
1056
+ {
1057
+ 35: 104,
1058
+ 75: 81,
1059
+ 76: J,
1060
+ 77: Y,
1061
+ 79: X,
1062
+ 80: Z
1063
+ },
1064
+ e(Q, [2, 59]),
1065
+ {
1066
+ 35: 105,
1067
+ 75: 81,
1068
+ 76: J,
1069
+ 77: Y,
1070
+ 79: X,
1071
+ 80: Z
1072
+ },
1073
+ {
1074
+ 35: 106,
1075
+ 75: 81,
1076
+ 76: J,
1077
+ 77: Y,
1078
+ 79: X,
1079
+ 80: Z
1080
+ },
1081
+ {
1082
+ 35: 107,
1083
+ 75: 81,
1084
+ 76: J,
1085
+ 77: Y,
1086
+ 79: X,
1087
+ 80: Z
1088
+ },
1089
+ {
1090
+ 35: 108,
1091
+ 75: 81,
1092
+ 76: J,
1093
+ 77: Y,
1094
+ 79: X,
1095
+ 80: Z
1096
+ },
1097
+ {
1098
+ 35: 109,
1099
+ 75: 81,
1100
+ 76: J,
1101
+ 77: Y,
1102
+ 79: X,
1103
+ 80: Z
1104
+ },
1105
+ {
1106
+ 35: 110,
1107
+ 75: 81,
1108
+ 76: J,
1109
+ 77: Y,
1110
+ 79: X,
1111
+ 80: Z
1112
+ },
1113
+ {
1114
+ 35: 111,
1115
+ 75: 81,
1116
+ 76: J,
1117
+ 77: Y,
1118
+ 79: X,
1119
+ 80: Z
1120
+ },
1121
+ {
1122
+ 35: 112,
1123
+ 75: 81,
1124
+ 76: J,
1125
+ 77: Y,
1126
+ 79: X,
1127
+ 80: Z
1128
+ },
1129
+ {
1130
+ 35: 113,
1131
+ 75: 81,
1132
+ 76: J,
1133
+ 77: Y,
1134
+ 79: X,
1135
+ 80: Z
1136
+ },
1137
+ {
1138
+ 35: 114,
1139
+ 75: 81,
1140
+ 76: J,
1141
+ 77: Y,
1142
+ 79: X,
1143
+ 80: Z
1144
+ },
1145
+ {
1146
+ 35: 115,
1147
+ 75: 81,
1148
+ 76: J,
1149
+ 77: Y,
1150
+ 79: X,
1151
+ 80: Z
1152
+ },
1153
+ {
1154
+ 20: 116,
1155
+ 29: 49,
1156
+ 30: 61,
1157
+ 32: 62,
1158
+ 34: s,
1159
+ 36: l,
1160
+ 37: u,
1161
+ 38: d,
1162
+ 39: f,
1163
+ 40: p,
1164
+ 41: m,
1165
+ 43: 23,
1166
+ 44: h,
1167
+ 45: g,
1168
+ 46: _,
1169
+ 47: v,
1170
+ 48: y,
1171
+ 49: b,
1172
+ 50: x,
1173
+ 51: S,
1174
+ 52: C,
1175
+ 53: w,
1176
+ 54: T,
1177
+ 55: E,
1178
+ 56: D,
1179
+ 57: O,
1180
+ 58: k,
1181
+ 59: A,
1182
+ 60: j,
1183
+ 61: M,
1184
+ 62: N,
1185
+ 63: P,
1186
+ 64: F,
1187
+ 65: I,
1188
+ 66: L,
1189
+ 67: R,
1190
+ 68: z,
1191
+ 69: B,
1192
+ 70: V,
1193
+ 71: H,
1194
+ 72: U,
1195
+ 73: W,
1196
+ 74: G
1197
+ },
1198
+ {
1199
+ 12: [1, 118],
1200
+ 33: [1, 117]
1201
+ },
1202
+ {
1203
+ 35: 119,
1204
+ 75: 81,
1205
+ 76: J,
1206
+ 77: Y,
1207
+ 79: X,
1208
+ 80: Z
1209
+ },
1210
+ {
1211
+ 35: 120,
1212
+ 75: 81,
1213
+ 76: J,
1214
+ 77: Y,
1215
+ 79: X,
1216
+ 80: Z
1217
+ },
1218
+ {
1219
+ 35: 121,
1220
+ 75: 81,
1221
+ 76: J,
1222
+ 77: Y,
1223
+ 79: X,
1224
+ 80: Z
1225
+ },
1226
+ {
1227
+ 35: 122,
1228
+ 75: 81,
1229
+ 76: J,
1230
+ 77: Y,
1231
+ 79: X,
1232
+ 80: Z
1233
+ },
1234
+ {
1235
+ 35: 123,
1236
+ 75: 81,
1237
+ 76: J,
1238
+ 77: Y,
1239
+ 79: X,
1240
+ 80: Z
1241
+ },
1242
+ {
1243
+ 35: 124,
1244
+ 75: 81,
1245
+ 76: J,
1246
+ 77: Y,
1247
+ 79: X,
1248
+ 80: Z
1249
+ },
1250
+ {
1251
+ 35: 125,
1252
+ 75: 81,
1253
+ 76: J,
1254
+ 77: Y,
1255
+ 79: X,
1256
+ 80: Z
1257
+ },
1258
+ { 14: [1, 126] },
1259
+ { 14: [1, 127] },
1260
+ { 14: [1, 128] },
1261
+ { 14: [1, 129] },
1262
+ { 1: [2, 8] },
1263
+ e(K, [2, 15]),
1264
+ e(Le, [2, 17], {
1265
+ 21: 22,
1266
+ 19: 130,
1267
+ 22: t,
1268
+ 23: n,
1269
+ 24: r,
1270
+ 26: i,
1271
+ 28: o
1272
+ }),
1273
+ e(K, [2, 37], {
1274
+ 19: 20,
1275
+ 20: 21,
1276
+ 21: 22,
1277
+ 43: 23,
1278
+ 29: 49,
1279
+ 30: 61,
1280
+ 32: 62,
1281
+ 13: 131,
1282
+ 22: t,
1283
+ 23: n,
1284
+ 24: r,
1285
+ 26: i,
1286
+ 28: o,
1287
+ 34: s,
1288
+ 36: l,
1289
+ 37: u,
1290
+ 38: d,
1291
+ 39: f,
1292
+ 40: p,
1293
+ 41: m,
1294
+ 44: h,
1295
+ 45: g,
1296
+ 46: _,
1297
+ 47: v,
1298
+ 48: y,
1299
+ 49: b,
1300
+ 50: x,
1301
+ 51: S,
1302
+ 52: C,
1303
+ 53: w,
1304
+ 54: T,
1305
+ 55: E,
1306
+ 56: D,
1307
+ 57: O,
1308
+ 58: k,
1309
+ 59: A,
1310
+ 60: j,
1311
+ 61: M,
1312
+ 62: N,
1313
+ 63: P,
1314
+ 64: F,
1315
+ 65: I,
1316
+ 66: L,
1317
+ 67: R,
1318
+ 68: z,
1319
+ 69: B,
1320
+ 70: V,
1321
+ 71: H,
1322
+ 72: U,
1323
+ 73: W,
1324
+ 74: G
1325
+ }),
1326
+ e(q, [2, 21]),
1327
+ e(q, [2, 22]),
1328
+ e(Q, [2, 39]),
1329
+ e(Re, [2, 71], {
1330
+ 75: 81,
1331
+ 35: 132,
1332
+ 76: J,
1333
+ 77: Y,
1334
+ 79: X,
1335
+ 80: Z
1336
+ }),
1337
+ e(ze, [2, 73]),
1338
+ { 78: [1, 133] },
1339
+ e(ze, [2, 75]),
1340
+ e(ze, [2, 76]),
1341
+ e(Q, [2, 40]),
1342
+ e(Q, [2, 41]),
1343
+ e(Q, [2, 42]),
1344
+ e(Q, [2, 43]),
1345
+ e(Q, [2, 44]),
1346
+ e(Q, [2, 45]),
1347
+ e(Q, [2, 46]),
1348
+ e(Q, [2, 47]),
1349
+ e(Q, [2, 48]),
1350
+ e(Q, [2, 49]),
1351
+ e(Q, [2, 50]),
1352
+ e(Q, [2, 51]),
1353
+ e(Q, [2, 52]),
1354
+ e(Q, [2, 53]),
1355
+ e(Q, [2, 54]),
1356
+ e(Q, [2, 55]),
1357
+ e(Q, [2, 56]),
1358
+ e(Q, [2, 57]),
1359
+ e(Q, [2, 58]),
1360
+ e(Q, [2, 60]),
1361
+ e(Q, [2, 61]),
1362
+ e(Q, [2, 62]),
1363
+ e(Q, [2, 63]),
1364
+ e(Q, [2, 64]),
1365
+ e(Q, [2, 65]),
1366
+ e(Q, [2, 66]),
1367
+ e(Q, [2, 67]),
1368
+ e(Q, [2, 68]),
1369
+ e(Q, [2, 69]),
1370
+ e(Q, [2, 70]),
1371
+ {
1372
+ 31: 134,
1373
+ 42: [1, 135]
1374
+ },
1375
+ { 12: [1, 136] },
1376
+ { 33: [1, 137] },
1377
+ e($, [2, 28]),
1378
+ e($, [2, 29]),
1379
+ e($, [2, 30]),
1380
+ e($, [2, 31]),
1381
+ e($, [2, 32]),
1382
+ e($, [2, 33]),
1383
+ e($, [2, 34]),
1384
+ { 1: [2, 9] },
1385
+ { 1: [2, 10] },
1386
+ { 1: [2, 11] },
1387
+ { 1: [2, 12] },
1388
+ e(Le, [2, 18]),
1389
+ e(K, [2, 38]),
1390
+ e(Re, [2, 72]),
1391
+ e(ze, [2, 74]),
1392
+ e(Q, [2, 24]),
1393
+ e(Q, [2, 35]),
1394
+ e(Be, [2, 25]),
1395
+ e(Be, [2, 26], { 12: [1, 138] }),
1396
+ e(Be, [2, 27])
1397
+ ],
1398
+ defaultActions: {
1399
+ 2: [2, 1],
1400
+ 3: [2, 2],
1401
+ 4: [2, 7],
1402
+ 5: [2, 3],
1403
+ 6: [2, 4],
1404
+ 7: [2, 5],
1405
+ 8: [2, 6],
1406
+ 74: [2, 8],
1407
+ 126: [2, 9],
1408
+ 127: [2, 10],
1409
+ 128: [2, 11],
1410
+ 129: [2, 12]
1411
+ },
1412
+ parseError: /* @__PURE__ */ __name(function(e, t) {
1413
+ if (t.recoverable) this.trace(e);
1414
+ else {
1415
+ var n = Error(e);
1416
+ throw n.hash = t, n;
1417
+ }
1418
+ }, "parseError"),
1419
+ parse: /* @__PURE__ */ __name(function(e) {
1420
+ var t = this, n = [0], r = [], i = [null], o = [], s = this.table, l = "", u = 0, d = 0, f = 0, p = 2, m = 1, h = o.slice.call(arguments, 1), g = Object.create(this.lexer), _ = { yy: {} };
1421
+ for (var v in this.yy) Object.prototype.hasOwnProperty.call(this.yy, v) && (_.yy[v] = this.yy[v]);
1422
+ g.setInput(e, _.yy), _.yy.lexer = g, _.yy.parser = this, g.yylloc === void 0 && (g.yylloc = {});
1423
+ var y = g.yylloc;
1424
+ o.push(y);
1425
+ var b = g.options && g.options.ranges;
1426
+ typeof _.yy.parseError == "function" ? this.parseError = _.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
1427
+ function x(e) {
1428
+ n.length -= 2 * e, i.length -= e, o.length -= e;
1429
+ }
1430
+ __name(x, "popStack");
1431
+ function S() {
1432
+ var e = r.pop() || g.lex() || m;
1433
+ return typeof e != "number" && (e instanceof Array && (r = e, e = r.pop()), e = t.symbols_[e] || e), e;
1434
+ }
1435
+ __name(S, "lex");
1436
+ for (var C, w, T, E, D, O = {}, k, A, j, M;;) {
1437
+ if (T = n[n.length - 1], this.defaultActions[T] ? E = this.defaultActions[T] : (C ??= S(), E = s[T] && s[T][C]), E === void 0 || !E.length || !E[0]) {
1438
+ var N = "";
1439
+ for (k in M = [], s[T]) this.terminals_[k] && k > p && M.push("'" + this.terminals_[k] + "'");
1440
+ N = g.showPosition ? "Parse error on line " + (u + 1) + ":\n" + g.showPosition() + "\nExpecting " + M.join(", ") + ", got '" + (this.terminals_[C] || C) + "'" : "Parse error on line " + (u + 1) + ": Unexpected " + (C == m ? "end of input" : "'" + (this.terminals_[C] || C) + "'"), this.parseError(N, {
1441
+ text: g.match,
1442
+ token: this.terminals_[C] || C,
1443
+ line: g.yylineno,
1444
+ loc: y,
1445
+ expected: M
1446
+ });
1447
+ }
1448
+ if (E[0] instanceof Array && E.length > 1) throw Error("Parse Error: multiple actions possible at state: " + T + ", token: " + C);
1449
+ switch (E[0]) {
1450
+ case 1:
1451
+ n.push(C), i.push(g.yytext), o.push(g.yylloc), n.push(E[1]), C = null, w ? (C = w, w = null) : (d = g.yyleng, l = g.yytext, u = g.yylineno, y = g.yylloc, f > 0 && f--);
1452
+ break;
1453
+ case 2:
1454
+ if (A = this.productions_[E[1]][1], O.$ = i[i.length - A], O._$ = {
1455
+ first_line: o[o.length - (A || 1)].first_line,
1456
+ last_line: o[o.length - 1].last_line,
1457
+ first_column: o[o.length - (A || 1)].first_column,
1458
+ last_column: o[o.length - 1].last_column
1459
+ }, b && (O._$.range = [o[o.length - (A || 1)].range[0], o[o.length - 1].range[1]]), D = this.performAction.apply(O, [
1460
+ l,
1461
+ d,
1462
+ u,
1463
+ _.yy,
1464
+ E[1],
1465
+ i,
1466
+ o
1467
+ ].concat(h)), D !== void 0) return D;
1468
+ A && (n = n.slice(0, -1 * A * 2), i = i.slice(0, -1 * A), o = o.slice(0, -1 * A)), n.push(this.productions_[E[1]][0]), i.push(O.$), o.push(O._$), j = s[n[n.length - 2]][n[n.length - 1]], n.push(j);
1469
+ break;
1470
+ case 3: return !0;
1471
+ }
1472
+ }
1473
+ return !0;
1474
+ }, "parse")
1475
+ };
1476
+ Ve.lexer = /* @__PURE__ */ (function() {
1477
+ return {
1478
+ EOF: 1,
1479
+ parseError: /* @__PURE__ */ __name(function(e, t) {
1480
+ if (this.yy.parser) this.yy.parser.parseError(e, t);
1481
+ else throw Error(e);
1482
+ }, "parseError"),
1483
+ setInput: /* @__PURE__ */ __name(function(e, t) {
1484
+ return this.yy = t || this.yy || {}, this._input = e, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
1485
+ first_line: 1,
1486
+ first_column: 0,
1487
+ last_line: 1,
1488
+ last_column: 0
1489
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
1490
+ }, "setInput"),
1491
+ input: /* @__PURE__ */ __name(function() {
1492
+ var e = this._input[0];
1493
+ return this.yytext += e, this.yyleng++, this.offset++, this.match += e, this.matched += e, e.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), e;
1494
+ }, "input"),
1495
+ unput: /* @__PURE__ */ __name(function(e) {
1496
+ var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
1497
+ this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
1498
+ var r = this.match.split(/(?:\r\n?|\n)/g);
1499
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
1500
+ var i = this.yylloc.range;
1501
+ return this.yylloc = {
1502
+ first_line: this.yylloc.first_line,
1503
+ last_line: this.yylineno + 1,
1504
+ first_column: this.yylloc.first_column,
1505
+ last_column: n ? (n.length === r.length ? this.yylloc.first_column : 0) + r[r.length - n.length].length - n[0].length : this.yylloc.first_column - t
1506
+ }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
1507
+ }, "unput"),
1508
+ more: /* @__PURE__ */ __name(function() {
1509
+ return this._more = !0, this;
1510
+ }, "more"),
1511
+ reject: /* @__PURE__ */ __name(function() {
1512
+ if (this.options.backtrack_lexer) this._backtrack = !0;
1513
+ else return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), {
1514
+ text: "",
1515
+ token: null,
1516
+ line: this.yylineno
1517
+ });
1518
+ return this;
1519
+ }, "reject"),
1520
+ less: /* @__PURE__ */ __name(function(e) {
1521
+ this.unput(this.match.slice(e));
1522
+ }, "less"),
1523
+ pastInput: /* @__PURE__ */ __name(function() {
1524
+ var e = this.matched.substr(0, this.matched.length - this.match.length);
1525
+ return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
1526
+ }, "pastInput"),
1527
+ upcomingInput: /* @__PURE__ */ __name(function() {
1528
+ var e = this.match;
1529
+ return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
1530
+ }, "upcomingInput"),
1531
+ showPosition: /* @__PURE__ */ __name(function() {
1532
+ var e = this.pastInput(), t = Array(e.length + 1).join("-");
1533
+ return e + this.upcomingInput() + "\n" + t + "^";
1534
+ }, "showPosition"),
1535
+ test_match: /* @__PURE__ */ __name(function(e, t) {
1536
+ var n, r, i;
1537
+ if (this.options.backtrack_lexer && (i = {
1538
+ yylineno: this.yylineno,
1539
+ yylloc: {
1540
+ first_line: this.yylloc.first_line,
1541
+ last_line: this.last_line,
1542
+ first_column: this.yylloc.first_column,
1543
+ last_column: this.yylloc.last_column
1544
+ },
1545
+ yytext: this.yytext,
1546
+ match: this.match,
1547
+ matches: this.matches,
1548
+ matched: this.matched,
1549
+ yyleng: this.yyleng,
1550
+ offset: this.offset,
1551
+ _more: this._more,
1552
+ _input: this._input,
1553
+ yy: this.yy,
1554
+ conditionStack: this.conditionStack.slice(0),
1555
+ done: this.done
1556
+ }, this.options.ranges && (i.yylloc.range = this.yylloc.range.slice(0))), r = e[0].match(/(?:\r\n?|\n).*/g), r && (this.yylineno += r.length), this.yylloc = {
1557
+ first_line: this.yylloc.last_line,
1558
+ last_line: this.yylineno + 1,
1559
+ first_column: this.yylloc.last_column,
1560
+ last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
1561
+ }, this.yytext += e[0], this.match += e[0], this.matches = e, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(e[0].length), this.matched += e[0], n = this.performAction.call(this, this.yy, this, t, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n) return n;
1562
+ if (this._backtrack) {
1563
+ for (var a in i) this[a] = i[a];
1564
+ return !1;
1565
+ }
1566
+ return !1;
1567
+ }, "test_match"),
1568
+ next: /* @__PURE__ */ __name(function() {
1569
+ if (this.done) return this.EOF;
1570
+ this._input || (this.done = !0);
1571
+ var e, t, n, r;
1572
+ this._more || (this.yytext = "", this.match = "");
1573
+ for (var i = this._currentRules(), a = 0; a < i.length; a++) if (n = this._input.match(this.rules[i[a]]), n && (!t || n[0].length > t[0].length)) {
1574
+ if (t = n, r = a, this.options.backtrack_lexer) {
1575
+ if (e = this.test_match(n, i[a]), e !== !1) return e;
1576
+ if (this._backtrack) {
1577
+ t = !1;
1578
+ continue;
1579
+ } else return !1;
1580
+ } else if (!this.options.flex) break;
1581
+ }
1582
+ return t ? (e = this.test_match(t, i[r]), e === !1 ? !1 : e) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
1583
+ text: "",
1584
+ token: null,
1585
+ line: this.yylineno
1586
+ });
1587
+ }, "next"),
1588
+ lex: /* @__PURE__ */ __name(function() {
1589
+ return this.next() || this.lex();
1590
+ }, "lex"),
1591
+ begin: /* @__PURE__ */ __name(function(e) {
1592
+ this.conditionStack.push(e);
1593
+ }, "begin"),
1594
+ popState: /* @__PURE__ */ __name(function() {
1595
+ return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
1596
+ }, "popState"),
1597
+ _currentRules: /* @__PURE__ */ __name(function() {
1598
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
1599
+ }, "_currentRules"),
1600
+ topState: /* @__PURE__ */ __name(function(e) {
1601
+ return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
1602
+ }, "topState"),
1603
+ pushState: /* @__PURE__ */ __name(function(e) {
1604
+ this.begin(e);
1605
+ }, "pushState"),
1606
+ stateStackSize: /* @__PURE__ */ __name(function() {
1607
+ return this.conditionStack.length;
1608
+ }, "stateStackSize"),
1609
+ options: {},
1610
+ performAction: /* @__PURE__ */ __name(function(e, t, n, r) {
1611
+ switch (n) {
1612
+ case 0: return 6;
1613
+ case 1: return 7;
1614
+ case 2: return 8;
1615
+ case 3: return 9;
1616
+ case 4: return 22;
1617
+ case 5: return 23;
1618
+ case 6: return this.begin("acc_title"), 24;
1619
+ case 7: return this.popState(), "acc_title_value";
1620
+ case 8: return this.begin("acc_descr"), 26;
1621
+ case 9: return this.popState(), "acc_descr_value";
1622
+ case 10:
1623
+ this.begin("acc_descr_multiline");
1624
+ break;
1625
+ case 11:
1626
+ this.popState();
1627
+ break;
1628
+ case 12: return "acc_descr_multiline_value";
1629
+ case 13: break;
1630
+ case 14:
1631
+ c;
1632
+ break;
1633
+ case 15: return 12;
1634
+ case 16: break;
1635
+ case 17: return 11;
1636
+ case 18: return 15;
1637
+ case 19: return 16;
1638
+ case 20: return 17;
1639
+ case 21: return 18;
1640
+ case 22: return this.begin("person_ext"), 45;
1641
+ case 23: return this.begin("person"), 44;
1642
+ case 24: return this.begin("system_ext_queue"), 51;
1643
+ case 25: return this.begin("system_ext_db"), 50;
1644
+ case 26: return this.begin("system_ext"), 49;
1645
+ case 27: return this.begin("system_queue"), 48;
1646
+ case 28: return this.begin("system_db"), 47;
1647
+ case 29: return this.begin("system"), 46;
1648
+ case 30: return this.begin("boundary"), 37;
1649
+ case 31: return this.begin("enterprise_boundary"), 34;
1650
+ case 32: return this.begin("system_boundary"), 36;
1651
+ case 33: return this.begin("container_ext_queue"), 57;
1652
+ case 34: return this.begin("container_ext_db"), 56;
1653
+ case 35: return this.begin("container_ext"), 55;
1654
+ case 36: return this.begin("container_queue"), 54;
1655
+ case 37: return this.begin("container_db"), 53;
1656
+ case 38: return this.begin("container"), 52;
1657
+ case 39: return this.begin("container_boundary"), 38;
1658
+ case 40: return this.begin("component_ext_queue"), 63;
1659
+ case 41: return this.begin("component_ext_db"), 62;
1660
+ case 42: return this.begin("component_ext"), 61;
1661
+ case 43: return this.begin("component_queue"), 60;
1662
+ case 44: return this.begin("component_db"), 59;
1663
+ case 45: return this.begin("component"), 58;
1664
+ case 46: return this.begin("node"), 39;
1665
+ case 47: return this.begin("node"), 39;
1666
+ case 48: return this.begin("node_l"), 40;
1667
+ case 49: return this.begin("node_r"), 41;
1668
+ case 50: return this.begin("rel"), 64;
1669
+ case 51: return this.begin("birel"), 65;
1670
+ case 52: return this.begin("rel_u"), 66;
1671
+ case 53: return this.begin("rel_u"), 66;
1672
+ case 54: return this.begin("rel_d"), 67;
1673
+ case 55: return this.begin("rel_d"), 67;
1674
+ case 56: return this.begin("rel_l"), 68;
1675
+ case 57: return this.begin("rel_l"), 68;
1676
+ case 58: return this.begin("rel_r"), 69;
1677
+ case 59: return this.begin("rel_r"), 69;
1678
+ case 60: return this.begin("rel_b"), 70;
1679
+ case 61: return this.begin("rel_index"), 71;
1680
+ case 62: return this.begin("update_el_style"), 72;
1681
+ case 63: return this.begin("update_rel_style"), 73;
1682
+ case 64: return this.begin("update_layout_config"), 74;
1683
+ case 65: return "EOF_IN_STRUCT";
1684
+ case 66: return this.begin("attribute"), "ATTRIBUTE_EMPTY";
1685
+ case 67:
1686
+ this.begin("attribute");
1687
+ break;
1688
+ case 68:
1689
+ this.popState(), this.popState();
1690
+ break;
1691
+ case 69: return 80;
1692
+ case 70: break;
1693
+ case 71: return 80;
1694
+ case 72:
1695
+ this.begin("string");
1696
+ break;
1697
+ case 73:
1698
+ this.popState();
1699
+ break;
1700
+ case 74: return "STR";
1701
+ case 75:
1702
+ this.begin("string_kv");
1703
+ break;
1704
+ case 76: return this.begin("string_kv_key"), "STR_KEY";
1705
+ case 77:
1706
+ this.popState(), this.begin("string_kv_value");
1707
+ break;
1708
+ case 78: return "STR_VALUE";
1709
+ case 79:
1710
+ this.popState(), this.popState();
1711
+ break;
1712
+ case 80: return "STR";
1713
+ case 81: return "LBRACE";
1714
+ case 82: return "RBRACE";
1715
+ case 83: return "SPACE";
1716
+ case 84: return "EOL";
1717
+ case 85: return 14;
1718
+ }
1719
+ }, "anonymous"),
1720
+ rules: [
1721
+ /^(?:.*direction\s+TB[^\n]*)/,
1722
+ /^(?:.*direction\s+BT[^\n]*)/,
1723
+ /^(?:.*direction\s+RL[^\n]*)/,
1724
+ /^(?:.*direction\s+LR[^\n]*)/,
1725
+ /^(?:title\s[^#\n;]+)/,
1726
+ /^(?:accDescription\s[^#\n;]+)/,
1727
+ /^(?:accTitle\s*:\s*)/,
1728
+ /^(?:(?!\n||)*[^\n]*)/,
1729
+ /^(?:accDescr\s*:\s*)/,
1730
+ /^(?:(?!\n||)*[^\n]*)/,
1731
+ /^(?:accDescr\s*\{\s*)/,
1732
+ /^(?:[\}])/,
1733
+ /^(?:[^\}]*)/,
1734
+ /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,
1735
+ /^(?:%%[^\n]*(\r?\n)*)/,
1736
+ /^(?:\s*(\r?\n)+)/,
1737
+ /^(?:\s+)/,
1738
+ /^(?:C4Context\b)/,
1739
+ /^(?:C4Container\b)/,
1740
+ /^(?:C4Component\b)/,
1741
+ /^(?:C4Dynamic\b)/,
1742
+ /^(?:C4Deployment\b)/,
1743
+ /^(?:Person_Ext\b)/,
1744
+ /^(?:Person\b)/,
1745
+ /^(?:SystemQueue_Ext\b)/,
1746
+ /^(?:SystemDb_Ext\b)/,
1747
+ /^(?:System_Ext\b)/,
1748
+ /^(?:SystemQueue\b)/,
1749
+ /^(?:SystemDb\b)/,
1750
+ /^(?:System\b)/,
1751
+ /^(?:Boundary\b)/,
1752
+ /^(?:Enterprise_Boundary\b)/,
1753
+ /^(?:System_Boundary\b)/,
1754
+ /^(?:ContainerQueue_Ext\b)/,
1755
+ /^(?:ContainerDb_Ext\b)/,
1756
+ /^(?:Container_Ext\b)/,
1757
+ /^(?:ContainerQueue\b)/,
1758
+ /^(?:ContainerDb\b)/,
1759
+ /^(?:Container\b)/,
1760
+ /^(?:Container_Boundary\b)/,
1761
+ /^(?:ComponentQueue_Ext\b)/,
1762
+ /^(?:ComponentDb_Ext\b)/,
1763
+ /^(?:Component_Ext\b)/,
1764
+ /^(?:ComponentQueue\b)/,
1765
+ /^(?:ComponentDb\b)/,
1766
+ /^(?:Component\b)/,
1767
+ /^(?:Deployment_Node\b)/,
1768
+ /^(?:Node\b)/,
1769
+ /^(?:Node_L\b)/,
1770
+ /^(?:Node_R\b)/,
1771
+ /^(?:Rel\b)/,
1772
+ /^(?:BiRel\b)/,
1773
+ /^(?:Rel_Up\b)/,
1774
+ /^(?:Rel_U\b)/,
1775
+ /^(?:Rel_Down\b)/,
1776
+ /^(?:Rel_D\b)/,
1777
+ /^(?:Rel_Left\b)/,
1778
+ /^(?:Rel_L\b)/,
1779
+ /^(?:Rel_Right\b)/,
1780
+ /^(?:Rel_R\b)/,
1781
+ /^(?:Rel_Back\b)/,
1782
+ /^(?:RelIndex\b)/,
1783
+ /^(?:UpdateElementStyle\b)/,
1784
+ /^(?:UpdateRelStyle\b)/,
1785
+ /^(?:UpdateLayoutConfig\b)/,
1786
+ /^(?:$)/,
1787
+ /^(?:[(][ ]*[,])/,
1788
+ /^(?:[(])/,
1789
+ /^(?:[)])/,
1790
+ /^(?:,,)/,
1791
+ /^(?:,)/,
1792
+ /^(?:[ ]*["]["])/,
1793
+ /^(?:[ ]*["])/,
1794
+ /^(?:["])/,
1795
+ /^(?:[^"]*)/,
1796
+ /^(?:[ ]*[\$])/,
1797
+ /^(?:[^=]*)/,
1798
+ /^(?:[=][ ]*["])/,
1799
+ /^(?:[^"]+)/,
1800
+ /^(?:["])/,
1801
+ /^(?:[^,]+)/,
1802
+ /^(?:\{)/,
1803
+ /^(?:\})/,
1804
+ /^(?:[\s]+)/,
1805
+ /^(?:[\n\r]+)/,
1806
+ /^(?:$)/
1807
+ ],
1808
+ conditions: {
1809
+ acc_descr_multiline: {
1810
+ rules: [11, 12],
1811
+ inclusive: !1
1812
+ },
1813
+ acc_descr: {
1814
+ rules: [9],
1815
+ inclusive: !1
1816
+ },
1817
+ acc_title: {
1818
+ rules: [7],
1819
+ inclusive: !1
1820
+ },
1821
+ string_kv_value: {
1822
+ rules: [78, 79],
1823
+ inclusive: !1
1824
+ },
1825
+ string_kv_key: {
1826
+ rules: [77],
1827
+ inclusive: !1
1828
+ },
1829
+ string_kv: {
1830
+ rules: [76],
1831
+ inclusive: !1
1832
+ },
1833
+ string: {
1834
+ rules: [73, 74],
1835
+ inclusive: !1
1836
+ },
1837
+ attribute: {
1838
+ rules: [
1839
+ 68,
1840
+ 69,
1841
+ 70,
1842
+ 71,
1843
+ 72,
1844
+ 75,
1845
+ 80
1846
+ ],
1847
+ inclusive: !1
1848
+ },
1849
+ update_layout_config: {
1850
+ rules: [
1851
+ 65,
1852
+ 66,
1853
+ 67,
1854
+ 68
1855
+ ],
1856
+ inclusive: !1
1857
+ },
1858
+ update_rel_style: {
1859
+ rules: [
1860
+ 65,
1861
+ 66,
1862
+ 67,
1863
+ 68
1864
+ ],
1865
+ inclusive: !1
1866
+ },
1867
+ update_el_style: {
1868
+ rules: [
1869
+ 65,
1870
+ 66,
1871
+ 67,
1872
+ 68
1873
+ ],
1874
+ inclusive: !1
1875
+ },
1876
+ rel_b: {
1877
+ rules: [
1878
+ 65,
1879
+ 66,
1880
+ 67,
1881
+ 68
1882
+ ],
1883
+ inclusive: !1
1884
+ },
1885
+ rel_r: {
1886
+ rules: [
1887
+ 65,
1888
+ 66,
1889
+ 67,
1890
+ 68
1891
+ ],
1892
+ inclusive: !1
1893
+ },
1894
+ rel_l: {
1895
+ rules: [
1896
+ 65,
1897
+ 66,
1898
+ 67,
1899
+ 68
1900
+ ],
1901
+ inclusive: !1
1902
+ },
1903
+ rel_d: {
1904
+ rules: [
1905
+ 65,
1906
+ 66,
1907
+ 67,
1908
+ 68
1909
+ ],
1910
+ inclusive: !1
1911
+ },
1912
+ rel_u: {
1913
+ rules: [
1914
+ 65,
1915
+ 66,
1916
+ 67,
1917
+ 68
1918
+ ],
1919
+ inclusive: !1
1920
+ },
1921
+ rel_bi: {
1922
+ rules: [],
1923
+ inclusive: !1
1924
+ },
1925
+ rel: {
1926
+ rules: [
1927
+ 65,
1928
+ 66,
1929
+ 67,
1930
+ 68
1931
+ ],
1932
+ inclusive: !1
1933
+ },
1934
+ node_r: {
1935
+ rules: [
1936
+ 65,
1937
+ 66,
1938
+ 67,
1939
+ 68
1940
+ ],
1941
+ inclusive: !1
1942
+ },
1943
+ node_l: {
1944
+ rules: [
1945
+ 65,
1946
+ 66,
1947
+ 67,
1948
+ 68
1949
+ ],
1950
+ inclusive: !1
1951
+ },
1952
+ node: {
1953
+ rules: [
1954
+ 65,
1955
+ 66,
1956
+ 67,
1957
+ 68
1958
+ ],
1959
+ inclusive: !1
1960
+ },
1961
+ index: {
1962
+ rules: [],
1963
+ inclusive: !1
1964
+ },
1965
+ rel_index: {
1966
+ rules: [
1967
+ 65,
1968
+ 66,
1969
+ 67,
1970
+ 68
1971
+ ],
1972
+ inclusive: !1
1973
+ },
1974
+ component_ext_queue: {
1975
+ rules: [],
1976
+ inclusive: !1
1977
+ },
1978
+ component_ext_db: {
1979
+ rules: [
1980
+ 65,
1981
+ 66,
1982
+ 67,
1983
+ 68
1984
+ ],
1985
+ inclusive: !1
1986
+ },
1987
+ component_ext: {
1988
+ rules: [
1989
+ 65,
1990
+ 66,
1991
+ 67,
1992
+ 68
1993
+ ],
1994
+ inclusive: !1
1995
+ },
1996
+ component_queue: {
1997
+ rules: [
1998
+ 65,
1999
+ 66,
2000
+ 67,
2001
+ 68
2002
+ ],
2003
+ inclusive: !1
2004
+ },
2005
+ component_db: {
2006
+ rules: [
2007
+ 65,
2008
+ 66,
2009
+ 67,
2010
+ 68
2011
+ ],
2012
+ inclusive: !1
2013
+ },
2014
+ component: {
2015
+ rules: [
2016
+ 65,
2017
+ 66,
2018
+ 67,
2019
+ 68
2020
+ ],
2021
+ inclusive: !1
2022
+ },
2023
+ container_boundary: {
2024
+ rules: [
2025
+ 65,
2026
+ 66,
2027
+ 67,
2028
+ 68
2029
+ ],
2030
+ inclusive: !1
2031
+ },
2032
+ container_ext_queue: {
2033
+ rules: [
2034
+ 65,
2035
+ 66,
2036
+ 67,
2037
+ 68
2038
+ ],
2039
+ inclusive: !1
2040
+ },
2041
+ container_ext_db: {
2042
+ rules: [
2043
+ 65,
2044
+ 66,
2045
+ 67,
2046
+ 68
2047
+ ],
2048
+ inclusive: !1
2049
+ },
2050
+ container_ext: {
2051
+ rules: [
2052
+ 65,
2053
+ 66,
2054
+ 67,
2055
+ 68
2056
+ ],
2057
+ inclusive: !1
2058
+ },
2059
+ container_queue: {
2060
+ rules: [
2061
+ 65,
2062
+ 66,
2063
+ 67,
2064
+ 68
2065
+ ],
2066
+ inclusive: !1
2067
+ },
2068
+ container_db: {
2069
+ rules: [
2070
+ 65,
2071
+ 66,
2072
+ 67,
2073
+ 68
2074
+ ],
2075
+ inclusive: !1
2076
+ },
2077
+ container: {
2078
+ rules: [
2079
+ 65,
2080
+ 66,
2081
+ 67,
2082
+ 68
2083
+ ],
2084
+ inclusive: !1
2085
+ },
2086
+ birel: {
2087
+ rules: [
2088
+ 65,
2089
+ 66,
2090
+ 67,
2091
+ 68
2092
+ ],
2093
+ inclusive: !1
2094
+ },
2095
+ system_boundary: {
2096
+ rules: [
2097
+ 65,
2098
+ 66,
2099
+ 67,
2100
+ 68
2101
+ ],
2102
+ inclusive: !1
2103
+ },
2104
+ enterprise_boundary: {
2105
+ rules: [
2106
+ 65,
2107
+ 66,
2108
+ 67,
2109
+ 68
2110
+ ],
2111
+ inclusive: !1
2112
+ },
2113
+ boundary: {
2114
+ rules: [
2115
+ 65,
2116
+ 66,
2117
+ 67,
2118
+ 68
2119
+ ],
2120
+ inclusive: !1
2121
+ },
2122
+ system_ext_queue: {
2123
+ rules: [
2124
+ 65,
2125
+ 66,
2126
+ 67,
2127
+ 68
2128
+ ],
2129
+ inclusive: !1
2130
+ },
2131
+ system_ext_db: {
2132
+ rules: [
2133
+ 65,
2134
+ 66,
2135
+ 67,
2136
+ 68
2137
+ ],
2138
+ inclusive: !1
2139
+ },
2140
+ system_ext: {
2141
+ rules: [
2142
+ 65,
2143
+ 66,
2144
+ 67,
2145
+ 68
2146
+ ],
2147
+ inclusive: !1
2148
+ },
2149
+ system_queue: {
2150
+ rules: [
2151
+ 65,
2152
+ 66,
2153
+ 67,
2154
+ 68
2155
+ ],
2156
+ inclusive: !1
2157
+ },
2158
+ system_db: {
2159
+ rules: [
2160
+ 65,
2161
+ 66,
2162
+ 67,
2163
+ 68
2164
+ ],
2165
+ inclusive: !1
2166
+ },
2167
+ system: {
2168
+ rules: [
2169
+ 65,
2170
+ 66,
2171
+ 67,
2172
+ 68
2173
+ ],
2174
+ inclusive: !1
2175
+ },
2176
+ person_ext: {
2177
+ rules: [
2178
+ 65,
2179
+ 66,
2180
+ 67,
2181
+ 68
2182
+ ],
2183
+ inclusive: !1
2184
+ },
2185
+ person: {
2186
+ rules: [
2187
+ 65,
2188
+ 66,
2189
+ 67,
2190
+ 68
2191
+ ],
2192
+ inclusive: !1
2193
+ },
2194
+ INITIAL: {
2195
+ rules: [
2196
+ 0,
2197
+ 1,
2198
+ 2,
2199
+ 3,
2200
+ 4,
2201
+ 5,
2202
+ 6,
2203
+ 8,
2204
+ 10,
2205
+ 13,
2206
+ 14,
2207
+ 15,
2208
+ 16,
2209
+ 17,
2210
+ 18,
2211
+ 19,
2212
+ 20,
2213
+ 21,
2214
+ 22,
2215
+ 23,
2216
+ 24,
2217
+ 25,
2218
+ 26,
2219
+ 27,
2220
+ 28,
2221
+ 29,
2222
+ 30,
2223
+ 31,
2224
+ 32,
2225
+ 33,
2226
+ 34,
2227
+ 35,
2228
+ 36,
2229
+ 37,
2230
+ 38,
2231
+ 39,
2232
+ 40,
2233
+ 41,
2234
+ 42,
2235
+ 43,
2236
+ 44,
2237
+ 45,
2238
+ 46,
2239
+ 47,
2240
+ 48,
2241
+ 49,
2242
+ 50,
2243
+ 51,
2244
+ 52,
2245
+ 53,
2246
+ 54,
2247
+ 55,
2248
+ 56,
2249
+ 57,
2250
+ 58,
2251
+ 59,
2252
+ 60,
2253
+ 61,
2254
+ 62,
2255
+ 63,
2256
+ 64,
2257
+ 81,
2258
+ 82,
2259
+ 83,
2260
+ 84,
2261
+ 85
2262
+ ],
2263
+ inclusive: !0
2264
+ }
2265
+ }
2266
+ };
2267
+ })();
2268
+ function He() {
2269
+ this.yy = {};
2270
+ }
2271
+ return __name(He, "Parser"), He.prototype = Ve, Ve.Parser = He, new He();
2272
+ })();
2273
+ parser.parser = parser;
2274
+ var c4Diagram_default = parser, c4ShapeArray = [], boundaryParseStack = [""], currentBoundaryParse = "global", parentBoundaryParse = "", boundaries = [{
2275
+ alias: "global",
2276
+ label: { text: "global" },
2277
+ type: { text: "global" },
2278
+ tags: null,
2279
+ link: null,
2280
+ parentBoundary: ""
2281
+ }], rels = [], title = "", wrapEnabled = !1, c4ShapeInRow = 4, c4BoundaryInRow = 2, c4Type, getC4Type = /* @__PURE__ */ __name(function() {
2282
+ return c4Type;
2283
+ }, "getC4Type"), setC4Type = /* @__PURE__ */ __name(function(e) {
2284
+ c4Type = sanitizeText(e, getConfig2());
2285
+ }, "setC4Type"), addRel = /* @__PURE__ */ __name(function(e, t, n, r, i, a, o, s, l) {
2286
+ if (e == null || t == null || n == null || r == null) return;
2287
+ let u = {}, d = rels.find((e) => e.from === t && e.to === n);
2288
+ if (d ? u = d : rels.push(u), u.type = e, u.from = t, u.to = n, u.label = { text: r }, i == null) u.techn = { text: "" };
2289
+ else if (typeof i == "object") {
2290
+ let [e, t] = Object.entries(i)[0];
2291
+ u[e] = { text: t };
2292
+ } else u.techn = { text: i };
2293
+ if (a == null) u.descr = { text: "" };
2294
+ else if (typeof a == "object") {
2295
+ let [e, t] = Object.entries(a)[0];
2296
+ u[e] = { text: t };
2297
+ } else u.descr = { text: a };
2298
+ if (typeof o == "object") {
2299
+ let [e, t] = Object.entries(o)[0];
2300
+ u[e] = t;
2301
+ } else u.sprite = o;
2302
+ if (typeof s == "object") {
2303
+ let [e, t] = Object.entries(s)[0];
2304
+ u[e] = t;
2305
+ } else u.tags = s;
2306
+ if (typeof l == "object") {
2307
+ let [e, t] = Object.entries(l)[0];
2308
+ u[e] = t;
2309
+ } else u.link = l;
2310
+ u.wrap = autoWrap();
2311
+ }, "addRel"), addPersonOrSystem = /* @__PURE__ */ __name(function(e, t, n, r, i, a, o) {
2312
+ if (t === null || n === null) return;
2313
+ let s = {}, l = c4ShapeArray.find((e) => e.alias === t);
2314
+ if (l && t === l.alias ? s = l : (s.alias = t, c4ShapeArray.push(s)), n == null ? s.label = { text: "" } : s.label = { text: n }, r == null) s.descr = { text: "" };
2315
+ else if (typeof r == "object") {
2316
+ let [e, t] = Object.entries(r)[0];
2317
+ s[e] = { text: t };
2318
+ } else s.descr = { text: r };
2319
+ if (typeof i == "object") {
2320
+ let [e, t] = Object.entries(i)[0];
2321
+ s[e] = t;
2322
+ } else s.sprite = i;
2323
+ if (typeof a == "object") {
2324
+ let [e, t] = Object.entries(a)[0];
2325
+ s[e] = t;
2326
+ } else s.tags = a;
2327
+ if (typeof o == "object") {
2328
+ let [e, t] = Object.entries(o)[0];
2329
+ s[e] = t;
2330
+ } else s.link = o;
2331
+ s.typeC4Shape = { text: e }, s.parentBoundary = currentBoundaryParse, s.wrap = autoWrap();
2332
+ }, "addPersonOrSystem"), addContainer = /* @__PURE__ */ __name(function(e, t, n, r, i, a, o, s) {
2333
+ if (t === null || n === null) return;
2334
+ let l = {}, u = c4ShapeArray.find((e) => e.alias === t);
2335
+ if (u && t === u.alias ? l = u : (l.alias = t, c4ShapeArray.push(l)), n == null ? l.label = { text: "" } : l.label = { text: n }, r == null) l.techn = { text: "" };
2336
+ else if (typeof r == "object") {
2337
+ let [e, t] = Object.entries(r)[0];
2338
+ l[e] = { text: t };
2339
+ } else l.techn = { text: r };
2340
+ if (i == null) l.descr = { text: "" };
2341
+ else if (typeof i == "object") {
2342
+ let [e, t] = Object.entries(i)[0];
2343
+ l[e] = { text: t };
2344
+ } else l.descr = { text: i };
2345
+ if (typeof a == "object") {
2346
+ let [e, t] = Object.entries(a)[0];
2347
+ l[e] = t;
2348
+ } else l.sprite = a;
2349
+ if (typeof o == "object") {
2350
+ let [e, t] = Object.entries(o)[0];
2351
+ l[e] = t;
2352
+ } else l.tags = o;
2353
+ if (typeof s == "object") {
2354
+ let [e, t] = Object.entries(s)[0];
2355
+ l[e] = t;
2356
+ } else l.link = s;
2357
+ l.wrap = autoWrap(), l.typeC4Shape = { text: e }, l.parentBoundary = currentBoundaryParse;
2358
+ }, "addContainer"), addComponent = /* @__PURE__ */ __name(function(e, t, n, r, i, a, o, s) {
2359
+ if (t === null || n === null) return;
2360
+ let l = {}, u = c4ShapeArray.find((e) => e.alias === t);
2361
+ if (u && t === u.alias ? l = u : (l.alias = t, c4ShapeArray.push(l)), n == null ? l.label = { text: "" } : l.label = { text: n }, r == null) l.techn = { text: "" };
2362
+ else if (typeof r == "object") {
2363
+ let [e, t] = Object.entries(r)[0];
2364
+ l[e] = { text: t };
2365
+ } else l.techn = { text: r };
2366
+ if (i == null) l.descr = { text: "" };
2367
+ else if (typeof i == "object") {
2368
+ let [e, t] = Object.entries(i)[0];
2369
+ l[e] = { text: t };
2370
+ } else l.descr = { text: i };
2371
+ if (typeof a == "object") {
2372
+ let [e, t] = Object.entries(a)[0];
2373
+ l[e] = t;
2374
+ } else l.sprite = a;
2375
+ if (typeof o == "object") {
2376
+ let [e, t] = Object.entries(o)[0];
2377
+ l[e] = t;
2378
+ } else l.tags = o;
2379
+ if (typeof s == "object") {
2380
+ let [e, t] = Object.entries(s)[0];
2381
+ l[e] = t;
2382
+ } else l.link = s;
2383
+ l.wrap = autoWrap(), l.typeC4Shape = { text: e }, l.parentBoundary = currentBoundaryParse;
2384
+ }, "addComponent"), addPersonOrSystemBoundary = /* @__PURE__ */ __name(function(e, t, n, r, i) {
2385
+ if (e === null || t === null) return;
2386
+ let a = {}, o = boundaries.find((t) => t.alias === e);
2387
+ if (o && e === o.alias ? a = o : (a.alias = e, boundaries.push(a)), t == null ? a.label = { text: "" } : a.label = { text: t }, n == null) a.type = { text: "system" };
2388
+ else if (typeof n == "object") {
2389
+ let [e, t] = Object.entries(n)[0];
2390
+ a[e] = { text: t };
2391
+ } else a.type = { text: n };
2392
+ if (typeof r == "object") {
2393
+ let [e, t] = Object.entries(r)[0];
2394
+ a[e] = t;
2395
+ } else a.tags = r;
2396
+ if (typeof i == "object") {
2397
+ let [e, t] = Object.entries(i)[0];
2398
+ a[e] = t;
2399
+ } else a.link = i;
2400
+ a.parentBoundary = currentBoundaryParse, a.wrap = autoWrap(), parentBoundaryParse = currentBoundaryParse, currentBoundaryParse = e, boundaryParseStack.push(parentBoundaryParse);
2401
+ }, "addPersonOrSystemBoundary"), addContainerBoundary = /* @__PURE__ */ __name(function(e, t, n, r, i) {
2402
+ if (e === null || t === null) return;
2403
+ let a = {}, o = boundaries.find((t) => t.alias === e);
2404
+ if (o && e === o.alias ? a = o : (a.alias = e, boundaries.push(a)), t == null ? a.label = { text: "" } : a.label = { text: t }, n == null) a.type = { text: "container" };
2405
+ else if (typeof n == "object") {
2406
+ let [e, t] = Object.entries(n)[0];
2407
+ a[e] = { text: t };
2408
+ } else a.type = { text: n };
2409
+ if (typeof r == "object") {
2410
+ let [e, t] = Object.entries(r)[0];
2411
+ a[e] = t;
2412
+ } else a.tags = r;
2413
+ if (typeof i == "object") {
2414
+ let [e, t] = Object.entries(i)[0];
2415
+ a[e] = t;
2416
+ } else a.link = i;
2417
+ a.parentBoundary = currentBoundaryParse, a.wrap = autoWrap(), parentBoundaryParse = currentBoundaryParse, currentBoundaryParse = e, boundaryParseStack.push(parentBoundaryParse);
2418
+ }, "addContainerBoundary"), addDeploymentNode = /* @__PURE__ */ __name(function(e, t, n, r, i, a, o, s) {
2419
+ if (t === null || n === null) return;
2420
+ let l = {}, u = boundaries.find((e) => e.alias === t);
2421
+ if (u && t === u.alias ? l = u : (l.alias = t, boundaries.push(l)), n == null ? l.label = { text: "" } : l.label = { text: n }, r == null) l.type = { text: "node" };
2422
+ else if (typeof r == "object") {
2423
+ let [e, t] = Object.entries(r)[0];
2424
+ l[e] = { text: t };
2425
+ } else l.type = { text: r };
2426
+ if (i == null) l.descr = { text: "" };
2427
+ else if (typeof i == "object") {
2428
+ let [e, t] = Object.entries(i)[0];
2429
+ l[e] = { text: t };
2430
+ } else l.descr = { text: i };
2431
+ if (typeof o == "object") {
2432
+ let [e, t] = Object.entries(o)[0];
2433
+ l[e] = t;
2434
+ } else l.tags = o;
2435
+ if (typeof s == "object") {
2436
+ let [e, t] = Object.entries(s)[0];
2437
+ l[e] = t;
2438
+ } else l.link = s;
2439
+ l.nodeType = e, l.parentBoundary = currentBoundaryParse, l.wrap = autoWrap(), parentBoundaryParse = currentBoundaryParse, currentBoundaryParse = t, boundaryParseStack.push(parentBoundaryParse);
2440
+ }, "addDeploymentNode"), popBoundaryParseStack = /* @__PURE__ */ __name(function() {
2441
+ currentBoundaryParse = parentBoundaryParse, boundaryParseStack.pop(), parentBoundaryParse = boundaryParseStack.pop(), boundaryParseStack.push(parentBoundaryParse);
2442
+ }, "popBoundaryParseStack"), updateElStyle = /* @__PURE__ */ __name(function(e, t, n, r, i, a, o, s, l, u, d) {
2443
+ let f = c4ShapeArray.find((e) => e.alias === t);
2444
+ if (!(f === void 0 && (f = boundaries.find((e) => e.alias === t), f === void 0))) {
2445
+ if (n != null) if (typeof n == "object") {
2446
+ let [e, t] = Object.entries(n)[0];
2447
+ f[e] = t;
2448
+ } else f.bgColor = n;
2449
+ if (r != null) if (typeof r == "object") {
2450
+ let [e, t] = Object.entries(r)[0];
2451
+ f[e] = t;
2452
+ } else f.fontColor = r;
2453
+ if (i != null) if (typeof i == "object") {
2454
+ let [e, t] = Object.entries(i)[0];
2455
+ f[e] = t;
2456
+ } else f.borderColor = i;
2457
+ if (a != null) if (typeof a == "object") {
2458
+ let [e, t] = Object.entries(a)[0];
2459
+ f[e] = t;
2460
+ } else f.shadowing = a;
2461
+ if (o != null) if (typeof o == "object") {
2462
+ let [e, t] = Object.entries(o)[0];
2463
+ f[e] = t;
2464
+ } else f.shape = o;
2465
+ if (s != null) if (typeof s == "object") {
2466
+ let [e, t] = Object.entries(s)[0];
2467
+ f[e] = t;
2468
+ } else f.sprite = s;
2469
+ if (l != null) if (typeof l == "object") {
2470
+ let [e, t] = Object.entries(l)[0];
2471
+ f[e] = t;
2472
+ } else f.techn = l;
2473
+ if (u != null) if (typeof u == "object") {
2474
+ let [e, t] = Object.entries(u)[0];
2475
+ f[e] = t;
2476
+ } else f.legendText = u;
2477
+ if (d != null) if (typeof d == "object") {
2478
+ let [e, t] = Object.entries(d)[0];
2479
+ f[e] = t;
2480
+ } else f.legendSprite = d;
2481
+ }
2482
+ }, "updateElStyle"), updateRelStyle = /* @__PURE__ */ __name(function(e, t, n, r, i, a, o) {
2483
+ let s = rels.find((e) => e.from === t && e.to === n);
2484
+ if (s !== void 0) {
2485
+ if (r != null) if (typeof r == "object") {
2486
+ let [e, t] = Object.entries(r)[0];
2487
+ s[e] = t;
2488
+ } else s.textColor = r;
2489
+ if (i != null) if (typeof i == "object") {
2490
+ let [e, t] = Object.entries(i)[0];
2491
+ s[e] = t;
2492
+ } else s.lineColor = i;
2493
+ if (a != null) if (typeof a == "object") {
2494
+ let [e, t] = Object.entries(a)[0];
2495
+ s[e] = parseInt(t);
2496
+ } else s.offsetX = parseInt(a);
2497
+ if (o != null) if (typeof o == "object") {
2498
+ let [e, t] = Object.entries(o)[0];
2499
+ s[e] = parseInt(t);
2500
+ } else s.offsetY = parseInt(o);
2501
+ }
2502
+ }, "updateRelStyle"), updateLayoutConfig = /* @__PURE__ */ __name(function(e, t, n) {
2503
+ let r = c4ShapeInRow, i = c4BoundaryInRow;
2504
+ if (typeof t == "object") {
2505
+ let e = Object.values(t)[0];
2506
+ r = parseInt(e);
2507
+ } else r = parseInt(t);
2508
+ if (typeof n == "object") {
2509
+ let e = Object.values(n)[0];
2510
+ i = parseInt(e);
2511
+ } else i = parseInt(n);
2512
+ r >= 1 && (c4ShapeInRow = r), i >= 1 && (c4BoundaryInRow = i);
2513
+ }, "updateLayoutConfig"), getC4ShapeInRow = /* @__PURE__ */ __name(function() {
2514
+ return c4ShapeInRow;
2515
+ }, "getC4ShapeInRow"), getC4BoundaryInRow = /* @__PURE__ */ __name(function() {
2516
+ return c4BoundaryInRow;
2517
+ }, "getC4BoundaryInRow"), getCurrentBoundaryParse = /* @__PURE__ */ __name(function() {
2518
+ return currentBoundaryParse;
2519
+ }, "getCurrentBoundaryParse"), getParentBoundaryParse = /* @__PURE__ */ __name(function() {
2520
+ return parentBoundaryParse;
2521
+ }, "getParentBoundaryParse"), getC4ShapeArray = /* @__PURE__ */ __name(function(e) {
2522
+ return e == null ? c4ShapeArray : c4ShapeArray.filter((t) => t.parentBoundary === e);
2523
+ }, "getC4ShapeArray"), getC4Shape = /* @__PURE__ */ __name(function(e) {
2524
+ return c4ShapeArray.find((t) => t.alias === e);
2525
+ }, "getC4Shape"), getC4ShapeKeys = /* @__PURE__ */ __name(function(e) {
2526
+ return Object.keys(getC4ShapeArray(e));
2527
+ }, "getC4ShapeKeys"), getBoundaries = /* @__PURE__ */ __name(function(e) {
2528
+ return e == null ? boundaries : boundaries.filter((t) => t.parentBoundary === e);
2529
+ }, "getBoundaries"), getBoundarys = getBoundaries, getRels = /* @__PURE__ */ __name(function() {
2530
+ return rels;
2531
+ }, "getRels"), getTitle = /* @__PURE__ */ __name(function() {
2532
+ return title;
2533
+ }, "getTitle"), setWrap = /* @__PURE__ */ __name(function(e) {
2534
+ wrapEnabled = e;
2535
+ }, "setWrap"), autoWrap = /* @__PURE__ */ __name(function() {
2536
+ return wrapEnabled;
2537
+ }, "autoWrap"), c4Db_default = {
2538
+ addPersonOrSystem,
2539
+ addPersonOrSystemBoundary,
2540
+ addContainer,
2541
+ addContainerBoundary,
2542
+ addComponent,
2543
+ addDeploymentNode,
2544
+ popBoundaryParseStack,
2545
+ addRel,
2546
+ updateElStyle,
2547
+ updateRelStyle,
2548
+ updateLayoutConfig,
2549
+ autoWrap,
2550
+ setWrap,
2551
+ getC4ShapeArray,
2552
+ getC4Shape,
2553
+ getC4ShapeKeys,
2554
+ getBoundaries,
2555
+ getBoundarys,
2556
+ getCurrentBoundaryParse,
2557
+ getParentBoundaryParse,
2558
+ getRels,
2559
+ getTitle,
2560
+ getC4Type,
2561
+ getC4ShapeInRow,
2562
+ getC4BoundaryInRow,
2563
+ setAccTitle,
2564
+ getAccTitle,
2565
+ getAccDescription,
2566
+ setAccDescription,
2567
+ getConfig: /* @__PURE__ */ __name(() => getConfig2().c4, "getConfig"),
2568
+ clear: /* @__PURE__ */ __name(function() {
2569
+ c4ShapeArray = [], boundaries = [{
2570
+ alias: "global",
2571
+ label: { text: "global" },
2572
+ type: { text: "global" },
2573
+ tags: null,
2574
+ link: null,
2575
+ parentBoundary: ""
2576
+ }], parentBoundaryParse = "", currentBoundaryParse = "global", boundaryParseStack = [""], rels = [], boundaryParseStack = [""], title = "", wrapEnabled = !1, c4ShapeInRow = 4, c4BoundaryInRow = 2;
2577
+ }, "clear"),
2578
+ LINETYPE: {
2579
+ SOLID: 0,
2580
+ DOTTED: 1,
2581
+ NOTE: 2,
2582
+ SOLID_CROSS: 3,
2583
+ DOTTED_CROSS: 4,
2584
+ SOLID_OPEN: 5,
2585
+ DOTTED_OPEN: 6,
2586
+ LOOP_START: 10,
2587
+ LOOP_END: 11,
2588
+ ALT_START: 12,
2589
+ ALT_ELSE: 13,
2590
+ ALT_END: 14,
2591
+ OPT_START: 15,
2592
+ OPT_END: 16,
2593
+ ACTIVE_START: 17,
2594
+ ACTIVE_END: 18,
2595
+ PAR_START: 19,
2596
+ PAR_AND: 20,
2597
+ PAR_END: 21,
2598
+ RECT_START: 22,
2599
+ RECT_END: 23,
2600
+ SOLID_POINT: 24,
2601
+ DOTTED_POINT: 25
2602
+ },
2603
+ ARROWTYPE: {
2604
+ FILLED: 0,
2605
+ OPEN: 1
2606
+ },
2607
+ PLACEMENT: {
2608
+ LEFTOF: 0,
2609
+ RIGHTOF: 1,
2610
+ OVER: 2
2611
+ },
2612
+ setTitle: /* @__PURE__ */ __name(function(e) {
2613
+ title = sanitizeText(e, getConfig2());
2614
+ }, "setTitle"),
2615
+ setC4Type
2616
+ }, drawRect2 = /* @__PURE__ */ __name(function(e, t) {
2617
+ return drawRect(e, t);
2618
+ }, "drawRect"), drawImage = /* @__PURE__ */ __name(function(e, t, n, r, i, a) {
2619
+ let o = e.append("image");
2620
+ o.attr("width", t), o.attr("height", n), o.attr("x", r), o.attr("y", i);
2621
+ let s = a.startsWith("data:image/png;base64") ? a : (0, import_dist.sanitizeUrl)(a);
2622
+ o.attr("xlink:href", s);
2623
+ }, "drawImage"), drawRels = /* @__PURE__ */ __name((e, t, n) => {
2624
+ let r = e.append("g"), i = 0;
2625
+ for (let e of t) {
2626
+ let t = e.textColor ? e.textColor : "#444444", a = e.lineColor ? e.lineColor : "#444444", o = e.offsetX ? parseInt(e.offsetX) : 0, s = e.offsetY ? parseInt(e.offsetY) : 0;
2627
+ if (i === 0) {
2628
+ let t = r.append("line");
2629
+ t.attr("x1", e.startPoint.x), t.attr("y1", e.startPoint.y), t.attr("x2", e.endPoint.x), t.attr("y2", e.endPoint.y), t.attr("stroke-width", "1"), t.attr("stroke", a), t.style("fill", "none"), e.type !== "rel_b" && t.attr("marker-end", "url(#arrowhead)"), (e.type === "birel" || e.type === "rel_b") && t.attr("marker-start", "url(#arrowend)"), i = -1;
2630
+ } else {
2631
+ let t = r.append("path");
2632
+ t.attr("fill", "none").attr("stroke-width", "1").attr("stroke", a).attr("d", "Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx", e.startPoint.x).replaceAll("starty", e.startPoint.y).replaceAll("controlx", e.startPoint.x + (e.endPoint.x - e.startPoint.x) / 2 - (e.endPoint.x - e.startPoint.x) / 4).replaceAll("controly", e.startPoint.y + (e.endPoint.y - e.startPoint.y) / 2).replaceAll("stopx", e.endPoint.x).replaceAll("stopy", e.endPoint.y)), e.type !== "rel_b" && t.attr("marker-end", "url(#arrowhead)"), (e.type === "birel" || e.type === "rel_b") && t.attr("marker-start", "url(#arrowend)");
2633
+ }
2634
+ let l = n.messageFont();
2635
+ _drawTextCandidateFunc(n)(e.label.text, r, Math.min(e.startPoint.x, e.endPoint.x) + Math.abs(e.endPoint.x - e.startPoint.x) / 2 + o, Math.min(e.startPoint.y, e.endPoint.y) + Math.abs(e.endPoint.y - e.startPoint.y) / 2 + s, e.label.width, e.label.height, { fill: t }, l), e.techn && e.techn.text !== "" && (l = n.messageFont(), _drawTextCandidateFunc(n)("[" + e.techn.text + "]", r, Math.min(e.startPoint.x, e.endPoint.x) + Math.abs(e.endPoint.x - e.startPoint.x) / 2 + o, Math.min(e.startPoint.y, e.endPoint.y) + Math.abs(e.endPoint.y - e.startPoint.y) / 2 + n.messageFontSize + 5 + s, Math.max(e.label.width, e.techn.width), e.techn.height, {
2636
+ fill: t,
2637
+ "font-style": "italic"
2638
+ }, l));
2639
+ }
2640
+ }, "drawRels"), drawBoundary = /* @__PURE__ */ __name(function(e, t, n) {
2641
+ let r = e.append("g"), i = t.bgColor ? t.bgColor : "none", a = t.borderColor ? t.borderColor : "#444444", o = t.fontColor ? t.fontColor : "black", s = {
2642
+ "stroke-width": 1,
2643
+ "stroke-dasharray": "7.0,7.0"
2644
+ };
2645
+ t.nodeType && (s = { "stroke-width": 1 }), drawRect2(r, {
2646
+ x: t.x,
2647
+ y: t.y,
2648
+ fill: i,
2649
+ stroke: a,
2650
+ width: t.width,
2651
+ height: t.height,
2652
+ rx: 2.5,
2653
+ ry: 2.5,
2654
+ attrs: s
2655
+ });
2656
+ let l = n.boundaryFont();
2657
+ l.fontWeight = "bold", l.fontSize += 2, l.fontColor = o, _drawTextCandidateFunc(n)(t.label.text, r, t.x, t.y + t.label.Y, t.width, t.height, { fill: "#444444" }, l), t.type && t.type.text !== "" && (l = n.boundaryFont(), l.fontColor = o, _drawTextCandidateFunc(n)(t.type.text, r, t.x, t.y + t.type.Y, t.width, t.height, { fill: "#444444" }, l)), t.descr && t.descr.text !== "" && (l = n.boundaryFont(), l.fontSize -= 2, l.fontColor = o, _drawTextCandidateFunc(n)(t.descr.text, r, t.x, t.y + t.descr.Y, t.width, t.height, { fill: "#444444" }, l));
2658
+ }, "drawBoundary"), drawC4Shape = /* @__PURE__ */ __name(function(e, t, n) {
2659
+ let r = t.bgColor ? t.bgColor : n[t.typeC4Shape.text + "_bg_color"], i = t.borderColor ? t.borderColor : n[t.typeC4Shape.text + "_border_color"], a = t.fontColor ? t.fontColor : "#FFFFFF", o = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";
2660
+ switch (t.typeC4Shape.text) {
2661
+ case "person":
2662
+ o = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";
2663
+ break;
2664
+ case "external_person":
2665
+ o = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";
2666
+ break;
2667
+ }
2668
+ let s = e.append("g");
2669
+ s.attr("class", "person-man");
2670
+ let l = getNoteRect();
2671
+ switch (t.typeC4Shape.text) {
2672
+ case "person":
2673
+ case "external_person":
2674
+ case "system":
2675
+ case "external_system":
2676
+ case "container":
2677
+ case "external_container":
2678
+ case "component":
2679
+ case "external_component":
2680
+ l.x = t.x, l.y = t.y, l.fill = r, l.width = t.width, l.height = t.height, l.stroke = i, l.rx = 2.5, l.ry = 2.5, l.attrs = { "stroke-width": .5 }, drawRect2(s, l);
2681
+ break;
2682
+ case "system_db":
2683
+ case "external_system_db":
2684
+ case "container_db":
2685
+ case "external_container_db":
2686
+ case "component_db":
2687
+ case "external_component_db":
2688
+ s.append("path").attr("fill", r).attr("stroke-width", "0.5").attr("stroke", i).attr("d", "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)), s.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", i).attr("d", "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));
2689
+ break;
2690
+ case "system_queue":
2691
+ case "external_system_queue":
2692
+ case "container_queue":
2693
+ case "external_container_queue":
2694
+ case "component_queue":
2695
+ case "external_component_queue":
2696
+ s.append("path").attr("fill", r).attr("stroke-width", "0.5").attr("stroke", i).attr("d", "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)), s.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", i).attr("d", "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));
2697
+ break;
2698
+ }
2699
+ let u = getC4ShapeFont(n, t.typeC4Shape.text);
2700
+ switch (s.append("text").attr("fill", a).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) {
2701
+ case "person":
2702
+ case "external_person":
2703
+ drawImage(s, 48, 48, t.x + t.width / 2 - 24, t.y + t.image.Y, o);
2704
+ break;
2705
+ }
2706
+ let d = n[t.typeC4Shape.text + "Font"]();
2707
+ return d.fontWeight = "bold", d.fontSize += 2, d.fontColor = a, _drawTextCandidateFunc(n)(t.label.text, s, t.x, t.y + t.label.Y, t.width, t.height, { fill: a }, d), d = n[t.typeC4Shape.text + "Font"](), d.fontColor = a, t.techn && t.techn?.text !== "" ? _drawTextCandidateFunc(n)(t.techn.text, s, t.x, t.y + t.techn.Y, t.width, t.height, {
2708
+ fill: a,
2709
+ "font-style": "italic"
2710
+ }, d) : t.type && t.type.text !== "" && _drawTextCandidateFunc(n)(t.type.text, s, t.x, t.y + t.type.Y, t.width, t.height, {
2711
+ fill: a,
2712
+ "font-style": "italic"
2713
+ }, d), t.descr && t.descr.text !== "" && (d = n.personFont(), d.fontColor = a, _drawTextCandidateFunc(n)(t.descr.text, s, t.x, t.y + t.descr.Y, t.width, t.height, { fill: a }, d)), t.height;
2714
+ }, "drawC4Shape"), insertDatabaseIcon = /* @__PURE__ */ __name(function(e) {
2715
+ e.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr("d", "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");
2716
+ }, "insertDatabaseIcon"), insertComputerIcon = /* @__PURE__ */ __name(function(e) {
2717
+ e.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr("d", "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");
2718
+ }, "insertComputerIcon"), insertClockIcon = /* @__PURE__ */ __name(function(e) {
2719
+ e.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr("d", "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");
2720
+ }, "insertClockIcon"), insertArrowHead = /* @__PURE__ */ __name(function(e) {
2721
+ 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");
2722
+ }, "insertArrowHead"), insertArrowEnd = /* @__PURE__ */ __name(function(e) {
2723
+ 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");
2724
+ }, "insertArrowEnd"), insertArrowFilledHead = /* @__PURE__ */ __name(function(e) {
2725
+ 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");
2726
+ }, "insertArrowFilledHead"), insertDynamicNumber = /* @__PURE__ */ __name(function(e) {
2727
+ 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);
2728
+ }, "insertDynamicNumber"), insertArrowCrossHead = /* @__PURE__ */ __name(function(e) {
2729
+ let t = e.append("defs").append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 16).attr("refY", 4);
2730
+ 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");
2731
+ }, "insertArrowCrossHead"), getC4ShapeFont = /* @__PURE__ */ __name((e, t) => ({
2732
+ fontFamily: e[t + "FontFamily"],
2733
+ fontSize: e[t + "FontSize"],
2734
+ fontWeight: e[t + "FontWeight"]
2735
+ }), "getC4ShapeFont"), _drawTextCandidateFunc = /* @__PURE__ */ (function() {
2736
+ function e(e, t, n, i, a, o, s) {
2737
+ r(t.append("text").attr("x", n + a / 2).attr("y", i + o / 2 + 5).style("text-anchor", "middle").text(e), s);
2738
+ }
2739
+ __name(e, "byText");
2740
+ function t(e, t, n, i, a, o, s, l) {
2741
+ let { fontSize: u, fontFamily: d, fontWeight: f } = l, p = e.split(common_default.lineBreakRegex);
2742
+ for (let e = 0; e < p.length; e++) {
2743
+ let o = e * u - u * (p.length - 1) / 2, l = t.append("text").attr("x", n + a / 2).attr("y", i).style("text-anchor", "middle").attr("dominant-baseline", "middle").style("font-size", u).style("font-weight", f).style("font-family", d);
2744
+ l.append("tspan").attr("dy", o).text(p[e]).attr("alignment-baseline", "mathematical"), r(l, s);
2745
+ }
2746
+ }
2747
+ __name(t, "byTspan");
2748
+ function n(e, n, i, a, o, s, l, u) {
2749
+ let d = n.append("switch"), f = d.append("foreignObject").attr("x", i).attr("y", a).attr("width", o).attr("height", s).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
2750
+ f.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(e), t(e, d, i, a, o, s, l, u), r(f, l);
2751
+ }
2752
+ __name(n, "byFo");
2753
+ function r(e, t) {
2754
+ for (let n in t) t.hasOwnProperty(n) && e.attr(n, t[n]);
2755
+ }
2756
+ return __name(r, "_setTextAttrs"), function(r) {
2757
+ return r.textPlacement === "fo" ? n : r.textPlacement === "old" ? e : t;
2758
+ };
2759
+ })(), svgDraw_default = {
2760
+ drawRect: drawRect2,
2761
+ drawBoundary,
2762
+ drawC4Shape,
2763
+ drawRels,
2764
+ drawImage,
2765
+ insertArrowHead,
2766
+ insertArrowEnd,
2767
+ insertArrowFilledHead,
2768
+ insertDynamicNumber,
2769
+ insertArrowCrossHead,
2770
+ insertDatabaseIcon,
2771
+ insertComputerIcon,
2772
+ insertClockIcon
2773
+ }, globalBoundaryMaxX = 0, globalBoundaryMaxY = 0, c4ShapeInRow2 = 4, c4BoundaryInRow2 = 2;
2774
+ parser.yy = c4Db_default;
2775
+ var conf = {}, Bounds = class {
2776
+ static #_ = __name(this, "Bounds");
2777
+ constructor(e) {
2778
+ 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, setConf(e.db.getConfig());
2779
+ }
2780
+ setData(e, t, n, r) {
2781
+ this.nextData.startx = this.data.startx = e, this.nextData.stopx = this.data.stopx = t, this.nextData.starty = this.data.starty = n, this.nextData.stopy = this.data.stopy = r;
2782
+ }
2783
+ updateVal(e, t, n, r) {
2784
+ e[t] === void 0 ? e[t] = n : e[t] = r(n, e[t]);
2785
+ }
2786
+ insert(e) {
2787
+ this.nextData.cnt = this.nextData.cnt + 1;
2788
+ let t = this.nextData.startx === this.nextData.stopx ? this.nextData.stopx + e.margin : this.nextData.stopx + e.margin * 2, n = t + e.width, r = this.nextData.starty + e.margin * 2, i = r + e.height;
2789
+ (t >= this.data.widthLimit || n >= this.data.widthLimit || this.nextData.cnt > c4ShapeInRow2) && (t = this.nextData.startx + e.margin + conf.nextLinePaddingX, r = this.nextData.stopy + e.margin * 2, this.nextData.stopx = n = t + e.width, this.nextData.starty = this.nextData.stopy, this.nextData.stopy = i = r + e.height, this.nextData.cnt = 1), e.x = t, e.y = r, this.updateVal(this.data, "startx", t, Math.min), this.updateVal(this.data, "starty", r, Math.min), this.updateVal(this.data, "stopx", n, Math.max), this.updateVal(this.data, "stopy", i, Math.max), this.updateVal(this.nextData, "startx", t, Math.min), this.updateVal(this.nextData, "starty", r, Math.min), this.updateVal(this.nextData, "stopx", n, Math.max), this.updateVal(this.nextData, "stopy", i, Math.max);
2790
+ }
2791
+ init(e) {
2792
+ this.name = "", this.data = {
2793
+ startx: void 0,
2794
+ stopx: void 0,
2795
+ starty: void 0,
2796
+ stopy: void 0,
2797
+ widthLimit: void 0
2798
+ }, this.nextData = {
2799
+ startx: void 0,
2800
+ stopx: void 0,
2801
+ starty: void 0,
2802
+ stopy: void 0,
2803
+ cnt: 0
2804
+ }, setConf(e.db.getConfig());
2805
+ }
2806
+ bumpLastMargin(e) {
2807
+ this.data.stopx += e, this.data.stopy += e;
2808
+ }
2809
+ }, setConf = /* @__PURE__ */ __name(function(e) {
2810
+ assignWithDepth_default(conf, e), e.fontFamily && (conf.personFontFamily = conf.systemFontFamily = conf.messageFontFamily = e.fontFamily), e.fontSize && (conf.personFontSize = conf.systemFontSize = conf.messageFontSize = e.fontSize), e.fontWeight && (conf.personFontWeight = conf.systemFontWeight = conf.messageFontWeight = e.fontWeight);
2811
+ }, "setConf"), c4ShapeFont = /* @__PURE__ */ __name((e, t) => ({
2812
+ fontFamily: e[t + "FontFamily"],
2813
+ fontSize: e[t + "FontSize"],
2814
+ fontWeight: e[t + "FontWeight"]
2815
+ }), "c4ShapeFont"), boundaryFont = /* @__PURE__ */ __name((e) => ({
2816
+ fontFamily: e.boundaryFontFamily,
2817
+ fontSize: e.boundaryFontSize,
2818
+ fontWeight: e.boundaryFontWeight
2819
+ }), "boundaryFont"), messageFont = /* @__PURE__ */ __name((e) => ({
2820
+ fontFamily: e.messageFontFamily,
2821
+ fontSize: e.messageFontSize,
2822
+ fontWeight: e.messageFontWeight
2823
+ }), "messageFont");
2824
+ function calcC4ShapeTextWH(e, i, a, o, s) {
2825
+ if (!i[e].width) if (a) i[e].text = wrapLabel(i[e].text, s, o), i[e].textLines = i[e].text.split(common_default.lineBreakRegex).length, i[e].width = s, i[e].height = calculateTextHeight(i[e].text, o);
2826
+ else {
2827
+ let t = i[e].text.split(common_default.lineBreakRegex);
2828
+ i[e].textLines = t.length;
2829
+ let a = 0;
2830
+ i[e].height = 0, i[e].width = 0;
2831
+ for (let s of t) i[e].width = Math.max(calculateTextWidth(s, o), i[e].width), a = calculateTextHeight(s, o), i[e].height = i[e].height + a;
2832
+ }
2833
+ }
2834
+ __name(calcC4ShapeTextWH, "calcC4ShapeTextWH");
2835
+ var drawBoundary2 = /* @__PURE__ */ __name(function(e, t, n) {
2836
+ t.x = n.data.startx, t.y = n.data.starty, t.width = n.data.stopx - n.data.startx, t.height = n.data.stopy - n.data.starty, t.label.y = conf.c4ShapeMargin - 35;
2837
+ let i = t.wrap && conf.wrap, a = boundaryFont(conf);
2838
+ a.fontSize += 2, a.fontWeight = "bold", calcC4ShapeTextWH("label", t, i, a, calculateTextWidth(t.label.text, a)), svgDraw_default.drawBoundary(e, t, conf);
2839
+ }, "drawBoundary"), drawC4ShapeArray = /* @__PURE__ */ __name(function(e, t, n, i) {
2840
+ let a = 0;
2841
+ for (let o of i) {
2842
+ a = 0;
2843
+ let i = n[o], s = c4ShapeFont(conf, i.typeC4Shape.text);
2844
+ switch (s.fontSize -= 2, i.typeC4Shape.width = calculateTextWidth("«" + i.typeC4Shape.text + "»", s), i.typeC4Shape.height = s.fontSize + 2, i.typeC4Shape.Y = conf.c4ShapePadding, a = i.typeC4Shape.Y + i.typeC4Shape.height - 4, i.image = {
2845
+ width: 0,
2846
+ height: 0,
2847
+ Y: 0
2848
+ }, i.typeC4Shape.text) {
2849
+ case "person":
2850
+ case "external_person":
2851
+ i.image.width = 48, i.image.height = 48, i.image.Y = a, a = i.image.Y + i.image.height;
2852
+ break;
2853
+ }
2854
+ i.sprite && (i.image.width = 48, i.image.height = 48, i.image.Y = a, a = i.image.Y + i.image.height);
2855
+ let l = i.wrap && conf.wrap, u = conf.width - conf.c4ShapePadding * 2, d = c4ShapeFont(conf, i.typeC4Shape.text);
2856
+ d.fontSize += 2, d.fontWeight = "bold", calcC4ShapeTextWH("label", i, l, d, u), i.label.Y = a + 8, a = i.label.Y + i.label.height, i.type && i.type.text !== "" ? (i.type.text = "[" + i.type.text + "]", calcC4ShapeTextWH("type", i, l, c4ShapeFont(conf, i.typeC4Shape.text), u), i.type.Y = a + 5, a = i.type.Y + i.type.height) : i.techn && i.techn.text !== "" && (i.techn.text = "[" + i.techn.text + "]", calcC4ShapeTextWH("techn", i, l, c4ShapeFont(conf, i.techn.text), u), i.techn.Y = a + 5, a = i.techn.Y + i.techn.height);
2857
+ let f = a, p = i.label.width;
2858
+ i.descr && i.descr.text !== "" && (calcC4ShapeTextWH("descr", i, l, c4ShapeFont(conf, i.typeC4Shape.text), u), i.descr.Y = a + 20, a = i.descr.Y + i.descr.height, p = Math.max(i.label.width, i.descr.width), f = a - i.descr.textLines * 5), p += conf.c4ShapePadding, i.width = Math.max(i.width || conf.width, p, conf.width), i.height = Math.max(i.height || conf.height, f, conf.height), i.margin = i.margin || conf.c4ShapeMargin, e.insert(i), svgDraw_default.drawC4Shape(t, i, conf);
2859
+ }
2860
+ e.bumpLastMargin(conf.c4ShapeMargin);
2861
+ }, "drawC4ShapeArray"), Point = class {
2862
+ static #_ = __name(this, "Point");
2863
+ constructor(e, t) {
2864
+ this.x = e, this.y = t;
2865
+ }
2866
+ }, getIntersectPoint = /* @__PURE__ */ __name(function(e, t) {
2867
+ let n = e.x, r = e.y, i = t.x, a = t.y, o = n + e.width / 2, s = r + e.height / 2, l = Math.abs(n - i), u = Math.abs(r - a), d = u / l, f = e.height / e.width, p = null;
2868
+ return r == a && n < i ? p = new Point(n + e.width, s) : r == a && n > i ? p = new Point(n, s) : n == i && r < a ? p = new Point(o, r + e.height) : n == i && r > a && (p = new Point(o, r)), n > i && r < a ? p = f >= d ? new Point(n, s + d * e.width / 2) : new Point(o - l / u * e.height / 2, r + e.height) : n < i && r < a ? p = f >= d ? new Point(n + e.width, s + d * e.width / 2) : new Point(o + l / u * e.height / 2, r + e.height) : n < i && r > a ? p = f >= d ? new Point(n + e.width, s - d * e.width / 2) : new Point(o + e.height / 2 * l / u, r) : n > i && r > a && (p = f >= d ? new Point(n, s - e.width / 2 * d) : new Point(o - e.height / 2 * l / u, r)), p;
2869
+ }, "getIntersectPoint"), getIntersectPoints = /* @__PURE__ */ __name(function(e, t) {
2870
+ let n = {
2871
+ x: 0,
2872
+ y: 0
2873
+ };
2874
+ n.x = t.x + t.width / 2, n.y = t.y + t.height / 2;
2875
+ let r = getIntersectPoint(e, n);
2876
+ return n.x = e.x + e.width / 2, n.y = e.y + e.height / 2, {
2877
+ startPoint: r,
2878
+ endPoint: getIntersectPoint(t, n)
2879
+ };
2880
+ }, "getIntersectPoints"), drawRels2 = /* @__PURE__ */ __name(function(e, t, n, i) {
2881
+ let a = 0;
2882
+ for (let e of t) {
2883
+ a += 1;
2884
+ let t = e.wrap && conf.wrap, o = messageFont(conf);
2885
+ i.db.getC4Type() === "C4Dynamic" && (e.label.text = a + ": " + e.label.text);
2886
+ let s = calculateTextWidth(e.label.text, o);
2887
+ calcC4ShapeTextWH("label", e, t, o, s), e.techn && e.techn.text !== "" && (s = calculateTextWidth(e.techn.text, o), calcC4ShapeTextWH("techn", e, t, o, s)), e.descr && e.descr.text !== "" && (s = calculateTextWidth(e.descr.text, o), calcC4ShapeTextWH("descr", e, t, o, s));
2888
+ let l = getIntersectPoints(n(e.from), n(e.to));
2889
+ e.startPoint = l.startPoint, e.endPoint = l.endPoint;
2890
+ }
2891
+ svgDraw_default.drawRels(e, t, conf);
2892
+ }, "drawRels");
2893
+ function drawInsideBoundary(e, t, n, r, i) {
2894
+ let a = new Bounds(i);
2895
+ a.data.widthLimit = n.data.widthLimit / Math.min(c4BoundaryInRow2, r.length);
2896
+ for (let [o, s] of r.entries()) {
2897
+ let r = 0;
2898
+ s.image = {
2899
+ width: 0,
2900
+ height: 0,
2901
+ Y: 0
2902
+ }, s.sprite && (s.image.width = 48, s.image.height = 48, s.image.Y = r, r = s.image.Y + s.image.height);
2903
+ let l = s.wrap && conf.wrap, u = boundaryFont(conf);
2904
+ if (u.fontSize += 2, u.fontWeight = "bold", calcC4ShapeTextWH("label", s, l, u, a.data.widthLimit), s.label.Y = r + 8, r = s.label.Y + s.label.height, s.type && s.type.text !== "" && (s.type.text = "[" + s.type.text + "]", calcC4ShapeTextWH("type", s, l, boundaryFont(conf), a.data.widthLimit), s.type.Y = r + 5, r = s.type.Y + s.type.height), s.descr && s.descr.text !== "") {
2905
+ let e = boundaryFont(conf);
2906
+ e.fontSize -= 2, calcC4ShapeTextWH("descr", s, l, e, a.data.widthLimit), s.descr.Y = r + 20, r = s.descr.Y + s.descr.height;
2907
+ }
2908
+ if (o == 0 || o % c4BoundaryInRow2 === 0) {
2909
+ let e = n.data.startx + conf.diagramMarginX, t = n.data.stopy + conf.diagramMarginY + r;
2910
+ a.setData(e, e, t, t);
2911
+ } else {
2912
+ let e = a.data.stopx === a.data.startx ? a.data.startx : a.data.stopx + conf.diagramMarginX, t = a.data.starty;
2913
+ a.setData(e, e, t, t);
2914
+ }
2915
+ a.name = s.alias;
2916
+ let d = i.db.getC4ShapeArray(s.alias), f = i.db.getC4ShapeKeys(s.alias);
2917
+ f.length > 0 && drawC4ShapeArray(a, e, d, f), t = s.alias;
2918
+ let p = i.db.getBoundaries(t);
2919
+ p.length > 0 && drawInsideBoundary(e, t, a, p, i), s.alias !== "global" && drawBoundary2(e, s, a), n.data.stopy = Math.max(a.data.stopy + conf.c4ShapeMargin, n.data.stopy), n.data.stopx = Math.max(a.data.stopx + conf.c4ShapeMargin, n.data.stopx), globalBoundaryMaxX = Math.max(globalBoundaryMaxX, n.data.stopx), globalBoundaryMaxY = Math.max(globalBoundaryMaxY, n.data.stopy);
2920
+ }
2921
+ }
2922
+ __name(drawInsideBoundary, "drawInsideBoundary");
2923
+ var c4Renderer_default = {
2924
+ drawPersonOrSystemArray: drawC4ShapeArray,
2925
+ drawBoundary: drawBoundary2,
2926
+ setConf,
2927
+ draw: /* @__PURE__ */ __name(function(e, t, n, r) {
2928
+ conf = getConfig2().c4;
2929
+ let a = getConfig2().securityLevel, s;
2930
+ a === "sandbox" && (s = select_default("#i" + t));
2931
+ let l = select_default(a === "sandbox" ? s.nodes()[0].contentDocument.body : "body"), u = r.db;
2932
+ r.db.setWrap(conf.wrap), c4ShapeInRow2 = u.getC4ShapeInRow(), c4BoundaryInRow2 = u.getC4BoundaryInRow(), log.debug(`C:${JSON.stringify(conf, null, 2)}`);
2933
+ let p = a === "sandbox" ? l.select(`[id="${t}"]`) : select_default(`[id="${t}"]`);
2934
+ svgDraw_default.insertComputerIcon(p), svgDraw_default.insertDatabaseIcon(p), svgDraw_default.insertClockIcon(p);
2935
+ let m = new Bounds(r);
2936
+ m.setData(conf.diagramMarginX, conf.diagramMarginX, conf.diagramMarginY, conf.diagramMarginY), m.data.widthLimit = screen.availWidth, globalBoundaryMaxX = conf.diagramMarginX, globalBoundaryMaxY = conf.diagramMarginY;
2937
+ let h = r.db.getTitle();
2938
+ drawInsideBoundary(p, "", m, r.db.getBoundaries(""), r), svgDraw_default.insertArrowHead(p), svgDraw_default.insertArrowEnd(p), svgDraw_default.insertArrowCrossHead(p), svgDraw_default.insertArrowFilledHead(p), drawRels2(p, r.db.getRels(), r.db.getC4Shape, r), m.data.stopx = globalBoundaryMaxX, m.data.stopy = globalBoundaryMaxY;
2939
+ let g = m.data, _ = g.stopy - g.starty + 2 * conf.diagramMarginY, v = g.stopx - g.startx + 2 * conf.diagramMarginX;
2940
+ h && p.append("text").text(h).attr("x", (g.stopx - g.startx) / 2 - 4 * conf.diagramMarginX).attr("y", g.starty + conf.diagramMarginY), configureSvgSize(p, _, v, conf.useMaxWidth);
2941
+ let y = h ? 60 : 0;
2942
+ p.attr("viewBox", g.startx - conf.diagramMarginX + " -" + (conf.diagramMarginY + y) + " " + v + " " + (_ + y)), log.debug("models:", g);
2943
+ }, "draw")
2944
+ }, diagram = {
2945
+ parser: c4Diagram_default,
2946
+ db: c4Db_default,
2947
+ renderer: c4Renderer_default,
2948
+ styles: /* @__PURE__ */ __name((e) => `.person {
2949
+ stroke: ${e.personBorder};
2950
+ fill: ${e.personBkg};
2951
+ }
2952
+ `, "getStyles"),
2953
+ init: /* @__PURE__ */ __name(({ c4: e, wrap: t }) => {
2954
+ c4Renderer_default.setConf(e), c4Db_default.setWrap(t);
2955
+ }, "init")
2956
+ };
2957
+ export { diagram };