Merge pull request #1610 from gavin-ts/fix-dagre-child-id-eq-id

Fix dagre error with child named "id"
This commit is contained in:
gavin-ts 2023-09-25 10:33:48 -07:00 committed by GitHub
commit 91eb672ef5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 1272 additions and 235 deletions

View file

@ -17,3 +17,4 @@
- Fixes multiple constant nears overlapping in some cases [#1591](https://github.com/terrastruct/d2/issues/1591)
- Fixes error with an empty nested grid [#1594](https://github.com/terrastruct/d2/issues/1594)
- Fixes incorrect `d2fmt` with variable substitution mid-string [#1611](https://github.com/terrastruct/d2/issues/1611)
- Fixes dagre error with child named id [#1610](https://github.com/terrastruct/d2/issues/1610)

View file

@ -6,7 +6,6 @@ import (
"encoding/json"
"fmt"
"math"
"regexp"
"sort"
"strings"
@ -140,17 +139,13 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err
return err
}
mapper := NewObjectMapper()
loadScript := ""
idToObj := make(map[string]*d2graph.Object)
for _, obj := range g.Objects {
id := obj.AbsID()
idToObj[id] = obj
width, height := obj.Width, obj.Height
loadScript += generateAddNodeLine(id, int(width), int(height))
mapper.Register(obj)
loadScript += mapper.generateAddNodeLine(obj, int(obj.Width), int(obj.Height))
if obj.Parent != g.Root {
loadScript += generateAddParentLine(id, obj.Parent.AbsID())
loadScript += mapper.generateAddParentLine(obj, obj.Parent)
}
}
@ -178,7 +173,7 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err
}
}
loadScript += generateAddEdgeLine(src.AbsID(), dst.AbsID(), edge.AbsID(), width, height)
loadScript += mapper.generateAddEdgeLine(src, dst, edge.AbsID(), width, height)
}
if debugJS {
@ -209,7 +204,7 @@ func Layout(ctx context.Context, g *d2graph.Graph, opts *ConfigurableOpts) (err
log.Debug(ctx, "graph", slog.F("json", dn))
}
obj := idToObj[dn.ID]
obj := mapper.ToObj(dn.ID)
// dagre gives center of node
obj.TopLeft = geo.NewPoint(math.Round(dn.X-dn.Width/2), math.Round(dn.Y-dn.Height/2))
@ -415,30 +410,6 @@ func setGraphAttrs(attrs dagreOpts) string {
)
}
func escapeID(id string) string {
// fixes \\
id = strings.ReplaceAll(id, "\\", `\\`)
// replaces \n with \\n whenever \n is not preceded by \ (does not replace \\n)
re := regexp.MustCompile(`[^\\]\n`)
id = re.ReplaceAllString(id, `\\n`)
// avoid an unescaped \r becoming a \n in the layout result
id = strings.ReplaceAll(id, "\r", `\r`)
return id
}
func generateAddNodeLine(id string, width, height int) string {
id = escapeID(id)
return fmt.Sprintf("g.setNode(`%s`, { id: `%s`, width: %d, height: %d });\n", id, id, width, height)
}
func generateAddParentLine(childID, parentID string) string {
return fmt.Sprintf("g.setParent(`%s`, `%s`);\n", escapeID(childID), escapeID(parentID))
}
func generateAddEdgeLine(fromID, toID, edgeID string, width, height int) string {
return fmt.Sprintf("g.setEdge({v:`%s`, w:`%s`, name:`%s`}, { width:%d, height:%d, labelpos: `c` });\n", escapeID(fromID), escapeID(toID), escapeID(edgeID), width, height)
}
// getLongestEdgeChainHead finds the longest chain in a container and gets its head
// If there are multiple chains of the same length, get the head closest to the center
func getLongestEdgeChainHead(g *d2graph.Graph, container *d2graph.Object) *d2graph.Object {

View file

@ -0,0 +1,63 @@
package d2dagrelayout
import (
"fmt"
"regexp"
"strconv"
"strings"
"oss.terrastruct.com/d2/d2graph"
)
type objectMapper struct {
objToID map[*d2graph.Object]string
idToObj map[string]*d2graph.Object
}
func NewObjectMapper() *objectMapper {
return &objectMapper{
objToID: make(map[*d2graph.Object]string),
idToObj: make(map[string]*d2graph.Object),
}
}
func (c *objectMapper) Register(obj *d2graph.Object) {
id := strconv.Itoa(len(c.idToObj))
c.idToObj[id] = obj
c.objToID[obj] = id
}
func (c *objectMapper) ToID(obj *d2graph.Object) string {
return c.objToID[obj]
}
func (c *objectMapper) ToObj(id string) *d2graph.Object {
return c.idToObj[id]
}
func (c objectMapper) generateAddNodeLine(obj *d2graph.Object, width, height int) string {
id := c.ToID(obj)
return fmt.Sprintf("g.setNode(`%s`, { id: `%s`, width: %d, height: %d });\n", id, id, width, height)
}
func (c objectMapper) generateAddParentLine(child, parent *d2graph.Object) string {
return fmt.Sprintf("g.setParent(`%s`, `%s`);\n", c.ToID(child), c.ToID(parent))
}
func (c objectMapper) generateAddEdgeLine(from, to *d2graph.Object, edgeID string, width, height int) string {
return fmt.Sprintf(
"g.setEdge({v:`%s`, w:`%s`, name:`%s`}, { width:%d, height:%d, labelpos: `c` });\n",
c.ToID(from), c.ToID(to), escapeID(edgeID), width, height,
)
}
func escapeID(id string) string {
// fixes \\
id = strings.ReplaceAll(id, "\\", `\\`)
// replaces \n with \\n whenever \n is not preceded by \ (does not replace \\n)
re := regexp.MustCompile(`[^\\]\n`)
id = re.ReplaceAllString(id, `\\n`)
// avoid an unescaped \r becoming a \n in the layout result
id = strings.ReplaceAll(id, "\r", `\r`)
return id
}

View file

@ -1031,6 +1031,10 @@ cf many required: {
}
`,
},
{
name: "dagre_child_id_id",
script: `direction:right; id -> x.id -> y.z.id`,
},
loadFromFile(t, "slow_grid"),
loadFromFile(t, "grid_oom"),
loadFromFile(t, "cylinder_grid_label"),

View file

@ -0,0 +1,413 @@
{
"name": "",
"isFolderOnly": false,
"fontFamily": "SourceSansPro",
"shapes": [
{
"id": "id",
"type": "rectangle",
"pos": {
"x": 0,
"y": 147
},
"width": 59,
"height": 66,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"borderRadius": 0,
"fill": "B6",
"stroke": "B1",
"shadow": false,
"3d": false,
"multiple": false,
"double-border": false,
"tooltip": "",
"link": "",
"icon": null,
"iconPosition": "",
"blend": false,
"fields": null,
"methods": null,
"columns": null,
"label": "id",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "N1",
"italic": false,
"bold": true,
"underline": false,
"labelWidth": 14,
"labelHeight": 21,
"labelPosition": "INSIDE_MIDDLE_CENTER",
"zIndex": 0,
"level": 1
},
{
"id": "x",
"type": "rectangle",
"pos": {
"x": 179,
"y": 117
},
"width": 119,
"height": 126,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"borderRadius": 0,
"fill": "B4",
"stroke": "B1",
"shadow": false,
"3d": false,
"multiple": false,
"double-border": false,
"tooltip": "",
"link": "",
"icon": null,
"iconPosition": "",
"blend": false,
"fields": null,
"methods": null,
"columns": null,
"label": "x",
"fontSize": 28,
"fontFamily": "DEFAULT",
"language": "",
"color": "N1",
"italic": false,
"bold": false,
"underline": false,
"labelWidth": 13,
"labelHeight": 36,
"labelPosition": "OUTSIDE_TOP_CENTER",
"zIndex": 0,
"level": 1
},
{
"id": "x.id",
"type": "rectangle",
"pos": {
"x": 209,
"y": 147
},
"width": 59,
"height": 66,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"borderRadius": 0,
"fill": "B5",
"stroke": "B1",
"shadow": false,
"3d": false,
"multiple": false,
"double-border": false,
"tooltip": "",
"link": "",
"icon": null,
"iconPosition": "",
"blend": false,
"fields": null,
"methods": null,
"columns": null,
"label": "id",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "N1",
"italic": false,
"bold": true,
"underline": false,
"labelWidth": 14,
"labelHeight": 21,
"labelPosition": "INSIDE_MIDDLE_CENTER",
"zIndex": 0,
"level": 2
},
{
"id": "y",
"type": "rectangle",
"pos": {
"x": 458,
"y": 76
},
"width": 179,
"height": 197,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"borderRadius": 0,
"fill": "B4",
"stroke": "B1",
"shadow": false,
"3d": false,
"multiple": false,
"double-border": false,
"tooltip": "",
"link": "",
"icon": null,
"iconPosition": "",
"blend": false,
"fields": null,
"methods": null,
"columns": null,
"label": "y",
"fontSize": 28,
"fontFamily": "DEFAULT",
"language": "",
"color": "N1",
"italic": false,
"bold": false,
"underline": false,
"labelWidth": 13,
"labelHeight": 36,
"labelPosition": "OUTSIDE_TOP_CENTER",
"zIndex": 0,
"level": 1
},
{
"id": "y.z",
"type": "rectangle",
"pos": {
"x": 488,
"y": 117
},
"width": 119,
"height": 126,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"borderRadius": 0,
"fill": "B5",
"stroke": "B1",
"shadow": false,
"3d": false,
"multiple": false,
"double-border": false,
"tooltip": "",
"link": "",
"icon": null,
"iconPosition": "",
"blend": false,
"fields": null,
"methods": null,
"columns": null,
"label": "z",
"fontSize": 24,
"fontFamily": "DEFAULT",
"language": "",
"color": "N1",
"italic": false,
"bold": false,
"underline": false,
"labelWidth": 10,
"labelHeight": 31,
"labelPosition": "OUTSIDE_TOP_CENTER",
"zIndex": 0,
"level": 2
},
{
"id": "y.z.id",
"type": "rectangle",
"pos": {
"x": 518,
"y": 147
},
"width": 59,
"height": 66,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"borderRadius": 0,
"fill": "B6",
"stroke": "B1",
"shadow": false,
"3d": false,
"multiple": false,
"double-border": false,
"tooltip": "",
"link": "",
"icon": null,
"iconPosition": "",
"blend": false,
"fields": null,
"methods": null,
"columns": null,
"label": "id",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "N1",
"italic": false,
"bold": true,
"underline": false,
"labelWidth": 14,
"labelHeight": 21,
"labelPosition": "INSIDE_MIDDLE_CENTER",
"zIndex": 0,
"level": 3
}
],
"connections": [
{
"id": "(id -> x.id)[0]",
"src": "id",
"srcArrow": "none",
"dst": "x.id",
"dstArrow": "triangle",
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"stroke": "B1",
"borderRadius": 10,
"label": "",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "N2",
"italic": true,
"bold": false,
"underline": false,
"labelWidth": 0,
"labelHeight": 0,
"labelPosition": "",
"labelPercentage": 0,
"route": [
{
"x": 59,
"y": 180
},
{
"x": 99,
"y": 180
},
{
"x": 169,
"y": 180
},
{
"x": 209,
"y": 180
}
],
"isCurve": true,
"animated": false,
"tooltip": "",
"icon": null,
"zIndex": 0
},
{
"id": "(x.id -> y.z.id)[0]",
"src": "x.id",
"srcArrow": "none",
"dst": "y.z.id",
"dstArrow": "triangle",
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"stroke": "B1",
"borderRadius": 10,
"label": "",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "N2",
"italic": true,
"bold": false,
"underline": false,
"labelWidth": 0,
"labelHeight": 0,
"labelPosition": "",
"labelPercentage": 0,
"route": [
{
"x": 268,
"y": 180
},
{
"x": 308,
"y": 180
},
{
"x": 328,
"y": 180
},
{
"x": 343,
"y": 180
},
{
"x": 358,
"y": 180
},
{
"x": 378,
"y": 180
},
{
"x": 393,
"y": 180
},
{
"x": 408,
"y": 180
},
{
"x": 478,
"y": 180
},
{
"x": 518,
"y": 180
}
],
"isCurve": true,
"animated": false,
"tooltip": "",
"icon": null,
"zIndex": 0
}
],
"root": {
"id": "",
"type": "",
"pos": {
"x": 0,
"y": 0
},
"width": 0,
"height": 0,
"opacity": 0,
"strokeDash": 0,
"strokeWidth": 0,
"borderRadius": 0,
"fill": "N7",
"stroke": "",
"shadow": false,
"3d": false,
"multiple": false,
"double-border": false,
"tooltip": "",
"link": "",
"icon": null,
"iconPosition": "",
"blend": false,
"fields": null,
"methods": null,
"columns": null,
"label": "",
"fontSize": 0,
"fontFamily": "",
"language": "",
"color": "",
"italic": false,
"bold": false,
"underline": false,
"labelWidth": 0,
"labelHeight": 0,
"zIndex": 0,
"level": 0
}
}

View file

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="utf-8"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" d2Version="v0.6.0-HEAD" preserveAspectRatio="xMinYMin meet" viewBox="0 0 639 239"><svg id="d2-svg" class="d2-4115810162" width="639" height="239" viewBox="-1 35 639 239"><rect x="-1.000000" y="35.000000" width="639.000000" height="239.000000" rx="0.000000" class=" fill-N7" stroke-width="0" /><style type="text/css"><![CDATA[
.d2-4115810162 .text {
font-family: "d2-4115810162-font-regular";
}
@font-face {
font-family: d2-4115810162-font-regular;
src: url("data:application/font-woff;base64,d09GRgABAAAAAAd8AAoAAAAADDQAAguFAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAAA9AAAAGAAAABgXd/Vo2NtYXAAAAFUAAAARgAAAEgAhgE6Z2x5ZgAAAZwAAAHqAAAB/JUdp6doZWFkAAADiAAAADYAAAA2G4Ue32hoZWEAAAPAAAAAJAAAACQKhAXKaG10eAAAA+QAAAAgAAAAIAvfASFsb2NhAAAEBAAAABIAAAASAs4CRG1heHAAAAQYAAAAIAAAACAAIAD2bmFtZQAABDgAAAMjAAAIFAbDVU1wb3N0AAAHXAAAAB0AAAAg/9EAMgADAgkBkAAFAAACigJYAAAASwKKAlgAAAFeADIBIwAAAgsFAwMEAwICBGAAAvcAAAADAAAAAAAAAABBREJPAEAAIP//Au7/BgAAA9gBESAAAZ8AAAAAAeYClAAAACAAA3icLMq9DUBQAEbR834krzCScTQ2ECuYQGHWT4Jb3eKgaApm3YJhqFhtjuS/PcmdK+drv4qq6SYeAAAA//8BAAD//3p5C7oAAHicLJHNa9N+HMffn2+yZPul7ZZf89S5NeuiCZsb1X6XfDcn061W5ygoLTqrIMgOO0yE4aEMxF304EEUtrNe/AMEYR48iqgXwaPgUWLBk0/gpYm0+A+8Xu8HDKAFsJDtQ8IQhvE/TIDrJf1IKQg8VXAhPFsSAelqiz4nj4nOz8lRJB9f+bays7tLV+6y/e7NE/c2N99cb7eTh3EnqdCHDhjK6S/6xN4hjwnAnvTDuSjiFcsOQq57gacoQUWEvu9NKoppWH+u3Vq8IaaXJuTmGVUaqxdOn3QXisEp/2zm/s6F20vF0ear7vzC2FStmozZ5eb8+kaaogbgBTtgPhQACtQ7AEDIAfScYhQALgJuW5bNo0gIrtpe4Ps9u6rmnu61ljUnK2uWtnh570nrXHY0J2edzErS2cpPG8Z0fuv7721rxjSP2tt9biYt01uKcajfKBCWxSuREBLP/zPkuZRjV0fGMyODxtBUNKy9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5o5SOUPNkY900i/TnEWMzRWFGM7Uy6U3SutfbI6Y6S5e25t9Pw0XNnvLKb4i1wx7ty44eeUWjD6kanDLM5f6CYiIyTlVxJCcGS0qrsT7LRHnpDgO1b03mpKKznWOP+dKLkmYiUGXTHXmFPobmW9C4z5c872ztyRWvmd6dn2r+5zi1Ksbjd6pe8u90LqcrCjQMlXzFTcNxTUz7yeaqVX+oXJLvW45z+iTSPVUN7j9DjwnoM0Ou+wz0TlD7VzYG9HWO9HmFfvqwRmJokZydWIVdgl4wS67vOLFWs0OhxzQY/8OHBdZPQ54fWtnXadlFWd1/hSbtvg6nl2vXt5br8/v4MsvNFE3L2Nf2vhuX1i1G/+fEDHzXNzW6p3cE4L/AAAA//8BAAD//wdbTDAAeJxiYGYAg//nGIwYsAAAAAAA//8BAAD//y8BAgMAAAA=");
}
.d2-4115810162 .text-bold {
font-family: "d2-4115810162-font-bold";
}
@font-face {
font-family: d2-4115810162-font-bold;
src: url("data:application/font-woff;base64,d09GRgABAAAAAAdwAAoAAAAADEgAAguFAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAAA9AAAAGAAAABgXxHXrmNtYXAAAAFUAAAARgAAAEgAhgE6Z2x5ZgAAAZwAAAHbAAAB+PpwB0NoZWFkAAADeAAAADYAAAA2G38e1GhoZWEAAAOwAAAAJAAAACQKfwXHaG10eAAAA9QAAAAgAAAAIAzvANxsb2NhAAAD9AAAABIAAAASAsoCQm1heHAAAAQIAAAAIAAAACAAIAD3bmFtZQAABCgAAAMoAAAIKgjwVkFwb3N0AAAHUAAAAB0AAAAg/9EAMgADAioCvAAFAAACigJYAAAASwKKAlgAAAFeADIBKQAAAgsHAwMEAwICBGAAAvcAAAADAAAAAAAAAABBREJPACAAIP//Au7/BgAAA9gBESAAAZ8AAAAAAfAClAAAACAAA3icLMq9DUBQAEbR834krzCScTQ2ECuYQGHWT4Jb3eKgaApm3YJhqFhtjuS/PcmdK+drv4qq6SYeAAAA//8BAAD//3p5C7oAAHicTJ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rd5hMWsVHlE03CNz9gzXGcP6DOhIGZCwgjHkAkjrpgRkeMTMWPCkIgQR4cWMYW+JgRCjtF/fg3wKZgRKOKYAkeMT0xAztgi/iKvlHNlHOo0s7sWBWMCLuRxSUCCI2VESkLEpeIUFGS8okGDnIH4ZhTkeORMiPFImTGiQZc2p/QZMyHH0VakkplPypCCawLld2ZRdmZAREJurK5ICMXTiV8k7w6nOLpksl2PfLoR4Usc38m75JbK9is8/bo1Zpt5l2wC5upnrK7EurnWBMe6LfO2+Fa44BXuXv3ZZPL+HoX6XyjyBVeaf6hJJWKS4NwuLXwpyHePcRzp3MFXR76nQ58Turyhr3OLHj1anNGnw2v5dunh+JouZxzLoyO8uGtLMWf8gOMbOrIpY0fWn8XEIn4mM3Xn4jhTHVMy9bxk7qnWSBXefcLlDqUb6sjlM9AelZZO80u0ZwEjU0UmhlP1cqmN3PoXmiKmqqWc7e19uQ1z273lFt+QaodLtS44lZNbMHrfVL13NHOtH4+AkJQLWQxImdKg4Ea8zwm4IsZxrO6daEsKWiufMs+NVBIxFYMOieLMyPQ3MN34xn2woXtnb0ko/5Lp5aqq+2Rx6tXtjN6oe8s737ocrU2gYVNN19Q0ENfEtB9pp9b5+/LN9bqlPOWIlJjwXy/AMzya7HPAIWNlGOhmbq9DUy9Ek5ccqvpLIlkNpefIIhzg8ZwDDnjJ83f6uGTijItbcVnP3eKYI7ocflAVC/suR7xeffv/rL+LaVO1OJ6uTi/uPcUnd1DrF9qz2/eyp4mVk5hbtNutOCNgWnJxu+s1ucd4/wAAAP//AQAA///0t09ReJxiYGYAg//nGIwYsAAAAAAA//8BAAD//y8BAgMAAAA=");
}]]></style><style type="text/css"><![CDATA[.shape {
shape-rendering: geometricPrecision;
stroke-linejoin: round;
}
.connection {
stroke-linecap: round;
stroke-linejoin: round;
}
.blend {
mix-blend-mode: multiply;
opacity: 0.5;
}
.d2-4115810162 .fill-N1{fill:#0A0F25;}
.d2-4115810162 .fill-N2{fill:#676C7E;}
.d2-4115810162 .fill-N3{fill:#9499AB;}
.d2-4115810162 .fill-N4{fill:#CFD2DD;}
.d2-4115810162 .fill-N5{fill:#DEE1EB;}
.d2-4115810162 .fill-N6{fill:#EEF1F8;}
.d2-4115810162 .fill-N7{fill:#FFFFFF;}
.d2-4115810162 .fill-B1{fill:#0D32B2;}
.d2-4115810162 .fill-B2{fill:#0D32B2;}
.d2-4115810162 .fill-B3{fill:#E3E9FD;}
.d2-4115810162 .fill-B4{fill:#E3E9FD;}
.d2-4115810162 .fill-B5{fill:#EDF0FD;}
.d2-4115810162 .fill-B6{fill:#F7F8FE;}
.d2-4115810162 .fill-AA2{fill:#4A6FF3;}
.d2-4115810162 .fill-AA4{fill:#EDF0FD;}
.d2-4115810162 .fill-AA5{fill:#F7F8FE;}
.d2-4115810162 .fill-AB4{fill:#EDF0FD;}
.d2-4115810162 .fill-AB5{fill:#F7F8FE;}
.d2-4115810162 .stroke-N1{stroke:#0A0F25;}
.d2-4115810162 .stroke-N2{stroke:#676C7E;}
.d2-4115810162 .stroke-N3{stroke:#9499AB;}
.d2-4115810162 .stroke-N4{stroke:#CFD2DD;}
.d2-4115810162 .stroke-N5{stroke:#DEE1EB;}
.d2-4115810162 .stroke-N6{stroke:#EEF1F8;}
.d2-4115810162 .stroke-N7{stroke:#FFFFFF;}
.d2-4115810162 .stroke-B1{stroke:#0D32B2;}
.d2-4115810162 .stroke-B2{stroke:#0D32B2;}
.d2-4115810162 .stroke-B3{stroke:#E3E9FD;}
.d2-4115810162 .stroke-B4{stroke:#E3E9FD;}
.d2-4115810162 .stroke-B5{stroke:#EDF0FD;}
.d2-4115810162 .stroke-B6{stroke:#F7F8FE;}
.d2-4115810162 .stroke-AA2{stroke:#4A6FF3;}
.d2-4115810162 .stroke-AA4{stroke:#EDF0FD;}
.d2-4115810162 .stroke-AA5{stroke:#F7F8FE;}
.d2-4115810162 .stroke-AB4{stroke:#EDF0FD;}
.d2-4115810162 .stroke-AB5{stroke:#F7F8FE;}
.d2-4115810162 .background-color-N1{background-color:#0A0F25;}
.d2-4115810162 .background-color-N2{background-color:#676C7E;}
.d2-4115810162 .background-color-N3{background-color:#9499AB;}
.d2-4115810162 .background-color-N4{background-color:#CFD2DD;}
.d2-4115810162 .background-color-N5{background-color:#DEE1EB;}
.d2-4115810162 .background-color-N6{background-color:#EEF1F8;}
.d2-4115810162 .background-color-N7{background-color:#FFFFFF;}
.d2-4115810162 .background-color-B1{background-color:#0D32B2;}
.d2-4115810162 .background-color-B2{background-color:#0D32B2;}
.d2-4115810162 .background-color-B3{background-color:#E3E9FD;}
.d2-4115810162 .background-color-B4{background-color:#E3E9FD;}
.d2-4115810162 .background-color-B5{background-color:#EDF0FD;}
.d2-4115810162 .background-color-B6{background-color:#F7F8FE;}
.d2-4115810162 .background-color-AA2{background-color:#4A6FF3;}
.d2-4115810162 .background-color-AA4{background-color:#EDF0FD;}
.d2-4115810162 .background-color-AA5{background-color:#F7F8FE;}
.d2-4115810162 .background-color-AB4{background-color:#EDF0FD;}
.d2-4115810162 .background-color-AB5{background-color:#F7F8FE;}
.d2-4115810162 .color-N1{color:#0A0F25;}
.d2-4115810162 .color-N2{color:#676C7E;}
.d2-4115810162 .color-N3{color:#9499AB;}
.d2-4115810162 .color-N4{color:#CFD2DD;}
.d2-4115810162 .color-N5{color:#DEE1EB;}
.d2-4115810162 .color-N6{color:#EEF1F8;}
.d2-4115810162 .color-N7{color:#FFFFFF;}
.d2-4115810162 .color-B1{color:#0D32B2;}
.d2-4115810162 .color-B2{color:#0D32B2;}
.d2-4115810162 .color-B3{color:#E3E9FD;}
.d2-4115810162 .color-B4{color:#E3E9FD;}
.d2-4115810162 .color-B5{color:#EDF0FD;}
.d2-4115810162 .color-B6{color:#F7F8FE;}
.d2-4115810162 .color-AA2{color:#4A6FF3;}
.d2-4115810162 .color-AA4{color:#EDF0FD;}
.d2-4115810162 .color-AA5{color:#F7F8FE;}
.d2-4115810162 .color-AB4{color:#EDF0FD;}
.d2-4115810162 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]></style><g id="id"><g class="shape" ><rect x="0.000000" y="147.000000" width="59.000000" height="66.000000" class=" stroke-B1 fill-B6" style="stroke-width:2;" /></g><text x="29.500000" y="185.500000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">id</text></g><g id="x"><g class="shape" ><rect x="179.000000" y="117.000000" width="119.000000" height="126.000000" class=" stroke-B1 fill-B4" style="stroke-width:2;" /></g><text x="238.500000" y="104.000000" class="text fill-N1" style="text-anchor:middle;font-size:28px">x</text></g><g id="y"><g class="shape" ><rect x="458.000000" y="76.000000" width="179.000000" height="197.000000" class=" stroke-B1 fill-B4" style="stroke-width:2;" /></g><text x="547.500000" y="63.000000" class="text fill-N1" style="text-anchor:middle;font-size:28px">y</text></g><g id="x.id"><g class="shape" ><rect x="209.000000" y="147.000000" width="59.000000" height="66.000000" class=" stroke-B1 fill-B5" style="stroke-width:2;" /></g><text x="238.500000" y="185.500000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">id</text></g><g id="y.z"><g class="shape" ><rect x="488.000000" y="117.000000" width="119.000000" height="126.000000" class=" stroke-B1 fill-B5" style="stroke-width:2;" /></g><text x="547.500000" y="105.000000" class="text fill-N1" style="text-anchor:middle;font-size:24px">z</text></g><g id="y.z.id"><g class="shape" ><rect x="518.000000" y="147.000000" width="59.000000" height="66.000000" class=" stroke-B1 fill-B6" style="stroke-width:2;" /></g><text x="547.500000" y="185.500000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">id</text></g><g id="(id -&gt; x.id)[0]"><marker id="mk-3488378134" markerWidth="10.000000" markerHeight="12.000000" refX="7.000000" refY="6.000000" viewBox="0.000000 0.000000 10.000000 12.000000" orient="auto" markerUnits="userSpaceOnUse"> <polygon points="0.000000,0.000000 10.000000,6.000000 0.000000,12.000000" class="connection fill-B1" stroke-width="2" /> </marker><path d="M 61.000000 180.000000 C 99.000000 180.000000 169.000000 180.000000 205.000000 180.000000" fill="none" class="connection stroke-B1" style="stroke-width:2;" marker-end="url(#mk-3488378134)" mask="url(#d2-4115810162)" /></g><g id="(x.id -&gt; y.z.id)[0]"><path d="M 270.000000 180.000000 C 308.000000 180.000000 328.000000 180.000000 343.000000 180.000000 C 358.000000 180.000000 378.000000 180.000000 393.000000 180.000000 C 408.000000 180.000000 478.000000 180.000000 514.000000 180.000000" fill="none" class="connection stroke-B1" style="stroke-width:2;" marker-end="url(#mk-3488378134)" mask="url(#d2-4115810162)" /></g><mask id="d2-4115810162" maskUnits="userSpaceOnUse" x="-1" y="35" width="639" height="239">
<rect x="-1" y="35" width="639" height="239" fill="white"></rect>
<rect x="22.500000" y="169.500000" width="14" height="21" fill="rgba(0,0,0,0.75)"></rect>
<rect x="232.000000" y="76.000000" width="13" height="36" fill="rgba(0,0,0,0.75)"></rect>
<rect x="541.000000" y="35.000000" width="13" height="36" fill="rgba(0,0,0,0.75)"></rect>
<rect x="231.500000" y="169.500000" width="14" height="21" fill="rgba(0,0,0,0.75)"></rect>
<rect x="542.500000" y="81.000000" width="10" height="31" fill="rgba(0,0,0,0.75)"></rect>
<rect x="540.500000" y="169.500000" width="14" height="21" fill="rgba(0,0,0,0.75)"></rect>
</mask></svg></svg>

After

Width:  |  Height:  |  Size: 14 KiB

View file

@ -0,0 +1,371 @@
{
"name": "",
"isFolderOnly": false,
"fontFamily": "SourceSansPro",
"shapes": [
{
"id": "id",
"type": "rectangle",
"pos": {
"x": 12,
"y": 112
},
"width": 59,
"height": 66,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"borderRadius": 0,
"fill": "B6",
"stroke": "B1",
"shadow": false,
"3d": false,
"multiple": false,
"double-border": false,
"tooltip": "",
"link": "",
"icon": null,
"iconPosition": "",
"blend": false,
"fields": null,
"methods": null,
"columns": null,
"label": "id",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "N1",
"italic": false,
"bold": true,
"underline": false,
"labelWidth": 14,
"labelHeight": 21,
"labelPosition": "INSIDE_MIDDLE_CENTER",
"zIndex": 0,
"level": 1
},
{
"id": "x",
"type": "rectangle",
"pos": {
"x": 146,
"y": 62
},
"width": 159,
"height": 166,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"borderRadius": 0,
"fill": "B4",
"stroke": "B1",
"shadow": false,
"3d": false,
"multiple": false,
"double-border": false,
"tooltip": "",
"link": "",
"icon": null,
"iconPosition": "",
"blend": false,
"fields": null,
"methods": null,
"columns": null,
"label": "x",
"fontSize": 28,
"fontFamily": "DEFAULT",
"language": "",
"color": "N1",
"italic": false,
"bold": false,
"underline": false,
"labelWidth": 13,
"labelHeight": 36,
"labelPosition": "INSIDE_TOP_CENTER",
"zIndex": 0,
"level": 1
},
{
"id": "x.id",
"type": "rectangle",
"pos": {
"x": 196,
"y": 112
},
"width": 59,
"height": 66,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"borderRadius": 0,
"fill": "B5",
"stroke": "B1",
"shadow": false,
"3d": false,
"multiple": false,
"double-border": false,
"tooltip": "",
"link": "",
"icon": null,
"iconPosition": "",
"blend": false,
"fields": null,
"methods": null,
"columns": null,
"label": "id",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "N1",
"italic": false,
"bold": true,
"underline": false,
"labelWidth": 14,
"labelHeight": 21,
"labelPosition": "INSIDE_MIDDLE_CENTER",
"zIndex": 0,
"level": 2
},
{
"id": "y",
"type": "rectangle",
"pos": {
"x": 385,
"y": 12
},
"width": 264,
"height": 266,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"borderRadius": 0,
"fill": "B4",
"stroke": "B1",
"shadow": false,
"3d": false,
"multiple": false,
"double-border": false,
"tooltip": "",
"link": "",
"icon": null,
"iconPosition": "",
"blend": false,
"fields": null,
"methods": null,
"columns": null,
"label": "y",
"fontSize": 28,
"fontFamily": "DEFAULT",
"language": "",
"color": "N1",
"italic": false,
"bold": false,
"underline": false,
"labelWidth": 13,
"labelHeight": 36,
"labelPosition": "INSIDE_TOP_CENTER",
"zIndex": 0,
"level": 1
},
{
"id": "y.z",
"type": "rectangle",
"pos": {
"x": 440,
"y": 62
},
"width": 159,
"height": 166,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"borderRadius": 0,
"fill": "B5",
"stroke": "B1",
"shadow": false,
"3d": false,
"multiple": false,
"double-border": false,
"tooltip": "",
"link": "",
"icon": null,
"iconPosition": "",
"blend": false,
"fields": null,
"methods": null,
"columns": null,
"label": "z",
"fontSize": 24,
"fontFamily": "DEFAULT",
"language": "",
"color": "N1",
"italic": false,
"bold": false,
"underline": false,
"labelWidth": 10,
"labelHeight": 31,
"labelPosition": "INSIDE_TOP_CENTER",
"zIndex": 0,
"level": 2
},
{
"id": "y.z.id",
"type": "rectangle",
"pos": {
"x": 490,
"y": 112
},
"width": 59,
"height": 66,
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"borderRadius": 0,
"fill": "B6",
"stroke": "B1",
"shadow": false,
"3d": false,
"multiple": false,
"double-border": false,
"tooltip": "",
"link": "",
"icon": null,
"iconPosition": "",
"blend": false,
"fields": null,
"methods": null,
"columns": null,
"label": "id",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "N1",
"italic": false,
"bold": true,
"underline": false,
"labelWidth": 14,
"labelHeight": 21,
"labelPosition": "INSIDE_MIDDLE_CENTER",
"zIndex": 0,
"level": 3
}
],
"connections": [
{
"id": "(id -> x.id)[0]",
"src": "id",
"srcArrow": "none",
"dst": "x.id",
"dstArrow": "triangle",
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"stroke": "B1",
"borderRadius": 10,
"label": "",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "N2",
"italic": true,
"bold": false,
"underline": false,
"labelWidth": 0,
"labelHeight": 0,
"labelPosition": "",
"labelPercentage": 0,
"route": [
{
"x": 71,
"y": 145
},
{
"x": 196,
"y": 145
}
],
"animated": false,
"tooltip": "",
"icon": null,
"zIndex": 0
},
{
"id": "(x.id -> y.z.id)[0]",
"src": "x.id",
"srcArrow": "none",
"dst": "y.z.id",
"dstArrow": "triangle",
"opacity": 1,
"strokeDash": 0,
"strokeWidth": 2,
"stroke": "B1",
"borderRadius": 10,
"label": "",
"fontSize": 16,
"fontFamily": "DEFAULT",
"language": "",
"color": "N2",
"italic": true,
"bold": false,
"underline": false,
"labelWidth": 0,
"labelHeight": 0,
"labelPosition": "",
"labelPercentage": 0,
"route": [
{
"x": 255,
"y": 145
},
{
"x": 490,
"y": 145
}
],
"animated": false,
"tooltip": "",
"icon": null,
"zIndex": 0
}
],
"root": {
"id": "",
"type": "",
"pos": {
"x": 0,
"y": 0
},
"width": 0,
"height": 0,
"opacity": 0,
"strokeDash": 0,
"strokeWidth": 0,
"borderRadius": 0,
"fill": "N7",
"stroke": "",
"shadow": false,
"3d": false,
"multiple": false,
"double-border": false,
"tooltip": "",
"link": "",
"icon": null,
"iconPosition": "",
"blend": false,
"fields": null,
"methods": null,
"columns": null,
"label": "",
"fontSize": 0,
"fontFamily": "",
"language": "",
"color": "",
"italic": false,
"bold": false,
"underline": false,
"labelWidth": 0,
"labelHeight": 0,
"zIndex": 0,
"level": 0
}
}

View file

@ -0,0 +1,107 @@
<?xml version="1.0" encoding="utf-8"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" d2Version="v0.6.0-HEAD" preserveAspectRatio="xMinYMin meet" viewBox="0 0 639 268"><svg id="d2-svg" class="d2-1613854675" width="639" height="268" viewBox="11 11 639 268"><rect x="11.000000" y="11.000000" width="639.000000" height="268.000000" rx="0.000000" class=" fill-N7" stroke-width="0" /><style type="text/css"><![CDATA[
.d2-1613854675 .text {
font-family: "d2-1613854675-font-regular";
}
@font-face {
font-family: d2-1613854675-font-regular;
src: url("data:application/font-woff;base64,d09GRgABAAAAAAd8AAoAAAAADDQAAguFAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAAA9AAAAGAAAABgXd/Vo2NtYXAAAAFUAAAARgAAAEgAhgE6Z2x5ZgAAAZwAAAHqAAAB/JUdp6doZWFkAAADiAAAADYAAAA2G4Ue32hoZWEAAAPAAAAAJAAAACQKhAXKaG10eAAAA+QAAAAgAAAAIAvfASFsb2NhAAAEBAAAABIAAAAS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zQY/8OHBdZPQ54fWtnXadlFWd1/hSbtvg6nl2vXt5br8/v4MsvNFE3L2Nf2vhuX1i1G/+fEDHzXNzW6p3cE4L/AAAA//8BAAD//wdbTDAAeJxiYGYAg//nGIwYsAAAAAAA//8BAAD//y8BAgMAAAA=");
}
.d2-1613854675 .text-bold {
font-family: "d2-1613854675-font-bold";
}
@font-face {
font-family: d2-1613854675-font-bold;
src: url("data:application/font-woff;base64,d09GRgABAAAAAAdwAAoAAAAADEgAAguFAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAAA9AAAAGAAAABgXxHXrmNtYXAAAAFUAAAARgAAAEgAhgE6Z2x5ZgAAAZwAAAHbAAAB+PpwB0NoZWFkAAADeAAAADYAAAA2G38e1GhoZWEAAAOwAAAAJAAAACQKfwXHaG10eAAAA9QAAAAgAAAAIAzvANxsb2NhAAAD9AAAABIAAAASAsoCQm1heHAAAAQIAAAAIAAAACAAIAD3bmFtZQAABCgAAAMoAAAIKgjwVkFwb3N0AAAHUAAAAB0AAAAg/9EAMgADAioCvAAFAAACigJYAAAASwKKAlgAAAFeADIBKQAAAgsHAwMEAwICBGAAAvcAAAADAAAAAAAAAABBREJPACAAIP//Au7/BgAAA9gBESAAAZ8AAAAAAfAClAAAACAAA3icLMq9DUBQAEbR834krzCScTQ2ECuYQGHWT4Jb3eKgaApm3YJhqFhtjuS/PcmdK+drv4qq6SYeAAAA//8BAAD//3p5C7oAAHicTJHNaxNBGMafmd3u5ovU3WR2m6jYZNwdk5SomWanJRIoxQbB2ljxpBjIWbAQhOifoBSF5hAvOelB0JuXFkTw6qVSiydP3iVK8WR2JTn18N5ent/zgTm0AdqlA2iIYx42GCCtguVJIbippFLc1ZQgltmmdvjmtSjppZJeXhxeeNrpkM0HdDB5eG+z2/3baTTC0f5BuEt6BwCFiE7IP/oRGSwCbtGvLweBrDmuqEuLC24Yqhaouu/zosGyzp/7jxqd5dJKztjrJ/T8Bl0QdqaS5cHl1PMntx83zy3cfDtZv5rn/W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6XyjyBVeaf6hJJWKS4NwuLXwpyHePcRzp3MFXR76nQ58Turyhr3OLHj1anNGnw2v5dunh+JouZxzLoyO8uGtLMWf8gOMbOrIpY0fWn8XEIn4mM3Xn4jhTHVMy9bxk7qnWSBXefcLlDqUb6sjlM9AelZZO80u0ZwEjU0UmhlP1cqmN3PoXmiKmqqWc7e19uQ1z273lFt+QaodLtS44lZNbMHrfVL13NHOtH4+AkJQLWQxImdKg4Ea8zwm4IsZxrO6daEsKWiufMs+NVBIxFYMOieLMyPQ3MN34xn2woXtnb0ko/5Lp5aqq+2Rx6tXtjN6oe8s737ocrU2gYVNN19Q0ENfEtB9pp9b5+/LN9bqlPOWIlJjwXy/AMzya7HPAIWNlGOhmbq9DUy9Ek5ccqvpLIlkNpefIIhzg8ZwDDnjJ83f6uGTijItbcVnP3eKYI7ocflAVC/suR7xeffv/rL+LaVO1OJ6uTi/uPcUnd1DrF9qz2/eyp4mVk5hbtNutOCNgWnJxu+s1ucd4/wAAAP//AQAA///0t09ReJxiYGYAg//nGIwYsAAAAAAA//8BAAD//y8BAgMAAAA=");
}]]></style><style type="text/css"><![CDATA[.shape {
shape-rendering: geometricPrecision;
stroke-linejoin: round;
}
.connection {
stroke-linecap: round;
stroke-linejoin: round;
}
.blend {
mix-blend-mode: multiply;
opacity: 0.5;
}
.d2-1613854675 .fill-N1{fill:#0A0F25;}
.d2-1613854675 .fill-N2{fill:#676C7E;}
.d2-1613854675 .fill-N3{fill:#9499AB;}
.d2-1613854675 .fill-N4{fill:#CFD2DD;}
.d2-1613854675 .fill-N5{fill:#DEE1EB;}
.d2-1613854675 .fill-N6{fill:#EEF1F8;}
.d2-1613854675 .fill-N7{fill:#FFFFFF;}
.d2-1613854675 .fill-B1{fill:#0D32B2;}
.d2-1613854675 .fill-B2{fill:#0D32B2;}
.d2-1613854675 .fill-B3{fill:#E3E9FD;}
.d2-1613854675 .fill-B4{fill:#E3E9FD;}
.d2-1613854675 .fill-B5{fill:#EDF0FD;}
.d2-1613854675 .fill-B6{fill:#F7F8FE;}
.d2-1613854675 .fill-AA2{fill:#4A6FF3;}
.d2-1613854675 .fill-AA4{fill:#EDF0FD;}
.d2-1613854675 .fill-AA5{fill:#F7F8FE;}
.d2-1613854675 .fill-AB4{fill:#EDF0FD;}
.d2-1613854675 .fill-AB5{fill:#F7F8FE;}
.d2-1613854675 .stroke-N1{stroke:#0A0F25;}
.d2-1613854675 .stroke-N2{stroke:#676C7E;}
.d2-1613854675 .stroke-N3{stroke:#9499AB;}
.d2-1613854675 .stroke-N4{stroke:#CFD2DD;}
.d2-1613854675 .stroke-N5{stroke:#DEE1EB;}
.d2-1613854675 .stroke-N6{stroke:#EEF1F8;}
.d2-1613854675 .stroke-N7{stroke:#FFFFFF;}
.d2-1613854675 .stroke-B1{stroke:#0D32B2;}
.d2-1613854675 .stroke-B2{stroke:#0D32B2;}
.d2-1613854675 .stroke-B3{stroke:#E3E9FD;}
.d2-1613854675 .stroke-B4{stroke:#E3E9FD;}
.d2-1613854675 .stroke-B5{stroke:#EDF0FD;}
.d2-1613854675 .stroke-B6{stroke:#F7F8FE;}
.d2-1613854675 .stroke-AA2{stroke:#4A6FF3;}
.d2-1613854675 .stroke-AA4{stroke:#EDF0FD;}
.d2-1613854675 .stroke-AA5{stroke:#F7F8FE;}
.d2-1613854675 .stroke-AB4{stroke:#EDF0FD;}
.d2-1613854675 .stroke-AB5{stroke:#F7F8FE;}
.d2-1613854675 .background-color-N1{background-color:#0A0F25;}
.d2-1613854675 .background-color-N2{background-color:#676C7E;}
.d2-1613854675 .background-color-N3{background-color:#9499AB;}
.d2-1613854675 .background-color-N4{background-color:#CFD2DD;}
.d2-1613854675 .background-color-N5{background-color:#DEE1EB;}
.d2-1613854675 .background-color-N6{background-color:#EEF1F8;}
.d2-1613854675 .background-color-N7{background-color:#FFFFFF;}
.d2-1613854675 .background-color-B1{background-color:#0D32B2;}
.d2-1613854675 .background-color-B2{background-color:#0D32B2;}
.d2-1613854675 .background-color-B3{background-color:#E3E9FD;}
.d2-1613854675 .background-color-B4{background-color:#E3E9FD;}
.d2-1613854675 .background-color-B5{background-color:#EDF0FD;}
.d2-1613854675 .background-color-B6{background-color:#F7F8FE;}
.d2-1613854675 .background-color-AA2{background-color:#4A6FF3;}
.d2-1613854675 .background-color-AA4{background-color:#EDF0FD;}
.d2-1613854675 .background-color-AA5{background-color:#F7F8FE;}
.d2-1613854675 .background-color-AB4{background-color:#EDF0FD;}
.d2-1613854675 .background-color-AB5{background-color:#F7F8FE;}
.d2-1613854675 .color-N1{color:#0A0F25;}
.d2-1613854675 .color-N2{color:#676C7E;}
.d2-1613854675 .color-N3{color:#9499AB;}
.d2-1613854675 .color-N4{color:#CFD2DD;}
.d2-1613854675 .color-N5{color:#DEE1EB;}
.d2-1613854675 .color-N6{color:#EEF1F8;}
.d2-1613854675 .color-N7{color:#FFFFFF;}
.d2-1613854675 .color-B1{color:#0D32B2;}
.d2-1613854675 .color-B2{color:#0D32B2;}
.d2-1613854675 .color-B3{color:#E3E9FD;}
.d2-1613854675 .color-B4{color:#E3E9FD;}
.d2-1613854675 .color-B5{color:#EDF0FD;}
.d2-1613854675 .color-B6{color:#F7F8FE;}
.d2-1613854675 .color-AA2{color:#4A6FF3;}
.d2-1613854675 .color-AA4{color:#EDF0FD;}
.d2-1613854675 .color-AA5{color:#F7F8FE;}
.d2-1613854675 .color-AB4{color:#EDF0FD;}
.d2-1613854675 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]></style><g id="id"><g class="shape" ><rect x="12.000000" y="112.000000" width="59.000000" height="66.000000" class=" stroke-B1 fill-B6" style="stroke-width:2;" /></g><text x="41.500000" y="150.500000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">id</text></g><g id="x"><g class="shape" ><rect x="146.000000" y="62.000000" width="159.000000" height="166.000000" class=" stroke-B1 fill-B4" style="stroke-width:2;" /></g><text x="225.500000" y="95.000000" class="text fill-N1" style="text-anchor:middle;font-size:28px">x</text></g><g id="y"><g class="shape" ><rect x="385.000000" y="12.000000" width="264.000000" height="266.000000" class=" stroke-B1 fill-B4" style="stroke-width:2;" /></g><text x="517.000000" y="45.000000" class="text fill-N1" style="text-anchor:middle;font-size:28px">y</text></g><g id="x.id"><g class="shape" ><rect x="196.000000" y="112.000000" width="59.000000" height="66.000000" class=" stroke-B1 fill-B5" style="stroke-width:2;" /></g><text x="225.500000" y="150.500000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">id</text></g><g id="y.z"><g class="shape" ><rect x="440.000000" y="62.000000" width="159.000000" height="166.000000" class=" stroke-B1 fill-B5" style="stroke-width:2;" /></g><text x="519.500000" y="91.000000" class="text fill-N1" style="text-anchor:middle;font-size:24px">z</text></g><g id="y.z.id"><g class="shape" ><rect x="490.000000" y="112.000000" width="59.000000" height="66.000000" class=" stroke-B1 fill-B6" style="stroke-width:2;" /></g><text x="519.500000" y="150.500000" class="text-bold fill-N1" style="text-anchor:middle;font-size:16px">id</text></g><g id="(id -&gt; x.id)[0]"><marker id="mk-3488378134" markerWidth="10.000000" markerHeight="12.000000" refX="7.000000" refY="6.000000" viewBox="0.000000 0.000000 10.000000 12.000000" orient="auto" markerUnits="userSpaceOnUse"> <polygon points="0.000000,0.000000 10.000000,6.000000 0.000000,12.000000" class="connection fill-B1" stroke-width="2" /> </marker><path d="M 73.000000 145.000000 L 192.000000 145.000000" fill="none" class="connection stroke-B1" style="stroke-width:2;" marker-end="url(#mk-3488378134)" mask="url(#d2-1613854675)" /></g><g id="(x.id -&gt; y.z.id)[0]"><path d="M 257.000000 145.000000 L 486.000000 145.000000" fill="none" class="connection stroke-B1" style="stroke-width:2;" marker-end="url(#mk-3488378134)" mask="url(#d2-1613854675)" /></g><mask id="d2-1613854675" maskUnits="userSpaceOnUse" x="11" y="11" width="639" height="268">
<rect x="11" y="11" width="639" height="268" fill="white"></rect>
<rect x="34.500000" y="134.500000" width="14" height="21" fill="rgba(0,0,0,0.75)"></rect>
<rect x="219.000000" y="67.000000" width="13" height="36" fill="rgba(0,0,0,0.75)"></rect>
<rect x="510.500000" y="17.000000" width="13" height="36" fill="rgba(0,0,0,0.75)"></rect>
<rect x="218.500000" y="134.500000" width="14" height="21" fill="rgba(0,0,0,0.75)"></rect>
<rect x="514.500000" y="67.000000" width="10" height="31" fill="rgba(0,0,0,0.75)"></rect>
<rect x="512.500000" y="134.500000" width="14" height="21" fill="rgba(0,0,0,0.75)"></rect>
</mask></svg></svg>

After

Width:  |  Height:  |  Size: 14 KiB

View file

@ -7,7 +7,7 @@
"id": "a",
"type": "oval",
"pos": {
"x": 1064,
"x": 0,
"y": 83
},
"width": 35,
@ -48,7 +48,7 @@
"id": "b",
"type": "oval",
"pos": {
"x": 1159,
"x": 95,
"y": 86
},
"width": 53,
@ -89,7 +89,7 @@
"id": "c",
"type": "oval",
"pos": {
"x": 1272,
"x": 208,
"y": 90
},
"width": 77,
@ -130,7 +130,7 @@
"id": "d",
"type": "oval",
"pos": {
"x": 1409,
"x": 345,
"y": 96
},
"width": 118,
@ -171,7 +171,7 @@
"id": "e",
"type": "oval",
"pos": {
"x": 1587,
"x": 523,
"y": 98
},
"width": 182,
@ -212,7 +212,7 @@
"id": "f",
"type": "oval",
"pos": {
"x": 1829,
"x": 765,
"y": 78
},
"width": 304,
@ -253,7 +253,7 @@
"id": "g",
"type": "oval",
"pos": {
"x": 2193,
"x": 1129,
"y": 37
},
"width": 545,
@ -294,7 +294,7 @@
"id": "1",
"type": "oval",
"pos": {
"x": 0,
"x": 1734,
"y": 86
},
"width": 28,
@ -335,7 +335,7 @@
"id": "2",
"type": "oval",
"pos": {
"x": 88,
"x": 1822,
"y": 87
},
"width": 64,
@ -376,7 +376,7 @@
"id": "3",
"type": "oval",
"pos": {
"x": 212,
"x": 1946,
"y": 87
},
"width": 128,
@ -417,7 +417,7 @@
"id": "4",
"type": "oval",
"pos": {
"x": 400,
"x": 2134,
"y": 43
},
"width": 512,
@ -458,7 +458,7 @@
"id": "5",
"type": "oval",
"pos": {
"x": 972,
"x": 2706,
"y": 0
},
"width": 32,

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View file

@ -7,7 +7,7 @@
"id": "a",
"type": "person",
"pos": {
"x": 1077,
"x": 0,
"y": 138
},
"width": 44,
@ -48,7 +48,7 @@
"id": "b",
"type": "person",
"pos": {
"x": 1181,
"x": 104,
"y": 138
},
"width": 44,
@ -89,7 +89,7 @@
"id": "c",
"type": "person",
"pos": {
"x": 1285,
"x": 208,
"y": 138
},
"width": 44,
@ -130,7 +130,7 @@
"id": "d",
"type": "person",
"pos": {
"x": 1389,
"x": 312,
"y": 138
},
"width": 58,
@ -171,7 +171,7 @@
"id": "e",
"type": "person",
"pos": {
"x": 1507,
"x": 430,
"y": 137
},
"width": 100,
@ -212,7 +212,7 @@
"id": "f",
"type": "person",
"pos": {
"x": 1667,
"x": 590,
"y": 109
},
"width": 185,
@ -253,7 +253,7 @@
"id": "g",
"type": "person",
"pos": {
"x": 1912,
"x": 835,
"y": 52
},
"width": 355,
@ -294,7 +294,7 @@
"id": "1",
"type": "person",
"pos": {
"x": 0,
"x": 1250,
"y": 140
},
"width": 41,
@ -335,7 +335,7 @@
"id": "2",
"type": "person",
"pos": {
"x": 101,
"x": 1351,
"y": 140
},
"width": 64,
@ -376,7 +376,7 @@
"id": "3",
"type": "person",
"pos": {
"x": 225,
"x": 1475,
"y": 128
},
"width": 128,
@ -417,7 +417,7 @@
"id": "4",
"type": "person",
"pos": {
"x": 413,
"x": 1663,
"y": 0
},
"width": 512,
@ -458,7 +458,7 @@
"id": "5",
"type": "person",
"pos": {
"x": 985,
"x": 2235,
"y": 43
},
"width": 32,

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 14 KiB