@wzh-/ai-chat-example 1.0.13 → 1.0.15

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 (49) hide show
  1. package/dist/css/index.css +1 -1
  2. package/dist/js/_baseFor.js +309 -0
  3. package/dist/js/architecture-U656AL7Q.js +3 -4
  4. package/dist/js/architectureDiagram-VXUJARFQ.js +53 -54
  5. package/dist/js/blockDiagram-VD42YOAC.js +449 -449
  6. package/dist/js/c4Diagram-YG6GDRKO.js +87 -87
  7. package/dist/js/chunk-B4BG7PRW.js +160 -160
  8. package/dist/js/chunk-DI55MBZ5.js +98 -98
  9. package/dist/js/chunk-FPAJGGOC.js +1373 -197
  10. package/dist/js/chunk-JA3XYJ7Z.js +36 -36
  11. package/dist/js/chunk-JZLCHNYA.js +1461 -1461
  12. package/dist/js/chunk-N4CR4FBY.js +5 -5
  13. package/dist/js/chunk-QXUST7PY.js +226 -226
  14. package/dist/js/chunk-S3R3BYOJ.js +602 -454
  15. package/dist/js/classDiagram-2ON5EDUG.js +2 -2
  16. package/dist/js/classDiagram-v2-WZHVMYZB.js +2 -2
  17. package/dist/js/clone.js +1 -1
  18. package/dist/js/dagre-6UL2VRFP.js +152 -152
  19. package/dist/js/dagre.js +1034 -933
  20. package/dist/js/diagram-PSM6KHXK.js +58 -59
  21. package/dist/js/diagram-QEK2KX5R.js +53 -54
  22. package/dist/js/diagram-S2PKOQOG.js +24 -25
  23. package/dist/js/erDiagram-Q2GNP2WA.js +96 -96
  24. package/dist/js/flatten.js +34 -0
  25. package/dist/js/flowDiagram-NV44I4VS.js +166 -166
  26. package/dist/js/ganttDiagram-JELNMOA3.js +916 -916
  27. package/dist/js/gitGraph-F6HP7TQM.js +3 -4
  28. package/dist/js/gitGraphDiagram-NY62KEGX.js +373 -374
  29. package/dist/js/graphlib.js +264 -143
  30. package/dist/js/index.js +3280 -3266
  31. package/dist/js/info-NVLQJR56.js +3 -4
  32. package/dist/js/infoDiagram-WHAUD3N6.js +3 -4
  33. package/dist/js/isEmpty.js +18 -18
  34. package/dist/js/kanban-definition-3W4ZIXB7.js +2 -2
  35. package/dist/js/line.js +7 -7
  36. package/dist/js/mermaid.core.js +65 -65
  37. package/dist/js/mindmap-definition-VGOIOE7T.js +2 -2
  38. package/dist/js/packet-BFZMPI3H.js +3 -4
  39. package/dist/js/pie-7BOR55EZ.js +3 -4
  40. package/dist/js/pieDiagram-ADFJNKIX.js +39 -40
  41. package/dist/js/radar-NHE76QYJ.js +3 -4
  42. package/dist/js/reduce.js +451 -0
  43. package/dist/js/requirementDiagram-UZGBJVZJ.js +16 -16
  44. package/dist/js/sequenceDiagram-WL72ISMW.js +731 -731
  45. package/dist/js/stateDiagram-FKZM4ZOC.js +83 -83
  46. package/dist/js/stateDiagram-v2-4FDKWEC3.js +2 -2
  47. package/dist/js/treemap-KMMF4GRG.js +3 -4
  48. package/dist/js/xychartDiagram-PRI3JC2R.js +25 -25
  49. package/package.json +14 -7
@@ -1,6 +1,6 @@
1
- import { c as getEdgeId, g as utils_default } from "./chunk-S3R3BYOJ.js";
2
1
  import { g as log, h as __name, p as select_default } from "./src.js";
3
2
  import { A as parseGenericTypes, B as setAccTitle, C as getDiagramTitle, I as sanitizeText, U as setDiagramTitle, _ as getAccDescription, a as clear, b as getConfig2, s as common_default, v as getAccTitle, z as setAccDescription } from "./chunk-ABZYJK2D.js";
3
+ import { c as getEdgeId, g as utils_default } from "./chunk-S3R3BYOJ.js";
4
4
  import { t as getIconStyles } from "./chunk-FMBD7UC4.js";
