@sourcegraph/amp 0.0.1749571294-gef5aa3 → 0.0.1749600114-g5c00b8

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 (61) hide show
  1. package/dist/amp.js +3 -3
  2. package/dist/architectureDiagram-RWNHDUBN-1v8WgxdD.js +4635 -0
  3. package/dist/blockDiagram-XZSR5OGQ-XFBYN-jB.js +2243 -0
  4. package/dist/c4Diagram-6R2MQUNL-B0L0pltn.js +1587 -0
  5. package/dist/chunk-COUQ6RZ3-qd4eG6tc.js +17852 -0
  6. package/dist/chunk-CRQPXCKQ-yjI467Bq.js +65 -0
  7. package/dist/chunk-EFPBJHX4-DdHmqd0M.js +1378 -0
  8. package/dist/chunk-EOAU2GW5-CpRNAcjo.js +253 -0
  9. package/dist/chunk-IHYUGLNO-DJcRQIf7.js +1365 -0
  10. package/dist/chunk-K2ZEYYM2-CbqHhUqy.js +9 -0
  11. package/dist/chunk-Q7VUVKE6-gBSSbdjU.js +24 -0
  12. package/dist/chunk-T2M37SMK-Br8mK30k.js +1411 -0
  13. package/dist/chunk-TGZYFRKZ-BYBLXoJz.js +1331 -0
  14. package/dist/chunk-YJGJQOYZ-BGiSkWF0.js +19 -0
  15. package/dist/classDiagram-LB37KKQG-DhFsEyDS.js +17 -0
  16. package/dist/classDiagram-v2-KFQJBC22-DhFsEyDS.js +17 -0
  17. package/dist/{client-C1WG2nEf.js → client-D-YAg8x6.js} +6 -6
  18. package/dist/{console-DK0gDzNQ.js → console-CoE5Qzyz.js} +41106 -22971
  19. package/dist/create_file.node-Co0Uh1F3.js +21 -0
  20. package/dist/dagre-CMTPJJKG-UDPzd9Iy.js +446 -0
  21. package/dist/diagram-BIPOGRU5-B7TV59-n.js +128 -0
  22. package/dist/diagram-YF4VECWA-LsAZsciQ.js +219 -0
  23. package/dist/{edit_file.node-BH524GkF.js → edit_file.node-CmTZeBc2.js} +11 -11
  24. package/dist/erDiagram-AK44R45H-BWpeEu7D.js +843 -0
  25. package/dist/{executable-5cBRGrsC.js → executable-BE7tfoX5.js} +1 -1
  26. package/dist/{files-CybxYgbE.js → files-DqpRf5q4.js} +10 -10
  27. package/dist/flowDiagram-XARHJDSH-DzpV02UB.js +1618 -0
  28. package/dist/ganttDiagram-H5QQZTZ5-C0BhJTzn.js +1605 -0
  29. package/dist/gitGraphDiagram-XHLTLO3W-0EiOmv44.js +701 -0
  30. package/dist/{glob.node-C6HbLuPt.js → glob.node-DNei8bFS.js} +11 -11
  31. package/dist/{index-C2wo7rRZ.js → index-BcjxaWOc.js} +31 -31
  32. package/dist/infoDiagram-TP2HPDHO-CQX5a0Fc.js +24 -0
  33. package/dist/journeyDiagram-VHRN44N3-C82dEe4G.js +809 -0
  34. package/dist/kanban-definition-K5J3OUUV-xilJcrom.js +718 -0
  35. package/dist/katex-5N2NCDMP-CAsrnb6_.js +11703 -0
  36. package/dist/{list_directory.node-ZQscizpi.js → list_directory.node-CMiNNbXP.js} +1 -1
  37. package/dist/{load-profile-BbmyxO_7.js → load-profile-Cg8XaTx6.js} +1 -1
  38. package/dist/{main-BVP_XL7v.js → main-Dy2VZM_S.js} +15 -15
  39. package/dist/mindmap-definition-TI5ONXTW-BNaRba4R.js +3221 -0
  40. package/dist/{node-DvmQAW7h.js → node-BtG1o_DD.js} +2 -2
  41. package/dist/{node-syWQvN9a.js → node-BulbxvrV.js} +58 -58
  42. package/dist/{node-Cpbjmhrj.js → node-Cp3D7_hw.js} +71 -71
  43. package/dist/{node-Cye82yIV.js → node-CtoBdTQT.js} +3 -3
  44. package/dist/{node-CiFAW-F3.js → node-Ctw1i0nl.js} +12 -12
  45. package/dist/{node-CgVq0JJ9.js → node-D1zxOCuN.js} +1 -1
  46. package/dist/pieDiagram-FPR3CNQC-_30_tQz0.js +120 -0
  47. package/dist/quadrantDiagram-RLP5YTJ2-CTD43GTk.js +1028 -0
  48. package/dist/radar-MK3ICKWK-55CS4JTO-afihMdR4.js +14398 -0
  49. package/dist/{read_file.node-CIdAFiJ6.js → read_file.node-QZ0VCmB2.js} +1 -1
  50. package/dist/requirementDiagram-P5NVWGNK-Sd2_6g8e.js +853 -0
  51. package/dist/sankeyDiagram-C6NZRJHT-D1EcCYaw.js +864 -0
  52. package/dist/sequenceDiagram-6SLVIXKN-CghQTpGf.js +2283 -0
  53. package/dist/stateDiagram-WI5ZVJ5I-Bv21MlSK.js +272 -0
  54. package/dist/stateDiagram-v2-KVDSFUFK-BgP0D8xL.js +17 -0
  55. package/dist/{stdio-DNCc59wT.js → stdio-CCCGI3C7.js} +8 -8
  56. package/dist/storybook.js +7 -7
  57. package/dist/timeline-definition-65575674-BUqRZdJ-.js +800 -0
  58. package/dist/{undo_edit.node-VYuTxRwd.js → undo_edit.node-BkletvTZ.js} +5 -5
  59. package/dist/xychartDiagram-674MFTBU-DjBabATx.js +1291 -0
  60. package/package.json +1 -1
  61. package/dist/create_file.node-DtVTaHj5.js +0 -21
