@omg-dev/app 0.5.0 → 0.6.1

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 (113) hide show
  1. package/dist-lib/{ChangelogPage-8lbvM9Pz.js → ChangelogPage-Cjj_DiYL.js} +57 -1
  2. package/dist-lib/{File-B-qYa2zY.js → File-DQRr5F_e.js} +1761 -1826
  3. package/dist-lib/FileEditor-BrI3dfcp.js +6895 -0
  4. package/dist-lib/FileTreePane-J8P-OiHb.js +8413 -0
  5. package/dist-lib/{FileViewer-Clmf04v1.js → FileViewer-DRrfus7c.js} +1 -1
  6. package/dist-lib/{SessionFilesPanel-BKcTU57t.js → SessionFilesPanel-DxVJ43fE.js} +69 -69
  7. package/dist-lib/{TermView-gazV6UMU.js → TermView-B4V-DyD-.js} +521 -530
  8. package/dist-lib/{abnfDiagram-VRR7QNED-Chn1Z_p9.js → abnfDiagram-VRR7QNED-CiXfOnAu.js} +4 -4
  9. package/dist-lib/{arc-B652oHQ-.js → arc-QOMNKQA5.js} +1 -1
  10. package/dist-lib/{architectureDiagram-ZJ3FMSHR-CMatArpz.js → architectureDiagram-ZJ3FMSHR-BcFBTmfD.js} +2059 -2064
  11. package/dist-lib/{blockDiagram-677ZJIJ3-CEOPfI9A.js → blockDiagram-677ZJIJ3-Qj8-RIV3.js} +920 -925
  12. package/dist-lib/{c4Diagram-LMCZKHZV-DcUHrESL.js → c4Diagram-LMCZKHZV-BpinEmj4.js} +598 -593
  13. package/dist-lib/{channel-B5lJFbed.js → channel-D6YHMmF7.js} +1 -1
  14. package/dist-lib/{chat-engine-83mwx0z2.js → chat-engine-CUiDTHFP.js} +1173 -1218
  15. package/dist-lib/chunk-2Q5K7J3B-CFSi414U.js +18 -0
  16. package/dist-lib/{chunk-32BRIVSS-IYmNSvH8.js → chunk-32BRIVSS-DvywQiCk.js} +1 -1
  17. package/dist-lib/{chunk-5VM5RSS4-DO2g-xIj.js → chunk-5VM5RSS4-xd6XuI9Q.js} +1 -1
  18. package/dist-lib/{chunk-BO2N2NFS-kYiI5SD9.js → chunk-BO2N2NFS-BbJdm-59.js} +4892 -4903
  19. package/dist-lib/{chunk-EX3LRPZG-N96wfks9.js → chunk-EX3LRPZG-BLDKx-Yg.js} +507 -514
  20. package/dist-lib/chunk-JWPE2WC7-DnwG7Xzp.js +8 -0
  21. package/dist-lib/chunk-MOJQB5TN-BrENeFT5.js +670 -0
  22. package/dist-lib/chunk-RYQCIY6F-I-J4fVFd.js +313 -0
  23. package/dist-lib/{chunk-V7JOEXUC-DQwf2vkP.js → chunk-V7JOEXUC-Bkakcs1-.js} +458 -453
  24. package/dist-lib/chunk-VR4S4FIN-BDq3jZ0m.js +19 -0
  25. package/dist-lib/{chunk-XXDRQBXY-Ccv4aRcn.js → chunk-XXDRQBXY-DRKeYnrF.js} +1 -1
  26. package/dist-lib/{classDiagram-v2-EOCWNBFH-DOn-rhuL.js → classDiagram-OUVF2IWQ-DISUfvR5.js} +2 -2
  27. package/dist-lib/{classDiagram-OUVF2IWQ-DOn-rhuL.js → classDiagram-v2-EOCWNBFH-DISUfvR5.js} +2 -2
  28. package/dist-lib/{coding-agents-page-8Nf-IuE2.js → coding-agents-page-DtxZ0nbQ.js} +152 -131
  29. package/dist-lib/computer-page-DIJeFOZz.js +8860 -0
  30. package/dist-lib/{cose-bilkent-JH36ORCC-C-tACTrT.js → cose-bilkent-JH36ORCC-DCfmoChv.js} +281 -281
  31. package/dist-lib/{create-BrnHvSDE.js → create-CBk9uwJH.js} +2 -2
  32. package/dist-lib/cynefin-VYW2F7L2-XAY3mHv8.js +24430 -0
  33. package/dist-lib/{cynefinDiagram-TSTJHNR4-Be7CamD2.js → cynefinDiagram-TSTJHNR4-CrgvPEr1.js} +3 -3
  34. package/dist-lib/{cytoscape.esm-B0ledd6M.js → cytoscape.esm-BB6Ga9He.js} +3 -3
  35. package/dist-lib/dagre-VKFMJZFB-CE5k06mJ.js +343 -0
  36. package/dist-lib/{diagram-FQU43EPY-Jg12ow4Z.js → diagram-FQU43EPY-gOcCiJEN.js} +136 -139
  37. package/dist-lib/diagram-G47NLZAW-BVJLfRsd.js +531 -0
  38. package/dist-lib/diagram-NH7WQ7WH-u6QnHasL.js +145 -0
  39. package/dist-lib/diagram-OA4YK3LP-D4Kcl3uM.js +350 -0
  40. package/dist-lib/{diagram-WEI45ONY-D1kKPOc_.js → diagram-WEI45ONY-6a__oIb0.js} +38 -42
  41. package/dist-lib/{ebnfDiagram-CCIWWBDH-BhQWrGMc.js → ebnfDiagram-CCIWWBDH-PXSrB6lG.js} +4 -4
  42. package/dist-lib/{embedded-BmrQsEvQ.js → embedded-PUsgcSTE.js} +13043 -13082
  43. package/dist-lib/{engine-compile-BeDRSL6Y.js → engine-compile-D_stzVMa.js} +2939 -2991
  44. package/dist-lib/{erDiagram-Q63AITRT-D2q6Nmwa.js → erDiagram-Q63AITRT-BbsttUCs.js} +286 -284
  45. package/dist-lib/flowDiagram-23GEKE2U-CX5x3zVA.js +1641 -0
  46. package/dist-lib/{ganttDiagram-NO4QXBWP-C_Lj-cJB.js → ganttDiagram-NO4QXBWP-Bq0aSPs8.js} +2 -2
  47. package/dist-lib/gitGraphDiagram-IHSO6WYX-BjAezjIv.js +815 -0
  48. package/dist-lib/{graph-B68L3K2T.js → graph-DAHC4kPm.js} +2 -2
  49. package/dist-lib/{highlighted-body-OFNGDK62-C2DGVKV8.js → highlighted-body-OFNGDK62-DWhG_ijx.js} +1 -1
  50. package/dist-lib/index-B0neMIbR.js +16520 -0
  51. package/dist-lib/index-BBC0E3Qg.js +4994 -0
  52. package/dist-lib/{index-Dtkd4mEk.js → index-CE7H8LiZ.js} +2 -2
  53. package/dist-lib/{index-DWkBvb-9.js → index-FgVvPpIY.js} +2 -2
  54. package/dist-lib/index.js +1 -1
  55. package/dist-lib/{infoDiagram-FWYZ7A6U-BbUkT0KS.js → infoDiagram-FWYZ7A6U-Bo_FNR91.js} +2 -2
  56. package/dist-lib/ishikawaDiagram-FXEZZL3T-C5bGD-Eb.js +624 -0
  57. package/dist-lib/{journeyDiagram-5HDEW3XC-CgykmVSC.js → journeyDiagram-5HDEW3XC-C8qM7SxF.js} +4 -4
  58. package/dist-lib/kanban-definition-HUTT4EX6-C-EK5Puz.js +724 -0
  59. package/dist-lib/{katex-jHfnQmlp.js → katex-DoRnZ_sp.js} +1 -1
  60. package/dist-lib/{layout-BGrtsiRL.js → layout-DBbo_M5I.js} +2 -2
  61. package/dist-lib/{linear-B5ZSwawJ.js → linear-zGzX0-I0.js} +1 -1
  62. package/dist-lib/{map-hbfFlSln.js → map-DRdzG8Ho.js} +1 -1
  63. package/dist-lib/mermaid-GHXKKRXX-hOE9C3qW.js +4 -0
  64. package/dist-lib/{mindmap-definition-LN4V7U3C-CfhfeEht.js → mindmap-definition-LN4V7U3C-DlVCRx6k.js} +310 -311
  65. package/dist-lib/{pegDiagram-2B236MQR-CYDAJHPF.js → pegDiagram-2B236MQR-DrKNikeG.js} +4 -4
  66. package/dist-lib/{pieDiagram-ENE6RG2P-udKxQm4p.js → pieDiagram-ENE6RG2P-Fm_jc0HL.js} +83 -84
  67. package/dist-lib/quadrantDiagram-ABIIQ3AL-zDRY0VtB.js +1029 -0
  68. package/dist-lib/{railroadDiagram-RFXS5EU6-q0Svkmuy.js → railroadDiagram-RFXS5EU6-BQuFX39y.js} +4 -4
  69. package/dist-lib/{requirementDiagram-TGXJPOKE-tNxRI1gc.js → requirementDiagram-TGXJPOKE-BWwBQZXn.js} +269 -268
  70. package/dist-lib/{resume-session-sheet-Dr_81Gfm.js → resume-session-sheet-DTe_2QtJ.js} +2 -3
  71. package/dist-lib/sankeyDiagram-HTMAVEWB-BjRyuB6L.js +859 -0
  72. package/dist-lib/{sequenceDiagram-DBY2YBRQ-Dvl2_CXL.js → sequenceDiagram-DBY2YBRQ-69pcw_2M.js} +892 -899
  73. package/dist-lib/{session-token-usage-CGhHZ3lT.js → session-token-usage-DY4vFlfs.js} +82 -83
  74. package/dist-lib/{shadow-text-size-CBCTdbYU.js → shadow-text-size-smWA4wIU.js} +1 -2
  75. package/dist-lib/{shipped-page-p3oulUiM.js → shipped-page-B-ruG8li.js} +233 -236
  76. package/dist-lib/sizeCapture-X5ZJPWSS-DqkV8s1N.js +46 -0
  77. package/dist-lib/{stateDiagram-2N3HPSRC-CnWB7HvU.js → stateDiagram-2N3HPSRC-0vE3REl_.js} +4 -4
  78. package/dist-lib/{stateDiagram-v2-6OUMAXLB-DnZ0UI2p.js → stateDiagram-v2-6OUMAXLB-u_56Obsh.js} +2 -2
  79. package/dist-lib/{streamdown-response-Dbn0PKUH.js → streamdown-response-BQy3geXs.js} +290 -297
  80. package/dist-lib/styles.css +1 -1
  81. package/dist-lib/swimlanes-5IMT3BWC-H0raIBd1.js +5332 -0
  82. package/dist-lib/{swimlanesDiagram-G3AALYLV-CKyOeqF_.js → swimlanesDiagram-G3AALYLV-By52HaDu.js} +2 -2
  83. package/dist-lib/timeline-definition-FHXFAJF6-h1LLYUQk.js +1055 -0
  84. package/dist-lib/vennDiagram-L72KCM5P-B4wDw_Kh.js +1578 -0
  85. package/dist-lib/wardleyDiagram-EHGQE667-DLMBGiwD.js +678 -0
  86. package/dist-lib/{xychartDiagram-FW5EYKEG-m3s7caPv.js → xychartDiagram-FW5EYKEG-BHvf5Noj.js} +526 -496
  87. package/package.json +4 -3
  88. package/dist-lib/FileEditor-BIz0qCyW.js +0 -6892
  89. package/dist-lib/FileTreePane-BG2k7gTc.js +0 -8422
  90. package/dist-lib/chunk-2Q5K7J3B-Ex8Ly28R.js +0 -15
  91. package/dist-lib/chunk-JWPE2WC7-DFPBClX_.js +0 -9
  92. package/dist-lib/chunk-MOJQB5TN-dusfI9ob.js +0 -664
  93. package/dist-lib/chunk-RYQCIY6F-fkeERzIG.js +0 -315
  94. package/dist-lib/chunk-VR4S4FIN-hOZG7eF3.js +0 -20
  95. package/dist-lib/cynefin-VYW2F7L2-DQXPWaog.js +0 -23853
  96. package/dist-lib/dagre-VKFMJZFB-BhCjK7XQ.js +0 -346
  97. package/dist-lib/diagram-G47NLZAW-C3_z2t6T.js +0 -530
  98. package/dist-lib/diagram-NH7WQ7WH-DUdK08IT.js +0 -143
  99. package/dist-lib/diagram-OA4YK3LP-TUUyRYY3.js +0 -353
  100. package/dist-lib/flowDiagram-23GEKE2U-DU3S3biU.js +0 -1645
  101. package/dist-lib/gitGraphDiagram-IHSO6WYX-CvGu0XAR.js +0 -828
  102. package/dist-lib/index-DcwavxA1.js +0 -5062
  103. package/dist-lib/index-JkCQXUYs.js +0 -16566
  104. package/dist-lib/ishikawaDiagram-FXEZZL3T-D_Y6Tuyb.js +0 -622
  105. package/dist-lib/kanban-definition-HUTT4EX6-CPFLTskY.js +0 -726
  106. package/dist-lib/mermaid-GHXKKRXX-Ox_2d3uB.js +0 -4
  107. package/dist-lib/quadrantDiagram-ABIIQ3AL-BmDmLczk.js +0 -1025
  108. package/dist-lib/sankeyDiagram-HTMAVEWB-B9Bl7f2P.js +0 -847
  109. package/dist-lib/sizeCapture-X5ZJPWSS-B1EeO3N9.js +0 -47
  110. package/dist-lib/swimlanes-5IMT3BWC-CvqDJcS9.js +0 -5353
  111. package/dist-lib/timeline-definition-FHXFAJF6-b15X0Oru.js +0 -1066
  112. package/dist-lib/vennDiagram-L72KCM5P-C4lh5m77.js +0 -1585
  113. package/dist-lib/wardleyDiagram-EHGQE667-Cev6fT_D.js +0 -684
