summaryrefslogtreecommitdiff
path: root/themes/blowfish/assets/lib/mermaid/svgDrawCommon-a14ead8e.js
blob: ffeb80a95159f62a6454b3f2972df0b6aaefbac3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import { aq as o, e as i } from "./mermaid-00886c59.js";
const l = (s, t) => {
  const e = s.append("rect");
  if (e.attr("x", t.x), e.attr("y", t.y), e.attr("fill", t.fill), e.attr("stroke", t.stroke), e.attr("width", t.width), e.attr("height", t.height), t.name && e.attr("name", t.name), t.rx !== void 0 && e.attr("rx", t.rx), t.ry !== void 0 && e.attr("ry", t.ry), t.attrs !== void 0)
    for (const r in t.attrs)
      e.attr(r, t.attrs[r]);
  return t.class !== void 0 && e.attr("class", t.class), e;
}, x = (s, t) => {
  const e = {
    x: t.startx,
    y: t.starty,
    width: t.stopx - t.startx,
    height: t.stopy - t.starty,
    fill: t.fill,
    stroke: t.stroke,
    class: "rect"
  };
  l(s, e).lower();
}, d = (s, t) => {
  const e = t.text.replace(o, " "), r = s.append("text");
  r.attr("x", t.x), r.attr("y", t.y), r.attr("class", "legend"), r.style("text-anchor", t.anchor), t.class !== void 0 && r.attr("class", t.class);
  const n = r.append("tspan");
  return n.attr("x", t.x + t.textMargin * 2), n.text(e), r;
}, h = (s, t, e, r) => {
  const n = s.append("image");
  n.attr("x", t), n.attr("y", e);
  const a = i.sanitizeUrl(r);
  n.attr("xlink:href", a);
}, y = (s, t, e, r) => {
  const n = s.append("use");
  n.attr("x", t), n.attr("y", e);
  const a = i.sanitizeUrl(r);
  n.attr("xlink:href", `#${a}`);
}, g = () => ({
  x: 0,
  y: 0,
  width: 100,
  height: 100,
  fill: "#EDF2AE",
  stroke: "#666",
  anchor: "start",
  rx: 0,
  ry: 0
}), p = () => ({
  x: 0,
  y: 0,
  width: 100,
  height: 100,
  "text-anchor": "start",
  style: "#666",
  textMargin: 0,
  rx: 0,
  ry: 0,
  tspan: !0
});
export {
  x as a,
  y as b,
  h as c,
  l as d,
  p as e,
  d as f,
  g
};