@zjlab-frontier/markdown 1.2.6 → 1.2.7

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 (93) hide show
  1. package/dist/_basePickBy-CWu8v0ko.mjs +151 -0
  2. package/dist/_baseUniq-BYBDg8So.mjs +614 -0
  3. package/dist/arc-2_S8ohSf.mjs +83 -0
  4. package/dist/architecture-U656AL7Q-DGKLYZ_K.mjs +5 -0
  5. package/dist/architectureDiagram-VXUJARFQ-CiE3U1mu.mjs +4661 -0
  6. package/dist/blockDiagram-VD42YOAC-CsZjZOPb.mjs +2261 -0
  7. package/dist/{c4Diagram-c83219d4-DPiPzMng.mjs → c4Diagram-YG6GDRKO-1xvcuQft.mjs} +795 -794
  8. package/dist/{channel-DLtPd-ti.mjs → channel-DcbfLn-q.mjs} +1 -1
  9. package/dist/chunk-4BX2VUAB-BDp4Xs60.mjs +8 -0
  10. package/dist/chunk-55IACEB6-CTW8J150.mjs +8 -0
  11. package/dist/chunk-B4BG7PRW-B_heTEEq.mjs +1375 -0
  12. package/dist/chunk-DI55MBZ5-DhjTVH-t.mjs +1370 -0
  13. package/dist/chunk-FMBD7UC4-ClbSERVz.mjs +19 -0
  14. package/dist/chunk-QN33PNHL-BKK9fOrS.mjs +19 -0
  15. package/dist/chunk-QZHKN3VN-BJGNV1ga.mjs +15 -0
  16. package/dist/chunk-TZMSLE5B-CGED95dA.mjs +64 -0
  17. package/dist/classDiagram-2ON5EDUG-B940_szE.mjs +16 -0
  18. package/dist/classDiagram-v2-WZHVMYZB-B940_szE.mjs +16 -0
  19. package/dist/{clone-Bekeo3TW.mjs → clone-DCtolUVn.mjs} +1 -1
  20. package/dist/cose-bilkent-S5V4N54A-BYen7Ep1.mjs +2608 -0
  21. package/dist/cytoscape.esm-MSgpKP8s.mjs +18721 -0
  22. package/dist/dagre-6UL2VRFP-iIFq-NoW.mjs +444 -0
  23. package/dist/defaultLocale-D7EN2tov.mjs +171 -0
  24. package/dist/diagram-PSM6KHXK-Dy7h44b4.mjs +531 -0
  25. package/dist/diagram-QEK2KX5R-C94F1gFy.mjs +217 -0
  26. package/dist/diagram-S2PKOQOG-yhlmdZS2.mjs +142 -0
  27. package/dist/erDiagram-Q2GNP2WA-BpLUZP7_.mjs +841 -0
  28. package/dist/flowDiagram-NV44I4VS-SLzktk7G.mjs +1620 -0
  29. package/dist/ganttDiagram-JELNMOA3-DeGgQKGo.mjs +2670 -0
  30. package/dist/gitGraph-F6HP7TQM-BMUVRqib.mjs +5 -0
  31. package/dist/gitGraphDiagram-NY62KEGX-CAg0nU-l.mjs +699 -0
  32. package/dist/graph-D3huRaLs.mjs +247 -0
  33. package/dist/{index-C3zgkbpi.mjs → index-BrxkOr3k.mjs} +35916 -28708
  34. package/dist/index.es.js +4 -4
  35. package/dist/index.umd.js +1884 -1442
  36. package/dist/info-NVLQJR56-B7-uUvSf.mjs +5 -0
  37. package/dist/infoDiagram-WHAUD3N6-CvBpxqLi.mjs +24 -0
  38. package/dist/journeyDiagram-XKPGCS4Q-DuCbTsAr.mjs +834 -0
  39. package/dist/kanban-definition-3W4ZIXB7-DvIE5yxA.mjs +719 -0
  40. package/dist/layout-DxYqTZ5R.mjs +1335 -0
  41. package/dist/linear-Ft07C63i.mjs +259 -0
  42. package/dist/mermaid-parser.core-D4YfUPNI.mjs +12966 -0
  43. package/dist/mindmap-definition-VGOIOE7T-urZ0HI-X.mjs +784 -0
  44. package/dist/packet-BFZMPI3H-ByWPr9-O.mjs +5 -0
  45. package/dist/pie-7BOR55EZ-B4RcaSOO.mjs +5 -0
  46. package/dist/pieDiagram-ADFJNKIX-ieTD_ZLt.mjs +161 -0
  47. package/dist/quadrantDiagram-AYHSOK5B-CA5Lp1fr.mjs +1022 -0
  48. package/dist/radar-NHE76QYJ-xjkuc7ne.mjs +5 -0
  49. package/dist/requirementDiagram-UZGBJVZJ-dsQFkWyE.mjs +850 -0
  50. package/dist/sankeyDiagram-TZEHDZUN-BbxCMN2Y.mjs +810 -0
  51. package/dist/sequenceDiagram-WL72ISMW-DXuguRyg.mjs +2511 -0
  52. package/dist/stateDiagram-FKZM4ZOC-Df7YOK3T.mjs +263 -0
  53. package/dist/stateDiagram-v2-4FDKWEC3-D8vtVcSe.mjs +16 -0
  54. package/dist/timeline-definition-IT6M3QCI-BECtudMW.mjs +795 -0
  55. package/dist/treemap-KMMF4GRG-Whla94QX.mjs +5 -0
  56. package/dist/{xychartDiagram-f5964ef8-fDv4mp1P.mjs → xychartDiagram-PRI3JC2R-Vnmd1h04.mjs} +503 -445
  57. package/package.json +3 -3
  58. package/dist/Tableau10-D7jGxypv.mjs +0 -8
  59. package/dist/arc-DqrMsJeG.mjs +0 -84
  60. package/dist/array-CqVTtuYm.mjs +0 -6
  61. package/dist/blockDiagram-c4efeb88-B7Mcu3H_.mjs +0 -1221
  62. package/dist/classDiagram-beda092f-CRNvkLYf.mjs +0 -218
  63. package/dist/classDiagram-v2-2358418a-CUFy5DGQ.mjs +0 -200
  64. package/dist/createText-1719965b-BEXd6yNU.mjs +0 -2955
  65. package/dist/edges-96097737-CTds2HS2.mjs +0 -1088
  66. package/dist/erDiagram-0228fc6a-DdOqXYmJ.mjs +0 -929
  67. package/dist/flowDb-c6c81e3f-LkwBoeG_.mjs +0 -1126
  68. package/dist/flowDiagram-50d868cf-BlsvSXSO.mjs +0 -788
  69. package/dist/flowDiagram-v2-4f6560a1-KScjGHBx.mjs +0 -17
  70. package/dist/flowchart-elk-definition-6af322e1-mTna7kqR.mjs +0 -48146
  71. package/dist/ganttDiagram-a2739b55-B2o_UW9_.mjs +0 -2477
  72. package/dist/gitGraphDiagram-82fe8481-B6-VRPS0.mjs +0 -1264
  73. package/dist/graph-CSVeLFCJ.mjs +0 -847
  74. package/dist/index-5325376f-DsGv8AO4.mjs +0 -373
  75. package/dist/infoDiagram-8eee0895-Cx7V52QV.mjs +0 -319
  76. package/dist/journeyDiagram-c64418c1-C03IeVHa.mjs +0 -801
  77. package/dist/layout-DfnPfvJm.mjs +0 -1472
  78. package/dist/line-BwAWhs05.mjs +0 -33
  79. package/dist/linear-Ck_Qt8nI.mjs +0 -423
  80. package/dist/mindmap-definition-8da855dc-DdMLbjBy.mjs +0 -21922
  81. package/dist/path-DLwuMfdd.mjs +0 -84
  82. package/dist/pieDiagram-a8764435-BymSofHf.mjs +0 -500
  83. package/dist/quadrantDiagram-1e28029f-BXtW3eHp.mjs +0 -903
  84. package/dist/requirementDiagram-08caed73-DGBKyhE-.mjs +0 -767
  85. package/dist/sankeyDiagram-a04cb91d-BfUYRgG3.mjs +0 -802
  86. package/dist/sequenceDiagram-c5b8d532-Jj_1ttvV.mjs +0 -2234
  87. package/dist/stateDiagram-1ecb1508-CbSM9l6I.mjs +0 -266
  88. package/dist/stateDiagram-v2-c2b004d7-dS2KbqNc.mjs +0 -184
  89. package/dist/styles-b4e223ce-D01XEgS6.mjs +0 -1089
  90. package/dist/styles-ca3715f6-amZyw1GB.mjs +0 -960
  91. package/dist/styles-d45a18b0-GN33fYGn.mjs +0 -436
  92. package/dist/svgDrawCommon-b86b1483-BQvqkIEE.mjs +0 -64
  93. package/dist/timeline-definition-faaaa080-BjbyYT4p.mjs +0 -792
