lowcoder-comps 0.0.8 → 0.0.10

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 (41) hide show
  1. package/package.json +2 -10
  2. package/src/index.ts +0 -2
  3. package/package/012a06bb.js +0 -34
  4. package/package/06481cb7.js +0 -1060
  5. package/package/0c8b29d5.js +0 -6
  6. package/package/114884df.js +0 -805
  7. package/package/1264ddb2.js +0 -194
  8. package/package/1cee31ec.js +0 -1095
  9. package/package/269c3ba3.js +0 -46662
  10. package/package/2a2c2e55.js +0 -799
  11. package/package/2b3ab1e4.js +0 -98763
  12. package/package/37590a81.js +0 -967
  13. package/package/3cd7980e.js +0 -184
  14. package/package/40112498.js +0 -424
  15. package/package/4b6e1d6f.js +0 -24
  16. package/package/4bc1082b.js +0 -86
  17. package/package/53e49f9b.js +0 -1600
  18. package/package/55bd5c26.js +0 -266
  19. package/package/591684c8.js +0 -2071
  20. package/package/6c000872.js +0 -16
  21. package/package/756addec.js +0 -775
  22. package/package/7668124e.js +0 -8
  23. package/package/79e8eeeb.js +0 -949
  24. package/package/926fbfec.js +0 -91
  25. package/package/945eefb3.js +0 -2665
  26. package/package/a35f148e.js +0 -1228
  27. package/package/a4d12a43.js +0 -175
  28. package/package/a60de5d1.js +0 -804
  29. package/package/a8dde1ea.js +0 -589
  30. package/package/b4148642.js +0 -7
  31. package/package/b7dd22a2.js +0 -847
  32. package/package/d4f3a2c4.js +0 -18046
  33. package/package/e0f479f3.js +0 -91
  34. package/package/eaa160c9.js +0 -341
  35. package/package/f1bfd8b5.js +0 -311
  36. package/package/f1f9ba79.js +0 -900
  37. package/package/fba61f63.js +0 -2868
  38. package/package/icons/icon-chart.svg +0 -15
  39. package/package/icons/icon-comp-calendar.svg +0 -22
  40. package/package/index.js +0 -5
  41. package/package/package.json +0 -73