@@ -0,0 +1,531 @@
1
+ import { p as me } from "./chunk-JWPE2WC7-DnwG7Xzp.js";
2
+ import { _ as w, W as ge, z as te, B as Q, F as ye, e as Se, l as ee, be as B, d as j, b as ve, a as xe, o as be, p as we, g as Ce, s as Te, D as Le, bf as $e, q as Ae } from "./index-B0neMIbR.js";
3
+ import { s as Fe } from "./chunk-VR4S4FIN-BDq3jZ0m.js";
4
+ import { p as Ne } from "./cynefin-VYW2F7L2-XAY3mHv8.js";
5
+ import { b as I } from "./defaultLocale-BgPVtth8.js";
6
+ import { o as K } from "./ordinal-DfAQgscy.js";
7
+ function Me(e) {
8
+ var a = 0, n = e.children, l = n && n.length;
9
+ if (!l) a = 1;
10
+ else for (; --l >= 0; ) a += n[l].value;
11
+ e.value = a;
12
+ }
13
+ function _e() {
14
+ return this.eachAfter(Me);
15
+ }
16
+ function ke(e, a) {
17
+ let n = -1;
18
+ for (const l of this)
19
+ e.call(a, l, ++n, this);
20
+ return this;
21
+ }
22
+ function ze(e, a) {
23
+ for (var n = this, l = [n], s, o, h = -1; n = l.pop(); )
24
+ if (e.call(a, n, ++h, this), s = n.children)
25
+ for (o = s.length - 1; o >= 0; --o)
26
+ l.push(s[o]);
27
+ return this;
28
+ }
29
+ function Ve(e, a) {
30
+ for (var n = this, l = [n], s = [], o, h, d, g = -1; n = l.pop(); )
31
+ if (s.push(n), o = n.children)
32
+ for (h = 0, d = o.length; h < d; ++h)
33
+ l.push(o[h]);
34
+ for (; n = s.pop(); )
35
+ e.call(a, n, ++g, this);
36
+ return this;
37
+ }
38
+ function De(e, a) {
39
+ let n = -1;
40
+ for (const l of this)
41
+ if (e.call(a, l, ++n, this))
42
+ return l;
43
+ }
44
+ function Pe(e) {
45
+ return this.eachAfter(function(a) {
46
+ for (var n = +e(a.data) || 0, l = a.children, s = l && l.length; --s >= 0; ) n += l[s].value;
47
+ a.value = n;
48
+ });
49
+ }
50
+ function Be(e) {
51
+ return this.eachBefore(function(a) {
52
+ a.children && a.children.sort(e);
53
+ });
54
+ }
55
+ function We(e) {
56
+ for (var a = this, n = Ee(a, e), l = [a]; a !== n; )
57
+ a = a.parent, l.push(a);
58
+ for (var s = l.length; e !== n; )
59
+ l.splice(s, 0, e), e = e.parent;
60
+ return l;
61
+ }
62
+ function Ee(e, a) {
63
+ if (e === a) return e;
64
+ var n = e.ancestors(), l = a.ancestors(), s = null;
65
+ for (e = n.pop(), a = l.pop(); e === a; )
66
+ s = e, e = n.pop(), a = l.pop();
67
+ return s;
68
+ }
69
+ function Re() {
70
+ for (var e = this, a = [e]; e = e.parent; )
71
+ a.push(e);
72
+ return a;
73
+ }
74
+ function He() {
75
+ return Array.from(this);
76
+ }
77
+ function Ie() {
78
+ var e = [];
79
+ return this.eachBefore(function(a) {
80
+ a.children || e.push(a);
81
+ }), e;
82
+ }
83
+ function Oe() {
84
+ var e = this, a = [];
85
+ return e.each(function(n) {
86
+ n !== e && a.push({ source: n.parent, target: n });
87
+ }), a;
88
+ }
89
+ function* qe() {
90
+ var e = this, a, n = [e], l, s, o;
91
+ do
92
+ for (a = n.reverse(), n = []; e = a.pop(); )
93
+ if (yield e, l = e.children)
94
+ for (s = 0, o = l.length; s < o; ++s)
95
+ n.push(l[s]);
96
+ while (n.length);
97
+ }
98
+ function ae(e, a) {
99
+ e instanceof Map ? (e = [void 0, e], a === void 0 && (a = Ye)) : a === void 0 && (a = Xe);
100
+ for (var n = new U(e), l, s = [n], o, h, d, g; l = s.pop(); )
101
+ if ((h = a(l.data)) && (g = (h = Array.from(h)).length))
102
+ for (l.children = h, d = g - 1; d >= 0; --d)
103
+ s.push(o = h[d] = new U(h[d])), o.parent = l, o.depth = l.depth + 1;
104
+ return n.eachBefore(Ue);
105
+ }
106
+ function Ge() {
107
+ return ae(this).eachBefore(je);
108
+ }
109
+ function Xe(e) {
110
+ return e.children;
111
+ }
112
+ function Ye(e) {
113
+ return Array.isArray(e) ? e[1] : null;
114
+ }
115
+ function je(e) {
116
+ e.data.value !== void 0 && (e.value = e.data.value), e.data = e.data.data;
117
+ }
118
+ function Ue(e) {
119
+ var a = 0;
120
+ do
121
+ e.height = a;
122
+ while ((e = e.parent) && e.height < ++a);
123
+ }
124
+ function U(e) {
125
+ this.data = e, this.depth = this.height = 0, this.parent = null;
126
+ }
127
+ U.prototype = ae.prototype = {
128
+ constructor: U,
129
+ count: _e,
130
+ each: ke,
131
+ eachAfter: Ve,
132
+ eachBefore: ze,
133
+ find: De,
134
+ sum: Pe,
135
+ sort: Be,
136
+ path: We,
137
+ ancestors: Re,
138
+ descendants: He,
139
+ leaves: Ie,
140
+ links: Oe,
141
+ copy: Ge,
142
+ [Symbol.iterator]: qe
143
+ };
144
+ function Ze(e) {
145
+ if (typeof e != "function") throw new Error();
146
+ return e;
147
+ }
148
+ function O() {
149
+ return 0;
150
+ }
151
+ function q(e) {
152
+ return function() {
153
+ return e;
154
+ };
155
+ }
156
+ function Je(e) {
157
+ e.x0 = Math.round(e.x0), e.y0 = Math.round(e.y0), e.x1 = Math.round(e.x1), e.y1 = Math.round(e.y1);
158
+ }
159
+ function Ke(e, a, n, l, s) {
160
+ for (var o = e.children, h, d = -1, g = o.length, c = e.value && (l - a) / e.value; ++d < g; )
161
+ h = o[d], h.y0 = n, h.y1 = s, h.x0 = a, h.x1 = a += h.value * c;
162
+ }
163
+ function Qe(e, a, n, l, s) {
164
+ for (var o = e.children, h, d = -1, g = o.length, c = e.value && (s - n) / e.value; ++d < g; )
165
+ h = o[d], h.x0 = a, h.x1 = l, h.y0 = n, h.y1 = n += h.value * c;
166
+ }
167
+ var et = (1 + Math.sqrt(5)) / 2;
168
+ function tt(e, a, n, l, s, o) {
169
+ for (var h = [], d = a.children, g, c, u = 0, b = 0, r = d.length, x, S, v = a.value, p, y, N, $, V, E, M; u < r; ) {
170
+ x = s - n, S = o - l;
171
+ do
172
+ p = d[b++].value;
173
+ while (!p && b < r);
174
+ for (y = N = p, E = Math.max(S / x, x / S) / (v * e), M = p * p * E, V = Math.max(N / M, M / y); b < r; ++b) {
175
+ if (p += c = d[b].value, c < y && (y = c), c > N && (N = c), M = p * p * E, $ = Math.max(N / M, M / y), $ > V) {
176
+ p -= c;
177
+ break;
178
+ }
179
+ V = $;
180
+ }
181
+ h.push(g = { value: p, dice: x < S, children: d.slice(u, b) }), g.dice ? Ke(g, n, l, s, v ? l += S * p / v : o) : Qe(g, n, l, v ? n += x * p / v : s, o), v -= p, u = b;
182
+ }
183
+ return h;
184
+ }
185
+ const at = (function e(a) {
186
+ function n(l, s, o, h, d) {
187
+ tt(a, l, s, o, h, d);
188
+ }
189
+ return n.ratio = function(l) {
190
+ return e((l = +l) > 1 ? l : 1);
191
+ }, n;
192
+ })(et);
193
+ function nt() {
194
+ var e = at, a = !1, n = 1, l = 1, s = [0], o = O, h = O, d = O, g = O, c = O;
195
+ function u(r) {
196
+ return r.x0 = r.y0 = 0, r.x1 = n, r.y1 = l, r.eachBefore(b), s = [0], a && r.eachBefore(Je), r;
197
+ }
198
+ function b(r) {
199
+ var x = s[r.depth], S = r.x0 + x, v = r.y0 + x, p = r.x1 - x, y = r.y1 - x;
200
+ p < S && (S = p = (S + p) / 2), y < v && (v = y = (v + y) / 2), r.x0 = S, r.y0 = v, r.x1 = p, r.y1 = y, r.children && (x = s[r.depth + 1] = o(r) / 2, S += c(r) - x, v += h(r) - x, p -= d(r) - x, y -= g(r) - x, p < S && (S = p = (S + p) / 2), y < v && (v = y = (v + y) / 2), e(r, S, v, p, y));
201
+ }
202
+ return u.round = function(r) {
203
+ return arguments.length ? (a = !!r, u) : a;
204
+ }, u.size = function(r) {
205
+ return arguments.length ? (n = +r[0], l = +r[1], u) : [n, l];
206
+ }, u.tile = function(r) {
207
+ return arguments.length ? (e = Ze(r), u) : e;
208
+ }, u.padding = function(r) {
209
+ return arguments.length ? u.paddingInner(r).paddingOuter(r) : u.paddingInner();
210
+ }, u.paddingInner = function(r) {
211
+ return arguments.length ? (o = typeof r == "function" ? r : q(+r), u) : o;
212
+ }, u.paddingOuter = function(r) {
213
+ return arguments.length ? u.paddingTop(r).paddingRight(r).paddingBottom(r).paddingLeft(r) : u.paddingTop();
214
+ }, u.paddingTop = function(r) {
215
+ return arguments.length ? (h = typeof r == "function" ? r : q(+r), u) : h;
216
+ }, u.paddingRight = function(r) {
217
+ return arguments.length ? (d = typeof r == "function" ? r : q(+r), u) : d;
218
+ }, u.paddingBottom = function(r) {
219
+ return arguments.length ? (g = typeof r == "function" ? r : q(+r), u) : g;
220
+ }, u.paddingLeft = function(r) {
221
+ return arguments.length ? (c = typeof r == "function" ? r : q(+r), u) : c;
222
+ }, u;
223
+ }
224
+ var ie = class {
225
+ constructor() {
226
+ this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.setAccTitle = ve, this.getAccTitle = xe, this.setDiagramTitle = be, this.getDiagramTitle = we, this.getAccDescription = Ce, this.setAccDescription = Te;
227
+ }
228
+ static {
229
+ w(this, "TreeMapDB");
230
+ }
231
+ getNodes() {
232
+ return this.nodes;
233
+ }
234
+ getConfig() {
235
+ const e = Le, a = te();
236
+ return Q({
237
+ ...e.treemap,
238
+ ...a.treemap ?? {}
239
+ });
240
+ }
241
+ addNode(e, a) {
242
+ this.nodes.push(e), this.levels.set(e, a), a === 0 && (this.outerNodes.push(e), this.root ??= e);
243
+ }
244
+ getRoot() {
245
+ return { name: "", children: this.outerNodes };
246
+ }
247
+ addClass(e, a) {
248
+ const n = this.classes.get(e) ?? { id: e, styles: [], textStyles: [] }, l = a.replace(/\\,/g, "§§§").replace(/,/g, ";").replace(/§§§/g, ",").split(";");
249
+ l && l.forEach((s) => {
250
+ $e(s) && (n?.textStyles ? n.textStyles.push(s) : n.textStyles = [s]), n?.styles ? n.styles.push(s) : n.styles = [s];
251
+ }), this.classes.set(e, n);
252
+ }
253
+ getClasses() {
254
+ return this.classes;
255
+ }
256
+ getStylesForClass(e) {
257
+ return this.classes.get(e)?.styles ?? [];
258
+ }
259
+ clear() {
260
+ Ae(), this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.root = void 0;
261
+ }
262
+ };
263
+ function oe(e) {
264
+ if (!e.length)
265
+ return [];
266
+ const a = [], n = [];
267
+ return e.forEach((l) => {
268
+ const s = {
269
+ name: l.name,
270
+ children: l.type === "Leaf" ? void 0 : []
271
+ };
272
+ for (s.classSelector = l?.classSelector, l?.cssCompiledStyles && (s.cssCompiledStyles = l.cssCompiledStyles), l.type === "Leaf" && l.value !== void 0 && (s.value = l.value); n.length > 0 && n[n.length - 1].level >= l.level; )
273
+ n.pop();
274
+ if (n.length === 0)
275
+ a.push(s);
276
+ else {
277
+ const o = n[n.length - 1].node;
278
+ o.children ? o.children.push(s) : o.children = [s];
279
+ }
280
+ l.type !== "Leaf" && n.push({ node: s, level: l.level });
281
+ }), a;
282
+ }
283
+ w(oe, "buildHierarchy");
284
+ var lt = /* @__PURE__ */ w((e, a) => {
285
+ me(e, a);
286
+ const n = [];
287
+ for (const o of e.TreemapRows ?? [])
288
+ o.$type === "ClassDefStatement" && a.addClass(o.className ?? "", o.styleText ?? "");
289
+ for (const o of e.TreemapRows ?? []) {
290
+ const h = o.item;
291
+ if (!h)
292
+ continue;
293
+ const d = o.indent ? parseInt(o.indent) : 0, g = st(h), c = h.classSelector ? a.getStylesForClass(h.classSelector) : [], u = c.length > 0 ? c : void 0, b = {
294
+ level: d,
295
+ name: g,
296
+ type: h.$type,
297
+ value: h.value,
298
+ classSelector: h.classSelector,
299
+ cssCompiledStyles: u
300
+ };
301
+ n.push(b);
302
+ }
303
+ const l = oe(n), s = /* @__PURE__ */ w((o, h) => {
304
+ for (const d of o)
305
+ a.addNode(d, h), d.children && d.children.length > 0 && s(d.children, h + 1);
306
+ }, "addNodesRecursively");
307
+ s(l, 0);
308
+ }, "populate"), st = /* @__PURE__ */ w((e) => e.name ? String(e.name) : "", "getItemName"), ce = {
309
+ // @ts-expect-error - TreeMapDB is not assignable to DiagramDB
310
+ parser: { yy: void 0 },
311
+ parse: /* @__PURE__ */ w(async (e) => {
312
+ try {
313
+ const n = await Ne("treemap", e);
314
+ ee.debug("Treemap AST:", n);
315
+ const l = ce.parser?.yy;
316
+ if (!(l instanceof ie))
317
+ throw new Error(
318
+ "parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues."
319
+ );
320
+ lt(n, l);
321
+ } catch (a) {
322
+ throw ee.error("Error parsing treemap:", a), a;
323
+ }
324
+ }, "parse")
325
+ }, rt = 10, W = 10, G = 25, it = /* @__PURE__ */ w((e, a, n, l) => {
326
+ const s = l.db, o = s.getConfig(), h = o.padding ?? rt, d = s.getDiagramTitle(), g = s.getRoot(), { themeVariables: c } = te();
327
+ if (!g)
328
+ return;
329
+ const u = d ? 30 : 0, b = ye(a), r = o.nodeWidth ? o.nodeWidth * W : 960, x = o.nodeHeight ? o.nodeHeight * W : 500, S = r, v = x + u;
330
+ b.attr("viewBox", `0 0 ${S} ${v}`), Se(b, v, S, o.useMaxWidth);
331
+ let p;
332
+ try {
333
+ const t = o.valueFormat || ",";
334
+ if (t === "$0,0")
335
+ p = /* @__PURE__ */ w((i) => "$" + I(",")(i), "valueFormat");
336
+ else if (t.startsWith("$") && t.includes(",")) {
337
+ const i = /\.\d+/.exec(t), f = i ? i[0] : "";
338
+ p = /* @__PURE__ */ w((C) => "$" + I("," + f)(C), "valueFormat");
339
+ } else if (t.startsWith("$")) {
340
+ const i = t.substring(1);
341
+ p = /* @__PURE__ */ w((f) => "$" + I(i || "")(f), "valueFormat");
342
+ } else
343
+ p = I(t);
344
+ } catch (t) {
345
+ ee.error("Error creating format function:", t), p = I(",");
346
+ }
347
+ const y = K().range([
348
+ "transparent",
349
+ c.cScale0,
350
+ c.cScale1,
351
+ c.cScale2,
352
+ c.cScale3,
353
+ c.cScale4,
354
+ c.cScale5,
355
+ c.cScale6,
356
+ c.cScale7,
357
+ c.cScale8,
358
+ c.cScale9,
359
+ c.cScale10,
360
+ c.cScale11
361
+ ]), N = K().range([
362
+ "transparent",
363
+ c.cScalePeer0,
364
+ c.cScalePeer1,
365
+ c.cScalePeer2,
366
+ c.cScalePeer3,
367
+ c.cScalePeer4,
368
+ c.cScalePeer5,
369
+ c.cScalePeer6,
370
+ c.cScalePeer7,
371
+ c.cScalePeer8,
372
+ c.cScalePeer9,
373
+ c.cScalePeer10,
374
+ c.cScalePeer11
375
+ ]), $ = K().range([
376
+ c.cScaleLabel0,
377
+ c.cScaleLabel1,
378
+ c.cScaleLabel2,
379
+ c.cScaleLabel3,
380
+ c.cScaleLabel4,
381
+ c.cScaleLabel5,
382
+ c.cScaleLabel6,
383
+ c.cScaleLabel7,
384
+ c.cScaleLabel8,
385
+ c.cScaleLabel9,
386
+ c.cScaleLabel10,
387
+ c.cScaleLabel11
388
+ ]);
389
+ d && b.append("text").attr("x", S / 2).attr("y", u / 2).attr("class", "treemapTitle").attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(d);
390
+ const V = b.append("g").attr("transform", `translate(0, ${u})`).attr("class", "treemapContainer"), E = ae(g).sum((t) => t.value ?? 0).sort((t, i) => (i.value ?? 0) - (t.value ?? 0)), ne = nt().size([r, x]).paddingTop(
391
+ (t) => t.children && t.children.length > 0 ? G + W : 0
392
+ ).paddingInner(h).paddingLeft((t) => t.children && t.children.length > 0 ? W : 0).paddingRight((t) => t.children && t.children.length > 0 ? W : 0).paddingBottom((t) => t.children && t.children.length > 0 ? W : 0).round(!0)(E), he = ne.descendants().filter((t) => t.children && t.children.length > 0), R = V.selectAll(".treemapSection").data(he).enter().append("g").attr("class", "treemapSection").attr("transform", (t) => `translate(${t.x0},${t.y0})`);
393
+ R.append("rect").attr("width", (t) => t.x1 - t.x0).attr("height", G).attr("class", "treemapSectionHeader").attr("fill", "none").attr("fill-opacity", 0.6).attr("stroke-width", 0.6).attr("style", (t) => t.depth === 0 ? "display: none;" : ""), R.append("clipPath").attr("id", (t, i) => `clip-section-${a}-${i}`).append("rect").attr("width", (t) => Math.max(0, t.x1 - t.x0 - 12)).attr("height", G), R.append("rect").attr("width", (t) => t.x1 - t.x0).attr("height", (t) => t.y1 - t.y0).attr("class", (t, i) => `treemapSection section${i}`).attr("fill", (t) => y(t.data.name)).attr("fill-opacity", 0.6).attr("stroke", (t) => N(t.data.name)).attr("stroke-width", 2).attr("stroke-opacity", 0.4).attr("style", (t) => {
394
+ if (t.depth === 0)
395
+ return "display: none;";
396
+ const i = B({ cssCompiledStyles: t.data.cssCompiledStyles });
397
+ return i.nodeStyles + ";" + i.borderStyles.join(";");
398
+ }), R.append("text").attr("class", "treemapSectionLabel").attr("x", 6).attr("y", G / 2).attr("dominant-baseline", "middle").text((t) => t.depth === 0 ? "" : t.data.name).attr("font-weight", "bold").attr("clip-path", (t, i) => `url(#clip-section-${a}-${i})`).attr("style", (t) => {
399
+ if (t.depth === 0)
400
+ return "display: none;";
401
+ const i = "dominant-baseline: middle; font-size: 12px; fill:" + $(t.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", f = B({ cssCompiledStyles: t.data.cssCompiledStyles });
402
+ return i + f.labelStyles.replace("color:", "fill:");
403
+ }).each(function(t) {
404
+ if (t.depth === 0)
405
+ return;
406
+ const i = j(this), f = t.data.name;
407
+ i.text(f);
408
+ const C = t.x1 - t.x0, L = 6;
409
+ let T;
410
+ o.showValues !== !1 && t.value ? T = C - 10 - 30 - 10 - L : T = C - L - 6;
411
+ const m = Math.max(15, T), _ = i.node();
412
+ if (_.getComputedTextLength() > m) {
413
+ let z = f;
414
+ for (; z.length > 0; ) {
415
+ if (z = f.substring(0, z.length - 1), z.length === 0) {
416
+ i.text("..."), _.getComputedTextLength() > m && i.text("");
417
+ break;
418
+ }
419
+ if (i.text(z + "..."), _.getComputedTextLength() <= m)
420
+ break;
421
+ }
422
+ }
423
+ }), o.showValues !== !1 && R.append("text").attr("class", "treemapSectionValue").attr("x", (t) => t.x1 - t.x0 - 10).attr("y", G / 2).attr("text-anchor", "end").attr("dominant-baseline", "middle").text((t) => t.value ? p(t.value) : "").attr("font-style", "italic").attr("style", (t) => {
424
+ if (t.depth === 0)
425
+ return "display: none;";
426
+ const i = "text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:" + $(t.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", f = B({ cssCompiledStyles: t.data.cssCompiledStyles });
427
+ return i + f.labelStyles.replace("color:", "fill:");
428
+ });
429
+ const le = ne.leaves(), A = le.length > 20, de = A ? 16 : 38, X = A ? 14 : 28, D = A ? 4 : 8, H = A ? 4 : 6, Z = A ? 2 : 4, se = A ? 8 : 10, J = A ? 1 : 2, Y = V.selectAll(".treemapLeafGroup").data(le).enter().append("g").attr("class", (t, i) => `treemapNode treemapLeafGroup leaf${i}${t.data.classSelector ? ` ${t.data.classSelector}` : ""}x`).attr("transform", (t) => `translate(${t.x0},${t.y0})`);
430
+ Y.append("rect").attr("width", (t) => t.x1 - t.x0).attr("height", (t) => t.y1 - t.y0).attr("class", "treemapLeaf").attr("fill", (t) => t.parent ? y(t.parent.data.name) : y(t.data.name)).attr("style", (t) => B({ cssCompiledStyles: t.data.cssCompiledStyles }).nodeStyles).attr("fill-opacity", 0.3).attr("stroke", (t) => t.parent ? y(t.parent.data.name) : y(t.data.name)).attr("stroke-width", 3), Y.append("clipPath").attr("id", (t, i) => `clip-${a}-${i}`).append("rect").attr("width", (t) => Math.max(0, t.x1 - t.x0 - 4)).attr("height", (t) => Math.max(0, t.y1 - t.y0 - 4)), Y.append("text").attr("class", "treemapLabel").attr("x", (t) => (t.x1 - t.x0) / 2).attr("y", (t) => (t.y1 - t.y0) / 2).attr("style", (t) => {
431
+ const i = `text-anchor: middle; dominant-baseline: middle; font-size: ${de}px;fill:` + $(t.data.name) + ";", f = B({ cssCompiledStyles: t.data.cssCompiledStyles });
432
+ return i + f.labelStyles.replace("color:", "fill:");
433
+ }).attr("clip-path", (t, i) => `url(#clip-${a}-${i})`).text((t) => t.data.name).each(function(t) {
434
+ const i = j(this), f = t.x1 - t.x0, C = t.y1 - t.y0, L = i.node(), T = f - 2 * Z, P = C - 2 * Z;
435
+ if (T < se || P < se) {
436
+ i.style("display", "none");
437
+ return;
438
+ }
439
+ let m = parseInt(i.style("font-size"), 10);
440
+ const _ = 0.6;
441
+ for (; L.getComputedTextLength() > T && m > D; )
442
+ m--, i.style("font-size", `${m}px`);
443
+ let F = Math.max(
444
+ H,
445
+ Math.min(X, Math.round(m * _))
446
+ ), k = m + J + F;
447
+ for (; k > P && m > D && (m--, F = Math.max(
448
+ H,
449
+ Math.min(X, Math.round(m * _))
450
+ ), !(F < H && m === D)); )
451
+ i.style("font-size", `${m}px`), k = m + J + F;
452
+ i.style("font-size", `${m}px`), A ? (m < D || P < D) && i.style("display", "none") : (L.getComputedTextLength() > T || m < D || P < m) && i.style("display", "none");
453
+ }), o.showValues !== !1 && Y.append("text").attr("class", "treemapValue").attr("x", (i) => (i.x1 - i.x0) / 2).attr("y", function(i) {
454
+ return (i.y1 - i.y0) / 2;
455
+ }).attr("style", (i) => {
456
+ const f = `text-anchor: middle; dominant-baseline: hanging; font-size: ${X}px;fill:` + $(i.data.name) + ";", C = B({ cssCompiledStyles: i.data.cssCompiledStyles });
457
+ return f + C.labelStyles.replace("color:", "fill:");
458
+ }).attr("clip-path", (i, f) => `url(#clip-${a}-${f})`).text((i) => i.value ? p(i.value) : "").each(function(i) {
459
+ const f = j(this), C = this.parentNode;
460
+ if (!C) {
461
+ f.style("display", "none");
462
+ return;
463
+ }
464
+ const L = j(C).select(".treemapLabel");
465
+ if (L.empty() || L.style("display") === "none") {
466
+ f.style("display", "none");
467
+ return;
468
+ }
469
+ const T = parseFloat(L.style("font-size")), m = Math.max(
470
+ H,
471
+ Math.min(X, Math.round(T * 0.6))
472
+ );
473
+ f.style("font-size", `${m}px`);
474
+ const F = (i.y1 - i.y0) / 2 + T / 2 + J;
475
+ f.attr("y", F);
476
+ const k = i.x1 - i.x0, re = i.y1 - i.y0 - 4, fe = k - 2 * Z;
477
+ f.node().getComputedTextLength() > fe || F + m > re || m < H ? f.style("display", "none") : f.style("display", null);
478
+ });
479
+ const ue = o.diagramPadding ?? 8;
480
+ Fe(b, ue, "flowchart", o?.useMaxWidth || !1);
481
+ }, "draw"), ot = /* @__PURE__ */ w(function(e, a) {
482
+ return a.db.getClasses();
483
+ }, "getClasses"), ct = { draw: it, getClasses: ot }, ht = {
484
+ sectionStrokeColor: "black",
485
+ sectionStrokeWidth: "1",
486
+ sectionFillColor: "#efefef",
487
+ leafStrokeColor: "black",
488
+ leafStrokeWidth: "1",
489
+ leafFillColor: "#efefef",
490
+ labelFontSize: "12px",
491
+ valueFontSize: "10px",
492
+ titleFontSize: "14px"
493
+ }, dt = /* @__PURE__ */ w(({
494
+ treemap: e
495
+ } = {}) => {
496
+ const a = ge(), n = te(), l = Q(a, n.themeVariables), s = Q(ht, e), o = s.titleColor ?? l.titleColor, h = s.labelColor ?? l.textColor, d = s.valueColor ?? l.textColor;
497
+ return `
498
+ .treemapNode.section {
499
+ stroke: ${s.sectionStrokeColor};
500
+ stroke-width: ${s.sectionStrokeWidth};
501
+ fill: ${s.sectionFillColor};
502
+ }
503
+ .treemapNode.leaf {
504
+ stroke: ${s.leafStrokeColor};
505
+ stroke-width: ${s.leafStrokeWidth};
506
+ fill: ${s.leafFillColor};
507
+ }
508
+ .treemapLabel {
509
+ fill: ${h};
510
+ font-size: ${s.labelFontSize};
511
+ }
512
+ .treemapValue {
513
+ fill: ${d};
514
+ font-size: ${s.valueFontSize};
515
+ }
516
+ .treemapTitle {
517
+ fill: ${o};
518
+ font-size: ${s.titleFontSize};
519
+ }
520
+ `;
521
+ }, "getStyles"), ut = dt, xt = {
522
+ parser: ce,
523
+ get db() {
524
+ return new ie();
525
+ },
526
+ renderer: ct,
527
+ styles: ut
528
+ };
529
+ export {
530
+ xt as diagram
531
+ };
@@ -0,0 +1,145 @@
1
+ import { p as B } from "./chunk-JWPE2WC7-DnwG7Xzp.js";
2
+ import { _ as b, B as u, F as $, e as C, l as m, b as S, a as D, o as T, p as z, g as F, s as P, z as E, D as A, q as W } from "./index-B0neMIbR.js";
3
+ import { p as _ } from "./cynefin-VYW2F7L2-XAY3mHv8.js";
4
+ var N = A.packet, w = class {
5
+ constructor() {
6
+ this.packet = [], this.setAccTitle = S, this.getAccTitle = D, this.setDiagramTitle = T, this.getDiagramTitle = z, this.getAccDescription = F, this.setAccDescription = P;
7
+ }
8
+ static {
9
+ b(this, "PacketDB");
10
+ }
11
+ getConfig() {
12
+ const t = u({
13
+ ...N,
14
+ ...E().packet
15
+ });
16
+ return t.showBits && (t.paddingY += 10), t;
17
+ }
18
+ getPacket() {
19
+ return this.packet;
20
+ }
21
+ pushWord(t) {
22
+ t.length > 0 && this.packet.push(t);
23
+ }
24
+ clear() {
25
+ W(), this.packet = [];
26
+ }
27
+ }, L = 1e4, M = /* @__PURE__ */ b((t, e) => {
28
+ B(t, e);
29
+ let r = -1, s = [], n = 1;
30
+ const { bitsPerRow: l } = e.getConfig();
31
+ for (let { start: a, end: i, bits: d, label: c } of t.blocks) {
32
+ if (a !== void 0 && i !== void 0 && i < a)
33
+ throw new Error(`Packet block ${a} - ${i} is invalid. End must be greater than start.`);
34
+ if (a ??= r + 1, a !== r + 1)
35
+ throw new Error(
36
+ `Packet block ${a} - ${i ?? a} is not contiguous. It should start from ${r + 1}.`
37
+ );
38
+ if (d === 0)
39
+ throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);
40
+ for (i ??= a + (d ?? 1) - 1, d ??= i - a + 1, r = i, m.debug(`Packet block ${a} - ${r} with label ${c}`); s.length <= l + 1 && e.getPacket().length < L; ) {
41
+ const [p, o] = Y({ start: a, end: i, bits: d, label: c }, n, l);
42
+ if (s.push(p), p.end + 1 === n * l && (e.pushWord(s), s = [], n++), !o)
43
+ break;
44
+ ({ start: a, end: i, bits: d, label: c } = o);
45
+ }
46
+ }
47
+ e.pushWord(s);
48
+ }, "populate"), Y = /* @__PURE__ */ b((t, e, r) => {
49
+ if (t.start === void 0)
50
+ throw new Error("start should have been set during first phase");
51
+ if (t.end === void 0)
52
+ throw new Error("end should have been set during first phase");
53
+ if (t.start > t.end)
54
+ throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);
55
+ if (t.end + 1 <= e * r)
56
+ return [t, void 0];
57
+ const s = e * r - 1, n = e * r;
58
+ return [
59
+ {
60
+ start: t.start,
61
+ end: s,
62
+ label: t.label,
63
+ bits: s - t.start
64
+ },
65
+ {
66
+ start: n,
67
+ end: t.end,
68
+ label: t.label,
69
+ bits: t.end - n
70
+ }
71
+ ];
72
+ }, "getNextFittingBlock"), v = {
73
+ // @ts-expect-error - PacketDB is not assignable to DiagramDB
74
+ parser: { yy: void 0 },
75
+ parse: /* @__PURE__ */ b(async (t) => {
76
+ const e = await _("packet", t), r = v.parser?.yy;
77
+ if (!(r instanceof w))
78
+ throw new Error(
79
+ "parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues."
80
+ );
81
+ m.debug(e), M(e, r);
82
+ }, "parse")
83
+ }, I = /* @__PURE__ */ b((t, e, r, s) => {
84
+ const n = s.db, l = n.getConfig(), { rowHeight: a, paddingY: i, bitWidth: d, bitsPerRow: c } = l, p = n.getPacket(), o = n.getDiagramTitle(), h = a + i, g = h * (p.length + 1) - (o ? 0 : a), k = d * c + 2, f = $(e);
85
+ f.attr("viewBox", `0 0 ${k} ${g}`), C(f, g, k, l.useMaxWidth);
86
+ for (const [x, y] of p.entries())
87
+ O(f, y, x, l);
88
+ f.append("text").text(o).attr("x", k / 2).attr("y", g - h / 2).attr("dominant-baseline", "middle").attr("text-anchor", "middle").attr("class", "packetTitle");
89
+ }, "draw"), O = /* @__PURE__ */ b((t, e, r, { rowHeight: s, paddingX: n, paddingY: l, bitWidth: a, bitsPerRow: i, showBits: d }) => {
90
+ const c = t.append("g"), p = r * (s + l) + l;
91
+ for (const o of e) {
92
+ const h = o.start % i * a + 1, g = (o.end - o.start + 1) * a - n;
93
+ if (c.append("rect").attr("x", h).attr("y", p).attr("width", g).attr("height", s).attr("class", "packetBlock"), c.append("text").attr("x", h + g / 2).attr("y", p + s / 2).attr("class", "packetLabel").attr("dominant-baseline", "middle").attr("text-anchor", "middle").text(o.label), !d)
94
+ continue;
95
+ const k = o.end === o.start, f = p - 2;
96
+ c.append("text").attr("x", h + (k ? g / 2 : 0)).attr("y", f).attr("class", "packetByte start").attr("dominant-baseline", "auto").attr("text-anchor", k ? "middle" : "start").text(o.start), k || c.append("text").attr("x", h + g).attr("y", f).attr("class", "packetByte end").attr("dominant-baseline", "auto").attr("text-anchor", "end").text(o.end);
97
+ }
98
+ }, "drawWord"), j = { draw: I }, q = {
99
+ byteFontSize: "10px",
100
+ startByteColor: "black",
101
+ endByteColor: "black",
102
+ labelColor: "black",
103
+ labelFontSize: "12px",
104
+ titleColor: "black",
105
+ titleFontSize: "14px",
106
+ blockStrokeColor: "black",
107
+ blockStrokeWidth: "1",
108
+ blockFillColor: "#efefef"
109
+ }, G = /* @__PURE__ */ b(({ packet: t } = {}) => {
110
+ const e = u(q, t);
111
+ return `
112
+ .packetByte {
113
+ font-size: ${e.byteFontSize};
114
+ }
115
+ .packetByte.start {
116
+ fill: ${e.startByteColor};
117
+ }
118
+ .packetByte.end {
119
+ fill: ${e.endByteColor};
120
+ }
121
+ .packetLabel {
122
+ fill: ${e.labelColor};
123
+ font-size: ${e.labelFontSize};
124
+ }
125
+ .packetTitle {
126
+ fill: ${e.titleColor};
127
+ font-size: ${e.titleFontSize};
128
+ }
129
+ .packetBlock {
130
+ stroke: ${e.blockStrokeColor};
131
+ stroke-width: ${e.blockStrokeWidth};
132
+ fill: ${e.blockFillColor};
133
+ }
134
+ `;
135
+ }, "styles"), U = {
136
+ parser: v,
137
+ get db() {
138
+ return new w();
139
+ },
140
+ renderer: j,
141
+ styles: G
142
+ };
143
+ export {
144
+ U as diagram
145
+ };