@@ -1,1264 +0,0 @@
1
- import { C as vt, D as Ct, s as Ot, a as Pt, b as Gt, c as It, g as C, l as B, d as St, B as At, H as Nt, E as Ht, k as D, I as Bt } from "./index-C3zgkbpi.mjs";
2
- var mt = (function() {
3
- var r = function(I, o, u, d) {
4
- for (u = u || {}, d = I.length; d--; u[I[d]] = o)
5
- ;
6
- return u;
7
- }, n = [1, 3], l = [1, 6], h = [1, 4], i = [1, 5], c = [2, 5], p = [1, 12], m = [5, 7, 13, 19, 21, 23, 24, 26, 28, 31, 37, 40, 47], x = [7, 13, 19, 21, 23, 24, 26, 28, 31, 37, 40], y = [7, 12, 13, 19, 21, 23, 24, 26, 28, 31, 37, 40], a = [7, 13, 47], R = [1, 42], _ = [1, 41], b = [7, 13, 29, 32, 35, 38, 47], f = [1, 55], k = [1, 56], g = [1, 57], E = [7, 13, 32, 35, 42, 47], z = {
8
- trace: function() {
9
- },
10
- yy: {},
11
- symbols_: { error: 2, start: 3, eol: 4, GG: 5, document: 6, EOF: 7, ":": 8, DIR: 9, options: 10, body: 11, OPT: 12, NL: 13, line: 14, statement: 15, commitStatement: 16, mergeStatement: 17, cherryPickStatement: 18, acc_title: 19, acc_title_value: 20, acc_descr: 21, acc_descr_value: 22, acc_descr_multiline_value: 23, section: 24, branchStatement: 25, CHECKOUT: 26, ref: 27, BRANCH: 28, ORDER: 29, NUM: 30, CHERRY_PICK: 31, COMMIT_ID: 32, STR: 33, PARENT_COMMIT: 34, COMMIT_TAG: 35, EMPTYSTR: 36, MERGE: 37, COMMIT_TYPE: 38, commitType: 39, COMMIT: 40, commit_arg: 41, COMMIT_MSG: 42, NORMAL: 43, REVERSE: 44, HIGHLIGHT: 45, ID: 46, ";": 47, $accept: 0, $end: 1 },
12
- terminals_: { 2: "error", 5: "GG", 7: "EOF", 8: ":", 9: "DIR", 12: "OPT", 13: "NL", 19: "acc_title", 20: "acc_title_value", 21: "acc_descr", 22: "acc_descr_value", 23: "acc_descr_multiline_value", 24: "section", 26: "CHECKOUT", 28: "BRANCH", 29: "ORDER", 30: "NUM", 31: "CHERRY_PICK", 32: "COMMIT_ID", 33: "STR", 34: "PARENT_COMMIT", 35: "COMMIT_TAG", 36: "EMPTYSTR", 37: "MERGE", 38: "COMMIT_TYPE", 40: "COMMIT", 42: "COMMIT_MSG", 43: "NORMAL", 44: "REVERSE", 45: "HIGHLIGHT", 46: "ID", 47: ";" },
13
- productions_: [0, [3, 2], [3, 3], [3, 4], [3, 5], [6, 0], [6, 2], [10, 2], [10, 1], [11, 0], [11, 2], [14, 2], [14, 1], [15, 1], [15, 1], [15, 1], [15, 2], [15, 2], [15, 1], [15, 1], [15, 1], [15, 2], [25, 2], [25, 4], [18, 3], [18, 5], [18, 5], [18, 7], [18, 7], [18, 5], [18, 5], [18, 5], [18, 7], [18, 7], [18, 7], [18, 7], [17, 2], [17, 4], [17, 4], [17, 4], [17, 6], [17, 6], [17, 6], [17, 6], [17, 6], [17, 6], [17, 8], [17, 8], [17, 8], [17, 8], [17, 8], [17, 8], [16, 2], [16, 3], [16, 3], [16, 5], [16, 5], [16, 3], [16, 5], [16, 5], [16, 5], [16, 5], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 3], [16, 5], [16, 5], [16, 5], [16, 5], [16, 5], [16, 5], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [41, 0], [41, 1], [39, 1], [39, 1], [39, 1], [27, 1], [27, 1], [4, 1], [4, 1], [4, 1]],
14
- performAction: function(o, u, d, s, T, t, X) {
15
- var e = t.length - 1;
16
- switch (T) {
17
- case 2:
18
- return t[e];
19
- case 3:
20
- return t[e - 1];
21
- case 4:
22
- return s.setDirection(t[e - 3]), t[e - 1];
23
- case 6:
24
- s.setOptions(t[e - 1]), this.$ = t[e];
25
- break;
26
- case 7:
27
- t[e - 1] += t[e], this.$ = t[e - 1];
28
- break;
29
- case 9:
30
- this.$ = [];
31
- break;
32
- case 10:
33
- t[e - 1].push(t[e]), this.$ = t[e - 1];
34
- break;
35
- case 11:
36
- this.$ = t[e - 1];
37
- break;
38
- case 16:
39
- this.$ = t[e].trim(), s.setAccTitle(this.$);
40
- break;
41
- case 17:
42
- case 18:
43
- this.$ = t[e].trim(), s.setAccDescription(this.$);
44
- break;
45
- case 19:
46
- s.addSection(t[e].substr(8)), this.$ = t[e].substr(8);
47
- break;
48
- case 21:
49
- s.checkout(t[e]);
50
- break;
51
- case 22:
52
- s.branch(t[e]);
53
- break;
54
- case 23:
55
- s.branch(t[e - 2], t[e]);
56
- break;
57
- case 24:
58
- s.cherryPick(t[e], "", void 0);
59
- break;
60
- case 25:
61
- s.cherryPick(t[e - 2], "", void 0, t[e]);
62
- break;
63
- case 26:
64
- s.cherryPick(t[e - 2], "", t[e]);
65
- break;
66
- case 27:
67
- s.cherryPick(t[e - 4], "", t[e], t[e - 2]);
68
- break;
69
- case 28:
70
- s.cherryPick(t[e - 4], "", t[e - 2], t[e]);
71
- break;
72
- case 29:
73
- s.cherryPick(t[e], "", t[e - 2]);
74
- break;
75
- case 30:
76
- s.cherryPick(t[e], "", "");
77
- break;
78
- case 31:
79
- s.cherryPick(t[e - 2], "", "");
80
- break;
81
- case 32:
82
- s.cherryPick(t[e - 4], "", "", t[e - 2]);
83
- break;
84
- case 33:
85
- s.cherryPick(t[e - 4], "", "", t[e]);
86
- break;
87
- case 34:
88
- s.cherryPick(t[e - 2], "", t[e - 4], t[e]);
89
- break;
90
- case 35:
91
- s.cherryPick(t[e - 2], "", "", t[e]);
92
- break;
93
- case 36:
94
- s.merge(t[e], "", "", "");
95
- break;
96
- case 37:
97
- s.merge(t[e - 2], t[e], "", "");
98
- break;
99
- case 38:
100
- s.merge(t[e - 2], "", t[e], "");
101
- break;
102
- case 39:
103
- s.merge(t[e - 2], "", "", t[e]);
104
- break;
105
- case 40:
106
- s.merge(t[e - 4], t[e], "", t[e - 2]);
107
- break;
108
- case 41:
109
- s.merge(t[e - 4], "", t[e], t[e - 2]);
110
- break;
111
- case 42:
112
- s.merge(t[e - 4], "", t[e - 2], t[e]);
113
- break;
114
- case 43:
115
- s.merge(t[e - 4], t[e - 2], t[e], "");
116
- break;
117
- case 44:
118
- s.merge(t[e - 4], t[e - 2], "", t[e]);
119
- break;
120
- case 45:
121
- s.merge(t[e - 4], t[e], t[e - 2], "");
122
- break;
123
- case 46:
124
- s.merge(t[e - 6], t[e - 4], t[e - 2], t[e]);
125
- break;
126
- case 47:
127
- s.merge(t[e - 6], t[e], t[e - 4], t[e - 2]);
128
- break;
129
- case 48:
130
- s.merge(t[e - 6], t[e - 4], t[e], t[e - 2]);
131
- break;
132
- case 49:
133
- s.merge(t[e - 6], t[e - 2], t[e - 4], t[e]);
134
- break;
135
- case 50:
136
- s.merge(t[e - 6], t[e], t[e - 2], t[e - 4]);
137
- break;
138
- case 51:
139
- s.merge(t[e - 6], t[e - 2], t[e], t[e - 4]);
140
- break;
141
- case 52:
142
- s.commit(t[e]);
143
- break;
144
- case 53:
145
- s.commit("", "", s.commitType.NORMAL, t[e]);
146
- break;
147
- case 54:
148
- s.commit("", "", t[e], "");
149
- break;
150
- case 55:
151
- s.commit("", "", t[e], t[e - 2]);
152
- break;
153
- case 56:
154
- s.commit("", "", t[e - 2], t[e]);
155
- break;
156
- case 57:
157
- s.commit("", t[e], s.commitType.NORMAL, "");
158
- break;
159
- case 58:
160
- s.commit("", t[e - 2], s.commitType.NORMAL, t[e]);
161
- break;
162
- case 59:
163
- s.commit("", t[e], s.commitType.NORMAL, t[e - 2]);
164
- break;
165
- case 60:
166
- s.commit("", t[e - 2], t[e], "");
167
- break;
168
- case 61:
169
- s.commit("", t[e], t[e - 2], "");
170
- break;
171
- case 62:
172
- s.commit("", t[e - 4], t[e - 2], t[e]);
173
- break;
174
- case 63:
175
- s.commit("", t[e - 4], t[e], t[e - 2]);
176
- break;
177
- case 64:
178
- s.commit("", t[e - 2], t[e - 4], t[e]);
179
- break;
180
- case 65:
181
- s.commit("", t[e], t[e - 4], t[e - 2]);
182
- break;
183
- case 66:
184
- s.commit("", t[e], t[e - 2], t[e - 4]);
185
- break;
186
- case 67:
187
- s.commit("", t[e - 2], t[e], t[e - 4]);
188
- break;
189
- case 68:
190
- s.commit(t[e], "", s.commitType.NORMAL, "");
191
- break;
192
- case 69:
193
- s.commit(t[e], "", s.commitType.NORMAL, t[e - 2]);
194
- break;
195
- case 70:
196
- s.commit(t[e - 2], "", s.commitType.NORMAL, t[e]);
197
- break;
198
- case 71:
199
- s.commit(t[e - 2], "", t[e], "");
200
- break;
201
- case 72:
202
- s.commit(t[e], "", t[e - 2], "");
203
- break;
204
- case 73:
205
- s.commit(t[e], t[e - 2], s.commitType.NORMAL, "");
206
- break;
207
- case 74:
208
- s.commit(t[e - 2], t[e], s.commitType.NORMAL, "");
209
- break;
210
- case 75:
211
- s.commit(t[e - 4], "", t[e - 2], t[e]);
212
- break;
213
- case 76:
214
- s.commit(t[e - 4], "", t[e], t[e - 2]);
215
- break;
216
- case 77:
217
- s.commit(t[e - 2], "", t[e - 4], t[e]);
218
- break;
219
- case 78:
220
- s.commit(t[e], "", t[e - 4], t[e - 2]);
221
- break;
222
- case 79:
223
- s.commit(t[e], "", t[e - 2], t[e - 4]);
224
- break;
225
- case 80:
226
- s.commit(t[e - 2], "", t[e], t[e - 4]);
227
- break;
228
- case 81:
229
- s.commit(t[e - 4], t[e], t[e - 2], "");
230
- break;
231
- case 82:
232
- s.commit(t[e - 4], t[e - 2], t[e], "");
233
- break;
234
- case 83:
235
- s.commit(t[e - 2], t[e], t[e - 4], "");
236
- break;
237
- case 84:
238
- s.commit(t[e], t[e - 2], t[e - 4], "");
239
- break;
240
- case 85:
241
- s.commit(t[e], t[e - 4], t[e - 2], "");
242
- break;
243
- case 86:
244
- s.commit(t[e - 2], t[e - 4], t[e], "");
245
- break;
246
- case 87:
247
- s.commit(t[e - 4], t[e], s.commitType.NORMAL, t[e - 2]);
248
- break;
249
- case 88:
250
- s.commit(t[e - 4], t[e - 2], s.commitType.NORMAL, t[e]);
251
- break;
252
- case 89:
253
- s.commit(t[e - 2], t[e], s.commitType.NORMAL, t[e - 4]);
254
- break;
255
- case 90:
256
- s.commit(t[e], t[e - 2], s.commitType.NORMAL, t[e - 4]);
257
- break;
258
- case 91:
259
- s.commit(t[e], t[e - 4], s.commitType.NORMAL, t[e - 2]);
260
- break;
261
- case 92:
262
- s.commit(t[e - 2], t[e - 4], s.commitType.NORMAL, t[e]);
263
- break;
264
- case 93:
265
- s.commit(t[e - 6], t[e - 4], t[e - 2], t[e]);
266
- break;
267
- case 94:
268
- s.commit(t[e - 6], t[e - 4], t[e], t[e - 2]);
269
- break;
270
- case 95:
271
- s.commit(t[e - 6], t[e - 2], t[e - 4], t[e]);
272
- break;
273
- case 96:
274
- s.commit(t[e - 6], t[e], t[e - 4], t[e - 2]);
275
- break;
276
- case 97:
277
- s.commit(t[e - 6], t[e - 2], t[e], t[e - 4]);
278
- break;
279
- case 98:
280
- s.commit(t[e - 6], t[e], t[e - 2], t[e - 4]);
281
- break;
282
- case 99:
283
- s.commit(t[e - 4], t[e - 6], t[e - 2], t[e]);
284
- break;
285
- case 100:
286
- s.commit(t[e - 4], t[e - 6], t[e], t[e - 2]);
287
- break;
288
- case 101:
289
- s.commit(t[e - 2], t[e - 6], t[e - 4], t[e]);
290
- break;
291
- case 102:
292
- s.commit(t[e], t[e - 6], t[e - 4], t[e - 2]);
293
- break;
294
- case 103:
295
- s.commit(t[e - 2], t[e - 6], t[e], t[e - 4]);
296
- break;
297
- case 104:
298
- s.commit(t[e], t[e - 6], t[e - 2], t[e - 4]);
299
- break;
300
- case 105:
301
- s.commit(t[e], t[e - 4], t[e - 2], t[e - 6]);
302
- break;
303
- case 106:
304
- s.commit(t[e - 2], t[e - 4], t[e], t[e - 6]);
305
- break;
306
- case 107:
307
- s.commit(t[e], t[e - 2], t[e - 4], t[e - 6]);
308
- break;
309
- case 108:
310
- s.commit(t[e - 2], t[e], t[e - 4], t[e - 6]);
311
- break;
312
- case 109:
313
- s.commit(t[e - 4], t[e - 2], t[e], t[e - 6]);
314
- break;
315
- case 110:
316
- s.commit(t[e - 4], t[e], t[e - 2], t[e - 6]);
317
- break;
318
- case 111:
319
- s.commit(t[e - 2], t[e - 4], t[e - 6], t[e]);
320
- break;
321
- case 112:
322
- s.commit(t[e], t[e - 4], t[e - 6], t[e - 2]);
323
- break;
324
- case 113:
325
- s.commit(t[e - 2], t[e], t[e - 6], t[e - 4]);
326
- break;
327
- case 114:
328
- s.commit(t[e], t[e - 2], t[e - 6], t[e - 4]);
329
- break;
330
- case 115:
331
- s.commit(t[e - 4], t[e - 2], t[e - 6], t[e]);
332
- break;
333
- case 116:
334
- s.commit(t[e - 4], t[e], t[e - 6], t[e - 2]);
335
- break;
336
- case 117:
337
- this.$ = "";
338
- break;
339
- case 118:
340
- this.$ = t[e];
341
- break;
342
- case 119:
343
- this.$ = s.commitType.NORMAL;
344
- break;
345
- case 120:
346
- this.$ = s.commitType.REVERSE;
347
- break;
348
- case 121:
349
- this.$ = s.commitType.HIGHLIGHT;
350
- break;
351
- }
352
- },
353
- table: [{ 3: 1, 4: 2, 5: n, 7: l, 13: h, 47: i }, { 1: [3] }, { 3: 7, 4: 2, 5: n, 7: l, 13: h, 47: i }, { 6: 8, 7: c, 8: [1, 9], 9: [1, 10], 10: 11, 13: p }, r(m, [2, 124]), r(m, [2, 125]), r(m, [2, 126]), { 1: [2, 1] }, { 7: [1, 13] }, { 6: 14, 7: c, 10: 11, 13: p }, { 8: [1, 15] }, r(x, [2, 9], { 11: 16, 12: [1, 17] }), r(y, [2, 8]), { 1: [2, 2] }, { 7: [1, 18] }, { 6: 19, 7: c, 10: 11, 13: p }, { 7: [2, 6], 13: [1, 22], 14: 20, 15: 21, 16: 23, 17: 24, 18: 25, 19: [1, 26], 21: [1, 27], 23: [1, 28], 24: [1, 29], 25: 30, 26: [1, 31], 28: [1, 35], 31: [1, 34], 37: [1, 33], 40: [1, 32] }, r(y, [2, 7]), { 1: [2, 3] }, { 7: [1, 36] }, r(x, [2, 10]), { 4: 37, 7: l, 13: h, 47: i }, r(x, [2, 12]), r(a, [2, 13]), r(a, [2, 14]), r(a, [2, 15]), { 20: [1, 38] }, { 22: [1, 39] }, r(a, [2, 18]), r(a, [2, 19]), r(a, [2, 20]), { 27: 40, 33: R, 46: _ }, r(a, [2, 117], { 41: 43, 32: [1, 46], 33: [1, 48], 35: [1, 44], 38: [1, 45], 42: [1, 47] }), { 27: 49, 33: R, 46: _ }, { 32: [1, 50], 35: [1, 51] }, { 27: 52, 33: R, 46: _ }, { 1: [2, 4] }, r(x, [2, 11]), r(a, [2, 16]), r(a, [2, 17]), r(a, [2, 21]), r(b, [2, 122]), r(b, [2, 123]), r(a, [2, 52]), { 33: [1, 53] }, { 39: 54, 43: f, 44: k, 45: g }, { 33: [1, 58] }, { 33: [1, 59] }, r(a, [2, 118]), r(a, [2, 36], { 32: [1, 60], 35: [1, 62], 38: [1, 61] }), { 33: [1, 63] }, { 33: [1, 64], 36: [1, 65] }, r(a, [2, 22], { 29: [1, 66] }), r(a, [2, 53], { 32: [1, 68], 38: [1, 67], 42: [1, 69] }), r(a, [2, 54], { 32: [1, 71], 35: [1, 70], 42: [1, 72] }), r(E, [2, 119]), r(E, [2, 120]), r(E, [2, 121]), r(a, [2, 57], { 35: [1, 73], 38: [1, 74], 42: [1, 75] }), r(a, [2, 68], { 32: [1, 78], 35: [1, 76], 38: [1, 77] }), { 33: [1, 79] }, { 39: 80, 43: f, 44: k, 45: g }, { 33: [1, 81] }, r(a, [2, 24], { 34: [1, 82], 35: [1, 83] }), { 32: [1, 84] }, { 32: [1, 85] }, { 30: [1, 86] }, { 39: 87, 43: f, 44: k, 45: g }, { 33: [1, 88] }, { 33: [1, 89] }, { 33: [1, 90] }, { 33: [1, 91] }, { 33: [1, 92] }, { 33: [1, 93] }, { 39: 94, 43: f, 44: k, 45: g }, { 33: [1, 95] }, { 33: [1, 96] }, { 39: 97, 43: f, 44: k, 45: g }, { 33: [1, 98] }, r(a, [2, 37], { 35: [1, 100], 38: [1, 99] }), r(a, [2, 38], { 32: [1, 102], 35: [1, 101] }), r(a, [2, 39], { 32: [1, 103], 38: [1, 104] }), { 33: [1, 105] }, { 33: [1, 106], 36: [1, 107] }, { 33: [1, 108] }, { 33: [1, 109] }, r(a, [2, 23]), r(a, [2, 55], { 32: [1, 110], 42: [1, 111] }), r(a, [2, 59], { 38: [1, 112], 42: [1, 113] }), r(a, [2, 69], { 32: [1, 115], 38: [1, 114] }), r(a, [2, 56], { 32: [1, 116], 42: [1, 117] }), r(a, [2, 61], { 35: [1, 118], 42: [1, 119] }), r(a, [2, 72], { 32: [1, 121], 35: [1, 120] }), r(a, [2, 58], { 38: [1, 122], 42: [1, 123] }), r(a, [2, 60], { 35: [1, 124], 42: [1, 125] }), r(a, [2, 73], { 35: [1, 127], 38: [1, 126] }), r(a, [2, 70], { 32: [1, 129], 38: [1, 128] }), r(a, [2, 71], { 32: [1, 131], 35: [1, 130] }), r(a, [2, 74], { 35: [1, 133], 38: [1, 132] }), { 39: 134, 43: f, 44: k, 45: g }, { 33: [1, 135] }, { 33: [1, 136] }, { 33: [1, 137] }, { 33: [1, 138] }, { 39: 139, 43: f, 44: k, 45: g }, r(a, [2, 25], { 35: [1, 140] }), r(a, [2, 26], { 34: [1, 141] }), r(a, [2, 31], { 34: [1, 142] }), r(a, [2, 29], { 34: [1, 143] }), r(a, [2, 30], { 34: [1, 144] }), { 33: [1, 145] }, { 33: [1, 146] }, { 39: 147, 43: f, 44: k, 45: g }, { 33: [1, 148] }, { 39: 149, 43: f, 44: k, 45: g }, { 33: [1, 150] }, { 33: [1, 151] }, { 33: [1, 152] }, { 33: [1, 153] }, { 33: [1, 154] }, { 33: [1, 155] }, { 33: [1, 156] }, { 39: 157, 43: f, 44: k, 45: g }, { 33: [1, 158] }, { 33: [1, 159] }, { 33: [1, 160] }, { 39: 161, 43: f, 44: k, 45: g }, { 33: [1, 162] }, { 39: 163, 43: f, 44: k, 45: g }, { 33: [1, 164] }, { 33: [1, 165] }, { 33: [1, 166] }, { 39: 167, 43: f, 44: k, 45: g }, { 33: [1, 168] }, r(a, [2, 43], { 35: [1, 169] }), r(a, [2, 44], { 38: [1, 170] }), r(a, [2, 42], { 32: [1, 171] }), r(a, [2, 45], { 35: [1, 172] }), r(a, [2, 40], { 38: [1, 173] }), r(a, [2, 41], { 32: [1, 174] }), { 33: [1, 175], 36: [1, 176] }, { 33: [1, 177] }, { 33: [1, 178] }, { 33: [1, 179] }, { 33: [1, 180] }, r(a, [2, 66], { 42: [1, 181] }), r(a, [2, 79], { 32: [1, 182] }), r(a, [2, 67], { 42: [1, 183] }), r(a, [2, 90], { 38: [1, 184] }), r(a, [2, 80], { 32: [1, 185] }), r(a, [2, 89], { 38: [1, 186] }), r(a, [2, 65], { 42: [1, 187] }), r(a, [2, 78], { 32: [1, 188] }), r(a, [2, 64], { 42: [1, 189] }), r(a, [2, 84], { 35: [1, 190] }), r(a, [2, 77], { 32: [1, 191] }), r(a, [2, 83], { 35: [1, 192] }), r(a, [2, 63], { 42: [1, 193] }), r(a, [2, 91], { 38: [1, 194] }), r(a, [2, 62], { 42: [1, 195] }), r(a, [2, 85], { 35: [1, 196] }), r(a, [2, 86], { 35: [1, 197] }), r(a, [2, 92], { 38: [1, 198] }), r(a, [2, 76], { 32: [1, 199] }), r(a, [2, 87], { 38: [1, 200] }), r(a, [2, 75], { 32: [1, 201] }), r(a, [2, 81], { 35: [1, 202] }), r(a, [2, 82], { 35: [1, 203] }), r(a, [2, 88], { 38: [1, 204] }), { 33: [1, 205] }, { 39: 206, 43: f, 44: k, 45: g }, { 33: [1, 207] }, { 33: [1, 208] }, { 39: 209, 43: f, 44: k, 45: g }, { 33: [1, 210] }, r(a, [2, 27]), r(a, [2, 32]), r(a, [2, 28]), r(a, [2, 33]), r(a, [2, 34]), r(a, [2, 35]), { 33: [1, 211] }, { 33: [1, 212] }, { 33: [1, 213] }, { 39: 214, 43: f, 44: k, 45: g }, { 33: [1, 215] }, { 39: 216, 43: f, 44: k, 45: g }, { 33: [1, 217] }, { 33: [1, 218] }, { 33: [1, 219] }, { 33: [1, 220] }, { 33: [1, 221] }, { 33: [1, 222] }, { 33: [1, 223] }, { 39: 224, 43: f, 44: k, 45: g }, { 33: [1, 225] }, { 33: [1, 226] }, { 33: [1, 227] }, { 39: 228, 43: f, 44: k, 45: g }, { 33: [1, 229] }, { 39: 230, 43: f, 44: k, 45: g }, { 33: [1, 231] }, { 33: [1, 232] }, { 33: [1, 233] }, { 39: 234, 43: f, 44: k, 45: g }, r(a, [2, 46]), r(a, [2, 48]), r(a, [2, 47]), r(a, [2, 49]), r(a, [2, 51]), r(a, [2, 50]), r(a, [2, 107]), r(a, [2, 108]), r(a, [2, 105]), r(a, [2, 106]), r(a, [2, 110]), r(a, [2, 109]), r(a, [2, 114]), r(a, [2, 113]), r(a, [2, 112]), r(a, [2, 111]), r(a, [2, 116]), r(a, [2, 115]), r(a, [2, 104]), r(a, [2, 103]), r(a, [2, 102]), r(a, [2, 101]), r(a, [2, 99]), r(a, [2, 100]), r(a, [2, 98]), r(a, [2, 97]), r(a, [2, 96]), r(a, [2, 95]), r(a, [2, 93]), r(a, [2, 94])],
354
- defaultActions: { 7: [2, 1], 13: [2, 2], 18: [2, 3], 36: [2, 4] },
355
- parseError: function(o, u) {
356
- if (u.recoverable)
357
- this.trace(o);
358
- else {
359
- var d = new Error(o);
360
- throw d.hash = u, d;
361
- }
362
- },
363
- parse: function(o) {
364
- var u = this, d = [0], s = [], T = [null], t = [], X = this.table, e = "", rt = 0, ft = 0, wt = 2, pt = 1, Lt = t.slice.call(arguments, 1), O = Object.create(this.lexer), F = { yy: {} };
365
- for (var ct in this.yy)
366
- Object.prototype.hasOwnProperty.call(this.yy, ct) && (F.yy[ct] = this.yy[ct]);
367
- O.setInput(o, F.yy), F.yy.lexer = O, F.yy.parser = this, typeof O.yylloc > "u" && (O.yylloc = {});
368
- var ot = O.yylloc;
369
- t.push(ot);
370
- var Rt = O.options && O.options.ranges;
371
- typeof F.yy.parseError == "function" ? this.parseError = F.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
372
- function Mt() {
373
- var Y;
374
- return Y = s.pop() || O.lex() || pt, typeof Y != "number" && (Y instanceof Array && (s = Y, Y = s.pop()), Y = u.symbols_[Y] || Y), Y;
375
- }
376
- for (var N, K, V, lt, J = {}, it, q, bt, st; ; ) {
377
- if (K = d[d.length - 1], this.defaultActions[K] ? V = this.defaultActions[K] : ((N === null || typeof N > "u") && (N = Mt()), V = X[K] && X[K][N]), typeof V > "u" || !V.length || !V[0]) {
378
- var ht = "";
379
- st = [];
380
- for (it in X[K])
381
- this.terminals_[it] && it > wt && st.push("'" + this.terminals_[it] + "'");
382
- O.showPosition ? ht = "Parse error on line " + (rt + 1) + `:
383
- ` + O.showPosition() + `
384
- Expecting ` + st.join(", ") + ", got '" + (this.terminals_[N] || N) + "'" : ht = "Parse error on line " + (rt + 1) + ": Unexpected " + (N == pt ? "end of input" : "'" + (this.terminals_[N] || N) + "'"), this.parseError(ht, {
385
- text: O.match,
386
- token: this.terminals_[N] || N,
387
- line: O.yylineno,
388
- loc: ot,
389
- expected: st
390
- });
391
- }
392
- if (V[0] instanceof Array && V.length > 1)
393
- throw new Error("Parse Error: multiple actions possible at state: " + K + ", token: " + N);
394
- switch (V[0]) {
395
- case 1:
396
- d.push(N), T.push(O.yytext), t.push(O.yylloc), d.push(V[1]), N = null, ft = O.yyleng, e = O.yytext, rt = O.yylineno, ot = O.yylloc;
397
- break;
398
- case 2:
399
- if (q = this.productions_[V[1]][1], J.$ = T[T.length - q], J._$ = {
400
- first_line: t[t.length - (q || 1)].first_line,
401
- last_line: t[t.length - 1].last_line,
402
- first_column: t[t.length - (q || 1)].first_column,
403
- last_column: t[t.length - 1].last_column
404
- }, Rt && (J._$.range = [
405
- t[t.length - (q || 1)].range[0],
406
- t[t.length - 1].range[1]
407
- ]), lt = this.performAction.apply(J, [
408
- e,
409
- ft,
410
- rt,
411
- F.yy,
412
- V[1],
413
- T,
414
- t
415
- ].concat(Lt)), typeof lt < "u")
416
- return lt;
417
- q && (d = d.slice(0, -1 * q * 2), T = T.slice(0, -1 * q), t = t.slice(0, -1 * q)), d.push(this.productions_[V[1]][0]), T.push(J.$), t.push(J._$), bt = X[d[d.length - 2]][d[d.length - 1]], d.push(bt);
418
- break;
419
- case 3:
420
- return !0;
421
- }
422
- }
423
- return !0;
424
- }
425
- }, M = /* @__PURE__ */ (function() {
426
- var I = {
427
- EOF: 1,
428
- parseError: function(u, d) {
429
- if (this.yy.parser)
430
- this.yy.parser.parseError(u, d);
431
- else
432
- throw new Error(u);
433
- },
434
- // resets the lexer, sets new input
435
- setInput: function(o, u) {
436
- return this.yy = u || this.yy || {}, this._input = o, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
437
- first_line: 1,
438
- first_column: 0,
439
- last_line: 1,
440
- last_column: 0
441
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
442
- },
443
- // consumes and returns one char from the input
444
- input: function() {
445
- var o = this._input[0];
446
- this.yytext += o, this.yyleng++, this.offset++, this.match += o, this.matched += o;
447
- var u = o.match(/(?:\r\n?|\n).*/g);
448
- return u ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), o;
449
- },
450
- // unshifts one char (or a string) into the input
451
- unput: function(o) {
452
- var u = o.length, d = o.split(/(?:\r\n?|\n)/g);
453
- this._input = o + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - u), this.offset -= u;
454
- var s = this.match.split(/(?:\r\n?|\n)/g);
455
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), d.length - 1 && (this.yylineno -= d.length - 1);
456
- var T = this.yylloc.range;
457
- return this.yylloc = {
458
- first_line: this.yylloc.first_line,
459
- last_line: this.yylineno + 1,
460
- first_column: this.yylloc.first_column,
461
- last_column: d ? (d.length === s.length ? this.yylloc.first_column : 0) + s[s.length - d.length].length - d[0].length : this.yylloc.first_column - u
462
- }, this.options.ranges && (this.yylloc.range = [T[0], T[0] + this.yyleng - u]), this.yyleng = this.yytext.length, this;
463
- },
464
- // When called from action, caches matched text and appends it on next action
465
- more: function() {
466
- return this._more = !0, this;
467
- },
468
- // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
469
- reject: function() {
470
- if (this.options.backtrack_lexer)
471
- this._backtrack = !0;
472
- else
473
- 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).
474
- ` + this.showPosition(), {
475
- text: "",
476
- token: null,
477
- line: this.yylineno
478
- });
479
- return this;
480
- },
481
- // retain first n characters of the match
482
- less: function(o) {
483
- this.unput(this.match.slice(o));
484
- },
485
- // displays already matched input, i.e. for error messages
486
- pastInput: function() {
487
- var o = this.matched.substr(0, this.matched.length - this.match.length);
488
- return (o.length > 20 ? "..." : "") + o.substr(-20).replace(/\n/g, "");
489
- },
490
- // displays upcoming input, i.e. for error messages
491
- upcomingInput: function() {
492
- var o = this.match;
493
- return o.length < 20 && (o += this._input.substr(0, 20 - o.length)), (o.substr(0, 20) + (o.length > 20 ? "..." : "")).replace(/\n/g, "");
494
- },
495
- // displays the character position where the lexing error occurred, i.e. for error messages
496
- showPosition: function() {
497
- var o = this.pastInput(), u = new Array(o.length + 1).join("-");
498
- return o + this.upcomingInput() + `
499
- ` + u + "^";
500
- },
501
- // test the lexed token: return FALSE when not a match, otherwise return token
502
- test_match: function(o, u) {
503
- var d, s, T;
504
- if (this.options.backtrack_lexer && (T = {
505
- yylineno: this.yylineno,
506
- yylloc: {
507
- first_line: this.yylloc.first_line,
508
- last_line: this.last_line,
509
- first_column: this.yylloc.first_column,
510
- last_column: this.yylloc.last_column
511
- },
512
- yytext: this.yytext,
513
- match: this.match,
514
- matches: this.matches,
515
- matched: this.matched,
516
- yyleng: this.yyleng,
517
- offset: this.offset,
518
- _more: this._more,
519
- _input: this._input,
520
- yy: this.yy,
521
- conditionStack: this.conditionStack.slice(0),
522
- done: this.done
523
- }, this.options.ranges && (T.yylloc.range = this.yylloc.range.slice(0))), s = o[0].match(/(?:\r\n?|\n).*/g), s && (this.yylineno += s.length), this.yylloc = {
524
- first_line: this.yylloc.last_line,
525
- last_line: this.yylineno + 1,
526
- first_column: this.yylloc.last_column,
527
- last_column: s ? s[s.length - 1].length - s[s.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + o[0].length
528
- }, this.yytext += o[0], this.match += o[0], this.matches = o, 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(o[0].length), this.matched += o[0], d = this.performAction.call(this, this.yy, this, u, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), d)
529
- return d;
530
- if (this._backtrack) {
531
- for (var t in T)
532
- this[t] = T[t];
533
- return !1;
534
- }
535
- return !1;
536
- },
537
- // return next match in input
538
- next: function() {
539
- if (this.done)
540
- return this.EOF;
541
- this._input || (this.done = !0);
542
- var o, u, d, s;
543
- this._more || (this.yytext = "", this.match = "");
544
- for (var T = this._currentRules(), t = 0; t < T.length; t++)
545
- if (d = this._input.match(this.rules[T[t]]), d && (!u || d[0].length > u[0].length)) {
546
- if (u = d, s = t, this.options.backtrack_lexer) {
547
- if (o = this.test_match(d, T[t]), o !== !1)
548
- return o;
549
- if (this._backtrack) {
550
- u = !1;
551
- continue;
552
- } else
553
- return !1;
554
- } else if (!this.options.flex)
555
- break;
556
- }
557
- return u ? (o = this.test_match(u, T[s]), o !== !1 ? o : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
558
- ` + this.showPosition(), {
559
- text: "",
560
- token: null,
561
- line: this.yylineno
562
- });
563
- },
564
- // return next match that has a token
565
- lex: function() {
566
- var u = this.next();
567
- return u || this.lex();
568
- },
569
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
570
- begin: function(u) {
571
- this.conditionStack.push(u);
572
- },
573
- // pop the previously active lexer condition state off the condition stack
574
- popState: function() {
575
- var u = this.conditionStack.length - 1;
576
- return u > 0 ? this.conditionStack.pop() : this.conditionStack[0];
577
- },
578
- // produce the lexer rule set which is active for the currently active lexer condition state
579
- _currentRules: function() {
580
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
581
- },
582
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
583
- topState: function(u) {
584
- return u = this.conditionStack.length - 1 - Math.abs(u || 0), u >= 0 ? this.conditionStack[u] : "INITIAL";
585
- },
586
- // alias for begin(condition)
587
- pushState: function(u) {
588
- this.begin(u);
589
- },
590
- // return the number of states currently on the stack
591
- stateStackSize: function() {
592
- return this.conditionStack.length;
593
- },
594
- options: { "case-insensitive": !0 },
595
- performAction: function(u, d, s, T) {
596
- switch (s) {
597
- case 0:
598
- return this.begin("acc_title"), 19;
599
- case 1:
600
- return this.popState(), "acc_title_value";
601
- case 2:
602
- return this.begin("acc_descr"), 21;
603
- case 3:
604
- return this.popState(), "acc_descr_value";
605
- case 4:
606
- this.begin("acc_descr_multiline");
607
- break;
608
- case 5:
609
- this.popState();
610
- break;
611
- case 6:
612
- return "acc_descr_multiline_value";
613
- case 7:
614
- return 13;
615
- case 8:
616
- break;
617
- case 9:
618
- break;
619
- case 10:
620
- return 5;
621
- case 11:
622
- return 40;
623
- case 12:
624
- return 32;
625
- case 13:
626
- return 38;
627
- case 14:
628
- return 42;
629
- case 15:
630
- return 43;
631
- case 16:
632
- return 44;
633
- case 17:
634
- return 45;
635
- case 18:
636
- return 35;
637
- case 19:
638
- return 28;
639
- case 20:
640
- return 29;
641
- case 21:
642
- return 37;
643
- case 22:
644
- return 31;
645
- case 23:
646
- return 34;
647
- case 24:
648
- return 26;
649
- case 25:
650
- return 9;
651
- case 26:
652
- return 9;
653
- case 27:
654
- return 8;
655
- case 28:
656
- return "CARET";
657
- case 29:
658
- this.begin("options");
659
- break;
660
- case 30:
661
- this.popState();
662
- break;
663
- case 31:
664
- return 12;
665
- case 32:
666
- return 36;
667
- case 33:
668
- this.begin("string");
669
- break;
670
- case 34:
671
- this.popState();
672
- break;
673
- case 35:
674
- return 33;
675
- case 36:
676
- return 30;
677
- case 37:
678
- return 46;
679
- case 38:
680
- return 7;
681
- }
682
- },
683
- rules: [/^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:(\r?\n)+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:gitGraph\b)/i, /^(?:commit(?=\s|$))/i, /^(?:id:)/i, /^(?:type:)/i, /^(?:msg:)/i, /^(?:NORMAL\b)/i, /^(?:REVERSE\b)/i, /^(?:HIGHLIGHT\b)/i, /^(?:tag:)/i, /^(?:branch(?=\s|$))/i, /^(?:order:)/i, /^(?:merge(?=\s|$))/i, /^(?:cherry-pick(?=\s|$))/i, /^(?:parent:)/i, /^(?:checkout(?=\s|$))/i, /^(?:LR\b)/i, /^(?:TB\b)/i, /^(?::)/i, /^(?:\^)/i, /^(?:options\r?\n)/i, /^(?:[ \r\n\t]+end\b)/i, /^(?:[\s\S]+(?=[ \r\n\t]+end))/i, /^(?:["]["])/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[0-9]+(?=\s|$))/i, /^(?:\w([-\./\w]*[-\w])?)/i, /^(?:$)/i, /^(?:\s+)/i],
684
- conditions: { acc_descr_multiline: { rules: [5, 6], inclusive: !1 }, acc_descr: { rules: [3], inclusive: !1 }, acc_title: { rules: [1], inclusive: !1 }, options: { rules: [30, 31], inclusive: !1 }, string: { rules: [34, 35], inclusive: !1 }, INITIAL: { rules: [0, 2, 4, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 32, 33, 36, 37, 38, 39], inclusive: !0 } }
685
- };
686
- return I;
687
- })();
688
- z.lexer = M;
689
- function S() {
690
- this.yy = {};
691
- }
692
- return S.prototype = z, z.Parser = S, new S();
693
- })();
694
- mt.parser = mt;
695
- const Vt = mt;
696
- let at = C().gitGraph.mainBranchName, Dt = C().gitGraph.mainBranchOrder, v = {}, A = null, tt = {};
697
- tt[at] = { name: at, order: Dt };
698
- let L = {};
699
- L[at] = A;
700
- let G = at, kt = "LR", W = 0;
701
- function ut() {
702
- return Bt({ length: 7 });
703
- }
704
- function zt(r, n) {
705
- const l = /* @__PURE__ */ Object.create(null);
706
- return r.reduce((h, i) => {
707
- const c = n(i);
708
- return l[c] || (l[c] = !0, h.push(i)), h;
709
- }, []);
710
- }
711
- const qt = function(r) {
712
- kt = r;
713
- };
714
- let xt = {};
715
- const Yt = function(r) {
716
- B.debug("options str", r), r = r && r.trim(), r = r || "{}";
717
- try {
718
- xt = JSON.parse(r);
719
- } catch (n) {
720
- B.error("error while parsing gitGraph options", n.message);
721
- }
722
- }, jt = function() {
723
- return xt;
724
- }, Ft = function(r, n, l, h) {
725
- B.debug("Entering commit:", r, n, l, h), n = D.sanitizeText(n, C()), r = D.sanitizeText(r, C()), h = D.sanitizeText(h, C());
726
- const i = {
727
- id: n || W + "-" + ut(),
728
- message: r,
729
- seq: W++,
730
- type: l || Q.NORMAL,
731
- tag: h || "",
732
- parents: A == null ? [] : [A.id],
733
- branch: G
734
- };
735
- A = i, v[i.id] = i, L[G] = i.id, B.debug("in pushCommit " + i.id);
736
- }, Kt = function(r, n) {
737
- if (r = D.sanitizeText(r, C()), L[r] === void 0)
738
- L[r] = A != null ? A.id : null, tt[r] = { name: r, order: n ? parseInt(n, 10) : null }, yt(r), B.debug("in createBranch");
739
- else {
740
- let l = new Error(
741
- 'Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ' + r + '")'
742
- );
743
- throw l.hash = {
744
- text: "branch " + r,
745
- token: "branch " + r,
746
- line: "1",
747
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
748
- expected: ['"checkout ' + r + '"']
749
- }, l;
750
- }
751
- }, Ut = function(r, n, l, h) {
752
- r = D.sanitizeText(r, C()), n = D.sanitizeText(n, C());
753
- const i = v[L[G]], c = v[L[r]];
754
- if (G === r) {
755
- let m = new Error('Incorrect usage of "merge". Cannot merge a branch to itself');
756
- throw m.hash = {
757
- text: "merge " + r,
758
- token: "merge " + r,
759
- line: "1",
760
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
761
- expected: ["branch abc"]
762
- }, m;
763
- } else if (i === void 0 || !i) {
764
- let m = new Error(
765
- 'Incorrect usage of "merge". Current branch (' + G + ")has no commits"
766
- );
767
- throw m.hash = {
768
- text: "merge " + r,
769
- token: "merge " + r,
770
- line: "1",
771
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
772
- expected: ["commit"]
773
- }, m;
774
- } else if (L[r] === void 0) {
775
- let m = new Error(
776
- 'Incorrect usage of "merge". Branch to be merged (' + r + ") does not exist"
777
- );
778
- throw m.hash = {
779
- text: "merge " + r,
780
- token: "merge " + r,
781
- line: "1",
782
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
783
- expected: ["branch " + r]
784
- }, m;
785
- } else if (c === void 0 || !c) {
786
- let m = new Error(
787
- 'Incorrect usage of "merge". Branch to be merged (' + r + ") has no commits"
788
- );
789
- throw m.hash = {
790
- text: "merge " + r,
791
- token: "merge " + r,
792
- line: "1",
793
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
794
- expected: ['"commit"']
795
- }, m;
796
- } else if (i === c) {
797
- let m = new Error('Incorrect usage of "merge". Both branches have same head');
798
- throw m.hash = {
799
- text: "merge " + r,
800
- token: "merge " + r,
801
- line: "1",
802
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
803
- expected: ["branch abc"]
804
- }, m;
805
- } else if (n && v[n] !== void 0) {
806
- let m = new Error(
807
- 'Incorrect usage of "merge". Commit with id:' + n + " already exists, use different custom Id"
808
- );
809
- throw m.hash = {
810
- text: "merge " + r + n + l + h,
811
- token: "merge " + r + n + l + h,
812
- line: "1",
813
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
814
- expected: [
815
- "merge " + r + " " + n + "_UNIQUE " + l + " " + h
816
- ]
817
- }, m;
818
- }
819
- const p = {
820
- id: n || W + "-" + ut(),
821
- message: "merged branch " + r + " into " + G,
822
- seq: W++,
823
- parents: [A == null ? null : A.id, L[r]],
824
- branch: G,
825
- type: Q.MERGE,
826
- customType: l,
827
- customId: !!n,
828
- tag: h || ""
829
- };
830
- A = p, v[p.id] = p, L[G] = p.id, B.debug(L), B.debug("in mergeBranch");
831
- }, Wt = function(r, n, l, h) {
832
- if (B.debug("Entering cherryPick:", r, n, l), r = D.sanitizeText(r, C()), n = D.sanitizeText(n, C()), l = D.sanitizeText(l, C()), h = D.sanitizeText(h, C()), !r || v[r] === void 0) {
833
- let p = new Error(
834
- 'Incorrect usage of "cherryPick". Source commit id should exist and provided'
835
- );
836
- throw p.hash = {
837
- text: "cherryPick " + r + " " + n,
838
- token: "cherryPick " + r + " " + n,
839
- line: "1",
840
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
841
- expected: ["cherry-pick abc"]
842
- }, p;
843
- }
844
- let i = v[r], c = i.branch;
845
- if (h && !(Array.isArray(i.parents) && i.parents.includes(h)))
846
- throw new Error(
847
- "Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit."
848
- );
849
- if (i.type === Q.MERGE && !h)
850
- throw new Error(
851
- "Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified."
852
- );
853
- if (!n || v[n] === void 0) {
854
- if (c === G) {
855
- let x = new Error(
856
- 'Incorrect usage of "cherryPick". Source commit is already on current branch'
857
- );
858
- throw x.hash = {
859
- text: "cherryPick " + r + " " + n,
860
- token: "cherryPick " + r + " " + n,
861
- line: "1",
862
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
863
- expected: ["cherry-pick abc"]
864
- }, x;
865
- }
866
- const p = v[L[G]];
867
- if (p === void 0 || !p) {
868
- let x = new Error(
869
- 'Incorrect usage of "cherry-pick". Current branch (' + G + ")has no commits"
870
- );
871
- throw x.hash = {
872
- text: "cherryPick " + r + " " + n,
873
- token: "cherryPick " + r + " " + n,
874
- line: "1",
875
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
876
- expected: ["cherry-pick abc"]
877
- }, x;
878
- }
879
- const m = {
880
- id: W + "-" + ut(),
881
- message: "cherry-picked " + i + " into " + G,
882
- seq: W++,
883
- parents: [A == null ? null : A.id, i.id],
884
- branch: G,
885
- type: Q.CHERRY_PICK,
886
- tag: l ?? `cherry-pick:${i.id}${i.type === Q.MERGE ? `|parent:${h}` : ""}`
887
- };
888
- A = m, v[m.id] = m, L[G] = m.id, B.debug(L), B.debug("in cherryPick");
889
- }
890
- }, yt = function(r) {
891
- if (r = D.sanitizeText(r, C()), L[r] === void 0) {
892
- let n = new Error(
893
- 'Trying to checkout branch which is not yet created. (Help try using "branch ' + r + '")'
894
- );
895
- throw n.hash = {
896
- text: "checkout " + r,
897
- token: "checkout " + r,
898
- line: "1",
899
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
900
- expected: ['"branch ' + r + '"']
901
- }, n;
902
- } else {
903
- G = r;
904
- const n = L[G];
905
- A = v[n];
906
- }
907
- };
908
- function gt(r, n, l) {
909
- const h = r.indexOf(n);
910
- h === -1 ? r.push(l) : r.splice(h, 1, l);
911
- }
912
- function _t(r) {
913
- const n = r.reduce((i, c) => i.seq > c.seq ? i : c, r[0]);
914
- let l = "";
915
- r.forEach(function(i) {
916
- i === n ? l += " *" : l += " |";
917
- });
918
- const h = [l, n.id, n.seq];
919
- for (let i in L)
920
- L[i] === n.id && h.push(i);
921
- if (B.debug(h.join(" ")), n.parents && n.parents.length == 2) {
922
- const i = v[n.parents[0]];
923
- gt(r, n, i), r.push(v[n.parents[1]]);
924
- } else {
925
- if (n.parents.length == 0)
926
- return;
927
- {
928
- const i = v[n.parents];
929
- gt(r, n, i);
930
- }
931
- }
932
- r = zt(r, (i) => i.id), _t(r);
933
- }
934
- const Jt = function() {
935
- B.debug(v);
936
- const r = Et()[0];
937
- _t([r]);
938
- }, Qt = function() {
939
- v = {}, A = null;
940
- let r = C().gitGraph.mainBranchName, n = C().gitGraph.mainBranchOrder;
941
- L = {}, L[r] = null, tt = {}, tt[r] = { name: r, order: n }, G = r, W = 0, Ht();
942
- }, Xt = function() {
943
- return Object.values(tt).map((n, l) => n.order !== null ? n : {
944
- ...n,
945
- order: parseFloat(`0.${l}`, 10)
946
- }).sort((n, l) => n.order - l.order).map(({ name: n }) => ({ name: n }));
947
- }, Zt = function() {
948
- return L;
949
- }, $t = function() {
950
- return v;
951
- }, Et = function() {
952
- const r = Object.keys(v).map(function(n) {
953
- return v[n];
954
- });
955
- return r.forEach(function(n) {
956
- B.debug(n.id);
957
- }), r.sort((n, l) => n.seq - l.seq), r;
958
- }, te = function() {
959
- return G;
960
- }, ee = function() {
961
- return kt;
962
- }, re = function() {
963
- return A;
964
- }, Q = {
965
- NORMAL: 0,
966
- REVERSE: 1,
967
- HIGHLIGHT: 2,
968
- MERGE: 3,
969
- CHERRY_PICK: 4
970
- }, ie = {
971
- getConfig: () => C().gitGraph,
972
- setDirection: qt,
973
- setOptions: Yt,
974
- getOptions: jt,
975
- commit: Ft,
976
- branch: Kt,
977
- merge: Ut,
978
- cherryPick: Wt,
979
- checkout: yt,
980
- //reset,
981
- prettyPrint: Jt,
982
- clear: Qt,
983
- getBranchesAsObjArray: Xt,
984
- getBranches: Zt,
985
- getCommits: $t,
986
- getCommitsArray: Et,
987
- getCurrentBranch: te,
988
- getDirection: ee,
989
- getHead: re,
990
- setAccTitle: It,
991
- getAccTitle: Gt,
992
- getAccDescription: Pt,
993
- setAccDescription: Ot,
994
- setDiagramTitle: Ct,
995
- getDiagramTitle: vt,
996
- commitType: Q
997
- };
998
- let Z = {};
999
- const P = {
1000
- NORMAL: 0,
1001
- REVERSE: 1,
1002
- HIGHLIGHT: 2,
1003
- MERGE: 3,
1004
- CHERRY_PICK: 4
1005
- }, U = 8;
1006
- let H = {}, j = {}, nt = [], et = 0, w = "LR";
1007
- const se = () => {
1008
- H = {}, j = {}, Z = {}, et = 0, nt = [], w = "LR";
1009
- }, Tt = (r) => {
1010
- const n = document.createElementNS("http://www.w3.org/2000/svg", "text");
1011
- let l = [];
1012
- typeof r == "string" ? l = r.split(/\\n|\n|<br\s*\/?>/gi) : Array.isArray(r) ? l = r : l = [];
1013
- for (const h of l) {
1014
- const i = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
1015
- i.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), i.setAttribute("dy", "1em"), i.setAttribute("x", "0"), i.setAttribute("class", "row"), i.textContent = h.trim(), n.appendChild(i);
1016
- }
1017
- return n;
1018
- }, ae = (r) => {
1019
- let n = "", l = 0;
1020
- return r.forEach((h) => {
1021
- const i = w === "TB" ? j[h].y : j[h].x;
1022
- i >= l && (n = h, l = i);
1023
- }), n || void 0;
1024
- }, dt = (r, n, l) => {
1025
- const h = C().gitGraph, i = r.append("g").attr("class", "commit-bullets"), c = r.append("g").attr("class", "commit-labels");
1026
- let p = 0;
1027
- w === "TB" && (p = 30);
1028
- const x = Object.keys(n).sort((_, b) => n[_].seq - n[b].seq), y = h.parallelCommits, a = 10, R = 40;
1029
- x.forEach((_) => {
1030
- const b = n[_];
1031
- if (y)
1032
- if (b.parents.length) {
1033
- const E = ae(b.parents);
1034
- p = w === "TB" ? j[E].y + R : j[E].x + R;
1035
- } else
1036
- p = 0, w === "TB" && (p = 30);
1037
- const f = p + a, k = w === "TB" ? f : H[b.branch].pos, g = w === "TB" ? H[b.branch].pos : f;
1038
- if (l) {
1039
- let E, z = b.customType !== void 0 && b.customType !== "" ? b.customType : b.type;
1040
- switch (z) {
1041
- case P.NORMAL:
1042
- E = "commit-normal";
1043
- break;
1044
- case P.REVERSE:
1045
- E = "commit-reverse";
1046
- break;
1047
- case P.HIGHLIGHT:
1048
- E = "commit-highlight";
1049
- break;
1050
- case P.MERGE:
1051
- E = "commit-merge";
1052
- break;
1053
- case P.CHERRY_PICK:
1054
- E = "commit-cherry-pick";
1055
- break;
1056
- default:
1057
- E = "commit-normal";
1058
- }
1059
- if (z === P.HIGHLIGHT) {
1060
- const M = i.append("rect");
1061
- M.attr("x", g - 10), M.attr("y", k - 10), M.attr("height", 20), M.attr("width", 20), M.attr(
1062
- "class",
1063
- `commit ${b.id} commit-highlight${H[b.branch].index % U} ${E}-outer`
1064
- ), i.append("rect").attr("x", g - 6).attr("y", k - 6).attr("height", 12).attr("width", 12).attr(
1065
- "class",
1066
- `commit ${b.id} commit${H[b.branch].index % U} ${E}-inner`
1067
- );
1068
- } else if (z === P.CHERRY_PICK)
1069
- i.append("circle").attr("cx", g).attr("cy", k).attr("r", 10).attr("class", `commit ${b.id} ${E}`), i.append("circle").attr("cx", g - 3).attr("cy", k + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${b.id} ${E}`), i.append("circle").attr("cx", g + 3).attr("cy", k + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${b.id} ${E}`), i.append("line").attr("x1", g + 3).attr("y1", k + 1).attr("x2", g).attr("y2", k - 5).attr("stroke", "#fff").attr("class", `commit ${b.id} ${E}`), i.append("line").attr("x1", g - 3).attr("y1", k + 1).attr("x2", g).attr("y2", k - 5).attr("stroke", "#fff").attr("class", `commit ${b.id} ${E}`);
1070
- else {
1071
- const M = i.append("circle");
1072
- if (M.attr("cx", g), M.attr("cy", k), M.attr("r", b.type === P.MERGE ? 9 : 10), M.attr(
1073
- "class",
1074
- `commit ${b.id} commit${H[b.branch].index % U}`
1075
- ), z === P.MERGE) {
1076
- const S = i.append("circle");
1077
- S.attr("cx", g), S.attr("cy", k), S.attr("r", 6), S.attr(
1078
- "class",
1079
- `commit ${E} ${b.id} commit${H[b.branch].index % U}`
1080
- );
1081
- }
1082
- z === P.REVERSE && i.append("path").attr("d", `M ${g - 5},${k - 5}L${g + 5},${k + 5}M${g - 5},${k + 5}L${g + 5},${k - 5}`).attr(
1083
- "class",
1084
- `commit ${E} ${b.id} commit${H[b.branch].index % U}`
1085
- );
1086
- }
1087
- }
1088
- if (w === "TB" ? j[b.id] = { x: g, y: f } : j[b.id] = { x: f, y: k }, l) {
1089
- if (b.type !== P.CHERRY_PICK && (b.customId && b.type === P.MERGE || b.type !== P.MERGE) && h.showCommitLabel) {
1090
- const M = c.append("g"), S = M.insert("rect").attr("class", "commit-label-bkg"), I = M.append("text").attr("x", p).attr("y", k + 25).attr("class", "commit-label").text(b.id);
1091
- let o = I.node().getBBox();
1092
- if (S.attr("x", f - o.width / 2 - 2).attr("y", k + 13.5).attr("width", o.width + 4).attr("height", o.height + 4), w === "TB" && (S.attr("x", g - (o.width + 16 + 5)).attr("y", k - 12), I.attr("x", g - (o.width + 16)).attr("y", k + o.height - 12)), w !== "TB" && I.attr("x", f - o.width / 2), h.rotateCommitLabel)
1093
- if (w === "TB")
1094
- I.attr("transform", "rotate(-45, " + g + ", " + k + ")"), S.attr("transform", "rotate(-45, " + g + ", " + k + ")");
1095
- else {
1096
- let u = -7.5 - (o.width + 10) / 25 * 9.5, d = 10 + o.width / 25 * 8.5;
1097
- M.attr(
1098
- "transform",
1099
- "translate(" + u + ", " + d + ") rotate(-45, " + p + ", " + k + ")"
1100
- );
1101
- }
1102
- }
1103
- if (b.tag) {
1104
- const M = c.insert("polygon"), S = c.append("circle"), I = c.append("text").attr("y", k - 16).attr("class", "tag-label").text(b.tag);
1105
- let o = I.node().getBBox();
1106
- I.attr("x", f - o.width / 2);
1107
- const u = o.height / 2, d = k - 19.2;
1108
- M.attr("class", "tag-label-bkg").attr(
1109
- "points",
1110
- `
1111
- ${p - o.width / 2 - 4 / 2},${d + 2}
1112
- ${p - o.width / 2 - 4 / 2},${d - 2}
1113
- ${f - o.width / 2 - 4},${d - u - 2}
1114
- ${f + o.width / 2 + 4},${d - u - 2}
1115
- ${f + o.width / 2 + 4},${d + u + 2}
1116
- ${f - o.width / 2 - 4},${d + u + 2}`
1117
- ), S.attr("cx", p - o.width / 2 + 4 / 2).attr("cy", d).attr("r", 1.5).attr("class", "tag-hole"), w === "TB" && (M.attr("class", "tag-label-bkg").attr(
1118
- "points",
1119
- `
1120
- ${g},${p + 2}
1121
- ${g},${p - 2}
1122
- ${g + a},${p - u - 2}
1123
- ${g + a + o.width + 4},${p - u - 2}
1124
- ${g + a + o.width + 4},${p + u + 2}
1125
- ${g + a},${p + u + 2}`
1126
- ).attr("transform", "translate(12,12) rotate(45, " + g + "," + p + ")"), S.attr("cx", g + 4 / 2).attr("cy", p).attr("transform", "translate(12,12) rotate(45, " + g + "," + p + ")"), I.attr("x", g + 5).attr("y", p + 3).attr("transform", "translate(14,14) rotate(45, " + g + "," + p + ")"));
1127
- }
1128
- }
1129
- p += R + a, p > et && (et = p);
1130
- });
1131
- }, ne = (r, n, l, h, i) => {
1132
- const p = (w === "TB" ? l.x < h.x : l.y < h.y) ? n.branch : r.branch, m = (y) => y.branch === p, x = (y) => y.seq > r.seq && y.seq < n.seq;
1133
- return Object.values(i).some((y) => x(y) && m(y));
1134
- }, $ = (r, n, l = 0) => {
1135
- const h = r + Math.abs(r - n) / 2;
1136
- if (l > 5)
1137
- return h;
1138
- if (nt.every((p) => Math.abs(p - h) >= 10))
1139
- return nt.push(h), h;
1140
- const c = Math.abs(r - n);
1141
- return $(r, n - c / 5, l + 1);
1142
- }, ce = (r, n, l, h) => {
1143
- const i = j[n.id], c = j[l.id], p = ne(n, l, i, c, h);
1144
- let m = "", x = "", y = 0, a = 0, R = H[l.branch].index;
1145
- l.type === P.MERGE && n.id !== l.parents[0] && (R = H[n.branch].index);
1146
- let _;
1147
- if (p) {
1148
- m = "A 10 10, 0, 0, 0,", x = "A 10 10, 0, 0, 1,", y = 10, a = 10;
1149
- const b = i.y < c.y ? $(i.y, c.y) : $(c.y, i.y), f = i.x < c.x ? $(i.x, c.x) : $(c.x, i.x);
1150
- w === "TB" ? i.x < c.x ? _ = `M ${i.x} ${i.y} L ${f - y} ${i.y} ${x} ${f} ${i.y + a} L ${f} ${c.y - y} ${m} ${f + a} ${c.y} L ${c.x} ${c.y}` : (R = H[n.branch].index, _ = `M ${i.x} ${i.y} L ${f + y} ${i.y} ${m} ${f} ${i.y + a} L ${f} ${c.y - y} ${x} ${f - a} ${c.y} L ${c.x} ${c.y}`) : i.y < c.y ? _ = `M ${i.x} ${i.y} L ${i.x} ${b - y} ${m} ${i.x + a} ${b} L ${c.x - y} ${b} ${x} ${c.x} ${b + a} L ${c.x} ${c.y}` : (R = H[n.branch].index, _ = `M ${i.x} ${i.y} L ${i.x} ${b + y} ${x} ${i.x + a} ${b} L ${c.x - y} ${b} ${m} ${c.x} ${b - a} L ${c.x} ${c.y}`);
1151
- } else
1152
- m = "A 20 20, 0, 0, 0,", x = "A 20 20, 0, 0, 1,", y = 20, a = 20, w === "TB" ? (i.x < c.x && (l.type === P.MERGE && n.id !== l.parents[0] ? _ = `M ${i.x} ${i.y} L ${i.x} ${c.y - y} ${m} ${i.x + a} ${c.y} L ${c.x} ${c.y}` : _ = `M ${i.x} ${i.y} L ${c.x - y} ${i.y} ${x} ${c.x} ${i.y + a} L ${c.x} ${c.y}`), i.x > c.x && (m = "A 20 20, 0, 0, 0,", x = "A 20 20, 0, 0, 1,", y = 20, a = 20, l.type === P.MERGE && n.id !== l.parents[0] ? _ = `M ${i.x} ${i.y} L ${i.x} ${c.y - y} ${x} ${i.x - a} ${c.y} L ${c.x} ${c.y}` : _ = `M ${i.x} ${i.y} L ${c.x + y} ${i.y} ${m} ${c.x} ${i.y + a} L ${c.x} ${c.y}`), i.x === c.x && (_ = `M ${i.x} ${i.y} L ${c.x} ${c.y}`)) : (i.y < c.y && (l.type === P.MERGE && n.id !== l.parents[0] ? _ = `M ${i.x} ${i.y} L ${c.x - y} ${i.y} ${x} ${c.x} ${i.y + a} L ${c.x} ${c.y}` : _ = `M ${i.x} ${i.y} L ${i.x} ${c.y - y} ${m} ${i.x + a} ${c.y} L ${c.x} ${c.y}`), i.y > c.y && (l.type === P.MERGE && n.id !== l.parents[0] ? _ = `M ${i.x} ${i.y} L ${c.x - y} ${i.y} ${m} ${c.x} ${i.y - a} L ${c.x} ${c.y}` : _ = `M ${i.x} ${i.y} L ${i.x} ${c.y + y} ${x} ${i.x + a} ${c.y} L ${c.x} ${c.y}`), i.y === c.y && (_ = `M ${i.x} ${i.y} L ${c.x} ${c.y}`));
1153
- r.append("path").attr("d", _).attr("class", "arrow arrow" + R % U);
1154
- }, oe = (r, n) => {
1155
- const l = r.append("g").attr("class", "commit-arrows");
1156
- Object.keys(n).forEach((h) => {
1157
- const i = n[h];
1158
- i.parents && i.parents.length > 0 && i.parents.forEach((c) => {
1159
- ce(l, n[c], i, n);
1160
- });
1161
- });
1162
- }, le = (r, n) => {
1163
- const l = C().gitGraph, h = r.append("g");
1164
- n.forEach((i, c) => {
1165
- const p = c % U, m = H[i.name].pos, x = h.append("line");
1166
- x.attr("x1", 0), x.attr("y1", m), x.attr("x2", et), x.attr("y2", m), x.attr("class", "branch branch" + p), w === "TB" && (x.attr("y1", 30), x.attr("x1", m), x.attr("y2", et), x.attr("x2", m)), nt.push(m);
1167
- let y = i.name;
1168
- const a = Tt(y), R = h.insert("rect"), b = h.insert("g").attr("class", "branchLabel").insert("g").attr("class", "label branch-label" + p);
1169
- b.node().appendChild(a);
1170
- let f = a.getBBox();
1171
- R.attr("class", "branchLabelBkg label" + p).attr("rx", 4).attr("ry", 4).attr("x", -f.width - 4 - (l.rotateCommitLabel === !0 ? 30 : 0)).attr("y", -f.height / 2 + 8).attr("width", f.width + 18).attr("height", f.height + 4), b.attr(
1172
- "transform",
1173
- "translate(" + (-f.width - 14 - (l.rotateCommitLabel === !0 ? 30 : 0)) + ", " + (m - f.height / 2 - 1) + ")"
1174
- ), w === "TB" && (R.attr("x", m - f.width / 2 - 10).attr("y", 0), b.attr("transform", "translate(" + (m - f.width / 2 - 5) + ", 0)")), w !== "TB" && R.attr("transform", "translate(-19, " + (m - f.height / 2) + ")");
1175
- });
1176
- }, he = function(r, n, l, h) {
1177
- se();
1178
- const i = C(), c = i.gitGraph;
1179
- B.debug("in gitgraph renderer", r + `
1180
- `, "id:", n, l), Z = h.db.getCommits();
1181
- const p = h.db.getBranchesAsObjArray();
1182
- w = h.db.getDirection();
1183
- const m = St(`[id="${n}"]`);
1184
- let x = 0;
1185
- p.forEach((y, a) => {
1186
- const R = Tt(y.name), _ = m.append("g"), b = _.insert("g").attr("class", "branchLabel"), f = b.insert("g").attr("class", "label branch-label");
1187
- f.node().appendChild(R);
1188
- let k = R.getBBox();
1189
- H[y.name] = { pos: x, index: a }, x += 50 + (c.rotateCommitLabel ? 40 : 0) + (w === "TB" ? k.width / 2 : 0), f.remove(), b.remove(), _.remove();
1190
- }), dt(m, Z, !1), c.showBranches && le(m, p), oe(m, Z), dt(m, Z, !0), At.insertTitle(
1191
- m,
1192
- "gitTitleText",
1193
- c.titleTopMargin,
1194
- h.db.getDiagramTitle()
1195
- ), Nt(
1196
- void 0,
1197
- m,
1198
- c.diagramPadding,
1199
- c.useMaxWidth ?? i.useMaxWidth
1200
- );
1201
- }, me = {
1202
- draw: he
1203
- }, ue = (r) => `
1204
- .commit-id,
1205
- .commit-msg,
1206
- .branch-label {
1207
- fill: lightgrey;
1208
- color: lightgrey;
1209
- font-family: 'trebuchet ms', verdana, arial, sans-serif;
1210
- font-family: var(--mermaid-font-family);
1211
- }
1212
- ${[0, 1, 2, 3, 4, 5, 6, 7].map(
1213
- (n) => `
1214
- .branch-label${n} { fill: ${r["gitBranchLabel" + n]}; }
1215
- .commit${n} { stroke: ${r["git" + n]}; fill: ${r["git" + n]}; }
1216
- .commit-highlight${n} { stroke: ${r["gitInv" + n]}; fill: ${r["gitInv" + n]}; }
1217
- .label${n} { fill: ${r["git" + n]}; }
1218
- .arrow${n} { stroke: ${r["git" + n]}; }
1219
- `
1220
- ).join(`
1221
- `)}
1222
-
1223
- .branch {
1224
- stroke-width: 1;
1225
- stroke: ${r.lineColor};
1226
- stroke-dasharray: 2;
1227
- }
1228
- .commit-label { font-size: ${r.commitLabelFontSize}; fill: ${r.commitLabelColor};}
1229
- .commit-label-bkg { font-size: ${r.commitLabelFontSize}; fill: ${r.commitLabelBackground}; opacity: 0.5; }
1230
- .tag-label { font-size: ${r.tagLabelFontSize}; fill: ${r.tagLabelColor};}
1231
- .tag-label-bkg { fill: ${r.tagLabelBackground}; stroke: ${r.tagLabelBorder}; }
1232
- .tag-hole { fill: ${r.textColor}; }
1233
-
1234
- .commit-merge {
1235
- stroke: ${r.primaryColor};
1236
- fill: ${r.primaryColor};
1237
- }
1238
- .commit-reverse {
1239
- stroke: ${r.primaryColor};
1240
- fill: ${r.primaryColor};
1241
- stroke-width: 3;
1242
- }
1243
- .commit-highlight-outer {
1244
- }
1245
- .commit-highlight-inner {
1246
- stroke: ${r.primaryColor};
1247
- fill: ${r.primaryColor};
1248
- }
1249
-
1250
- .arrow { stroke-width: 8; stroke-linecap: round; fill: none}
1251
- .gitTitleText {
1252
- text-anchor: middle;
1253
- font-size: 18px;
1254
- fill: ${r.textColor};
1255
- }
1256
- `, fe = ue, be = {
1257
- parser: Vt,
1258
- db: ie,
1259
- renderer: me,
1260
- styles: fe
1261
- };
1262
- export {
1263
- be as diagram
1264
- };