@cardenelabs/dragon 0.42.2 → 0.43.0

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.
package/dist/export.cjs CHANGED
@@ -285,6 +285,15 @@ var TYPE = {
285
285
  gitId: text(11, 700),
286
286
  gitHash: text(10.5, 600, "mono"),
287
287
  gitNote: text(10.5, 650),
288
+ /**
289
+ * 木の図 (#3233) の、箱の中の値 (hash) と名札、根の箱の値と名札、葉の下の札の字。
290
+ * 値を持たない箱の名札は箱の名前 (`boxName`) の字で描く
291
+ */
292
+ treeHash: text(13.5, 700, "mono"),
293
+ treeName: text(10.5, 600),
294
+ rootHash: text(15, 700, "mono"),
295
+ rootName: text(11, 700),
296
+ treeCard: text(11.5, 650),
288
297
  /**
289
298
  * 時間軸の図 (#3165)。拡大の帯の列の上の字、印の列の名前、時刻の字、区切りの名前と目盛りの番号の範囲、
290
299
  * 節目の名札と状態、範囲の括弧の字、空きの枠の字、物差しの線の字。和文を含む字は同じ大きさと太さの和文の字で描く
@@ -377,6 +386,36 @@ var LOOK = {
377
386
  labelUnder: 50,
378
387
  colors: ["blue", "violet", "green", "amber", "rose"]
379
388
  },
389
+ /**
390
+ * 木の図 (#3233)。step 2 で本人が選んだ「根を上」の試作 (`.context/propose/merkle-look/`) の寸法を写す。
391
+ * 木の箱は幅の下限 `w`、高さ `h`、字の左右の余白 `padX`、角の丸み `radius`。根の箱は `root` の幅の下限と高さと角の丸みを持ち、
392
+ * 左に絵柄を置いて (`iconX` は箱の左端から絵柄の左端まで)、`textX` から字を左に揃えて並べ、右に `padR` を空ける。
393
+ * `nameY` と `hashY` は根の箱の真ん中から名札と値の基準線まで。ほかの箱の値と名札は `hashY` と `nameY`、1 行の字は `oneY` に置く。
394
+ * 葉は書いた順に横に並べ、隣の葉の箱の間を `slotGap` 空ける。根の上端は図の上の余白から `top` 下げ、深さの段の真ん中どうしは `row` 離す。
395
+ * `card` は値を持つ葉の下の名札の札で、葉の真ん中から札の真ん中まで `drop`、高さ `h`、幅の下限 `minW`、
396
+ * 字の左右の余白 `padX`、絵柄の幅 `icon` と絵柄と字の間 `gap`、絵柄の縮み `glyph`、角の丸み `radius`。
397
+ * `boxGap` は木と木でない箱の列の間、`badgeAlong` は木の線を走る段の番号を、曲がり角から横の線に沿って進める長さ。
398
+ * `faint` は木の線を運ぶ物が通った段から後に、運ぶ物を送りも受けもしていない木の箱を薄く出す濃さ。`color` と `rootColor` は木の箱と根の箱の色
399
+ */
400
+ tree: {
401
+ w: 74,
402
+ h: 44,
403
+ padX: 10,
404
+ radius: 10,
405
+ root: { w: 112, h: 54, radius: 13, iconX: 10, textX: 46, padR: 14, nameY: -4, hashY: 14 },
406
+ hashY: -1,
407
+ nameY: 14,
408
+ oneY: 4.5,
409
+ slotGap: 12,
410
+ top: 16,
411
+ row: 102,
412
+ card: { drop: 78, h: 30, minW: 70, padX: 10, icon: 12, gap: 6, glyph: 0.62, radius: 9 },
413
+ boxGap: 24,
414
+ badgeAlong: 22,
415
+ faint: 0.42,
416
+ color: "violet",
417
+ rootColor: "green"
418
+ },
380
419
  /**
381
420
  * 時間軸の図 (#3165)。見本帳の試作 (`scenes/finality.js`) の寸法を写す。
382
421
  * 図の幅は `width` で、時間軸は左の `axisX` から右の余白 `right` の手前まで。印の列の名前が長い時は、名前の右に `gutterGap` を空けて軸を右へ寄せる。
@@ -477,7 +516,10 @@ var LOOK = {
477
516
  timePoint: 1.75,
478
517
  timeFlag: 1.8,
479
518
  timeNeedle: 1.25,
480
- timeMeter: 1.25
519
+ timeMeter: 1.25,
520
+ tree: 1.5,
521
+ treeTrail: 2.6,
522
+ treeCon: 1.3
481
523
  },
482
524
  shadow: { near: 0.8, far: 4, nearY: 1, farY: 3 },
483
525
  mini: { w: 168, pad: 8, title: 14, inset: 12, radius: 10 },
@@ -1201,7 +1243,7 @@ function arrange(diagram, groups, slots, rooms) {
1201
1243
  };
1202
1244
  const inset = LOOK.edge.inset;
1203
1245
  const gapX = (col, toRight) => toRight ? colLeft[col] + colW[col] + (between[col] ?? A.columnGap) / 2 : colLeft[col] - (between[col - 1] ?? A.columnGap) / 2;
1204
- const route = (from, to) => {
1246
+ const route2 = (from, to) => {
1205
1247
  const a = byId.get(from);
1206
1248
  const b = byId.get(to);
1207
1249
  if (from === to) return loopUnder(a);
@@ -1274,7 +1316,7 @@ function arrange(diagram, groups, slots, rooms) {
1274
1316
  event,
1275
1317
  from: edge2.from,
1276
1318
  to: edge2.to,
1277
- points: route(edge2.from, edge2.to),
1319
+ points: route2(edge2.from, edge2.to),
1278
1320
  color: edgeColor(edge2, colors),
1279
1321
  carry: edge2.carry
1280
1322
  }));
@@ -1573,11 +1615,11 @@ function layoutGit(diagram) {
1573
1615
  col.set(c.id, k);
1574
1616
  laneLast.set(c.branch, k);
1575
1617
  }
1576
- const linesOf = (c) => [
1618
+ const linesOf2 = (c) => [
1577
1619
  ...c.hash !== void 0 ? [{ text: c.hash, style: TYPE.gitHash }] : [],
1578
1620
  ...c.note !== void 0 ? [{ text: c.note, style: TYPE.gitNote }] : []
1579
1621
  ];
1580
- const textW = (c) => Math.max(0, ...linesOf(c).map((line) => textWidth(line.text, line.style)));
1622
+ const textW = (c) => Math.max(0, ...linesOf2(c).map((line) => textWidth(line.text, line.style)));
1581
1623
  const tagW = (ref) => textWidth(ref, hasWide(ref) ? TYPE.carrierJa : TYPE.carrier) + C.tagPadX * 2;
1582
1624
  const refWidth = Math.max(0, ...walked.refs.map((r) => tagW(r.name)));
1583
1625
  const pitch = Math.max(G.pitch, ...walked.made.map((c) => textW(c) + G.textGap), refWidth + G.textGap);
@@ -1592,7 +1634,7 @@ function layoutGit(diagram) {
1592
1634
  })
1593
1635
  );
1594
1636
  const extraRows = (branch) => Math.max(0, ...walked.made.filter((c) => c.branch === branch).map((c) => (walked.rows.get(c.id) ?? 0) - 2)) * G.row;
1595
- const topText = walked.made.some((c) => laneIndex.get(c.branch) === 0 && linesOf(c).length > 0);
1637
+ const topText = walked.made.some((c) => laneIndex.get(c.branch) === 0 && linesOf2(c).length > 0);
1596
1638
  const lanes = [];
1597
1639
  let y = margin;
1598
1640
  walked.branches.forEach((id, i) => {
@@ -1610,7 +1652,7 @@ function layoutGit(diagram) {
1610
1652
  const isTop = laneIndex.get(c.branch) === 0;
1611
1653
  const cx = x0 + pitch * (col.get(c.id) ?? 0) + (isTop ? 0 : pitch / 2);
1612
1654
  const cy = lane.line;
1613
- const lines = linesOf(c);
1655
+ const lines = linesOf2(c);
1614
1656
  const baselines = lines.map((_, k) => isTop ? cy - G.above - (lines.length - 1 - k) * G.lineStep : cy + G.under + k * G.lineStep);
1615
1657
  const boxes2 = lines.map((line, k) => textBox(line.text, cx, baselines[k], line.style, "middle"));
1616
1658
  const text2 = boxes2.length === 0 ? void 0 : { ...union(boxes2), lines: lines.map((line) => line.text), baselines };
@@ -2170,7 +2212,7 @@ function layoutState(diagram, lang) {
2170
2212
  };
2171
2213
  const exitX = (box) => starts && box === first ? box.cx + T.side.entry : box.cx;
2172
2214
  const finishOf = (id) => ends.find((e) => e.kind === "finish" && e.box === id);
2173
- const route = (from, to) => {
2215
+ const route2 = (from, to) => {
2174
2216
  if (from === "start") {
2175
2217
  const start = ends.find((e) => e.kind === "start");
2176
2218
  const target = byId.get(to);
@@ -2214,7 +2256,7 @@ function layoutState(diagram, lang) {
2214
2256
  event,
2215
2257
  from: edge2.from,
2216
2258
  to: edge2.to,
2217
- points: route(edge2.from, edge2.to),
2259
+ points: route2(edge2.from, edge2.to),
2218
2260
  color: colorOf(edge2, colors),
2219
2261
  carry: edge2.carry,
2220
2262
  ...settle ? { settle } : {},
@@ -2231,7 +2273,7 @@ function layoutState(diagram, lang) {
2231
2273
  e.points = e.points.map(([x, y]) => flat ? [x, y + d] : [x + d, y]);
2232
2274
  outward.set(e, flat ? d > 0 ? "below" : "above" : d > 0 ? "right" : "left");
2233
2275
  }
2234
- const paths = notTaken.map((p) => ({ from: p.from, to: p.to, points: route(p.from, p.to) }));
2276
+ const paths = notTaken.map((p) => ({ from: p.from, to: p.to, points: route2(p.from, p.to) }));
2235
2277
  const badgeAt = (edge2, taken, lines2) => edge2.from === edge2.to ? loopBadge(edge2.points) : badgeOnPath(edge2.points, taken, lines2);
2236
2278
  const labels = [];
2237
2279
  const marks = ends.flatMap((e) => e.text === "" ? [] : [textBox(e.text, ...markText(e), TYPE.regionNote)]);
@@ -2764,6 +2806,321 @@ function labelsOf2(diagram, layout) {
2764
2806
  return labels;
2765
2807
  }
2766
2808
 
2809
+ // src/layout/tree.ts
2810
+ var isTreeLayout = (layout) => layout.kind === "tree";
2811
+ function grow2(diagram) {
2812
+ const boxes = new Set(diagram.boxes.map((b) => b.id));
2813
+ const byId = /* @__PURE__ */ new Set();
2814
+ const parents = /* @__PURE__ */ new Map();
2815
+ const grown = [];
2816
+ diagram.steps.forEach((step, s) => {
2817
+ step.events.forEach((e, k) => {
2818
+ if (e.type !== "leaf" && e.type !== "node" || byId.has(e.id) || boxes.has(e.id)) return;
2819
+ const children = e.type === "node" ? [...new Set(e.children)].filter((c) => byId.has(c) && !parents.has(c)) : [];
2820
+ for (const c of children) parents.set(c, e.id);
2821
+ grown.push({ id: e.id, kind: e.type, children, step: s, event: k, ...e.hash !== void 0 ? { hash: e.hash } : {} });
2822
+ byId.add(e.id);
2823
+ });
2824
+ });
2825
+ return { grown, parents };
2826
+ }
2827
+ function linesOf(g, root) {
2828
+ if (g.hash === void 0) return [{ text: g.id, style: TYPE.boxName }];
2829
+ if (root)
2830
+ return [
2831
+ { text: g.id, style: TYPE.rootName },
2832
+ { text: g.hash, style: TYPE.rootHash }
2833
+ ];
2834
+ if (g.kind === "leaf") return [{ text: g.hash, style: TYPE.treeHash }];
2835
+ return [
2836
+ { text: g.hash, style: TYPE.treeHash },
2837
+ { text: g.id, style: TYPE.treeName }
2838
+ ];
2839
+ }
2840
+ function route(a, b) {
2841
+ const i = LOOK.edge.inset;
2842
+ const top = Math.max(a.y, b.y);
2843
+ const bottom = Math.min(a.y + a.h, b.y + b.h);
2844
+ if (bottom > top) {
2845
+ const y = (top + bottom) / 2;
2846
+ return b.x >= a.x + a.w ? [
2847
+ [a.x + a.w + i, y],
2848
+ [b.x - i, y]
2849
+ ] : [
2850
+ [a.x - i, y],
2851
+ [b.x + b.w + i, y]
2852
+ ];
2853
+ }
2854
+ const left = Math.max(a.x, b.x);
2855
+ const right = Math.min(a.x + a.w, b.x + b.w);
2856
+ if (right > left) {
2857
+ const x = (left + right) / 2;
2858
+ return b.y >= a.y + a.h ? [
2859
+ [x, a.y + a.h + i],
2860
+ [x, b.y - i]
2861
+ ] : [
2862
+ [x, a.y - i],
2863
+ [x, b.y + b.h + i]
2864
+ ];
2865
+ }
2866
+ const ax = a.x + a.w / 2;
2867
+ const ty = b.y + b.h / 2;
2868
+ return [
2869
+ [ax, b.y > a.y ? a.y + a.h + i : a.y - i],
2870
+ [ax, ty],
2871
+ [b.x > ax ? b.x - i : b.x + b.w + i, ty]
2872
+ ];
2873
+ }
2874
+ function layoutTree(diagram) {
2875
+ const { margin, gap, box: B, tree: T, badge: BD } = LOOK;
2876
+ const { grown, parents } = grow2(diagram);
2877
+ const tops = grown.filter((g) => !parents.has(g.id));
2878
+ const rootId = tops[tops.length - 1]?.id;
2879
+ const byId = new Map(grown.map((g) => [g.id, g]));
2880
+ const depth = /* @__PURE__ */ new Map();
2881
+ const walk2 = (id, d) => {
2882
+ depth.set(id, d);
2883
+ for (const c of byId.get(id)?.children ?? []) walk2(c, d + 1);
2884
+ };
2885
+ for (const t of tops) walk2(t.id, 0);
2886
+ const texts = new Map(grown.map((g) => [g.id, linesOf(g, g.id === rootId)]));
2887
+ const widest = (id) => Math.max(0, ...(texts.get(id) ?? []).map((line) => textWidth(line.text, line.style)));
2888
+ const widthOf = (g) => g.id === rootId ? Math.max(T.root.w, T.root.textX + widest(g.id) + T.root.padR) : Math.max(T.w, widest(g.id) + T.padX * 2);
2889
+ const cardW = (g) => Math.max(T.card.minW, T.card.padX * 2 + T.card.icon + T.card.gap + textWidth(g.id, TYPE.treeCard));
2890
+ const hasCard = (g) => g.kind === "leaf" && g.hash !== void 0;
2891
+ const slots = grown.filter((g) => g.children.length === 0);
2892
+ const pitch = Math.max(...grown.filter((g) => g.id !== rootId || g.children.length === 0).map((g) => Math.max(widthOf(g), hasCard(g) ? cardW(g) : 0)), T.w) + T.slotGap;
2893
+ const x0 = margin + BD.r * 2 + BD.inset;
2894
+ const xs = /* @__PURE__ */ new Map();
2895
+ slots.forEach((g, i) => xs.set(g.id, x0 + pitch * (i + 0.5)));
2896
+ const xOf = (id) => {
2897
+ const known = xs.get(id);
2898
+ if (known !== void 0) return known;
2899
+ const kids = byId.get(id)?.children ?? [];
2900
+ const x = (xOf(kids[0]) + xOf(kids[kids.length - 1])) / 2;
2901
+ xs.set(id, x);
2902
+ return x;
2903
+ };
2904
+ const top0 = margin + T.top;
2905
+ const yOf = (d) => top0 + T.root.h / 2 + d * T.row;
2906
+ const colors = boxColors(diagram);
2907
+ const nodes = grown.map((g) => {
2908
+ const root = g.id === rootId;
2909
+ const d = depth.get(g.id) ?? 0;
2910
+ const cx = xOf(g.id);
2911
+ const cy = yOf(d);
2912
+ const w = widthOf(g);
2913
+ const h = root ? T.root.h : T.h;
2914
+ const lines = texts.get(g.id) ?? [];
2915
+ const baselines = lines.length === 1 ? [cy + T.oneY] : root ? [cy + T.root.nameY, cy + T.root.hashY] : [cy + T.hashY, cy + T.nameY];
2916
+ const parent = parents.get(g.id);
2917
+ const color = root ? T.rootColor : T.color;
2918
+ colors.set(g.id, color);
2919
+ const cw = cardW(g);
2920
+ return {
2921
+ id: g.id,
2922
+ kind: g.kind,
2923
+ depth: d,
2924
+ ...parent !== void 0 ? { parent } : {},
2925
+ children: g.children,
2926
+ step: g.step,
2927
+ event: g.event,
2928
+ ...g.hash !== void 0 ? { hash: g.hash } : {},
2929
+ root,
2930
+ x: cx - w / 2,
2931
+ y: cy - h / 2,
2932
+ w,
2933
+ h,
2934
+ cx,
2935
+ cy,
2936
+ color,
2937
+ lines: lines.map((line) => line.text),
2938
+ baselines,
2939
+ styles: lines.map((line) => line.style),
2940
+ ...hasCard(g) ? { card: { x: cx - cw / 2, y: cy + T.card.drop - T.card.h / 2, w: cw, h: T.card.h, text: g.id } } : {}
2941
+ };
2942
+ });
2943
+ const placed = new Map(nodes.map((n) => [n.id, n]));
2944
+ const links = nodes.flatMap(
2945
+ (p) => p.children.flatMap((id) => {
2946
+ const c = placed.get(id);
2947
+ if (!c) return [];
2948
+ const mid = (c.y + p.y + p.h) / 2;
2949
+ const points2 = [
2950
+ [c.cx, c.y - LOOK.edge.inset],
2951
+ [c.cx, mid],
2952
+ [p.cx, mid],
2953
+ [p.cx, p.y + p.h + LOOK.edge.inset]
2954
+ ];
2955
+ return [{ from: c.id, to: p.id, step: p.step, event: p.event, points: points2 }];
2956
+ })
2957
+ );
2958
+ const rooms = slotRooms(diagram);
2959
+ const treeRight = Math.max(x0, ...nodes.flatMap((n) => [n.x + n.w, ...n.card ? [n.card.x + n.card.w] : []]));
2960
+ const rootBox = nodes.find((n) => n.root);
2961
+ const ids = new Set(diagram.boxes.map((b) => b.id));
2962
+ const named = edgesOf(diagram).flatMap(({ edge: edge2 }) => edge2.label !== void 0 && (ids.has(edge2.from) || ids.has(edge2.to)) ? [textWidth(edge2.label, labelStyle(edge2.label)) + LOOK.label.padX * 2] : []);
2963
+ const boxX = Math.max(treeRight + T.boxGap, (rootBox ? rootBox.x + rootBox.w : x0) + Math.max(0, ...named) + gap * 2);
2964
+ let by = rootBox?.y ?? top0;
2965
+ const boxes = diagram.boxes.map((b) => {
2966
+ const w = Math.max(boxWidth(diagram, b.id, true), slotBoxWidth(rooms.get(b.id), b.icon !== void 0, B.padX));
2967
+ const y = by;
2968
+ by += B.h + gap;
2969
+ const box = {
2970
+ id: b.id,
2971
+ name: b.name,
2972
+ ...b.sub !== void 0 ? { sub: b.sub } : {},
2973
+ ...b.icon !== void 0 ? { icon: b.icon } : {},
2974
+ color: colors.get(b.id) ?? "slate",
2975
+ x: boxX,
2976
+ y,
2977
+ w,
2978
+ h: B.h,
2979
+ cx: boxX + w / 2,
2980
+ cy: y + B.h / 2
2981
+ };
2982
+ placeSlot(box, rooms.get(b.id));
2983
+ return box;
2984
+ });
2985
+ const boxById = new Map(boxes.map((b) => [b.id, b]));
2986
+ const runs = [];
2987
+ const edges = diagram.steps.flatMap(
2988
+ (step, s) => step.events.flatMap((e, k) => {
2989
+ if (e.type !== "edge") return [];
2990
+ const a = placed.get(e.from) ?? boxById.get(e.from);
2991
+ const b = placed.get(e.to) ?? boxById.get(e.to);
2992
+ if (!a || !b) return [];
2993
+ const up = links.find((l) => l.from === e.from && l.to === e.to);
2994
+ const down = links.find((l) => l.from === e.to && l.to === e.from);
2995
+ const link = up ?? down;
2996
+ if (link) runs.push({ step: s, event: k, link: link.from });
2997
+ const points2 = up ? up.points : down ? [...down.points].reverse() : e.from === e.to ? loopUnder({ cx: a.x + a.w / 2, y: a.y, h: a.h }) : route(a, b);
2998
+ return [{ step: s, event: k, from: e.from, to: e.to, points: points2, color: edgeColor(e, colors), carry: e.carry }];
2999
+ })
3000
+ );
3001
+ seatCarriers(edges, boxById, rooms);
3002
+ const layout = {
3003
+ kind: "tree",
3004
+ width: 0,
3005
+ height: 0,
3006
+ regions: [],
3007
+ boxes,
3008
+ lifelines: [],
3009
+ edges,
3010
+ labels: [],
3011
+ actions: [],
3012
+ badges: [],
3013
+ paths: [],
3014
+ ends: [],
3015
+ nodes,
3016
+ links,
3017
+ runs
3018
+ };
3019
+ layout.badges = badgesOf3(diagram, layout);
3020
+ layout.labels = labelsOf3(diagram, layout);
3021
+ const cards = nodes.flatMap((n) => n.card ? [n.card] : []);
3022
+ const solids = [...nodes, ...cards, ...boxes, ...layout.labels];
3023
+ const points = edges.flatMap((e) => e.points);
3024
+ const right = Math.max(...solids.map((r) => r.x + r.w), ...points.map(([x]) => x), x0);
3025
+ const bottom = Math.max(...solids.map((r) => r.y + r.h), ...points.map(([, y]) => y), top0);
3026
+ const width = Math.max(right + margin, stripNeed(diagram) + margin * 2);
3027
+ const strip2 = layoutStrip(diagram, margin, bottom + gap, width - margin * 2);
3028
+ layout.width = width;
3029
+ layout.height = (strip2 ? strip2.y + strip2.h : bottom) + margin;
3030
+ if (strip2) layout.strip = strip2;
3031
+ layout.badges = badgesOf3(diagram, layout);
3032
+ return layout;
3033
+ }
3034
+ function badgesOf3(diagram, layout) {
3035
+ const { r, inset } = LOOK.badge;
3036
+ const apart = r * 2 + inset;
3037
+ const taken = [];
3038
+ const out = [];
3039
+ const solids = [...layout.nodes, ...layout.nodes.flatMap((n) => n.card ? [n.card] : []), ...layout.boxes];
3040
+ const free = (p) => taken.every(([x, y]) => Math.hypot(p[0] - x, p[1] - y) >= apart) && solids.every((s) => gapBetween(badgeRect(p), s) >= LOOK.label.touch);
3041
+ const put = (s, p, color) => {
3042
+ taken.push(p);
3043
+ out.push({ step: s, x: p[0], y: p[1], color });
3044
+ };
3045
+ const passed = /* @__PURE__ */ new Map();
3046
+ diagram.steps.forEach((step, s) => {
3047
+ const k = step.events.findIndex((e2) => e2.type === "leaf" || e2.type === "node" || e2.type === "edge");
3048
+ const first = step.events[k];
3049
+ const n = layout.nodes.find((x) => x.step === s && x.event === k);
3050
+ if (first && first.type !== "edge" && n) {
3051
+ const spots = [
3052
+ [n.x - inset - r, n.cy],
3053
+ [n.x, n.y],
3054
+ [n.x + n.w + inset + r, n.cy],
3055
+ [n.x + n.w, n.y]
3056
+ ];
3057
+ put(s, spots.find(free) ?? spots[0], n.color);
3058
+ return;
3059
+ }
3060
+ const e = layout.edges.find((x) => x.step === s && x.event === k);
3061
+ if (first?.type === "edge" && e) {
3062
+ const key = [e.from, e.to].sort().join("\n");
3063
+ const run = layout.runs.some((x) => x.step === s && x.event === k);
3064
+ const lines = layout.edges.filter((x) => x !== e).map((x) => x.points);
3065
+ const point = passed.get(key) ?? (run ? onLink(e.points, free) : midway(e, free)) ?? badgeOnPath(e.points, taken, lines);
3066
+ passed.set(key, point);
3067
+ put(s, point, e.color);
3068
+ return;
3069
+ }
3070
+ const box = step.events.flatMap((ev) => ev.type === "swap" || ev.type === "action" ? [ev.box] : []).flatMap((id) => layout.boxes.filter((b) => b.id === id))[0];
3071
+ if (box) {
3072
+ out.push({ step: s, x: box.x, y: box.y, color: box.color });
3073
+ return;
3074
+ }
3075
+ if (layout.strip && step.events.some((ev) => ev.type === "strip")) {
3076
+ out.push({ step: s, x: layout.strip.x + inset, y: layout.strip.y + inset, color: "slate" });
3077
+ return;
3078
+ }
3079
+ const before = out[out.length - 1];
3080
+ const root = layout.nodes.find((x) => x.root);
3081
+ out.push(before ? { ...before, step: s } : { step: s, x: root?.x ?? LOOK.margin, y: root?.y ?? LOOK.margin, color: root?.color ?? "slate" });
3082
+ });
3083
+ return replaceSameSpot(out);
3084
+ }
3085
+ function onLink(points, free) {
3086
+ const [p0, p1, p2] = points;
3087
+ const flat = Math.abs(p2[0] - p1[0]);
3088
+ const { r, inset } = LOOK.badge;
3089
+ if (flat >= LOOK.tree.badgeAlong + r) {
3090
+ const p = along(points, pathLength([p0, p1]) + LOOK.tree.badgeAlong);
3091
+ if (free(p)) return p;
3092
+ }
3093
+ const side2 = [p1[0] + r + inset, p1[1]];
3094
+ return free(side2) ? side2 : void 0;
3095
+ }
3096
+ function midway(e, free) {
3097
+ const length = pathLength(e.points);
3098
+ const room = carrierHalf(e.carry)[0] + LOOK.badge.r + LOOK.badge.inset;
3099
+ for (let d = 0; d <= length / 2 - room; d += 1) {
3100
+ for (const at2 of [length / 2 - d, length / 2 + d]) {
3101
+ const p = along(e.points, at2);
3102
+ if (free(p)) return p;
3103
+ }
3104
+ }
3105
+ return void 0;
3106
+ }
3107
+ function labelsOf3(diagram, layout) {
3108
+ const labels = [];
3109
+ const cards = layout.nodes.flatMap((n) => n.card ? [n.card] : []);
3110
+ for (const e of layout.edges) {
3111
+ const source = diagram.steps[e.step]?.events[e.event];
3112
+ if (source?.type !== "edge" || source.label === void 0) continue;
3113
+ const seen = layout.badges.filter((b) => b.step <= e.step).map((b) => badgeRect([b.x, b.y]));
3114
+ labels.push(
3115
+ placeLabel(
3116
+ { step: e.step, event: e.event, text: source.label, points: e.points, color: e.color, ...source.labelSide ? { side: source.labelSide } : {}, flip: true },
3117
+ { hard: [...layout.nodes, ...layout.boxes], soft: [...cards, ...labels.filter((l) => l.step === e.step)], touch: seen }
3118
+ )
3119
+ );
3120
+ }
3121
+ return labels;
3122
+ }
3123
+
2767
3124
  // src/field-messages.ts