@@ -1,1228 +0,0 @@
1
- var Ge = Object.defineProperty, Pe = Object.defineProperties;
2
- var Ne = Object.getOwnPropertyDescriptors;
3
- var ke = Object.getOwnPropertySymbols;
4
- var He = Object.prototype.hasOwnProperty, De = Object.prototype.propertyIsEnumerable;
5
- var _e = (r, s, n) => s in r ? Ge(r, s, { enumerable: !0, configurable: !0, writable: !0, value: n }) : r[s] = n, xe = (r, s) => {
6
- for (var n in s || (s = {}))
7
- He.call(s, n) && _e(r, n, s[n]);
8
- if (ke)
9
- for (var n of ke(s))
10
- De.call(s, n) && _e(r, n, s[n]);
11
- return r;
12
- }, ye = (r, s) => Pe(r, Ne(s));
13
- import { c as A, s as Ve, g as ze, a as je, b as Be, v as qe, x as Ye, m as Ke, l as G, k as V, z as Fe, a5 as pe, h as Ue, y as We, a6 as Je, a7 as Qe } from "./2b3ab1e4.js";
14
- var me = function() {
15
- var r = function(B, l, u, b) {
16
- for (u = u || {}, b = B.length; b--; u[B[b]] = l)
17
- ;
18
- return u;
19
- }, s = [1, 4], n = [1, 7], h = [1, 5], c = [1, 9], o = [1, 6], f = [2, 6], p = [1, 16], v = [6, 8, 14, 20, 22, 24, 25, 27, 29, 32, 37, 40, 50, 55], y = [8, 14, 20, 22, 24, 25, 27, 29, 32, 37, 40], m = [8, 13, 14, 20, 22, 24, 25, 27, 29, 32, 37, 40], d = [1, 26], _ = [6, 8, 14, 50, 55], a = [8, 14, 55], C = [1, 53], w = [1, 52], H = [8, 14, 30, 33, 35, 38, 55], x = [1, 67], g = [1, 68], k = [1, 69], P = [8, 14, 33, 35, 42, 55], ae = {
20
- trace: function() {
21
- },
22
- yy: {},
23
- symbols_: { error: 2, start: 3, eol: 4, directive: 5, GG: 6, document: 7, EOF: 8, ":": 9, DIR: 10, options: 11, body: 12, OPT: 13, NL: 14, line: 15, statement: 16, commitStatement: 17, mergeStatement: 18, cherryPickStatement: 19, acc_title: 20, acc_title_value: 21, acc_descr: 22, acc_descr_value: 23, acc_descr_multiline_value: 24, section: 25, branchStatement: 26, CHECKOUT: 27, ref: 28, BRANCH: 29, ORDER: 30, NUM: 31, CHERRY_PICK: 32, COMMIT_ID: 33, STR: 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, openDirective: 46, typeDirective: 47, closeDirective: 48, argDirective: 49, open_directive: 50, type_directive: 51, arg_directive: 52, close_directive: 53, ID: 54, ";": 55, $accept: 0, $end: 1 },
24
- terminals_: { 2: "error", 6: "GG", 8: "EOF", 9: ":", 10: "DIR", 13: "OPT", 14: "NL", 20: "acc_title", 21: "acc_title_value", 22: "acc_descr", 23: "acc_descr_value", 24: "acc_descr_multiline_value", 25: "section", 27: "CHECKOUT", 29: "BRANCH", 30: "ORDER", 31: "NUM", 32: "CHERRY_PICK", 33: "COMMIT_ID", 34: "STR", 35: "COMMIT_TAG", 36: "EMPTYSTR", 37: "MERGE", 38: "COMMIT_TYPE", 40: "COMMIT", 42: "COMMIT_MSG", 43: "NORMAL", 44: "REVERSE", 45: "HIGHLIGHT", 50: "open_directive", 51: "type_directive", 52: "arg_directive", 53: "close_directive", 54: "ID", 55: ";" },
25
- productions_: [0, [3, 2], [3, 2], [3, 3], [3, 4], [3, 5], [7, 0], [7, 2], [11, 2], [11, 1], [12, 0], [12, 2], [15, 2], [15, 1], [16, 1], [16, 1], [16, 1], [16, 2], [16, 2], [16, 1], [16, 1], [16, 1], [16, 2], [26, 2], [26, 4], [19, 3], [19, 5], [19, 5], [19, 5], [19, 5], [18, 2], [18, 4], [18, 4], [18, 4], [18, 6], [18, 6], [18, 6], [18, 6], [18, 6], [18, 6], [18, 8], [18, 8], [18, 8], [18, 8], [18, 8], [18, 8], [17, 2], [17, 3], [17, 3], [17, 5], [17, 5], [17, 3], [17, 5], [17, 5], [17, 5], [17, 5], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 3], [17, 5], [17, 5], [17, 5], [17, 5], [17, 5], [17, 5], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [41, 0], [41, 1], [39, 1], [39, 1], [39, 1], [5, 3], [5, 5], [46, 1], [47, 1], [49, 1], [48, 1], [28, 1], [28, 1], [4, 1], [4, 1], [4, 1]],
26
- performAction: function(l, u, b, i, E, e, W) {
27
- var t = e.length - 1;
28
- switch (E) {
29
- case 3:
30
- return e[t];
31
- case 4:
32
- return e[t - 1];
33
- case 5:
34
- return i.setDirection(e[t - 3]), e[t - 1];
35
- case 7:
36
- i.setOptions(e[t - 1]), this.$ = e[t];
37
- break;
38
- case 8:
39
- e[t - 1] += e[t], this.$ = e[t - 1];
40
- break;
41
- case 10:
42
- this.$ = [];
43
- break;
44
- case 11:
45
- e[t - 1].push(e[t]), this.$ = e[t - 1];
46
- break;
47
- case 12:
48
- this.$ = e[t - 1];
49
- break;
50
- case 17:
51
- this.$ = e[t].trim(), i.setAccTitle(this.$);
52
- break;
53
- case 18:
54
- case 19:
55
- this.$ = e[t].trim(), i.setAccDescription(this.$);
56
- break;
57
- case 20:
58
- i.addSection(e[t].substr(8)), this.$ = e[t].substr(8);
59
- break;
60
- case 22:
61
- i.checkout(e[t]);
62
- break;
63
- case 23:
64
- i.branch(e[t]);
65
- break;
66
- case 24:
67
- i.branch(e[t - 2], e[t]);
68
- break;
69
- case 25:
70
- i.cherryPick(e[t], "", void 0);
71
- break;
72
- case 26:
73
- i.cherryPick(e[t - 2], "", e[t]);
74
- break;
75
- case 27:
76
- case 29:
77
- i.cherryPick(e[t - 2], "", "");
78
- break;
79
- case 28:
80
- i.cherryPick(e[t], "", e[t - 2]);
81
- break;
82
- case 30:
83
- i.merge(e[t], "", "", "");
84
- break;
85
- case 31:
86
- i.merge(e[t - 2], e[t], "", "");
87
- break;
88
- case 32:
89
- i.merge(e[t - 2], "", e[t], "");
90
- break;
91
- case 33:
92
- i.merge(e[t - 2], "", "", e[t]);
93
- break;
94
- case 34:
95
- i.merge(e[t - 4], e[t], "", e[t - 2]);
96
- break;
97
- case 35:
98
- i.merge(e[t - 4], "", e[t], e[t - 2]);
99
- break;
100
- case 36:
101
- i.merge(e[t - 4], "", e[t - 2], e[t]);
102
- break;
103
- case 37:
104
- i.merge(e[t - 4], e[t - 2], e[t], "");
105
- break;
106
- case 38:
107
- i.merge(e[t - 4], e[t - 2], "", e[t]);
108
- break;
109
- case 39:
110
- i.merge(e[t - 4], e[t], e[t - 2], "");
111
- break;
112
- case 40:
113
- i.merge(e[t - 6], e[t - 4], e[t - 2], e[t]);
114
- break;
115
- case 41:
116
- i.merge(e[t - 6], e[t], e[t - 4], e[t - 2]);
117
- break;
118
- case 42:
119
- i.merge(e[t - 6], e[t - 4], e[t], e[t - 2]);
120
- break;
121
- case 43:
122
- i.merge(e[t - 6], e[t - 2], e[t - 4], e[t]);
123
- break;
124
- case 44:
125
- i.merge(e[t - 6], e[t], e[t - 2], e[t - 4]);
126
- break;
127
- case 45:
128
- i.merge(e[t - 6], e[t - 2], e[t], e[t - 4]);
129
- break;
130
- case 46:
131
- i.commit(e[t]);
132
- break;
133
- case 47:
134
- i.commit("", "", i.commitType.NORMAL, e[t]);
135
- break;
136
- case 48:
137
- i.commit("", "", e[t], "");
138
- break;
139
- case 49:
140
- i.commit("", "", e[t], e[t - 2]);
141
- break;
142
- case 50:
143
- i.commit("", "", e[t - 2], e[t]);
144
- break;
145
- case 51:
146
- i.commit("", e[t], i.commitType.NORMAL, "");
147
- break;
148
- case 52:
149
- i.commit("", e[t - 2], i.commitType.NORMAL, e[t]);
150
- break;
151
- case 53:
152
- i.commit("", e[t], i.commitType.NORMAL, e[t - 2]);
153
- break;
154
- case 54:
155
- i.commit("", e[t - 2], e[t], "");
156
- break;
157
- case 55:
158
- i.commit("", e[t], e[t - 2], "");
159
- break;
160
- case 56:
161
- i.commit("", e[t - 4], e[t - 2], e[t]);
162
- break;
163
- case 57:
164
- i.commit("", e[t - 4], e[t], e[t - 2]);
165
- break;
166
- case 58:
167
- i.commit("", e[t - 2], e[t - 4], e[t]);
168
- break;
169
- case 59:
170
- i.commit("", e[t], e[t - 4], e[t - 2]);
171
- break;
172
- case 60:
173
- i.commit("", e[t], e[t - 2], e[t - 4]);
174
- break;
175
- case 61:
176
- i.commit("", e[t - 2], e[t], e[t - 4]);
177
- break;
178
- case 62:
179
- i.commit(e[t], "", i.commitType.NORMAL, "");
180
- break;
181
- case 63:
182
- i.commit(e[t], "", i.commitType.NORMAL, e[t - 2]);
183
- break;
184
- case 64:
185
- i.commit(e[t - 2], "", i.commitType.NORMAL, e[t]);
186
- break;
187
- case 65:
188
- i.commit(e[t - 2], "", e[t], "");
189
- break;
190
- case 66:
191
- i.commit(e[t], "", e[t - 2], "");
192
- break;
193
- case 67:
194
- i.commit(e[t], e[t - 2], i.commitType.NORMAL, "");
195
- break;
196
- case 68:
197
- i.commit(e[t - 2], e[t], i.commitType.NORMAL, "");
198
- break;
199
- case 69:
200
- i.commit(e[t - 4], "", e[t - 2], e[t]);
201
- break;
202
- case 70:
203
- i.commit(e[t - 4], "", e[t], e[t - 2]);
204
- break;
205
- case 71:
206
- i.commit(e[t - 2], "", e[t - 4], e[t]);
207
- break;
208
- case 72:
209
- i.commit(e[t], "", e[t - 4], e[t - 2]);
210
- break;
211
- case 73:
212
- i.commit(e[t], "", e[t - 2], e[t - 4]);
213
- break;
214
- case 74:
215
- i.commit(e[t - 2], "", e[t], e[t - 4]);
216
- break;
217
- case 75:
218
- i.commit(e[t - 4], e[t], e[t - 2], "");
219
- break;
220
- case 76:
221
- i.commit(e[t - 4], e[t - 2], e[t], "");
222
- break;
223
- case 77:
224
- i.commit(e[t - 2], e[t], e[t - 4], "");
225
- break;
226
- case 78:
227
- i.commit(e[t], e[t - 2], e[t - 4], "");
228
- break;
229
- case 79:
230
- i.commit(e[t], e[t - 4], e[t - 2], "");
231
- break;
232
- case 80:
233
- i.commit(e[t - 2], e[t - 4], e[t], "");
234
- break;
235
- case 81:
236
- i.commit(e[t - 4], e[t], i.commitType.NORMAL, e[t - 2]);
237
- break;
238
- case 82:
239
- i.commit(e[t - 4], e[t - 2], i.commitType.NORMAL, e[t]);
240
- break;
241
- case 83:
242
- i.commit(e[t - 2], e[t], i.commitType.NORMAL, e[t - 4]);
243
- break;
244
- case 84:
245
- i.commit(e[t], e[t - 2], i.commitType.NORMAL, e[t - 4]);
246
- break;
247
- case 85:
248
- i.commit(e[t], e[t - 4], i.commitType.NORMAL, e[t - 2]);
249
- break;
250
- case 86:
251
- i.commit(e[t - 2], e[t - 4], i.commitType.NORMAL, e[t]);
252
- break;
253
- case 87:
254
- i.commit(e[t - 6], e[t - 4], e[t - 2], e[t]);
255
- break;
256
- case 88:
257
- i.commit(e[t - 6], e[t - 4], e[t], e[t - 2]);
258
- break;
259
- case 89:
260
- i.commit(e[t - 6], e[t - 2], e[t - 4], e[t]);
261
- break;
262
- case 90:
263
- i.commit(e[t - 6], e[t], e[t - 4], e[t - 2]);
264
- break;
265
- case 91:
266
- i.commit(e[t - 6], e[t - 2], e[t], e[t - 4]);
267
- break;
268
- case 92:
269
- i.commit(e[t - 6], e[t], e[t - 2], e[t - 4]);
270
- break;
271
- case 93:
272
- i.commit(e[t - 4], e[t - 6], e[t - 2], e[t]);
273
- break;
274
- case 94:
275
- i.commit(e[t - 4], e[t - 6], e[t], e[t - 2]);
276
- break;
277
- case 95:
278
- i.commit(e[t - 2], e[t - 6], e[t - 4], e[t]);
279
- break;
280
- case 96:
281
- i.commit(e[t], e[t - 6], e[t - 4], e[t - 2]);
282
- break;
283
- case 97:
284
- i.commit(e[t - 2], e[t - 6], e[t], e[t - 4]);
285
- break;
286
- case 98:
287
- i.commit(e[t], e[t - 6], e[t - 2], e[t - 4]);
288
- break;
289
- case 99:
290
- i.commit(e[t], e[t - 4], e[t - 2], e[t - 6]);
291
- break;
292
- case 100:
293
- i.commit(e[t - 2], e[t - 4], e[t], e[t - 6]);
294
- break;
295
- case 101:
296
- i.commit(e[t], e[t - 2], e[t - 4], e[t - 6]);
297
- break;
298
- case 102:
299
- i.commit(e[t - 2], e[t], e[t - 4], e[t - 6]);
300
- break;
301
- case 103:
302
- i.commit(e[t - 4], e[t - 2], e[t], e[t - 6]);
303
- break;
304
- case 104:
305
- i.commit(e[t - 4], e[t], e[t - 2], e[t - 6]);
306
- break;
307
- case 105:
308
- i.commit(e[t - 2], e[t - 4], e[t - 6], e[t]);
309
- break;
310
- case 106:
311
- i.commit(e[t], e[t - 4], e[t - 6], e[t - 2]);
312
- break;
313
- case 107:
314
- i.commit(e[t - 2], e[t], e[t - 6], e[t - 4]);
315
- break;
316
- case 108:
317
- i.commit(e[t], e[t - 2], e[t - 6], e[t - 4]);
318
- break;
319
- case 109:
320
- i.commit(e[t - 4], e[t - 2], e[t - 6], e[t]);
321
- break;
322
- case 110:
323
- i.commit(e[t - 4], e[t], e[t - 6], e[t - 2]);
324
- break;
325
- case 111:
326
- this.$ = "";
327
- break;
328
- case 112:
329
- this.$ = e[t];
330
- break;
331
- case 113:
332
- this.$ = i.commitType.NORMAL;
333
- break;
334
- case 114:
335
- this.$ = i.commitType.REVERSE;
336
- break;
337
- case 115:
338
- this.$ = i.commitType.HIGHLIGHT;
339
- break;
340
- case 118:
341
- i.parseDirective("%%{", "open_directive");
342
- break;
343
- case 119:
344
- i.parseDirective(e[t], "type_directive");
345
- break;
346
- case 120:
347
- e[t] = e[t].trim().replace(/'/g, '"'), i.parseDirective(e[t], "arg_directive");
348
- break;
349
- case 121:
350
- i.parseDirective("}%%", "close_directive", "gitGraph");
351
- break;
352
- }
353
- },
354
- table: [{ 3: 1, 4: 2, 5: 3, 6: s, 8: n, 14: h, 46: 8, 50: c, 55: o }, { 1: [3] }, { 3: 10, 4: 2, 5: 3, 6: s, 8: n, 14: h, 46: 8, 50: c, 55: o }, { 3: 11, 4: 2, 5: 3, 6: s, 8: n, 14: h, 46: 8, 50: c, 55: o }, { 7: 12, 8: f, 9: [1, 13], 10: [1, 14], 11: 15, 14: p }, r(v, [2, 124]), r(v, [2, 125]), r(v, [2, 126]), { 47: 17, 51: [1, 18] }, { 51: [2, 118] }, { 1: [2, 1] }, { 1: [2, 2] }, { 8: [1, 19] }, { 7: 20, 8: f, 11: 15, 14: p }, { 9: [1, 21] }, r(y, [2, 10], { 12: 22, 13: [1, 23] }), r(m, [2, 9]), { 9: [1, 25], 48: 24, 53: d }, r([9, 53], [2, 119]), { 1: [2, 3] }, { 8: [1, 27] }, { 7: 28, 8: f, 11: 15, 14: p }, { 8: [2, 7], 14: [1, 31], 15: 29, 16: 30, 17: 32, 18: 33, 19: 34, 20: [1, 35], 22: [1, 36], 24: [1, 37], 25: [1, 38], 26: 39, 27: [1, 40], 29: [1, 44], 32: [1, 43], 37: [1, 42], 40: [1, 41] }, r(m, [2, 8]), r(_, [2, 116]), { 49: 45, 52: [1, 46] }, r(_, [2, 121]), { 1: [2, 4] }, { 8: [1, 47] }, r(y, [2, 11]), { 4: 48, 8: n, 14: h, 55: o }, r(y, [2, 13]), r(a, [2, 14]), r(a, [2, 15]), r(a, [2, 16]), { 21: [1, 49] }, { 23: [1, 50] }, r(a, [2, 19]), r(a, [2, 20]), r(a, [2, 21]), { 28: 51, 34: C, 54: w }, r(a, [2, 111], { 41: 54, 33: [1, 57], 34: [1, 59], 35: [1, 55], 38: [1, 56], 42: [1, 58] }), { 28: 60, 34: C, 54: w }, { 33: [1, 61], 35: [1, 62] }, { 28: 63, 34: C, 54: w }, { 48: 64, 53: d }, { 53: [2, 120] }, { 1: [2, 5] }, r(y, [2, 12]), r(a, [2, 17]), r(a, [2, 18]), r(a, [2, 22]), r(H, [2, 122]), r(H, [2, 123]), r(a, [2, 46]), { 34: [1, 65] }, { 39: 66, 43: x, 44: g, 45: k }, { 34: [1, 70] }, { 34: [1, 71] }, r(a, [2, 112]), r(a, [2, 30], { 33: [1, 72], 35: [1, 74], 38: [1, 73] }), { 34: [1, 75] }, { 34: [1, 76], 36: [1, 77] }, r(a, [2, 23], { 30: [1, 78] }), r(_, [2, 117]), r(a, [2, 47], { 33: [1, 80], 38: [1, 79], 42: [1, 81] }), r(a, [2, 48], { 33: [1, 83], 35: [1, 82], 42: [1, 84] }), r(P, [2, 113]), r(P, [2, 114]), r(P, [2, 115]), r(a, [2, 51], { 35: [1, 85], 38: [1, 86], 42: [1, 87] }), r(a, [2, 62], { 33: [1, 90], 35: [1, 88], 38: [1, 89] }), { 34: [1, 91] }, { 39: 92, 43: x, 44: g, 45: k }, { 34: [1, 93] }, r(a, [2, 25], { 35: [1, 94] }), { 33: [1, 95] }, { 33: [1, 96] }, { 31: [1, 97] }, { 39: 98, 43: x, 44: g, 45: k }, { 34: [1, 99] }, { 34: [1, 100] }, { 34: [1, 101] }, { 34: [1, 102] }, { 34: [1, 103] }, { 34: [1, 104] }, { 39: 105, 43: x, 44: g, 45: k }, { 34: [1, 106] }, { 34: [1, 107] }, { 39: 108, 43: x, 44: g, 45: k }, { 34: [1, 109] }, r(a, [2, 31], { 35: [1, 111], 38: [1, 110] }), r(a, [2, 32], { 33: [1, 113], 35: [1, 112] }), r(a, [2, 33], { 33: [1, 114], 38: [1, 115] }), { 34: [1, 116], 36: [1, 117] }, { 34: [1, 118] }, { 34: [1, 119] }, r(a, [2, 24]), r(a, [2, 49], { 33: [1, 120], 42: [1, 121] }), r(a, [2, 53], { 38: [1, 122], 42: [1, 123] }), r(a, [2, 63], { 33: [1, 125], 38: [1, 124] }), r(a, [2, 50], { 33: [1, 126], 42: [1, 127] }), r(a, [2, 55], { 35: [1, 128], 42: [1, 129] }), r(a, [2, 66], { 33: [1, 131], 35: [1, 130] }), r(a, [2, 52], { 38: [1, 132], 42: [1, 133] }), r(a, [2, 54], { 35: [1, 134], 42: [1, 135] }), r(a, [2, 67], { 35: [1, 137], 38: [1, 136] }), r(a, [2, 64], { 33: [1, 139], 38: [1, 138] }), r(a, [2, 65], { 33: [1, 141], 35: [1, 140] }), r(a, [2, 68], { 35: [1, 143], 38: [1, 142] }), { 39: 144, 43: x, 44: g, 45: k }, { 34: [1, 145] }, { 34: [1, 146] }, { 34: [1, 147] }, { 34: [1, 148] }, { 39: 149, 43: x, 44: g, 45: k }, r(a, [2, 26]), r(a, [2, 27]), r(a, [2, 28]), r(a, [2, 29]), { 34: [1, 150] }, { 34: [1, 151] }, { 39: 152, 43: x, 44: g, 45: k }, { 34: [1, 153] }, { 39: 154, 43: x, 44: g, 45: k }, { 34: [1, 155] }, { 34: [1, 156] }, { 34: [1, 157] }, { 34: [1, 158] }, { 34: [1, 159] }, { 34: [1, 160] }, { 34: [1, 161] }, { 39: 162, 43: x, 44: g, 45: k }, { 34: [1, 163] }, { 34: [1, 164] }, { 34: [1, 165] }, { 39: 166, 43: x, 44: g, 45: k }, { 34: [1, 167] }, { 39: 168, 43: x, 44: g, 45: k }, { 34: [1, 169] }, { 34: [1, 170] }, { 34: [1, 171] }, { 39: 172, 43: x, 44: g, 45: k }, { 34: [1, 173] }, r(a, [2, 37], { 35: [1, 174] }), r(a, [2, 38], { 38: [1, 175] }), r(a, [2, 36], { 33: [1, 176] }), r(a, [2, 39], { 35: [1, 177] }), r(a, [2, 34], { 38: [1, 178] }), r(a, [2, 35], { 33: [1, 179] }), r(a, [2, 60], { 42: [1, 180] }), r(a, [2, 73], { 33: [1, 181] }), r(a, [2, 61], { 42: [1, 182] }), r(a, [2, 84], { 38: [1, 183] }), r(a, [2, 74], { 33: [1, 184] }), r(a, [2, 83], { 38: [1, 185] }), r(a, [2, 59], { 42: [1, 186] }), r(a, [2, 72], { 33: [1, 187] }), r(a, [2, 58], { 42: [1, 188] }), r(a, [2, 78], { 35: [1, 189] }), r(a, [2, 71], { 33: [1, 190] }), r(a, [2, 77], { 35: [1, 191] }), r(a, [2, 57], { 42: [1, 192] }), r(a, [2, 85], { 38: [1, 193] }), r(a, [2, 56], { 42: [1, 194] }), r(a, [2, 79], { 35: [1, 195] }), r(a, [2, 80], { 35: [1, 196] }), r(a, [2, 86], { 38: [1, 197] }), r(a, [2, 70], { 33: [1, 198] }), r(a, [2, 81], { 38: [1, 199] }), r(a, [2, 69], { 33: [1, 200] }), r(a, [2, 75], { 35: [1, 201] }), r(a, [2, 76], { 35: [1, 202] }), r(a, [2, 82], { 38: [1, 203] }), { 34: [1, 204] }, { 39: 205, 43: x, 44: g, 45: k }, { 34: [1, 206] }, { 34: [1, 207] }, { 39: 208, 43: x, 44: g, 45: k }, { 34: [1, 209] }, { 34: [1, 210] }, { 34: [1, 211] }, { 34: [1, 212] }, { 39: 213, 43: x, 44: g, 45: k }, { 34: [1, 214] }, { 39: 215, 43: x, 44: g, 45: k }, { 34: [1, 216] }, { 34: [1, 217] }, { 34: [1, 218] }, { 34: [1, 219] }, { 34: [1, 220] }, { 34: [1, 221] }, { 34: [1, 222] }, { 39: 223, 43: x, 44: g, 45: k }, { 34: [1, 224] }, { 34: [1, 225] }, { 34: [1, 226] }, { 39: 227, 43: x, 44: g, 45: k }, { 34: [1, 228] }, { 39: 229, 43: x, 44: g, 45: k }, { 34: [1, 230] }, { 34: [1, 231] }, { 34: [1, 232] }, { 39: 233, 43: x, 44: g, 45: k }, r(a, [2, 40]), r(a, [2, 42]), r(a, [2, 41]), r(a, [2, 43]), r(a, [2, 45]), r(a, [2, 44]), r(a, [2, 101]), r(a, [2, 102]), r(a, [2, 99]), r(a, [2, 100]), r(a, [2, 104]), r(a, [2, 103]), r(a, [2, 108]), r(a, [2, 107]), r(a, [2, 106]), r(a, [2, 105]), r(a, [2, 110]), r(a, [2, 109]), r(a, [2, 98]), r(a, [2, 97]), r(a, [2, 96]), r(a, [2, 95]), r(a, [2, 93]), r(a, [2, 94]), r(a, [2, 92]), r(a, [2, 91]), r(a, [2, 90]), r(a, [2, 89]), r(a, [2, 87]), r(a, [2, 88])],
355
- defaultActions: { 9: [2, 118], 10: [2, 1], 11: [2, 2], 19: [2, 3], 27: [2, 4], 46: [2, 120], 47: [2, 5] },
356
- parseError: function(l, u) {
357
- if (u.recoverable)
358
- this.trace(l);
359
- else {
360
- var b = new Error(l);
361
- throw b.hash = u, b;
362
- }
363
- },
364
- parse: function(l) {
365
- var u = this, b = [0], i = [], E = [null], e = [], W = this.table, t = "", Z = 0, be = 0, Ae = 2, ge = 1, Oe = e.slice.call(arguments, 1), L = Object.create(this.lexer), q = { yy: {} };
366
- for (var ne in this.yy)
367
- Object.prototype.hasOwnProperty.call(this.yy, ne) && (q.yy[ne] = this.yy[ne]);
368
- L.setInput(l, q.yy), q.yy.lexer = L, q.yy.parser = this, typeof L.yylloc == "undefined" && (L.yylloc = {});
369
- var oe = L.yylloc;
370
- e.push(oe);
371
- var Se = L.options && L.options.ranges;
372
- typeof q.yy.parseError == "function" ? this.parseError = q.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
373
- function Ie() {
374
- var j;
375
- return j = i.pop() || L.lex() || ge, typeof j != "number" && (j instanceof Array && (i = j, j = i.pop()), j = u.symbols_[j] || j), j;
376
- }
377
- for (var S, Y, D, le, U = {}, $, z, de, ee; ; ) {
378
- if (Y = b[b.length - 1], this.defaultActions[Y] ? D = this.defaultActions[Y] : ((S === null || typeof S == "undefined") && (S = Ie()), D = W[Y] && W[Y][S]), typeof D == "undefined" || !D.length || !D[0]) {
379
- var he = "";
380
- ee = [];
381
- for ($ in W[Y])
382
- this.terminals_[$] && $ > Ae && ee.push("'" + this.terminals_[$] + "'");
383
- L.showPosition ? he = "Parse error on line " + (Z + 1) + `:
384
- ` + L.showPosition() + `
385
- Expecting ` + ee.join(", ") + ", got '" + (this.terminals_[S] || S) + "'" : he = "Parse error on line " + (Z + 1) + ": Unexpected " + (S == ge ? "end of input" : "'" + (this.terminals_[S] || S) + "'"), this.parseError(he, {
386
- text: L.match,
387
- token: this.terminals_[S] || S,
388
- line: L.yylineno,
389
- loc: oe,
390
- expected: ee
391
- });
392
- }
393
- if (D[0] instanceof Array && D.length > 1)
394
- throw new Error("Parse Error: multiple actions possible at state: " + Y + ", token: " + S);
395
- switch (D[0]) {
396
- case 1:
397
- b.push(S), E.push(L.yytext), e.push(L.yylloc), b.push(D[1]), S = null, be = L.yyleng, t = L.yytext, Z = L.yylineno, oe = L.yylloc;
398
- break;
399
- case 2:
400
- if (z = this.productions_[D[1]][1], U.$ = E[E.length - z], U._$ = {
401
- first_line: e[e.length - (z || 1)].first_line,
402
- last_line: e[e.length - 1].last_line,
403
- first_column: e[e.length - (z || 1)].first_column,
404
- last_column: e[e.length - 1].last_column
405
- }, Se && (U._$.range = [
406
- e[e.length - (z || 1)].range[0],
407
- e[e.length - 1].range[1]
408
- ]), le = this.performAction.apply(U, [
409
- t,
410
- be,
411
- Z,
412
- q.yy,
413
- D[1],
414
- E,
415
- e
416
- ].concat(Oe)), typeof le != "undefined")
417
- return le;
418
- z && (b = b.slice(0, -1 * z * 2), E = E.slice(0, -1 * z), e = e.slice(0, -1 * z)), b.push(this.productions_[D[1]][0]), E.push(U.$), e.push(U._$), de = W[b[b.length - 2]][b[b.length - 1]], b.push(de);
419
- break;
420
- case 3:
421
- return !0;
422
- }
423
- }
424
- return !0;
425
- }
426
- }, Me = function() {
427
- var B = {
428
- EOF: 1,
429
- parseError: function(u, b) {
430
- if (this.yy.parser)
431
- this.yy.parser.parseError(u, b);
432
- else
433
- throw new Error(u);
434
- },
435
- setInput: function(l, u) {
436
- return this.yy = u || this.yy || {}, this._input = l, 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
- input: function() {
444
- var l = this._input[0];
445
- this.yytext += l, this.yyleng++, this.offset++, this.match += l, this.matched += l;
446
- var u = l.match(/(?:\r\n?|\n).*/g);
447
- 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), l;
448
- },
449
- unput: function(l) {
450
- var u = l.length, b = l.split(/(?:\r\n?|\n)/g);
451
- this._input = l + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - u), this.offset -= u;
452
- var i = this.match.split(/(?:\r\n?|\n)/g);
453
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), b.length - 1 && (this.yylineno -= b.length - 1);
454
- var E = this.yylloc.range;
455
- return this.yylloc = {
456
- first_line: this.yylloc.first_line,
457
- last_line: this.yylineno + 1,
458
- first_column: this.yylloc.first_column,
459
- last_column: b ? (b.length === i.length ? this.yylloc.first_column : 0) + i[i.length - b.length].length - b[0].length : this.yylloc.first_column - u
460
- }, this.options.ranges && (this.yylloc.range = [E[0], E[0] + this.yyleng - u]), this.yyleng = this.yytext.length, this;
461
- },
462
- more: function() {
463
- return this._more = !0, this;
464
- },
465
- reject: function() {
466
- if (this.options.backtrack_lexer)
467
- this._backtrack = !0;
468
- else
469
- 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).
470
- ` + this.showPosition(), {
471
- text: "",
472
- token: null,
473
- line: this.yylineno
474
- });
475
- return this;
476
- },
477
- less: function(l) {
478
- this.unput(this.match.slice(l));
479
- },
480
- pastInput: function() {
481
- var l = this.matched.substr(0, this.matched.length - this.match.length);
482
- return (l.length > 20 ? "..." : "") + l.substr(-20).replace(/\n/g, "");
483
- },
484
- upcomingInput: function() {
485
- var l = this.match;
486
- return l.length < 20 && (l += this._input.substr(0, 20 - l.length)), (l.substr(0, 20) + (l.length > 20 ? "..." : "")).replace(/\n/g, "");
487
- },
488
- showPosition: function() {
489
- var l = this.pastInput(), u = new Array(l.length + 1).join("-");
490
- return l + this.upcomingInput() + `
491
- ` + u + "^";
492
- },
493
- test_match: function(l, u) {
494
- var b, i, E;
495
- if (this.options.backtrack_lexer && (E = {
496
- yylineno: this.yylineno,
497
- yylloc: {
498
- first_line: this.yylloc.first_line,
499
- last_line: this.last_line,
500
- first_column: this.yylloc.first_column,
501
- last_column: this.yylloc.last_column
502
- },
503
- yytext: this.yytext,
504
- match: this.match,
505
- matches: this.matches,
506
- matched: this.matched,
507
- yyleng: this.yyleng,
508
- offset: this.offset,
509
- _more: this._more,
510
- _input: this._input,
511
- yy: this.yy,
512
- conditionStack: this.conditionStack.slice(0),
513
- done: this.done
514
- }, this.options.ranges && (E.yylloc.range = this.yylloc.range.slice(0))), i = l[0].match(/(?:\r\n?|\n).*/g), i && (this.yylineno += i.length), this.yylloc = {
515
- first_line: this.yylloc.last_line,
516
- last_line: this.yylineno + 1,
517
- first_column: this.yylloc.last_column,
518
- last_column: i ? i[i.length - 1].length - i[i.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + l[0].length
519
- }, this.yytext += l[0], this.match += l[0], this.matches = l, 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(l[0].length), this.matched += l[0], b = this.performAction.call(this, this.yy, this, u, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), b)
520
- return b;
521
- if (this._backtrack) {
522
- for (var e in E)
523
- this[e] = E[e];
524
- return !1;
525
- }
526
- return !1;
527
- },
528
- next: function() {
529
- if (this.done)
530
- return this.EOF;
531
- this._input || (this.done = !0);
532
- var l, u, b, i;
533
- this._more || (this.yytext = "", this.match = "");
534
- for (var E = this._currentRules(), e = 0; e < E.length; e++)
535
- if (b = this._input.match(this.rules[E[e]]), b && (!u || b[0].length > u[0].length)) {
536
- if (u = b, i = e, this.options.backtrack_lexer) {
537
- if (l = this.test_match(b, E[e]), l !== !1)
538
- return l;
539
- if (this._backtrack) {
540
- u = !1;
541
- continue;
542
- } else
543
- return !1;
544
- } else if (!this.options.flex)
545
- break;
546
- }
547
- return u ? (l = this.test_match(u, E[i]), l !== !1 ? l : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
548
- ` + this.showPosition(), {
549
- text: "",
550
- token: null,
551
- line: this.yylineno
552
- });
553
- },
554
- lex: function() {
555
- var u = this.next();
556
- return u || this.lex();
557
- },
558
- begin: function(u) {
559
- this.conditionStack.push(u);
560
- },
561
- popState: function() {
562
- var u = this.conditionStack.length - 1;
563
- return u > 0 ? this.conditionStack.pop() : this.conditionStack[0];
564
- },
565
- _currentRules: function() {
566
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
567
- },
568
- topState: function(u) {
569
- return u = this.conditionStack.length - 1 - Math.abs(u || 0), u >= 0 ? this.conditionStack[u] : "INITIAL";
570
- },
571
- pushState: function(u) {
572
- this.begin(u);
573
- },
574
- stateStackSize: function() {
575
- return this.conditionStack.length;
576
- },
577
- options: { "case-insensitive": !0 },
578
- performAction: function(u, b, i, E) {
579
- switch (i) {
580
- case 0:
581
- return this.begin("open_directive"), 50;
582
- case 1:
583
- return this.begin("type_directive"), 51;
584
- case 2:
585
- return this.popState(), this.begin("arg_directive"), 9;
586
- case 3:
587
- return this.popState(), this.popState(), 53;
588
- case 4:
589
- return 52;
590
- case 5:
591
- return this.begin("acc_title"), 20;
592
- case 6:
593
- return this.popState(), "acc_title_value";
594
- case 7:
595
- return this.begin("acc_descr"), 22;
596
- case 8:
597
- return this.popState(), "acc_descr_value";
598
- case 9:
599
- this.begin("acc_descr_multiline");
600
- break;
601
- case 10:
602
- this.popState();
603
- break;
604
- case 11:
605
- return "acc_descr_multiline_value";
606
- case 12:
607
- return 14;
608
- case 13:
609
- break;
610
- case 14:
611
- break;
612
- case 15:
613
- return 6;
614
- case 16:
615
- return 40;
616
- case 17:
617
- return 33;
618
- case 18:
619
- return 38;
620
- case 19:
621
- return 42;
622
- case 20:
623
- return 43;
624
- case 21:
625
- return 44;
626
- case 22:
627
- return 45;
628
- case 23:
629
- return 35;
630
- case 24:
631
- return 29;
632
- case 25:
633
- return 30;
634
- case 26:
635
- return 37;
636
- case 27:
637
- return 32;
638
- case 28:
639
- return 27;
640
- case 29:
641
- return 10;
642
- case 30:
643
- return 10;
644
- case 31:
645
- return 9;
646
- case 32:
647
- return "CARET";
648
- case 33:
649
- this.begin("options");
650
- break;
651
- case 34:
652
- this.popState();
653
- break;
654
- case 35:
655
- return 13;
656
- case 36:
657
- return 36;
658
- case 37:
659
- this.begin("string");
660
- break;
661
- case 38:
662
- this.popState();
663
- break;
664
- case 39:
665
- return 34;
666
- case 40:
667
- return 31;
668
- case 41:
669
- return 54;
670
- case 42:
671
- return 8;
672
- }
673
- },
674
- rules: [/^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\n)*))/i, /^(?: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, /^(?:checkout(?=\s|$))/i, /^(?:LR\b)/i, /^(?:BT\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],
675
- conditions: { acc_descr_multiline: { rules: [10, 11], inclusive: !1 }, acc_descr: { rules: [8], inclusive: !1 }, acc_title: { rules: [6], inclusive: !1 }, close_directive: { rules: [], inclusive: !1 }, arg_directive: { rules: [3, 4], inclusive: !1 }, type_directive: { rules: [2, 3], inclusive: !1 }, open_directive: { rules: [1], inclusive: !1 }, options: { rules: [34, 35], inclusive: !1 }, string: { rules: [38, 39], inclusive: !1 }, INITIAL: { rules: [0, 5, 7, 9, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 36, 37, 40, 41, 42, 43], inclusive: !0 } }
676
- };
677
- return B;
678
- }();
679
- ae.lexer = Me;
680
- function ce() {
681
- this.yy = {};
682
- }
683
- return ce.prototype = ae, ae.Parser = ce, new ce();
684
- }();
685
- me.parser = me;
686
- const Xe = me;
687
- let te = A().gitGraph.mainBranchName, Ze = A().gitGraph.mainBranchOrder, R = {}, O = null, Q = {};
688
- Q[te] = { name: te, order: Ze };
689
- let T = {};
690
- T[te] = O;
691
- let M = te, we = "LR", F = 0;
692
- function fe() {
693
- return Qe({ length: 7 });
694
- }
695
- const $e = function(r, s, n) {
696
- Ke.parseDirective(this, r, s, n);
697
- };
698
- function et(r, s) {
699
- const n = /* @__PURE__ */ Object.create(null);
700
- return r.reduce((h, c) => {
701
- const o = s(c);
702
- return n[o] || (n[o] = !0, h.push(c)), h;
703
- }, []);
704
- }
705
- const tt = function(r) {
706
- we = r;
707
- };
708
- let Te = {};
709
- const rt = function(r) {
710
- G.debug("options str", r), r = r && r.trim(), r = r || "{}";
711
- try {
712
- Te = JSON.parse(r);
713
- } catch (s) {
714
- G.error("error while parsing gitGraph options", s.message);
715
- }
716
- }, it = function() {
717
- return Te;
718
- }, st = function(r, s, n, h) {
719
- G.debug("Entering commit:", r, s, n, h), s = V.sanitizeText(s, A()), r = V.sanitizeText(r, A()), h = V.sanitizeText(h, A());
720
- const c = {
721
- id: s || F + "-" + fe(),
722
- message: r,
723
- seq: F++,
724
- type: n || X.NORMAL,
725
- tag: h || "",
726
- parents: O == null ? [] : [O.id],
727
- branch: M
728
- };
729
- O = c, R[c.id] = c, T[M] = c.id, G.debug("in pushCommit " + c.id);
730
- }, at = function(r, s) {
731
- if (r = V.sanitizeText(r, A()), T[r] === void 0)
732
- T[r] = O != null ? O.id : null, Q[r] = { name: r, order: s ? parseInt(s, 10) : null }, Re(r), G.debug("in createBranch");
733
- else {
734
- let n = new Error(
735
- 'Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ' + r + '")'
736
- );
737
- throw n.hash = {
738
- text: "branch " + r,
739
- token: "branch " + r,
740
- line: "1",
741
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
742
- expected: ['"checkout ' + r + '"']
743
- }, n;
744
- }
745
- }, ct = function(r, s, n, h) {
746
- r = V.sanitizeText(r, A()), s = V.sanitizeText(s, A());
747
- const c = R[T[M]], o = R[T[r]];
748
- if (M === r) {
749
- let p = new Error('Incorrect usage of "merge". Cannot merge a branch to itself');
750
- throw p.hash = {
751
- text: "merge " + r,
752
- token: "merge " + r,
753
- line: "1",
754
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
755
- expected: ["branch abc"]
756
- }, p;
757
- } else if (c === void 0 || !c) {
758
- let p = new Error(
759
- 'Incorrect usage of "merge". Current branch (' + M + ")has no commits"
760
- );
761
- throw p.hash = {
762
- text: "merge " + r,
763
- token: "merge " + r,
764
- line: "1",
765
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
766
- expected: ["commit"]
767
- }, p;
768
- } else if (T[r] === void 0) {
769
- let p = new Error(
770
- 'Incorrect usage of "merge". Branch to be merged (' + r + ") does not exist"
771
- );
772
- throw p.hash = {
773
- text: "merge " + r,
774
- token: "merge " + r,
775
- line: "1",
776
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
777
- expected: ["branch " + r]
778
- }, p;
779
- } else if (o === void 0 || !o) {
780
- let p = new Error(
781
- 'Incorrect usage of "merge". Branch to be merged (' + r + ") has no commits"
782
- );
783
- throw p.hash = {
784
- text: "merge " + r,
785
- token: "merge " + r,
786
- line: "1",
787
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
788
- expected: ['"commit"']
789
- }, p;
790
- } else if (c === o) {
791
- let p = new Error('Incorrect usage of "merge". Both branches have same head');
792
- throw p.hash = {
793
- text: "merge " + r,
794
- token: "merge " + r,
795
- line: "1",
796
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
797
- expected: ["branch abc"]
798
- }, p;
799
- } else if (s && R[s] !== void 0) {
800
- let p = new Error(
801
- 'Incorrect usage of "merge". Commit with id:' + s + " already exists, use different custom Id"
802
- );
803
- throw p.hash = {
804
- text: "merge " + r + s + n + h,
805
- token: "merge " + r + s + n + h,
806
- line: "1",
807
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
808
- expected: [
809
- "merge " + r + " " + s + "_UNIQUE " + n + " " + h
810
- ]
811
- }, p;
812
- }
813
- const f = {
814
- id: s || F + "-" + fe(),
815
- message: "merged branch " + r + " into " + M,
816
- seq: F++,
817
- parents: [O == null ? null : O.id, T[r]],
818
- branch: M,
819
- type: X.MERGE,
820
- customType: n,
821
- customId: !!s,
822
- tag: h || ""
823
- };
824
- O = f, R[f.id] = f, T[M] = f.id, G.debug(T), G.debug("in mergeBranch");
825
- }, nt = function(r, s, n) {
826
- if (G.debug("Entering cherryPick:", r, s, n), r = V.sanitizeText(r, A()), s = V.sanitizeText(s, A()), n = V.sanitizeText(n, A()), !r || R[r] === void 0) {
827
- let o = new Error(
828
- 'Incorrect usage of "cherryPick". Source commit id should exist and provided'
829
- );
830
- throw o.hash = {
831
- text: "cherryPick " + r + " " + s,
832
- token: "cherryPick " + r + " " + s,
833
- line: "1",
834
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
835
- expected: ["cherry-pick abc"]
836
- }, o;
837
- }
838
- let h = R[r], c = h.branch;
839
- if (h.type === X.MERGE) {
840
- let o = new Error(
841
- 'Incorrect usage of "cherryPick". Source commit should not be a merge commit'
842
- );
843
- throw o.hash = {
844
- text: "cherryPick " + r + " " + s,
845
- token: "cherryPick " + r + " " + s,
846
- line: "1",
847
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
848
- expected: ["cherry-pick abc"]
849
- }, o;
850
- }
851
- if (!s || R[s] === void 0) {
852
- if (c === M) {
853
- let p = new Error(
854
- 'Incorrect usage of "cherryPick". Source commit is already on current branch'
855
- );
856
- throw p.hash = {
857
- text: "cherryPick " + r + " " + s,
858
- token: "cherryPick " + r + " " + s,
859
- line: "1",
860
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
861
- expected: ["cherry-pick abc"]
862
- }, p;
863
- }
864
- const o = R[T[M]];
865
- if (o === void 0 || !o) {
866
- let p = new Error(
867
- 'Incorrect usage of "cherry-pick". Current branch (' + M + ")has no commits"
868
- );
869
- throw p.hash = {
870
- text: "cherryPick " + r + " " + s,
871
- token: "cherryPick " + r + " " + s,
872
- line: "1",
873
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
874
- expected: ["cherry-pick abc"]
875
- }, p;
876
- }
877
- const f = {
878
- id: F + "-" + fe(),
879
- message: "cherry-picked " + h + " into " + M,
880
- seq: F++,
881
- parents: [O == null ? null : O.id, h.id],
882
- branch: M,
883
- type: X.CHERRY_PICK,
884
- tag: n != null ? n : "cherry-pick:" + h.id
885
- };
886
- O = f, R[f.id] = f, T[M] = f.id, G.debug(T), G.debug("in cherryPick");
887
- }
888
- }, Re = function(r) {
889
- if (r = V.sanitizeText(r, A()), T[r] === void 0) {
890
- let s = new Error(
891
- 'Trying to checkout branch which is not yet created. (Help try using "branch ' + r + '")'
892
- );
893
- throw s.hash = {
894
- text: "checkout " + r,
895
- token: "checkout " + r,
896
- line: "1",
897
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
898
- expected: ['"branch ' + r + '"']
899
- }, s;
900
- } else {
901
- M = r;
902
- const s = T[M];
903
- O = R[s];
904
- }
905
- };
906
- function Ee(r, s, n) {
907
- const h = r.indexOf(s);
908
- h === -1 ? r.push(n) : r.splice(h, 1, n);
909
- }
910
- function Ce(r) {
911
- const s = r.reduce((c, o) => c.seq > o.seq ? c : o, r[0]);
912
- let n = "";
913
- r.forEach(function(c) {
914
- c === s ? n += " *" : n += " |";
915
- });
916
- const h = [n, s.id, s.seq];
917
- for (let c in T)
918
- T[c] === s.id && h.push(c);
919
- if (G.debug(h.join(" ")), s.parents && s.parents.length == 2) {
920
- const c = R[s.parents[0]];
921
- Ee(r, s, c), r.push(R[s.parents[1]]);
922
- } else {
923
- if (s.parents.length == 0)
924
- return;
925
- {
926
- const c = R[s.parents];
927
- Ee(r, s, c);
928
- }
929
- }
930
- r = et(r, (c) => c.id), Ce(r);
931
- }
932
- const ot = function() {
933
- G.debug(R);
934
- const r = Le()[0];
935
- Ce([r]);
936
- }, lt = function() {
937
- R = {}, O = null;
938
- let r = A().gitGraph.mainBranchName, s = A().gitGraph.mainBranchOrder;
939
- T = {}, T[r] = null, Q = {}, Q[r] = { name: r, order: s }, M = r, F = 0, Fe();
940
- }, ht = function() {
941
- return Object.values(Q).map((s, n) => s.order !== null ? s : ye(xe({}, s), {
942
- order: parseFloat(`0.${n}`, 10)
943
- })).sort((s, n) => s.order - n.order).map(({ name: s }) => ({ name: s }));
944
- }, mt = function() {
945
- return T;
946
- }, ut = function() {
947
- return R;
948
- }, Le = function() {
949
- const r = Object.keys(R).map(function(s) {
950
- return R[s];
951
- });
952
- return r.forEach(function(s) {
953
- G.debug(s.id);
954
- }), r.sort((s, n) => s.seq - n.seq), r;
955
- }, pt = function() {
956
- return M;
957
- }, ft = function() {
958
- return we;
959
- }, bt = function() {
960
- return O;
961
- }, X = {
962
- NORMAL: 0,
963
- REVERSE: 1,
964
- HIGHLIGHT: 2,
965
- MERGE: 3,
966
- CHERRY_PICK: 4
967
- }, gt = {
968
- parseDirective: $e,
969
- getConfig: () => A().gitGraph,
970
- setDirection: tt,
971
- setOptions: rt,
972
- getOptions: it,
973
- commit: st,
974
- branch: at,
975
- merge: ct,
976
- cherryPick: nt,
977
- checkout: Re,
978
- prettyPrint: ot,
979
- clear: lt,
980
- getBranchesAsObjArray: ht,
981
- getBranches: mt,
982
- getCommits: ut,
983
- getCommitsArray: Le,
984
- getCurrentBranch: pt,
985
- getDirection: ft,
986
- getHead: bt,
987
- setAccTitle: Ve,
988
- getAccTitle: ze,
989
- getAccDescription: je,
990
- setAccDescription: Be,
991
- setDiagramTitle: qe,
992
- getDiagramTitle: Ye,
993
- commitType: X
994
- };
995
- let J = {};
996
- const N = {
997
- NORMAL: 0,
998
- REVERSE: 1,
999
- HIGHLIGHT: 2,
1000
- MERGE: 3,
1001
- CHERRY_PICK: 4
1002
- }, K = 8;
1003
- let I = {}, re = {}, ie = [], se = 0;
1004
- const dt = () => {
1005
- I = {}, re = {}, J = {}, se = 0, ie = [];
1006
- }, kt = (r) => {
1007
- const s = document.createElementNS("http://www.w3.org/2000/svg", "text");
1008
- let n = [];
1009
- typeof r == "string" ? n = r.split(/\\n|\n|<br\s*\/?>/gi) : Array.isArray(r) ? n = r : n = [];
1010
- for (const h of n) {
1011
- const c = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
1012
- c.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), c.setAttribute("dy", "1em"), c.setAttribute("x", "0"), c.setAttribute("class", "row"), c.textContent = h.trim(), s.appendChild(c);
1013
- }
1014
- return s;
1015
- }, ve = (r, s, n) => {
1016
- const h = pe().gitGraph, c = r.append("g").attr("class", "commit-bullets"), o = r.append("g").attr("class", "commit-labels");
1017
- let f = 0;
1018
- Object.keys(s).sort((y, m) => s[y].seq - s[m].seq).forEach((y) => {
1019
- const m = s[y], d = I[m.branch].pos, _ = f + 10;
1020
- if (n) {
1021
- let a, C = m.customType !== void 0 && m.customType !== "" ? m.customType : m.type;
1022
- switch (C) {
1023
- case N.NORMAL:
1024
- a = "commit-normal";
1025
- break;
1026
- case N.REVERSE:
1027
- a = "commit-reverse";
1028
- break;
1029
- case N.HIGHLIGHT:
1030
- a = "commit-highlight";
1031
- break;
1032
- case N.MERGE:
1033
- a = "commit-merge";
1034
- break;
1035
- case N.CHERRY_PICK:
1036
- a = "commit-cherry-pick";
1037
- break;
1038
- default:
1039
- a = "commit-normal";
1040
- }
1041
- if (C === N.HIGHLIGHT) {
1042
- const w = c.append("rect");
1043
- w.attr("x", _ - 10), w.attr("y", d - 10), w.attr("height", 20), w.attr("width", 20), w.attr(
1044
- "class",
1045
- `commit ${m.id} commit-highlight${I[m.branch].index % K} ${a}-outer`
1046
- ), c.append("rect").attr("x", _ - 6).attr("y", d - 6).attr("height", 12).attr("width", 12).attr(
1047
- "class",
1048
- `commit ${m.id} commit${I[m.branch].index % K} ${a}-inner`
1049
- );
1050
- } else if (C === N.CHERRY_PICK)
1051
- c.append("circle").attr("cx", _).attr("cy", d).attr("r", 10).attr("class", `commit ${m.id} ${a}`), c.append("circle").attr("cx", _ - 3).attr("cy", d + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${m.id} ${a}`), c.append("circle").attr("cx", _ + 3).attr("cy", d + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${m.id} ${a}`), c.append("line").attr("x1", _ + 3).attr("y1", d + 1).attr("x2", _).attr("y2", d - 5).attr("stroke", "#fff").attr("class", `commit ${m.id} ${a}`), c.append("line").attr("x1", _ - 3).attr("y1", d + 1).attr("x2", _).attr("y2", d - 5).attr("stroke", "#fff").attr("class", `commit ${m.id} ${a}`);
1052
- else {
1053
- const w = c.append("circle");
1054
- if (w.attr("cx", _), w.attr("cy", d), w.attr("r", m.type === N.MERGE ? 9 : 10), w.attr(
1055
- "class",
1056
- `commit ${m.id} commit${I[m.branch].index % K}`
1057
- ), C === N.MERGE) {
1058
- const H = c.append("circle");
1059
- H.attr("cx", _), H.attr("cy", d), H.attr("r", 6), H.attr(
1060
- "class",
1061
- `commit ${a} ${m.id} commit${I[m.branch].index % K}`
1062
- );
1063
- }
1064
- C === N.REVERSE && c.append("path").attr("d", `M ${_ - 5},${d - 5}L${_ + 5},${d + 5}M${_ - 5},${d + 5}L${_ + 5},${d - 5}`).attr(
1065
- "class",
1066
- `commit ${a} ${m.id} commit${I[m.branch].index % K}`
1067
- );
1068
- }
1069
- }
1070
- if (re[m.id] = { x: f + 10, y: d }, n) {
1071
- if (m.type !== N.CHERRY_PICK && (m.customId && m.type === N.MERGE || m.type !== N.MERGE) && h.showCommitLabel) {
1072
- const w = o.append("g"), H = w.insert("rect").attr("class", "commit-label-bkg"), x = w.append("text").attr("x", f).attr("y", d + 25).attr("class", "commit-label").text(m.id);
1073
- let g = x.node().getBBox();
1074
- if (H.attr("x", f + 10 - g.width / 2 - 2).attr("y", d + 13.5).attr("width", g.width + 2 * 2).attr("height", g.height + 2 * 2), x.attr("x", f + 10 - g.width / 2), h.rotateCommitLabel) {
1075
- let k = -7.5 - (g.width + 10) / 25 * 9.5, P = 10 + g.width / 25 * 8.5;
1076
- w.attr(
1077
- "transform",
1078
- "translate(" + k + ", " + P + ") rotate(" + -45 + ", " + f + ", " + d + ")"
1079
- );
1080
- }
1081
- }
1082
- if (m.tag) {
1083
- const w = o.insert("polygon"), H = o.append("circle"), x = o.append("text").attr("y", d - 16).attr("class", "tag-label").text(m.tag);
1084
- let g = x.node().getBBox();
1085
- x.attr("x", f + 10 - g.width / 2);
1086
- const k = g.height / 2, P = d - 19.2;
1087
- w.attr("class", "tag-label-bkg").attr(
1088
- "points",
1089
- `
1090
- ${f - g.width / 2 - 4 / 2},${P + 2}
1091
- ${f - g.width / 2 - 4 / 2},${P - 2}
1092
- ${f + 10 - g.width / 2 - 4},${P - k - 2}
1093
- ${f + 10 + g.width / 2 + 4},${P - k - 2}
1094
- ${f + 10 + g.width / 2 + 4},${P + k + 2}
1095
- ${f + 10 - g.width / 2 - 4},${P + k + 2}`
1096
- ), H.attr("cx", f - g.width / 2 + 4 / 2).attr("cy", P).attr("r", 1.5).attr("class", "tag-hole");
1097
- }
1098
- }
1099
- f += 50, f > se && (se = f);
1100
- });
1101
- }, _t = (r, s, n) => Object.keys(n).filter((o) => n[o].branch === s.branch && n[o].seq > r.seq && n[o].seq < s.seq).length > 0, ue = (r, s, n = 0) => {
1102
- const h = r + Math.abs(r - s) / 2;
1103
- if (n > 5)
1104
- return h;
1105
- if (ie.every((f) => Math.abs(f - h) >= 10))
1106
- return ie.push(h), h;
1107
- const o = Math.abs(r - s);
1108
- return ue(r, s - o / 5, n + 1);
1109
- }, xt = (r, s, n, h) => {
1110
- const c = re[s.id], o = re[n.id], f = _t(s, n, h);
1111
- let p = "", v = "", y = 0, m = 0, d = I[n.branch].index, _;
1112
- if (f) {
1113
- p = "A 10 10, 0, 0, 0,", v = "A 10 10, 0, 0, 1,", y = 10, m = 10, d = I[n.branch].index;
1114
- const a = c.y < o.y ? ue(c.y, o.y) : ue(o.y, c.y);
1115
- c.y < o.y ? _ = `M ${c.x} ${c.y} L ${c.x} ${a - y} ${p} ${c.x + m} ${a} L ${o.x - y} ${a} ${v} ${o.x} ${a + m} L ${o.x} ${o.y}` : _ = `M ${c.x} ${c.y} L ${c.x} ${a + y} ${v} ${c.x + m} ${a} L ${o.x - y} ${a} ${p} ${o.x} ${a - m} L ${o.x} ${o.y}`;
1116
- } else
1117
- c.y < o.y && (p = "A 20 20, 0, 0, 0,", y = 20, m = 20, d = I[n.branch].index, _ = `M ${c.x} ${c.y} L ${c.x} ${o.y - y} ${p} ${c.x + m} ${o.y} L ${o.x} ${o.y}`), c.y > o.y && (p = "A 20 20, 0, 0, 0,", y = 20, m = 20, d = I[s.branch].index, _ = `M ${c.x} ${c.y} L ${o.x - y} ${c.y} ${p} ${o.x} ${c.y - m} L ${o.x} ${o.y}`), c.y === o.y && (d = I[s.branch].index, _ = `M ${c.x} ${c.y} L ${c.x} ${o.y - y} ${p} ${c.x + m} ${o.y} L ${o.x} ${o.y}`);
1118
- r.append("path").attr("d", _).attr("class", "arrow arrow" + d % K);
1119
- }, yt = (r, s) => {
1120
- const n = r.append("g").attr("class", "commit-arrows");
1121
- Object.keys(s).forEach((h) => {
1122
- const c = s[h];
1123
- c.parents && c.parents.length > 0 && c.parents.forEach((o) => {
1124
- xt(n, s[o], c, s);
1125
- });
1126
- });
1127
- }, Et = (r, s) => {
1128
- const n = pe().gitGraph, h = r.append("g");
1129
- s.forEach((c, o) => {
1130
- const f = o % K, p = I[c.name].pos, v = h.append("line");
1131
- v.attr("x1", 0), v.attr("y1", p), v.attr("x2", se), v.attr("y2", p), v.attr("class", "branch branch" + f), ie.push(p);
1132
- let y = c.name;
1133
- const m = kt(y), d = h.insert("rect"), a = h.insert("g").attr("class", "branchLabel").insert("g").attr("class", "label branch-label" + f);
1134
- a.node().appendChild(m);
1135
- let C = m.getBBox();
1136
- d.attr("class", "branchLabelBkg label" + f).attr("rx", 4).attr("ry", 4).attr("x", -C.width - 4 - (n.rotateCommitLabel === !0 ? 30 : 0)).attr("y", -C.height / 2 + 8).attr("width", C.width + 18).attr("height", C.height + 4), a.attr(
1137
- "transform",
1138
- "translate(" + (-C.width - 14 - (n.rotateCommitLabel === !0 ? 30 : 0)) + ", " + (p - C.height / 2 - 1) + ")"
1139
- ), d.attr("transform", "translate(" + -19 + ", " + (p - C.height / 2) + ")");
1140
- });
1141
- }, vt = function(r, s, n, h) {
1142
- var y;
1143
- dt();
1144
- const c = pe(), o = c.gitGraph;
1145
- G.debug("in gitgraph renderer", r + `
1146
- `, "id:", s, n), J = h.db.getCommits();
1147
- const f = h.db.getBranchesAsObjArray();
1148
- let p = 0;
1149
- f.forEach((m, d) => {
1150
- I[m.name] = { pos: p, index: d }, p += 50 + (o.rotateCommitLabel ? 40 : 0);
1151
- });
1152
- const v = Ue(`[id="${s}"]`);
1153
- ve(v, J, !1), o.showBranches && Et(v, f), yt(v, J), ve(v, J, !0), We.insertTitle(
1154
- v,
1155
- "gitTitleText",
1156
- o.titleTopMargin,
1157
- h.db.getDiagramTitle()
1158
- ), Je(
1159
- void 0,
1160
- v,
1161
- o.diagramPadding,
1162
- (y = o.useMaxWidth) != null ? y : c.useMaxWidth
1163
- );
1164
- }, wt = {
1165
- draw: vt
1166
- }, Tt = (r) => `
1167
- .commit-id,
1168
- .commit-msg,
1169
- .branch-label {
1170
- fill: lightgrey;
1171
- color: lightgrey;
1172
- font-family: 'trebuchet ms', verdana, arial, sans-serif;
1173
- font-family: var(--mermaid-font-family);
1174
- }
1175
- ${[0, 1, 2, 3, 4, 5, 6, 7].map(
1176
- (s) => `
1177
- .branch-label${s} { fill: ${r["gitBranchLabel" + s]}; }
1178
- .commit${s} { stroke: ${r["git" + s]}; fill: ${r["git" + s]}; }
1179
- .commit-highlight${s} { stroke: ${r["gitInv" + s]}; fill: ${r["gitInv" + s]}; }
1180
- .label${s} { fill: ${r["git" + s]}; }
1181
- .arrow${s} { stroke: ${r["git" + s]}; }
1182
- `
1183
- ).join(`
1184
- `)}
1185
-
1186
- .branch {
1187
- stroke-width: 1;
1188
- stroke: ${r.lineColor};
1189
- stroke-dasharray: 2;
1190
- }
1191
- .commit-label { font-size: ${r.commitLabelFontSize}; fill: ${r.commitLabelColor};}
1192
- .commit-label-bkg { font-size: ${r.commitLabelFontSize}; fill: ${r.commitLabelBackground}; opacity: 0.5; }
1193
- .tag-label { font-size: ${r.tagLabelFontSize}; fill: ${r.tagLabelColor};}
1194
- .tag-label-bkg { fill: ${r.tagLabelBackground}; stroke: ${r.tagLabelBorder}; }
1195
- .tag-hole { fill: ${r.textColor}; }
1196
-
1197
- .commit-merge {
1198
- stroke: ${r.primaryColor};
1199
- fill: ${r.primaryColor};
1200
- }
1201
- .commit-reverse {
1202
- stroke: ${r.primaryColor};
1203
- fill: ${r.primaryColor};
1204
- stroke-width: 3;
1205
- }
1206
- .commit-highlight-outer {
1207
- }
1208
- .commit-highlight-inner {
1209
- stroke: ${r.primaryColor};
1210
- fill: ${r.primaryColor};
1211
- }
1212
-
1213
- .arrow { stroke-width: 8; stroke-linecap: round; fill: none}
1214
- .gitTitleText {
1215
- text-anchor: middle;
1216
- font-size: 18px;
1217
- fill: ${r.textColor};
1218
- }
1219
- }
1220
- `, Rt = Tt, Mt = {
1221
- parser: Xe,
1222
- db: gt,
1223
- renderer: wt,
1224
- styles: Rt
1225
- };
1226
- export {
1227
- Mt as diagram
1228
- };