5
5
  import { t as getDiagramElement } from "./chunk-55IACEB6.js";
6
6
  import { t as setupViewPortForSVG } from "./chunk-QN33PNHL.js";
@@ -9,7 +9,7 @@ var parser = (function() {
9
9
  var e = /* @__PURE__ */ __name(function(e, t, n, r) {
10
10
  for (n ||= {}, r = e.length; r--; n[e[r]] = t);
11
11
  return n;
12
- }, "o"), t = [1, 18], n = [1, 19], i = [1, 20], a = [1, 41], o = [1, 42], s = [1, 26], c = [1, 24], l = [1, 25], u = [1, 32], d = [1, 33], f = [1, 34], p = [1, 45], m = [1, 35], h = [1, 36], g = [1, 37], _ = [1, 38], v = [1, 27], y = [1, 28], b = [1, 29], x = [1, 30], S = [1, 31], C = [1, 44], w = [1, 46], T = [1, 43], E = [1, 47], D = [1, 9], O = [
12
+ }, "o"), n = [1, 18], r = [1, 19], i = [1, 20], a = [1, 41], o = [1, 42], s = [1, 26], c = [1, 24], l = [1, 25], u = [1, 32], d = [1, 33], f = [1, 34], p = [1, 45], m = [1, 35], h = [1, 36], g = [1, 37], _ = [1, 38], v = [1, 27], y = [1, 28], b = [1, 29], x = [1, 30], S = [1, 31], C = [1, 44], w = [1, 46], T = [1, 43], E = [1, 47], D = [1, 9], O = [
13
13
  1,
14
14
  8,
15
15
  9
@@ -92,7 +92,7 @@ var parser = (function() {
92
92
  100,
93
93
  102,
94
94
  103
95
- ], ne = [1, 100], V = [1, 117], H = [1, 113], U = [1, 109], W = [1, 115], G = [1, 110], K = [1, 111], q = [1, 112], J = [1, 114], Y = [1, 116], re = [
95
+ ], V = [1, 100], H = [1, 117], U = [1, 113], W = [1, 109], G = [1, 115], K = [1, 110], q = [1, 111], J = [1, 112], Y = [1, 114], X = [1, 116], ne = [
96
96
  22,
97
97
  48,
98
98
  60,
@@ -103,7 +103,7 @@ var parser = (function() {
103
103
  88,
104
104
  89,
105
105
  90
106
- ], X = [
106
+ ], re = [
107
107
  1,
108
108
  8,
109
109
  9,
@@ -713,8 +713,8 @@ var parser = (function() {
713
713
  30: 15,
714
714
  31: 16,
715
715
  32: 17,
716
- 33: t,
717
- 35: n,
716
+ 33: n,
717
+ 35: r,
718
718
  37: i,
719
719
  38: 22,
720
720
  42: a,
@@ -920,8 +920,8 @@ var parser = (function() {
920
920
  16: 39,
921
921
  17: 40,
922
922
  5: 87,
923
- 33: t,
924
- 35: n,
923
+ 33: n,
924
+ 35: r,
925
925
  37: i,
926
926
  42: a,
927
927
  46: o,
@@ -963,8 +963,8 @@ var parser = (function() {
963
963
  30: 15,
964
964
  31: 16,
965
965
  32: 17,
966
- 33: t,
967
- 35: n,
966
+ 33: n,
967
+ 35: r,
968
968
  37: i,
969
969
  38: 22,
970
970
  42: a,
@@ -1055,7 +1055,7 @@ var parser = (function() {
1055
1055
  {
1056
1056
  41: [1, 99],
1057
1057
  45: 98,
1058
- 51: ne
1058
+ 51: V
1059
1059
  },
1060
1060
  { 50: [1, 101] },
1061
1061
  { 13: [1, 102] },
@@ -1065,18 +1065,18 @@ var parser = (function() {
1065
1065
  81: [1, 105]
1066
1066
  },
1067
1067
  {
1068
- 22: V,
1069
- 48: H,
1068
+ 22: H,
1069
+ 48: U,
1070
1070
  59: 106,
1071
- 60: U,
1072
- 82: W,
1071
+ 60: W,
1072
+ 82: G,
1073
1073
  84: 107,
1074
1074
  85: 108,
1075
- 86: G,
1076
- 87: K,
1077
- 88: q,
1078
- 89: J,
1079
- 90: Y
1075
+ 86: K,
1076
+ 87: q,
1077
+ 88: J,
1078
+ 89: Y,
1079
+ 90: X
1080
1080
  },
1081
1081
  { 60: [1, 118] },
1082
1082
  {
@@ -1086,21 +1086,21 @@ var parser = (function() {
1086
1086
  e(O, [2, 62]),
1087
1087
  e(O, [2, 128]),
1088
1088
  {
1089
- 22: V,
1090
- 48: H,
1089
+ 22: H,
1090
+ 48: U,
1091
1091
  59: 120,
1092
- 60: U,
1092
+ 60: W,
1093
1093
  61: [1, 121],
1094
- 82: W,
1094
+ 82: G,
1095
1095
  84: 107,
1096
1096
  85: 108,
1097
- 86: G,
1098
- 87: K,
1099
- 88: q,
1100
- 89: J,
1101
- 90: Y
1097
+ 86: K,
1098
+ 87: q,
1099
+ 88: J,
1100
+ 89: Y,
1101
+ 90: X
1102
1102
  },
1103
- e(re, [2, 64]),
1103
+ e(ne, [2, 64]),
1104
1104
  {
1105
1105
  16: 39,
1106
1106
  17: 40,
@@ -1128,7 +1128,7 @@ var parser = (function() {
1128
1128
  103: E
1129
1129
  },
1130
1130
  { 39: [2, 10] },
1131
- e(X, [2, 45], {
1131
+ e(re, [2, 45], {
1132
1132
  11: 125,
1133
1133
  12: [1, 126]
1134
1134
  }),
@@ -1182,7 +1182,7 @@ var parser = (function() {
1182
1182
  {
1183
1183
  41: [2, 51],
1184
1184
  45: 137,
1185
- 51: ne
1185
+ 51: V
1186
1186
  },
1187
1187
  {
1188
1188
  16: 39,
@@ -1207,15 +1207,15 @@ var parser = (function() {
1207
1207
  e(O, [2, 95], { 61: ie }),
1208
1208
  e(ae, [2, 97], {
1209
1209
  85: 146,
1210
- 22: V,
1211
- 48: H,
1212
- 60: U,
1213
- 82: W,
1214
- 86: G,
1215
- 87: K,
1216
- 88: q,
1217
- 89: J,
1218
- 90: Y
1210
+ 22: H,
1211
+ 48: U,
1212
+ 60: W,
1213
+ 82: G,
1214
+ 86: K,
1215
+ 87: q,
1216
+ 88: J,
1217
+ 89: Y,
1218
+ 90: X
1219
1219
  }),
1220
1220
  e(Q, [2, 99]),
1221
1221
  e(Q, [2, 101]),
@@ -1243,7 +1243,7 @@ var parser = (function() {
1243
1243
  103: E
1244
1244
  },
1245
1245
  { 39: [2, 12] },
1246
- e(X, [2, 46]),
1246
+ e(re, [2, 46]),
1247
1247
  { 13: [1, 149] },
1248
1248
  { 1: [2, 4] },
1249
1249
  e(Z, [2, 59]),
@@ -1270,7 +1270,7 @@ var parser = (function() {
1270
1270
  },
1271
1271
  {
1272
1272
  45: 153,
1273
- 51: ne
1273
+ 51: V
1274
1274
  },
1275
1275
  e(I, [2, 42]),
1276
1276
  { 41: [2, 52] },
@@ -1285,20 +1285,20 @@ var parser = (function() {
1285
1285
  77: [1, 156]
1286
1286
  }),
1287
1287
  {
1288
- 22: V,
1289
- 48: H,
1290
- 60: U,
1291
- 82: W,
1288
+ 22: H,
1289
+ 48: U,
1290
+ 60: W,
1291
+ 82: G,
1292
1292
  84: 158,
1293
1293
  85: 108,
1294
- 86: G,
1295
- 87: K,
1296
- 88: q,
1297
- 89: J,
1298
- 90: Y
1294
+ 86: K,
1295
+ 87: q,
1296
+ 88: J,
1297
+ 89: Y,
1298
+ 90: X
1299
1299
  },
1300
1300
  e(Q, [2, 100]),
1301
- e(re, [2, 65]),
1301
+ e(ne, [2, 65]),
1302
1302
  { 39: [2, 11] },
1303
1303
  { 14: [1, 159] },
1304
1304
  e(Z, [2, 60]),
@@ -1311,17 +1311,17 @@ var parser = (function() {
1311
1311
  e(O, [2, 93], { 77: [1, 161] }),
1312
1312
  e(ae, [2, 98], {
1313
1313
  85: 146,
1314
- 22: V,
1315
- 48: H,
1316
- 60: U,
1317
- 82: W,
1318
- 86: G,
1319
- 87: K,
1320
- 88: q,
1321
- 89: J,
1322
- 90: Y
1314
+ 22: H,
1315
+ 48: U,
1316
+ 60: W,
1317
+ 82: G,
1318
+ 86: K,
1319
+ 87: q,
1320
+ 88: J,
1321
+ 89: Y,
1322
+ 90: X
1323
1323
  }),
1324
- e(X, [2, 8]),
1324
+ e(re, [2, 8]),
1325
1325
  e(I, [2, 44]),
1326
1326
  e(O, [2, 94])
1327
1327
  ],
@@ -1345,7 +1345,7 @@ var parser = (function() {
1345
1345
  }
1346
1346
  }, "parseError"),
1347
1347
  parse: /* @__PURE__ */ __name(function(e) {
1348
- var t = this, n = [0], i = [], a = [null], o = [], s = this.table, c = "", l = 0, u = 0, d = 0, f = 2, p = 1, m = o.slice.call(arguments, 1), h = Object.create(this.lexer), g = { yy: {} };
1348
+ var n = this, r = [0], i = [], a = [null], o = [], s = this.table, c = "", l = 0, u = 0, d = 0, f = 2, p = 1, m = o.slice.call(arguments, 1), h = Object.create(this.lexer), g = { yy: {} };
1349
1349
  for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
1350
1350
  h.setInput(e, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
1351
1351
  var v = h.yylloc;
@@ -1353,16 +1353,16 @@ var parser = (function() {
1353
1353
  var y = h.options && h.options.ranges;
1354
1354
  typeof g.yy.parseError == "function" ? this.parseError = g.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
1355
1355
  function b(e) {
1356
- n.length -= 2 * e, a.length -= e, o.length -= e;
1356
+ r.length -= 2 * e, a.length -= e, o.length -= e;
1357
1357
  }
1358
1358
  __name(b, "popStack");
1359
1359
  function x() {
1360
1360
  var e = i.pop() || h.lex() || p;
1361
- return typeof e != "number" && (e instanceof Array && (i = e, e = i.pop()), e = t.symbols_[e] || e), e;
1361
+ return typeof e != "number" && (e instanceof Array && (i = e, e = i.pop()), e = n.symbols_[e] || e), e;
1362
1362
  }
1363
1363
  __name(x, "lex");
1364
1364
  for (var S, C, w, T, E, D = {}, O, k, A, j;;) {
1365
- if (w = n[n.length - 1], this.defaultActions[w] ? T = this.defaultActions[w] : (S ??= x(), T = s[w] && s[w][S]), T === void 0 || !T.length || !T[0]) {
1365
+ if (w = r[r.length - 1], this.defaultActions[w] ? T = this.defaultActions[w] : (S ??= x(), T = s[w] && s[w][S]), T === void 0 || !T.length || !T[0]) {
1366
1366
  var M = "";
1367
1367
  for (O in j = [], s[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
1368
1368
  M = h.showPosition ? "Parse error on line " + (l + 1) + ":\n" + h.showPosition() + "\nExpecting " + j.join(", ") + ", got '" + (this.terminals_[S] || S) + "'" : "Parse error on line " + (l + 1) + ": Unexpected " + (S == p ? "end of input" : "'" + (this.terminals_[S] || S) + "'"), this.parseError(M, {
@@ -1376,7 +1376,7 @@ var parser = (function() {
1376
1376
  if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
1377
1377
  switch (T[0]) {
1378
1378
  case 1:
1379
- n.push(S), a.push(h.yytext), o.push(h.yylloc), n.push(T[1]), S = null, C ? (S = C, C = null) : (u = h.yyleng, c = h.yytext, l = h.yylineno, v = h.yylloc, d > 0 && d--);
1379
+ r.push(S), a.push(h.yytext), o.push(h.yylloc), r.push(T[1]), S = null, C ? (S = C, C = null) : (u = h.yyleng, c = h.yytext, l = h.yylineno, v = h.yylloc, d > 0 && d--);
1380
1380
  break;
1381
1381
  case 2:
1382
1382
  if (k = this.productions_[T[1]][1], D.$ = a[a.length - k], D._$ = {
@@ -1393,7 +1393,7 @@ var parser = (function() {
1393
1393
  a,
1394
1394
  o
1395
1395
  ].concat(m)), E !== void 0) return E;
1396
- k && (n = n.slice(0, -1 * k * 2), a = a.slice(0, -1 * k), o = o.slice(0, -1 * k)), n.push(this.productions_[T[1]][0]), a.push(D.$), o.push(D._$), A = s[n[n.length - 2]][n[n.length - 1]], n.push(A);
1396
+ k && (r = r.slice(0, -1 * k * 2), a = a.slice(0, -1 * k), o = o.slice(0, -1 * k)), r.push(this.productions_[T[1]][0]), a.push(D.$), o.push(D._$), A = s[r[r.length - 2]][r[r.length - 1]], r.push(A);
1397
1397
  break;
1398
1398
  case 3: return !0;
1399
1399
  }
@@ -2580,10 +2580,10 @@ var classDiagram_default = parser, visibilityValues = [
2580
2580
  }, this.setupToolTips = /* @__PURE__ */ __name((e) => {
2581
2581
  let t = select_default(".mermaidTooltip");
2582
2582
  (t._groups || t)[0][0] === null && (t = select_default("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0)), select_default(e).select("svg").selectAll("g.node").on("mouseover", (e) => {
2583
- let n = select_default(e.currentTarget);
2584
- if (n.attr("title") === null) return;
2585
- let r = this.getBoundingClientRect();
2586
- t.transition().duration(200).style("opacity", ".9"), t.text(n.attr("title")).style("left", window.scrollX + r.left + (r.right - r.left) / 2 + "px").style("top", window.scrollY + r.top - 14 + document.body.scrollTop + "px"), t.html(t.html().replace(/&lt;br\/&gt;/g, "<br/>")), n.classed("hover", !0);
2583
+ let r = select_default(e.currentTarget);
2584
+ if (r.attr("title") === null) return;
2585
+ let i = this.getBoundingClientRect();
2586
+ t.transition().duration(200).style("opacity", ".9"), t.text(r.attr("title")).style("left", window.scrollX + i.left + (i.right - i.left) / 2 + "px").style("top", window.scrollY + i.top - 14 + document.body.scrollTop + "px"), t.html(t.html().replace(/&lt;br\/&gt;/g, "<br/>")), r.classed("hover", !0);
2587
2587
  }).on("mouseout", (e) => {
2588
2588
  t.transition().duration(500).style("opacity", 0), select_default(e.currentTarget).classed("hover", !1);
2589
2589
  });
@@ -2653,16 +2653,16 @@ var classDiagram_default = parser, visibilityValues = [
2653
2653
  getNotes() {
2654
2654
  return this.notes;
2655
2655
  }
2656
- addRelation(e) {
2657
- log.debug("Adding relation: " + JSON.stringify(e));
2658
- let t = [
2656
+ addRelation(t) {
2657
+ log.debug("Adding relation: " + JSON.stringify(t));
2658
+ let n = [
2659
2659
  this.relationType.LOLLIPOP,
2660
2660
  this.relationType.AGGREGATION,
2661
2661
  this.relationType.COMPOSITION,
2662
2662
  this.relationType.DEPENDENCY,
2663
2663
  this.relationType.EXTENSION
2664
2664
  ];
2665
- e.relation.type1 === this.relationType.LOLLIPOP && !t.includes(e.relation.type2) ? (this.addClass(e.id2), this.addInterface(e.id1, e.id2), e.id1 = `interface${this.interfaces.length - 1}`) : e.relation.type2 === this.relationType.LOLLIPOP && !t.includes(e.relation.type1) ? (this.addClass(e.id1), this.addInterface(e.id2, e.id1), e.id2 = `interface${this.interfaces.length - 1}`) : (this.addClass(e.id1), this.addClass(e.id2)), e.id1 = this.splitClassNameAndType(e.id1).className, e.id2 = this.splitClassNameAndType(e.id2).className, e.relationTitle1 = common_default.sanitizeText(e.relationTitle1.trim(), getConfig2()), e.relationTitle2 = common_default.sanitizeText(e.relationTitle2.trim(), getConfig2()), this.relations.push(e);
2665
+ t.relation.type1 === this.relationType.LOLLIPOP && !n.includes(t.relation.type2) ? (this.addClass(t.id2), this.addInterface(t.id1, t.id2), t.id1 = `interface${this.interfaces.length - 1}`) : t.relation.type2 === this.relationType.LOLLIPOP && !n.includes(t.relation.type1) ? (this.addClass(t.id1), this.addInterface(t.id2, t.id1), t.id2 = `interface${this.interfaces.length - 1}`) : (this.addClass(t.id1), this.addClass(t.id2)), t.id1 = this.splitClassNameAndType(t.id1).className, t.id2 = this.splitClassNameAndType(t.id2).className, t.relationTitle1 = common_default.sanitizeText(t.relationTitle1.trim(), getConfig2()), t.relationTitle2 = common_default.sanitizeText(t.relationTitle2.trim(), getConfig2()), this.relations.push(t);
2666
2666
  }
2667
2667
  addAnnotation(e, t) {
2668
2668
  let n = this.splitClassNameAndType(e).className;
@@ -2724,13 +2724,13 @@ var classDiagram_default = parser, visibilityValues = [
2724
2724
  getTooltip(e, t) {
2725
2725
  return t && this.namespaces.has(t) ? this.namespaces.get(t).classes.get(e).tooltip : this.classes.get(e).tooltip;
2726
2726
  }
2727
- setLink(e, n, r) {
2728
- let i = getConfig2();
2727
+ setLink(e, t, n) {
2728
+ let r = getConfig2();
2729
2729
  e.split(",").forEach((e) => {
2730
- let a = e;
2731
- /\d/.exec(e[0]) && (a = MERMAID_DOM_ID_PREFIX + a);
2732
- let o = this.classes.get(a);
2733
- o && (o.link = utils_default.formatUrl(n, i), i.securityLevel === "sandbox" ? o.linkTarget = "_top" : typeof r == "string" ? o.linkTarget = sanitizeText2(r) : o.linkTarget = "_blank");
2730
+ let i = e;
2731
+ /\d/.exec(e[0]) && (i = MERMAID_DOM_ID_PREFIX + i);
2732
+ let a = this.classes.get(i);
2733
+ a && (a.link = utils_default.formatUrl(t, r), r.securityLevel === "sandbox" ? a.linkTarget = "_top" : typeof n == "string" ? a.linkTarget = sanitizeText2(n) : a.linkTarget = "_blank");
2734
2734
  }), this.setCssClass(e, "clickable");
2735
2735
  }
2736
2736
  setClickEvent(e, t, n) {
@@ -2738,23 +2738,23 @@ var classDiagram_default = parser, visibilityValues = [
2738
2738
  this.setClickFunc(e, t, n), this.classes.get(e).haveCallback = !0;
2739
2739
  }), this.setCssClass(e, "clickable");
2740
2740
  }
2741
- setClickFunc(e, n, r) {
2742
- let i = common_default.sanitizeText(e, getConfig2());
2743
- if (getConfig2().securityLevel !== "loose" || n === void 0) return;
2744
- let a = i;
2745
- if (this.classes.has(a)) {
2746
- let e = this.lookUpDomId(a), i = [];
2747
- if (typeof r == "string") {
2748
- i = r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
2749
- for (let e = 0; e < i.length; e++) {
2750
- let t = i[e].trim();
2751
- t.startsWith("\"") && t.endsWith("\"") && (t = t.substr(1, t.length - 2)), i[e] = t;
2741
+ setClickFunc(e, t, n) {
2742
+ let r = common_default.sanitizeText(e, getConfig2());
2743
+ if (getConfig2().securityLevel !== "loose" || t === void 0) return;
2744
+ let i = r;
2745
+ if (this.classes.has(i)) {
2746
+ let e = this.lookUpDomId(i), r = [];
2747
+ if (typeof n == "string") {
2748
+ r = n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
2749
+ for (let e = 0; e < r.length; e++) {
2750
+ let t = r[e].trim();
2751
+ t.startsWith("\"") && t.endsWith("\"") && (t = t.substr(1, t.length - 2)), r[e] = t;
2752
2752
  }
2753
2753
  }
2754
- i.length === 0 && i.push(e), this.functions.push(() => {
2755
- let r = document.querySelector(`[id="${e}"]`);
2756
- r !== null && r.addEventListener("click", () => {
2757
- utils_default.runFunc(n, ...i);
2754
+ r.length === 0 && r.push(e), this.functions.push(() => {
2755
+ let n = document.querySelector(`[id="${e}"]`);
2756
+ n !== null && n.addEventListener("click", () => {
2757
+ utils_default.runFunc(t, ...r);
2758
2758
  }, !1);
2759
2759
  });
2760
2760
  }
@@ -2817,52 +2817,52 @@ var classDiagram_default = parser, visibilityValues = [
2817
2817
  return t;
2818
2818
  }
2819
2819
  getData() {
2820
- let t = [], n = [], r = getConfig2();
2821
- for (let e of this.namespaces.keys()) {
2822
- let n = this.namespaces.get(e);
2823
- if (n) {
2824
- let e = {
2825
- id: n.id,
2826
- label: n.id,
2820
+ let e = [], t = [], n = getConfig2();
2821
+ for (let t of this.namespaces.keys()) {
2822
+ let r = this.namespaces.get(t);
2823
+ if (r) {
2824
+ let t = {
2825
+ id: r.id,
2826
+ label: r.id,
2827
2827
  isGroup: !0,
2828
- padding: r.class.padding ?? 16,
2828
+ padding: n.class.padding ?? 16,
2829
2829
  shape: "rect",
2830
2830
  cssStyles: ["fill: none", "stroke: black"],
2831
- look: r.look
2831
+ look: n.look
2832
2832
  };
2833
- t.push(e);
2833
+ e.push(t);
2834
2834
  }
2835
2835
  }
2836
- for (let e of this.classes.keys()) {
2837
- let n = this.classes.get(e);
2838
- if (n) {
2839
- let e = n;
2840
- e.parentId = n.parent, e.look = r.look, t.push(e);
2836
+ for (let t of this.classes.keys()) {
2837
+ let r = this.classes.get(t);
2838
+ if (r) {
2839
+ let t = r;
2840
+ t.parentId = r.parent, t.look = n.look, e.push(t);
2841
2841
  }
2842
2842
  }
2843
- let i = 0;
2844
- for (let e of this.notes) {
2845
- i++;
2843
+ let r = 0;
2844
+ for (let i of this.notes) {
2845
+ r++;
2846
2846
  let a = {
2847
- id: e.id,
2848
- label: e.text,
2847
+ id: i.id,
2848
+ label: i.text,
2849
2849
  isGroup: !1,
2850
2850
  shape: "note",
2851
- padding: r.class.padding ?? 6,
2851
+ padding: n.class.padding ?? 6,
2852
2852
  cssStyles: [
2853
2853
  "text-align: left",
2854
2854
  "white-space: nowrap",
2855
- `fill: ${r.themeVariables.noteBkgColor}`,
2856
- `stroke: ${r.themeVariables.noteBorderColor}`
2855
+ `fill: ${n.themeVariables.noteBkgColor}`,
2856
+ `stroke: ${n.themeVariables.noteBorderColor}`
2857
2857
  ],
2858
- look: r.look
2858
+ look: n.look
2859
2859
  };
2860
- t.push(a);
2861
- let o = this.classes.get(e.class)?.id ?? "";
2860
+ e.push(a);
2861
+ let o = this.classes.get(i.class)?.id ?? "";
2862
2862
  if (o) {
2863
- let t = {
2864
- id: `edgeNote${i}`,
2865
- start: e.id,
2863
+ let e = {
2864
+ id: `edgeNote${r}`,
2865
+ start: i.id,
2866
2866
  end: o,
2867
2867
  type: "normal",
2868
2868
  thickness: "normal",
@@ -2873,54 +2873,54 @@ var classDiagram_default = parser, visibilityValues = [
2873
2873
  labelStyle: [""],
2874
2874
  style: ["fill: none"],
2875
2875
  pattern: "dotted",
2876
- look: r.look
2876
+ look: n.look
2877
2877
  };
2878
- n.push(t);
2878
+ t.push(e);
2879
2879
  }
2880
2880
  }
2881
- for (let e of this.interfaces) {
2882
- let n = {
2883
- id: e.id,
2884
- label: e.label,
2881
+ for (let t of this.interfaces) {
2882
+ let r = {
2883
+ id: t.id,
2884
+ label: t.label,
2885
2885
  isGroup: !1,
2886
2886
  shape: "rect",
2887
2887
  cssStyles: ["opacity: 0;"],
2888
- look: r.look
2888
+ look: n.look
2889
2889
  };
2890
- t.push(n);
2890
+ e.push(r);
2891
2891
  }
2892
- i = 0;
2893
- for (let t of this.relations) {
2894
- i++;
2895
- let a = {
2896
- id: getEdgeId(t.id1, t.id2, {
2892
+ r = 0;
2893
+ for (let e of this.relations) {
2894
+ r++;
2895
+ let i = {
2896
+ id: getEdgeId(e.id1, e.id2, {
2897
2897
  prefix: "id",
2898
- counter: i
2898
+ counter: r
2899
2899
  }),
2900
- start: t.id1,
2901
- end: t.id2,
2900
+ start: e.id1,
2901
+ end: e.id2,
2902
2902
  type: "normal",
2903
- label: t.title,
2903
+ label: e.title,
2904
2904
  labelpos: "c",
2905
2905
  thickness: "normal",
2906
2906
  classes: "relation",
2907
- arrowTypeStart: this.getArrowMarker(t.relation.type1),
2908
- arrowTypeEnd: this.getArrowMarker(t.relation.type2),
2909
- startLabelRight: t.relationTitle1 === "none" ? "" : t.relationTitle1,
2910
- endLabelLeft: t.relationTitle2 === "none" ? "" : t.relationTitle2,
2907
+ arrowTypeStart: this.getArrowMarker(e.relation.type1),
2908
+ arrowTypeEnd: this.getArrowMarker(e.relation.type2),
2909
+ startLabelRight: e.relationTitle1 === "none" ? "" : e.relationTitle1,
2910
+ endLabelLeft: e.relationTitle2 === "none" ? "" : e.relationTitle2,
2911
2911
  arrowheadStyle: "",
2912
2912
  labelStyle: ["display: inline-block"],
2913
- style: t.style || "",
2914
- pattern: t.relation.lineType == 1 ? "dashed" : "solid",
2915
- look: r.look
2913
+ style: e.style || "",
2914
+ pattern: e.relation.lineType == 1 ? "dashed" : "solid",
2915
+ look: n.look
2916
2916
  };
2917
- n.push(a);
2917
+ t.push(i);
2918
2918
  }
2919
2919
  return {
2920
- nodes: t,
2921
- edges: n,
2920
+ nodes: e,
2921
+ edges: t,
2922
2922
  other: {},
2923
- config: r,
2923
+ config: n,
2924
2924
  direction: this.getDirection()
2925
2925
  };
2926
2926
  }
@@ -3087,16 +3087,16 @@ g.classGroup line {
3087
3087
  getClasses: /* @__PURE__ */ __name(function(e, t) {
3088
3088
  return t.db.getClasses();
3089
3089
  }, "getClasses"),
3090
- draw: /* @__PURE__ */ __name(async function(e, r, i, a) {
3091
- log.info("REF0:"), log.info("Drawing class diagram (v3)", r);
3092
- let { securityLevel: o, state: s, layout: c } = getConfig2(), l = a.db.getData(), u = getDiagramElement(r, o);
3093
- l.type = a.type, l.layoutAlgorithm = getRegisteredLayoutAlgorithm(c), l.nodeSpacing = s?.nodeSpacing || 50, l.rankSpacing = s?.rankSpacing || 50, l.markers = [
3090
+ draw: /* @__PURE__ */ __name(async function(t, n, r, i) {
3091
+ log.info("REF0:"), log.info("Drawing class diagram (v3)", n);
3092
+ let { securityLevel: a, state: o, layout: s } = getConfig2(), c = i.db.getData(), l = getDiagramElement(n, a);
3093
+ c.type = i.type, c.layoutAlgorithm = getRegisteredLayoutAlgorithm(s), c.nodeSpacing = o?.nodeSpacing || 50, c.rankSpacing = o?.rankSpacing || 50, c.markers = [
3094
3094
  "aggregation",
3095
3095
  "extension",
3096
3096
  "composition",
3097
3097
  "dependency",
3098
3098
  "lollipop"
3099
- ], l.diagramId = r, await render(l, u), utils_default.insertTitle(u, "classDiagramTitleText", s?.titleTopMargin ?? 25, a.db.getDiagramTitle()), setupViewPortForSVG(u, 8, "classDiagram", s?.useMaxWidth ?? !0);
3099
+ ], c.diagramId = n, await render(c, l), utils_default.insertTitle(l, "classDiagramTitleText", o?.titleTopMargin ?? 25, i.db.getDiagramTitle()), setupViewPortForSVG(l, 8, "classDiagram", o?.useMaxWidth ?? !0);
3100
3100
  }, "draw"),
3101
3101
  getDir: /* @__PURE__ */ __name((e, t = "TB") => {
3102
3102
  if (!e.doc) return t;