2768
3125
  var TYPES_JA = {
2769
3126
  string: "\u6587\u5B57\u5217\u306B\u3059\u308B",
@@ -2837,7 +3194,7 @@ function ucs2length(str) {
2837
3194
  return length;
2838
3195
  }
2839
3196
  var validate_diagram_default = validate10;
2840
- var schema11 = { "properties": { "version": { "description": "\u5F62\u5F0F\u306E\u7248", "type": "integer", "minimum": 1 }, "kind": { "description": "\u56F3\u306E\u7A2E\u985E", "enum": ["sequence", "architecture", "state", "git", "time"] }, "title": { "$ref": "#/definitions/text" }, "view": { "description": "\u898B\u305B\u65B9\u3002\u66F8\u304B\u306A\u3051\u308C\u3070\u5B57\u306E\u5927\u304D\u3055\u3067\u9078\u3076\u3002fixed \u306F\u5168\u4F53\u3092\u6B62\u3081\u3066\u4E2D\u3060\u3051\u52D5\u304B\u3057\u3001follow \u306F\u5BC4\u3063\u3066\u52D5\u304B\u3057\u5168\u4F53\u56F3\u3067\u4ECA\u3069\u3053\u304B\u3092\u793A\u3059", "enum": ["fixed", "follow"] }, "regions": { "type": "array", "items": { "$ref": "#/definitions/region" } }, "boxes": { "type": "array", "items": { "$ref": "#/definitions/box" } }, "strip": { "$ref": "#/definitions/strip" }, "steps": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/step" } }, "sequence": { "$ref": "#/definitions/sequence" }, "state": { "$ref": "#/definitions/state" }, "git": { "$ref": "#/definitions/git" }, "time": { "$ref": "#/definitions/time" } }};
3197
+ var schema11 = { "properties": { "version": { "description": "\u5F62\u5F0F\u306E\u7248", "type": "integer", "minimum": 1 }, "kind": { "description": "\u56F3\u306E\u7A2E\u985E", "enum": ["sequence", "architecture", "state", "git", "time", "tree"] }, "title": { "$ref": "#/definitions/text" }, "view": { "description": "\u898B\u305B\u65B9\u3002\u66F8\u304B\u306A\u3051\u308C\u3070\u5B57\u306E\u5927\u304D\u3055\u3067\u9078\u3076\u3002fixed \u306F\u5168\u4F53\u3092\u6B62\u3081\u3066\u4E2D\u3060\u3051\u52D5\u304B\u3057\u3001follow \u306F\u5BC4\u3063\u3066\u52D5\u304B\u3057\u5168\u4F53\u56F3\u3067\u4ECA\u3069\u3053\u304B\u3092\u793A\u3059", "enum": ["fixed", "follow"] }, "regions": { "type": "array", "items": { "$ref": "#/definitions/region" } }, "boxes": { "type": "array", "items": { "$ref": "#/definitions/box" } }, "strip": { "$ref": "#/definitions/strip" }, "steps": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/step" } }, "sequence": { "$ref": "#/definitions/sequence" }, "state": { "$ref": "#/definitions/state" }, "git": { "$ref": "#/definitions/git" }, "time": { "$ref": "#/definitions/time" } }};
2841
3198
  function validate11(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
2842
3199
  let vErrors = null;
2843
3200
  let errors = 0;
@@ -2897,34 +3254,79 @@ function validate11(data, { instancePath = "", parentData, parentDataProperty, r
2897
3254
  }
2898
3255
  }
2899
3256
  }
3257
+ const _errs8 = errors;
3258
+ const _errs9 = errors;
3259
+ if (data2 && typeof data2 == "object" && !Array.isArray(data2)) {
3260
+ if (data2.type === void 0 && ("type")) {
3261
+ const err3 = {};
3262
+ if (vErrors === null) {
3263
+ vErrors = [err3];
3264
+ } else {
3265
+ vErrors.push(err3);
3266
+ }
3267
+ errors++;
3268
+ } else {
3269
+ if (data2.type !== void 0) {
3270
+ let data4 = data2.type;
3271
+ if (!(data4 === "leaf" || data4 === "node")) {
3272
+ const err4 = {};
3273
+ if (vErrors === null) {
3274
+ vErrors = [err4];
3275
+ } else {
3276
+ vErrors.push(err4);
3277
+ }
3278
+ errors++;
3279
+ }
3280
+ }
3281
+ }
3282
+ }
3283
+ var valid9 = _errs9 === errors;
3284
+ if (valid9) {
3285
+ const err5 = { instancePath: instancePath + "/" + i0 + "/events/" + i1, schemaPath: "#/items/properties/events/items/allOf/0/not", keyword: "not", params: {}, message: "must NOT be valid" };
3286
+ if (vErrors === null) {
3287
+ vErrors = [err5];
3288
+ } else {
3289
+ vErrors.push(err5);
3290
+ }
3291
+ errors++;
3292
+ } else {
3293
+ errors = _errs8;
3294
+ if (vErrors !== null) {
3295
+ if (_errs8) {
3296
+ vErrors.length = _errs8;
3297
+ } else {
3298
+ vErrors = null;
3299
+ }
3300
+ }
3301
+ }
2900
3302
  if (data2 && typeof data2 == "object" && !Array.isArray(data2)) {
2901
3303
  if (data2.type !== void 0) {
2902
- let data4 = data2.type;
2903
- const _errs8 = errors;
2904
- const _errs9 = errors;
2905
- if (!(data4 === "commit" || data4 === "branch")) {
2906
- const err3 = {};
3304
+ let data5 = data2.type;
3305
+ const _errs13 = errors;
3306
+ const _errs14 = errors;
3307
+ if (!(data5 === "commit" || data5 === "branch")) {
3308
+ const err6 = {};
2907
3309
  if (vErrors === null) {
2908
- vErrors = [err3];
3310
+ vErrors = [err6];
2909
3311
  } else {
2910
- vErrors.push(err3);
3312
+ vErrors.push(err6);
2911
3313
  }
2912
3314
  errors++;
2913
3315
  }
2914
- var valid9 = _errs9 === errors;
2915
- if (valid9) {
2916
- const err4 = { instancePath: instancePath + "/" + i0 + "/events/" + i1 + "/type", schemaPath: "#/items/properties/events/items/properties/type/not", keyword: "not", params: {}, message: "must NOT be valid" };
3316
+ var valid13 = _errs14 === errors;
3317
+ if (valid13) {
3318
+ const err7 = { instancePath: instancePath + "/" + i0 + "/events/" + i1 + "/type", schemaPath: "#/items/properties/events/items/properties/type/not", keyword: "not", params: {}, message: "must NOT be valid" };
2917
3319
  if (vErrors === null) {
2918
- vErrors = [err4];
3320
+ vErrors = [err7];
2919
3321
  } else {
2920
- vErrors.push(err4);
3322
+ vErrors.push(err7);
2921
3323
  }
2922
3324
  errors++;
2923
3325
  } else {
2924
- errors = _errs8;
3326
+ errors = _errs13;
2925
3327
  if (vErrors !== null) {
2926
- if (_errs8) {
2927
- vErrors.length = _errs8;
3328
+ if (_errs13) {
3329
+ vErrors.length = _errs13;
2928
3330
  } else {
2929
3331
  vErrors = null;
2930
3332
  }
@@ -2932,29 +3334,29 @@ function validate11(data, { instancePath = "", parentData, parentDataProperty, r
2932
3334
  }
2933
3335
  }
2934
3336
  if (data2.at !== void 0) {
2935
- const err5 = { instancePath: instancePath + "/" + i0 + "/events/" + i1 + "/at", schemaPath: "#/definitions/absent/not", keyword: "not", params: {}, message: "must NOT be valid" };
3337
+ const err8 = { instancePath: instancePath + "/" + i0 + "/events/" + i1 + "/at", schemaPath: "#/definitions/absent/not", keyword: "not", params: {}, message: "must NOT be valid" };
2936
3338
  if (vErrors === null) {
2937
- vErrors = [err5];
3339
+ vErrors = [err8];
2938
3340
  } else {
2939
- vErrors.push(err5);
3341
+ vErrors.push(err8);
2940
3342
  }
2941
3343
  errors++;
2942
3344
  }
2943
3345
  if (data2.into !== void 0) {
2944
- const err6 = { instancePath: instancePath + "/" + i0 + "/events/" + i1 + "/into", schemaPath: "#/definitions/absent/not", keyword: "not", params: {}, message: "must NOT be valid" };
3346
+ const err9 = { instancePath: instancePath + "/" + i0 + "/events/" + i1 + "/into", schemaPath: "#/definitions/absent/not", keyword: "not", params: {}, message: "must NOT be valid" };
2945
3347
  if (vErrors === null) {
2946
- vErrors = [err6];
3348
+ vErrors = [err9];
2947
3349
  } else {
2948
- vErrors.push(err6);
3350
+ vErrors.push(err9);
2949
3351
  }
2950
3352
  errors++;
2951
3353
  }
2952
3354
  if (data2.color !== void 0) {
2953
- const err7 = { instancePath: instancePath + "/" + i0 + "/events/" + i1 + "/color", schemaPath: "#/definitions/absent/not", keyword: "not", params: {}, message: "must NOT be valid" };
3355
+ const err10 = { instancePath: instancePath + "/" + i0 + "/events/" + i1 + "/color", schemaPath: "#/definitions/absent/not", keyword: "not", params: {}, message: "must NOT be valid" };
2954
3356
  if (vErrors === null) {
2955
- vErrors = [err7];
3357
+ vErrors = [err10];
2956
3358
  } else {
2957
- vErrors.push(err7);
3359
+ vErrors.push(err10);
2958
3360
  }
2959
3361
  errors++;
2960
3362
  }
@@ -3044,31 +3446,76 @@ function validate17(data, { instancePath = "", parentData, parentDataProperty, r
3044
3446
  }
3045
3447
  }
3046
3448
  }
3449
+ const _errs8 = errors;
3450
+ const _errs9 = errors;
3047
3451
  if (data2 && typeof data2 == "object" && !Array.isArray(data2)) {
3048
- if (data2.at !== void 0) {
3049
- const err3 = { instancePath: instancePath + "/" + i0 + "/events/" + i1 + "/at", schemaPath: "#/definitions/absent/not", keyword: "not", params: {}, message: "must NOT be valid" };
3452
+ if (data2.type === void 0 && ("type")) {
3453
+ const err3 = {};
3050
3454
  if (vErrors === null) {
3051
3455
  vErrors = [err3];
3052
3456
  } else {
3053
3457
  vErrors.push(err3);
3054
3458
  }
3055
3459
  errors++;
3460
+ } else {
3461
+ if (data2.type !== void 0) {
3462
+ let data4 = data2.type;
3463
+ if (!(data4 === "leaf" || data4 === "node")) {
3464
+ const err4 = {};
3465
+ if (vErrors === null) {
3466
+ vErrors = [err4];
3467
+ } else {
3468
+ vErrors.push(err4);
3469
+ }
3470
+ errors++;
3471
+ }
3472
+ }
3473
+ }
3474
+ }
3475
+ var valid9 = _errs9 === errors;
3476
+ if (valid9) {
3477
+ const err5 = { instancePath: instancePath + "/" + i0 + "/events/" + i1, schemaPath: "#/items/properties/events/items/allOf/0/not", keyword: "not", params: {}, message: "must NOT be valid" };
3478
+ if (vErrors === null) {
3479
+ vErrors = [err5];
3480
+ } else {
3481
+ vErrors.push(err5);
3482
+ }
3483
+ errors++;
3484
+ } else {
3485
+ errors = _errs8;
3486
+ if (vErrors !== null) {
3487
+ if (_errs8) {
3488
+ vErrors.length = _errs8;
3489
+ } else {
3490
+ vErrors = null;
3491
+ }
3492
+ }
3493
+ }
3494
+ if (data2 && typeof data2 == "object" && !Array.isArray(data2)) {
3495
+ if (data2.at !== void 0) {
3496
+ const err6 = { instancePath: instancePath + "/" + i0 + "/events/" + i1 + "/at", schemaPath: "#/definitions/absent/not", keyword: "not", params: {}, message: "must NOT be valid" };
3497
+ if (vErrors === null) {
3498
+ vErrors = [err6];
3499
+ } else {
3500
+ vErrors.push(err6);
3501
+ }
3502
+ errors++;
3056
3503
  }
3057
3504
  if (data2.into !== void 0) {
3058
- const err4 = { instancePath: instancePath + "/" + i0 + "/events/" + i1 + "/into", schemaPath: "#/definitions/absent/not", keyword: "not", params: {}, message: "must NOT be valid" };
3505
+ const err7 = { instancePath: instancePath + "/" + i0 + "/events/" + i1 + "/into", schemaPath: "#/definitions/absent/not", keyword: "not", params: {}, message: "must NOT be valid" };
3059
3506
  if (vErrors === null) {
3060
- vErrors = [err4];
3507
+ vErrors = [err7];
3061
3508
  } else {
3062
- vErrors.push(err4);
3509
+ vErrors.push(err7);
3063
3510
  }
3064
3511
  errors++;
3065
3512
  }
3066
3513
  if (data2.color !== void 0) {
3067
- const err5 = { instancePath: instancePath + "/" + i0 + "/events/" + i1 + "/color", schemaPath: "#/definitions/absent/not", keyword: "not", params: {}, message: "must NOT be valid" };
3514
+ const err8 = { instancePath: instancePath + "/" + i0 + "/events/" + i1 + "/color", schemaPath: "#/definitions/absent/not", keyword: "not", params: {}, message: "must NOT be valid" };
3068
3515
  if (vErrors === null) {
3069
- vErrors = [err5];
3516
+ vErrors = [err8];
3070
3517
  } else {
3071
- vErrors.push(err5);
3518
+ vErrors.push(err8);
3072
3519
  }
3073
3520
  errors++;
3074
3521
  }
@@ -3082,63 +3529,296 @@ function validate17(data, { instancePath = "", parentData, parentDataProperty, r
3082
3529
  validate17.errors = vErrors;
3083
3530
  return errors === 0;
3084
3531
  }
3085
- var schema45 = { "enum": ["blue", "amber", "green", "violet", "rose", "slate", "coin"] };
3086
- var pattern0 = new RegExp("^[^\\s\\[\\]\u300C\u300D=:]+$", "u");
3087
- var func3 = ucs2length;
3088
- function validate22(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
3532
+ function validate20(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
3089
3533
  let vErrors = null;
3090
3534
  let errors = 0;
3091
- if (data && typeof data == "object" && !Array.isArray(data)) {
3092
- if (data.id === void 0) {
3093
- const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "id" }, message: "must have required property 'id'" };
3094
- if (vErrors === null) {
3095
- vErrors = [err0];
3096
- } else {
3097
- vErrors.push(err0);
3098
- }
3099
- errors++;
3100
- }
3101
- if (data.name === void 0) {
3102
- const err1 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "name" }, message: "must have required property 'name'" };
3103
- if (vErrors === null) {
3104
- vErrors = [err1];
3105
- } else {
3106
- vErrors.push(err1);
3107
- }
3108
- errors++;
3109
- }
3110
- for (const key0 in data) {
3111
- if (!(key0 === "id" || key0 === "name" || key0 === "note" || key0 === "color" || key0 === "icon")) {
3112
- const err2 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
3113
- if (vErrors === null) {
3114
- vErrors = [err2];
3115
- } else {
3116
- vErrors.push(err2);
3117
- }
3118
- errors++;
3119
- }
3120
- }
3121
- if (data.id !== void 0) {
3122
- let data0 = data.id;
3123
- if (typeof data0 === "string") {
3124
- if (!pattern0.test(data0)) {
3125
- const err3 = { instancePath: instancePath + "/id", schemaPath: "#/definitions/id/pattern", keyword: "pattern", params: { pattern: "^[^\\s\\[\\]\u300C\u300D=:]+$" }, message: 'must match pattern "^[^\\s\\[\\]\u300C\u300D=:]+$"' };
3126
- if (vErrors === null) {
3127
- vErrors = [err3];
3128
- } else {
3129
- vErrors.push(err3);
3130
- }
3131
- errors++;
3132
- }
3133
- } else {
3134
- const err4 = { instancePath: instancePath + "/id", schemaPath: "#/definitions/id/type", keyword: "type", params: { type: "string" }, message: "must be string" };
3135
- if (vErrors === null) {
3136
- vErrors = [err4];
3137
- } else {
3138
- vErrors.push(err4);
3139
- }
3140
- errors++;
3141
- }
3535
+ if (Array.isArray(data)) {
3536
+ const len0 = data.length;
3537
+ for (let i0 = 0; i0 < len0; i0++) {
3538
+ let data0 = data[i0];
3539
+ if (data0 && typeof data0 == "object" && !Array.isArray(data0)) {
3540
+ if (data0.events !== void 0) {
3541
+ let data1 = data0.events;
3542
+ if (Array.isArray(data1)) {
3543
+ const len1 = data1.length;
3544
+ for (let i1 = 0; i1 < len1; i1++) {
3545
+ let data2 = data1[i1];
3546
+ const _errs4 = errors;
3547
+ const _errs5 = errors;
3548
+ if (data2 && typeof data2 == "object" && !Array.isArray(data2)) {
3549
+ if (data2.type === void 0 && ("type")) {
3550
+ const err0 = {};
3551
+ if (vErrors === null) {
3552
+ vErrors = [err0];
3553
+ } else {
3554
+ vErrors.push(err0);
3555
+ }
3556
+ errors++;
3557
+ } else {
3558
+ if (data2.type !== void 0) {
3559
+ let data3 = data2.type;
3560
+ if (!(data3 === "leaf" || data3 === "node")) {
3561
+ const err1 = {};
3562
+ if (vErrors === null) {
3563
+ vErrors = [err1];
3564
+ } else {
3565
+ vErrors.push(err1);
3566
+ }
3567
+ errors++;
3568
+ }
3569
+ }
3570
+ }
3571
+ }
3572
+ var valid6 = _errs5 === errors;
3573
+ if (valid6) {
3574
+ const err2 = { instancePath: instancePath + "/" + i0 + "/events/" + i1, schemaPath: "#/items/properties/events/items/allOf/0/not", keyword: "not", params: {}, message: "must NOT be valid" };
3575
+ if (vErrors === null) {
3576
+ vErrors = [err2];
3577
+ } else {
3578
+ vErrors.push(err2);
3579
+ }
3580
+ errors++;
3581
+ } else {
3582
+ errors = _errs4;
3583
+ if (vErrors !== null) {
3584
+ if (_errs4) {
3585
+ vErrors.length = _errs4;
3586
+ } else {
3587
+ vErrors = null;
3588
+ }
3589
+ }
3590
+ }
3591
+ if (data2 && typeof data2 == "object" && !Array.isArray(data2)) {
3592
+ if (data2.type !== void 0) {
3593
+ let data4 = data2.type;
3594
+ const _errs9 = errors;
3595
+ const _errs10 = errors;
3596
+ if (!(data4 === "commit" || data4 === "branch")) {
3597
+ const err3 = {};
3598
+ if (vErrors === null) {
3599
+ vErrors = [err3];
3600
+ } else {
3601
+ vErrors.push(err3);
3602
+ }
3603
+ errors++;
3604
+ }
3605
+ var valid10 = _errs10 === errors;
3606
+ if (valid10) {
3607
+ const err4 = { instancePath: instancePath + "/" + i0 + "/events/" + i1 + "/type", schemaPath: "#/items/properties/events/items/properties/type/not", keyword: "not", params: {}, message: "must NOT be valid" };
3608
+ if (vErrors === null) {
3609
+ vErrors = [err4];
3610
+ } else {
3611
+ vErrors.push(err4);
3612
+ }
3613
+ errors++;
3614
+ } else {
3615
+ errors = _errs9;
3616
+ if (vErrors !== null) {
3617
+ if (_errs9) {
3618
+ vErrors.length = _errs9;
3619
+ } else {
3620
+ vErrors = null;
3621
+ }
3622
+ }
3623
+ }
3624
+ }
3625
+ }
3626
+ }
3627
+ }
3628
+ }
3629
+ }
3630
+ }
3631
+ }
3632
+ validate20.errors = vErrors;
3633
+ return errors === 0;
3634
+ }
3635
+ function validate22(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
3636
+ let vErrors = null;
3637
+ let errors = 0;
3638
+ if (Array.isArray(data)) {
3639
+ const len0 = data.length;
3640
+ for (let i0 = 0; i0 < len0; i0++) {
3641
+ let data0 = data[i0];
3642
+ if (data0 && typeof data0 == "object" && !Array.isArray(data0)) {
3643
+ if (data0.events !== void 0) {
3644
+ let data1 = data0.events;
3645
+ if (Array.isArray(data1)) {
3646
+ const len1 = data1.length;
3647
+ for (let i1 = 0; i1 < len1; i1++) {
3648
+ let data2 = data1[i1];
3649
+ const _errs3 = errors;
3650
+ const _errs4 = errors;
3651
+ if (data2 && typeof data2 == "object" && !Array.isArray(data2)) {
3652
+ if (data2.type === void 0 && ("type")) {
3653
+ const err0 = {};
3654
+ if (vErrors === null) {
3655
+ vErrors = [err0];
3656
+ } else {
3657
+ vErrors.push(err0);
3658
+ }
3659
+ errors++;
3660
+ } else {
3661
+ if (data2.type !== void 0) {
3662
+ let data3 = data2.type;
3663
+ if (!(data3 === "now" || data3 === "mark" || data3 === "span")) {
3664
+ const err1 = {};
3665
+ if (vErrors === null) {
3666
+ vErrors = [err1];
3667
+ } else {
3668
+ vErrors.push(err1);
3669
+ }
3670
+ errors++;
3671
+ }
3672
+ }
3673
+ }
3674
+ }
3675
+ var valid5 = _errs4 === errors;
3676
+ if (valid5) {
3677
+ const err2 = { instancePath: instancePath + "/" + i0 + "/events/" + i1, schemaPath: "#/items/properties/events/items/not", keyword: "not", params: {}, message: "must NOT be valid" };
3678
+ if (vErrors === null) {
3679
+ vErrors = [err2];
3680
+ } else {
3681
+ vErrors.push(err2);
3682
+ }
3683
+ errors++;
3684
+ } else {
3685
+ errors = _errs3;
3686
+ if (vErrors !== null) {
3687
+ if (_errs3) {
3688
+ vErrors.length = _errs3;
3689
+ } else {
3690
+ vErrors = null;
3691
+ }
3692
+ }
3693
+ }
3694
+ if (data2 && typeof data2 == "object" && !Array.isArray(data2)) {
3695
+ if (data2.type !== void 0) {
3696
+ let data4 = data2.type;
3697
+ const _errs8 = errors;
3698
+ const _errs9 = errors;
3699
+ if (!(data4 === "commit" || data4 === "branch")) {
3700
+ const err3 = {};
3701
+ if (vErrors === null) {
3702
+ vErrors = [err3];
3703
+ } else {
3704
+ vErrors.push(err3);
3705
+ }
3706
+ errors++;
3707
+ }
3708
+ var valid9 = _errs9 === errors;
3709
+ if (valid9) {
3710
+ const err4 = { instancePath: instancePath + "/" + i0 + "/events/" + i1 + "/type", schemaPath: "#/items/properties/events/items/properties/type/not", keyword: "not", params: {}, message: "must NOT be valid" };
3711
+ if (vErrors === null) {
3712
+ vErrors = [err4];
3713
+ } else {
3714
+ vErrors.push(err4);
3715
+ }
3716
+ errors++;
3717
+ } else {
3718
+ errors = _errs8;
3719
+ if (vErrors !== null) {
3720
+ if (_errs8) {
3721
+ vErrors.length = _errs8;
3722
+ } else {
3723
+ vErrors = null;
3724
+ }
3725
+ }
3726
+ }
3727
+ }
3728
+ if (data2.at !== void 0) {
3729
+ const err5 = { instancePath: instancePath + "/" + i0 + "/events/" + i1 + "/at", schemaPath: "#/definitions/absent/not", keyword: "not", params: {}, message: "must NOT be valid" };
3730
+ if (vErrors === null) {
3731
+ vErrors = [err5];
3732
+ } else {
3733
+ vErrors.push(err5);
3734
+ }
3735
+ errors++;
3736
+ }
3737
+ if (data2.into !== void 0) {
3738
+ const err6 = { instancePath: instancePath + "/" + i0 + "/events/" + i1 + "/into", schemaPath: "#/definitions/absent/not", keyword: "not", params: {}, message: "must NOT be valid" };
3739
+ if (vErrors === null) {
3740
+ vErrors = [err6];
3741
+ } else {
3742
+ vErrors.push(err6);
3743
+ }
3744
+ errors++;
3745
+ }
3746
+ if (data2.color !== void 0) {
3747
+ const err7 = { instancePath: instancePath + "/" + i0 + "/events/" + i1 + "/color", schemaPath: "#/definitions/absent/not", keyword: "not", params: {}, message: "must NOT be valid" };
3748
+ if (vErrors === null) {
3749
+ vErrors = [err7];
3750
+ } else {
3751
+ vErrors.push(err7);
3752
+ }
3753
+ errors++;
3754
+ }
3755
+ }
3756
+ }
3757
+ }
3758
+ }
3759
+ }
3760
+ }
3761
+ }
3762
+ validate22.errors = vErrors;
3763
+ return errors === 0;
3764
+ }
3765
+ var schema57 = { "enum": ["blue", "amber", "green", "violet", "rose", "slate", "coin"] };
3766
+ var pattern0 = new RegExp("^[^\\s\\[\\]\u300C\u300D=:]+$", "u");
3767
+ var func3 = ucs2length;
3768
+ function validate27(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
3769
+ let vErrors = null;
3770
+ let errors = 0;
3771
+ if (data && typeof data == "object" && !Array.isArray(data)) {
3772
+ if (data.id === void 0) {
3773
+ const err0 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "id" }, message: "must have required property 'id'" };
3774
+ if (vErrors === null) {
3775
+ vErrors = [err0];
3776
+ } else {
3777
+ vErrors.push(err0);
3778
+ }
3779
+ errors++;
3780
+ }
3781
+ if (data.name === void 0) {
3782
+ const err1 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "name" }, message: "must have required property 'name'" };
3783
+ if (vErrors === null) {
3784
+ vErrors = [err1];
3785
+ } else {
3786
+ vErrors.push(err1);
3787
+ }
3788
+ errors++;
3789
+ }
3790
+ for (const key0 in data) {
3791
+ if (!(key0 === "id" || key0 === "name" || key0 === "note" || key0 === "color" || key0 === "icon")) {
3792
+ const err2 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
3793
+ if (vErrors === null) {
3794
+ vErrors = [err2];
3795
+ } else {
3796
+ vErrors.push(err2);
3797
+ }
3798
+ errors++;
3799
+ }
3800
+ }
3801
+ if (data.id !== void 0) {
3802
+ let data0 = data.id;
3803
+ if (typeof data0 === "string") {
3804
+ if (!pattern0.test(data0)) {
3805
+ const err3 = { instancePath: instancePath + "/id", schemaPath: "#/definitions/id/pattern", keyword: "pattern", params: { pattern: "^[^\\s\\[\\]\u300C\u300D=:]+$" }, message: 'must match pattern "^[^\\s\\[\\]\u300C\u300D=:]+$"' };
3806
+ if (vErrors === null) {
3807
+ vErrors = [err3];
3808
+ } else {
3809
+ vErrors.push(err3);
3810
+ }
3811
+ errors++;
3812
+ }
3813
+ } else {
3814
+ const err4 = { instancePath: instancePath + "/id", schemaPath: "#/definitions/id/type", keyword: "type", params: { type: "string" }, message: "must be string" };
3815
+ if (vErrors === null) {
3816
+ vErrors = [err4];
3817
+ } else {
3818
+ vErrors.push(err4);
3819
+ }
3820
+ errors++;
3821
+ }
3142
3822
  }
3143
3823
  if (data.name !== void 0) {
3144
3824
  let data1 = data.name;
@@ -3187,7 +3867,7 @@ function validate22(data, { instancePath = "", parentData, parentDataProperty, r
3187
3867
  if (data.color !== void 0) {
3188
3868
  let data3 = data.color;
3189
3869
  if (!(data3 === "blue" || data3 === "amber" || data3 === "green" || data3 === "violet" || data3 === "rose" || data3 === "slate" || data3 === "coin")) {
3190
- const err9 = { instancePath: instancePath + "/color", schemaPath: "#/definitions/color/enum", keyword: "enum", params: { allowedValues: schema45.enum }, message: "must be equal to one of the allowed values" };
3870
+ const err9 = { instancePath: instancePath + "/color", schemaPath: "#/definitions/color/enum", keyword: "enum", params: { allowedValues: schema57.enum }, message: "must be equal to one of the allowed values" };
3191
3871
  if (vErrors === null) {
3192
3872
  vErrors = [err9];
3193
3873
  } else {
@@ -3227,11 +3907,11 @@ function validate22(data, { instancePath = "", parentData, parentDataProperty, r
3227
3907
  }
3228
3908
  errors++;
3229
3909
  }
3230
- validate22.errors = vErrors;
3910
+ validate27.errors = vErrors;
3231
3911
  return errors === 0;
3232
3912
  }
3233
3913
  var pattern3 = new RegExp("^(/|https?://)", "u");
3234
- function validate24(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
3914
+ function validate29(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
3235
3915
  let vErrors = null;
3236
3916
  let errors = 0;
3237
3917
  if (data && typeof data == "object" && !Array.isArray(data)) {
@@ -3333,7 +4013,7 @@ function validate24(data, { instancePath = "", parentData, parentDataProperty, r
3333
4013
  if (data.color !== void 0) {
3334
4014
  let data3 = data.color;
3335
4015
  if (!(data3 === "blue" || data3 === "amber" || data3 === "green" || data3 === "violet" || data3 === "rose" || data3 === "slate" || data3 === "coin")) {
3336
- const err9 = { instancePath: instancePath + "/color", schemaPath: "#/definitions/color/enum", keyword: "enum", params: { allowedValues: schema45.enum }, message: "must be equal to one of the allowed values" };
4016
+ const err9 = { instancePath: instancePath + "/color", schemaPath: "#/definitions/color/enum", keyword: "enum", params: { allowedValues: schema57.enum }, message: "must be equal to one of the allowed values" };
3337
4017
  if (vErrors === null) {
3338
4018
  vErrors = [err9];
3339
4019
  } else {
@@ -3417,11 +4097,11 @@ function validate24(data, { instancePath = "", parentData, parentDataProperty, r
3417
4097
  }
3418
4098
  errors++;
3419
4099
  }
3420
- validate24.errors = vErrors;
4100
+ validate29.errors = vErrors;
3421
4101
  return errors === 0;
3422
4102
  }
3423
4103
  var pattern4 = new RegExp("^([0-9]+/[0-9]+|[0-9]+(\\.[0-9]+)?%)$", "u");
3424
- function validate27(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
4104
+ function validate32(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
3425
4105
  let vErrors = null;
3426
4106
  let errors = 0;
3427
4107
  if (data && typeof data == "object" && !Array.isArray(data)) {
@@ -3507,10 +4187,10 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
3507
4187
  }
3508
4188
  errors++;
3509
4189
  }
3510
- validate27.errors = vErrors;
4190
+ validate32.errors = vErrors;
3511
4191
  return errors === 0;
3512
4192
  }
3513
- function validate26(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
4193
+ function validate31(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
3514
4194
  let vErrors = null;
3515
4195
  let errors = 0;
3516
4196
  if (data && typeof data == "object" && !Array.isArray(data)) {
@@ -3624,8 +4304,8 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
3624
4304
  }
3625
4305
  const len1 = data3.length;
3626
4306
  for (let i1 = 0; i1 < len1; i1++) {
3627
- if (!validate27(data3[i1], { instancePath: instancePath + "/meters/" + i1, parentData: data3, parentDataProperty: i1, rootData })) {
3628
- vErrors = vErrors === null ? validate27.errors : vErrors.concat(validate27.errors);
4307
+ if (!validate32(data3[i1], { instancePath: instancePath + "/meters/" + i1, parentData: data3, parentDataProperty: i1, rootData })) {
4308
+ vErrors = vErrors === null ? validate32.errors : vErrors.concat(validate32.errors);
3629
4309
  errors = vErrors.length;
3630
4310
  }
3631
4311
  }
@@ -3648,10 +4328,10 @@ function validate26(data, { instancePath = "", parentData, parentDataProperty, r
3648
4328
  }
3649
4329
  errors++;
3650
4330
  }
3651
- validate26.errors = vErrors;
4331
+ validate31.errors = vErrors;
3652
4332
  return errors === 0;
3653
4333
  }
3654
- function validate31(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
4334
+ function validate36(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
3655
4335
  let vErrors = null;
3656
4336
  let errors = 0;
3657
4337
  if (data && typeof data == "object" && !Array.isArray(data)) {
@@ -3737,13 +4417,13 @@ function validate31(data, { instancePath = "", parentData, parentDataProperty, r
3737
4417
  }
3738
4418
  errors++;
3739
4419
  }
3740
- validate31.errors = vErrors;
4420
+ validate36.errors = vErrors;
3741
4421
  return errors === 0;
3742
4422
  }
3743
- var schema68 = { "oneOf": [{ "description": "\u7DDA\u3002\u904B\u3076\u7269\u3092\u8F09\u305B\u3066\u9001\u308B\u5074\u304B\u3089\u53D7\u3051\u308B\u5074\u3078\u8D70\u308B", "type": "object", "additionalProperties": false, "required": ["type", "from", "to", "carry"], "properties": { "type": { "const": "edge" }, "from": { "$ref": "#/definitions/id" }, "to": { "$ref": "#/definitions/id" }, "label": { "$ref": "#/definitions/text" }, "carry": { "$ref": "#/definitions/carry" }, "labelSide": { "description": "\u7DDA\u306E\u540D\u524D\u3092\u7F6E\u304F\u5074 (\u5BC4\u305B\u306E\u6307\u793A)", "enum": ["above", "below", "left", "right"] }, "at": { "description": "\u6642\u9593\u8EF8\u306E\u56F3\u306E\u62E1\u5927\u306E\u5E2F\u3067\u3001\u7DDA\u3092\u5F15\u304F\u5217\u306E\u76EE\u76DB\u308A", "$ref": "#/definitions/unit" }, "into": { "description": "\u6642\u9593\u8EF8\u306E\u56F3\u306E\u62E1\u5927\u306E\u5E2F\u3067\u3001\u53D7\u3051\u308B\u7BB1\u3092\u9078\u3076\u5217\u306E\u76EE\u76DB\u308A\u3002\u66F8\u304B\u306A\u3051\u308C\u3070 at \u306E\u5217", "$ref": "#/definitions/unit" } } }, { "description": "\u7BB1\u306E\u4E2D\u306E\u51E6\u7406", "type": "object", "additionalProperties": false, "required": ["type", "box", "label"], "properties": { "type": { "const": "action" }, "box": { "$ref": "#/definitions/id" }, "label": { "$ref": "#/definitions/text" } } }, { "description": "\u7BB1\u306E\u4E0B\u306E\u5C0F\u3055\u306A\u5B57\u306E\u66F8\u304D\u63DB\u3048", "type": "object", "additionalProperties": false, "required": ["type", "box", "text"], "properties": { "type": { "const": "swap" }, "box": { "$ref": "#/definitions/id" }, "text": { "$ref": "#/definitions/text" }, "color": { "description": "\u6642\u9593\u8EF8\u306E\u56F3\u306E\u7BC0\u76EE\u306E\u4E38\u306E\u8272", "$ref": "#/definitions/color" } } }, { "description": "commit \u3092\u7A4D\u3080\u3002\u679D\u5206\u304B\u308C\u306E\u56F3\u3060\u3051\u304C\u66F8\u3051\u308B\u3002\u7A4D\u3093\u3060\u679D\u306E\u672D\u3068\u3001\u305D\u306E\u679D\u3092\u6307\u3059 HEAD \u304C\u9032\u3080\u3002\u5F53\u3066\u76F4\u3057 (copy) \u306F\u679D\u306E\u672D\u3092\u52D5\u304B\u3055\u305A\u3001merge commit (merge) \u306F\u53D6\u308A\u8FBC\u3080\u679D\u306E\u5148\u7AEF\u3082\u89AA\u306B\u6301\u3064", "type": "object", "additionalProperties": false, "required": ["type", "id", "branch"], "properties": { "type": { "const": "commit" }, "id": { "$ref": "#/definitions/id" }, "branch": { "$ref": "#/definitions/id" }, "copy": { "$ref": "#/definitions/id" }, "merge": { "$ref": "#/definitions/id" }, "hash": { "$ref": "#/definitions/hash" }, "note": { "$ref": "#/definitions/text" } } }, { "description": "\u679D\u3092\u5207\u308B\u3002\u679D\u5206\u304B\u308C\u306E\u56F3\u3060\u3051\u304C\u66F8\u3051\u308B\u3002\u679D\u306E\u672D\u3092 from \u306E commit \u3078\u7F6E\u304D\u3001HEAD \u3092\u305D\u306E\u679D\u3078\u79FB\u3059", "type": "object", "additionalProperties": false, "required": ["type", "branch", "from"], "properties": { "type": { "const": "branch" }, "branch": { "$ref": "#/definitions/id" }, "from": { "$ref": "#/definitions/id" } } }, { "description": "\u6642\u9593\u8EF8\u306E\u56F3\u306E\u4ECA\u306E\u6642\u523B\u306E\u91DD\u3092\u3001to \u306E\u76EE\u76DB\u308A\u306E\u7D42\u308F\u308A\u307E\u3067\u9032\u3081\u308B", "type": "object", "additionalProperties": false, "required": ["type", "to"], "properties": { "type": { "const": "now" }, "to": { "$ref": "#/definitions/unit" } } }, { "description": "\u6642\u9593\u8EF8\u306E\u56F3\u306E\u5370\u306E\u5217 row \u306E\u3001from \u304B\u3089 to \u306E\u76EE\u76DB\u308A\u306E\u5370\u306E\u8272\u3092\u5909\u3048\u308B", "type": "object", "additionalProperties": false, "required": ["type", "row", "from", "to", "color"], "properties": { "type": { "const": "mark" }, "row": { "$ref": "#/definitions/id" }, "from": { "$ref": "#/definitions/unit" }, "to": { "$ref": "#/definitions/unit" }, "color": { "$ref": "#/definitions/color" } } }, { "description": "\u6642\u9593\u8EF8\u306E\u56F3\u306E from \u304B\u3089 to \u306E\u76EE\u76DB\u308A\u306B\u3001\u62EC\u5F27\u3068\u5B57\u3092\u51FA\u3059\u3002shape \u304C box \u306A\u3089\u5370\u306E\u5217\u3092\u56F2\u307F\u3001\u5B57\u3092\u7E01\u306E\u672D\u306B\u3059\u308B", "type": "object", "additionalProperties": false, "required": ["type", "from", "to", "text"], "properties": { "type": { "const": "span" }, "from": { "$ref": "#/definitions/unit" }, "to": { "$ref": "#/definitions/unit" }, "text": { "$ref": "#/definitions/text" }, "shape": { "enum": ["box"] }, "color": { "$ref": "#/definitions/color" } } }, { "description": "\u4E2D\u8EAB\u306E\u5E2F\u306E\u6B04\u306E\u5024\u3068\u672D", "type": "object", "additionalProperties": false, "required": ["type", "field"], "anyOf": [{ "required": ["value"] }, { "required": ["tag"] }], "properties": { "type": { "const": "strip" }, "field": { "$ref": "#/definitions/text" }, "value": { "$ref": "#/definitions/text" }, "tag": { "$ref": "#/definitions/text" } } }] };
4423
+ var schema80 = { "oneOf": [{ "description": "\u7DDA\u3002\u904B\u3076\u7269\u3092\u8F09\u305B\u3066\u9001\u308B\u5074\u304B\u3089\u53D7\u3051\u308B\u5074\u3078\u8D70\u308B", "type": "object", "additionalProperties": false, "required": ["type", "from", "to", "carry"], "properties": { "type": { "const": "edge" }, "from": { "$ref": "#/definitions/id" }, "to": { "$ref": "#/definitions/id" }, "label": { "$ref": "#/definitions/text" }, "carry": { "$ref": "#/definitions/carry" }, "labelSide": { "description": "\u7DDA\u306E\u540D\u524D\u3092\u7F6E\u304F\u5074 (\u5BC4\u305B\u306E\u6307\u793A)", "enum": ["above", "below", "left", "right"] }, "at": { "description": "\u6642\u9593\u8EF8\u306E\u56F3\u306E\u62E1\u5927\u306E\u5E2F\u3067\u3001\u7DDA\u3092\u5F15\u304F\u5217\u306E\u76EE\u76DB\u308A", "$ref": "#/definitions/unit" }, "into": { "description": "\u6642\u9593\u8EF8\u306E\u56F3\u306E\u62E1\u5927\u306E\u5E2F\u3067\u3001\u53D7\u3051\u308B\u7BB1\u3092\u9078\u3076\u5217\u306E\u76EE\u76DB\u308A\u3002\u66F8\u304B\u306A\u3051\u308C\u3070 at \u306E\u5217", "$ref": "#/definitions/unit" } } }, { "description": "\u7BB1\u306E\u4E2D\u306E\u51E6\u7406", "type": "object", "additionalProperties": false, "required": ["type", "box", "label"], "properties": { "type": { "const": "action" }, "box": { "$ref": "#/definitions/id" }, "label": { "$ref": "#/definitions/text" } } }, { "description": "\u7BB1\u306E\u4E0B\u306E\u5C0F\u3055\u306A\u5B57\u306E\u66F8\u304D\u63DB\u3048", "type": "object", "additionalProperties": false, "required": ["type", "box", "text"], "properties": { "type": { "const": "swap" }, "box": { "$ref": "#/definitions/id" }, "text": { "$ref": "#/definitions/text" }, "color": { "description": "\u6642\u9593\u8EF8\u306E\u56F3\u306E\u7BC0\u76EE\u306E\u4E38\u306E\u8272", "$ref": "#/definitions/color" } } }, { "description": "commit \u3092\u7A4D\u3080\u3002\u679D\u5206\u304B\u308C\u306E\u56F3\u3060\u3051\u304C\u66F8\u3051\u308B\u3002\u7A4D\u3093\u3060\u679D\u306E\u672D\u3068\u3001\u305D\u306E\u679D\u3092\u6307\u3059 HEAD \u304C\u9032\u3080\u3002\u5F53\u3066\u76F4\u3057 (copy) \u306F\u679D\u306E\u672D\u3092\u52D5\u304B\u3055\u305A\u3001merge commit (merge) \u306F\u53D6\u308A\u8FBC\u3080\u679D\u306E\u5148\u7AEF\u3082\u89AA\u306B\u6301\u3064", "type": "object", "additionalProperties": false, "required": ["type", "id", "branch"], "properties": { "type": { "const": "commit" }, "id": { "$ref": "#/definitions/id" }, "branch": { "$ref": "#/definitions/id" }, "copy": { "$ref": "#/definitions/id" }, "merge": { "$ref": "#/definitions/id" }, "hash": { "$ref": "#/definitions/hash" }, "note": { "$ref": "#/definitions/text" } } }, { "description": "\u679D\u3092\u5207\u308B\u3002\u679D\u5206\u304B\u308C\u306E\u56F3\u3060\u3051\u304C\u66F8\u3051\u308B\u3002\u679D\u306E\u672D\u3092 from \u306E commit \u3078\u7F6E\u304D\u3001HEAD \u3092\u305D\u306E\u679D\u3078\u79FB\u3059", "type": "object", "additionalProperties": false, "required": ["type", "branch", "from"], "properties": { "type": { "const": "branch" }, "branch": { "$ref": "#/definitions/id" }, "from": { "$ref": "#/definitions/id" } } }, { "description": "\u6642\u9593\u8EF8\u306E\u56F3\u306E\u4ECA\u306E\u6642\u523B\u306E\u91DD\u3092\u3001to \u306E\u76EE\u76DB\u308A\u306E\u7D42\u308F\u308A\u307E\u3067\u9032\u3081\u308B", "type": "object", "additionalProperties": false, "required": ["type", "to"], "properties": { "type": { "const": "now" }, "to": { "$ref": "#/definitions/unit" } } }, { "description": "\u6642\u9593\u8EF8\u306E\u56F3\u306E\u5370\u306E\u5217 row \u306E\u3001from \u304B\u3089 to \u306E\u76EE\u76DB\u308A\u306E\u5370\u306E\u8272\u3092\u5909\u3048\u308B", "type": "object", "additionalProperties": false, "required": ["type", "row", "from", "to", "color"], "properties": { "type": { "const": "mark" }, "row": { "$ref": "#/definitions/id" }, "from": { "$ref": "#/definitions/unit" }, "to": { "$ref": "#/definitions/unit" }, "color": { "$ref": "#/definitions/color" } } }, { "description": "\u6642\u9593\u8EF8\u306E\u56F3\u306E from \u304B\u3089 to \u306E\u76EE\u76DB\u308A\u306B\u3001\u62EC\u5F27\u3068\u5B57\u3092\u51FA\u3059\u3002shape \u304C box \u306A\u3089\u5370\u306E\u5217\u3092\u56F2\u307F\u3001\u5B57\u3092\u7E01\u306E\u672D\u306B\u3059\u308B", "type": "object", "additionalProperties": false, "required": ["type", "from", "to", "text"], "properties": { "type": { "const": "span" }, "from": { "$ref": "#/definitions/unit" }, "to": { "$ref": "#/definitions/unit" }, "text": { "$ref": "#/definitions/text" }, "shape": { "enum": ["box"] }, "color": { "$ref": "#/definitions/color" } } }, { "description": "\u8449\u3092\u51FA\u3059\u3002\u6728\u306E\u56F3\u3060\u3051\u304C\u66F8\u3051\u308B\u3002\u66F8\u3044\u305F\u6BB5\u3067\u8449\u306E\u7BB1\u304C\u73FE\u308C\u308B\u3002hash \u3092\u66F8\u304F\u3068\u7BB1\u306B\u5024\u3092\u51FA\u3057\u3001\u540D\u672D\u3092\u8449\u306E\u4E0B\u306E\u672D\u306B\u51FA\u3059", "type": "object", "additionalProperties": false, "required": ["type", "id"], "properties": { "type": { "const": "leaf" }, "id": { "$ref": "#/definitions/id" }, "hash": { "$ref": "#/definitions/hash" } } }, { "description": "1 \u3064\u4EE5\u4E0A\u306E\u5B50\u304B\u3089\u89AA\u3092\u7D44\u3080\u3002\u6728\u306E\u56F3\u3060\u3051\u304C\u66F8\u3051\u308B\u3002\u66F8\u3044\u305F\u6BB5\u3067\u89AA\u306E\u7BB1\u3068\u3001\u5B50\u304B\u3089\u89AA\u3078\u306E\u6728\u306E\u7DDA\u304C\u73FE\u308C\u308B", "type": "object", "additionalProperties": false, "required": ["type", "id", "children"], "properties": { "type": { "const": "node" }, "id": { "$ref": "#/definitions/id" }, "children": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/id" } }, "hash": { "$ref": "#/definitions/hash" } } }, { "description": "\u4E2D\u8EAB\u306E\u5E2F\u306E\u6B04\u306E\u5024\u3068\u672D", "type": "object", "additionalProperties": false, "required": ["type", "field"], "anyOf": [{ "required": ["value"] }, { "required": ["tag"] }], "properties": { "type": { "const": "strip" }, "field": { "$ref": "#/definitions/text" }, "value": { "$ref": "#/definitions/text" }, "tag": { "$ref": "#/definitions/text" } } }] };
3744
4424
  var pattern14 = new RegExp("^[0-9a-f]{4,40}$", "u");
3745
- var schema72 = { "properties": { "kind": { "enum": ["envelope", "tag", "coin", "none"] }}};
3746
- function validate34(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
4425
+ var schema84 = { "properties": { "kind": { "enum": ["envelope", "tag", "coin", "none"] }}};
4426
+ function validate39(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
3747
4427
  let vErrors = null;
3748
4428
  let errors = 0;
3749
4429
  const _errs1 = errors;
@@ -3869,7 +4549,7 @@ function validate34(data, { instancePath = "", parentData, parentDataProperty, r
3869
4549
  if (data.kind !== void 0) {
3870
4550
  let data1 = data.kind;
3871
4551
  if (!(data1 === "envelope" || data1 === "tag" || data1 === "coin" || data1 === "none")) {
3872
- const err8 = { instancePath: instancePath + "/kind", schemaPath: "#/properties/kind/enum", keyword: "enum", params: { allowedValues: schema72.properties.kind.enum }, message: "must be equal to one of the allowed values" };
4552
+ const err8 = { instancePath: instancePath + "/kind", schemaPath: "#/properties/kind/enum", keyword: "enum", params: { allowedValues: schema84.properties.kind.enum }, message: "must be equal to one of the allowed values" };
3873
4553
  if (vErrors === null) {
3874
4554
  vErrors = [err8];
3875
4555
  } else {
@@ -3909,10 +4589,10 @@ function validate34(data, { instancePath = "", parentData, parentDataProperty, r
3909
4589
  }
3910
4590
  errors++;
3911
4591
  }
3912
- validate34.errors = vErrors;
4592
+ validate39.errors = vErrors;
3913
4593
  return errors === 0;
3914
4594
  }
3915
- function validate33(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
4595
+ function validate38(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
3916
4596
  let vErrors = null;
3917
4597
  let errors = 0;
3918
4598
  if (data && typeof data == "object" && !Array.isArray(data)) {
@@ -4054,15 +4734,15 @@ function validate33(data, { instancePath = "", parentData, parentDataProperty, r
4054
4734
  }
4055
4735
  }
4056
4736
  if (data.carry !== void 0) {
4057
- if (!validate34(data.carry, { instancePath: instancePath + "/carry", parentData: data, parentDataProperty: "carry", rootData })) {
4058
- vErrors = vErrors === null ? validate34.errors : vErrors.concat(validate34.errors);
4737
+ if (!validate39(data.carry, { instancePath: instancePath + "/carry", parentData: data, parentDataProperty: "carry", rootData })) {
4738
+ vErrors = vErrors === null ? validate39.errors : vErrors.concat(validate39.errors);
4059
4739
  errors = vErrors.length;
4060
4740
  }
4061
4741
  }
4062
4742
  if (data.labelSide !== void 0) {
4063
4743
  let data5 = data.labelSide;
4064
4744
  if (!(data5 === "above" || data5 === "below" || data5 === "left" || data5 === "right")) {
4065
- const err13 = { instancePath: instancePath + "/labelSide", schemaPath: "#/oneOf/0/properties/labelSide/enum", keyword: "enum", params: { allowedValues: schema68.oneOf[0].properties.labelSide.enum }, message: "must be equal to one of the allowed values" };
4745
+ const err13 = { instancePath: instancePath + "/labelSide", schemaPath: "#/oneOf/0/properties/labelSide/enum", keyword: "enum", params: { allowedValues: schema80.oneOf[0].properties.labelSide.enum }, message: "must be equal to one of the allowed values" };
4066
4746
  if (vErrors === null) {
4067
4747
  vErrors = [err13];
4068
4748
  } else {
@@ -4328,7 +5008,7 @@ function validate33(data, { instancePath = "", parentData, parentDataProperty, r
4328
5008
  if (data.color !== void 0) {
4329
5009
  let data14 = data.color;
4330
5010
  if (!(data14 === "blue" || data14 === "amber" || data14 === "green" || data14 === "violet" || data14 === "rose" || data14 === "slate" || data14 === "coin")) {
4331
- const err38 = { instancePath: instancePath + "/color", schemaPath: "#/definitions/color/enum", keyword: "enum", params: { allowedValues: schema45.enum }, message: "must be equal to one of the allowed values" };
5011
+ const err38 = { instancePath: instancePath + "/color", schemaPath: "#/definitions/color/enum", keyword: "enum", params: { allowedValues: schema57.enum }, message: "must be equal to one of the allowed values" };
4332
5012
  if (vErrors === null) {
4333
5013
  vErrors = [err38];
4334
5014
  } else {
@@ -4856,7 +5536,7 @@ function validate33(data, { instancePath = "", parentData, parentDataProperty, r
4856
5536
  if (data.color !== void 0) {
4857
5537
  let data31 = data.color;
4858
5538
  if (!(data31 === "blue" || data31 === "amber" || data31 === "green" || data31 === "violet" || data31 === "rose" || data31 === "slate" || data31 === "coin")) {
4859
- const err88 = { instancePath: instancePath + "/color", schemaPath: "#/definitions/color/enum", keyword: "enum", params: { allowedValues: schema45.enum }, message: "must be equal to one of the allowed values" };
5539
+ const err88 = { instancePath: instancePath + "/color", schemaPath: "#/definitions/color/enum", keyword: "enum", params: { allowedValues: schema57.enum }, message: "must be equal to one of the allowed values" };
4860
5540
  if (vErrors === null) {
4861
5541
  vErrors = [err88];
4862
5542
  } else {
@@ -4968,118 +5648,362 @@ function validate33(data, { instancePath = "", parentData, parentDataProperty, r
4968
5648
  }
4969
5649
  errors++;
4970
5650
  }
4971
- if (typeof data34 == "number" && isFinite(data34)) {
4972
- if (data34 < 0 || isNaN(data34)) {
4973
- const err99 = { instancePath: instancePath + "/to", schemaPath: "#/definitions/unit/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" };
5651
+ if (typeof data34 == "number" && isFinite(data34)) {
5652
+ if (data34 < 0 || isNaN(data34)) {
5653
+ const err99 = { instancePath: instancePath + "/to", schemaPath: "#/definitions/unit/minimum", keyword: "minimum", params: { comparison: ">=", limit: 0 }, message: "must be >= 0" };
5654
+ if (vErrors === null) {
5655
+ vErrors = [err99];
5656
+ } else {
5657
+ vErrors.push(err99);
5658
+ }
5659
+ errors++;
5660
+ }
5661
+ }
5662
+ }
5663
+ if (data.text !== void 0) {
5664
+ let data35 = data.text;
5665
+ if (typeof data35 === "string") {
5666
+ if (func3(data35) < 1) {
5667
+ const err100 = { instancePath: instancePath + "/text", schemaPath: "#/definitions/text/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
5668
+ if (vErrors === null) {
5669
+ vErrors = [err100];
5670
+ } else {
5671
+ vErrors.push(err100);
5672
+ }
5673
+ errors++;
5674
+ }
5675
+ } else {
5676
+ const err101 = { instancePath: instancePath + "/text", schemaPath: "#/definitions/text/type", keyword: "type", params: { type: "string" }, message: "must be string" };
5677
+ if (vErrors === null) {
5678
+ vErrors = [err101];
5679
+ } else {
5680
+ vErrors.push(err101);
5681
+ }
5682
+ errors++;
5683
+ }
5684
+ }
5685
+ if (data.shape !== void 0) {
5686
+ if (!(data.shape === "box")) {
5687
+ const err102 = { instancePath: instancePath + "/shape", schemaPath: "#/oneOf/7/properties/shape/enum", keyword: "enum", params: { allowedValues: schema80.oneOf[7].properties.shape.enum }, message: "must be equal to one of the allowed values" };
5688
+ if (vErrors === null) {
5689
+ vErrors = [err102];
5690
+ } else {
5691
+ vErrors.push(err102);
5692
+ }
5693
+ errors++;
5694
+ }
5695
+ }
5696
+ if (data.color !== void 0) {
5697
+ let data37 = data.color;
5698
+ if (!(data37 === "blue" || data37 === "amber" || data37 === "green" || data37 === "violet" || data37 === "rose" || data37 === "slate" || data37 === "coin")) {
5699
+ const err103 = { instancePath: instancePath + "/color", schemaPath: "#/definitions/color/enum", keyword: "enum", params: { allowedValues: schema57.enum }, message: "must be equal to one of the allowed values" };
5700
+ if (vErrors === null) {
5701
+ vErrors = [err103];
5702
+ } else {
5703
+ vErrors.push(err103);
5704
+ }
5705
+ errors++;
5706
+ }
5707
+ }
5708
+ } else {
5709
+ const err104 = { instancePath, schemaPath: "#/oneOf/7/type", keyword: "type", params: { type: "object" }, message: "must be object" };
5710
+ if (vErrors === null) {
5711
+ vErrors = [err104];
5712
+ } else {
5713
+ vErrors.push(err104);
5714
+ }
5715
+ errors++;
5716
+ }
5717
+ } else if (tag0 === "leaf") {
5718
+ if (data && typeof data == "object" && !Array.isArray(data)) {
5719
+ if (data.type === void 0) {
5720
+ const err105 = { instancePath, schemaPath: "#/oneOf/8/required", keyword: "required", params: { missingProperty: "type" }, message: "must have required property 'type'" };
5721
+ if (vErrors === null) {
5722
+ vErrors = [err105];
5723
+ } else {
5724
+ vErrors.push(err105);
5725
+ }
5726
+ errors++;
5727
+ }
5728
+ if (data.id === void 0) {
5729
+ const err106 = { instancePath, schemaPath: "#/oneOf/8/required", keyword: "required", params: { missingProperty: "id" }, message: "must have required property 'id'" };
5730
+ if (vErrors === null) {
5731
+ vErrors = [err106];
5732
+ } else {
5733
+ vErrors.push(err106);
5734
+ }
5735
+ errors++;
5736
+ }
5737
+ for (const key8 in data) {
5738
+ if (!(key8 === "type" || key8 === "id" || key8 === "hash")) {
5739
+ const err107 = { instancePath, schemaPath: "#/oneOf/8/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key8 }, message: "must NOT have additional properties" };
5740
+ if (vErrors === null) {
5741
+ vErrors = [err107];
5742
+ } else {
5743
+ vErrors.push(err107);
5744
+ }
5745
+ errors++;
5746
+ }
5747
+ }
5748
+ if (data.type !== void 0) {
5749
+ if ("leaf" !== data.type) {
5750
+ const err108 = { instancePath: instancePath + "/type", schemaPath: "#/oneOf/8/properties/type/const", keyword: "const", params: { allowedValue: "leaf" }, message: "must be equal to constant" };
5751
+ if (vErrors === null) {
5752
+ vErrors = [err108];
5753
+ } else {
5754
+ vErrors.push(err108);
5755
+ }
5756
+ errors++;
5757
+ }
5758
+ }
5759
+ if (data.id !== void 0) {
5760
+ let data39 = data.id;
5761
+ if (typeof data39 === "string") {
5762
+ if (!pattern0.test(data39)) {
5763
+ const err109 = { instancePath: instancePath + "/id", schemaPath: "#/definitions/id/pattern", keyword: "pattern", params: { pattern: "^[^\\s\\[\\]\u300C\u300D=:]+$" }, message: 'must match pattern "^[^\\s\\[\\]\u300C\u300D=:]+$"' };
5764
+ if (vErrors === null) {
5765
+ vErrors = [err109];
5766
+ } else {
5767
+ vErrors.push(err109);
5768
+ }
5769
+ errors++;
5770
+ }
5771
+ } else {
5772
+ const err110 = { instancePath: instancePath + "/id", schemaPath: "#/definitions/id/type", keyword: "type", params: { type: "string" }, message: "must be string" };
5773
+ if (vErrors === null) {
5774
+ vErrors = [err110];
5775
+ } else {
5776
+ vErrors.push(err110);
5777
+ }
5778
+ errors++;
5779
+ }
5780
+ }
5781
+ if (data.hash !== void 0) {
5782
+ let data40 = data.hash;
5783
+ if (typeof data40 === "string") {
5784
+ if (!pattern14.test(data40)) {
5785
+ const err111 = { instancePath: instancePath + "/hash", schemaPath: "#/definitions/hash/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{4,40}$" }, message: 'must match pattern "^[0-9a-f]{4,40}$"' };
5786
+ if (vErrors === null) {
5787
+ vErrors = [err111];
5788
+ } else {
5789
+ vErrors.push(err111);
5790
+ }
5791
+ errors++;
5792
+ }
5793
+ } else {
5794
+ const err112 = { instancePath: instancePath + "/hash", schemaPath: "#/definitions/hash/type", keyword: "type", params: { type: "string" }, message: "must be string" };
5795
+ if (vErrors === null) {
5796
+ vErrors = [err112];
5797
+ } else {
5798
+ vErrors.push(err112);
5799
+ }
5800
+ errors++;
5801
+ }
5802
+ }
5803
+ } else {
5804
+ const err113 = { instancePath, schemaPath: "#/oneOf/8/type", keyword: "type", params: { type: "object" }, message: "must be object" };
5805
+ if (vErrors === null) {
5806
+ vErrors = [err113];
5807
+ } else {
5808
+ vErrors.push(err113);
5809
+ }
5810
+ errors++;
5811
+ }
5812
+ } else if (tag0 === "node") {
5813
+ if (data && typeof data == "object" && !Array.isArray(data)) {
5814
+ if (data.type === void 0) {
5815
+ const err114 = { instancePath, schemaPath: "#/oneOf/9/required", keyword: "required", params: { missingProperty: "type" }, message: "must have required property 'type'" };
5816
+ if (vErrors === null) {
5817
+ vErrors = [err114];
5818
+ } else {
5819
+ vErrors.push(err114);
5820
+ }
5821
+ errors++;
5822
+ }
5823
+ if (data.id === void 0) {
5824
+ const err115 = { instancePath, schemaPath: "#/oneOf/9/required", keyword: "required", params: { missingProperty: "id" }, message: "must have required property 'id'" };
5825
+ if (vErrors === null) {
5826
+ vErrors = [err115];
5827
+ } else {
5828
+ vErrors.push(err115);
5829
+ }
5830
+ errors++;
5831
+ }
5832
+ if (data.children === void 0) {
5833
+ const err116 = { instancePath, schemaPath: "#/oneOf/9/required", keyword: "required", params: { missingProperty: "children" }, message: "must have required property 'children'" };
5834
+ if (vErrors === null) {
5835
+ vErrors = [err116];
5836
+ } else {
5837
+ vErrors.push(err116);
5838
+ }
5839
+ errors++;
5840
+ }
5841
+ for (const key9 in data) {
5842
+ if (!(key9 === "type" || key9 === "id" || key9 === "children" || key9 === "hash")) {
5843
+ const err117 = { instancePath, schemaPath: "#/oneOf/9/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key9 }, message: "must NOT have additional properties" };
5844
+ if (vErrors === null) {
5845
+ vErrors = [err117];
5846
+ } else {
5847
+ vErrors.push(err117);
5848
+ }
5849
+ errors++;
5850
+ }
5851
+ }
5852
+ if (data.type !== void 0) {
5853
+ if ("node" !== data.type) {
5854
+ const err118 = { instancePath: instancePath + "/type", schemaPath: "#/oneOf/9/properties/type/const", keyword: "const", params: { allowedValue: "node" }, message: "must be equal to constant" };
5855
+ if (vErrors === null) {
5856
+ vErrors = [err118];
5857
+ } else {
5858
+ vErrors.push(err118);
5859
+ }
5860
+ errors++;
5861
+ }
5862
+ }
5863
+ if (data.id !== void 0) {
5864
+ let data42 = data.id;
5865
+ if (typeof data42 === "string") {
5866
+ if (!pattern0.test(data42)) {
5867
+ const err119 = { instancePath: instancePath + "/id", schemaPath: "#/definitions/id/pattern", keyword: "pattern", params: { pattern: "^[^\\s\\[\\]\u300C\u300D=:]+$" }, message: 'must match pattern "^[^\\s\\[\\]\u300C\u300D=:]+$"' };
4974
5868
  if (vErrors === null) {
4975
- vErrors = [err99];
5869
+ vErrors = [err119];
4976
5870
  } else {
4977
- vErrors.push(err99);
5871
+ vErrors.push(err119);
4978
5872
  }
4979
5873
  errors++;
4980
5874
  }
5875
+ } else {
5876
+ const err120 = { instancePath: instancePath + "/id", schemaPath: "#/definitions/id/type", keyword: "type", params: { type: "string" }, message: "must be string" };
5877
+ if (vErrors === null) {
5878
+ vErrors = [err120];
5879
+ } else {
5880
+ vErrors.push(err120);
5881
+ }
5882
+ errors++;
4981
5883
  }
4982
5884
  }
4983
- if (data.text !== void 0) {
4984
- let data35 = data.text;
4985
- if (typeof data35 === "string") {
4986
- if (func3(data35) < 1) {
4987
- const err100 = { instancePath: instancePath + "/text", schemaPath: "#/definitions/text/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
5885
+ if (data.children !== void 0) {
5886
+ let data43 = data.children;
5887
+ if (Array.isArray(data43)) {
5888
+ if (data43.length < 1) {
5889
+ const err121 = { instancePath: instancePath + "/children", schemaPath: "#/oneOf/9/properties/children/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
4988
5890
  if (vErrors === null) {
4989
- vErrors = [err100];
5891
+ vErrors = [err121];
4990
5892
  } else {
4991
- vErrors.push(err100);
5893
+ vErrors.push(err121);
4992
5894
  }
4993
5895
  errors++;
4994
5896
  }
5897
+ const len0 = data43.length;
5898
+ for (let i0 = 0; i0 < len0; i0++) {
5899
+ let data44 = data43[i0];
5900
+ if (typeof data44 === "string") {
5901
+ if (!pattern0.test(data44)) {
5902
+ const err122 = { instancePath: instancePath + "/children/" + i0, schemaPath: "#/definitions/id/pattern", keyword: "pattern", params: { pattern: "^[^\\s\\[\\]\u300C\u300D=:]+$" }, message: 'must match pattern "^[^\\s\\[\\]\u300C\u300D=:]+$"' };
5903
+ if (vErrors === null) {
5904
+ vErrors = [err122];
5905
+ } else {
5906
+ vErrors.push(err122);
5907
+ }
5908
+ errors++;
5909
+ }
5910
+ } else {
5911
+ const err123 = { instancePath: instancePath + "/children/" + i0, schemaPath: "#/definitions/id/type", keyword: "type", params: { type: "string" }, message: "must be string" };
5912
+ if (vErrors === null) {
5913
+ vErrors = [err123];
5914
+ } else {
5915
+ vErrors.push(err123);
5916
+ }
5917
+ errors++;
5918
+ }
5919
+ }
4995
5920
  } else {
4996
- const err101 = { instancePath: instancePath + "/text", schemaPath: "#/definitions/text/type", keyword: "type", params: { type: "string" }, message: "must be string" };
5921
+ const err124 = { instancePath: instancePath + "/children", schemaPath: "#/oneOf/9/properties/children/type", keyword: "type", params: { type: "array" }, message: "must be array" };
4997
5922
  if (vErrors === null) {
4998
- vErrors = [err101];
5923
+ vErrors = [err124];
4999
5924
  } else {
5000
- vErrors.push(err101);
5925
+ vErrors.push(err124);
5001
5926
  }
5002
5927
  errors++;
5003
5928
  }
5004
5929
  }
5005
- if (data.shape !== void 0) {
5006
- if (!(data.shape === "box")) {
5007
- const err102 = { instancePath: instancePath + "/shape", schemaPath: "#/oneOf/7/properties/shape/enum", keyword: "enum", params: { allowedValues: schema68.oneOf[7].properties.shape.enum }, message: "must be equal to one of the allowed values" };
5008
- if (vErrors === null) {
5009
- vErrors = [err102];
5010
- } else {
5011
- vErrors.push(err102);
5930
+ if (data.hash !== void 0) {
5931
+ let data45 = data.hash;
5932
+ if (typeof data45 === "string") {
5933
+ if (!pattern14.test(data45)) {
5934
+ const err125 = { instancePath: instancePath + "/hash", schemaPath: "#/definitions/hash/pattern", keyword: "pattern", params: { pattern: "^[0-9a-f]{4,40}$" }, message: 'must match pattern "^[0-9a-f]{4,40}$"' };
5935
+ if (vErrors === null) {
5936
+ vErrors = [err125];
5937
+ } else {
5938
+ vErrors.push(err125);
5939
+ }
5940
+ errors++;
5012
5941
  }
5013
- errors++;
5014
- }
5015
- }
5016
- if (data.color !== void 0) {
5017
- let data37 = data.color;
5018
- if (!(data37 === "blue" || data37 === "amber" || data37 === "green" || data37 === "violet" || data37 === "rose" || data37 === "slate" || data37 === "coin")) {
5019
- const err103 = { instancePath: instancePath + "/color", schemaPath: "#/definitions/color/enum", keyword: "enum", params: { allowedValues: schema45.enum }, message: "must be equal to one of the allowed values" };
5942
+ } else {
5943
+ const err126 = { instancePath: instancePath + "/hash", schemaPath: "#/definitions/hash/type", keyword: "type", params: { type: "string" }, message: "must be string" };
5020
5944
  if (vErrors === null) {
5021
- vErrors = [err103];
5945
+ vErrors = [err126];
5022
5946
  } else {
5023
- vErrors.push(err103);
5947
+ vErrors.push(err126);
5024
5948
  }
5025
5949
  errors++;
5026
5950
  }
5027
5951
  }
5028
5952
  } else {
5029
- const err104 = { instancePath, schemaPath: "#/oneOf/7/type", keyword: "type", params: { type: "object" }, message: "must be object" };
5953
+ const err127 = { instancePath, schemaPath: "#/oneOf/9/type", keyword: "type", params: { type: "object" }, message: "must be object" };
5030
5954
  if (vErrors === null) {
5031
- vErrors = [err104];
5955
+ vErrors = [err127];
5032
5956
  } else {
5033
- vErrors.push(err104);
5957
+ vErrors.push(err127);
5034
5958
  }
5035
5959
  errors++;
5036
5960
  }
5037
5961
  } else if (tag0 === "strip") {
5038
- const _errs117 = errors;
5039
- let valid45 = false;
5040
- const _errs118 = errors;
5962
+ const _errs142 = errors;
5963
+ let valid56 = false;
5964
+ const _errs143 = errors;
5041
5965
  if (data && typeof data == "object" && !Array.isArray(data)) {
5042
5966
  if (data.value === void 0) {
5043
- const err105 = { instancePath, schemaPath: "#/oneOf/8/anyOf/0/required", keyword: "required", params: { missingProperty: "value" }, message: "must have required property 'value'" };
5967
+ const err128 = { instancePath, schemaPath: "#/oneOf/10/anyOf/0/required", keyword: "required", params: { missingProperty: "value" }, message: "must have required property 'value'" };
5044
5968
  if (vErrors === null) {
5045
- vErrors = [err105];
5969
+ vErrors = [err128];
5046
5970
  } else {
5047
- vErrors.push(err105);
5971
+ vErrors.push(err128);
5048
5972
  }
5049
5973
  errors++;
5050
5974
  }
5051
5975
  }
5052
- var _valid0 = _errs118 === errors;
5053
- valid45 = valid45 || _valid0;
5054
- if (!valid45) {
5055
- const _errs119 = errors;
5976
+ var _valid0 = _errs143 === errors;
5977
+ valid56 = valid56 || _valid0;
5978
+ if (!valid56) {
5979
+ const _errs144 = errors;
5056
5980
  if (data && typeof data == "object" && !Array.isArray(data)) {
5057
5981
  if (data.tag === void 0) {
5058
- const err106 = { instancePath, schemaPath: "#/oneOf/8/anyOf/1/required", keyword: "required", params: { missingProperty: "tag" }, message: "must have required property 'tag'" };
5982
+ const err129 = { instancePath, schemaPath: "#/oneOf/10/anyOf/1/required", keyword: "required", params: { missingProperty: "tag" }, message: "must have required property 'tag'" };
5059
5983
  if (vErrors === null) {
5060
- vErrors = [err106];
5984
+ vErrors = [err129];
5061
5985
  } else {
5062
- vErrors.push(err106);
5986
+ vErrors.push(err129);
5063
5987
  }
5064
5988
  errors++;
5065
5989
  }
5066
5990
  }
5067
- var _valid0 = _errs119 === errors;
5068
- valid45 = valid45 || _valid0;
5991
+ var _valid0 = _errs144 === errors;
5992
+ valid56 = valid56 || _valid0;
5069
5993
  }
5070
- if (!valid45) {
5071
- const err107 = { instancePath, schemaPath: "#/oneOf/8/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
5994
+ if (!valid56) {
5995
+ const err130 = { instancePath, schemaPath: "#/oneOf/10/anyOf", keyword: "anyOf", params: {}, message: "must match a schema in anyOf" };
5072
5996
  if (vErrors === null) {
5073
- vErrors = [err107];
5997
+ vErrors = [err130];
5074
5998
  } else {
5075
- vErrors.push(err107);
5999
+ vErrors.push(err130);
5076
6000
  }
5077
6001
  errors++;
5078
6002
  } else {
5079
- errors = _errs117;
6003
+ errors = _errs142;
5080
6004
  if (vErrors !== null) {
5081
- if (_errs117) {
5082
- vErrors.length = _errs117;
6005
+ if (_errs142) {
6006
+ vErrors.length = _errs142;
5083
6007
  } else {
5084
6008
  vErrors = null;
5085
6009
  }
@@ -5087,151 +6011,151 @@ function validate33(data, { instancePath = "", parentData, parentDataProperty, r
5087
6011
  }
5088
6012
  if (data && typeof data == "object" && !Array.isArray(data)) {
5089
6013
  if (data.type === void 0) {
5090
- const err108 = { instancePath, schemaPath: "#/oneOf/8/required", keyword: "required", params: { missingProperty: "type" }, message: "must have required property 'type'" };
6014
+ const err131 = { instancePath, schemaPath: "#/oneOf/10/required", keyword: "required", params: { missingProperty: "type" }, message: "must have required property 'type'" };
5091
6015
  if (vErrors === null) {
5092
- vErrors = [err108];
6016
+ vErrors = [err131];
5093
6017
  } else {
5094
- vErrors.push(err108);
6018
+ vErrors.push(err131);
5095
6019
  }
5096
6020
  errors++;
5097
6021
  }
5098
6022
  if (data.field === void 0) {
5099
- const err109 = { instancePath, schemaPath: "#/oneOf/8/required", keyword: "required", params: { missingProperty: "field" }, message: "must have required property 'field'" };
6023
+ const err132 = { instancePath, schemaPath: "#/oneOf/10/required", keyword: "required", params: { missingProperty: "field" }, message: "must have required property 'field'" };
5100
6024
  if (vErrors === null) {
5101
- vErrors = [err109];
6025
+ vErrors = [err132];
5102
6026
  } else {
5103
- vErrors.push(err109);
6027
+ vErrors.push(err132);
5104
6028
  }
5105
6029
  errors++;
5106
6030
  }
5107
- for (const key8 in data) {
5108
- if (!(key8 === "type" || key8 === "field" || key8 === "value" || key8 === "tag")) {
5109
- const err110 = { instancePath, schemaPath: "#/oneOf/8/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key8 }, message: "must NOT have additional properties" };
6031
+ for (const key10 in data) {
6032
+ if (!(key10 === "type" || key10 === "field" || key10 === "value" || key10 === "tag")) {
6033
+ const err133 = { instancePath, schemaPath: "#/oneOf/10/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key10 }, message: "must NOT have additional properties" };
5110
6034
  if (vErrors === null) {
5111
- vErrors = [err110];
6035
+ vErrors = [err133];
5112
6036
  } else {
5113
- vErrors.push(err110);
6037
+ vErrors.push(err133);
5114
6038
  }
5115
6039
  errors++;
5116
6040
  }
5117
6041
  }
5118
6042
  if (data.type !== void 0) {
5119
6043
  if ("strip" !== data.type) {
5120
- const err111 = { instancePath: instancePath + "/type", schemaPath: "#/oneOf/8/properties/type/const", keyword: "const", params: { allowedValue: "strip" }, message: "must be equal to constant" };
6044
+ const err134 = { instancePath: instancePath + "/type", schemaPath: "#/oneOf/10/properties/type/const", keyword: "const", params: { allowedValue: "strip" }, message: "must be equal to constant" };
5121
6045
  if (vErrors === null) {
5122
- vErrors = [err111];
6046
+ vErrors = [err134];
5123
6047
  } else {
5124
- vErrors.push(err111);
6048
+ vErrors.push(err134);
5125
6049
  }
5126
6050
  errors++;
5127
6051
  }
5128
6052
  }
5129
6053
  if (data.field !== void 0) {
5130
- let data39 = data.field;
5131
- if (typeof data39 === "string") {
5132
- if (func3(data39) < 1) {
5133
- const err112 = { instancePath: instancePath + "/field", schemaPath: "#/definitions/text/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
6054
+ let data47 = data.field;
6055
+ if (typeof data47 === "string") {
6056
+ if (func3(data47) < 1) {
6057
+ const err135 = { instancePath: instancePath + "/field", schemaPath: "#/definitions/text/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
5134
6058
  if (vErrors === null) {
5135
- vErrors = [err112];
6059
+ vErrors = [err135];
5136
6060
  } else {
5137
- vErrors.push(err112);
6061
+ vErrors.push(err135);
5138
6062
  }
5139
6063
  errors++;
5140
6064
  }
5141
6065
  } else {
5142
- const err113 = { instancePath: instancePath + "/field", schemaPath: "#/definitions/text/type", keyword: "type", params: { type: "string" }, message: "must be string" };
6066
+ const err136 = { instancePath: instancePath + "/field", schemaPath: "#/definitions/text/type", keyword: "type", params: { type: "string" }, message: "must be string" };
5143
6067
  if (vErrors === null) {
5144
- vErrors = [err113];
6068
+ vErrors = [err136];
5145
6069
  } else {
5146
- vErrors.push(err113);
6070
+ vErrors.push(err136);
5147
6071
  }
5148
6072
  errors++;
5149
6073
  }
5150
6074
  }
5151
6075
  if (data.value !== void 0) {
5152
- let data40 = data.value;
5153
- if (typeof data40 === "string") {
5154
- if (func3(data40) < 1) {
5155
- const err114 = { instancePath: instancePath + "/value", schemaPath: "#/definitions/text/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
6076
+ let data48 = data.value;
6077
+ if (typeof data48 === "string") {
6078
+ if (func3(data48) < 1) {
6079
+ const err137 = { instancePath: instancePath + "/value", schemaPath: "#/definitions/text/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
5156
6080
  if (vErrors === null) {
5157
- vErrors = [err114];
6081
+ vErrors = [err137];
5158
6082
  } else {
5159
- vErrors.push(err114);
6083
+ vErrors.push(err137);
5160
6084
  }
5161
6085
  errors++;
5162
6086
  }
5163
6087
  } else {
5164
- const err115 = { instancePath: instancePath + "/value", schemaPath: "#/definitions/text/type", keyword: "type", params: { type: "string" }, message: "must be string" };
6088
+ const err138 = { instancePath: instancePath + "/value", schemaPath: "#/definitions/text/type", keyword: "type", params: { type: "string" }, message: "must be string" };
5165
6089
  if (vErrors === null) {
5166
- vErrors = [err115];
6090
+ vErrors = [err138];
5167
6091
  } else {
5168
- vErrors.push(err115);
6092
+ vErrors.push(err138);
5169
6093
  }
5170
6094
  errors++;
5171
6095
  }
5172
6096
  }
5173
6097
  if (data.tag !== void 0) {
5174
- let data41 = data.tag;
5175
- if (typeof data41 === "string") {
5176
- if (func3(data41) < 1) {
5177
- const err116 = { instancePath: instancePath + "/tag", schemaPath: "#/definitions/text/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
6098
+ let data49 = data.tag;
6099
+ if (typeof data49 === "string") {
6100
+ if (func3(data49) < 1) {
6101
+ const err139 = { instancePath: instancePath + "/tag", schemaPath: "#/definitions/text/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
5178
6102
  if (vErrors === null) {
5179
- vErrors = [err116];
6103
+ vErrors = [err139];
5180
6104
  } else {
5181
- vErrors.push(err116);
6105
+ vErrors.push(err139);
5182
6106
  }
5183
6107
  errors++;
5184
6108
  }
5185
6109
  } else {
5186
- const err117 = { instancePath: instancePath + "/tag", schemaPath: "#/definitions/text/type", keyword: "type", params: { type: "string" }, message: "must be string" };
6110
+ const err140 = { instancePath: instancePath + "/tag", schemaPath: "#/definitions/text/type", keyword: "type", params: { type: "string" }, message: "must be string" };
5187
6111
  if (vErrors === null) {
5188
- vErrors = [err117];
6112
+ vErrors = [err140];
5189
6113
  } else {
5190
- vErrors.push(err117);
6114
+ vErrors.push(err140);
5191
6115
  }
5192
6116
  errors++;
5193
6117
  }
5194
6118
  }
5195
6119
  } else {
5196
- const err118 = { instancePath, schemaPath: "#/oneOf/8/type", keyword: "type", params: { type: "object" }, message: "must be object" };
6120
+ const err141 = { instancePath, schemaPath: "#/oneOf/10/type", keyword: "type", params: { type: "object" }, message: "must be object" };
5197
6121
  if (vErrors === null) {
5198
- vErrors = [err118];
6122
+ vErrors = [err141];
5199
6123
  } else {
5200
- vErrors.push(err118);
6124
+ vErrors.push(err141);
5201
6125
  }
5202
6126
  errors++;
5203
6127
  }
5204
6128
  } else {
5205
- const err119 = { instancePath, schemaPath: "#/discriminator", keyword: "discriminator", params: { error: "mapping", tag: "type", tagValue: tag0 }, message: 'value of tag "type" must be in oneOf' };
6129
+ const err142 = { instancePath, schemaPath: "#/discriminator", keyword: "discriminator", params: { error: "mapping", tag: "type", tagValue: tag0 }, message: 'value of tag "type" must be in oneOf' };
5206
6130
  if (vErrors === null) {
5207
- vErrors = [err119];
6131
+ vErrors = [err142];
5208
6132
  } else {
5209
- vErrors.push(err119);
6133
+ vErrors.push(err142);
5210
6134
  }
5211
6135
  errors++;
5212
6136
  }
5213
6137
  } else {
5214
- const err120 = { instancePath, schemaPath: "#/discriminator", keyword: "discriminator", params: { error: "tag", tag: "type", tagValue: tag0 }, message: 'tag "type" must be string' };
6138
+ const err143 = { instancePath, schemaPath: "#/discriminator", keyword: "discriminator", params: { error: "tag", tag: "type", tagValue: tag0 }, message: 'tag "type" must be string' };
5215
6139
  if (vErrors === null) {
5216
- vErrors = [err120];
6140
+ vErrors = [err143];
5217
6141
  } else {
5218
- vErrors.push(err120);
6142
+ vErrors.push(err143);
5219
6143
  }
5220
6144
  errors++;
5221
6145
  }
5222
6146
  } else {
5223
- const err121 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
6147
+ const err144 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
5224
6148
  if (vErrors === null) {
5225
- vErrors = [err121];
6149
+ vErrors = [err144];
5226
6150
  } else {
5227
- vErrors.push(err121);
6151
+ vErrors.push(err144);
5228
6152
  }
5229
6153
  errors++;
5230
6154
  }
5231
- validate33.errors = vErrors;
6155
+ validate38.errors = vErrors;
5232
6156
  return errors === 0;
5233
6157
  }
5234
- function validate30(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
6158
+ function validate35(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
5235
6159
  let vErrors = null;
5236
6160
  let errors = 0;
5237
6161
  if (data && typeof data == "object" && !Array.isArray(data)) {
@@ -5353,8 +6277,8 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
5353
6277
  }
5354
6278
  const len0 = data3.length;
5355
6279
  for (let i0 = 0; i0 < len0; i0++) {
5356
- if (!validate31(data3[i0], { instancePath: instancePath + "/sources/" + i0, parentData: data3, parentDataProperty: i0, rootData })) {
5357
- vErrors = vErrors === null ? validate31.errors : vErrors.concat(validate31.errors);
6280
+ if (!validate36(data3[i0], { instancePath: instancePath + "/sources/" + i0, parentData: data3, parentDataProperty: i0, rootData })) {
6281
+ vErrors = vErrors === null ? validate36.errors : vErrors.concat(validate36.errors);
5358
6282
  errors = vErrors.length;
5359
6283
  }
5360
6284
  }
@@ -5373,8 +6297,8 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
5373
6297
  if (Array.isArray(data5)) {
5374
6298
  const len1 = data5.length;
5375
6299
  for (let i1 = 0; i1 < len1; i1++) {
5376
- if (!validate33(data5[i1], { instancePath: instancePath + "/events/" + i1, parentData: data5, parentDataProperty: i1, rootData })) {
5377
- vErrors = vErrors === null ? validate33.errors : vErrors.concat(validate33.errors);
6300
+ if (!validate38(data5[i1], { instancePath: instancePath + "/events/" + i1, parentData: data5, parentDataProperty: i1, rootData })) {
6301
+ vErrors = vErrors === null ? validate38.errors : vErrors.concat(validate38.errors);
5378
6302
  errors = vErrors.length;
5379
6303
  }
5380
6304
  }
@@ -5397,10 +6321,10 @@ function validate30(data, { instancePath = "", parentData, parentDataProperty, r
5397
6321
  }
5398
6322
  errors++;
5399
6323
  }
5400
- validate30.errors = vErrors;
6324
+ validate35.errors = vErrors;
5401
6325
  return errors === 0;
5402
6326
  }
5403
- function validate38(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
6327
+ function validate43(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
5404
6328
  let vErrors = null;
5405
6329
  let errors = 0;
5406
6330
  if (data && typeof data == "object" && !Array.isArray(data)) {
@@ -5478,10 +6402,10 @@ function validate38(data, { instancePath = "", parentData, parentDataProperty, r
5478
6402
  }
5479
6403
  errors++;
5480
6404
  }
5481
- validate38.errors = vErrors;
6405
+ validate43.errors = vErrors;
5482
6406
  return errors === 0;
5483
6407
  }
5484
- function validate41(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
6408
+ function validate46(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
5485
6409
  let vErrors = null;
5486
6410
  let errors = 0;
5487
6411
  if (data && typeof data == "object" && !Array.isArray(data)) {
@@ -5589,10 +6513,10 @@ function validate41(data, { instancePath = "", parentData, parentDataProperty, r
5589
6513
  }
5590
6514
  errors++;
5591
6515
  }
5592
- validate41.errors = vErrors;
6516
+ validate46.errors = vErrors;
5593
6517
  return errors === 0;
5594
6518
  }
5595
- function validate40(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
6519
+ function validate45(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
5596
6520
  let vErrors = null;
5597
6521
  let errors = 0;
5598
6522
  if (data && typeof data == "object" && !Array.isArray(data)) {
@@ -5630,8 +6554,8 @@ function validate40(data, { instancePath = "", parentData, parentDataProperty, r
5630
6554
  }
5631
6555
  const len0 = data0.length;
5632
6556
  for (let i0 = 0; i0 < len0; i0++) {
5633
- if (!validate41(data0[i0], { instancePath: instancePath + "/paths/" + i0, parentData: data0, parentDataProperty: i0, rootData })) {
5634
- vErrors = vErrors === null ? validate41.errors : vErrors.concat(validate41.errors);
6557
+ if (!validate46(data0[i0], { instancePath: instancePath + "/paths/" + i0, parentData: data0, parentDataProperty: i0, rootData })) {
6558
+ vErrors = vErrors === null ? validate46.errors : vErrors.concat(validate46.errors);
5635
6559
  errors = vErrors.length;
5636
6560
  }
5637
6561
  }
@@ -5654,10 +6578,10 @@ function validate40(data, { instancePath = "", parentData, parentDataProperty, r
5654
6578
  }
5655
6579
  errors++;
5656
6580
  }
5657
- validate40.errors = vErrors;
6581
+ validate45.errors = vErrors;
5658
6582
  return errors === 0;
5659
6583
  }
5660
- function validate45(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
6584
+ function validate50(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
5661
6585
  let vErrors = null;
5662
6586
  let errors = 0;
5663
6587
  if (data && typeof data == "object" && !Array.isArray(data)) {
@@ -5734,10 +6658,10 @@ function validate45(data, { instancePath = "", parentData, parentDataProperty, r
5734
6658
  }
5735
6659
  errors++;
5736
6660
  }
5737
- validate45.errors = vErrors;
6661
+ validate50.errors = vErrors;
5738
6662
  return errors === 0;
5739
6663
  }
5740
- function validate44(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
6664
+ function validate49(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
5741
6665
  let vErrors = null;
5742
6666
  let errors = 0;
5743
6667
  if (data && typeof data == "object" && !Array.isArray(data)) {
@@ -5775,8 +6699,8 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
5775
6699
  }
5776
6700
  const len0 = data0.length;
5777
6701
  for (let i0 = 0; i0 < len0; i0++) {
5778
- if (!validate45(data0[i0], { instancePath: instancePath + "/branches/" + i0, parentData: data0, parentDataProperty: i0, rootData })) {
5779
- vErrors = vErrors === null ? validate45.errors : vErrors.concat(validate45.errors);
6702
+ if (!validate50(data0[i0], { instancePath: instancePath + "/branches/" + i0, parentData: data0, parentDataProperty: i0, rootData })) {
6703
+ vErrors = vErrors === null ? validate50.errors : vErrors.concat(validate50.errors);
5780
6704
  errors = vErrors.length;
5781
6705
  }
5782
6706
  }
@@ -5799,11 +6723,11 @@ function validate44(data, { instancePath = "", parentData, parentDataProperty, r
5799
6723
  }
5800
6724
  errors++;
5801
6725
  }
5802
- validate44.errors = vErrors;
6726
+ validate49.errors = vErrors;
5803
6727
  return errors === 0;
5804
6728
  }
5805
- var pattern22 = new RegExp("^[0-9]+(\\.[0-9]+)?(ms|s|min|h|d)$", "u");
5806
- function validate49(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
6729
+ var pattern27 = new RegExp("^[0-9]+(\\.[0-9]+)?(ms|s|min|h|d)$", "u");
6730
+ function validate54(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
5807
6731
  let vErrors = null;
5808
6732
  let errors = 0;
5809
6733
  if (data && typeof data == "object" && !Array.isArray(data)) {
@@ -5870,7 +6794,7 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
5870
6794
  if (data.length !== void 0) {
5871
6795
  let data1 = data.length;
5872
6796
  if (typeof data1 === "string") {
5873
- if (!pattern22.test(data1)) {
6797
+ if (!pattern27.test(data1)) {
5874
6798
  const err6 = { instancePath: instancePath + "/length", schemaPath: "#/definitions/duration/pattern", keyword: "pattern", params: { pattern: "^[0-9]+(\\.[0-9]+)?(ms|s|min|h|d)$" }, message: 'must match pattern "^[0-9]+(\\.[0-9]+)?(ms|s|min|h|d)$"' };
5875
6799
  if (vErrors === null) {
5876
6800
  vErrors = [err6];
@@ -5944,10 +6868,10 @@ function validate49(data, { instancePath = "", parentData, parentDataProperty, r
5944
6868
  }
5945
6869
  errors++;
5946
6870
  }
5947
- validate49.errors = vErrors;
6871
+ validate54.errors = vErrors;
5948
6872
  return errors === 0;
5949
6873
  }
5950
- function validate51(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
6874
+ function validate56(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
5951
6875
  let vErrors = null;
5952
6876
  let errors = 0;
5953
6877
  if (data && typeof data == "object" && !Array.isArray(data)) {
@@ -6057,10 +6981,10 @@ function validate51(data, { instancePath = "", parentData, parentDataProperty, r
6057
6981
  }
6058
6982
  errors++;
6059
6983
  }
6060
- validate51.errors = vErrors;
6984
+ validate56.errors = vErrors;
6061
6985
  return errors === 0;
6062
6986
  }
6063
- function validate53(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
6987
+ function validate58(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
6064
6988
  let vErrors = null;
6065
6989
  let errors = 0;
6066
6990
  if (data && typeof data == "object" && !Array.isArray(data)) {
@@ -6140,7 +7064,7 @@ function validate53(data, { instancePath = "", parentData, parentDataProperty, r
6140
7064
  if (data.color !== void 0) {
6141
7065
  let data2 = data.color;
6142
7066
  if (!(data2 === "blue" || data2 === "amber" || data2 === "green" || data2 === "violet" || data2 === "rose" || data2 === "slate" || data2 === "coin")) {
6143
- const err7 = { instancePath: instancePath + "/color", schemaPath: "#/definitions/color/enum", keyword: "enum", params: { allowedValues: schema45.enum }, message: "must be equal to one of the allowed values" };
7067
+ const err7 = { instancePath: instancePath + "/color", schemaPath: "#/definitions/color/enum", keyword: "enum", params: { allowedValues: schema57.enum }, message: "must be equal to one of the allowed values" };
6144
7068
  if (vErrors === null) {
6145
7069
  vErrors = [err7];
6146
7070
  } else {
@@ -6195,10 +7119,10 @@ function validate53(data, { instancePath = "", parentData, parentDataProperty, r
6195
7119
  }
6196
7120
  errors++;
6197
7121
  }
6198
- validate53.errors = vErrors;
7122
+ validate58.errors = vErrors;
6199
7123
  return errors === 0;
6200
7124
  }
6201
- function validate55(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
7125
+ function validate60(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
6202
7126
  let vErrors = null;
6203
7127
  let errors = 0;
6204
7128
  if (data && typeof data == "object" && !Array.isArray(data)) {
@@ -6285,10 +7209,10 @@ function validate55(data, { instancePath = "", parentData, parentDataProperty, r
6285
7209
  }
6286
7210
  errors++;
6287
7211
  }
6288
- validate55.errors = vErrors;
7212
+ validate60.errors = vErrors;
6289
7213
  return errors === 0;
6290
7214
  }
6291
- function validate57(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
7215
+ function validate62(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
6292
7216
  let vErrors = null;
6293
7217
  let errors = 0;
6294
7218
  if (data && typeof data == "object" && !Array.isArray(data)) {
@@ -6376,10 +7300,10 @@ function validate57(data, { instancePath = "", parentData, parentDataProperty, r
6376
7300
  }
6377
7301
  errors++;
6378
7302
  }
6379
- validate57.errors = vErrors;
7303
+ validate62.errors = vErrors;
6380
7304
  return errors === 0;
6381
7305
  }
6382
- function validate48(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
7306
+ function validate53(data, { instancePath = "", parentData, parentDataProperty, rootData = data } = {}) {
6383
7307
  let vErrors = null;
6384
7308
  let errors = 0;
6385
7309
  if (data && typeof data == "object" && !Array.isArray(data)) {
@@ -6413,14 +7337,14 @@ function validate48(data, { instancePath = "", parentData, parentDataProperty, r
6413
7337
  }
6414
7338
  }
6415
7339
  if (data.scale !== void 0) {
6416
- if (!validate49(data.scale, { instancePath: instancePath + "/scale", parentData: data, parentDataProperty: "scale", rootData })) {
6417
- vErrors = vErrors === null ? validate49.errors : vErrors.concat(validate49.errors);
7340
+ if (!validate54(data.scale, { instancePath: instancePath + "/scale", parentData: data, parentDataProperty: "scale", rootData })) {
7341
+ vErrors = vErrors === null ? validate54.errors : vErrors.concat(validate54.errors);
6418
7342
  errors = vErrors.length;
6419
7343
  }
6420
7344
  }
6421
7345
  if (data.period !== void 0) {
6422
- if (!validate51(data.period, { instancePath: instancePath + "/period", parentData: data, parentDataProperty: "period", rootData })) {
6423
- vErrors = vErrors === null ? validate51.errors : vErrors.concat(validate51.errors);
7346
+ if (!validate56(data.period, { instancePath: instancePath + "/period", parentData: data, parentDataProperty: "period", rootData })) {
7347
+ vErrors = vErrors === null ? validate56.errors : vErrors.concat(validate56.errors);
6424
7348
  errors = vErrors.length;
6425
7349
  }
6426
7350
  }
@@ -6438,8 +7362,8 @@ function validate48(data, { instancePath = "", parentData, parentDataProperty, r
6438
7362
  }
6439
7363
  const len0 = data2.length;
6440
7364
  for (let i0 = 0; i0 < len0; i0++) {
6441
- if (!validate53(data2[i0], { instancePath: instancePath + "/rows/" + i0, parentData: data2, parentDataProperty: i0, rootData })) {
6442
- vErrors = vErrors === null ? validate53.errors : vErrors.concat(validate53.errors);
7365
+ if (!validate58(data2[i0], { instancePath: instancePath + "/rows/" + i0, parentData: data2, parentDataProperty: i0, rootData })) {
7366
+ vErrors = vErrors === null ? validate58.errors : vErrors.concat(validate58.errors);
6443
7367
  errors = vErrors.length;
6444
7368
  }
6445
7369
  }
@@ -6458,8 +7382,8 @@ function validate48(data, { instancePath = "", parentData, parentDataProperty, r
6458
7382
  if (Array.isArray(data4)) {
6459
7383
  const len1 = data4.length;
6460
7384
  for (let i1 = 0; i1 < len1; i1++) {
6461
- if (!validate55(data4[i1], { instancePath: instancePath + "/points/" + i1, parentData: data4, parentDataProperty: i1, rootData })) {
6462
- vErrors = vErrors === null ? validate55.errors : vErrors.concat(validate55.errors);
7385
+ if (!validate60(data4[i1], { instancePath: instancePath + "/points/" + i1, parentData: data4, parentDataProperty: i1, rootData })) {
7386
+ vErrors = vErrors === null ? validate60.errors : vErrors.concat(validate60.errors);
6463
7387
  errors = vErrors.length;
6464
7388
  }
6465
7389
  }
@@ -6474,8 +7398,8 @@ function validate48(data, { instancePath = "", parentData, parentDataProperty, r
6474
7398
  }
6475
7399
  }
6476
7400
  if (data.zoom !== void 0) {
6477
- if (!validate57(data.zoom, { instancePath: instancePath + "/zoom", parentData: data, parentDataProperty: "zoom", rootData })) {
6478
- vErrors = vErrors === null ? validate57.errors : vErrors.concat(validate57.errors);
7401
+ if (!validate62(data.zoom, { instancePath: instancePath + "/zoom", parentData: data, parentDataProperty: "zoom", rootData })) {
7402
+ vErrors = vErrors === null ? validate62.errors : vErrors.concat(validate62.errors);
6479
7403
  errors = vErrors.length;
6480
7404
  }
6481
7405
  }
@@ -6488,7 +7412,7 @@ function validate48(data, { instancePath = "", parentData, parentDataProperty, r
6488
7412
  }
6489
7413
  errors++;
6490
7414
  }
6491
- validate48.errors = vErrors;
7415
+ validate53.errors = vErrors;
6492
7416
  return errors === 0;
6493
7417
  }
6494
7418
  var func2 = Object.prototype.hasOwnProperty;
@@ -6872,84 +7796,35 @@ function validate10(data, { instancePath = "", parentData, parentDataProperty, r
6872
7796
  errors++;
6873
7797
  }
6874
7798
  if (data.steps !== void 0) {
6875
- let data22 = data.steps;
6876
- if (Array.isArray(data22)) {
6877
- const len1 = data22.length;
6878
- for (let i1 = 0; i1 < len1; i1++) {
6879
- let data23 = data22[i1];
6880
- if (data23 && typeof data23 == "object" && !Array.isArray(data23)) {
6881
- if (data23.events !== void 0) {
6882
- let data24 = data23.events;
6883
- if (Array.isArray(data24)) {
6884
- const len2 = data24.length;
6885
- for (let i2 = 0; i2 < len2; i2++) {
6886
- let data25 = data24[i2];
6887
- if (data25 && typeof data25 == "object" && !Array.isArray(data25)) {
6888
- if (data25.type !== void 0) {
6889
- let data26 = data25.type;
6890
- const _errs62 = errors;
6891
- const _errs63 = errors;
6892
- if (!(data26 === "commit" || data26 === "branch")) {
6893
- const err23 = {};
6894
- if (vErrors === null) {
6895
- vErrors = [err23];
6896
- } else {
6897
- vErrors.push(err23);
6898
- }
6899
- errors++;
6900
- }
6901
- var valid31 = _errs63 === errors;
6902
- if (valid31) {
6903
- const err24 = { instancePath: instancePath + "/steps/" + i1 + "/events/" + i2 + "/type", schemaPath: "#/definitions/timeSteps/items/properties/events/items/properties/type/not", keyword: "not", params: {}, message: "must NOT be valid" };
6904
- if (vErrors === null) {
6905
- vErrors = [err24];
6906
- } else {
6907
- vErrors.push(err24);
6908
- }
6909
- errors++;
6910
- } else {
6911
- errors = _errs62;
6912
- if (vErrors !== null) {
6913
- if (_errs62) {
6914
- vErrors.length = _errs62;
6915
- } else {
6916
- vErrors = null;
6917
- }
6918
- }
6919
- }
6920
- }
6921
- }
6922
- }
6923
- }
6924
- }
6925
- }
6926
- }
7799
+ if (!validate20(data.steps, { instancePath: instancePath + "/steps", parentData: data, parentDataProperty: "steps", rootData })) {
7800
+ vErrors = vErrors === null ? validate20.errors : vErrors.concat(validate20.errors);
7801
+ errors = vErrors.length;
6927
7802
  }
6928
7803
  }
6929
7804
  if (data.state !== void 0) {
6930
- const err25 = { instancePath: instancePath + "/state", schemaPath: "#/definitions/absent/not", keyword: "not", params: {}, message: "must NOT be valid" };
7805
+ const err23 = { instancePath: instancePath + "/state", schemaPath: "#/definitions/absent/not", keyword: "not", params: {}, message: "must NOT be valid" };
6931
7806
  if (vErrors === null) {
6932
- vErrors = [err25];
7807
+ vErrors = [err23];
6933
7808
  } else {
6934
- vErrors.push(err25);
7809
+ vErrors.push(err23);
6935
7810
  }
6936
7811
  errors++;
6937
7812
  }
6938
7813
  if (data.git !== void 0) {
6939
- const err26 = { instancePath: instancePath + "/git", schemaPath: "#/definitions/absent/not", keyword: "not", params: {}, message: "must NOT be valid" };
7814
+ const err24 = { instancePath: instancePath + "/git", schemaPath: "#/definitions/absent/not", keyword: "not", params: {}, message: "must NOT be valid" };
6940
7815
  if (vErrors === null) {
6941
- vErrors = [err26];
7816
+ vErrors = [err24];
6942
7817
  } else {
6943
- vErrors.push(err26);
7818
+ vErrors.push(err24);
6944
7819
  }
6945
7820
  errors++;
6946
7821
  }
6947
7822
  if (data.regions !== void 0) {
6948
- const err27 = { instancePath: instancePath + "/regions", schemaPath: "#/definitions/absent/not", keyword: "not", params: {}, message: "must NOT be valid" };
7823
+ const err25 = { instancePath: instancePath + "/regions", schemaPath: "#/definitions/absent/not", keyword: "not", params: {}, message: "must NOT be valid" };
6949
7824
  if (vErrors === null) {
6950
- vErrors = [err27];
7825
+ vErrors = [err25];
6951
7826
  } else {
6952
- vErrors.push(err27);
7827
+ vErrors.push(err25);
6953
7828
  }
6954
7829
  errors++;
6955
7830
  }
@@ -6958,72 +7833,178 @@ function validate10(data, { instancePath = "", parentData, parentDataProperty, r
6958
7833
  valid21 = _valid3;
6959
7834
  ifClause3 = "then";
6960
7835
  } else {
6961
- const _errs73 = errors;
7836
+ const _errs66 = errors;
7837
+ const _errs67 = errors;
7838
+ let valid27 = true;
7839
+ const _errs68 = errors;
6962
7840
  if (data && typeof data == "object" && !Array.isArray(data)) {
6963
- if (data.boxes !== void 0) {
6964
- let data30 = data.boxes;
6965
- if (Array.isArray(data30)) {
6966
- if (data30.length < 1) {
6967
- const err28 = { instancePath: instancePath + "/boxes", schemaPath: "#/else/else/else/else/properties/boxes/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
7841
+ if (data.kind === void 0 && ("kind")) {
7842
+ const err26 = {};
7843
+ if (vErrors === null) {
7844
+ vErrors = [err26];
7845
+ } else {
7846
+ vErrors.push(err26);
7847
+ }
7848
+ errors++;
7849
+ } else {
7850
+ if (data.kind !== void 0) {
7851
+ if ("tree" !== data.kind) {
7852
+ const err27 = {};
6968
7853
  if (vErrors === null) {
6969
- vErrors = [err28];
7854
+ vErrors = [err27];
6970
7855
  } else {
6971
- vErrors.push(err28);
7856
+ vErrors.push(err27);
6972
7857
  }
6973
7858
  errors++;
6974
7859
  }
6975
7860
  }
6976
7861
  }
6977
- if (data.steps !== void 0) {
6978
- if (!validate11(data.steps, { instancePath: instancePath + "/steps", parentData: data, parentDataProperty: "steps", rootData })) {
6979
- vErrors = vErrors === null ? validate11.errors : vErrors.concat(validate11.errors);
6980
- errors = vErrors.length;
6981
- }
7862
+ }
7863
+ var _valid4 = _errs68 === errors;
7864
+ errors = _errs67;
7865
+ if (vErrors !== null) {
7866
+ if (_errs67) {
7867
+ vErrors.length = _errs67;
7868
+ } else {
7869
+ vErrors = null;
6982
7870
  }
6983
- if (data.strip !== void 0) {
6984
- if (!validate13(data.strip, { instancePath: instancePath + "/strip", parentData: data, parentDataProperty: "strip", rootData })) {
6985
- vErrors = vErrors === null ? validate13.errors : vErrors.concat(validate13.errors);
6986
- errors = vErrors.length;
7871
+ }
7872
+ let ifClause4;
7873
+ if (_valid4) {
7874
+ const _errs70 = errors;
7875
+ if (data && typeof data == "object" && !Array.isArray(data)) {
7876
+ if (data.steps !== void 0) {
7877
+ if (!validate22(data.steps, { instancePath: instancePath + "/steps", parentData: data, parentDataProperty: "steps", rootData })) {
7878
+ vErrors = vErrors === null ? validate22.errors : vErrors.concat(validate22.errors);
7879
+ errors = vErrors.length;
7880
+ }
6987
7881
  }
6988
- }
6989
- if (data.state !== void 0) {
6990
- const err29 = { instancePath: instancePath + "/state", schemaPath: "#/definitions/absent/not", keyword: "not", params: {}, message: "must NOT be valid" };
6991
- if (vErrors === null) {
6992
- vErrors = [err29];
6993
- } else {
6994
- vErrors.push(err29);
7882
+ if (data.strip !== void 0) {
7883
+ if (!validate13(data.strip, { instancePath: instancePath + "/strip", parentData: data, parentDataProperty: "strip", rootData })) {
7884
+ vErrors = vErrors === null ? validate13.errors : vErrors.concat(validate13.errors);
7885
+ errors = vErrors.length;
7886
+ }
6995
7887
  }
6996
- errors++;
6997
- }
6998
- if (data.git !== void 0) {
6999
- const err30 = { instancePath: instancePath + "/git", schemaPath: "#/definitions/absent/not", keyword: "not", params: {}, message: "must NOT be valid" };
7000
- if (vErrors === null) {
7001
- vErrors = [err30];
7002
- } else {
7003
- vErrors.push(err30);
7888
+ if (data.state !== void 0) {
7889
+ const err28 = { instancePath: instancePath + "/state", schemaPath: "#/definitions/absent/not", keyword: "not", params: {}, message: "must NOT be valid" };
7890
+ if (vErrors === null) {
7891
+ vErrors = [err28];
7892
+ } else {
7893
+ vErrors.push(err28);
7894
+ }
7895
+ errors++;
7896
+ }
7897
+ if (data.git !== void 0) {
7898
+ const err29 = { instancePath: instancePath + "/git", schemaPath: "#/definitions/absent/not", keyword: "not", params: {}, message: "must NOT be valid" };
7899
+ if (vErrors === null) {
7900
+ vErrors = [err29];
7901
+ } else {
7902
+ vErrors.push(err29);
7903
+ }
7904
+ errors++;
7905
+ }
7906
+ if (data.time !== void 0) {
7907
+ const err30 = { instancePath: instancePath + "/time", schemaPath: "#/definitions/absent/not", keyword: "not", params: {}, message: "must NOT be valid" };
7908
+ if (vErrors === null) {
7909
+ vErrors = [err30];
7910
+ } else {
7911
+ vErrors.push(err30);
7912
+ }
7913
+ errors++;
7914
+ }
7915
+ if (data.regions !== void 0) {
7916
+ const err31 = { instancePath: instancePath + "/regions", schemaPath: "#/definitions/absent/not", keyword: "not", params: {}, message: "must NOT be valid" };
7917
+ if (vErrors === null) {
7918
+ vErrors = [err31];
7919
+ } else {
7920
+ vErrors.push(err31);
7921
+ }
7922
+ errors++;
7004
7923
  }
7005
- errors++;
7006
7924
  }
7007
- if (data.time !== void 0) {
7008
- const err31 = { instancePath: instancePath + "/time", schemaPath: "#/definitions/absent/not", keyword: "not", params: {}, message: "must NOT be valid" };
7009
- if (vErrors === null) {
7010
- vErrors = [err31];
7011
- } else {
7012
- vErrors.push(err31);
7925
+ var _valid4 = _errs70 === errors;
7926
+ valid27 = _valid4;
7927
+ ifClause4 = "then";
7928
+ } else {
7929
+ const _errs85 = errors;
7930
+ if (data && typeof data == "object" && !Array.isArray(data)) {
7931
+ if (data.boxes !== void 0) {
7932
+ let data33 = data.boxes;
7933
+ if (Array.isArray(data33)) {
7934
+ if (data33.length < 1) {
7935
+ const err32 = { instancePath: instancePath + "/boxes", schemaPath: "#/else/else/else/else/else/properties/boxes/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
7936
+ if (vErrors === null) {
7937
+ vErrors = [err32];
7938
+ } else {
7939
+ vErrors.push(err32);
7940
+ }
7941
+ errors++;
7942
+ }
7943
+ }
7013
7944
  }
7014
- errors++;
7945
+ if (data.steps !== void 0) {
7946
+ if (!validate11(data.steps, { instancePath: instancePath + "/steps", parentData: data, parentDataProperty: "steps", rootData })) {
7947
+ vErrors = vErrors === null ? validate11.errors : vErrors.concat(validate11.errors);
7948
+ errors = vErrors.length;
7949
+ }
7950
+ }
7951
+ if (data.strip !== void 0) {
7952
+ if (!validate13(data.strip, { instancePath: instancePath + "/strip", parentData: data, parentDataProperty: "strip", rootData })) {
7953
+ vErrors = vErrors === null ? validate13.errors : vErrors.concat(validate13.errors);
7954
+ errors = vErrors.length;
7955
+ }
7956
+ }
7957
+ if (data.state !== void 0) {
7958
+ const err33 = { instancePath: instancePath + "/state", schemaPath: "#/definitions/absent/not", keyword: "not", params: {}, message: "must NOT be valid" };
7959
+ if (vErrors === null) {
7960
+ vErrors = [err33];
7961
+ } else {
7962
+ vErrors.push(err33);
7963
+ }
7964
+ errors++;
7965
+ }
7966
+ if (data.git !== void 0) {
7967
+ const err34 = { instancePath: instancePath + "/git", schemaPath: "#/definitions/absent/not", keyword: "not", params: {}, message: "must NOT be valid" };
7968
+ if (vErrors === null) {
7969
+ vErrors = [err34];
7970
+ } else {
7971
+ vErrors.push(err34);
7972
+ }
7973
+ errors++;
7974
+ }
7975
+ if (data.time !== void 0) {
7976
+ const err35 = { instancePath: instancePath + "/time", schemaPath: "#/definitions/absent/not", keyword: "not", params: {}, message: "must NOT be valid" };
7977
+ if (vErrors === null) {
7978
+ vErrors = [err35];
7979
+ } else {
7980
+ vErrors.push(err35);
7981
+ }
7982
+ errors++;
7983
+ }
7984
+ }
7985
+ var _valid4 = _errs85 === errors;
7986
+ valid27 = _valid4;
7987
+ ifClause4 = "else";
7988
+ }
7989
+ if (!valid27) {
7990
+ const err36 = { instancePath, schemaPath: "#/else/else/else/else/if", keyword: "if", params: { failingKeyword: ifClause4 }, message: 'must match "' + ifClause4 + '" schema' };
7991
+ if (vErrors === null) {
7992
+ vErrors = [err36];
7993
+ } else {
7994
+ vErrors.push(err36);
7015
7995
  }
7996
+ errors++;
7016
7997
  }
7017
- var _valid3 = _errs73 === errors;
7998
+ var _valid3 = _errs66 === errors;
7018
7999
  valid21 = _valid3;
7019
8000
  ifClause3 = "else";
7020
8001
  }
7021
8002
  if (!valid21) {
7022
- const err32 = { instancePath, schemaPath: "#/else/else/else/if", keyword: "if", params: { failingKeyword: ifClause3 }, message: 'must match "' + ifClause3 + '" schema' };
8003
+ const err37 = { instancePath, schemaPath: "#/else/else/else/if", keyword: "if", params: { failingKeyword: ifClause3 }, message: 'must match "' + ifClause3 + '" schema' };
7023
8004
  if (vErrors === null) {
7024
- vErrors = [err32];
8005
+ vErrors = [err37];
7025
8006
  } else {
7026
- vErrors.push(err32);
8007
+ vErrors.push(err37);
7027
8008
  }
7028
8009
  errors++;
7029
8010
  }
@@ -7032,11 +8013,11 @@ function validate10(data, { instancePath = "", parentData, parentDataProperty, r
7032
8013
  ifClause2 = "else";
7033
8014
  }
7034
8015
  if (!valid15) {
7035
- const err33 = { instancePath, schemaPath: "#/else/else/if", keyword: "if", params: { failingKeyword: ifClause2 }, message: 'must match "' + ifClause2 + '" schema' };
8016
+ const err38 = { instancePath, schemaPath: "#/else/else/if", keyword: "if", params: { failingKeyword: ifClause2 }, message: 'must match "' + ifClause2 + '" schema' };
7036
8017
  if (vErrors === null) {
7037
- vErrors = [err33];
8018
+ vErrors = [err38];
7038
8019
  } else {
7039
- vErrors.push(err33);
8020
+ vErrors.push(err38);
7040
8021
  }
7041
8022
  errors++;
7042
8023
  }
@@ -7045,21 +8026,21 @@ function validate10(data, { instancePath = "", parentData, parentDataProperty, r
7045
8026
  ifClause1 = "else";
7046
8027
  }
7047
8028
  if (!valid6) {
7048
- const err34 = { instancePath, schemaPath: "#/else/if", keyword: "if", params: { failingKeyword: ifClause1 }, message: 'must match "' + ifClause1 + '" schema' };
8029
+ const err39 = { instancePath, schemaPath: "#/else/if", keyword: "if", params: { failingKeyword: ifClause1 }, message: 'must match "' + ifClause1 + '" schema' };
7049
8030
  if (vErrors === null) {
7050
- vErrors = [err34];
8031
+ vErrors = [err39];
7051
8032
  } else {
7052
- vErrors.push(err34);
8033
+ vErrors.push(err39);
7053
8034
  }
7054
8035
  errors++;
7055
8036
  }
7056
8037
  if (data && typeof data == "object" && !Array.isArray(data)) {
7057
8038
  if (data.sequence !== void 0) {
7058
- const err35 = { instancePath: instancePath + "/sequence", schemaPath: "#/definitions/absent/not", keyword: "not", params: {}, message: "must NOT be valid" };
8039
+ const err40 = { instancePath: instancePath + "/sequence", schemaPath: "#/definitions/absent/not", keyword: "not", params: {}, message: "must NOT be valid" };
7059
8040
  if (vErrors === null) {
7060
- vErrors = [err35];
8041
+ vErrors = [err40];
7061
8042
  } else {
7062
- vErrors.push(err35);
8043
+ vErrors.push(err40);
7063
8044
  }
7064
8045
  errors++;
7065
8046
  }
@@ -7069,245 +8050,245 @@ function validate10(data, { instancePath = "", parentData, parentDataProperty, r
7069
8050
  ifClause0 = "else";
7070
8051
  }
7071
8052
  if (!valid0) {
7072
- const err36 = { instancePath, schemaPath: "#/if", keyword: "if", params: { failingKeyword: ifClause0 }, message: 'must match "' + ifClause0 + '" schema' };
8053
+ const err41 = { instancePath, schemaPath: "#/if", keyword: "if", params: { failingKeyword: ifClause0 }, message: 'must match "' + ifClause0 + '" schema' };
7073
8054
  if (vErrors === null) {
7074
- vErrors = [err36];
8055
+ vErrors = [err41];
7075
8056
  } else {
7076
- vErrors.push(err36);
8057
+ vErrors.push(err41);
7077
8058
  }
7078
8059
  errors++;
7079
8060
  }
7080
8061
  if (data && typeof data == "object" && !Array.isArray(data)) {
7081
8062
  if (data.version === void 0) {
7082
- const err37 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "version" }, message: "must have required property 'version'" };
8063
+ const err42 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "version" }, message: "must have required property 'version'" };
7083
8064
  if (vErrors === null) {
7084
- vErrors = [err37];
8065
+ vErrors = [err42];
7085
8066
  } else {
7086
- vErrors.push(err37);
8067
+ vErrors.push(err42);
7087
8068
  }
7088
8069
  errors++;
7089
8070
  }
7090
8071
  if (data.kind === void 0) {
7091
- const err38 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "kind" }, message: "must have required property 'kind'" };
8072
+ const err43 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "kind" }, message: "must have required property 'kind'" };
7092
8073
  if (vErrors === null) {
7093
- vErrors = [err38];
8074
+ vErrors = [err43];
7094
8075
  } else {
7095
- vErrors.push(err38);
8076
+ vErrors.push(err43);
7096
8077
  }
7097
8078
  errors++;
7098
8079
  }
7099
8080
  if (data.title === void 0) {
7100
- const err39 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "title" }, message: "must have required property 'title'" };
8081
+ const err44 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "title" }, message: "must have required property 'title'" };
7101
8082
  if (vErrors === null) {
7102
- vErrors = [err39];
8083
+ vErrors = [err44];
7103
8084
  } else {
7104
- vErrors.push(err39);
8085
+ vErrors.push(err44);
7105
8086
  }
7106
8087
  errors++;
7107
8088
  }
7108
8089
  if (data.boxes === void 0) {
7109
- const err40 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "boxes" }, message: "must have required property 'boxes'" };
8090
+ const err45 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "boxes" }, message: "must have required property 'boxes'" };
7110
8091
  if (vErrors === null) {
7111
- vErrors = [err40];
8092
+ vErrors = [err45];
7112
8093
  } else {
7113
- vErrors.push(err40);
8094
+ vErrors.push(err45);
7114
8095
  }
7115
8096
  errors++;
7116
8097
  }
7117
8098
  if (data.steps === void 0) {
7118
- const err41 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "steps" }, message: "must have required property 'steps'" };
8099
+ const err46 = { instancePath, schemaPath: "#/required", keyword: "required", params: { missingProperty: "steps" }, message: "must have required property 'steps'" };
7119
8100
  if (vErrors === null) {
7120
- vErrors = [err41];
8101
+ vErrors = [err46];
7121
8102
  } else {
7122
- vErrors.push(err41);
8103
+ vErrors.push(err46);
7123
8104
  }
7124
8105
  errors++;
7125
8106
  }
7126
8107
  for (const key0 in data) {
7127
8108
  if (!func2.call(schema11.properties, key0)) {
7128
- const err42 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
8109
+ const err47 = { instancePath, schemaPath: "#/additionalProperties", keyword: "additionalProperties", params: { additionalProperty: key0 }, message: "must NOT have additional properties" };
7129
8110
  if (vErrors === null) {
7130
- vErrors = [err42];
8111
+ vErrors = [err47];
7131
8112
  } else {
7132
- vErrors.push(err42);
8113
+ vErrors.push(err47);
7133
8114
  }
7134
8115
  errors++;
7135
8116
  }
7136
8117
  }
7137
8118
  if (data.version !== void 0) {
7138
- let data37 = data.version;
7139
- if (!(typeof data37 == "number" && (!(data37 % 1) && !isNaN(data37)) && isFinite(data37))) {
7140
- const err43 = { instancePath: instancePath + "/version", schemaPath: "#/properties/version/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
8119
+ let data40 = data.version;
8120
+ if (!(typeof data40 == "number" && (!(data40 % 1) && !isNaN(data40)) && isFinite(data40))) {
8121
+ const err48 = { instancePath: instancePath + "/version", schemaPath: "#/properties/version/type", keyword: "type", params: { type: "integer" }, message: "must be integer" };
7141
8122
  if (vErrors === null) {
7142
- vErrors = [err43];
8123
+ vErrors = [err48];
7143
8124
  } else {
7144
- vErrors.push(err43);
8125
+ vErrors.push(err48);
7145
8126
  }
7146
8127
  errors++;
7147
8128
  }
7148
- if (typeof data37 == "number" && isFinite(data37)) {
7149
- if (data37 < 1 || isNaN(data37)) {
7150
- const err44 = { instancePath: instancePath + "/version", schemaPath: "#/properties/version/minimum", keyword: "minimum", params: { comparison: ">=", limit: 1 }, message: "must be >= 1" };
8129
+ if (typeof data40 == "number" && isFinite(data40)) {
8130
+ if (data40 < 1 || isNaN(data40)) {
8131
+ const err49 = { instancePath: instancePath + "/version", schemaPath: "#/properties/version/minimum", keyword: "minimum", params: { comparison: ">=", limit: 1 }, message: "must be >= 1" };
7151
8132
  if (vErrors === null) {
7152
- vErrors = [err44];
8133
+ vErrors = [err49];
7153
8134
  } else {
7154
- vErrors.push(err44);
8135
+ vErrors.push(err49);
7155
8136
  }
7156
8137
  errors++;
7157
8138
  }
7158
8139
  }
7159
8140
  }
7160
8141
  if (data.kind !== void 0) {
7161
- let data38 = data.kind;
7162
- if (!(data38 === "sequence" || data38 === "architecture" || data38 === "state" || data38 === "git" || data38 === "time")) {
7163
- const err45 = { instancePath: instancePath + "/kind", schemaPath: "#/properties/kind/enum", keyword: "enum", params: { allowedValues: schema11.properties.kind.enum }, message: "must be equal to one of the allowed values" };
8142
+ let data41 = data.kind;
8143
+ if (!(data41 === "sequence" || data41 === "architecture" || data41 === "state" || data41 === "git" || data41 === "time" || data41 === "tree")) {
8144
+ const err50 = { instancePath: instancePath + "/kind", schemaPath: "#/properties/kind/enum", keyword: "enum", params: { allowedValues: schema11.properties.kind.enum }, message: "must be equal to one of the allowed values" };
7164
8145
  if (vErrors === null) {
7165
- vErrors = [err45];
8146
+ vErrors = [err50];
7166
8147
  } else {
7167
- vErrors.push(err45);
8148
+ vErrors.push(err50);
7168
8149
  }
7169
8150
  errors++;
7170
8151
  }
7171
8152
  }
7172
8153
  if (data.title !== void 0) {
7173
- let data39 = data.title;
7174
- if (typeof data39 === "string") {
7175
- if (func3(data39) < 1) {
7176
- const err46 = { instancePath: instancePath + "/title", schemaPath: "#/definitions/text/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
8154
+ let data42 = data.title;
8155
+ if (typeof data42 === "string") {
8156
+ if (func3(data42) < 1) {
8157
+ const err51 = { instancePath: instancePath + "/title", schemaPath: "#/definitions/text/minLength", keyword: "minLength", params: { limit: 1 }, message: "must NOT have fewer than 1 characters" };
7177
8158
  if (vErrors === null) {
7178
- vErrors = [err46];
8159
+ vErrors = [err51];
7179
8160
  } else {
7180
- vErrors.push(err46);
8161
+ vErrors.push(err51);
7181
8162
  }
7182
8163
  errors++;
7183
8164
  }
7184
8165
  } else {
7185
- const err47 = { instancePath: instancePath + "/title", schemaPath: "#/definitions/text/type", keyword: "type", params: { type: "string" }, message: "must be string" };
8166
+ const err52 = { instancePath: instancePath + "/title", schemaPath: "#/definitions/text/type", keyword: "type", params: { type: "string" }, message: "must be string" };
7186
8167
  if (vErrors === null) {
7187
- vErrors = [err47];
8168
+ vErrors = [err52];
7188
8169
  } else {
7189
- vErrors.push(err47);
8170
+ vErrors.push(err52);
7190
8171
  }
7191
8172
  errors++;
7192
8173
  }
7193
8174
  }
7194
8175
  if (data.view !== void 0) {
7195
- let data40 = data.view;
7196
- if (!(data40 === "fixed" || data40 === "follow")) {
7197
- const err48 = { instancePath: instancePath + "/view", schemaPath: "#/properties/view/enum", keyword: "enum", params: { allowedValues: schema11.properties.view.enum }, message: "must be equal to one of the allowed values" };
8176
+ let data43 = data.view;
8177
+ if (!(data43 === "fixed" || data43 === "follow")) {
8178
+ const err53 = { instancePath: instancePath + "/view", schemaPath: "#/properties/view/enum", keyword: "enum", params: { allowedValues: schema11.properties.view.enum }, message: "must be equal to one of the allowed values" };
7198
8179
  if (vErrors === null) {
7199
- vErrors = [err48];
8180
+ vErrors = [err53];
7200
8181
  } else {
7201
- vErrors.push(err48);
8182
+ vErrors.push(err53);
7202
8183
  }
7203
8184
  errors++;
7204
8185
  }
7205
8186
  }
7206
8187
  if (data.regions !== void 0) {
7207
- let data41 = data.regions;
7208
- if (Array.isArray(data41)) {
7209
- const len3 = data41.length;
7210
- for (let i3 = 0; i3 < len3; i3++) {
7211
- if (!validate22(data41[i3], { instancePath: instancePath + "/regions/" + i3, parentData: data41, parentDataProperty: i3, rootData })) {
7212
- vErrors = vErrors === null ? validate22.errors : vErrors.concat(validate22.errors);
8188
+ let data44 = data.regions;
8189
+ if (Array.isArray(data44)) {
8190
+ const len1 = data44.length;
8191
+ for (let i1 = 0; i1 < len1; i1++) {
8192
+ if (!validate27(data44[i1], { instancePath: instancePath + "/regions/" + i1, parentData: data44, parentDataProperty: i1, rootData })) {
8193
+ vErrors = vErrors === null ? validate27.errors : vErrors.concat(validate27.errors);
7213
8194
  errors = vErrors.length;
7214
8195
  }
7215
8196
  }
7216
8197
  } else {
7217
- const err49 = { instancePath: instancePath + "/regions", schemaPath: "#/properties/regions/type", keyword: "type", params: { type: "array" }, message: "must be array" };
8198
+ const err54 = { instancePath: instancePath + "/regions", schemaPath: "#/properties/regions/type", keyword: "type", params: { type: "array" }, message: "must be array" };
7218
8199
  if (vErrors === null) {
7219
- vErrors = [err49];
8200
+ vErrors = [err54];
7220
8201
  } else {
7221
- vErrors.push(err49);
8202
+ vErrors.push(err54);
7222
8203
  }
7223
8204
  errors++;
7224
8205
  }
7225
8206
  }
7226
8207
  if (data.boxes !== void 0) {
7227
- let data43 = data.boxes;
7228
- if (Array.isArray(data43)) {
7229
- const len4 = data43.length;
7230
- for (let i4 = 0; i4 < len4; i4++) {
7231
- if (!validate24(data43[i4], { instancePath: instancePath + "/boxes/" + i4, parentData: data43, parentDataProperty: i4, rootData })) {
7232
- vErrors = vErrors === null ? validate24.errors : vErrors.concat(validate24.errors);
8208
+ let data46 = data.boxes;
8209
+ if (Array.isArray(data46)) {
8210
+ const len2 = data46.length;
8211
+ for (let i2 = 0; i2 < len2; i2++) {
8212
+ if (!validate29(data46[i2], { instancePath: instancePath + "/boxes/" + i2, parentData: data46, parentDataProperty: i2, rootData })) {
8213
+ vErrors = vErrors === null ? validate29.errors : vErrors.concat(validate29.errors);
7233
8214
  errors = vErrors.length;
7234
8215
  }
7235
8216
  }
7236
8217
  } else {
7237
- const err50 = { instancePath: instancePath + "/boxes", schemaPath: "#/properties/boxes/type", keyword: "type", params: { type: "array" }, message: "must be array" };
8218
+ const err55 = { instancePath: instancePath + "/boxes", schemaPath: "#/properties/boxes/type", keyword: "type", params: { type: "array" }, message: "must be array" };
7238
8219
  if (vErrors === null) {
7239
- vErrors = [err50];
8220
+ vErrors = [err55];
7240
8221
  } else {
7241
- vErrors.push(err50);
8222
+ vErrors.push(err55);
7242
8223
  }
7243
8224
  errors++;
7244
8225
  }
7245
8226
  }
7246
8227
  if (data.strip !== void 0) {
7247
- if (!validate26(data.strip, { instancePath: instancePath + "/strip", parentData: data, parentDataProperty: "strip", rootData })) {
7248
- vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);
8228
+ if (!validate31(data.strip, { instancePath: instancePath + "/strip", parentData: data, parentDataProperty: "strip", rootData })) {
8229
+ vErrors = vErrors === null ? validate31.errors : vErrors.concat(validate31.errors);
7249
8230
  errors = vErrors.length;
7250
8231
  }
7251
8232
  }
7252
8233
  if (data.steps !== void 0) {
7253
- let data46 = data.steps;
7254
- if (Array.isArray(data46)) {
7255
- if (data46.length < 1) {
7256
- const err51 = { instancePath: instancePath + "/steps", schemaPath: "#/properties/steps/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
8234
+ let data49 = data.steps;
8235
+ if (Array.isArray(data49)) {
8236
+ if (data49.length < 1) {
8237
+ const err56 = { instancePath: instancePath + "/steps", schemaPath: "#/properties/steps/minItems", keyword: "minItems", params: { limit: 1 }, message: "must NOT have fewer than 1 items" };
7257
8238
  if (vErrors === null) {
7258
- vErrors = [err51];
8239
+ vErrors = [err56];
7259
8240
  } else {
7260
- vErrors.push(err51);
8241
+ vErrors.push(err56);
7261
8242
  }
7262
8243
  errors++;
7263
8244
  }
7264
- const len5 = data46.length;
7265
- for (let i5 = 0; i5 < len5; i5++) {
7266
- if (!validate30(data46[i5], { instancePath: instancePath + "/steps/" + i5, parentData: data46, parentDataProperty: i5, rootData })) {
7267
- vErrors = vErrors === null ? validate30.errors : vErrors.concat(validate30.errors);
8245
+ const len3 = data49.length;
8246
+ for (let i3 = 0; i3 < len3; i3++) {
8247
+ if (!validate35(data49[i3], { instancePath: instancePath + "/steps/" + i3, parentData: data49, parentDataProperty: i3, rootData })) {
8248
+ vErrors = vErrors === null ? validate35.errors : vErrors.concat(validate35.errors);
7268
8249
  errors = vErrors.length;
7269
8250
  }
7270
8251
  }
7271
8252
  } else {
7272
- const err52 = { instancePath: instancePath + "/steps", schemaPath: "#/properties/steps/type", keyword: "type", params: { type: "array" }, message: "must be array" };
8253
+ const err57 = { instancePath: instancePath + "/steps", schemaPath: "#/properties/steps/type", keyword: "type", params: { type: "array" }, message: "must be array" };
7273
8254
  if (vErrors === null) {
7274
- vErrors = [err52];
8255
+ vErrors = [err57];
7275
8256
  } else {
7276
- vErrors.push(err52);
8257
+ vErrors.push(err57);
7277
8258
  }
7278
8259
  errors++;
7279
8260
  }
7280
8261
  }
7281
8262
  if (data.sequence !== void 0) {
7282
- if (!validate38(data.sequence, { instancePath: instancePath + "/sequence", parentData: data, parentDataProperty: "sequence", rootData })) {
7283
- vErrors = vErrors === null ? validate38.errors : vErrors.concat(validate38.errors);
8263
+ if (!validate43(data.sequence, { instancePath: instancePath + "/sequence", parentData: data, parentDataProperty: "sequence", rootData })) {
8264
+ vErrors = vErrors === null ? validate43.errors : vErrors.concat(validate43.errors);
7284
8265
  errors = vErrors.length;
7285
8266
  }
7286
8267
  }
7287
8268
  if (data.state !== void 0) {
7288
- if (!validate40(data.state, { instancePath: instancePath + "/state", parentData: data, parentDataProperty: "state", rootData })) {
7289
- vErrors = vErrors === null ? validate40.errors : vErrors.concat(validate40.errors);
8269
+ if (!validate45(data.state, { instancePath: instancePath + "/state", parentData: data, parentDataProperty: "state", rootData })) {
8270
+ vErrors = vErrors === null ? validate45.errors : vErrors.concat(validate45.errors);
7290
8271
  errors = vErrors.length;
7291
8272
  }
7292
8273
  }
7293
8274
  if (data.git !== void 0) {
7294
- if (!validate44(data.git, { instancePath: instancePath + "/git", parentData: data, parentDataProperty: "git", rootData })) {
7295
- vErrors = vErrors === null ? validate44.errors : vErrors.concat(validate44.errors);
8275
+ if (!validate49(data.git, { instancePath: instancePath + "/git", parentData: data, parentDataProperty: "git", rootData })) {
8276
+ vErrors = vErrors === null ? validate49.errors : vErrors.concat(validate49.errors);
7296
8277
  errors = vErrors.length;
7297
8278
  }
7298
8279
  }
7299
8280
  if (data.time !== void 0) {
7300
- if (!validate48(data.time, { instancePath: instancePath + "/time", parentData: data, parentDataProperty: "time", rootData })) {
7301
- vErrors = vErrors === null ? validate48.errors : vErrors.concat(validate48.errors);
8281
+ if (!validate53(data.time, { instancePath: instancePath + "/time", parentData: data, parentDataProperty: "time", rootData })) {
8282
+ vErrors = vErrors === null ? validate53.errors : vErrors.concat(validate53.errors);
7302
8283
  errors = vErrors.length;
7303
8284
  }
7304
8285
  }
7305
8286
  } else {
7306
- const err53 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
8287
+ const err58 = { instancePath, schemaPath: "#/type", keyword: "type", params: { type: "object" }, message: "must be object" };
7307
8288
  if (vErrors === null) {
7308
- vErrors = [err53];
8289
+ vErrors = [err58];
7309
8290
  } else {
7310
- vErrors.push(err53);
8291
+ vErrors.push(err58);
7311
8292
  }
7312
8293
  errors++;
7313
8294
  }
@@ -7316,7 +8297,7 @@ function validate10(data, { instancePath = "", parentData, parentDataProperty, r
7316
8297
  }
7317
8298
 
7318
8299
  // src/schema.ts
7319
- var EVENT_TYPES = ["edge", "action", "swap", "strip", "commit", "branch", "now", "mark", "span"];
8300
+ var EVENT_TYPES = ["edge", "action", "swap", "strip", "commit", "branch", "now", "mark", "span", "leaf", "node"];
7320
8301
  var ABSENT = "#/definitions/absent/not";
7321
8302
  var ABSENT_KINDS = { regions: "sequence / architecture / state", at: "time", into: "time", color: "time", meters: "time" };
7322
8303
  var NOT_ALLOWED = {
@@ -7327,6 +8308,8 @@ var GIT_EVENT = /\/events\/items\/properties\/type\/not$/u;
7327
8308
  var GIT_EVENTS = ["commit", "branch"];
7328
8309
  var TIME_EVENT = /\/events\/items\/not$/u;
7329
8310
  var TIME_EVENTS = ["now", "mark", "span"];
8311
+ var TREE_EVENT = /\/events\/items\/allOf\/0\/not$/u;
8312
+ var TREE_EVENTS = ["leaf", "node"];
7330
8313
  var DURATION = /^\^\[0-9\]\+\(\\\.\[0-9\]\+\)\?\(([a-z|]+)\)\$$/u;
7331
8314
  var RATIO = /%\)\$$/u;
7332
8315
  var escape = (key) => key.replaceAll("~", "~0").replaceAll("/", "~1");
@@ -7357,6 +8340,7 @@ function toFieldError(error, errors, m) {
7357
8340
  if (RESERVED_ID.test(error.schemaPath)) return { pointer: at2, message: m.reserved(STATE_ENDS) };
7358
8341
  if (GIT_EVENT.test(error.schemaPath)) return { pointer: at2, message: m.kindOnly(GIT_EVENTS, "git") };
7359
8342
  if (TIME_EVENT.test(error.schemaPath)) return { pointer: `${at2}/type`, message: m.kindOnly(TIME_EVENTS, "time") };
8343
+ if (TREE_EVENT.test(error.schemaPath)) return { pointer: `${at2}/type`, message: m.kindOnly(TREE_EVENTS, "tree") };
7360
8344
  const last = at2.slice(at2.lastIndexOf("/") + 1);
7361
8345
  if (error.schemaPath === ABSENT) return { pointer: at2, message: m.not({ field: last, kind: ABSENT_KINDS[last] ?? last }) };
7362
8346
  const allowed = NOT_ALLOWED[last];
@@ -7468,7 +8452,7 @@ function plan(step, needle) {
7468
8452
  return;
7469
8453
  }
7470
8454
  if (event.type === "now" || needle && pulled(event)) return;
7471
- if (event.type === "commit" || event.type === "branch") {
8455
+ if (event.type === "commit" || event.type === "branch" || event.type === "leaf" || event.type === "node") {
7472
8456
  const a = cursor;
7473
8457
  const b = a + MOTION.draw;
7474
8458
  out.edges.push({ event: e, a, b, carries: false, coin: false, named: false });
@@ -7694,6 +8678,7 @@ var ICONS = {
7694
8678
  layers: "M 0 -8 l9 4.5 l-9 4.5 l-9 -4.5 z M -9 2.5 l9 4.5 l9 -4.5",
7695
8679
  code: "M -4 -6 l-5 6 l5 6 M 4 -6 l5 6 l-5 6",
7696
8680
  paint: "M -8 8 c 0 -3 2 -5 4.5 -5 l 9 -9 l 3.5 3.5 l -9 9 c 0 2.5 -2 4.5 -5 4.5 z",
8681
+ tree: "M 0 -5 v4 M -6 -1 h12 M -6 -1 v3 M 6 -1 v3 M -9 2 h6 v6 h-6 z M 3 2 h6 v6 h-6 z M -3 -10 h6 v5 h-6 z",
7697
8682
  block: "M -9 -7 h18 a2 2 0 0 1 2 2 v10 a2 2 0 0 1 -2 2 h-18 a2 2 0 0 1 -2 -2 v-10 a2 2 0 0 1 2 -2 z M -11 -2.5 h22 M -6 2.5 h8"
7698
8683
  };
7699
8684
 
@@ -7939,12 +8924,12 @@ var easeInOut = (t) => t < 0.5 ? 4 * t * t * t : 1 - (-2 * t + 2) ** 3 / 2;
7939
8924
  function carrier(e, time, ctx) {
7940
8925
  const { m } = ctx;
7941
8926
  const n = LOOK.carrier.samples;
7942
- const route = e.wait ? [e.wait, ...e.points] : e.points;
7943
- const length = pathLength(route);
8927
+ const route2 = e.wait ? [e.wait, ...e.points] : e.points;
8928
+ const length = pathLength(route2);
7944
8929
  const { depart: a, arrive: b, start: from, end: gone } = time;
7945
8930
  const path2 = [];
7946
8931
  for (let k = 0; k <= n; k++) {
7947
- const [x, y] = along(route, easeInOut(k / n) * length);
8932
+ const [x, y] = along(route2, easeInOut(k / n) * length);
7948
8933
  path2.push([a + (b - a) * k / n, x, y]);
7949
8934
  }
7950
8935
  const first = path2[0];
@@ -8421,6 +9406,128 @@ function timeFocus(layout, timeline, step, parts, vw, vh) {
8421
9406
  return held;
8422
9407
  }
8423
9408
 
9409
+ // src/render/tree.ts
9410
+ var r14 = (v) => Math.round(v * 100) / 100;
9411
+ function drawTree(layout, diagram, timeline, ctx) {
9412
+ const { m } = ctx;
9413
+ const T = LOOK.tree;
9414
+ const B = LOOK.box;
9415
+ const timeOf = (step, event) => timeline.edges.find((t) => t.step === step && t.event === event);
9416
+ const active = /* @__PURE__ */ new Map();
9417
+ const touched = /* @__PURE__ */ new Map();
9418
+ diagram.steps.forEach((step, s) => {
9419
+ for (const e of step.events) {
9420
+ if (e.type !== "edge") continue;
9421
+ for (const id of [e.from, e.to]) {
9422
+ active.set(id, (active.get(id) ?? /* @__PURE__ */ new Set()).add(s));
9423
+ if (e.carry.kind !== "none" && !touched.has(id)) touched.set(id, s);
9424
+ }
9425
+ }
9426
+ });
9427
+ const carries = (step, event) => {
9428
+ const e = diagram.steps[step]?.events[event];
9429
+ return e?.type === "edge" && e.carry.kind !== "none";
9430
+ };
9431
+ const fadeStep = layout.runs.filter((run) => carries(run.step, run.event)).reduce((s, run) => s === void 0 ? run.step : Math.min(s, run.step), void 0);
9432
+ const fadeAt = fadeStep === void 0 ? void 0 : timeline.steps[fadeStep]?.start;
9433
+ const fadeOf = (id) => {
9434
+ if (fadeStep === void 0 || fadeAt === void 0) return void 0;
9435
+ const t = touched.get(id);
9436
+ if (t !== void 0 && t <= fadeStep) return void 0;
9437
+ const back = t === void 0 ? void 0 : timeline.steps[t]?.start;
9438
+ const frames = [
9439
+ [0, { opacity: 1 }],
9440
+ [fadeAt, { opacity: 1 }, EASE.inOut],
9441
+ [fadeAt + MOTION.fade, { opacity: T.faint }]
9442
+ ];
9443
+ if (back !== void 0) frames.push([back, { opacity: T.faint }, EASE.inOut], [back + MOTION.fade, { opacity: 1 }]);
9444
+ frames.push([m.last, { opacity: back === void 0 ? T.faint : 1 }, EASE.inOut], [m.total, { opacity: 1 }]);
9445
+ return m.kf(frames);
9446
+ };
9447
+ const faded = (id, markup, attrs = "") => {
9448
+ const fade = fadeOf(id);
9449
+ return fade ? `<g class="dg-a"${attrs} style="${fade}">${markup}</g>` : attrs === "" ? markup : `<g${attrs}>${markup}</g>`;
9450
+ };
9451
+ const drawnAt = new Map(layout.nodes.map((n) => [n.id, timeOf(n.step, n.event)?.drawn ?? 0]));
9452
+ const links = layout.links.map((l) => {
9453
+ const time = timeOf(l.step, l.event);
9454
+ if (!time) return "";
9455
+ ctx.traces.push({ from: l.from, to: l.to, points: l.points, shown: [[time.start, Number.POSITIVE_INFINITY]] });
9456
+ const kf = m.kf([
9457
+ [0, { opacity: 0, "stroke-dashoffset": 1 }],
9458
+ [time.start, { opacity: 0, "stroke-dashoffset": 1 }, EASE.inOut],
9459
+ [time.start + 0.05, { opacity: 1 }],
9460
+ [time.drawn, { "stroke-dashoffset": 0 }],
9461
+ [m.last, { opacity: 1, "stroke-dashoffset": 0 }, EASE.inOut],
9462
+ [m.total, { opacity: 0, "stroke-dashoffset": 0 }]
9463
+ ]);
9464
+ return faded(l.from, `<path class="dg-tree-l dg-a" data-tree-link="${esc(l.from)}" pathLength="1" d="${pathOf(l.points)}" style="${kf}"/>`);
9465
+ }).join("");
9466
+ const ties = layout.nodes.flatMap((n) => {
9467
+ if (!n.card) return [];
9468
+ const at2 = drawnAt.get(n.id) ?? 0;
9469
+ const d = `M ${r14(n.cx)} ${r14(n.y + n.h + LOOK.edge.inset)} V ${r14(n.card.y - LOOK.edge.inset)}`;
9470
+ return [faded(n.id, `<path class="dg-tree-con dg-a" d="${d}" style="${m.vis(at2)}"/>`)];
9471
+ }).join("");
9472
+ const traced = /* @__PURE__ */ new Set();
9473
+ const trails = layout.runs.flatMap((run) => {
9474
+ const e = layout.edges.find((x) => x.step === run.step && x.event === run.event);
9475
+ if (!e || traced.has(run.link)) return [];
9476
+ const carried = timeline.carriers.find((c) => c.step === run.step && c.event === run.event);
9477
+ const time = timeOf(run.step, run.event);
9478
+ const a = carried?.depart ?? time?.start;
9479
+ const b = carried?.arrive ?? time?.drawn;
9480
+ if (a === void 0 || b === void 0) return [];
9481
+ traced.add(run.link);
9482
+ const kf = m.kf([
9483
+ [0, { opacity: 0, "stroke-dashoffset": 1 }],
9484
+ [a, { opacity: 0, "stroke-dashoffset": 1 }, EASE.inOut],
9485
+ [a + 0.05, { opacity: 1 }],
9486
+ [b, { "stroke-dashoffset": 0 }],
9487
+ [m.last, { opacity: 1, "stroke-dashoffset": 0 }, EASE.inOut],
9488
+ [m.total, { opacity: 0, "stroke-dashoffset": 0 }]
9489
+ ]);
9490
+ const d = pathOf(e.points);
9491
+ return [
9492
+ `<g style="${cs(e.color)}"><path class="dg-tree-tr dg-a" data-tree-trail="${esc(run.link)}" pathLength="1" d="${d}" style="${kf}"/><path class="dg-tree-h dg-a" d="${arrowHead(e.points)}" style="${m.vis(b)}"/></g>`
9493
+ ];
9494
+ }).join("");
9495
+ const cards = layout.nodes.flatMap((n) => {
9496
+ const c = n.card;
9497
+ if (!c) return [];
9498
+ const gx = c.x + T.card.padX + T.card.icon / 2;
9499
+ const cy = c.y + c.h / 2;
9500
+ const text2 = write(ctx.ink, "dg-tree-ct", c.x + T.card.padX + T.card.icon + T.card.gap, cy + LOOK.baseline.label, c.text, TYPE.treeCard, ALWAYS);
9501
+ return [
9502
+ faded(
9503
+ n.id,
9504
+ `<rect class="dg-tree-card" x="${r14(c.x)}" y="${r14(c.y)}" width="${r14(c.w)}" height="${c.h}" rx="${T.card.radius}"/>${glyph("doc", gx, cy, T.card.glyph, "dg-tree-cg")}${text2}`,
9505
+ ` data-tree-card="${esc(n.id)}"`
9506
+ )
9507
+ ];
9508
+ }).join("");
9509
+ const nodes = layout.nodes.map((n) => {
9510
+ const at2 = drawnAt.get(n.id) ?? 0;
9511
+ const on = [...active.get(n.id) ?? []].sort((x, y) => x - y);
9512
+ const act = on.length > 0 ? activeKf(ctx, on) : void 0;
9513
+ const radius = n.root ? T.root.radius : T.radius;
9514
+ const rect = (cls, extra = "") => `<rect class="${cls}" x="${r14(n.x)}" y="${r14(n.y)}" width="${r14(n.w)}" height="${n.h}" rx="${radius}"${extra}/>`;
9515
+ const frame = `${act ? `<g class="dg-a" style="${act}">${rect("dg-halo")}</g>` : ""}${rect("dg-st", ` ${ctx.sh}`)}${act ? `<g class="dg-a" style="${act}">${rect("dg-on")}</g>` : ""}`;
9516
+ const ix = n.x + T.root.iconX + B.icon / 2;
9517
+ const mark = n.root ? `<rect class="dg-ic" x="${r14(ix - B.icon / 2)}" y="${r14(n.cy - B.icon / 2)}" width="${B.icon}" height="${B.icon}" rx="${B.iconRadius}"/>${glyph("tree", ix, n.cy, B.iconScale)}` : "";
9518
+ const shown = [[at2, Number.POSITIVE_INFINITY]];
9519
+ const texts = n.lines.map((line, k) => {
9520
+ const style = n.styles[k] ?? TYPE.boxName;
9521
+ const cls = style === TYPE.treeHash ? "dg-tree-hash" : style === TYPE.treeName ? "dg-tree-name" : style === TYPE.rootHash ? "dg-tree-rh" : style === TYPE.rootName ? "dg-tree-rn" : "dg-tree-one";
9522
+ const baseline = n.baselines[k] ?? n.cy;
9523
+ return n.root ? write(ctx.ink, cls, n.x + T.root.textX, baseline, line, style, shown) : write(ctx.ink, cls, n.cx, baseline, line, style, shown, "middle");
9524
+ }).join("");
9525
+ const inner = faded(n.id, `${frame}${mark}${texts}`, ` data-tree-node="${esc(n.id)}"${n.root ? ` data-tree-root="${esc(n.id)}"` : ""}`);
9526
+ return `<g class="dg-popc dg-a" style="${cs(n.color)};${m.pop(at2)}">${inner}</g>`;
9527
+ }).join("");
9528
+ return { links: links + ties, trails, nodes: cards + nodes };
9529
+ }
9530
+
8424
9531
  // src/render/motion.ts
8425
9532
  var r2 = (v) => Math.round(v * 100) / 100;
8426
9533
  var Motion = class {
@@ -8599,6 +9706,19 @@ var PART_CSS = [
8599
9706
  `.dg-git-n{${font(TYPE.gitNote)};fill:var(--ink2)}`,
8600
9707
  `.dg-git-old{fill:var(--surf);stroke:var(--c);stroke-width:${S.gitOrphan};stroke-dasharray:3 3;stroke-opacity:.6}`,
8601
9708
  `.dg-git-oldl{${font(TYPE.gitId)};fill:var(--ct);opacity:.55}`,
9709
+ // 木の図 (#3233)。木の線は線の灰で、運ぶ物が通った跡は運ぶ物の色で引く
9710
+ `.dg-tree-l{fill:none;stroke:var(--line);stroke-width:${S.tree};stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1 2}`,
9711
+ `.dg-tree-tr{fill:none;stroke:var(--c);stroke-width:${S.treeTrail};stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1 2}`,
9712
+ `.dg-tree-h{fill:none;stroke:var(--c);stroke-width:${S.treeTrail};stroke-linecap:round;stroke-linejoin:round}`,
9713
+ `.dg-tree-con{fill:none;stroke:var(--line);stroke-width:${S.treeCon};stroke-linecap:round;stroke-dasharray:2 3.5}`,
9714
+ `.dg-tree-card{fill:var(--surf);stroke:var(--hair);stroke-width:${S.hair}}`,
9715
+ `.dg-tree-cg{fill:none;stroke:var(--mute);stroke-width:${S.glyph};stroke-linecap:round;stroke-linejoin:round}`,
9716
+ `.dg-tree-ct{${font(TYPE.treeCard)};fill:var(--ink)}`,
9717
+ `.dg-tree-hash{${font(TYPE.treeHash)};fill:var(--ink)}`,
9718
+ `.dg-tree-name{${font(TYPE.treeName)};fill:var(--mute)}`,
9719
+ `.dg-tree-one{${font(TYPE.boxName)};fill:var(--ink)}`,
9720
+ `.dg-tree-rh{${font(TYPE.rootHash)};fill:var(--ink)}`,
9721
+ `.dg-tree-rn{${font(TYPE.rootName)};fill:var(--mute)}`,
8602
9722
  // 時間軸の図 (#3165)。和文を含む字は、末尾に j を付けた class で同じ大きさと太さの和文の字にする
8603
9723
  `.dg-tm-ep{fill:color-mix(in srgb,var(--ink) ${X.timeShade}%,transparent)}`,
8604
9724
  `.dg-tm-sep{stroke:var(--hair);stroke-width:${S.hair};stroke-dasharray:2 4}`,
@@ -8760,6 +9880,14 @@ function drawSvg(diagram, layout, timeline, palette, theme, follow, ink = [], tr
8760
9880
  L.node.push(git.commits);
8761
9881
  L.top.push(git.tags);
8762
9882
  }
9883
+ const treeLayout = isTreeLayout(layout) ? layout : void 0;
9884
+ if (treeLayout) {
9885
+ const tree = drawTree(treeLayout, diagram, timeline, ctx);
9886
+ L.base.push(tree.links);
9887
+ L.lit.push(tree.trails);
9888
+ L.node.push(tree.nodes);
9889
+ }
9890
+ const runs = new Set((treeLayout?.runs ?? []).map((r) => `${r.step}/${r.event}`));
8763
9891
  const timeLayout = isTimeLayout(layout) ? layout : void 0;
8764
9892
  if (timeLayout) {
8765
9893
  const drawn = drawTime(timeLayout, diagram, timeline, ctx, subs);
@@ -8771,7 +9899,7 @@ function drawSvg(diagram, layout, timeline, palette, theme, follow, ink = [], tr
8771
9899
  const wired = new Set((timeLayout?.wires ?? []).map((w) => `${w.step}/${w.event}`));
8772
9900
  for (const e of layout.edges) {
8773
9901
  const time = timeline.edges.find((t) => t.step === e.step && t.event === e.event);
8774
- if (!time || timeLayout && !wired.has(`${e.step}/${e.event}`)) continue;
9902
+ if (!time || timeLayout && !wired.has(`${e.step}/${e.event}`) || runs.has(`${e.step}/${e.event}`)) continue;
8775
9903
  const drawn = edge(e, time, ctx, isState);
8776
9904
  L.base.push(drawn.base);
8777
9905
  L.lit.push(drawn.lit);
@@ -8802,7 +9930,7 @@ function drawSvg(diagram, layout, timeline, palette, theme, follow, ink = [], tr
8802
9930
  }
8803
9931
  for (const time of timeline.carriers) {
8804
9932
  const e = layout.edges.find((x) => x.step === time.step && x.event === time.event);
8805
- if (e) L.top.push(carrier(e, time, ctx));
9933
+ if (e) L.top.push(carrier(e, treeLayout ? { ...time, start: time.depart, end: time.arrive + MOTION.fade } : time, ctx));
8806
9934
  }
8807
9935
  const content = Object.values(L).map((parts) => parts.join("")).join("");
8808
9936
  const { near, far, nearY, farY } = LOOK.shadow;
@@ -8840,6 +9968,15 @@ function focusParts(layout, diagram, step) {
8840
9968
  rects.push({ x: Math.min(...xs), y: Math.min(...ys), w: Math.max(...xs) - Math.min(...xs), h: Math.max(...ys) - Math.min(...ys) });
8841
9969
  }
8842
9970
  rects.push(...layout.labels.filter((l) => l.step === step), ...layout.actions.filter((a) => a.step === step));
9971
+ if (isTreeLayout(layout)) {
9972
+ const ends = new Set((diagram.steps[step]?.events ?? []).flatMap((e) => e.type === "edge" ? [e.from, e.to] : []));
9973
+ rects.push(...layout.nodes.filter((n) => n.step === step || ends.has(n.id)));
9974
+ for (const l of layout.links.filter((x) => x.step === step)) {
9975
+ const xs = l.points.map((p) => p[0]);
9976
+ const ys = l.points.map((p) => p[1]);
9977
+ rects.push({ x: Math.min(...xs), y: Math.min(...ys), w: Math.max(...xs) - Math.min(...xs), h: Math.max(...ys) - Math.min(...ys) });
9978
+ }
9979
+ }
8843
9980
  for (const event of diagram.steps[step]?.events ?? []) {
8844
9981
  const ids = event.type === "edge" ? [event.from, event.to] : event.type === "action" || event.type === "swap" ? [event.box] : [];
8845
9982
  for (const id of ids) {
@@ -8912,7 +10049,8 @@ function followView(layout, timeline, diagram, m, id, content, follow, heads) {
8912
10049
  const overview = () => {
8913
10050
  const shapes = [
8914
10051
  ...layout.regions.map((r3) => `<rect class="dg-mm-band" style="${cs(r3.color)}" x="${mx + r3.x * k}" y="${my + r3.y * k}" width="${r3.w * k}" height="${r3.h * k}" rx="3"/>`),
8915
- ...layout.boxes.map((b) => `<rect class="dg-mm-card" style="${cs(b.color)}" x="${mx + b.x * k}" y="${my + b.y * k}" width="${b.w * k}" height="${b.h * k}" rx="1.5"/>`)
10052
+ ...layout.boxes.map((b) => `<rect class="dg-mm-card" style="${cs(b.color)}" x="${mx + b.x * k}" y="${my + b.y * k}" width="${b.w * k}" height="${b.h * k}" rx="1.5"/>`),
10053
+ ...(isTreeLayout(layout) ? layout.nodes : []).map((n) => `<rect class="dg-mm-card" style="${cs(n.color)}" x="${mx + n.x * k}" y="${my + n.y * k}" width="${n.w * k}" height="${n.h * k}" rx="1.5"/>`)
8916
10054
  ].join("");
8917
10055
  const vp = m.move(cam.map(([t, cx, cy, , e]) => [t, mx + (cx - vw / 2) * k, my + (cy - vh / 2) * k, 1, e]));
8918
10056
  return {
@@ -8938,7 +10076,7 @@ function renderDiagram(input, options = {}) {
8938
10076
  const read = readDiagram(input, { lang });
8939
10077
  if (!read.ok) throw new Error(FIGURE_TEXT[lang].cannotDraw(read.errors.map((e) => `${e.pointer} ${e.message}`).join(" / ")));
8940
10078
  const diagram = read.diagram;
8941
- const layout = diagram.kind === "sequence" ? layoutSequence(diagram) : diagram.kind === "state" ? layoutState(diagram, lang) : diagram.kind === "git" ? layoutGit(diagram) : diagram.kind === "time" ? layoutTime(diagram, lang) : layoutArchitecture(diagram);
10079
+ const layout = diagram.kind === "sequence" ? layoutSequence(diagram) : diagram.kind === "state" ? layoutState(diagram, lang) : diagram.kind === "git" ? layoutGit(diagram) : diagram.kind === "time" ? layoutTime(diagram, lang) : diagram.kind === "tree" ? layoutTree(diagram) : layoutArchitecture(diagram);
8942
10080
  return renderLayout(diagram, layout, buildTimeline(diagram, options.still === true), options);
8943
10081
  }
8944
10082
  function renderLayout(diagram, layout, timeline, options = {}) {
@@ -9020,11 +10158,11 @@ async function stage(browser, svg, fontCss, body, lang) {
9020
10158
  const page = await browser.newPage({ viewport: { width, height }, deviceScaleFactor: SCALE });
9021
10159
  const paused = svg.replace(/^<svg\b/, '<svg style="--play:paused;--at:0"');
9022
10160
  const html = `<!doctype html><html><head><meta charset="utf-8"><style>${fontCss}html,body{margin:0}body{${body}}svg{display:block}</style><script type="module">import * as mb from "/mediabunny.js";import * as gif from "/gifenc.js";window.__tools={mb,gif};</script></head><body>${paused}</body></html>`;
9023
- await page.route("http://localhost/**", async (route) => {
9024
- const path2 = new URL(route.request().url()).pathname;
9025
- if (path2 === "/") return route.fulfill({ contentType: "text/html; charset=utf-8", body: html });
10161
+ await page.route("http://localhost/**", async (route2) => {
10162
+ const path2 = new URL(route2.request().url()).pathname;
10163
+ if (path2 === "/") return route2.fulfill({ contentType: "text/html; charset=utf-8", body: html });
9026
10164
  const script = SCRIPTS[path2];
9027
- return script ? route.fulfill({ contentType: "text/javascript", body: fs.readFileSync(script) }) : route.fulfill({ status: 404 });
10165
+ return script ? route2.fulfill({ contentType: "text/javascript", body: fs.readFileSync(script) }) : route2.fulfill({ status: 404 });
9028
10166
  });
9029
10167
  await page.goto("http://localhost/");
9030
10168
  await page.waitForFunction(() => "__tools" in window);