@@ -0,0 +1,701 @@
1
+ #!/usr/bin/env node
2
+ import { I as U } from "./chunk-YJGJQOYZ-BGiSkWF0.js";
3
+ import { p as Y } from "./chunk-K2ZEYYM2-CbqHhUqy.js";
4
+ import { p as K } from "./radar-MK3ICKWK-55CS4JTO-afihMdR4.js";
5
+ import { _ as l, U as V, T as X, u as J, v as Q, w as Z, x as rr, A as b, y as er, z as tr, S as ar, a3 as sr, Z as nr, L as C, a4 as or, a5 as cr, a6 as ir, a7 as dr } from "./console-CoE5Qzyz.js";
6
+ import "./chunk-TGZYFRKZ-BYBLXoJz.js";
7
+ var p = {
8
+ NORMAL: 0,
9
+ REVERSE: 1,
10
+ HIGHLIGHT: 2,
11
+ MERGE: 3,
12
+ CHERRY_PICK: 4
13
+ }, hr = ir.gitGraph, I = /* @__PURE__ */ l(() => or({
14
+ ...hr,
15
+ ...cr().gitGraph
16
+ }), "getConfig"), c = new U(() => {
17
+ const t = I(), r = t.mainBranchName, s = t.mainBranchOrder;
18
+ return {
19
+ mainBranchName: r,
20
+ commits: /* @__PURE__ */ new Map(),
21
+ head: null,
22
+ branchConfig: /* @__PURE__ */ new Map([[r, { name: r, order: s }]]),
23
+ branches: /* @__PURE__ */ new Map([[r, null]]),
24
+ currBranch: r,
25
+ direction: "LR",
26
+ seq: 0,
27
+ options: {}
28
+ };
29
+ });
30
+ function _() {
31
+ return dr({ length: 7 });
32
+ }
33
+ l(_, "getID");
34
+ function F(t, r) {
35
+ const s = /* @__PURE__ */ Object.create(null);
36
+ return t.reduce((n, e) => {
37
+ const a = r(e);
38
+ return s[a] || (s[a] = !0, n.push(e)), n;
39
+ }, []);
40
+ }
41
+ l(F, "uniqBy");
42
+ var lr = /* @__PURE__ */ l(function(t) {
43
+ c.records.direction = t;
44
+ }, "setDirection"), $r = /* @__PURE__ */ l(function(t) {
45
+ b.debug("options str", t), t = t?.trim(), t = t || "{}";
46
+ try {
47
+ c.records.options = JSON.parse(t);
48
+ } catch (r) {
49
+ b.error("error while parsing gitGraph options", r.message);
50
+ }
51
+ }, "setOptions"), fr = /* @__PURE__ */ l(function() {
52
+ return c.records.options;
53
+ }, "getOptions"), gr = /* @__PURE__ */ l(function(t) {
54
+ let r = t.msg, s = t.id;
55
+ const n = t.type;
56
+ let e = t.tags;
57
+ b.info("commit", r, s, n, e), b.debug("Entering commit:", r, s, n, e);
58
+ const a = I();
59
+ s = C.sanitizeText(s, a), r = C.sanitizeText(r, a), e = e?.map((o) => C.sanitizeText(o, a));
60
+ const d = {
61
+ id: s || c.records.seq + "-" + _(),
62
+ message: r,
63
+ seq: c.records.seq++,
64
+ type: n ?? p.NORMAL,
65
+ tags: e ?? [],
66
+ parents: c.records.head == null ? [] : [c.records.head.id],
67
+ branch: c.records.currBranch
68
+ };
69
+ c.records.head = d, b.info("main branch", a.mainBranchName), c.records.commits.set(d.id, d), c.records.branches.set(c.records.currBranch, d.id), b.debug("in pushCommit " + d.id);
70
+ }, "commit"), yr = /* @__PURE__ */ l(function(t) {
71
+ let r = t.name;
72
+ const s = t.order;
73
+ if (r = C.sanitizeText(r, I()), c.records.branches.has(r))
74
+ throw new Error(
75
+ `Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`
76
+ );
77
+ c.records.branches.set(r, c.records.head != null ? c.records.head.id : null), c.records.branchConfig.set(r, { name: r, order: s }), D(r), b.debug("in createBranch");
78
+ }, "branch"), ur = /* @__PURE__ */ l((t) => {
79
+ let r = t.branch, s = t.id;
80
+ const n = t.type, e = t.tags, a = I();
81
+ r = C.sanitizeText(r, a), s && (s = C.sanitizeText(s, a));
82
+ const d = c.records.branches.get(c.records.currBranch), o = c.records.branches.get(r), f = d ? c.records.commits.get(d) : void 0, h = o ? c.records.commits.get(o) : void 0;
83
+ if (f && h && f.branch === r)
84
+ throw new Error(`Cannot merge branch '${r}' into itself.`);
85
+ if (c.records.currBranch === r) {
86
+ const i = new Error('Incorrect usage of "merge". Cannot merge a branch to itself');
87
+ throw i.hash = {
88
+ text: `merge ${r}`,
89
+ token: `merge ${r}`,
90
+ expected: ["branch abc"]
91
+ }, i;
92
+ }
93
+ if (f === void 0 || !f) {
94
+ const i = new Error(
95
+ `Incorrect usage of "merge". Current branch (${c.records.currBranch})has no commits`
96
+ );
97
+ throw i.hash = {
98
+ text: `merge ${r}`,
99
+ token: `merge ${r}`,
100
+ expected: ["commit"]
101
+ }, i;
102
+ }
103
+ if (!c.records.branches.has(r)) {
104
+ const i = new Error(
105
+ 'Incorrect usage of "merge". Branch to be merged (' + r + ") does not exist"
106
+ );
107
+ throw i.hash = {
108
+ text: `merge ${r}`,
109
+ token: `merge ${r}`,
110
+ expected: [`branch ${r}`]
111
+ }, i;
112
+ }
113
+ if (h === void 0 || !h) {
114
+ const i = new Error(
115
+ 'Incorrect usage of "merge". Branch to be merged (' + r + ") has no commits"
116
+ );
117
+ throw i.hash = {
118
+ text: `merge ${r}`,
119
+ token: `merge ${r}`,
120
+ expected: ['"commit"']
121
+ }, i;
122
+ }
123
+ if (f === h) {
124
+ const i = new Error('Incorrect usage of "merge". Both branches have same head');
125
+ throw i.hash = {
126
+ text: `merge ${r}`,
127
+ token: `merge ${r}`,
128
+ expected: ["branch abc"]
129
+ }, i;
130
+ }
131
+ if (s && c.records.commits.has(s)) {
132
+ const i = new Error(
133
+ 'Incorrect usage of "merge". Commit with id:' + s + " already exists, use different custom Id"
134
+ );
135
+ throw i.hash = {
136
+ text: `merge ${r} ${s} ${n} ${e?.join(" ")}`,
137
+ token: `merge ${r} ${s} ${n} ${e?.join(" ")}`,
138
+ expected: [
139
+ `merge ${r} ${s}_UNIQUE ${n} ${e?.join(" ")}`
140
+ ]
141
+ }, i;
142
+ }
143
+ const $ = o || "", g = {
144
+ id: s || `${c.records.seq}-${_()}`,
145
+ message: `merged branch ${r} into ${c.records.currBranch}`,
146
+ seq: c.records.seq++,
147
+ parents: c.records.head == null ? [] : [c.records.head.id, $],
148
+ branch: c.records.currBranch,
149
+ type: p.MERGE,
150
+ customType: n,
151
+ customId: !!s,
152
+ tags: e ?? []
153
+ };
154
+ c.records.head = g, c.records.commits.set(g.id, g), c.records.branches.set(c.records.currBranch, g.id), b.debug(c.records.branches), b.debug("in mergeBranch");
155
+ }, "merge"), xr = /* @__PURE__ */ l(function(t) {
156
+ let r = t.id, s = t.targetId, n = t.tags, e = t.parent;
157
+ b.debug("Entering cherryPick:", r, s, n);
158
+ const a = I();
159
+ if (r = C.sanitizeText(r, a), s = C.sanitizeText(s, a), n = n?.map((f) => C.sanitizeText(f, a)), e = C.sanitizeText(e, a), !r || !c.records.commits.has(r)) {
160
+ const f = new Error(
161
+ 'Incorrect usage of "cherryPick". Source commit id should exist and provided'
162
+ );
163
+ throw f.hash = {
164
+ text: `cherryPick ${r} ${s}`,
165
+ token: `cherryPick ${r} ${s}`,
166
+ expected: ["cherry-pick abc"]
167
+ }, f;
168
+ }
169
+ const d = c.records.commits.get(r);
170
+ if (d === void 0 || !d)
171
+ throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');
172
+ if (e && !(Array.isArray(d.parents) && d.parents.includes(e)))
173
+ throw new Error(
174
+ "Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit."
175
+ );
176
+ const o = d.branch;
177
+ if (d.type === p.MERGE && !e)
178
+ throw new Error(
179
+ "Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified."
180
+ );
181
+ if (!s || !c.records.commits.has(s)) {
182
+ if (o === c.records.currBranch) {
183
+ const g = new Error(
184
+ 'Incorrect usage of "cherryPick". Source commit is already on current branch'
185
+ );
186
+ throw g.hash = {
187
+ text: `cherryPick ${r} ${s}`,
188
+ token: `cherryPick ${r} ${s}`,
189
+ expected: ["cherry-pick abc"]
190
+ }, g;
191
+ }
192
+ const f = c.records.branches.get(c.records.currBranch);
193
+ if (f === void 0 || !f) {
194
+ const g = new Error(
195
+ `Incorrect usage of "cherry-pick". Current branch (${c.records.currBranch})has no commits`
196
+ );
197
+ throw g.hash = {
198
+ text: `cherryPick ${r} ${s}`,
199
+ token: `cherryPick ${r} ${s}`,
200
+ expected: ["cherry-pick abc"]
201
+ }, g;
202
+ }
203
+ const h = c.records.commits.get(f);
204
+ if (h === void 0 || !h) {
205
+ const g = new Error(
206
+ `Incorrect usage of "cherry-pick". Current branch (${c.records.currBranch})has no commits`
207
+ );
208
+ throw g.hash = {
209
+ text: `cherryPick ${r} ${s}`,
210
+ token: `cherryPick ${r} ${s}`,
211
+ expected: ["cherry-pick abc"]
212
+ }, g;
213
+ }
214
+ const $ = {
215
+ id: c.records.seq + "-" + _(),
216
+ message: `cherry-picked ${d?.message} into ${c.records.currBranch}`,
217
+ seq: c.records.seq++,
218
+ parents: c.records.head == null ? [] : [c.records.head.id, d.id],
219
+ branch: c.records.currBranch,
220
+ type: p.CHERRY_PICK,
221
+ tags: n ? n.filter(Boolean) : [
222
+ `cherry-pick:${d.id}${d.type === p.MERGE ? `|parent:${e}` : ""}`
223
+ ]
224
+ };
225
+ c.records.head = $, c.records.commits.set($.id, $), c.records.branches.set(c.records.currBranch, $.id), b.debug(c.records.branches), b.debug("in cherryPick");
226
+ }
227
+ }, "cherryPick"), D = /* @__PURE__ */ l(function(t) {
228
+ if (t = C.sanitizeText(t, I()), c.records.branches.has(t)) {
229
+ c.records.currBranch = t;
230
+ const r = c.records.branches.get(c.records.currBranch);
231
+ r === void 0 || !r ? c.records.head = null : c.records.head = c.records.commits.get(r) ?? null;
232
+ } else {
233
+ const r = new Error(
234
+ `Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`
235
+ );
236
+ throw r.hash = {
237
+ text: `checkout ${t}`,
238
+ token: `checkout ${t}`,
239
+ expected: [`branch ${t}`]
240
+ }, r;
241
+ }
242
+ }, "checkout");
243
+ function H(t, r, s) {
244
+ const n = t.indexOf(r);
245
+ n === -1 ? t.push(s) : t.splice(n, 1, s);
246
+ }
247
+ l(H, "upsert");
248
+ function P(t) {
249
+ const r = t.reduce((e, a) => e.seq > a.seq ? e : a, t[0]);
250
+ let s = "";
251
+ t.forEach(function(e) {
252
+ e === r ? s += " *" : s += " |";
253
+ });
254
+ const n = [s, r.id, r.seq];
255
+ for (const e in c.records.branches)
256
+ c.records.branches.get(e) === r.id && n.push(e);
257
+ if (b.debug(n.join(" ")), r.parents && r.parents.length == 2 && r.parents[0] && r.parents[1]) {
258
+ const e = c.records.commits.get(r.parents[0]);
259
+ H(t, r, e), r.parents[1] && t.push(c.records.commits.get(r.parents[1]));
260
+ } else {
261
+ if (r.parents.length == 0)
262
+ return;
263
+ if (r.parents[0]) {
264
+ const e = c.records.commits.get(r.parents[0]);
265
+ H(t, r, e);
266
+ }
267
+ }
268
+ t = F(t, (e) => e.id), P(t);
269
+ }
270
+ l(P, "prettyPrintCommitHistory");
271
+ var pr = /* @__PURE__ */ l(function() {
272
+ b.debug(c.records.commits);
273
+ const t = N()[0];
274
+ P([t]);
275
+ }, "prettyPrint"), br = /* @__PURE__ */ l(function() {
276
+ c.reset(), nr();
277
+ }, "clear"), mr = /* @__PURE__ */ l(function() {
278
+ return [...c.records.branchConfig.values()].map((r, s) => r.order !== null && r.order !== void 0 ? r : {
279
+ ...r,
280
+ order: parseFloat(`0.${s}`)
281
+ }).sort((r, s) => (r.order ?? 0) - (s.order ?? 0)).map(({ name: r }) => ({ name: r }));
282
+ }, "getBranchesAsObjArray"), wr = /* @__PURE__ */ l(function() {
283
+ return c.records.branches;
284
+ }, "getBranches"), vr = /* @__PURE__ */ l(function() {
285
+ return c.records.commits;
286
+ }, "getCommits"), N = /* @__PURE__ */ l(function() {
287
+ const t = [...c.records.commits.values()];
288
+ return t.forEach(function(r) {
289
+ b.debug(r.id);
290
+ }), t.sort((r, s) => r.seq - s.seq), t;
291
+ }, "getCommitsArray"), Cr = /* @__PURE__ */ l(function() {
292
+ return c.records.currBranch;
293
+ }, "getCurrentBranch"), Er = /* @__PURE__ */ l(function() {
294
+ return c.records.direction;
295
+ }, "getDirection"), Tr = /* @__PURE__ */ l(function() {
296
+ return c.records.head;
297
+ }, "getHead"), S = {
298
+ commitType: p,
299
+ getConfig: I,
300
+ setDirection: lr,
301
+ setOptions: $r,
302
+ getOptions: fr,
303
+ commit: gr,
304
+ branch: yr,
305
+ merge: ur,
306
+ cherryPick: xr,
307
+ checkout: D,
308
+ //reset,
309
+ prettyPrint: pr,
310
+ clear: br,
311
+ getBranchesAsObjArray: mr,
312
+ getBranches: wr,
313
+ getCommits: vr,
314
+ getCommitsArray: N,
315
+ getCurrentBranch: Cr,
316
+ getDirection: Er,
317
+ getHead: Tr,
318
+ setAccTitle: rr,
319
+ getAccTitle: Z,
320
+ getAccDescription: Q,
321
+ setAccDescription: J,
322
+ setDiagramTitle: X,
323
+ getDiagramTitle: V
324
+ }, Br = /* @__PURE__ */ l((t, r) => {
325
+ Y(t, r), t.dir && r.setDirection(t.dir);
326
+ for (const s of t.statements)
327
+ Lr(s, r);
328
+ }, "populate"), Lr = /* @__PURE__ */ l((t, r) => {
329
+ const n = {
330
+ Commit: /* @__PURE__ */ l((e) => r.commit(kr(e)), "Commit"),
331
+ Branch: /* @__PURE__ */ l((e) => r.branch(Mr(e)), "Branch"),
332
+ Merge: /* @__PURE__ */ l((e) => r.merge(Ir(e)), "Merge"),
333
+ Checkout: /* @__PURE__ */ l((e) => r.checkout(Rr(e)), "Checkout"),
334
+ CherryPicking: /* @__PURE__ */ l((e) => r.cherryPick(Gr(e)), "CherryPicking")
335
+ }[t.$type];
336
+ n ? n(t) : b.error(`Unknown statement type: ${t.$type}`);
337
+ }, "parseStatement"), kr = /* @__PURE__ */ l((t) => ({
338
+ id: t.id,
339
+ msg: t.message ?? "",
340
+ type: t.type !== void 0 ? p[t.type] : p.NORMAL,
341
+ tags: t.tags ?? void 0
342
+ }), "parseCommit"), Mr = /* @__PURE__ */ l((t) => ({
343
+ name: t.name,
344
+ order: t.order ?? 0
345
+ }), "parseBranch"), Ir = /* @__PURE__ */ l((t) => ({
346
+ branch: t.branch,
347
+ id: t.id ?? "",
348
+ type: t.type !== void 0 ? p[t.type] : void 0,
349
+ tags: t.tags ?? void 0
350
+ }), "parseMerge"), Rr = /* @__PURE__ */ l((t) => t.branch, "parseCheckout"), Gr = /* @__PURE__ */ l((t) => ({
351
+ id: t.id,
352
+ targetId: "",
353
+ tags: t.tags?.length === 0 ? void 0 : t.tags,
354
+ parent: t.parent
355
+ }), "parseCherryPicking"), Or = {
356
+ parse: /* @__PURE__ */ l(async (t) => {
357
+ const r = await K("gitGraph", t);
358
+ b.debug(r), Br(r, S);
359
+ }, "parse")
360
+ }, Ar = er(), v = Ar?.gitGraph, L = 10, k = 40, E = 4, T = 2, M = 8, m = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map(), O = 30, R = /* @__PURE__ */ new Map(), A = [], B = 0, u = "LR", _r = /* @__PURE__ */ l(() => {
361
+ m.clear(), w.clear(), R.clear(), B = 0, A = [], u = "LR";
362
+ }, "clear"), W = /* @__PURE__ */ l((t) => {
363
+ const r = document.createElementNS("http://www.w3.org/2000/svg", "text");
364
+ return (typeof t == "string" ? t.split(/\\n|\n|<br\s*\/?>/gi) : t).forEach((n) => {
365
+ const e = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
366
+ e.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), e.setAttribute("dy", "1em"), e.setAttribute("x", "0"), e.setAttribute("class", "row"), e.textContent = n.trim(), r.appendChild(e);
367
+ }), r;
368
+ }, "drawText"), j = /* @__PURE__ */ l((t) => {
369
+ let r, s, n;
370
+ return u === "BT" ? (s = /* @__PURE__ */ l((e, a) => e <= a, "comparisonFunc"), n = 1 / 0) : (s = /* @__PURE__ */ l((e, a) => e >= a, "comparisonFunc"), n = 0), t.forEach((e) => {
371
+ const a = u === "TB" || u == "BT" ? w.get(e)?.y : w.get(e)?.x;
372
+ a !== void 0 && s(a, n) && (r = e, n = a);
373
+ }), r;
374
+ }, "findClosestParent"), qr = /* @__PURE__ */ l((t) => {
375
+ let r = "", s = 1 / 0;
376
+ return t.forEach((n) => {
377
+ const e = w.get(n).y;
378
+ e <= s && (r = n, s = e);
379
+ }), r || void 0;
380
+ }, "findClosestParentBT"), Hr = /* @__PURE__ */ l((t, r, s) => {
381
+ let n = s, e = s;
382
+ const a = [];
383
+ t.forEach((d) => {
384
+ const o = r.get(d);
385
+ if (!o)
386
+ throw new Error(`Commit not found for key ${d}`);
387
+ o.parents.length ? (n = zr(o), e = Math.max(n, e)) : a.push(o), Fr(o, n);
388
+ }), n = e, a.forEach((d) => {
389
+ Dr(d, n, s);
390
+ }), t.forEach((d) => {
391
+ const o = r.get(d);
392
+ if (o?.parents.length) {
393
+ const f = qr(o.parents);
394
+ n = w.get(f).y - k, n <= e && (e = n);
395
+ const h = m.get(o.branch).pos, $ = n - L;
396
+ w.set(o.id, { x: h, y: $ });
397
+ }
398
+ });
399
+ }, "setParallelBTPos"), Pr = /* @__PURE__ */ l((t) => {
400
+ const r = j(t.parents.filter((n) => n !== null));
401
+ if (!r)
402
+ throw new Error(`Closest parent not found for commit ${t.id}`);
403
+ const s = w.get(r)?.y;
404
+ if (s === void 0)
405
+ throw new Error(`Closest parent position not found for commit ${t.id}`);
406
+ return s;
407
+ }, "findClosestParentPos"), zr = /* @__PURE__ */ l((t) => Pr(t) + k, "calculateCommitPosition"), Fr = /* @__PURE__ */ l((t, r) => {
408
+ const s = m.get(t.branch);
409
+ if (!s)
410
+ throw new Error(`Branch not found for commit ${t.id}`);
411
+ const n = s.pos, e = r + L;
412
+ return w.set(t.id, { x: n, y: e }), { x: n, y: e };
413
+ }, "setCommitPosition"), Dr = /* @__PURE__ */ l((t, r, s) => {
414
+ const n = m.get(t.branch);
415
+ if (!n)
416
+ throw new Error(`Branch not found for commit ${t.id}`);
417
+ const e = r + s, a = n.pos;
418
+ w.set(t.id, { x: a, y: e });
419
+ }, "setRootPosition"), Nr = /* @__PURE__ */ l((t, r, s, n, e, a) => {
420
+ if (a === p.HIGHLIGHT)
421
+ t.append("rect").attr("x", s.x - 10).attr("y", s.y - 10).attr("width", 20).attr("height", 20).attr(
422
+ "class",
423
+ `commit ${r.id} commit-highlight${e % M} ${n}-outer`
424
+ ), t.append("rect").attr("x", s.x - 6).attr("y", s.y - 6).attr("width", 12).attr("height", 12).attr(
425
+ "class",
426
+ `commit ${r.id} commit${e % M} ${n}-inner`
427
+ );
428
+ else if (a === p.CHERRY_PICK)
429
+ t.append("circle").attr("cx", s.x).attr("cy", s.y).attr("r", 10).attr("class", `commit ${r.id} ${n}`), t.append("circle").attr("cx", s.x - 3).attr("cy", s.y + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${r.id} ${n}`), t.append("circle").attr("cx", s.x + 3).attr("cy", s.y + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${r.id} ${n}`), t.append("line").attr("x1", s.x + 3).attr("y1", s.y + 1).attr("x2", s.x).attr("y2", s.y - 5).attr("stroke", "#fff").attr("class", `commit ${r.id} ${n}`), t.append("line").attr("x1", s.x - 3).attr("y1", s.y + 1).attr("x2", s.x).attr("y2", s.y - 5).attr("stroke", "#fff").attr("class", `commit ${r.id} ${n}`);
430
+ else {
431
+ const d = t.append("circle");
432
+ if (d.attr("cx", s.x), d.attr("cy", s.y), d.attr("r", r.type === p.MERGE ? 9 : 10), d.attr("class", `commit ${r.id} commit${e % M}`), a === p.MERGE) {
433
+ const o = t.append("circle");
434
+ o.attr("cx", s.x), o.attr("cy", s.y), o.attr("r", 6), o.attr(
435
+ "class",
436
+ `commit ${n} ${r.id} commit${e % M}`
437
+ );
438
+ }
439
+ a === p.REVERSE && t.append("path").attr(
440
+ "d",
441
+ `M ${s.x - 5},${s.y - 5}L${s.x + 5},${s.y + 5}M${s.x - 5},${s.y + 5}L${s.x + 5},${s.y - 5}`
442
+ ).attr("class", `commit ${n} ${r.id} commit${e % M}`);
443
+ }
444
+ }, "drawCommitBullet"), Sr = /* @__PURE__ */ l((t, r, s, n) => {
445
+ if (r.type !== p.CHERRY_PICK && (r.customId && r.type === p.MERGE || r.type !== p.MERGE) && v?.showCommitLabel) {
446
+ const e = t.append("g"), a = e.insert("rect").attr("class", "commit-label-bkg"), d = e.append("text").attr("x", n).attr("y", s.y + 25).attr("class", "commit-label").text(r.id), o = d.node()?.getBBox();
447
+ if (o && (a.attr("x", s.posWithOffset - o.width / 2 - T).attr("y", s.y + 13.5).attr("width", o.width + 2 * T).attr("height", o.height + 2 * T), u === "TB" || u === "BT" ? (a.attr("x", s.x - (o.width + 4 * E + 5)).attr("y", s.y - 12), d.attr("x", s.x - (o.width + 4 * E)).attr("y", s.y + o.height - 12)) : d.attr("x", s.posWithOffset - o.width / 2), v.rotateCommitLabel))
448
+ if (u === "TB" || u === "BT")
449
+ d.attr(
450
+ "transform",
451
+ "rotate(-45, " + s.x + ", " + s.y + ")"
452
+ ), a.attr(
453
+ "transform",
454
+ "rotate(-45, " + s.x + ", " + s.y + ")"
455
+ );
456
+ else {
457
+ const f = -7.5 - (o.width + 10) / 25 * 9.5, h = 10 + o.width / 25 * 8.5;
458
+ e.attr(
459
+ "transform",
460
+ "translate(" + f + ", " + h + ") rotate(-45, " + n + ", " + s.y + ")"
461
+ );
462
+ }
463
+ }
464
+ }, "drawCommitLabel"), Wr = /* @__PURE__ */ l((t, r, s, n) => {
465
+ if (r.tags.length > 0) {
466
+ let e = 0, a = 0, d = 0;
467
+ const o = [];
468
+ for (const f of r.tags.reverse()) {
469
+ const h = t.insert("polygon"), $ = t.append("circle"), g = t.append("text").attr("y", s.y - 16 - e).attr("class", "tag-label").text(f), i = g.node()?.getBBox();
470
+ if (!i)
471
+ throw new Error("Tag bbox not found");
472
+ a = Math.max(a, i.width), d = Math.max(d, i.height), g.attr("x", s.posWithOffset - i.width / 2), o.push({
473
+ tag: g,
474
+ hole: $,
475
+ rect: h,
476
+ yOffset: e
477
+ }), e += 20;
478
+ }
479
+ for (const { tag: f, hole: h, rect: $, yOffset: g } of o) {
480
+ const i = d / 2, y = s.y - 19.2 - g;
481
+ if ($.attr("class", "tag-label-bkg").attr(
482
+ "points",
483
+ `
484
+ ${n - a / 2 - E / 2},${y + T}
485
+ ${n - a / 2 - E / 2},${y - T}
486
+ ${s.posWithOffset - a / 2 - E},${y - i - T}
487
+ ${s.posWithOffset + a / 2 + E},${y - i - T}
488
+ ${s.posWithOffset + a / 2 + E},${y + i + T}
489
+ ${s.posWithOffset - a / 2 - E},${y + i + T}`
490
+ ), h.attr("cy", y).attr("cx", n - a / 2 + E / 2).attr("r", 1.5).attr("class", "tag-hole"), u === "TB" || u === "BT") {
491
+ const x = n + g;
492
+ $.attr("class", "tag-label-bkg").attr(
493
+ "points",
494
+ `
495
+ ${s.x},${x + 2}
496
+ ${s.x},${x - 2}
497
+ ${s.x + L},${x - i - 2}
498
+ ${s.x + L + a + 4},${x - i - 2}
499
+ ${s.x + L + a + 4},${x + i + 2}
500
+ ${s.x + L},${x + i + 2}`
501
+ ).attr("transform", "translate(12,12) rotate(45, " + s.x + "," + n + ")"), h.attr("cx", s.x + E / 2).attr("cy", x).attr("transform", "translate(12,12) rotate(45, " + s.x + "," + n + ")"), f.attr("x", s.x + 5).attr("y", x + 3).attr("transform", "translate(14,14) rotate(45, " + s.x + "," + n + ")");
502
+ }
503
+ }
504
+ }
505
+ }, "drawCommitTags"), jr = /* @__PURE__ */ l((t) => {
506
+ switch (t.customType ?? t.type) {
507
+ case p.NORMAL:
508
+ return "commit-normal";
509
+ case p.REVERSE:
510
+ return "commit-reverse";
511
+ case p.HIGHLIGHT:
512
+ return "commit-highlight";
513
+ case p.MERGE:
514
+ return "commit-merge";
515
+ case p.CHERRY_PICK:
516
+ return "commit-cherry-pick";
517
+ default:
518
+ return "commit-normal";
519
+ }
520
+ }, "getCommitClassType"), Ur = /* @__PURE__ */ l((t, r, s, n) => {
521
+ const e = { x: 0, y: 0 };
522
+ if (t.parents.length > 0) {
523
+ const a = j(t.parents);
524
+ if (a) {
525
+ const d = n.get(a) ?? e;
526
+ return r === "TB" ? d.y + k : r === "BT" ? (n.get(t.id) ?? e).y - k : d.x + k;
527
+ }
528
+ } else
529
+ return r === "TB" ? O : r === "BT" ? (n.get(t.id) ?? e).y - k : 0;
530
+ return 0;
531
+ }, "calculatePosition"), Yr = /* @__PURE__ */ l((t, r, s) => {
532
+ const n = u === "BT" && s ? r : r + L, e = u === "TB" || u === "BT" ? n : m.get(t.branch)?.pos, a = u === "TB" || u === "BT" ? m.get(t.branch)?.pos : n;
533
+ if (a === void 0 || e === void 0)
534
+ throw new Error(`Position were undefined for commit ${t.id}`);
535
+ return { x: a, y: e, posWithOffset: n };
536
+ }, "getCommitPosition"), z = /* @__PURE__ */ l((t, r, s) => {
537
+ if (!v)
538
+ throw new Error("GitGraph config not found");
539
+ const n = t.append("g").attr("class", "commit-bullets"), e = t.append("g").attr("class", "commit-labels");
540
+ let a = u === "TB" || u === "BT" ? O : 0;
541
+ const d = [...r.keys()], o = v?.parallelCommits ?? !1, f = /* @__PURE__ */ l(($, g) => {
542
+ const i = r.get($)?.seq, y = r.get(g)?.seq;
543
+ return i !== void 0 && y !== void 0 ? i - y : 0;
544
+ }, "sortKeys");
545
+ let h = d.sort(f);
546
+ u === "BT" && (o && Hr(h, r, a), h = h.reverse()), h.forEach(($) => {
547
+ const g = r.get($);
548
+ if (!g)
549
+ throw new Error(`Commit not found for key ${$}`);
550
+ o && (a = Ur(g, u, a, w));
551
+ const i = Yr(g, a, o);
552
+ if (s) {
553
+ const y = jr(g), x = g.customType ?? g.type, q = m.get(g.branch)?.index ?? 0;
554
+ Nr(n, g, i, y, q, x), Sr(e, g, i, a), Wr(e, g, i, a);
555
+ }
556
+ u === "TB" || u === "BT" ? w.set(g.id, { x: i.x, y: i.posWithOffset }) : w.set(g.id, { x: i.posWithOffset, y: i.y }), a = u === "BT" && o ? a + k : a + k + L, a > B && (B = a);
557
+ });
558
+ }, "drawCommits"), Kr = /* @__PURE__ */ l((t, r, s, n, e) => {
559
+ const d = (u === "TB" || u === "BT" ? s.x < n.x : s.y < n.y) ? r.branch : t.branch, o = /* @__PURE__ */ l((h) => h.branch === d, "isOnBranchToGetCurve"), f = /* @__PURE__ */ l((h) => h.seq > t.seq && h.seq < r.seq, "isBetweenCommits");
560
+ return [...e.values()].some((h) => f(h) && o(h));
561
+ }, "shouldRerouteArrow"), G = /* @__PURE__ */ l((t, r, s = 0) => {
562
+ const n = t + Math.abs(t - r) / 2;
563
+ if (s > 5)
564
+ return n;
565
+ if (A.every((d) => Math.abs(d - n) >= 10))
566
+ return A.push(n), n;
567
+ const a = Math.abs(t - r);
568
+ return G(t, r - a / 5, s + 1);
569
+ }, "findLane"), Vr = /* @__PURE__ */ l((t, r, s, n) => {
570
+ const e = w.get(r.id), a = w.get(s.id);
571
+ if (e === void 0 || a === void 0)
572
+ throw new Error(`Commit positions not found for commits ${r.id} and ${s.id}`);
573
+ const d = Kr(r, s, e, a, n);
574
+ let o = "", f = "", h = 0, $ = 0, g = m.get(s.branch)?.index;
575
+ s.type === p.MERGE && r.id !== s.parents[0] && (g = m.get(r.branch)?.index);
576
+ let i;
577
+ if (d) {
578
+ o = "A 10 10, 0, 0, 0,", f = "A 10 10, 0, 0, 1,", h = 10, $ = 10;
579
+ const y = e.y < a.y ? G(e.y, a.y) : G(a.y, e.y), x = e.x < a.x ? G(e.x, a.x) : G(a.x, e.x);
580
+ u === "TB" ? e.x < a.x ? i = `M ${e.x} ${e.y} L ${x - h} ${e.y} ${f} ${x} ${e.y + $} L ${x} ${a.y - h} ${o} ${x + $} ${a.y} L ${a.x} ${a.y}` : (g = m.get(r.branch)?.index, i = `M ${e.x} ${e.y} L ${x + h} ${e.y} ${o} ${x} ${e.y + $} L ${x} ${a.y - h} ${f} ${x - $} ${a.y} L ${a.x} ${a.y}`) : u === "BT" ? e.x < a.x ? i = `M ${e.x} ${e.y} L ${x - h} ${e.y} ${o} ${x} ${e.y - $} L ${x} ${a.y + h} ${f} ${x + $} ${a.y} L ${a.x} ${a.y}` : (g = m.get(r.branch)?.index, i = `M ${e.x} ${e.y} L ${x + h} ${e.y} ${f} ${x} ${e.y - $} L ${x} ${a.y + h} ${o} ${x - $} ${a.y} L ${a.x} ${a.y}`) : e.y < a.y ? i = `M ${e.x} ${e.y} L ${e.x} ${y - h} ${o} ${e.x + $} ${y} L ${a.x - h} ${y} ${f} ${a.x} ${y + $} L ${a.x} ${a.y}` : (g = m.get(r.branch)?.index, i = `M ${e.x} ${e.y} L ${e.x} ${y + h} ${f} ${e.x + $} ${y} L ${a.x - h} ${y} ${o} ${a.x} ${y - $} L ${a.x} ${a.y}`);
581
+ } else
582
+ o = "A 20 20, 0, 0, 0,", f = "A 20 20, 0, 0, 1,", h = 20, $ = 20, u === "TB" ? (e.x < a.x && (s.type === p.MERGE && r.id !== s.parents[0] ? i = `M ${e.x} ${e.y} L ${e.x} ${a.y - h} ${o} ${e.x + $} ${a.y} L ${a.x} ${a.y}` : i = `M ${e.x} ${e.y} L ${a.x - h} ${e.y} ${f} ${a.x} ${e.y + $} L ${a.x} ${a.y}`), e.x > a.x && (o = "A 20 20, 0, 0, 0,", f = "A 20 20, 0, 0, 1,", h = 20, $ = 20, s.type === p.MERGE && r.id !== s.parents[0] ? i = `M ${e.x} ${e.y} L ${e.x} ${a.y - h} ${f} ${e.x - $} ${a.y} L ${a.x} ${a.y}` : i = `M ${e.x} ${e.y} L ${a.x + h} ${e.y} ${o} ${a.x} ${e.y + $} L ${a.x} ${a.y}`), e.x === a.x && (i = `M ${e.x} ${e.y} L ${a.x} ${a.y}`)) : u === "BT" ? (e.x < a.x && (s.type === p.MERGE && r.id !== s.parents[0] ? i = `M ${e.x} ${e.y} L ${e.x} ${a.y + h} ${f} ${e.x + $} ${a.y} L ${a.x} ${a.y}` : i = `M ${e.x} ${e.y} L ${a.x - h} ${e.y} ${o} ${a.x} ${e.y - $} L ${a.x} ${a.y}`), e.x > a.x && (o = "A 20 20, 0, 0, 0,", f = "A 20 20, 0, 0, 1,", h = 20, $ = 20, s.type === p.MERGE && r.id !== s.parents[0] ? i = `M ${e.x} ${e.y} L ${e.x} ${a.y + h} ${o} ${e.x - $} ${a.y} L ${a.x} ${a.y}` : i = `M ${e.x} ${e.y} L ${a.x - h} ${e.y} ${o} ${a.x} ${e.y - $} L ${a.x} ${a.y}`), e.x === a.x && (i = `M ${e.x} ${e.y} L ${a.x} ${a.y}`)) : (e.y < a.y && (s.type === p.MERGE && r.id !== s.parents[0] ? i = `M ${e.x} ${e.y} L ${a.x - h} ${e.y} ${f} ${a.x} ${e.y + $} L ${a.x} ${a.y}` : i = `M ${e.x} ${e.y} L ${e.x} ${a.y - h} ${o} ${e.x + $} ${a.y} L ${a.x} ${a.y}`), e.y > a.y && (s.type === p.MERGE && r.id !== s.parents[0] ? i = `M ${e.x} ${e.y} L ${a.x - h} ${e.y} ${o} ${a.x} ${e.y - $} L ${a.x} ${a.y}` : i = `M ${e.x} ${e.y} L ${e.x} ${a.y + h} ${f} ${e.x + $} ${a.y} L ${a.x} ${a.y}`), e.y === a.y && (i = `M ${e.x} ${e.y} L ${a.x} ${a.y}`));
583
+ if (i === void 0)
584
+ throw new Error("Line definition not found");
585
+ t.append("path").attr("d", i).attr("class", "arrow arrow" + g % M);
586
+ }, "drawArrow"), Xr = /* @__PURE__ */ l((t, r) => {
587
+ const s = t.append("g").attr("class", "commit-arrows");
588
+ [...r.keys()].forEach((n) => {
589
+ const e = r.get(n);
590
+ e.parents && e.parents.length > 0 && e.parents.forEach((a) => {
591
+ Vr(s, r.get(a), e, r);
592
+ });
593
+ });
594
+ }, "drawArrows"), Jr = /* @__PURE__ */ l((t, r) => {
595
+ const s = t.append("g");
596
+ r.forEach((n, e) => {
597
+ const a = e % M, d = m.get(n.name)?.pos;
598
+ if (d === void 0)
599
+ throw new Error(`Position not found for branch ${n.name}`);
600
+ const o = s.append("line");
601
+ o.attr("x1", 0), o.attr("y1", d), o.attr("x2", B), o.attr("y2", d), o.attr("class", "branch branch" + a), u === "TB" ? (o.attr("y1", O), o.attr("x1", d), o.attr("y2", B), o.attr("x2", d)) : u === "BT" && (o.attr("y1", B), o.attr("x1", d), o.attr("y2", O), o.attr("x2", d)), A.push(d);
602
+ const f = n.name, h = W(f), $ = s.insert("rect"), i = s.insert("g").attr("class", "branchLabel").insert("g").attr("class", "label branch-label" + a);
603
+ i.node().appendChild(h);
604
+ const y = h.getBBox();
605
+ $.attr("class", "branchLabelBkg label" + a).attr("rx", 4).attr("ry", 4).attr("x", -y.width - 4 - (v?.rotateCommitLabel === !0 ? 30 : 0)).attr("y", -y.height / 2 + 8).attr("width", y.width + 18).attr("height", y.height + 4), i.attr(
606
+ "transform",
607
+ "translate(" + (-y.width - 14 - (v?.rotateCommitLabel === !0 ? 30 : 0)) + ", " + (d - y.height / 2 - 1) + ")"
608
+ ), u === "TB" ? ($.attr("x", d - y.width / 2 - 10).attr("y", 0), i.attr("transform", "translate(" + (d - y.width / 2 - 5) + ", 0)")) : u === "BT" ? ($.attr("x", d - y.width / 2 - 10).attr("y", B), i.attr("transform", "translate(" + (d - y.width / 2 - 5) + ", " + B + ")")) : $.attr("transform", "translate(-19, " + (d - y.height / 2) + ")");
609
+ });
610
+ }, "drawBranches"), Qr = /* @__PURE__ */ l(function(t, r, s, n, e) {
611
+ return m.set(t, { pos: r, index: s }), r += 50 + (e ? 40 : 0) + (u === "TB" || u === "BT" ? n.width / 2 : 0), r;
612
+ }, "setBranchPosition"), Zr = /* @__PURE__ */ l(function(t, r, s, n) {
613
+ if (_r(), b.debug("in gitgraph renderer", t + `
614
+ `, "id:", r, s), !v)
615
+ throw new Error("GitGraph config not found");
616
+ const e = v.rotateCommitLabel ?? !1, a = n.db;
617
+ R = a.getCommits();
618
+ const d = a.getBranchesAsObjArray();
619
+ u = a.getDirection();
620
+ const o = tr(`[id="${r}"]`);
621
+ let f = 0;
622
+ d.forEach((h, $) => {
623
+ const g = W(h.name), i = o.append("g"), y = i.insert("g").attr("class", "branchLabel"), x = y.insert("g").attr("class", "label branch-label");
624
+ x.node()?.appendChild(g);
625
+ const q = g.getBBox();
626
+ f = Qr(h.name, f, $, q, e), x.remove(), y.remove(), i.remove();
627
+ }), z(o, R, !1), v.showBranches && Jr(o, d), Xr(o, R), z(o, R, !0), ar.insertTitle(
628
+ o,
629
+ "gitTitleText",
630
+ v.titleTopMargin ?? 0,
631
+ a.getDiagramTitle()
632
+ ), sr(
633
+ void 0,
634
+ o,
635
+ v.diagramPadding,
636
+ v.useMaxWidth
637
+ );
638
+ }, "draw"), re = {
639
+ draw: Zr
640
+ }, ee = /* @__PURE__ */ l((t) => `
641
+ .commit-id,
642
+ .commit-msg,
643
+ .branch-label {
644
+ fill: lightgrey;
645
+ color: lightgrey;
646
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
647
+ font-family: var(--mermaid-font-family);
648
+ }
649
+ ${[0, 1, 2, 3, 4, 5, 6, 7].map(
650
+ (r) => `
651
+ .branch-label${r} { fill: ${t["gitBranchLabel" + r]}; }
652
+ .commit${r} { stroke: ${t["git" + r]}; fill: ${t["git" + r]}; }
653
+ .commit-highlight${r} { stroke: ${t["gitInv" + r]}; fill: ${t["gitInv" + r]}; }
654
+ .label${r} { fill: ${t["git" + r]}; }
655
+ .arrow${r} { stroke: ${t["git" + r]}; }
656
+ `
657
+ ).join(`
658
+ `)}
659
+
660
+ .branch {
661
+ stroke-width: 1;
662
+ stroke: ${t.lineColor};
663
+ stroke-dasharray: 2;
664
+ }
665
+ .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}
666
+ .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }
667
+ .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}
668
+ .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }
669
+ .tag-hole { fill: ${t.textColor}; }
670
+
671
+ .commit-merge {
672
+ stroke: ${t.primaryColor};
673
+ fill: ${t.primaryColor};
674
+ }
675
+ .commit-reverse {
676
+ stroke: ${t.primaryColor};
677
+ fill: ${t.primaryColor};
678
+ stroke-width: 3;
679
+ }
680
+ .commit-highlight-outer {
681
+ }
682
+ .commit-highlight-inner {
683
+ stroke: ${t.primaryColor};
684
+ fill: ${t.primaryColor};
685
+ }
686
+
687
+ .arrow { stroke-width: 8; stroke-linecap: round; fill: none}
688
+ .gitTitleText {
689
+ text-anchor: middle;
690
+ font-size: 18px;
691
+ fill: ${t.textColor};
692
+ }
693
+ `, "getStyles"), te = ee, ie = {
694
+ parser: Or,
695
+ db: S,
696
+ renderer: re,
697
+ styles: te
698
+ };
699
+ export {
700
+ ie as diagram
701
+ };