Skip to content

Turn any idea, plan, or codebase into a beautiful interactive diagram. An agent skill for Claude Code, Codex, and more.

feat: add verified repository evidence

tt-a1i00dcad0d5109
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 96586897..5ea14e97 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,12 @@ All notable changes are documented here. Format loosely follows [Keep a Changelo
## [Unreleased]
+### Added
+- **Revision-verified Repository Evidence Passport.** Architecture diagrams can opt into public GitHub source links by declaring a repository URL, a full commit SHA, and one to three repo-relative sources per component, then passing `--repo-root` to `render`, `deliver`, `preview`, or `validate`. Archify verifies the local origin, commit, blobs, and optional line ranges before publishing; verified links appear in Semantic Passport and Node Finder while staying outside the canonical SVG and every visual export. Plain diagrams remain the default, other diagram modes reject the option, and private or unpinned evidence is deliberately out of scope.
+
+### Fixed
+- Existing custom templates remain compatible when repository evidence is unused; only the opt-in evidence path requires the new HTML payload slot. Evidence paths reject control characters, and line verification no longer treats a trailing newline as an extra source line.
+
## [2.12.0] — 2026-07-23
### Added
diff --git a/README.md b/README.md
index 7135745e..ad557867 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@
Archify is an agent skill for Claude, Codex CLI, and opencode. Give it a system description or repository; get a polished diagram you can open, explore, present, and share.
- **Open it and present** — five technical diagram types, three visual presets, dark/light themes, and optional finite motion
-- **Every interaction stays grounded** — search nodes, inspect relationships, trace authored routes, compare roles, and play guided stories without inventing topology
+- **Every interaction stays grounded** — search nodes, optionally open revision-verified source, inspect relationships, trace authored routes, compare roles, and play guided stories without inventing topology
- **One file, ready to trust and share** — typed JSON IR and deterministic checks produce self-contained HTML plus PNG, SVG, WebM, and 1200×630 share cards
![License](https://img.shields.io/badge/license-MIT-22c55e?style=flat-square)
@@ -150,6 +150,7 @@ Architecture examples: [`web-app`](examples/web-app.html) · [`Archify pipeline`
- **Atomic validation before delivery** — schema, layout, HTML/SVG, route, and label-to-route clearance checks must all pass before a showcase artifact replaces the last known good output.
- **Last-good live preview** — an optional desktop loop watches one JSON file, refreshes only after the latest candidate passes every gate, and keeps the previous verified diagram visible when a save is incomplete or invalid.
- **Truthful interaction** — focus, routes, role comparison, and stories reuse authored nodes and relationships instead of inventing topology.
+- **Source evidence, only when requested** — Architecture nodes can open Git-verified files and line ranges pinned to one public commit; ordinary artifacts stay source-free.
- **Portable by default** — the result is one HTML file; exports remain full-diagram and free of temporary viewer state.
Archify is not a general-purpose drawing editor or a Mermaid theme. It turns technical intent into a communication artifact.
diff --git a/README_EN.md b/README_EN.md
index 7135745e..ad557867 100644
--- a/README_EN.md
+++ b/README_EN.md
@@ -15,7 +15,7 @@
Archify is an agent skill for Claude, Codex CLI, and opencode. Give it a system description or repository; get a polished diagram you can open, explore, present, and share.
- **Open it and present** — five technical diagram types, three visual presets, dark/light themes, and optional finite motion
-- **Every interaction stays grounded** — search nodes, inspect relationships, trace authored routes, compare roles, and play guided stories without inventing topology
+- **Every interaction stays grounded** — search nodes, optionally open revision-verified source, inspect relationships, trace authored routes, compare roles, and play guided stories without inventing topology
- **One file, ready to trust and share** — typed JSON IR and deterministic checks produce self-contained HTML plus PNG, SVG, WebM, and 1200×630 share cards
![License](https://img.shields.io/badge/license-MIT-22c55e?style=flat-square)
@@ -150,6 +150,7 @@ Architecture examples: [`web-app`](examples/web-app.html) · [`Archify pipeline`
- **Atomic validation before delivery** — schema, layout, HTML/SVG, route, and label-to-route clearance checks must all pass before a showcase artifact replaces the last known good output.
- **Last-good live preview** — an optional desktop loop watches one JSON file, refreshes only after the latest candidate passes every gate, and keeps the previous verified diagram visible when a save is incomplete or invalid.
- **Truthful interaction** — focus, routes, role comparison, and stories reuse authored nodes and relationships instead of inventing topology.
+- **Source evidence, only when requested** — Architecture nodes can open Git-verified files and line ranges pinned to one public commit; ordinary artifacts stay source-free.
- **Portable by default** — the result is one HTML file; exports remain full-diagram and free of temporary viewer state.
Archify is not a general-purpose drawing editor or a Mermaid theme. It turns technical intent into a communication artifact.
diff --git a/README_ZH.md b/README_ZH.md
index 9de09ce6..629d75a4 100644
--- a/README_ZH.md
+++ b/README_ZH.md
@@ -11,7 +11,7 @@
Archify 是适用于 Claude、Codex CLI 和 opencode 的 Agent Skill。给它一段系统描述或一个代码仓库,就能得到可打开、可探索、可演示、可分享的专业技术图。
- **打开就是成品** —— 五种技术图、三套视觉预设、深浅主题,以及显式启用的有限动态
-- **每次探索都有依据** —— 搜索节点、检查关系、追踪作者路径、对比角色、播放故事,但不编造拓扑
+- **每次探索都有依据** —— 搜索节点、按需打开版本校验过的源码、检查关系、追踪作者路径、对比角色、播放故事,但不编造拓扑
- **一个文件即可放心交付** —— Typed JSON IR 和确定性校验生成独立 HTML,并支持 PNG、SVG、WebM 与 1200×630 分享卡片
![License](https://img.shields.io/badge/license-MIT-22c55e?style=flat-square)
@@ -146,6 +146,7 @@ Architecture 示例:[`Web App`](examples/web-app.html) · [`Archify Pipeline`]
- **原子交付前校验** —— Schema、布局、HTML/SVG、线路和标签到其他路径的净空检查必须全部通过,Showcase 成品才会替换上一份可信结果。
- **保留最后好图的实时预览** —— 可选桌面循环只监听一个 JSON;只有最新候选通过全部门禁才刷新,半写入或无效保存时继续显示上一份验证成品。
- **交互不编造拓扑** —— 聚焦、路径、角色对比和故事都复用作者定义的节点与关系。
+- **只在需要时附源码证据** —— Architecture 节点可以打开由 Git 校验、固定到公开 commit 的文件与行号;普通成品不携带源码信息。
- **结果默认便携** —— 一个 HTML 文件即可分享;导出永远是完整原图,不携带临时 Viewer 状态。
Archify 不是通用绘图编辑器,也不是 Mermaid 主题;它负责把技术意图变成可交流的成品。
diff --git a/archify.zip b/archify.zip
index d4cb3fc1..8ab22b79 100644
Binary files a/archify.zip and b/archify.zip differ
diff --git a/archify/SKILL.md b/archify/SKILL.md
index e2643dcc..be06b05f 100644
--- a/archify/SKILL.md
+++ b/archify/SKILL.md
@@ -274,6 +274,43 @@ Architecture has the same read-schema-then-render loop as the other modes — pr
Render: `node bin/archify.mjs render architecture <input>.json <output>.html`.
+### Optional verified repository evidence
+
+For a public-repository architecture map, offer one explicit choice before adding source evidence: **plain portable map (default)** or **revision-verified source links**. Do not enable evidence silently, infer paths, or add it to workflow/sequence/dataflow/lifecycle diagrams. If the user already asked for a source-linked or evidence-backed map, that is sufficient consent; do not ask twice.
+
+Evidence is opt-in because repository paths become part of the standalone HTML. It is currently limited to public GitHub repositories and Architecture mode. Never use it for a private repository, never serialize an absolute local path, and never claim a path is verified unless the command below succeeds.
+
+```json
+{
+ "meta": {
+ "title": "Runtime Architecture",
+ "repository": {
+ "url": "https://github.com/example/project",
+ "revision": "0123456789abcdef0123456789abcdef01234567"
+ }
+ },
+ "components": [
+ {
+ "id": "router",
+ "type": "backend",
+ "label": "Command Router",
+ "sources": [
+ { "path": "src/router.ts", "line": 24, "end_line": 61, "label": "Dispatch entry" }
+ ]
+ }
+ ]
+}
+```
+
+Use a full 40-character commit SHA. Each component may name one to three repo-relative POSIX paths, with an optional 1-based line or inclusive line range and reader-facing label. Then pass the repository top level explicitly:
+
+```bash
+node bin/archify.mjs deliver architecture map.architecture.json map.html \
+ --repo-root /absolute/path/to/project --quality showcase --json
+```
+
+`render`, `validate`, and `preview` accept the same `--repo-root` option. Archify checks that the local `origin` matches the authored GitHub URL and that the exact commit, blobs, and requested lines exist. A failure preserves the previous delivered artifact. A success adds only verified links to the existing Semantic Passport and Node Finder; the evidence payload stays outside the SVG, so SVG/raster/Share Card/WebM exports remain free of repository paths.
+
**Free placement** — `pos: [x, y]` is the component's top-left; `size: [w, h]` defaults to `[120, 60]`. Unlike typed modes there is no lane/stage grid — asymmetric placement is yours to choose. `meta.viewBox` is optional (auto-fitted).
**Grid placement (#8)** — when manual coordinates are painful, set semantic cells instead of doing arithmetic:
@@ -367,4 +404,4 @@ When no browser or image reader is available, report `visual_review: skipped (im
## Output
-A single self-contained `.html`: embedded CSS (Google Fonts loads async and degrades to system monospace offline), one canonical inline SVG, and embedded JS for Intent Trace, Route Probe, Node Finder, Semantic Passport, runtime-built Semantic Radar, Presentation Stage, Story Trail playback, semantic focus, pan/zoom, theme, and export. It renders directly in any modern browser. Every semantic node has a deterministic DOM ID, accessible keyboard control, renderer-owned kind/responsibility/context attributes, and a compact native `<title>` tooltip; the SVG root includes its own `<title>` and `<desc>`. The viewer footer may link to Archify's bounded start page using only the diagram type; it must never serialize the title, semantic graph, repository path, or source JSON, must suppress the document referrer, and stays outside print and every canonical export. Raster exports render natively at up to 4× the viewBox (large diagrams step down to 3×/2× to stay under canvas limits); the SVG download is dual-theme self-contained and follows the host's `prefers-color-scheme` (manual override via `svg[data-theme="..."]`); trace-enabled diagrams can be recorded to WebM without external tooling.
+A single self-contained `.html`: embedded CSS (Google Fonts loads async and degrades to system monospace offline), one canonical inline SVG, and embedded JS for Intent Trace, Route Probe, Node Finder, Semantic Passport, runtime-built Semantic Radar, Presentation Stage, Story Trail playback, semantic focus, pan/zoom, theme, and export. It renders directly in any modern browser. Every semantic node has a deterministic DOM ID, accessible keyboard control, renderer-owned kind/responsibility/context attributes, and a compact native `<title>` tooltip; the SVG root includes its own `<title>` and `<desc>`. Explicit, successfully verified Architecture repository evidence may live in a separate HTML-only JSON payload for Passport/Node Finder use; it must never enter the SVG or visual exports. The viewer footer may link to Archify's bounded start page using only the diagram type; it must never serialize the title, semantic graph, repository path, or source JSON, must suppress the document referrer, and stays outside print and every canonical export. Raster exports render natively at up to 4× the viewBox (large diagrams step down to 3×/2× to stay under canvas limits); the SVG download is dual-theme self-contained and follows the host's `prefers-color-scheme` (manual override via `svg[data-theme="..."]`); trace-enabled diagrams can be recorded to WebM without external tooling.
diff --git a/archify/assets/template.html b/archify/assets/template.html
index 55560a9f..97b0fd08 100644
--- a/archify/assets/template.html
+++ b/archify/assets/template.html
@@ -1420,6 +1420,88 @@
.semantic-passport-meta [hidden] { display: none; }
html[data-preset="blueprint"] .semantic-passport-meta span,
html[data-preset="blueprint"] .semantic-passport-meta code { border-radius: 0.1rem; }
+ .semantic-passport-evidence {
+ margin-top: 0.52rem;
+ padding: 0.5rem;
+ border: 1px solid color-mix(in srgb, var(--backend-stroke) 32%, var(--toolbar-border));
+ border-radius: 0.55rem;
+ background: color-mix(in srgb, var(--backend-fill) 18%, var(--panel));
+ }
+ .semantic-passport-evidence[hidden] { display: none; }
+ html[data-preset="blueprint"] .semantic-passport-evidence { border-radius: 0.18rem; }
+ .semantic-passport-evidence-head {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.55rem;
+ margin-bottom: 0.35rem;
+ }
+ .semantic-passport-evidence-status {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.28rem;
+ color: var(--backend-stroke);
+ font-size: 0.5rem;
+ font-weight: 800;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ }
+ .semantic-passport-evidence-status::before {
+ content: '';
+ width: 0.38rem;
+ height: 0.38rem;
+ border-radius: 50%;
+ background: var(--backend-stroke);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--backend-stroke) 14%, transparent);
+ }
+ .semantic-passport-repository {
+ min-width: 0;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-decoration: none;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-repository:hover,
+ .semantic-passport-repository:focus-visible { color: var(--backend-stroke); }
+ .semantic-passport-evidence-links { display: grid; gap: 0.22rem; }
+ .semantic-passport-source {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) auto;
+ gap: 0.15rem 0.45rem;
+ align-items: center;
+ padding: 0.34rem 0.4rem;
+ border: 1px solid transparent;
+ border-radius: 0.38rem;
+ color: var(--text-muted);
+ text-decoration: none;
+ }
+ .semantic-passport-source:hover,
+ .semantic-passport-source:focus-visible {
+ border-color: color-mix(in srgb, var(--backend-stroke) 42%, transparent);
+ background: color-mix(in srgb, var(--backend-fill) 32%, transparent);
+ color: var(--text);
+ }
+ .semantic-passport-source strong {
+ overflow: hidden;
+ font-size: 0.5625rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-source code {
+ color: var(--backend-stroke);
+ font: inherit;
+ font-size: 0.5rem;
+ }
+ .semantic-passport-source small {
+ grid-column: 1 / -1;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
.relationship-lens-summary {
display: block;
margin-top: 0.12rem;
@@ -3841,6 +3923,7 @@
</div>
<!-- ARCHIFY:GUIDED_VIEWS_DATA -->
+ <!-- ARCHIFY:SOURCE_EVIDENCE_DATA -->
<div class="guided-views no-print" id="guided-views" hidden aria-label="Guided diagram views">
<button id="guided-view-prev" type="button" aria-label="Previous guided view" title="Previous guided view ([)">&#8592;</button>
<div class="guided-view-copy">
@@ -4115,6 +4198,13 @@
<span id="focus-tag" data-passport="tag" hidden></span>
<code id="focus-id" data-passport="id"></code>
</div>
+ <div class="semantic-passport-evidence" id="focus-evidence" hidden aria-label="Verified source evidence">
+ <div class="semantic-passport-evidence-head">
+ <span class="semantic-passport-evidence-status">Verified source</span>
+ <a class="semantic-passport-repository" id="focus-repository" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer"></a>
+ </div>
+ <div class="semantic-passport-evidence-links" id="focus-evidence-links"></div>
+ </div>
<span class="relationship-lens-summary" id="focus-summary" aria-live="polite"></span>
</div>
<div class="relationship-lens-actions">
@@ -5872,6 +5962,29 @@
};
})();
+ /* Verified repository evidence is emitted only after the renderer checks
+ the authored GitHub revision, source blobs, and optional line ranges
+ against the explicit --repo-root. It remains outside the SVG so every
+ canonical visual export stays free of repository paths. */
+ Archify.sourceEvidence = (function () {
+ var element = document.getElementById('archify-source-evidence-data');
+ var payload = null;
+ if (element) {
+ try {
+ var parsed = JSON.parse(element.textContent || 'null');
+ if (parsed && parsed.verified === true && parsed.repository && parsed.nodes) payload = parsed;
+ } catch (_) {}
+ }
+ return {
+ available: function () { return Boolean(payload); },
+ repository: function () { return payload ? payload.repository : null; },
+ node: function (id) {
+ var sources = payload && payload.nodes ? payload.nodes[id] : null;
+ return Array.isArray(sources) ? sources.slice() : [];
+ }
+ };
+ })();
+
/* ============================================================
Explore — stable-ID neighborhood focus + dependency-free pan/zoom.
Renderer IDs become deep-linkable semantic hooks without turning the
@@ -5888,6 +6001,9 @@
var context = document.getElementById('focus-context');
var tag = document.getElementById('focus-tag');
var semanticId = document.getElementById('focus-id');
+ var evidence = document.getElementById('focus-evidence');
+ var repositoryLink = document.getElementById('focus-repository');
+ var evidenceLinks = document.getElementById('focus-evidence-links');
var summary = document.getElementById('focus-summary');
var relationshipList = document.getElementById('relationship-lens-list');
var copyBtn = document.getElementById('btn-focus-copy');
@@ -5920,6 +6036,43 @@
element.textContent = normalized;
element.hidden = !normalized;
}
+ function renderSourceEvidence(id) {
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
+ var sources = Archify.sourceEvidence.node(id);
+ var repository = Archify.sourceEvidence.repository();
+ if (!repository || !sources.length) {
+ evidence.hidden = true;
+ return;
+ }
+ var slug = repository.url.replace(/^https:\/\/github\.com\//, '').replace(/\/$/, '');
+ repositoryLink.href = repository.url + '/tree/' + repository.revision;
+ repositoryLink.textContent = slug + ' @ ' + repository.shortRevision;
+ repositoryLink.setAttribute('aria-label', 'Open verified repository revision ' + repository.revision);
+ sources.forEach(function (source) {
+ var link = document.createElement('a');
+ link.className = 'semantic-passport-source';
+ link.href = source.href;
+ link.target = '_blank';
+ link.rel = 'noopener noreferrer';
+ link.referrerPolicy = 'no-referrer';
+ link.setAttribute('aria-label', 'Open verified source ' + source.path + ' at revision ' + repository.shortRevision);
+ var name = document.createElement('strong');
+ name.textContent = source.label || source.path.split('/').pop() || source.path;
+ var location = document.createElement('code');
+ location.textContent = source.line
+ ? 'L' + source.line + (source.endLine && source.endLine !== source.line ? '–' + source.endLine : '') + ' ↗'
+ : 'Open ↗';
+ var sourcePath = document.createElement('small');
+ sourcePath.textContent = source.path;
+ link.appendChild(name);
+ link.appendChild(location);
+ link.appendChild(sourcePath);
+ evidenceLinks.appendChild(link);
+ });
+ evidence.hidden = false;
+ }
function renderPassport(id, node) {
setPassportValue(detail, node.getAttribute('data-node-sublabel'));
setPassportValue(kind, node.getAttribute('data-node-kind') || 'node');
@@ -5927,6 +6080,7 @@
setPassportValue(tag, node.getAttribute('data-node-tag'));
semanticId.textContent = id;
semanticId.hidden = false;
+ renderSourceEvidence(id);
}
function relationshipsFor(id, byId) {
var seen = {};
@@ -6606,6 +6760,10 @@
tag.hidden = true;
semanticId.textContent = '';
semanticId.hidden = true;
+ evidence.hidden = true;
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
summary.textContent = '';
relationshipList.textContent = '';
copyBtn.textContent = 'Copy link';
@@ -9627,6 +9785,10 @@
var context = node.getAttribute('data-node-context') || '';
var tag = node.getAttribute('data-node-tag') || '';
var type = semanticType(node);
+ var sources = Archify.sourceEvidence.node(id);
+ var sourceSearch = sources.map(function (source) {
+ return [source.path, source.label, source.line, source.endLine].filter(Boolean).join(' ');
+ }).join(' ');
return {
id: id,
label: label,
@@ -9634,8 +9796,9 @@
sublabel: sublabel,
context: context,
tag: tag,
+ sources: sources,
links: connectionsFor(id),
- search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + text).toLowerCase(),
+ search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + sourceSearch + ' ' + text).toLowerCase(),
node: node
};
});
diff --git a/archify/bin/archify.mjs b/archify/bin/archify.mjs
index b187c949..6147a665 100755
--- a/archify/bin/archify.mjs
+++ b/archify/bin/archify.mjs
@@ -14,10 +14,10 @@ const TYPES = new Set(['architecture', 'workflow', 'sequence', 'dataflow', 'life
function usage() {
return `Usage:
- archify render <type> <input.json> [output.html] [--quality standard|showcase]
- archify deliver <type> <input.json> [output.html] [--json] [--open] [--quality standard|showcase]
- archify preview <type> <input.json> [output.html] [--no-open] [--quality standard|showcase]
- archify validate <type> <input.json> [--json] [--layout-json] [--quality standard|showcase]
+ archify render <type> <input.json> [output.html] [--quality standard|showcase] [--repo-root path]
+ archify deliver <type> <input.json> [output.html] [--json] [--open] [--quality standard|showcase] [--repo-root path]
+ archify preview <type> <input.json> [output.html] [--no-open] [--quality standard|showcase] [--repo-root path]
+ archify validate <type> <input.json> [--json] [--layout-json] [--quality standard|showcase] [--repo-root path]
archify inspect <type> <input.json>
archify check <output.html>
archify guide [scenario or question] [--json] [--lang en|zh]
@@ -73,17 +73,53 @@ function extractQualityArgs(args) {
return { rest, quality };
}
+function extractRepoRootArgs(args) {
+ const rest = [];
+ let repoRoot;
+ for (let index = 0; index < args.length; index += 1) {
+ const arg = args[index];
+ if (arg === '--repo-root') {
+ repoRoot = args[index + 1];
+ if (!repoRoot || repoRoot.startsWith('--')) fail('--repo-root requires a repository path.');
+ index += 1;
+ continue;
+ }
+ if (arg.startsWith('--repo-root=')) {
+ repoRoot = arg.slice('--repo-root='.length);
+ if (!repoRoot) fail('--repo-root requires a repository path.');
+ continue;
+ }
+ rest.push(arg);
+ }
+ return { rest, repoRoot: repoRoot ? path.resolve(repoRoot) : undefined };
+}
+
+function rendererEnv(quality, repoRoot) {
+ return {
+ ...(quality ? { ARCHIFY_QUALITY_PROFILE: quality } : {}),
+ ...(repoRoot ? { ARCHIFY_REPO_ROOT: repoRoot } : {}),
+ };
+}
+
+function assertEvidenceType(type, repoRoot) {
+ if (repoRoot && type !== 'architecture') {
+ fail('--repo-root is currently supported for architecture diagrams only.');
+ }
+}
+
function exitFrom(result) {
if (result.error) fail(result.error.message, 1);
process.exit(result.status ?? 1);
}
function commandRender(args) {
- const { rest, quality } = extractQualityArgs(args);
- const [type, input, output] = rest;
+ const qualityArgs = extractQualityArgs(args);
+ const repoArgs = extractRepoRootArgs(qualityArgs.rest);
+ const [type, input, output] = repoArgs.rest;
if (!type || !input) fail(usage());
+ assertEvidenceType(type, repoArgs.repoRoot);
const result = runNode([rendererPath(type), input, ...(output ? [output] : [])], {
- env: quality ? { ARCHIFY_QUALITY_PROFILE: quality } : undefined,
+ env: rendererEnv(qualityArgs.quality, repoArgs.repoRoot),
});
if (result.status !== 0) exitFrom(result);
}
@@ -105,16 +141,29 @@ function reportDeliveryFailure({ json, stage, type, input, output, error, status
process.exitCode = status;
}
+function sourceEvidenceFromArtifact(artifact) {
+ const html = artifact.toString('utf8');
+ const match = html.match(/<script id="archify-source-evidence-data" type="application\/json">([\s\S]*?)<\/script>/);
+ if (!match) return null;
+ const evidence = JSON.parse(match[1]);
+ if (evidence?.verified !== true || !evidence.repository?.url || !evidence.repository?.revision || !Number.isInteger(evidence.referenceCount)) {
+ throw new Error('Rendered source evidence receipt is incomplete.');
+ }
+ return evidence;
+}
+
async function commandDeliver(args) {
const qualityArgs = extractQualityArgs(args);
- const json = qualityArgs.rest.includes('--json');
- const open = qualityArgs.rest.includes('--open');
+ const repoArgs = extractRepoRootArgs(qualityArgs.rest);
+ const json = repoArgs.rest.includes('--json');
+ const open = repoArgs.rest.includes('--open');
const knownOptions = new Set(['--json', '--open']);
- const unknown = qualityArgs.rest.filter((arg) => arg.startsWith('--') && !knownOptions.has(arg));
+ const unknown = repoArgs.rest.filter((arg) => arg.startsWith('--') && !knownOptions.has(arg));
if (unknown.length) fail(`Unknown deliver option "${unknown[0]}".`);
- const positional = qualityArgs.rest.filter((arg) => !knownOptions.has(arg));
+ const positional = repoArgs.rest.filter((arg) => !knownOptions.has(arg));
const [type, input, requestedOutput] = positional;
if (!type || !input || positional.length > 3) fail(usage());
+ assertEvidenceType(type, repoArgs.repoRoot);
const renderer = rendererPath(type);
const inputPath = path.resolve(input);
@@ -174,7 +223,7 @@ async function commandDeliver(args) {
try {
const render = runNode([renderer, inputPath, candidatePath], {
stdio: 'pipe',
- env: qualityArgs.quality ? { ARCHIFY_QUALITY_PROFILE: qualityArgs.quality } : undefined,
+ env: rendererEnv(qualityArgs.quality, repoArgs.repoRoot),
});
if (render.status !== 0) {
if (render.stderr) process.stderr.write(render.stderr);
@@ -244,6 +293,20 @@ async function commandDeliver(args) {
});
return;
}
+ let sourceEvidence;
+ try {
+ sourceEvidence = sourceEvidenceFromArtifact(artifact);
+ } catch (error) {
+ reportDeliveryFailure({
+ json,
+ stage: 'receipt',
+ type,
+ input: inputPath,
+ output: outputPath,
+ error: `Could not read the repository evidence receipt: ${error.message}`,
+ });
+ return;
+ }
const receipt = {
schemaVersion: 1,
ok: true,
@@ -263,6 +326,14 @@ async function commandDeliver(args) {
errors: result.composition.summary.errors,
warnings: result.composition.summary.warnings,
},
+ ...(sourceEvidence ? {
+ evidence: {
+ verified: true,
+ repository: sourceEvidence.repository.url,
+ revision: sourceEvidence.repository.revision,
+ references: sourceEvidence.referenceCount,
+ },
+ } : {}),
};
try {
@@ -314,13 +385,15 @@ async function commandDeliver(args) {
async function commandPreview(args) {
const qualityArgs = extractQualityArgs(args);
- const noOpen = qualityArgs.rest.includes('--no-open');
+ const repoArgs = extractRepoRootArgs(qualityArgs.rest);
+ const noOpen = repoArgs.rest.includes('--no-open');
const knownOptions = new Set(['--no-open']);
- const unknown = qualityArgs.rest.filter((arg) => arg.startsWith('--') && !knownOptions.has(arg));
+ const unknown = repoArgs.rest.filter((arg) => arg.startsWith('--') && !knownOptions.has(arg));
if (unknown.length) fail(`Unknown preview option "${unknown[0]}".`);
- const positional = qualityArgs.rest.filter((arg) => !knownOptions.has(arg));
+ const positional = repoArgs.rest.filter((arg) => !knownOptions.has(arg));
const [type, input, output] = positional;
if (!type || !input || positional.length > 3) fail(usage());
+ assertEvidenceType(type, repoArgs.repoRoot);
rendererPath(type);
let runPreview;
@@ -335,6 +408,7 @@ async function commandPreview(args) {
input,
output,
quality: qualityArgs.quality,
+ repoRoot: repoArgs.repoRoot,
open: !noOpen,
});
} catch (error) {
@@ -530,13 +604,16 @@ function commandDemo(args) {
function commandValidate(args) {
const qualityArgs = extractQualityArgs(args);
- args = qualityArgs.rest;
+ const repoArgs = extractRepoRootArgs(qualityArgs.rest);
+ args = repoArgs.rest;
const quality = qualityArgs.quality;
+ const repoRoot = repoArgs.repoRoot;
const json = args.includes('--json');
const layoutJson = args.includes('--layout-json');
const rest = args.filter((arg) => arg !== '--json' && arg !== '--layout-json');
const [type, input] = rest;
if (!type || !input) fail(usage());
+ assertEvidenceType(type, repoRoot);
const renderer = rendererPath(type);
if (layoutJson) {
@@ -545,7 +622,7 @@ function commandValidate(args) {
}
const result = runNode([renderer, input, '/dev/null', '--layout-json'], {
stdio: 'pipe',
- env: quality ? { ARCHIFY_QUALITY_PROFILE: quality } : undefined,
+ env: rendererEnv(quality, repoRoot),
});
if (result.status !== 0) {
if (result.stderr) process.stderr.write(result.stderr);
@@ -563,7 +640,7 @@ function commandValidate(args) {
try {
const render = runNode([renderer, input, out], {
stdio: 'pipe',
- env: quality ? { ARCHIFY_QUALITY_PROFILE: quality } : undefined,
+ env: rendererEnv(quality, repoRoot),
});
if (render.status !== 0) {
if (render.stderr) process.stderr.write(render.stderr);
diff --git a/archify/bin/preview.mjs b/archify/bin/preview.mjs
index 4bfceee5..8d5129e7 100644
--- a/archify/bin/preview.mjs
+++ b/archify/bin/preview.mjs
@@ -433,6 +433,7 @@ export async function startPreview(options) {
[stagingDirectory, '<preview-staging>'],
[path.resolve(here, '..'), '<archify-skill>'],
[path.resolve(options.cwd || process.cwd()), '<working-directory>'],
+ ...(options.repoRoot ? [[path.resolve(options.repoRoot), '<repo-root>']] : []),
],
),
};
@@ -510,6 +511,7 @@ export async function startPreview(options) {
}
const args = [options.deliveryCli || cliPath, 'deliver', type, snapshotPath, candidatePath, '--json'];
if (options.quality) args.push('--quality', options.quality);
+ if (options.repoRoot) args.push('--repo-root', path.resolve(options.repoRoot));
let stdout = '';
let stderr = '';
child = spawn(process.execPath, args, {
diff --git a/archify/renderers/architecture/render-architecture.mjs b/archify/renderers/architecture/render-architecture.mjs
index e58f9f4c..bf35daec 100644
--- a/archify/renderers/architecture/render-architecture.mjs
+++ b/archify/renderers/architecture/render-architecture.mjs
@@ -35,7 +35,7 @@ import {
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const layoutJsonMode = process.argv.includes('--layout-json');
const cliArgs = process.argv.filter((arg) => arg !== '--layout-json');
-const { diagram: arch, template, outPath } = loadDiagram({
+const { diagram: arch, template, outPath, sourceEvidence } = loadDiagram({
rendererDir: __dirname,
diagramType: 'architecture',
defaultExample: 'web-app.architecture.json',
@@ -487,4 +487,5 @@ writeDiagram({
footerLabel: 'Architecture diagram',
svg: renderSvg(),
cards: arch.cards,
+ sourceEvidence,
});
diff --git a/archify/renderers/shared/cli.mjs b/archify/renderers/shared/cli.mjs
index 245af6d6..af27c920 100644
--- a/archify/renderers/shared/cli.mjs
+++ b/archify/renderers/shared/cli.mjs
@@ -2,6 +2,7 @@ import fs from 'node:fs';
import path from 'node:path';
import { applyTemplate, renderCards, esc } from './utils.mjs';
import { validateSchema } from './validator.mjs';
+import { verifyRepositoryEvidence } from './repository-evidence.mjs';
// Common CLI head: node render-<type>.mjs [input.json] [output.html]
export function loadDiagram({ rendererDir, diagramType, defaultExample, argv = process.argv }) {
@@ -11,11 +12,12 @@ export function loadDiagram({ rendererDir, diagramType, defaultExample, argv = p
validateSchema(diagramType, diagram);
validateGuidedViews(diagramType, diagram);
validateRelationshipIds(diagramType, diagram);
+ const sourceEvidence = verifyRepositoryEvidence(diagramType, diagram, process.env.ARCHIFY_REPO_ROOT);
const template = fs.readFileSync(path.join(skillRoot, 'assets/template.html'), 'utf8');
// Optional chaining: in degraded mode (no ajv) malformed input must still
// reach the renderer's friendly layout checks instead of crashing here.
const outPath = path.resolve(process.cwd(), argv[3] || diagram.meta?.output || `${diagramType}.html`);
- return { diagram, template, outPath };
+ return { diagram, template, outPath, sourceEvidence };
}
const START_TYPES = new Set(['architecture', 'workflow', 'sequence', 'dataflow', 'lifecycle']);
@@ -23,7 +25,7 @@ const START_TYPES = new Set(['architecture', 'workflow', 'sequence', 'dataflow',
// Common CLI tail: fill the template and write the standalone HTML file.
// The keyboard hint and the restrained start link are viewer-only — neither
// belongs in canonical SVG exports or on paper.
-export function writeDiagram({ outPath, template, diagramType, meta, footerLabel, svg, cards }) {
+export function writeDiagram({ outPath, template, diagramType, meta, footerLabel, svg, cards, sourceEvidence = null }) {
if (!START_TYPES.has(diagramType)) throw new Error(`writeDiagram: unknown diagram type ${JSON.stringify(diagramType)}`);
fs.mkdirSync(path.dirname(outPath), { recursive: true });
const guidedHint = Array.isArray(meta.views) && meta.views.length
@@ -38,6 +40,7 @@ export function writeDiagram({ outPath, template, diagramType, meta, footerLabel
cards: renderCards(cards),
visualPreset: meta.visual_preset || 'classic',
guidedViews: meta.views || [],
+ sourceEvidence,
}));
console.log(outPath);
}
diff --git a/archify/renderers/shared/generated-validators.mjs b/archify/renderers/shared/generated-validators.mjs
index eaade272..a317fe47 100644
--- a/archify/renderers/shared/generated-validators.mjs
+++ b/archify/renderers/shared/generated-validators.mjs
@@ -10,4 +10,4 @@
&& (str.charCodeAt(pos) & 0xfc00) === 0xdc00) pos += 1;
}
return length;
-};const schema33 = {"type":"array","maxItems":5,"items":{"type":"object","additionalProperties":false,"required":["id","label","focus"],"properties":{"id":{"$ref":"#/$defs/id"},"label":{"type":"string","minLength":1,"maxLength":48},"focus":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/id"}},"note":{"type":"string","maxLength":140}}}};const pattern4 = new RegExp("^[a-zA-Z][a-zA-Z0-9_-]*$", "u");function validate22(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate22.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(Array.isArray(data)){if(data.length > 5){const err0 = {instancePath,schemaPath:"#/maxItems",keyword:"maxItems",params:{limit: 5},message:"must NOT have more than 5 items"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];if(data0 && typeof data0 == "object" && !Array.isArray(data0)){if(data0.id === undefined){const err1 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data0.label === undefined){const err2 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data0.focus === undefined){const err3 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "focus"},message:"must have required property '"+"focus"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data0){if(!((((key0 === "id") || (key0 === "label")) || (key0 === "focus")) || (key0 === "note"))){const err4 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data0.id !== undefined){let data1 = data0.id;if(typeof data1 === "string"){if(!pattern4.test(data1)){const err5 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data0.label !== undefined){let data2 = data0.label;if(typeof data2 === "string"){if(func2(data2) > 48){const err7 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/maxLength",keyword:"maxLength",params:{limit: 48},message:"must NOT have more than 48 characters"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(func2(data2) < 1){const err8 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data0.focus !== undefined){let data3 = data0.focus;if(Array.isArray(data3)){if(data3.length < 1){const err10 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}const len1 = data3.length;for(let i1=0; i1<len1; i1++){let data4 = data3[i1];if(typeof data4 === "string"){if(!pattern4.test(data4)){const err11 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data0.note !== undefined){let data5 = data0.note;if(typeof data5 === "string"){if(func2(data5) > 140){const err14 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/maxLength",keyword:"maxLength",params:{limit: 140},message:"must NOT have more than 140 characters"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}else {const err15 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}}else {const err16 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}}else {const err17 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}validate22.errors = vErrors;return errors === 0;}validate22.evaluated = {"items":true,"dynamicProps":false,"dynamicItems":false};function validate20(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://github.com/tt-a1i/archify/schemas/workflow.schema.json" */;let vErrors = null;let errors = 0;const evaluated0 = validate20.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.schema_version === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "schema_version"},message:"must have required property '"+"schema_version"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.diagram_type === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "diagram_type"},message:"must have required property '"+"diagram_type"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.meta === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "meta"},message:"must have required property '"+"meta"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.lanes === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "lanes"},message:"must have required property '"+"lanes"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.nodes === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "nodes"},message:"must have required property '"+"nodes"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.edges === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "edges"},message:"must have required property '"+"edges"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}for(const key0 in data){if(!(func1.call(schema31.properties, key0))){const err6 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.schema_version !== undefined){if(1 !== data.schema_version){const err7 = {instancePath:instancePath+"/schema_version",schemaPath:"#/properties/schema_version/const",keyword:"const",params:{allowedValue: 1},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.diagram_type !== undefined){if("workflow" !== data.diagram_type){const err8 = {instancePath:instancePath+"/diagram_type",schemaPath:"#/properties/diagram_type/const",keyword:"const",params:{allowedValue: "workflow"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.meta !== undefined){let data2 = data.meta;if(data2 && typeof data2 == "object" && !Array.isArray(data2)){if(data2.title === undefined){const err9 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}for(const key1 in data2){if(!((((((((key1 === "title") || (key1 === "subtitle")) || (key1 === "output")) || (key1 === "animation")) || (key1 === "visual_preset")) || (key1 === "quality_profile")) || (key1 === "views")) || (key1 === "viewBox"))){const err10 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data2.title !== undefined){let data3 = data2.title;if(typeof data3 === "string"){if(func2(data3) < 1){const err11 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data2.subtitle !== undefined){if(typeof data2.subtitle !== "string"){const err13 = {instancePath:instancePath+"/meta/subtitle",schemaPath:"#/properties/meta/properties/subtitle/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data2.output !== undefined){if(typeof data2.output !== "string"){const err14 = {instancePath:instancePath+"/meta/output",schemaPath:"#/properties/meta/properties/output/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data2.animation !== undefined){let data6 = data2.animation;if(!((data6 === "trace") || (data6 === "none"))){const err15 = {instancePath:instancePath+"/meta/animation",schemaPath:"#/properties/meta/properties/animation/enum",keyword:"enum",params:{allowedValues: schema31.properties.meta.properties.animation.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data2.visual_preset !== undefined){let data7 = data2.visual_preset;if(!(((data7 === "classic") || (data7 === "signal-flow")) || (data7 === "blueprint"))){const err16 = {instancePath:instancePath+"/meta/visual_preset",schemaPath:"#/properties/meta/properties/visual_preset/enum",keyword:"enum",params:{allowedValues: schema31.properties.meta.properties.visual_preset.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data2.quality_profile !== undefined){let data8 = data2.quality_profile;if(!((data8 === "standard") || (data8 === "showcase"))){const err17 = {instancePath:instancePath+"/meta/quality_profile",schemaPath:"#/properties/meta/properties/quality_profile/enum",keyword:"enum",params:{allowedValues: schema31.properties.meta.properties.quality_profile.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data2.views !== undefined){if(!(validate22(data2.views, {instancePath:instancePath+"/meta/views",parentData:data2,parentDataProperty:"views",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate22.errors : vErrors.concat(validate22.errors);errors = vErrors.length;}}if(data2.viewBox !== undefined){let data10 = data2.viewBox;if(Array.isArray(data10)){if(data10.length > 2){const err18 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}if(data10.length < 2){const err19 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}const len0 = data10.length;if(len0 > 0){let data11 = data10[0];if((typeof data11 == "number") && (isFinite(data11))){if(data11 < 700 || isNaN(data11)){const err20 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/minimum",keyword:"minimum",params:{comparison: ">=", limit: 700},message:"must be >= 700"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}else {const err21 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(len0 > 1){let data12 = data10[1];if((typeof data12 == "number") && (isFinite(data12))){if(data12 < 240 || isNaN(data12)){const err22 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/minimum",keyword:"minimum",params:{comparison: ">=", limit: 240},message:"must be >= 240"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}else {const err23 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}const len1 = data10.length;if(!(len1 <= 2)){const err24 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}else {const err25 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}}else {const err26 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}if(data.lanes !== undefined){let data13 = data.lanes;if(Array.isArray(data13)){if(data13.length < 1){const err27 = {instancePath:instancePath+"/lanes",schemaPath:"#/properties/lanes/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}const len2 = data13.length;for(let i0=0; i0<len2; i0++){let data14 = data13[i0];if(data14 && typeof data14 == "object" && !Array.isArray(data14)){if(data14.id === undefined){const err28 = {instancePath:instancePath+"/lanes/" + i0,schemaPath:"#/properties/lanes/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}if(data14.label === undefined){const err29 = {instancePath:instancePath+"/lanes/" + i0,schemaPath:"#/properties/lanes/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}for(const key2 in data14){if(!(((key2 === "id") || (key2 === "label")) || (key2 === "variant"))){const err30 = {instancePath:instancePath+"/lanes/" + i0,schemaPath:"#/properties/lanes/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}}if(data14.id !== undefined){let data15 = data14.id;if(typeof data15 === "string"){if(!pattern4.test(data15)){const err31 = {instancePath:instancePath+"/lanes/" + i0+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}else {const err32 = {instancePath:instancePath+"/lanes/" + i0+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}if(data14.label !== undefined){let data16 = data14.label;if(typeof data16 === "string"){if(func2(data16) < 1){const err33 = {instancePath:instancePath+"/lanes/" + i0+"/label",schemaPath:"#/properties/lanes/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}else {const err34 = {instancePath:instancePath+"/lanes/" + i0+"/label",schemaPath:"#/properties/lanes/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}if(data14.variant !== undefined){let data17 = data14.variant;if(!((data17 === "normal") || (data17 === "exception"))){const err35 = {instancePath:instancePath+"/lanes/" + i0+"/variant",schemaPath:"#/properties/lanes/items/properties/variant/enum",keyword:"enum",params:{allowedValues: schema31.properties.lanes.items.properties.variant.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}}else {const err36 = {instancePath:instancePath+"/lanes/" + i0,schemaPath:"#/properties/lanes/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}}else {const err37 = {instancePath:instancePath+"/lanes",schemaPath:"#/properties/lanes/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}}if(data.phases !== undefined){let data18 = data.phases;if(Array.isArray(data18)){const len3 = data18.length;for(let i1=0; i1<len3; i1++){let data19 = data18[i1];if(data19 && typeof data19 == "object" && !Array.isArray(data19)){if(data19.id === undefined){const err38 = {instancePath:instancePath+"/phases/" + i1,schemaPath:"#/properties/phases/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}if(data19.label === undefined){const err39 = {instancePath:instancePath+"/phases/" + i1,schemaPath:"#/properties/phases/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}if(data19.fromCol === undefined){const err40 = {instancePath:instancePath+"/phases/" + i1,schemaPath:"#/properties/phases/items/required",keyword:"required",params:{missingProperty: "fromCol"},message:"must have required property '"+"fromCol"+"'"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}if(data19.toCol === undefined){const err41 = {instancePath:instancePath+"/phases/" + i1,schemaPath:"#/properties/phases/items/required",keyword:"required",params:{missingProperty: "toCol"},message:"must have required property '"+"toCol"+"'"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}for(const key3 in data19){if(!(((((key3 === "id") || (key3 === "label")) || (key3 === "fromCol")) || (key3 === "toCol")) || (key3 === "variant"))){const err42 = {instancePath:instancePath+"/phases/" + i1,schemaPath:"#/properties/phases/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}}if(data19.id !== undefined){let data20 = data19.id;if(typeof data20 === "string"){if(!pattern4.test(data20)){const err43 = {instancePath:instancePath+"/phases/" + i1+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}}else {const err44 = {instancePath:instancePath+"/phases/" + i1+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}}if(data19.label !== undefined){let data21 = data19.label;if(typeof data21 === "string"){if(func2(data21) < 1){const err45 = {instancePath:instancePath+"/phases/" + i1+"/label",schemaPath:"#/properties/phases/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}}else {const err46 = {instancePath:instancePath+"/phases/" + i1+"/label",schemaPath:"#/properties/phases/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}}if(data19.fromCol !== undefined){let data22 = data19.fromCol;if(!(((typeof data22 == "number") && (!(data22 % 1) && !isNaN(data22))) && (isFinite(data22)))){const err47 = {instancePath:instancePath+"/phases/" + i1+"/fromCol",schemaPath:"#/properties/phases/items/properties/fromCol/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}if((typeof data22 == "number") && (isFinite(data22))){if(data22 > 5 || isNaN(data22)){const err48 = {instancePath:instancePath+"/phases/" + i1+"/fromCol",schemaPath:"#/properties/phases/items/properties/fromCol/maximum",keyword:"maximum",params:{comparison: "<=", limit: 5},message:"must be <= 5"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}if(data22 < 0 || isNaN(data22)){const err49 = {instancePath:instancePath+"/phases/" + i1+"/fromCol",schemaPath:"#/properties/phases/items/properties/fromCol/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}}}if(data19.toCol !== undefined){let data23 = data19.toCol;if(!(((typeof data23 == "number") && (!(data23 % 1) && !isNaN(data23))) && (isFinite(data23)))){const err50 = {instancePath:instancePath+"/phases/" + i1+"/toCol",schemaPath:"#/properties/phases/items/properties/toCol/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}if((typeof data23 == "number") && (isFinite(data23))){if(data23 > 5 || isNaN(data23)){const err51 = {instancePath:instancePath+"/phases/" + i1+"/toCol",schemaPath:"#/properties/phases/items/properties/toCol/maximum",keyword:"maximum",params:{comparison: "<=", limit: 5},message:"must be <= 5"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}if(data23 < 0 || isNaN(data23)){const err52 = {instancePath:instancePath+"/phases/" + i1+"/toCol",schemaPath:"#/properties/phases/items/properties/toCol/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}}}if(data19.variant !== undefined){let data24 = data19.variant;if(!((((data24 === "default") || (data24 === "emphasis")) || (data24 === "security")) || (data24 === "dashed"))){const err53 = {instancePath:instancePath+"/phases/" + i1+"/variant",schemaPath:"#/properties/phases/items/properties/variant/enum",keyword:"enum",params:{allowedValues: schema31.properties.phases.items.properties.variant.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}}}else {const err54 = {instancePath:instancePath+"/phases/" + i1,schemaPath:"#/properties/phases/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}}}else {const err55 = {instancePath:instancePath+"/phases",schemaPath:"#/properties/phases/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}}if(data.groups !== undefined){let data25 = data.groups;if(Array.isArray(data25)){const len4 = data25.length;for(let i2=0; i2<len4; i2++){let data26 = data25[i2];if(data26 && typeof data26 == "object" && !Array.isArray(data26)){if(data26.id === undefined){const err56 = {instancePath:instancePath+"/groups/" + i2,schemaPath:"#/properties/groups/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}if(data26.label === undefined){const err57 = {instancePath:instancePath+"/groups/" + i2,schemaPath:"#/properties/groups/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}if(data26.lane === undefined){const err58 = {instancePath:instancePath+"/groups/" + i2,schemaPath:"#/properties/groups/items/required",keyword:"required",params:{missingProperty: "lane"},message:"must have required property '"+"lane"+"'"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}if(data26.fromCol === undefined){const err59 = {instancePath:instancePath+"/groups/" + i2,schemaPath:"#/properties/groups/items/required",keyword:"required",params:{missingProperty: "fromCol"},message:"must have required property '"+"fromCol"+"'"};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}if(data26.toCol === undefined){const err60 = {instancePath:instancePath+"/groups/" + i2,schemaPath:"#/properties/groups/items/required",keyword:"required",params:{missingProperty: "toCol"},message:"must have required property '"+"toCol"+"'"};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}for(const key4 in data26){if(!((((((key4 === "id") || (key4 === "label")) || (key4 === "lane")) || (key4 === "fromCol")) || (key4 === "toCol")) || (key4 === "variant"))){const err61 = {instancePath:instancePath+"/groups/" + i2,schemaPath:"#/properties/groups/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key4},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err61];}else {vErrors.push(err61);}errors++;}}if(data26.id !== undefined){let data27 = data26.id;if(typeof data27 === "string"){if(!pattern4.test(data27)){const err62 = {instancePath:instancePath+"/groups/" + i2+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err62];}else {vErrors.push(err62);}errors++;}}else {const err63 = {instancePath:instancePath+"/groups/" + i2+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;}}if(data26.label !== undefined){let data28 = data26.label;if(typeof data28 === "string"){if(func2(data28) < 1){const err64 = {instancePath:instancePath+"/groups/" + i2+"/label",schemaPath:"#/properties/groups/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}}else {const err65 = {instancePath:instancePath+"/groups/" + i2+"/label",schemaPath:"#/properties/groups/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}}if(data26.lane !== undefined){let data29 = data26.lane;if(typeof data29 === "string"){if(!pattern4.test(data29)){const err66 = {instancePath:instancePath+"/groups/" + i2+"/lane",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err66];}else {vErrors.push(err66);}errors++;}}else {const err67 = {instancePath:instancePath+"/groups/" + i2+"/lane",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err67];}else {vErrors.push(err67);}errors++;}}if(data26.fromCol !== undefined){let data30 = data26.fromCol;if(!(((typeof data30 == "number") && (!(data30 % 1) && !isNaN(data30))) && (isFinite(data30)))){const err68 = {instancePath:instancePath+"/groups/" + i2+"/fromCol",schemaPath:"#/properties/groups/items/properties/fromCol/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;}if((typeof data30 == "number") && (isFinite(data30))){if(data30 > 5 || isNaN(data30)){const err69 = {instancePath:instancePath+"/groups/" + i2+"/fromCol",schemaPath:"#/properties/groups/items/properties/fromCol/maximum",keyword:"maximum",params:{comparison: "<=", limit: 5},message:"must be <= 5"};if(vErrors === null){vErrors = [err69];}else {vErrors.push(err69);}errors++;}if(data30 < 0 || isNaN(data30)){const err70 = {instancePath:instancePath+"/groups/" + i2+"/fromCol",schemaPath:"#/properties/groups/items/properties/fromCol/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err70];}else {vErrors.push(err70);}errors++;}}}if(data26.toCol !== undefined){let data31 = data26.toCol;if(!(((typeof data31 == "number") && (!(data31 % 1) && !isNaN(data31))) && (isFinite(data31)))){const err71 = {instancePath:instancePath+"/groups/" + i2+"/toCol",schemaPath:"#/properties/groups/items/properties/toCol/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err71];}else {vErrors.push(err71);}errors++;}if((typeof data31 == "number") && (isFinite(data31))){if(data31 > 5 || isNaN(data31)){const err72 = {instancePath:instancePath+"/groups/" + i2+"/toCol",schemaPath:"#/properties/groups/items/properties/toCol/maximum",keyword:"maximum",params:{comparison: "<=", limit: 5},message:"must be <= 5"};if(vErrors === null){vErrors = [err72];}else {vErrors.push(err72);}errors++;}if(data31 < 0 || isNaN(data31)){const err73 = {instancePath:instancePath+"/groups/" + i2+"/toCol",schemaPath:"#/properties/groups/items/properties/toCol/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err73];}else {vErrors.push(err73);}errors++;}}}if(data26.variant !== undefined){let data32 = data26.variant;if(!((((data32 === "default") || (data32 === "emphasis")) || (data32 === "security")) || (data32 === "dashed"))){const err74 = {instancePath:instancePath+"/groups/" + i2+"/variant",schemaPath:"#/properties/groups/items/properties/variant/enum",keyword:"enum",params:{allowedValues: schema31.properties.groups.items.properties.variant.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err74];}else {vErrors.push(err74);}errors++;}}}else {const err75 = {instancePath:instancePath+"/groups/" + i2,schemaPath:"#/properties/groups/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err75];}else {vErrors.push(err75);}errors++;}}}else {const err76 = {instancePath:instancePath+"/groups",schemaPath:"#/properties/groups/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err76];}else {vErrors.push(err76);}errors++;}}if(data.mainPath !== undefined){let data33 = data.mainPath;if(Array.isArray(data33)){if(data33.length < 2){const err77 = {instancePath:instancePath+"/mainPath",schemaPath:"#/properties/mainPath/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err77];}else {vErrors.push(err77);}errors++;}const len5 = data33.length;for(let i3=0; i3<len5; i3++){let data34 = data33[i3];if(typeof data34 === "string"){if(!pattern4.test(data34)){const err78 = {instancePath:instancePath+"/mainPath/" + i3,schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err78];}else {vErrors.push(err78);}errors++;}}else {const err79 = {instancePath:instancePath+"/mainPath/" + i3,schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err79];}else {vErrors.push(err79);}errors++;}}}else {const err80 = {instancePath:instancePath+"/mainPath",schemaPath:"#/properties/mainPath/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err80];}else {vErrors.push(err80);}errors++;}}if(data.nodes !== undefined){let data35 = data.nodes;if(Array.isArray(data35)){if(data35.length < 1){const err81 = {instancePath:instancePath+"/nodes",schemaPath:"#/properties/nodes/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err81];}else {vErrors.push(err81);}errors++;}const len6 = data35.length;for(let i4=0; i4<len6; i4++){let data36 = data35[i4];if(data36 && typeof data36 == "object" && !Array.isArray(data36)){if(data36.id === undefined){const err82 = {instancePath:instancePath+"/nodes/" + i4,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err82];}else {vErrors.push(err82);}errors++;}if(data36.lane === undefined){const err83 = {instancePath:instancePath+"/nodes/" + i4,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "lane"},message:"must have required property '"+"lane"+"'"};if(vErrors === null){vErrors = [err83];}else {vErrors.push(err83);}errors++;}if(data36.col === undefined){const err84 = {instancePath:instancePath+"/nodes/" + i4,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "col"},message:"must have required property '"+"col"+"'"};if(vErrors === null){vErrors = [err84];}else {vErrors.push(err84);}errors++;}if(data36.type === undefined){const err85 = {instancePath:instancePath+"/nodes/" + i4,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "type"},message:"must have required property '"+"type"+"'"};if(vErrors === null){vErrors = [err85];}else {vErrors.push(err85);}errors++;}if(data36.label === undefined){const err86 = {instancePath:instancePath+"/nodes/" + i4,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err86];}else {vErrors.push(err86);}errors++;}for(const key5 in data36){if(!(func1.call(schema31.properties.nodes.items.properties, key5))){const err87 = {instancePath:instancePath+"/nodes/" + i4,schemaPath:"#/properties/nodes/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key5},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err87];}else {vErrors.push(err87);}errors++;}}if(data36.id !== undefined){let data37 = data36.id;if(typeof data37 === "string"){if(!pattern4.test(data37)){const err88 = {instancePath:instancePath+"/nodes/" + i4+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err88];}else {vErrors.push(err88);}errors++;}}else {const err89 = {instancePath:instancePath+"/nodes/" + i4+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err89];}else {vErrors.push(err89);}errors++;}}if(data36.lane !== undefined){let data38 = data36.lane;if(typeof data38 === "string"){if(!pattern4.test(data38)){const err90 = {instancePath:instancePath+"/nodes/" + i4+"/lane",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err90];}else {vErrors.push(err90);}errors++;}}else {const err91 = {instancePath:instancePath+"/nodes/" + i4+"/lane",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err91];}else {vErrors.push(err91);}errors++;}}if(data36.col !== undefined){let data39 = data36.col;if(!(((typeof data39 == "number") && (!(data39 % 1) && !isNaN(data39))) && (isFinite(data39)))){const err92 = {instancePath:instancePath+"/nodes/" + i4+"/col",schemaPath:"#/properties/nodes/items/properties/col/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err92];}else {vErrors.push(err92);}errors++;}if((typeof data39 == "number") && (isFinite(data39))){if(data39 > 5 || isNaN(data39)){const err93 = {instancePath:instancePath+"/nodes/" + i4+"/col",schemaPath:"#/properties/nodes/items/properties/col/maximum",keyword:"maximum",params:{comparison: "<=", limit: 5},message:"must be <= 5"};if(vErrors === null){vErrors = [err93];}else {vErrors.push(err93);}errors++;}if(data39 < 0 || isNaN(data39)){const err94 = {instancePath:instancePath+"/nodes/" + i4+"/col",schemaPath:"#/properties/nodes/items/properties/col/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err94];}else {vErrors.push(err94);}errors++;}}}if(data36.type !== undefined){let data40 = data36.type;if(!(((((((data40 === "frontend") || (data40 === "backend")) || (data40 === "database")) || (data40 === "cloud")) || (data40 === "security")) || (data40 === "messagebus")) || (data40 === "external"))){const err95 = {instancePath:instancePath+"/nodes/" + i4+"/type",schemaPath:"common.schema.json#/$defs/componentType/enum",keyword:"enum",params:{allowedValues: schema43.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err95];}else {vErrors.push(err95);}errors++;}}if(data36.label !== undefined){let data41 = data36.label;if(typeof data41 === "string"){if(func2(data41) < 1){const err96 = {instancePath:instancePath+"/nodes/" + i4+"/label",schemaPath:"#/properties/nodes/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err96];}else {vErrors.push(err96);}errors++;}}else {const err97 = {instancePath:instancePath+"/nodes/" + i4+"/label",schemaPath:"#/properties/nodes/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err97];}else {vErrors.push(err97);}errors++;}}if(data36.sublabel !== undefined){if(typeof data36.sublabel !== "string"){const err98 = {instancePath:instancePath+"/nodes/" + i4+"/sublabel",schemaPath:"#/properties/nodes/items/properties/sublabel/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err98];}else {vErrors.push(err98);}errors++;}}if(data36.tag !== undefined){if(typeof data36.tag !== "string"){const err99 = {instancePath:instancePath+"/nodes/" + i4+"/tag",schemaPath:"#/properties/nodes/items/properties/tag/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err99];}else {vErrors.push(err99);}errors++;}}if(data36.width !== undefined){let data44 = data36.width;if((typeof data44 == "number") && (isFinite(data44))){if(data44 < 32 || isNaN(data44)){const err100 = {instancePath:instancePath+"/nodes/" + i4+"/width",schemaPath:"#/properties/nodes/items/properties/width/minimum",keyword:"minimum",params:{comparison: ">=", limit: 32},message:"must be >= 32"};if(vErrors === null){vErrors = [err100];}else {vErrors.push(err100);}errors++;}}else {const err101 = {instancePath:instancePath+"/nodes/" + i4+"/width",schemaPath:"#/properties/nodes/items/properties/width/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err101];}else {vErrors.push(err101);}errors++;}}if(data36.height !== undefined){let data45 = data36.height;if((typeof data45 == "number") && (isFinite(data45))){if(data45 < 32 || isNaN(data45)){const err102 = {instancePath:instancePath+"/nodes/" + i4+"/height",schemaPath:"#/properties/nodes/items/properties/height/minimum",keyword:"minimum",params:{comparison: ">=", limit: 32},message:"must be >= 32"};if(vErrors === null){vErrors = [err102];}else {vErrors.push(err102);}errors++;}}else {const err103 = {instancePath:instancePath+"/nodes/" + i4+"/height",schemaPath:"#/properties/nodes/items/properties/height/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err103];}else {vErrors.push(err103);}errors++;}}if(data36.yOffset !== undefined){let data46 = data36.yOffset;if(!((typeof data46 == "number") && (isFinite(data46)))){const err104 = {instancePath:instancePath+"/nodes/" + i4+"/yOffset",schemaPath:"#/properties/nodes/items/properties/yOffset/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err104];}else {vErrors.push(err104);}errors++;}}}else {const err105 = {instancePath:instancePath+"/nodes/" + i4,schemaPath:"#/properties/nodes/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err105];}else {vErrors.push(err105);}errors++;}}}else {const err106 = {instancePath:instancePath+"/nodes",schemaPath:"#/properties/nodes/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err106];}else {vErrors.push(err106);}errors++;}}if(data.edges !== undefined){let data47 = data.edges;if(Array.isArray(data47)){const len7 = data47.length;for(let i5=0; i5<len7; i5++){let data48 = data47[i5];if(data48 && typeof data48 == "object" && !Array.isArray(data48)){if(data48.from === undefined){const err107 = {instancePath:instancePath+"/edges/" + i5,schemaPath:"#/properties/edges/items/required",keyword:"required",params:{missingProperty: "from"},message:"must have required property '"+"from"+"'"};if(vErrors === null){vErrors = [err107];}else {vErrors.push(err107);}errors++;}if(data48.to === undefined){const err108 = {instancePath:instancePath+"/edges/" + i5,schemaPath:"#/properties/edges/items/required",keyword:"required",params:{missingProperty: "to"},message:"must have required property '"+"to"+"'"};if(vErrors === null){vErrors = [err108];}else {vErrors.push(err108);}errors++;}for(const key6 in data48){if(!(func1.call(schema31.properties.edges.items.properties, key6))){const err109 = {instancePath:instancePath+"/edges/" + i5,schemaPath:"#/properties/edges/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key6},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err109];}else {vErrors.push(err109);}errors++;}}if(data48.id !== undefined){let data49 = data48.id;if(typeof data49 === "string"){if(!pattern4.test(data49)){const err110 = {instancePath:instancePath+"/edges/" + i5+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err110];}else {vErrors.push(err110);}errors++;}}else {const err111 = {instancePath:instancePath+"/edges/" + i5+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err111];}else {vErrors.push(err111);}errors++;}}if(data48.from !== undefined){let data50 = data48.from;if(typeof data50 === "string"){if(!pattern4.test(data50)){const err112 = {instancePath:instancePath+"/edges/" + i5+"/from",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err112];}else {vErrors.push(err112);}errors++;}}else {const err113 = {instancePath:instancePath+"/edges/" + i5+"/from",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err113];}else {vErrors.push(err113);}errors++;}}if(data48.to !== undefined){let data51 = data48.to;if(typeof data51 === "string"){if(!pattern4.test(data51)){const err114 = {instancePath:instancePath+"/edges/" + i5+"/to",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err114];}else {vErrors.push(err114);}errors++;}}else {const err115 = {instancePath:instancePath+"/edges/" + i5+"/to",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err115];}else {vErrors.push(err115);}errors++;}}if(data48.label !== undefined){if(typeof data48.label !== "string"){const err116 = {instancePath:instancePath+"/edges/" + i5+"/label",schemaPath:"#/properties/edges/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err116];}else {vErrors.push(err116);}errors++;}}if(data48.variant !== undefined){let data53 = data48.variant;if(!((((data53 === "default") || (data53 === "emphasis")) || (data53 === "security")) || (data53 === "dashed"))){const err117 = {instancePath:instancePath+"/edges/" + i5+"/variant",schemaPath:"common.schema.json#/$defs/variant/enum",keyword:"enum",params:{allowedValues: schema47.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err117];}else {vErrors.push(err117);}errors++;}}if(data48.role !== undefined){let data54 = data48.role;if(!(((((data54 === "main") || (data54 === "branch")) || (data54 === "async")) || (data54 === "return")) || (data54 === "error"))){const err118 = {instancePath:instancePath+"/edges/" + i5+"/role",schemaPath:"#/properties/edges/items/properties/role/enum",keyword:"enum",params:{allowedValues: schema31.properties.edges.items.properties.role.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err118];}else {vErrors.push(err118);}errors++;}}if(data48.fromSide !== undefined){let data55 = data48.fromSide;if(!((((data55 === "left") || (data55 === "right")) || (data55 === "top")) || (data55 === "bottom"))){const err119 = {instancePath:instancePath+"/edges/" + i5+"/fromSide",schemaPath:"#/$defs/side/enum",keyword:"enum",params:{allowedValues: schema48.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err119];}else {vErrors.push(err119);}errors++;}}if(data48.toSide !== undefined){let data56 = data48.toSide;if(!((((data56 === "left") || (data56 === "right")) || (data56 === "top")) || (data56 === "bottom"))){const err120 = {instancePath:instancePath+"/edges/" + i5+"/toSide",schemaPath:"#/$defs/side/enum",keyword:"enum",params:{allowedValues: schema48.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err120];}else {vErrors.push(err120);}errors++;}}if(data48.route !== undefined){let data57 = data48.route;if(!(((((((data57 === "auto") || (data57 === "straight")) || (data57 === "drop")) || (data57 === "outside-right")) || (data57 === "return-left")) || (data57 === "bottom-channel")) || (data57 === "up-channel"))){const err121 = {instancePath:instancePath+"/edges/" + i5+"/route",schemaPath:"#/properties/edges/items/properties/route/enum",keyword:"enum",params:{allowedValues: schema31.properties.edges.items.properties.route.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err121];}else {vErrors.push(err121);}errors++;}}if(data48.via !== undefined){let data58 = data48.via;if(Array.isArray(data58)){const len8 = data58.length;for(let i6=0; i6<len8; i6++){let data59 = data58[i6];if(Array.isArray(data59)){if(data59.length > 2){const err122 = {instancePath:instancePath+"/edges/" + i5+"/via/" + i6,schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err122];}else {vErrors.push(err122);}errors++;}if(data59.length < 2){const err123 = {instancePath:instancePath+"/edges/" + i5+"/via/" + i6,schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err123];}else {vErrors.push(err123);}errors++;}const len9 = data59.length;if(len9 > 0){let data60 = data59[0];if(!((typeof data60 == "number") && (isFinite(data60)))){const err124 = {instancePath:instancePath+"/edges/" + i5+"/via/" + i6+"/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err124];}else {vErrors.push(err124);}errors++;}}if(len9 > 1){let data61 = data59[1];if(!((typeof data61 == "number") && (isFinite(data61)))){const err125 = {instancePath:instancePath+"/edges/" + i5+"/via/" + i6+"/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err125];}else {vErrors.push(err125);}errors++;}}const len10 = data59.length;if(!(len10 <= 2)){const err126 = {instancePath:instancePath+"/edges/" + i5+"/via/" + i6,schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err126];}else {vErrors.push(err126);}errors++;}}else {const err127 = {instancePath:instancePath+"/edges/" + i5+"/via/" + i6,schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err127];}else {vErrors.push(err127);}errors++;}}}else {const err128 = {instancePath:instancePath+"/edges/" + i5+"/via",schemaPath:"#/properties/edges/items/properties/via/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err128];}else {vErrors.push(err128);}errors++;}}if(data48.labelAt !== undefined){let data62 = data48.labelAt;if(Array.isArray(data62)){if(data62.length > 2){const err129 = {instancePath:instancePath+"/edges/" + i5+"/labelAt",schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err129];}else {vErrors.push(err129);}errors++;}if(data62.length < 2){const err130 = {instancePath:instancePath+"/edges/" + i5+"/labelAt",schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err130];}else {vErrors.push(err130);}errors++;}const len11 = data62.length;if(len11 > 0){let data63 = data62[0];if(!((typeof data63 == "number") && (isFinite(data63)))){const err131 = {instancePath:instancePath+"/edges/" + i5+"/labelAt/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err131];}else {vErrors.push(err131);}errors++;}}if(len11 > 1){let data64 = data62[1];if(!((typeof data64 == "number") && (isFinite(data64)))){const err132 = {instancePath:instancePath+"/edges/" + i5+"/labelAt/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err132];}else {vErrors.push(err132);}errors++;}}const len12 = data62.length;if(!(len12 <= 2)){const err133 = {instancePath:instancePath+"/edges/" + i5+"/labelAt",schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err133];}else {vErrors.push(err133);}errors++;}}else {const err134 = {instancePath:instancePath+"/edges/" + i5+"/labelAt",schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err134];}else {vErrors.push(err134);}errors++;}}if(data48.labelDx !== undefined){let data65 = data48.labelDx;if(!((typeof data65 == "number") && (isFinite(data65)))){const err135 = {instancePath:instancePath+"/edges/" + i5+"/labelDx",schemaPath:"#/properties/edges/items/properties/labelDx/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err135];}else {vErrors.push(err135);}errors++;}}if(data48.labelDy !== undefined){let data66 = data48.labelDy;if(!((typeof data66 == "number") && (isFinite(data66)))){const err136 = {instancePath:instancePath+"/edges/" + i5+"/labelDy",schemaPath:"#/properties/edges/items/properties/labelDy/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err136];}else {vErrors.push(err136);}errors++;}}if(data48.labelSegment !== undefined){let data67 = data48.labelSegment;if(!(((typeof data67 == "number") && (!(data67 % 1) && !isNaN(data67))) && (isFinite(data67)))){const err137 = {instancePath:instancePath+"/edges/" + i5+"/labelSegment",schemaPath:"#/properties/edges/items/properties/labelSegment/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err137];}else {vErrors.push(err137);}errors++;}if((typeof data67 == "number") && (isFinite(data67))){if(data67 < 0 || isNaN(data67)){const err138 = {instancePath:instancePath+"/edges/" + i5+"/labelSegment",schemaPath:"#/properties/edges/items/properties/labelSegment/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err138];}else {vErrors.push(err138);}errors++;}}}if(data48.channelX !== undefined){let data68 = data48.channelX;if(!((typeof data68 == "number") && (isFinite(data68)))){const err139 = {instancePath:instancePath+"/edges/" + i5+"/channelX",schemaPath:"#/properties/edges/items/properties/channelX/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err139];}else {vErrors.push(err139);}errors++;}}if(data48.channelY !== undefined){let data69 = data48.channelY;if(!((typeof data69 == "number") && (isFinite(data69)))){const err140 = {instancePath:instancePath+"/edges/" + i5+"/channelY",schemaPath:"#/properties/edges/items/properties/channelY/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err140];}else {vErrors.push(err140);}errors++;}}if(data48.bias !== undefined){let data70 = data48.bias;if((typeof data70 == "number") && (isFinite(data70))){if(data70 > 1 || isNaN(data70)){const err141 = {instancePath:instancePath+"/edges/" + i5+"/bias",schemaPath:"#/properties/edges/items/properties/bias/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err141];}else {vErrors.push(err141);}errors++;}if(data70 < 0 || isNaN(data70)){const err142 = {instancePath:instancePath+"/edges/" + i5+"/bias",schemaPath:"#/properties/edges/items/properties/bias/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err142];}else {vErrors.push(err142);}errors++;}}else {const err143 = {instancePath:instancePath+"/edges/" + i5+"/bias",schemaPath:"#/properties/edges/items/properties/bias/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err143];}else {vErrors.push(err143);}errors++;}}if(data48.width !== undefined){let data71 = data48.width;if((typeof data71 == "number") && (isFinite(data71))){if(data71 < 0.5 || isNaN(data71)){const err144 = {instancePath:instancePath+"/edges/" + i5+"/width",schemaPath:"#/properties/edges/items/properties/width/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0.5},message:"must be >= 0.5"};if(vErrors === null){vErrors = [err144];}else {vErrors.push(err144);}errors++;}}else {const err145 = {instancePath:instancePath+"/edges/" + i5+"/width",schemaPath:"#/properties/edges/items/properties/width/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err145];}else {vErrors.push(err145);}errors++;}}}else {const err146 = {instancePath:instancePath+"/edges/" + i5,schemaPath:"#/properties/edges/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err146];}else {vErrors.push(err146);}errors++;}}}else {const err147 = {instancePath:instancePath+"/edges",schemaPath:"#/properties/edges/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err147];}else {vErrors.push(err147);}errors++;}}if(data.cards !== undefined){let data72 = data.cards;if(Array.isArray(data72)){const len13 = data72.length;for(let i7=0; i7<len13; i7++){let data73 = data72[i7];if(data73 && typeof data73 == "object" && !Array.isArray(data73)){if(data73.dot === undefined){const err148 = {instancePath:instancePath+"/cards/" + i7,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "dot"},message:"must have required property '"+"dot"+"'"};if(vErrors === null){vErrors = [err148];}else {vErrors.push(err148);}errors++;}if(data73.title === undefined){const err149 = {instancePath:instancePath+"/cards/" + i7,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err149];}else {vErrors.push(err149);}errors++;}if(data73.items === undefined){const err150 = {instancePath:instancePath+"/cards/" + i7,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "items"},message:"must have required property '"+"items"+"'"};if(vErrors === null){vErrors = [err150];}else {vErrors.push(err150);}errors++;}for(const key7 in data73){if(!(((key7 === "dot") || (key7 === "title")) || (key7 === "items"))){const err151 = {instancePath:instancePath+"/cards/" + i7,schemaPath:"common.schema.json#/$defs/cards/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key7},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err151];}else {vErrors.push(err151);}errors++;}}if(data73.dot !== undefined){let data74 = data73.dot;if(!(((((((data74 === "cyan") || (data74 === "emerald")) || (data74 === "violet")) || (data74 === "amber")) || (data74 === "rose")) || (data74 === "orange")) || (data74 === "slate"))){const err152 = {instancePath:instancePath+"/cards/" + i7+"/dot",schemaPath:"common.schema.json#/$defs/cards/items/properties/dot/enum",keyword:"enum",params:{allowedValues: schema52.items.properties.dot.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err152];}else {vErrors.push(err152);}errors++;}}if(data73.title !== undefined){let data75 = data73.title;if(typeof data75 === "string"){if(func2(data75) < 1){const err153 = {instancePath:instancePath+"/cards/" + i7+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err153];}else {vErrors.push(err153);}errors++;}}else {const err154 = {instancePath:instancePath+"/cards/" + i7+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err154];}else {vErrors.push(err154);}errors++;}}if(data73.items !== undefined){let data76 = data73.items;if(Array.isArray(data76)){const len14 = data76.length;for(let i8=0; i8<len14; i8++){if(typeof data76[i8] !== "string"){const err155 = {instancePath:instancePath+"/cards/" + i7+"/items/" + i8,schemaPath:"common.schema.json#/$defs/cards/items/properties/items/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err155];}else {vErrors.push(err155);}errors++;}}}else {const err156 = {instancePath:instancePath+"/cards/" + i7+"/items",schemaPath:"common.schema.json#/$defs/cards/items/properties/items/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err156];}else {vErrors.push(err156);}errors++;}}}else {const err157 = {instancePath:instancePath+"/cards/" + i7,schemaPath:"common.schema.json#/$defs/cards/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err157];}else {vErrors.push(err157);}errors++;}}}else {const err158 = {instancePath:instancePath+"/cards",schemaPath:"common.schema.json#/$defs/cards/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err158];}else {vErrors.push(err158);}errors++;}}}else {const err159 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err159];}else {vErrors.push(err159);}errors++;}validate20.errors = vErrors;return errors === 0;}validate20.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};export const sequence = validate24;const schema53 = {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://github.com/tt-a1i/archify/schemas/sequence.schema.json","title":"Archify Sequence Diagram","type":"object","additionalProperties":false,"required":["schema_version","diagram_type","meta","participants","messages"],"properties":{"schema_version":{"const":1},"diagram_type":{"const":"sequence"},"meta":{"type":"object","additionalProperties":false,"required":["title"],"properties":{"title":{"type":"string","minLength":1},"subtitle":{"type":"string"},"output":{"type":"string"},"animation":{"enum":["trace","none"]},"visual_preset":{"enum":["classic","signal-flow","blueprint"]},"quality_profile":{"enum":["standard","showcase"]},"views":{"$ref":"common.schema.json#/$defs/guidedViews"},"viewBox":{"type":"array","prefixItems":[{"type":"number","minimum":480},{"type":"number","minimum":480}],"items":false,"minItems":2,"maxItems":2}}},"participants":{"type":"array","minItems":2,"items":{"type":"object","additionalProperties":false,"required":["id","type","label"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"type":{"$ref":"common.schema.json#/$defs/componentType"},"label":{"type":"string","minLength":1},"sublabel":{"type":"string"}}}},"segments":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["from","to","label"],"properties":{"from":{"type":"number"},"to":{"type":"number"},"label":{"type":"string","minLength":1}}}},"messages":{"type":"array","minItems":1,"items":{"type":"object","additionalProperties":false,"required":["from","to","y","label"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"from":{"$ref":"common.schema.json#/$defs/id"},"to":{"$ref":"common.schema.json#/$defs/id"},"y":{"type":"number","minimum":160},"label":{"type":"string","minLength":1},"variant":{"enum":["default","emphasis","security","dashed","return"]},"note":{"type":"string"}}}},"activations":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["participant","from","to"],"properties":{"participant":{"$ref":"common.schema.json#/$defs/id"},"from":{"type":"number"},"to":{"type":"number"},"type":{"$ref":"common.schema.json#/$defs/componentType"}}}},"cards":{"$ref":"common.schema.json#/$defs/cards"}}};function validate25(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate25.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(Array.isArray(data)){if(data.length > 5){const err0 = {instancePath,schemaPath:"#/maxItems",keyword:"maxItems",params:{limit: 5},message:"must NOT have more than 5 items"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];if(data0 && typeof data0 == "object" && !Array.isArray(data0)){if(data0.id === undefined){const err1 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data0.label === undefined){const err2 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data0.focus === undefined){const err3 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "focus"},message:"must have required property '"+"focus"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data0){if(!((((key0 === "id") || (key0 === "label")) || (key0 === "focus")) || (key0 === "note"))){const err4 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data0.id !== undefined){let data1 = data0.id;if(typeof data1 === "string"){if(!pattern4.test(data1)){const err5 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data0.label !== undefined){let data2 = data0.label;if(typeof data2 === "string"){if(func2(data2) > 48){const err7 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/maxLength",keyword:"maxLength",params:{limit: 48},message:"must NOT have more than 48 characters"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(func2(data2) < 1){const err8 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data0.focus !== undefined){let data3 = data0.focus;if(Array.isArray(data3)){if(data3.length < 1){const err10 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}const len1 = data3.length;for(let i1=0; i1<len1; i1++){let data4 = data3[i1];if(typeof data4 === "string"){if(!pattern4.test(data4)){const err11 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data0.note !== undefined){let data5 = data0.note;if(typeof data5 === "string"){if(func2(data5) > 140){const err14 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/maxLength",keyword:"maxLength",params:{limit: 140},message:"must NOT have more than 140 characters"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}else {const err15 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}}else {const err16 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}}else {const err17 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}validate25.errors = vErrors;return errors === 0;}validate25.evaluated = {"items":true,"dynamicProps":false,"dynamicItems":false};function validate24(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://github.com/tt-a1i/archify/schemas/sequence.schema.json" */;let vErrors = null;let errors = 0;const evaluated0 = validate24.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.schema_version === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "schema_version"},message:"must have required property '"+"schema_version"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.diagram_type === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "diagram_type"},message:"must have required property '"+"diagram_type"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.meta === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "meta"},message:"must have required property '"+"meta"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.participants === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "participants"},message:"must have required property '"+"participants"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.messages === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "messages"},message:"must have required property '"+"messages"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}for(const key0 in data){if(!((((((((key0 === "schema_version") || (key0 === "diagram_type")) || (key0 === "meta")) || (key0 === "participants")) || (key0 === "segments")) || (key0 === "messages")) || (key0 === "activations")) || (key0 === "cards"))){const err5 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.schema_version !== undefined){if(1 !== data.schema_version){const err6 = {instancePath:instancePath+"/schema_version",schemaPath:"#/properties/schema_version/const",keyword:"const",params:{allowedValue: 1},message:"must be equal to constant"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.diagram_type !== undefined){if("sequence" !== data.diagram_type){const err7 = {instancePath:instancePath+"/diagram_type",schemaPath:"#/properties/diagram_type/const",keyword:"const",params:{allowedValue: "sequence"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.meta !== undefined){let data2 = data.meta;if(data2 && typeof data2 == "object" && !Array.isArray(data2)){if(data2.title === undefined){const err8 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}for(const key1 in data2){if(!((((((((key1 === "title") || (key1 === "subtitle")) || (key1 === "output")) || (key1 === "animation")) || (key1 === "visual_preset")) || (key1 === "quality_profile")) || (key1 === "views")) || (key1 === "viewBox"))){const err9 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data2.title !== undefined){let data3 = data2.title;if(typeof data3 === "string"){if(func2(data3) < 1){const err10 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}else {const err11 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data2.subtitle !== undefined){if(typeof data2.subtitle !== "string"){const err12 = {instancePath:instancePath+"/meta/subtitle",schemaPath:"#/properties/meta/properties/subtitle/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data2.output !== undefined){if(typeof data2.output !== "string"){const err13 = {instancePath:instancePath+"/meta/output",schemaPath:"#/properties/meta/properties/output/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data2.animation !== undefined){let data6 = data2.animation;if(!((data6 === "trace") || (data6 === "none"))){const err14 = {instancePath:instancePath+"/meta/animation",schemaPath:"#/properties/meta/properties/animation/enum",keyword:"enum",params:{allowedValues: schema53.properties.meta.properties.animation.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data2.visual_preset !== undefined){let data7 = data2.visual_preset;if(!(((data7 === "classic") || (data7 === "signal-flow")) || (data7 === "blueprint"))){const err15 = {instancePath:instancePath+"/meta/visual_preset",schemaPath:"#/properties/meta/properties/visual_preset/enum",keyword:"enum",params:{allowedValues: schema53.properties.meta.properties.visual_preset.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data2.quality_profile !== undefined){let data8 = data2.quality_profile;if(!((data8 === "standard") || (data8 === "showcase"))){const err16 = {instancePath:instancePath+"/meta/quality_profile",schemaPath:"#/properties/meta/properties/quality_profile/enum",keyword:"enum",params:{allowedValues: schema53.properties.meta.properties.quality_profile.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data2.views !== undefined){if(!(validate25(data2.views, {instancePath:instancePath+"/meta/views",parentData:data2,parentDataProperty:"views",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate25.errors : vErrors.concat(validate25.errors);errors = vErrors.length;}}if(data2.viewBox !== undefined){let data10 = data2.viewBox;if(Array.isArray(data10)){if(data10.length > 2){const err17 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}if(data10.length < 2){const err18 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}const len0 = data10.length;if(len0 > 0){let data11 = data10[0];if((typeof data11 == "number") && (isFinite(data11))){if(data11 < 480 || isNaN(data11)){const err19 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/minimum",keyword:"minimum",params:{comparison: ">=", limit: 480},message:"must be >= 480"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}else {const err20 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}if(len0 > 1){let data12 = data10[1];if((typeof data12 == "number") && (isFinite(data12))){if(data12 < 480 || isNaN(data12)){const err21 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/minimum",keyword:"minimum",params:{comparison: ">=", limit: 480},message:"must be >= 480"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}else {const err22 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}const len1 = data10.length;if(!(len1 <= 2)){const err23 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}else {const err24 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}}else {const err25 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}if(data.participants !== undefined){let data13 = data.participants;if(Array.isArray(data13)){if(data13.length < 2){const err26 = {instancePath:instancePath+"/participants",schemaPath:"#/properties/participants/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}const len2 = data13.length;for(let i0=0; i0<len2; i0++){let data14 = data13[i0];if(data14 && typeof data14 == "object" && !Array.isArray(data14)){if(data14.id === undefined){const err27 = {instancePath:instancePath+"/participants/" + i0,schemaPath:"#/properties/participants/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}if(data14.type === undefined){const err28 = {instancePath:instancePath+"/participants/" + i0,schemaPath:"#/properties/participants/items/required",keyword:"required",params:{missingProperty: "type"},message:"must have required property '"+"type"+"'"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}if(data14.label === undefined){const err29 = {instancePath:instancePath+"/participants/" + i0,schemaPath:"#/properties/participants/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}for(const key2 in data14){if(!((((key2 === "id") || (key2 === "type")) || (key2 === "label")) || (key2 === "sublabel"))){const err30 = {instancePath:instancePath+"/participants/" + i0,schemaPath:"#/properties/participants/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}}if(data14.id !== undefined){let data15 = data14.id;if(typeof data15 === "string"){if(!pattern4.test(data15)){const err31 = {instancePath:instancePath+"/participants/" + i0+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}else {const err32 = {instancePath:instancePath+"/participants/" + i0+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}if(data14.type !== undefined){let data16 = data14.type;if(!(((((((data16 === "frontend") || (data16 === "backend")) || (data16 === "database")) || (data16 === "cloud")) || (data16 === "security")) || (data16 === "messagebus")) || (data16 === "external"))){const err33 = {instancePath:instancePath+"/participants/" + i0+"/type",schemaPath:"common.schema.json#/$defs/componentType/enum",keyword:"enum",params:{allowedValues: schema43.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}if(data14.label !== undefined){let data17 = data14.label;if(typeof data17 === "string"){if(func2(data17) < 1){const err34 = {instancePath:instancePath+"/participants/" + i0+"/label",schemaPath:"#/properties/participants/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}else {const err35 = {instancePath:instancePath+"/participants/" + i0+"/label",schemaPath:"#/properties/participants/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}if(data14.sublabel !== undefined){if(typeof data14.sublabel !== "string"){const err36 = {instancePath:instancePath+"/participants/" + i0+"/sublabel",schemaPath:"#/properties/participants/items/properties/sublabel/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}}else {const err37 = {instancePath:instancePath+"/participants/" + i0,schemaPath:"#/properties/participants/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}}}else {const err38 = {instancePath:instancePath+"/participants",schemaPath:"#/properties/participants/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}}if(data.segments !== undefined){let data19 = data.segments;if(Array.isArray(data19)){const len3 = data19.length;for(let i1=0; i1<len3; i1++){let data20 = data19[i1];if(data20 && typeof data20 == "object" && !Array.isArray(data20)){if(data20.from === undefined){const err39 = {instancePath:instancePath+"/segments/" + i1,schemaPath:"#/properties/segments/items/required",keyword:"required",params:{missingProperty: "from"},message:"must have required property '"+"from"+"'"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}if(data20.to === undefined){const err40 = {instancePath:instancePath+"/segments/" + i1,schemaPath:"#/properties/segments/items/required",keyword:"required",params:{missingProperty: "to"},message:"must have required property '"+"to"+"'"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}if(data20.label === undefined){const err41 = {instancePath:instancePath+"/segments/" + i1,schemaPath:"#/properties/segments/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}for(const key3 in data20){if(!(((key3 === "from") || (key3 === "to")) || (key3 === "label"))){const err42 = {instancePath:instancePath+"/segments/" + i1,schemaPath:"#/properties/segments/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}}if(data20.from !== undefined){let data21 = data20.from;if(!((typeof data21 == "number") && (isFinite(data21)))){const err43 = {instancePath:instancePath+"/segments/" + i1+"/from",schemaPath:"#/properties/segments/items/properties/from/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}}if(data20.to !== undefined){let data22 = data20.to;if(!((typeof data22 == "number") && (isFinite(data22)))){const err44 = {instancePath:instancePath+"/segments/" + i1+"/to",schemaPath:"#/properties/segments/items/properties/to/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}}if(data20.label !== undefined){let data23 = data20.label;if(typeof data23 === "string"){if(func2(data23) < 1){const err45 = {instancePath:instancePath+"/segments/" + i1+"/label",schemaPath:"#/properties/segments/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}}else {const err46 = {instancePath:instancePath+"/segments/" + i1+"/label",schemaPath:"#/properties/segments/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}}}else {const err47 = {instancePath:instancePath+"/segments/" + i1,schemaPath:"#/properties/segments/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}}}else {const err48 = {instancePath:instancePath+"/segments",schemaPath:"#/properties/segments/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}}if(data.messages !== undefined){let data24 = data.messages;if(Array.isArray(data24)){if(data24.length < 1){const err49 = {instancePath:instancePath+"/messages",schemaPath:"#/properties/messages/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}const len4 = data24.length;for(let i2=0; i2<len4; i2++){let data25 = data24[i2];if(data25 && typeof data25 == "object" && !Array.isArray(data25)){if(data25.from === undefined){const err50 = {instancePath:instancePath+"/messages/" + i2,schemaPath:"#/properties/messages/items/required",keyword:"required",params:{missingProperty: "from"},message:"must have required property '"+"from"+"'"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}if(data25.to === undefined){const err51 = {instancePath:instancePath+"/messages/" + i2,schemaPath:"#/properties/messages/items/required",keyword:"required",params:{missingProperty: "to"},message:"must have required property '"+"to"+"'"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}if(data25.y === undefined){const err52 = {instancePath:instancePath+"/messages/" + i2,schemaPath:"#/properties/messages/items/required",keyword:"required",params:{missingProperty: "y"},message:"must have required property '"+"y"+"'"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}if(data25.label === undefined){const err53 = {instancePath:instancePath+"/messages/" + i2,schemaPath:"#/properties/messages/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}for(const key4 in data25){if(!(((((((key4 === "id") || (key4 === "from")) || (key4 === "to")) || (key4 === "y")) || (key4 === "label")) || (key4 === "variant")) || (key4 === "note"))){const err54 = {instancePath:instancePath+"/messages/" + i2,schemaPath:"#/properties/messages/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key4},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}}if(data25.id !== undefined){let data26 = data25.id;if(typeof data26 === "string"){if(!pattern4.test(data26)){const err55 = {instancePath:instancePath+"/messages/" + i2+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}}else {const err56 = {instancePath:instancePath+"/messages/" + i2+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}}if(data25.from !== undefined){let data27 = data25.from;if(typeof data27 === "string"){if(!pattern4.test(data27)){const err57 = {instancePath:instancePath+"/messages/" + i2+"/from",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}}else {const err58 = {instancePath:instancePath+"/messages/" + i2+"/from",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}}if(data25.to !== undefined){let data28 = data25.to;if(typeof data28 === "string"){if(!pattern4.test(data28)){const err59 = {instancePath:instancePath+"/messages/" + i2+"/to",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}}else {const err60 = {instancePath:instancePath+"/messages/" + i2+"/to",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}}if(data25.y !== undefined){let data29 = data25.y;if((typeof data29 == "number") && (isFinite(data29))){if(data29 < 160 || isNaN(data29)){const err61 = {instancePath:instancePath+"/messages/" + i2+"/y",schemaPath:"#/properties/messages/items/properties/y/minimum",keyword:"minimum",params:{comparison: ">=", limit: 160},message:"must be >= 160"};if(vErrors === null){vErrors = [err61];}else {vErrors.push(err61);}errors++;}}else {const err62 = {instancePath:instancePath+"/messages/" + i2+"/y",schemaPath:"#/properties/messages/items/properties/y/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err62];}else {vErrors.push(err62);}errors++;}}if(data25.label !== undefined){let data30 = data25.label;if(typeof data30 === "string"){if(func2(data30) < 1){const err63 = {instancePath:instancePath+"/messages/" + i2+"/label",schemaPath:"#/properties/messages/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;}}else {const err64 = {instancePath:instancePath+"/messages/" + i2+"/label",schemaPath:"#/properties/messages/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}}if(data25.variant !== undefined){let data31 = data25.variant;if(!(((((data31 === "default") || (data31 === "emphasis")) || (data31 === "security")) || (data31 === "dashed")) || (data31 === "return"))){const err65 = {instancePath:instancePath+"/messages/" + i2+"/variant",schemaPath:"#/properties/messages/items/properties/variant/enum",keyword:"enum",params:{allowedValues: schema53.properties.messages.items.properties.variant.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}}if(data25.note !== undefined){if(typeof data25.note !== "string"){const err66 = {instancePath:instancePath+"/messages/" + i2+"/note",schemaPath:"#/properties/messages/items/properties/note/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err66];}else {vErrors.push(err66);}errors++;}}}else {const err67 = {instancePath:instancePath+"/messages/" + i2,schemaPath:"#/properties/messages/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err67];}else {vErrors.push(err67);}errors++;}}}else {const err68 = {instancePath:instancePath+"/messages",schemaPath:"#/properties/messages/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;}}if(data.activations !== undefined){let data33 = data.activations;if(Array.isArray(data33)){const len5 = data33.length;for(let i3=0; i3<len5; i3++){let data34 = data33[i3];if(data34 && typeof data34 == "object" && !Array.isArray(data34)){if(data34.participant === undefined){const err69 = {instancePath:instancePath+"/activations/" + i3,schemaPath:"#/properties/activations/items/required",keyword:"required",params:{missingProperty: "participant"},message:"must have required property '"+"participant"+"'"};if(vErrors === null){vErrors = [err69];}else {vErrors.push(err69);}errors++;}if(data34.from === undefined){const err70 = {instancePath:instancePath+"/activations/" + i3,schemaPath:"#/properties/activations/items/required",keyword:"required",params:{missingProperty: "from"},message:"must have required property '"+"from"+"'"};if(vErrors === null){vErrors = [err70];}else {vErrors.push(err70);}errors++;}if(data34.to === undefined){const err71 = {instancePath:instancePath+"/activations/" + i3,schemaPath:"#/properties/activations/items/required",keyword:"required",params:{missingProperty: "to"},message:"must have required property '"+"to"+"'"};if(vErrors === null){vErrors = [err71];}else {vErrors.push(err71);}errors++;}for(const key5 in data34){if(!((((key5 === "participant") || (key5 === "from")) || (key5 === "to")) || (key5 === "type"))){const err72 = {instancePath:instancePath+"/activations/" + i3,schemaPath:"#/properties/activations/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key5},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err72];}else {vErrors.push(err72);}errors++;}}if(data34.participant !== undefined){let data35 = data34.participant;if(typeof data35 === "string"){if(!pattern4.test(data35)){const err73 = {instancePath:instancePath+"/activations/" + i3+"/participant",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err73];}else {vErrors.push(err73);}errors++;}}else {const err74 = {instancePath:instancePath+"/activations/" + i3+"/participant",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err74];}else {vErrors.push(err74);}errors++;}}if(data34.from !== undefined){let data36 = data34.from;if(!((typeof data36 == "number") && (isFinite(data36)))){const err75 = {instancePath:instancePath+"/activations/" + i3+"/from",schemaPath:"#/properties/activations/items/properties/from/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err75];}else {vErrors.push(err75);}errors++;}}if(data34.to !== undefined){let data37 = data34.to;if(!((typeof data37 == "number") && (isFinite(data37)))){const err76 = {instancePath:instancePath+"/activations/" + i3+"/to",schemaPath:"#/properties/activations/items/properties/to/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err76];}else {vErrors.push(err76);}errors++;}}if(data34.type !== undefined){let data38 = data34.type;if(!(((((((data38 === "frontend") || (data38 === "backend")) || (data38 === "database")) || (data38 === "cloud")) || (data38 === "security")) || (data38 === "messagebus")) || (data38 === "external"))){const err77 = {instancePath:instancePath+"/activations/" + i3+"/type",schemaPath:"common.schema.json#/$defs/componentType/enum",keyword:"enum",params:{allowedValues: schema43.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err77];}else {vErrors.push(err77);}errors++;}}}else {const err78 = {instancePath:instancePath+"/activations/" + i3,schemaPath:"#/properties/activations/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err78];}else {vErrors.push(err78);}errors++;}}}else {const err79 = {instancePath:instancePath+"/activations",schemaPath:"#/properties/activations/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err79];}else {vErrors.push(err79);}errors++;}}if(data.cards !== undefined){let data39 = data.cards;if(Array.isArray(data39)){const len6 = data39.length;for(let i4=0; i4<len6; i4++){let data40 = data39[i4];if(data40 && typeof data40 == "object" && !Array.isArray(data40)){if(data40.dot === undefined){const err80 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "dot"},message:"must have required property '"+"dot"+"'"};if(vErrors === null){vErrors = [err80];}else {vErrors.push(err80);}errors++;}if(data40.title === undefined){const err81 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err81];}else {vErrors.push(err81);}errors++;}if(data40.items === undefined){const err82 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "items"},message:"must have required property '"+"items"+"'"};if(vErrors === null){vErrors = [err82];}else {vErrors.push(err82);}errors++;}for(const key6 in data40){if(!(((key6 === "dot") || (key6 === "title")) || (key6 === "items"))){const err83 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key6},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err83];}else {vErrors.push(err83);}errors++;}}if(data40.dot !== undefined){let data41 = data40.dot;if(!(((((((data41 === "cyan") || (data41 === "emerald")) || (data41 === "violet")) || (data41 === "amber")) || (data41 === "rose")) || (data41 === "orange")) || (data41 === "slate"))){const err84 = {instancePath:instancePath+"/cards/" + i4+"/dot",schemaPath:"common.schema.json#/$defs/cards/items/properties/dot/enum",keyword:"enum",params:{allowedValues: schema52.items.properties.dot.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err84];}else {vErrors.push(err84);}errors++;}}if(data40.title !== undefined){let data42 = data40.title;if(typeof data42 === "string"){if(func2(data42) < 1){const err85 = {instancePath:instancePath+"/cards/" + i4+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err85];}else {vErrors.push(err85);}errors++;}}else {const err86 = {instancePath:instancePath+"/cards/" + i4+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err86];}else {vErrors.push(err86);}errors++;}}if(data40.items !== undefined){let data43 = data40.items;if(Array.isArray(data43)){const len7 = data43.length;for(let i5=0; i5<len7; i5++){if(typeof data43[i5] !== "string"){const err87 = {instancePath:instancePath+"/cards/" + i4+"/items/" + i5,schemaPath:"common.schema.json#/$defs/cards/items/properties/items/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err87];}else {vErrors.push(err87);}errors++;}}}else {const err88 = {instancePath:instancePath+"/cards/" + i4+"/items",schemaPath:"common.schema.json#/$defs/cards/items/properties/items/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err88];}else {vErrors.push(err88);}errors++;}}}else {const err89 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err89];}else {vErrors.push(err89);}errors++;}}}else {const err90 = {instancePath:instancePath+"/cards",schemaPath:"common.schema.json#/$defs/cards/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err90];}else {vErrors.push(err90);}errors++;}}}else {const err91 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err91];}else {vErrors.push(err91);}errors++;}validate24.errors = vErrors;return errors === 0;}validate24.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};export const dataflow = validate27;const schema65 = {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://github.com/tt-a1i/archify/schemas/dataflow.schema.json","title":"Archify Data Flow Diagram","type":"object","additionalProperties":false,"required":["schema_version","diagram_type","meta","stages","nodes","flows"],"properties":{"schema_version":{"const":1},"diagram_type":{"const":"dataflow"},"meta":{"type":"object","additionalProperties":false,"required":["title"],"properties":{"title":{"type":"string","minLength":1},"subtitle":{"type":"string"},"output":{"type":"string"},"animation":{"enum":["trace","none"]},"visual_preset":{"enum":["classic","signal-flow","blueprint"]},"quality_profile":{"enum":["standard","showcase"]},"views":{"$ref":"common.schema.json#/$defs/guidedViews"},"viewBox":{"type":"array","prefixItems":[{"type":"number","minimum":360},{"type":"number","minimum":360}],"items":false,"minItems":2,"maxItems":2}}},"stages":{"type":"array","minItems":2,"maxItems":5,"items":{"type":"object","additionalProperties":false,"required":["label"],"properties":{"label":{"type":"string","minLength":1}}}},"nodes":{"type":"array","minItems":2,"items":{"type":"object","additionalProperties":false,"required":["id","type","label","stage","row"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"type":{"$ref":"common.schema.json#/$defs/componentType"},"label":{"type":"string","minLength":1},"sublabel":{"type":"string"},"tag":{"type":"string"},"stage":{"type":"integer","minimum":0},"row":{"type":"integer","minimum":0},"width":{"type":"number","minimum":48},"height":{"type":"number","minimum":36},"yOffset":{"type":"number"}}}},"flows":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["from","to","label"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"from":{"$ref":"common.schema.json#/$defs/id"},"to":{"$ref":"common.schema.json#/$defs/id"},"label":{"type":"string","minLength":1},"classification":{"type":"string"},"variant":{"$ref":"common.schema.json#/$defs/variant"},"route":{"enum":["auto","straight","vertical-channel","bottom-channel","top-channel"]},"fromSide":{"enum":["left","right","top","bottom"]},"toSide":{"enum":["left","right","top","bottom"]},"channelX":{"type":"number"},"channelY":{"type":"number"},"labelAt":{"$ref":"common.schema.json#/$defs/point"},"labelDx":{"type":"number"},"labelDy":{"type":"number"},"labelSegment":{"type":"integer","minimum":0},"via":{"type":"array","items":{"$ref":"common.schema.json#/$defs/point"}},"width":{"type":"number","minimum":0.5}}}},"cards":{"$ref":"common.schema.json#/$defs/cards"}}};function validate28(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate28.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(Array.isArray(data)){if(data.length > 5){const err0 = {instancePath,schemaPath:"#/maxItems",keyword:"maxItems",params:{limit: 5},message:"must NOT have more than 5 items"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];if(data0 && typeof data0 == "object" && !Array.isArray(data0)){if(data0.id === undefined){const err1 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data0.label === undefined){const err2 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data0.focus === undefined){const err3 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "focus"},message:"must have required property '"+"focus"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data0){if(!((((key0 === "id") || (key0 === "label")) || (key0 === "focus")) || (key0 === "note"))){const err4 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data0.id !== undefined){let data1 = data0.id;if(typeof data1 === "string"){if(!pattern4.test(data1)){const err5 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data0.label !== undefined){let data2 = data0.label;if(typeof data2 === "string"){if(func2(data2) > 48){const err7 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/maxLength",keyword:"maxLength",params:{limit: 48},message:"must NOT have more than 48 characters"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(func2(data2) < 1){const err8 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data0.focus !== undefined){let data3 = data0.focus;if(Array.isArray(data3)){if(data3.length < 1){const err10 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}const len1 = data3.length;for(let i1=0; i1<len1; i1++){let data4 = data3[i1];if(typeof data4 === "string"){if(!pattern4.test(data4)){const err11 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data0.note !== undefined){let data5 = data0.note;if(typeof data5 === "string"){if(func2(data5) > 140){const err14 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/maxLength",keyword:"maxLength",params:{limit: 140},message:"must NOT have more than 140 characters"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}else {const err15 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}}else {const err16 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}}else {const err17 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}validate28.errors = vErrors;return errors === 0;}validate28.evaluated = {"items":true,"dynamicProps":false,"dynamicItems":false};function validate27(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://github.com/tt-a1i/archify/schemas/dataflow.schema.json" */;let vErrors = null;let errors = 0;const evaluated0 = validate27.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.schema_version === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "schema_version"},message:"must have required property '"+"schema_version"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.diagram_type === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "diagram_type"},message:"must have required property '"+"diagram_type"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.meta === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "meta"},message:"must have required property '"+"meta"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.stages === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "stages"},message:"must have required property '"+"stages"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.nodes === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "nodes"},message:"must have required property '"+"nodes"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.flows === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "flows"},message:"must have required property '"+"flows"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}for(const key0 in data){if(!(((((((key0 === "schema_version") || (key0 === "diagram_type")) || (key0 === "meta")) || (key0 === "stages")) || (key0 === "nodes")) || (key0 === "flows")) || (key0 === "cards"))){const err6 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.schema_version !== undefined){if(1 !== data.schema_version){const err7 = {instancePath:instancePath+"/schema_version",schemaPath:"#/properties/schema_version/const",keyword:"const",params:{allowedValue: 1},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.diagram_type !== undefined){if("dataflow" !== data.diagram_type){const err8 = {instancePath:instancePath+"/diagram_type",schemaPath:"#/properties/diagram_type/const",keyword:"const",params:{allowedValue: "dataflow"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.meta !== undefined){let data2 = data.meta;if(data2 && typeof data2 == "object" && !Array.isArray(data2)){if(data2.title === undefined){const err9 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}for(const key1 in data2){if(!((((((((key1 === "title") || (key1 === "subtitle")) || (key1 === "output")) || (key1 === "animation")) || (key1 === "visual_preset")) || (key1 === "quality_profile")) || (key1 === "views")) || (key1 === "viewBox"))){const err10 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data2.title !== undefined){let data3 = data2.title;if(typeof data3 === "string"){if(func2(data3) < 1){const err11 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data2.subtitle !== undefined){if(typeof data2.subtitle !== "string"){const err13 = {instancePath:instancePath+"/meta/subtitle",schemaPath:"#/properties/meta/properties/subtitle/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data2.output !== undefined){if(typeof data2.output !== "string"){const err14 = {instancePath:instancePath+"/meta/output",schemaPath:"#/properties/meta/properties/output/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data2.animation !== undefined){let data6 = data2.animation;if(!((data6 === "trace") || (data6 === "none"))){const err15 = {instancePath:instancePath+"/meta/animation",schemaPath:"#/properties/meta/properties/animation/enum",keyword:"enum",params:{allowedValues: schema65.properties.meta.properties.animation.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data2.visual_preset !== undefined){let data7 = data2.visual_preset;if(!(((data7 === "classic") || (data7 === "signal-flow")) || (data7 === "blueprint"))){const err16 = {instancePath:instancePath+"/meta/visual_preset",schemaPath:"#/properties/meta/properties/visual_preset/enum",keyword:"enum",params:{allowedValues: schema65.properties.meta.properties.visual_preset.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data2.quality_profile !== undefined){let data8 = data2.quality_profile;if(!((data8 === "standard") || (data8 === "showcase"))){const err17 = {instancePath:instancePath+"/meta/quality_profile",schemaPath:"#/properties/meta/properties/quality_profile/enum",keyword:"enum",params:{allowedValues: schema65.properties.meta.properties.quality_profile.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data2.views !== undefined){if(!(validate28(data2.views, {instancePath:instancePath+"/meta/views",parentData:data2,parentDataProperty:"views",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate28.errors : vErrors.concat(validate28.errors);errors = vErrors.length;}}if(data2.viewBox !== undefined){let data10 = data2.viewBox;if(Array.isArray(data10)){if(data10.length > 2){const err18 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}if(data10.length < 2){const err19 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}const len0 = data10.length;if(len0 > 0){let data11 = data10[0];if((typeof data11 == "number") && (isFinite(data11))){if(data11 < 360 || isNaN(data11)){const err20 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/minimum",keyword:"minimum",params:{comparison: ">=", limit: 360},message:"must be >= 360"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}else {const err21 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(len0 > 1){let data12 = data10[1];if((typeof data12 == "number") && (isFinite(data12))){if(data12 < 360 || isNaN(data12)){const err22 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/minimum",keyword:"minimum",params:{comparison: ">=", limit: 360},message:"must be >= 360"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}else {const err23 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}const len1 = data10.length;if(!(len1 <= 2)){const err24 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}else {const err25 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}}else {const err26 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}if(data.stages !== undefined){let data13 = data.stages;if(Array.isArray(data13)){if(data13.length > 5){const err27 = {instancePath:instancePath+"/stages",schemaPath:"#/properties/stages/maxItems",keyword:"maxItems",params:{limit: 5},message:"must NOT have more than 5 items"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}if(data13.length < 2){const err28 = {instancePath:instancePath+"/stages",schemaPath:"#/properties/stages/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}const len2 = data13.length;for(let i0=0; i0<len2; i0++){let data14 = data13[i0];if(data14 && typeof data14 == "object" && !Array.isArray(data14)){if(data14.label === undefined){const err29 = {instancePath:instancePath+"/stages/" + i0,schemaPath:"#/properties/stages/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}for(const key2 in data14){if(!(key2 === "label")){const err30 = {instancePath:instancePath+"/stages/" + i0,schemaPath:"#/properties/stages/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}}if(data14.label !== undefined){let data15 = data14.label;if(typeof data15 === "string"){if(func2(data15) < 1){const err31 = {instancePath:instancePath+"/stages/" + i0+"/label",schemaPath:"#/properties/stages/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}else {const err32 = {instancePath:instancePath+"/stages/" + i0+"/label",schemaPath:"#/properties/stages/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}}else {const err33 = {instancePath:instancePath+"/stages/" + i0,schemaPath:"#/properties/stages/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}}else {const err34 = {instancePath:instancePath+"/stages",schemaPath:"#/properties/stages/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}if(data.nodes !== undefined){let data16 = data.nodes;if(Array.isArray(data16)){if(data16.length < 2){const err35 = {instancePath:instancePath+"/nodes",schemaPath:"#/properties/nodes/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}const len3 = data16.length;for(let i1=0; i1<len3; i1++){let data17 = data16[i1];if(data17 && typeof data17 == "object" && !Array.isArray(data17)){if(data17.id === undefined){const err36 = {instancePath:instancePath+"/nodes/" + i1,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}if(data17.type === undefined){const err37 = {instancePath:instancePath+"/nodes/" + i1,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "type"},message:"must have required property '"+"type"+"'"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}if(data17.label === undefined){const err38 = {instancePath:instancePath+"/nodes/" + i1,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}if(data17.stage === undefined){const err39 = {instancePath:instancePath+"/nodes/" + i1,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "stage"},message:"must have required property '"+"stage"+"'"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}if(data17.row === undefined){const err40 = {instancePath:instancePath+"/nodes/" + i1,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "row"},message:"must have required property '"+"row"+"'"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}for(const key3 in data17){if(!(func1.call(schema65.properties.nodes.items.properties, key3))){const err41 = {instancePath:instancePath+"/nodes/" + i1,schemaPath:"#/properties/nodes/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}}if(data17.id !== undefined){let data18 = data17.id;if(typeof data18 === "string"){if(!pattern4.test(data18)){const err42 = {instancePath:instancePath+"/nodes/" + i1+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}}else {const err43 = {instancePath:instancePath+"/nodes/" + i1+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}}if(data17.type !== undefined){let data19 = data17.type;if(!(((((((data19 === "frontend") || (data19 === "backend")) || (data19 === "database")) || (data19 === "cloud")) || (data19 === "security")) || (data19 === "messagebus")) || (data19 === "external"))){const err44 = {instancePath:instancePath+"/nodes/" + i1+"/type",schemaPath:"common.schema.json#/$defs/componentType/enum",keyword:"enum",params:{allowedValues: schema43.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}}if(data17.label !== undefined){let data20 = data17.label;if(typeof data20 === "string"){if(func2(data20) < 1){const err45 = {instancePath:instancePath+"/nodes/" + i1+"/label",schemaPath:"#/properties/nodes/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}}else {const err46 = {instancePath:instancePath+"/nodes/" + i1+"/label",schemaPath:"#/properties/nodes/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}}if(data17.sublabel !== undefined){if(typeof data17.sublabel !== "string"){const err47 = {instancePath:instancePath+"/nodes/" + i1+"/sublabel",schemaPath:"#/properties/nodes/items/properties/sublabel/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}}if(data17.tag !== undefined){if(typeof data17.tag !== "string"){const err48 = {instancePath:instancePath+"/nodes/" + i1+"/tag",schemaPath:"#/properties/nodes/items/properties/tag/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}}if(data17.stage !== undefined){let data23 = data17.stage;if(!(((typeof data23 == "number") && (!(data23 % 1) && !isNaN(data23))) && (isFinite(data23)))){const err49 = {instancePath:instancePath+"/nodes/" + i1+"/stage",schemaPath:"#/properties/nodes/items/properties/stage/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}if((typeof data23 == "number") && (isFinite(data23))){if(data23 < 0 || isNaN(data23)){const err50 = {instancePath:instancePath+"/nodes/" + i1+"/stage",schemaPath:"#/properties/nodes/items/properties/stage/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}}}if(data17.row !== undefined){let data24 = data17.row;if(!(((typeof data24 == "number") && (!(data24 % 1) && !isNaN(data24))) && (isFinite(data24)))){const err51 = {instancePath:instancePath+"/nodes/" + i1+"/row",schemaPath:"#/properties/nodes/items/properties/row/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}if((typeof data24 == "number") && (isFinite(data24))){if(data24 < 0 || isNaN(data24)){const err52 = {instancePath:instancePath+"/nodes/" + i1+"/row",schemaPath:"#/properties/nodes/items/properties/row/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}}}if(data17.width !== undefined){let data25 = data17.width;if((typeof data25 == "number") && (isFinite(data25))){if(data25 < 48 || isNaN(data25)){const err53 = {instancePath:instancePath+"/nodes/" + i1+"/width",schemaPath:"#/properties/nodes/items/properties/width/minimum",keyword:"minimum",params:{comparison: ">=", limit: 48},message:"must be >= 48"};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}}else {const err54 = {instancePath:instancePath+"/nodes/" + i1+"/width",schemaPath:"#/properties/nodes/items/properties/width/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}}if(data17.height !== undefined){let data26 = data17.height;if((typeof data26 == "number") && (isFinite(data26))){if(data26 < 36 || isNaN(data26)){const err55 = {instancePath:instancePath+"/nodes/" + i1+"/height",schemaPath:"#/properties/nodes/items/properties/height/minimum",keyword:"minimum",params:{comparison: ">=", limit: 36},message:"must be >= 36"};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}}else {const err56 = {instancePath:instancePath+"/nodes/" + i1+"/height",schemaPath:"#/properties/nodes/items/properties/height/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}}if(data17.yOffset !== undefined){let data27 = data17.yOffset;if(!((typeof data27 == "number") && (isFinite(data27)))){const err57 = {instancePath:instancePath+"/nodes/" + i1+"/yOffset",schemaPath:"#/properties/nodes/items/properties/yOffset/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}}}else {const err58 = {instancePath:instancePath+"/nodes/" + i1,schemaPath:"#/properties/nodes/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}}}else {const err59 = {instancePath:instancePath+"/nodes",schemaPath:"#/properties/nodes/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}}if(data.flows !== undefined){let data28 = data.flows;if(Array.isArray(data28)){const len4 = data28.length;for(let i2=0; i2<len4; i2++){let data29 = data28[i2];if(data29 && typeof data29 == "object" && !Array.isArray(data29)){if(data29.from === undefined){const err60 = {instancePath:instancePath+"/flows/" + i2,schemaPath:"#/properties/flows/items/required",keyword:"required",params:{missingProperty: "from"},message:"must have required property '"+"from"+"'"};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}if(data29.to === undefined){const err61 = {instancePath:instancePath+"/flows/" + i2,schemaPath:"#/properties/flows/items/required",keyword:"required",params:{missingProperty: "to"},message:"must have required property '"+"to"+"'"};if(vErrors === null){vErrors = [err61];}else {vErrors.push(err61);}errors++;}if(data29.label === undefined){const err62 = {instancePath:instancePath+"/flows/" + i2,schemaPath:"#/properties/flows/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err62];}else {vErrors.push(err62);}errors++;}for(const key4 in data29){if(!(func1.call(schema65.properties.flows.items.properties, key4))){const err63 = {instancePath:instancePath+"/flows/" + i2,schemaPath:"#/properties/flows/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key4},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;}}if(data29.id !== undefined){let data30 = data29.id;if(typeof data30 === "string"){if(!pattern4.test(data30)){const err64 = {instancePath:instancePath+"/flows/" + i2+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}}else {const err65 = {instancePath:instancePath+"/flows/" + i2+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}}if(data29.from !== undefined){let data31 = data29.from;if(typeof data31 === "string"){if(!pattern4.test(data31)){const err66 = {instancePath:instancePath+"/flows/" + i2+"/from",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err66];}else {vErrors.push(err66);}errors++;}}else {const err67 = {instancePath:instancePath+"/flows/" + i2+"/from",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err67];}else {vErrors.push(err67);}errors++;}}if(data29.to !== undefined){let data32 = data29.to;if(typeof data32 === "string"){if(!pattern4.test(data32)){const err68 = {instancePath:instancePath+"/flows/" + i2+"/to",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;}}else {const err69 = {instancePath:instancePath+"/flows/" + i2+"/to",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err69];}else {vErrors.push(err69);}errors++;}}if(data29.label !== undefined){let data33 = data29.label;if(typeof data33 === "string"){if(func2(data33) < 1){const err70 = {instancePath:instancePath+"/flows/" + i2+"/label",schemaPath:"#/properties/flows/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err70];}else {vErrors.push(err70);}errors++;}}else {const err71 = {instancePath:instancePath+"/flows/" + i2+"/label",schemaPath:"#/properties/flows/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err71];}else {vErrors.push(err71);}errors++;}}if(data29.classification !== undefined){if(typeof data29.classification !== "string"){const err72 = {instancePath:instancePath+"/flows/" + i2+"/classification",schemaPath:"#/properties/flows/items/properties/classification/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err72];}else {vErrors.push(err72);}errors++;}}if(data29.variant !== undefined){let data35 = data29.variant;if(!((((data35 === "default") || (data35 === "emphasis")) || (data35 === "security")) || (data35 === "dashed"))){const err73 = {instancePath:instancePath+"/flows/" + i2+"/variant",schemaPath:"common.schema.json#/$defs/variant/enum",keyword:"enum",params:{allowedValues: schema47.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err73];}else {vErrors.push(err73);}errors++;}}if(data29.route !== undefined){let data36 = data29.route;if(!(((((data36 === "auto") || (data36 === "straight")) || (data36 === "vertical-channel")) || (data36 === "bottom-channel")) || (data36 === "top-channel"))){const err74 = {instancePath:instancePath+"/flows/" + i2+"/route",schemaPath:"#/properties/flows/items/properties/route/enum",keyword:"enum",params:{allowedValues: schema65.properties.flows.items.properties.route.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err74];}else {vErrors.push(err74);}errors++;}}if(data29.fromSide !== undefined){let data37 = data29.fromSide;if(!((((data37 === "left") || (data37 === "right")) || (data37 === "top")) || (data37 === "bottom"))){const err75 = {instancePath:instancePath+"/flows/" + i2+"/fromSide",schemaPath:"#/properties/flows/items/properties/fromSide/enum",keyword:"enum",params:{allowedValues: schema65.properties.flows.items.properties.fromSide.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err75];}else {vErrors.push(err75);}errors++;}}if(data29.toSide !== undefined){let data38 = data29.toSide;if(!((((data38 === "left") || (data38 === "right")) || (data38 === "top")) || (data38 === "bottom"))){const err76 = {instancePath:instancePath+"/flows/" + i2+"/toSide",schemaPath:"#/properties/flows/items/properties/toSide/enum",keyword:"enum",params:{allowedValues: schema65.properties.flows.items.properties.toSide.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err76];}else {vErrors.push(err76);}errors++;}}if(data29.channelX !== undefined){let data39 = data29.channelX;if(!((typeof data39 == "number") && (isFinite(data39)))){const err77 = {instancePath:instancePath+"/flows/" + i2+"/channelX",schemaPath:"#/properties/flows/items/properties/channelX/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err77];}else {vErrors.push(err77);}errors++;}}if(data29.channelY !== undefined){let data40 = data29.channelY;if(!((typeof data40 == "number") && (isFinite(data40)))){const err78 = {instancePath:instancePath+"/flows/" + i2+"/channelY",schemaPath:"#/properties/flows/items/properties/channelY/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err78];}else {vErrors.push(err78);}errors++;}}if(data29.labelAt !== undefined){let data41 = data29.labelAt;if(Array.isArray(data41)){if(data41.length > 2){const err79 = {instancePath:instancePath+"/flows/" + i2+"/labelAt",schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err79];}else {vErrors.push(err79);}errors++;}if(data41.length < 2){const err80 = {instancePath:instancePath+"/flows/" + i2+"/labelAt",schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err80];}else {vErrors.push(err80);}errors++;}const len5 = data41.length;if(len5 > 0){let data42 = data41[0];if(!((typeof data42 == "number") && (isFinite(data42)))){const err81 = {instancePath:instancePath+"/flows/" + i2+"/labelAt/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err81];}else {vErrors.push(err81);}errors++;}}if(len5 > 1){let data43 = data41[1];if(!((typeof data43 == "number") && (isFinite(data43)))){const err82 = {instancePath:instancePath+"/flows/" + i2+"/labelAt/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err82];}else {vErrors.push(err82);}errors++;}}const len6 = data41.length;if(!(len6 <= 2)){const err83 = {instancePath:instancePath+"/flows/" + i2+"/labelAt",schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err83];}else {vErrors.push(err83);}errors++;}}else {const err84 = {instancePath:instancePath+"/flows/" + i2+"/labelAt",schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err84];}else {vErrors.push(err84);}errors++;}}if(data29.labelDx !== undefined){let data44 = data29.labelDx;if(!((typeof data44 == "number") && (isFinite(data44)))){const err85 = {instancePath:instancePath+"/flows/" + i2+"/labelDx",schemaPath:"#/properties/flows/items/properties/labelDx/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err85];}else {vErrors.push(err85);}errors++;}}if(data29.labelDy !== undefined){let data45 = data29.labelDy;if(!((typeof data45 == "number") && (isFinite(data45)))){const err86 = {instancePath:instancePath+"/flows/" + i2+"/labelDy",schemaPath:"#/properties/flows/items/properties/labelDy/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err86];}else {vErrors.push(err86);}errors++;}}if(data29.labelSegment !== undefined){let data46 = data29.labelSegment;if(!(((typeof data46 == "number") && (!(data46 % 1) && !isNaN(data46))) && (isFinite(data46)))){const err87 = {instancePath:instancePath+"/flows/" + i2+"/labelSegment",schemaPath:"#/properties/flows/items/properties/labelSegment/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err87];}else {vErrors.push(err87);}errors++;}if((typeof data46 == "number") && (isFinite(data46))){if(data46 < 0 || isNaN(data46)){const err88 = {instancePath:instancePath+"/flows/" + i2+"/labelSegment",schemaPath:"#/properties/flows/items/properties/labelSegment/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err88];}else {vErrors.push(err88);}errors++;}}}if(data29.via !== undefined){let data47 = data29.via;if(Array.isArray(data47)){const len7 = data47.length;for(let i3=0; i3<len7; i3++){let data48 = data47[i3];if(Array.isArray(data48)){if(data48.length > 2){const err89 = {instancePath:instancePath+"/flows/" + i2+"/via/" + i3,schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err89];}else {vErrors.push(err89);}errors++;}if(data48.length < 2){const err90 = {instancePath:instancePath+"/flows/" + i2+"/via/" + i3,schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err90];}else {vErrors.push(err90);}errors++;}const len8 = data48.length;if(len8 > 0){let data49 = data48[0];if(!((typeof data49 == "number") && (isFinite(data49)))){const err91 = {instancePath:instancePath+"/flows/" + i2+"/via/" + i3+"/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err91];}else {vErrors.push(err91);}errors++;}}if(len8 > 1){let data50 = data48[1];if(!((typeof data50 == "number") && (isFinite(data50)))){const err92 = {instancePath:instancePath+"/flows/" + i2+"/via/" + i3+"/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err92];}else {vErrors.push(err92);}errors++;}}const len9 = data48.length;if(!(len9 <= 2)){const err93 = {instancePath:instancePath+"/flows/" + i2+"/via/" + i3,schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err93];}else {vErrors.push(err93);}errors++;}}else {const err94 = {instancePath:instancePath+"/flows/" + i2+"/via/" + i3,schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err94];}else {vErrors.push(err94);}errors++;}}}else {const err95 = {instancePath:instancePath+"/flows/" + i2+"/via",schemaPath:"#/properties/flows/items/properties/via/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err95];}else {vErrors.push(err95);}errors++;}}if(data29.width !== undefined){let data51 = data29.width;if((typeof data51 == "number") && (isFinite(data51))){if(data51 < 0.5 || isNaN(data51)){const err96 = {instancePath:instancePath+"/flows/" + i2+"/width",schemaPath:"#/properties/flows/items/properties/width/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0.5},message:"must be >= 0.5"};if(vErrors === null){vErrors = [err96];}else {vErrors.push(err96);}errors++;}}else {const err97 = {instancePath:instancePath+"/flows/" + i2+"/width",schemaPath:"#/properties/flows/items/properties/width/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err97];}else {vErrors.push(err97);}errors++;}}}else {const err98 = {instancePath:instancePath+"/flows/" + i2,schemaPath:"#/properties/flows/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err98];}else {vErrors.push(err98);}errors++;}}}else {const err99 = {instancePath:instancePath+"/flows",schemaPath:"#/properties/flows/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err99];}else {vErrors.push(err99);}errors++;}}if(data.cards !== undefined){let data52 = data.cards;if(Array.isArray(data52)){const len10 = data52.length;for(let i4=0; i4<len10; i4++){let data53 = data52[i4];if(data53 && typeof data53 == "object" && !Array.isArray(data53)){if(data53.dot === undefined){const err100 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "dot"},message:"must have required property '"+"dot"+"'"};if(vErrors === null){vErrors = [err100];}else {vErrors.push(err100);}errors++;}if(data53.title === undefined){const err101 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err101];}else {vErrors.push(err101);}errors++;}if(data53.items === undefined){const err102 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "items"},message:"must have required property '"+"items"+"'"};if(vErrors === null){vErrors = [err102];}else {vErrors.push(err102);}errors++;}for(const key5 in data53){if(!(((key5 === "dot") || (key5 === "title")) || (key5 === "items"))){const err103 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key5},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err103];}else {vErrors.push(err103);}errors++;}}if(data53.dot !== undefined){let data54 = data53.dot;if(!(((((((data54 === "cyan") || (data54 === "emerald")) || (data54 === "violet")) || (data54 === "amber")) || (data54 === "rose")) || (data54 === "orange")) || (data54 === "slate"))){const err104 = {instancePath:instancePath+"/cards/" + i4+"/dot",schemaPath:"common.schema.json#/$defs/cards/items/properties/dot/enum",keyword:"enum",params:{allowedValues: schema52.items.properties.dot.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err104];}else {vErrors.push(err104);}errors++;}}if(data53.title !== undefined){let data55 = data53.title;if(typeof data55 === "string"){if(func2(data55) < 1){const err105 = {instancePath:instancePath+"/cards/" + i4+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err105];}else {vErrors.push(err105);}errors++;}}else {const err106 = {instancePath:instancePath+"/cards/" + i4+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err106];}else {vErrors.push(err106);}errors++;}}if(data53.items !== undefined){let data56 = data53.items;if(Array.isArray(data56)){const len11 = data56.length;for(let i5=0; i5<len11; i5++){if(typeof data56[i5] !== "string"){const err107 = {instancePath:instancePath+"/cards/" + i4+"/items/" + i5,schemaPath:"common.schema.json#/$defs/cards/items/properties/items/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err107];}else {vErrors.push(err107);}errors++;}}}else {const err108 = {instancePath:instancePath+"/cards/" + i4+"/items",schemaPath:"common.schema.json#/$defs/cards/items/properties/items/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err108];}else {vErrors.push(err108);}errors++;}}}else {const err109 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err109];}else {vErrors.push(err109);}errors++;}}}else {const err110 = {instancePath:instancePath+"/cards",schemaPath:"common.schema.json#/$defs/cards/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err110];}else {vErrors.push(err110);}errors++;}}}else {const err111 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err111];}else {vErrors.push(err111);}errors++;}validate27.errors = vErrors;return errors === 0;}validate27.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};export const lifecycle = validate30;const schema78 = {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://github.com/tt-a1i/archify/schemas/lifecycle.schema.json","title":"Archify Lifecycle Diagram","type":"object","additionalProperties":false,"required":["schema_version","diagram_type","meta","lanes","states","transitions"],"properties":{"schema_version":{"const":1},"diagram_type":{"const":"lifecycle"},"meta":{"type":"object","additionalProperties":false,"required":["title"],"properties":{"title":{"type":"string","minLength":1},"subtitle":{"type":"string"},"output":{"type":"string"},"animation":{"enum":["trace","none"]},"visual_preset":{"enum":["classic","signal-flow","blueprint"]},"quality_profile":{"enum":["standard","showcase"]},"views":{"$ref":"common.schema.json#/$defs/guidedViews"},"viewBox":{"type":"array","prefixItems":[{"type":"number","minimum":420},{"type":"number","minimum":566}],"items":false,"minItems":2,"maxItems":2}}},"lanes":{"type":"array","minItems":1,"maxItems":4,"items":{"type":"object","additionalProperties":false,"required":["id","label"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"label":{"type":"string","minLength":1}}}},"states":{"type":"array","minItems":2,"items":{"type":"object","additionalProperties":false,"required":["id","type","label","lane","col"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"type":{"enum":["start","active","waiting","decision","success","failure","neutral","external"]},"label":{"type":"string","minLength":1},"sublabel":{"type":"string"},"tag":{"type":"string"},"step":{"type":"string"},"lane":{"$ref":"common.schema.json#/$defs/id"},"col":{"type":"integer","minimum":0,"maximum":4},"width":{"type":"number","minimum":48},"height":{"type":"number","minimum":36},"yOffset":{"type":"number"}}}},"transitions":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["from","to"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"from":{"$ref":"common.schema.json#/$defs/id"},"to":{"$ref":"common.schema.json#/$defs/id"},"label":{"type":"string"},"note":{"type":"string"},"variant":{"$ref":"common.schema.json#/$defs/variant"},"route":{"enum":["auto","straight","drop","bottom-channel","top-channel","right-channel","left-channel"]},"fromSide":{"enum":["left","right","top","bottom"]},"toSide":{"enum":["left","right","top","bottom"]},"channelX":{"type":"number"},"channelY":{"type":"number"},"cornerRadius":{"type":"number","minimum":0},"labelAt":{"$ref":"common.schema.json#/$defs/point"},"labelDx":{"type":"number"},"labelDy":{"type":"number"},"labelSegment":{"type":"integer","minimum":0},"via":{"type":"array","items":{"$ref":"common.schema.json#/$defs/point"}},"width":{"type":"number","minimum":0.5}}}},"cards":{"$ref":"common.schema.json#/$defs/cards"}}};function validate31(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate31.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(Array.isArray(data)){if(data.length > 5){const err0 = {instancePath,schemaPath:"#/maxItems",keyword:"maxItems",params:{limit: 5},message:"must NOT have more than 5 items"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];if(data0 && typeof data0 == "object" && !Array.isArray(data0)){if(data0.id === undefined){const err1 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data0.label === undefined){const err2 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data0.focus === undefined){const err3 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "focus"},message:"must have required property '"+"focus"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data0){if(!((((key0 === "id") || (key0 === "label")) || (key0 === "focus")) || (key0 === "note"))){const err4 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data0.id !== undefined){let data1 = data0.id;if(typeof data1 === "string"){if(!pattern4.test(data1)){const err5 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data0.label !== undefined){let data2 = data0.label;if(typeof data2 === "string"){if(func2(data2) > 48){const err7 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/maxLength",keyword:"maxLength",params:{limit: 48},message:"must NOT have more than 48 characters"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(func2(data2) < 1){const err8 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data0.focus !== undefined){let data3 = data0.focus;if(Array.isArray(data3)){if(data3.length < 1){const err10 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}const len1 = data3.length;for(let i1=0; i1<len1; i1++){let data4 = data3[i1];if(typeof data4 === "string"){if(!pattern4.test(data4)){const err11 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data0.note !== undefined){let data5 = data0.note;if(typeof data5 === "string"){if(func2(data5) > 140){const err14 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/maxLength",keyword:"maxLength",params:{limit: 140},message:"must NOT have more than 140 characters"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}else {const err15 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}}else {const err16 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}}else {const err17 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}validate31.errors = vErrors;return errors === 0;}validate31.evaluated = {"items":true,"dynamicProps":false,"dynamicItems":false};function validate30(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://github.com/tt-a1i/archify/schemas/lifecycle.schema.json" */;let vErrors = null;let errors = 0;const evaluated0 = validate30.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.schema_version === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "schema_version"},message:"must have required property '"+"schema_version"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.diagram_type === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "diagram_type"},message:"must have required property '"+"diagram_type"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.meta === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "meta"},message:"must have required property '"+"meta"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.lanes === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "lanes"},message:"must have required property '"+"lanes"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.states === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "states"},message:"must have required property '"+"states"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.transitions === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "transitions"},message:"must have required property '"+"transitions"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}for(const key0 in data){if(!(((((((key0 === "schema_version") || (key0 === "diagram_type")) || (key0 === "meta")) || (key0 === "lanes")) || (key0 === "states")) || (key0 === "transitions")) || (key0 === "cards"))){const err6 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.schema_version !== undefined){if(1 !== data.schema_version){const err7 = {instancePath:instancePath+"/schema_version",schemaPath:"#/properties/schema_version/const",keyword:"const",params:{allowedValue: 1},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.diagram_type !== undefined){if("lifecycle" !== data.diagram_type){const err8 = {instancePath:instancePath+"/diagram_type",schemaPath:"#/properties/diagram_type/const",keyword:"const",params:{allowedValue: "lifecycle"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.meta !== undefined){let data2 = data.meta;if(data2 && typeof data2 == "object" && !Array.isArray(data2)){if(data2.title === undefined){const err9 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}for(const key1 in data2){if(!((((((((key1 === "title") || (key1 === "subtitle")) || (key1 === "output")) || (key1 === "animation")) || (key1 === "visual_preset")) || (key1 === "quality_profile")) || (key1 === "views")) || (key1 === "viewBox"))){const err10 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data2.title !== undefined){let data3 = data2.title;if(typeof data3 === "string"){if(func2(data3) < 1){const err11 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data2.subtitle !== undefined){if(typeof data2.subtitle !== "string"){const err13 = {instancePath:instancePath+"/meta/subtitle",schemaPath:"#/properties/meta/properties/subtitle/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data2.output !== undefined){if(typeof data2.output !== "string"){const err14 = {instancePath:instancePath+"/meta/output",schemaPath:"#/properties/meta/properties/output/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data2.animation !== undefined){let data6 = data2.animation;if(!((data6 === "trace") || (data6 === "none"))){const err15 = {instancePath:instancePath+"/meta/animation",schemaPath:"#/properties/meta/properties/animation/enum",keyword:"enum",params:{allowedValues: schema78.properties.meta.properties.animation.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data2.visual_preset !== undefined){let data7 = data2.visual_preset;if(!(((data7 === "classic") || (data7 === "signal-flow")) || (data7 === "blueprint"))){const err16 = {instancePath:instancePath+"/meta/visual_preset",schemaPath:"#/properties/meta/properties/visual_preset/enum",keyword:"enum",params:{allowedValues: schema78.properties.meta.properties.visual_preset.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data2.quality_profile !== undefined){let data8 = data2.quality_profile;if(!((data8 === "standard") || (data8 === "showcase"))){const err17 = {instancePath:instancePath+"/meta/quality_profile",schemaPath:"#/properties/meta/properties/quality_profile/enum",keyword:"enum",params:{allowedValues: schema78.properties.meta.properties.quality_profile.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data2.views !== undefined){if(!(validate31(data2.views, {instancePath:instancePath+"/meta/views",parentData:data2,parentDataProperty:"views",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate31.errors : vErrors.concat(validate31.errors);errors = vErrors.length;}}if(data2.viewBox !== undefined){let data10 = data2.viewBox;if(Array.isArray(data10)){if(data10.length > 2){const err18 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}if(data10.length < 2){const err19 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}const len0 = data10.length;if(len0 > 0){let data11 = data10[0];if((typeof data11 == "number") && (isFinite(data11))){if(data11 < 420 || isNaN(data11)){const err20 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/minimum",keyword:"minimum",params:{comparison: ">=", limit: 420},message:"must be >= 420"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}else {const err21 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(len0 > 1){let data12 = data10[1];if((typeof data12 == "number") && (isFinite(data12))){if(data12 < 566 || isNaN(data12)){const err22 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/minimum",keyword:"minimum",params:{comparison: ">=", limit: 566},message:"must be >= 566"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}else {const err23 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}const len1 = data10.length;if(!(len1 <= 2)){const err24 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}else {const err25 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}}else {const err26 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}if(data.lanes !== undefined){let data13 = data.lanes;if(Array.isArray(data13)){if(data13.length > 4){const err27 = {instancePath:instancePath+"/lanes",schemaPath:"#/properties/lanes/maxItems",keyword:"maxItems",params:{limit: 4},message:"must NOT have more than 4 items"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}if(data13.length < 1){const err28 = {instancePath:instancePath+"/lanes",schemaPath:"#/properties/lanes/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}const len2 = data13.length;for(let i0=0; i0<len2; i0++){let data14 = data13[i0];if(data14 && typeof data14 == "object" && !Array.isArray(data14)){if(data14.id === undefined){const err29 = {instancePath:instancePath+"/lanes/" + i0,schemaPath:"#/properties/lanes/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}if(data14.label === undefined){const err30 = {instancePath:instancePath+"/lanes/" + i0,schemaPath:"#/properties/lanes/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}for(const key2 in data14){if(!((key2 === "id") || (key2 === "label"))){const err31 = {instancePath:instancePath+"/lanes/" + i0,schemaPath:"#/properties/lanes/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}if(data14.id !== undefined){let data15 = data14.id;if(typeof data15 === "string"){if(!pattern4.test(data15)){const err32 = {instancePath:instancePath+"/lanes/" + i0+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}else {const err33 = {instancePath:instancePath+"/lanes/" + i0+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}if(data14.label !== undefined){let data16 = data14.label;if(typeof data16 === "string"){if(func2(data16) < 1){const err34 = {instancePath:instancePath+"/lanes/" + i0+"/label",schemaPath:"#/properties/lanes/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}else {const err35 = {instancePath:instancePath+"/lanes/" + i0+"/label",schemaPath:"#/properties/lanes/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}}else {const err36 = {instancePath:instancePath+"/lanes/" + i0,schemaPath:"#/properties/lanes/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}}else {const err37 = {instancePath:instancePath+"/lanes",schemaPath:"#/properties/lanes/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}}if(data.states !== undefined){let data17 = data.states;if(Array.isArray(data17)){if(data17.length < 2){const err38 = {instancePath:instancePath+"/states",schemaPath:"#/properties/states/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}const len3 = data17.length;for(let i1=0; i1<len3; i1++){let data18 = data17[i1];if(data18 && typeof data18 == "object" && !Array.isArray(data18)){if(data18.id === undefined){const err39 = {instancePath:instancePath+"/states/" + i1,schemaPath:"#/properties/states/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}if(data18.type === undefined){const err40 = {instancePath:instancePath+"/states/" + i1,schemaPath:"#/properties/states/items/required",keyword:"required",params:{missingProperty: "type"},message:"must have required property '"+"type"+"'"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}if(data18.label === undefined){const err41 = {instancePath:instancePath+"/states/" + i1,schemaPath:"#/properties/states/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}if(data18.lane === undefined){const err42 = {instancePath:instancePath+"/states/" + i1,schemaPath:"#/properties/states/items/required",keyword:"required",params:{missingProperty: "lane"},message:"must have required property '"+"lane"+"'"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}if(data18.col === undefined){const err43 = {instancePath:instancePath+"/states/" + i1,schemaPath:"#/properties/states/items/required",keyword:"required",params:{missingProperty: "col"},message:"must have required property '"+"col"+"'"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}for(const key3 in data18){if(!(func1.call(schema78.properties.states.items.properties, key3))){const err44 = {instancePath:instancePath+"/states/" + i1,schemaPath:"#/properties/states/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}}if(data18.id !== undefined){let data19 = data18.id;if(typeof data19 === "string"){if(!pattern4.test(data19)){const err45 = {instancePath:instancePath+"/states/" + i1+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}}else {const err46 = {instancePath:instancePath+"/states/" + i1+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}}if(data18.type !== undefined){let data20 = data18.type;if(!((((((((data20 === "start") || (data20 === "active")) || (data20 === "waiting")) || (data20 === "decision")) || (data20 === "success")) || (data20 === "failure")) || (data20 === "neutral")) || (data20 === "external"))){const err47 = {instancePath:instancePath+"/states/" + i1+"/type",schemaPath:"#/properties/states/items/properties/type/enum",keyword:"enum",params:{allowedValues: schema78.properties.states.items.properties.type.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}}if(data18.label !== undefined){let data21 = data18.label;if(typeof data21 === "string"){if(func2(data21) < 1){const err48 = {instancePath:instancePath+"/states/" + i1+"/label",schemaPath:"#/properties/states/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}}else {const err49 = {instancePath:instancePath+"/states/" + i1+"/label",schemaPath:"#/properties/states/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}}if(data18.sublabel !== undefined){if(typeof data18.sublabel !== "string"){const err50 = {instancePath:instancePath+"/states/" + i1+"/sublabel",schemaPath:"#/properties/states/items/properties/sublabel/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}}if(data18.tag !== undefined){if(typeof data18.tag !== "string"){const err51 = {instancePath:instancePath+"/states/" + i1+"/tag",schemaPath:"#/properties/states/items/properties/tag/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}}if(data18.step !== undefined){if(typeof data18.step !== "string"){const err52 = {instancePath:instancePath+"/states/" + i1+"/step",schemaPath:"#/properties/states/items/properties/step/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}}if(data18.lane !== undefined){let data25 = data18.lane;if(typeof data25 === "string"){if(!pattern4.test(data25)){const err53 = {instancePath:instancePath+"/states/" + i1+"/lane",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}}else {const err54 = {instancePath:instancePath+"/states/" + i1+"/lane",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}}if(data18.col !== undefined){let data26 = data18.col;if(!(((typeof data26 == "number") && (!(data26 % 1) && !isNaN(data26))) && (isFinite(data26)))){const err55 = {instancePath:instancePath+"/states/" + i1+"/col",schemaPath:"#/properties/states/items/properties/col/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}if((typeof data26 == "number") && (isFinite(data26))){if(data26 > 4 || isNaN(data26)){const err56 = {instancePath:instancePath+"/states/" + i1+"/col",schemaPath:"#/properties/states/items/properties/col/maximum",keyword:"maximum",params:{comparison: "<=", limit: 4},message:"must be <= 4"};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}if(data26 < 0 || isNaN(data26)){const err57 = {instancePath:instancePath+"/states/" + i1+"/col",schemaPath:"#/properties/states/items/properties/col/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}}}if(data18.width !== undefined){let data27 = data18.width;if((typeof data27 == "number") && (isFinite(data27))){if(data27 < 48 || isNaN(data27)){const err58 = {instancePath:instancePath+"/states/" + i1+"/width",schemaPath:"#/properties/states/items/properties/width/minimum",keyword:"minimum",params:{comparison: ">=", limit: 48},message:"must be >= 48"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}}else {const err59 = {instancePath:instancePath+"/states/" + i1+"/width",schemaPath:"#/properties/states/items/properties/width/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}}if(data18.height !== undefined){let data28 = data18.height;if((typeof data28 == "number") && (isFinite(data28))){if(data28 < 36 || isNaN(data28)){const err60 = {instancePath:instancePath+"/states/" + i1+"/height",schemaPath:"#/properties/states/items/properties/height/minimum",keyword:"minimum",params:{comparison: ">=", limit: 36},message:"must be >= 36"};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}}else {const err61 = {instancePath:instancePath+"/states/" + i1+"/height",schemaPath:"#/properties/states/items/properties/height/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err61];}else {vErrors.push(err61);}errors++;}}if(data18.yOffset !== undefined){let data29 = data18.yOffset;if(!((typeof data29 == "number") && (isFinite(data29)))){const err62 = {instancePath:instancePath+"/states/" + i1+"/yOffset",schemaPath:"#/properties/states/items/properties/yOffset/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err62];}else {vErrors.push(err62);}errors++;}}}else {const err63 = {instancePath:instancePath+"/states/" + i1,schemaPath:"#/properties/states/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;}}}else {const err64 = {instancePath:instancePath+"/states",schemaPath:"#/properties/states/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}}if(data.transitions !== undefined){let data30 = data.transitions;if(Array.isArray(data30)){const len4 = data30.length;for(let i2=0; i2<len4; i2++){let data31 = data30[i2];if(data31 && typeof data31 == "object" && !Array.isArray(data31)){if(data31.from === undefined){const err65 = {instancePath:instancePath+"/transitions/" + i2,schemaPath:"#/properties/transitions/items/required",keyword:"required",params:{missingProperty: "from"},message:"must have required property '"+"from"+"'"};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}if(data31.to === undefined){const err66 = {instancePath:instancePath+"/transitions/" + i2,schemaPath:"#/properties/transitions/items/required",keyword:"required",params:{missingProperty: "to"},message:"must have required property '"+"to"+"'"};if(vErrors === null){vErrors = [err66];}else {vErrors.push(err66);}errors++;}for(const key4 in data31){if(!(func1.call(schema78.properties.transitions.items.properties, key4))){const err67 = {instancePath:instancePath+"/transitions/" + i2,schemaPath:"#/properties/transitions/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key4},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err67];}else {vErrors.push(err67);}errors++;}}if(data31.id !== undefined){let data32 = data31.id;if(typeof data32 === "string"){if(!pattern4.test(data32)){const err68 = {instancePath:instancePath+"/transitions/" + i2+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;}}else {const err69 = {instancePath:instancePath+"/transitions/" + i2+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err69];}else {vErrors.push(err69);}errors++;}}if(data31.from !== undefined){let data33 = data31.from;if(typeof data33 === "string"){if(!pattern4.test(data33)){const err70 = {instancePath:instancePath+"/transitions/" + i2+"/from",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err70];}else {vErrors.push(err70);}errors++;}}else {const err71 = {instancePath:instancePath+"/transitions/" + i2+"/from",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err71];}else {vErrors.push(err71);}errors++;}}if(data31.to !== undefined){let data34 = data31.to;if(typeof data34 === "string"){if(!pattern4.test(data34)){const err72 = {instancePath:instancePath+"/transitions/" + i2+"/to",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err72];}else {vErrors.push(err72);}errors++;}}else {const err73 = {instancePath:instancePath+"/transitions/" + i2+"/to",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err73];}else {vErrors.push(err73);}errors++;}}if(data31.label !== undefined){if(typeof data31.label !== "string"){const err74 = {instancePath:instancePath+"/transitions/" + i2+"/label",schemaPath:"#/properties/transitions/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err74];}else {vErrors.push(err74);}errors++;}}if(data31.note !== undefined){if(typeof data31.note !== "string"){const err75 = {instancePath:instancePath+"/transitions/" + i2+"/note",schemaPath:"#/properties/transitions/items/properties/note/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err75];}else {vErrors.push(err75);}errors++;}}if(data31.variant !== undefined){let data37 = data31.variant;if(!((((data37 === "default") || (data37 === "emphasis")) || (data37 === "security")) || (data37 === "dashed"))){const err76 = {instancePath:instancePath+"/transitions/" + i2+"/variant",schemaPath:"common.schema.json#/$defs/variant/enum",keyword:"enum",params:{allowedValues: schema47.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err76];}else {vErrors.push(err76);}errors++;}}if(data31.route !== undefined){let data38 = data31.route;if(!(((((((data38 === "auto") || (data38 === "straight")) || (data38 === "drop")) || (data38 === "bottom-channel")) || (data38 === "top-channel")) || (data38 === "right-channel")) || (data38 === "left-channel"))){const err77 = {instancePath:instancePath+"/transitions/" + i2+"/route",schemaPath:"#/properties/transitions/items/properties/route/enum",keyword:"enum",params:{allowedValues: schema78.properties.transitions.items.properties.route.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err77];}else {vErrors.push(err77);}errors++;}}if(data31.fromSide !== undefined){let data39 = data31.fromSide;if(!((((data39 === "left") || (data39 === "right")) || (data39 === "top")) || (data39 === "bottom"))){const err78 = {instancePath:instancePath+"/transitions/" + i2+"/fromSide",schemaPath:"#/properties/transitions/items/properties/fromSide/enum",keyword:"enum",params:{allowedValues: schema78.properties.transitions.items.properties.fromSide.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err78];}else {vErrors.push(err78);}errors++;}}if(data31.toSide !== undefined){let data40 = data31.toSide;if(!((((data40 === "left") || (data40 === "right")) || (data40 === "top")) || (data40 === "bottom"))){const err79 = {instancePath:instancePath+"/transitions/" + i2+"/toSide",schemaPath:"#/properties/transitions/items/properties/toSide/enum",keyword:"enum",params:{allowedValues: schema78.properties.transitions.items.properties.toSide.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err79];}else {vErrors.push(err79);}errors++;}}if(data31.channelX !== undefined){let data41 = data31.channelX;if(!((typeof data41 == "number") && (isFinite(data41)))){const err80 = {instancePath:instancePath+"/transitions/" + i2+"/channelX",schemaPath:"#/properties/transitions/items/properties/channelX/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err80];}else {vErrors.push(err80);}errors++;}}if(data31.channelY !== undefined){let data42 = data31.channelY;if(!((typeof data42 == "number") && (isFinite(data42)))){const err81 = {instancePath:instancePath+"/transitions/" + i2+"/channelY",schemaPath:"#/properties/transitions/items/properties/channelY/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err81];}else {vErrors.push(err81);}errors++;}}if(data31.cornerRadius !== undefined){let data43 = data31.cornerRadius;if((typeof data43 == "number") && (isFinite(data43))){if(data43 < 0 || isNaN(data43)){const err82 = {instancePath:instancePath+"/transitions/" + i2+"/cornerRadius",schemaPath:"#/properties/transitions/items/properties/cornerRadius/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err82];}else {vErrors.push(err82);}errors++;}}else {const err83 = {instancePath:instancePath+"/transitions/" + i2+"/cornerRadius",schemaPath:"#/properties/transitions/items/properties/cornerRadius/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err83];}else {vErrors.push(err83);}errors++;}}if(data31.labelAt !== undefined){let data44 = data31.labelAt;if(Array.isArray(data44)){if(data44.length > 2){const err84 = {instancePath:instancePath+"/transitions/" + i2+"/labelAt",schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err84];}else {vErrors.push(err84);}errors++;}if(data44.length < 2){const err85 = {instancePath:instancePath+"/transitions/" + i2+"/labelAt",schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err85];}else {vErrors.push(err85);}errors++;}const len5 = data44.length;if(len5 > 0){let data45 = data44[0];if(!((typeof data45 == "number") && (isFinite(data45)))){const err86 = {instancePath:instancePath+"/transitions/" + i2+"/labelAt/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err86];}else {vErrors.push(err86);}errors++;}}if(len5 > 1){let data46 = data44[1];if(!((typeof data46 == "number") && (isFinite(data46)))){const err87 = {instancePath:instancePath+"/transitions/" + i2+"/labelAt/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err87];}else {vErrors.push(err87);}errors++;}}const len6 = data44.length;if(!(len6 <= 2)){const err88 = {instancePath:instancePath+"/transitions/" + i2+"/labelAt",schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err88];}else {vErrors.push(err88);}errors++;}}else {const err89 = {instancePath:instancePath+"/transitions/" + i2+"/labelAt",schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err89];}else {vErrors.push(err89);}errors++;}}if(data31.labelDx !== undefined){let data47 = data31.labelDx;if(!((typeof data47 == "number") && (isFinite(data47)))){const err90 = {instancePath:instancePath+"/transitions/" + i2+"/labelDx",schemaPath:"#/properties/transitions/items/properties/labelDx/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err90];}else {vErrors.push(err90);}errors++;}}if(data31.labelDy !== undefined){let data48 = data31.labelDy;if(!((typeof data48 == "number") && (isFinite(data48)))){const err91 = {instancePath:instancePath+"/transitions/" + i2+"/labelDy",schemaPath:"#/properties/transitions/items/properties/labelDy/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err91];}else {vErrors.push(err91);}errors++;}}if(data31.labelSegment !== undefined){let data49 = data31.labelSegment;if(!(((typeof data49 == "number") && (!(data49 % 1) && !isNaN(data49))) && (isFinite(data49)))){const err92 = {instancePath:instancePath+"/transitions/" + i2+"/labelSegment",schemaPath:"#/properties/transitions/items/properties/labelSegment/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err92];}else {vErrors.push(err92);}errors++;}if((typeof data49 == "number") && (isFinite(data49))){if(data49 < 0 || isNaN(data49)){const err93 = {instancePath:instancePath+"/transitions/" + i2+"/labelSegment",schemaPath:"#/properties/transitions/items/properties/labelSegment/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err93];}else {vErrors.push(err93);}errors++;}}}if(data31.via !== undefined){let data50 = data31.via;if(Array.isArray(data50)){const len7 = data50.length;for(let i3=0; i3<len7; i3++){let data51 = data50[i3];if(Array.isArray(data51)){if(data51.length > 2){const err94 = {instancePath:instancePath+"/transitions/" + i2+"/via/" + i3,schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err94];}else {vErrors.push(err94);}errors++;}if(data51.length < 2){const err95 = {instancePath:instancePath+"/transitions/" + i2+"/via/" + i3,schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err95];}else {vErrors.push(err95);}errors++;}const len8 = data51.length;if(len8 > 0){let data52 = data51[0];if(!((typeof data52 == "number") && (isFinite(data52)))){const err96 = {instancePath:instancePath+"/transitions/" + i2+"/via/" + i3+"/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err96];}else {vErrors.push(err96);}errors++;}}if(len8 > 1){let data53 = data51[1];if(!((typeof data53 == "number") && (isFinite(data53)))){const err97 = {instancePath:instancePath+"/transitions/" + i2+"/via/" + i3+"/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err97];}else {vErrors.push(err97);}errors++;}}const len9 = data51.length;if(!(len9 <= 2)){const err98 = {instancePath:instancePath+"/transitions/" + i2+"/via/" + i3,schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err98];}else {vErrors.push(err98);}errors++;}}else {const err99 = {instancePath:instancePath+"/transitions/" + i2+"/via/" + i3,schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err99];}else {vErrors.push(err99);}errors++;}}}else {const err100 = {instancePath:instancePath+"/transitions/" + i2+"/via",schemaPath:"#/properties/transitions/items/properties/via/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err100];}else {vErrors.push(err100);}errors++;}}if(data31.width !== undefined){let data54 = data31.width;if((typeof data54 == "number") && (isFinite(data54))){if(data54 < 0.5 || isNaN(data54)){const err101 = {instancePath:instancePath+"/transitions/" + i2+"/width",schemaPath:"#/properties/transitions/items/properties/width/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0.5},message:"must be >= 0.5"};if(vErrors === null){vErrors = [err101];}else {vErrors.push(err101);}errors++;}}else {const err102 = {instancePath:instancePath+"/transitions/" + i2+"/width",schemaPath:"#/properties/transitions/items/properties/width/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err102];}else {vErrors.push(err102);}errors++;}}}else {const err103 = {instancePath:instancePath+"/transitions/" + i2,schemaPath:"#/properties/transitions/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err103];}else {vErrors.push(err103);}errors++;}}}else {const err104 = {instancePath:instancePath+"/transitions",schemaPath:"#/properties/transitions/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err104];}else {vErrors.push(err104);}errors++;}}if(data.cards !== undefined){let data55 = data.cards;if(Array.isArray(data55)){const len10 = data55.length;for(let i4=0; i4<len10; i4++){let data56 = data55[i4];if(data56 && typeof data56 == "object" && !Array.isArray(data56)){if(data56.dot === undefined){const err105 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "dot"},message:"must have required property '"+"dot"+"'"};if(vErrors === null){vErrors = [err105];}else {vErrors.push(err105);}errors++;}if(data56.title === undefined){const err106 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err106];}else {vErrors.push(err106);}errors++;}if(data56.items === undefined){const err107 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "items"},message:"must have required property '"+"items"+"'"};if(vErrors === null){vErrors = [err107];}else {vErrors.push(err107);}errors++;}for(const key5 in data56){if(!(((key5 === "dot") || (key5 === "title")) || (key5 === "items"))){const err108 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key5},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err108];}else {vErrors.push(err108);}errors++;}}if(data56.dot !== undefined){let data57 = data56.dot;if(!(((((((data57 === "cyan") || (data57 === "emerald")) || (data57 === "violet")) || (data57 === "amber")) || (data57 === "rose")) || (data57 === "orange")) || (data57 === "slate"))){const err109 = {instancePath:instancePath+"/cards/" + i4+"/dot",schemaPath:"common.schema.json#/$defs/cards/items/properties/dot/enum",keyword:"enum",params:{allowedValues: schema52.items.properties.dot.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err109];}else {vErrors.push(err109);}errors++;}}if(data56.title !== undefined){let data58 = data56.title;if(typeof data58 === "string"){if(func2(data58) < 1){const err110 = {instancePath:instancePath+"/cards/" + i4+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err110];}else {vErrors.push(err110);}errors++;}}else {const err111 = {instancePath:instancePath+"/cards/" + i4+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err111];}else {vErrors.push(err111);}errors++;}}if(data56.items !== undefined){let data59 = data56.items;if(Array.isArray(data59)){const len11 = data59.length;for(let i5=0; i5<len11; i5++){if(typeof data59[i5] !== "string"){const err112 = {instancePath:instancePath+"/cards/" + i4+"/items/" + i5,schemaPath:"common.schema.json#/$defs/cards/items/properties/items/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err112];}else {vErrors.push(err112);}errors++;}}}else {const err113 = {instancePath:instancePath+"/cards/" + i4+"/items",schemaPath:"common.schema.json#/$defs/cards/items/properties/items/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err113];}else {vErrors.push(err113);}errors++;}}}else {const err114 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err114];}else {vErrors.push(err114);}errors++;}}}else {const err115 = {instancePath:instancePath+"/cards",schemaPath:"common.schema.json#/$defs/cards/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err115];}else {vErrors.push(err115);}errors++;}}}else {const err116 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err116];}else {vErrors.push(err116);}errors++;}validate30.errors = vErrors;return errors === 0;}validate30.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};export const architecture = validate33;const schema92 = {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://github.com/tt-a1i/archify/schemas/architecture.schema.json","title":"Archify Architecture Diagram","type":"object","additionalProperties":false,"required":["schema_version","diagram_type","meta","components"],"properties":{"schema_version":{"const":1},"diagram_type":{"const":"architecture"},"meta":{"type":"object","additionalProperties":false,"required":["title"],"properties":{"title":{"type":"string","minLength":1},"subtitle":{"type":"string"},"output":{"type":"string"},"animation":{"enum":["trace","none"]},"visual_preset":{"enum":["classic","signal-flow","blueprint"]},"quality_profile":{"enum":["standard","showcase"]},"views":{"$ref":"common.schema.json#/$defs/guidedViews"},"viewBox":{"type":"array","prefixItems":[{"type":"number","minimum":320},{"type":"number","minimum":240}],"items":false,"minItems":2,"maxItems":2}}},"layout":{"type":"object","additionalProperties":false,"required":["mode"],"properties":{"mode":{"enum":["grid"]},"origin":{"$ref":"common.schema.json#/$defs/point"},"cols":{"type":"integer","minimum":1,"maximum":12},"gapX":{"type":"number","minimum":0},"gapY":{"type":"number","minimum":0},"cellW":{"type":"number","minimum":40},"cellH":{"type":"number","minimum":24}}},"components":{"type":"array","minItems":1,"items":{"type":"object","additionalProperties":false,"required":["id","type","label"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"type":{"$ref":"common.schema.json#/$defs/componentType"},"label":{"type":"string","minLength":1},"sublabel":{"type":"string"},"tag":{"type":"string"},"row":{"type":"integer","minimum":0},"col":{"type":"integer","minimum":0},"pos":{"$ref":"common.schema.json#/$defs/point"},"size":{"type":"array","prefixItems":[{"type":"number","exclusiveMinimum":0},{"type":"number","exclusiveMinimum":0}],"items":false,"minItems":2,"maxItems":2}}}},"boundaries":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["kind","label","wraps"],"properties":{"kind":{"enum":["region","security-group"]},"label":{"type":"string","minLength":1},"wraps":{"type":"array","minItems":1,"items":{"$ref":"common.schema.json#/$defs/id"}},"pad":{"type":"number","minimum":0}}}},"connections":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["from","to"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"from":{"$ref":"common.schema.json#/$defs/id"},"to":{"$ref":"common.schema.json#/$defs/id"},"label":{"type":"string"},"variant":{"$ref":"common.schema.json#/$defs/variant"},"fromSide":{"enum":["left","right","top","bottom"]},"toSide":{"enum":["left","right","top","bottom"]},"route":{"enum":["auto","straight","orthogonal-h","orthogonal-v"]},"via":{"type":"array","items":{"$ref":"common.schema.json#/$defs/point"}},"labelAt":{"$ref":"common.schema.json#/$defs/point"},"labelDx":{"type":"number"},"labelDy":{"type":"number"},"labelSegment":{"type":"integer","minimum":0},"width":{"type":"number","minimum":0.5}}}},"cards":{"$ref":"common.schema.json#/$defs/cards"}}};function validate34(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate34.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(Array.isArray(data)){if(data.length > 5){const err0 = {instancePath,schemaPath:"#/maxItems",keyword:"maxItems",params:{limit: 5},message:"must NOT have more than 5 items"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];if(data0 && typeof data0 == "object" && !Array.isArray(data0)){if(data0.id === undefined){const err1 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data0.label === undefined){const err2 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data0.focus === undefined){const err3 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "focus"},message:"must have required property '"+"focus"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data0){if(!((((key0 === "id") || (key0 === "label")) || (key0 === "focus")) || (key0 === "note"))){const err4 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data0.id !== undefined){let data1 = data0.id;if(typeof data1 === "string"){if(!pattern4.test(data1)){const err5 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data0.label !== undefined){let data2 = data0.label;if(typeof data2 === "string"){if(func2(data2) > 48){const err7 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/maxLength",keyword:"maxLength",params:{limit: 48},message:"must NOT have more than 48 characters"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(func2(data2) < 1){const err8 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data0.focus !== undefined){let data3 = data0.focus;if(Array.isArray(data3)){if(data3.length < 1){const err10 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}const len1 = data3.length;for(let i1=0; i1<len1; i1++){let data4 = data3[i1];if(typeof data4 === "string"){if(!pattern4.test(data4)){const err11 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data0.note !== undefined){let data5 = data0.note;if(typeof data5 === "string"){if(func2(data5) > 140){const err14 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/maxLength",keyword:"maxLength",params:{limit: 140},message:"must NOT have more than 140 characters"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}else {const err15 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}}else {const err16 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}}else {const err17 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}validate34.errors = vErrors;return errors === 0;}validate34.evaluated = {"items":true,"dynamicProps":false,"dynamicItems":false};function validate33(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://github.com/tt-a1i/archify/schemas/architecture.schema.json" */;let vErrors = null;let errors = 0;const evaluated0 = validate33.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.schema_version === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "schema_version"},message:"must have required property '"+"schema_version"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.diagram_type === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "diagram_type"},message:"must have required property '"+"diagram_type"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.meta === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "meta"},message:"must have required property '"+"meta"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.components === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "components"},message:"must have required property '"+"components"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data){if(!((((((((key0 === "schema_version") || (key0 === "diagram_type")) || (key0 === "meta")) || (key0 === "layout")) || (key0 === "components")) || (key0 === "boundaries")) || (key0 === "connections")) || (key0 === "cards"))){const err4 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.schema_version !== undefined){if(1 !== data.schema_version){const err5 = {instancePath:instancePath+"/schema_version",schemaPath:"#/properties/schema_version/const",keyword:"const",params:{allowedValue: 1},message:"must be equal to constant"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.diagram_type !== undefined){if("architecture" !== data.diagram_type){const err6 = {instancePath:instancePath+"/diagram_type",schemaPath:"#/properties/diagram_type/const",keyword:"const",params:{allowedValue: "architecture"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.meta !== undefined){let data2 = data.meta;if(data2 && typeof data2 == "object" && !Array.isArray(data2)){if(data2.title === undefined){const err7 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}for(const key1 in data2){if(!((((((((key1 === "title") || (key1 === "subtitle")) || (key1 === "output")) || (key1 === "animation")) || (key1 === "visual_preset")) || (key1 === "quality_profile")) || (key1 === "views")) || (key1 === "viewBox"))){const err8 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data2.title !== undefined){let data3 = data2.title;if(typeof data3 === "string"){if(func2(data3) < 1){const err9 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}else {const err10 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data2.subtitle !== undefined){if(typeof data2.subtitle !== "string"){const err11 = {instancePath:instancePath+"/meta/subtitle",schemaPath:"#/properties/meta/properties/subtitle/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data2.output !== undefined){if(typeof data2.output !== "string"){const err12 = {instancePath:instancePath+"/meta/output",schemaPath:"#/properties/meta/properties/output/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data2.animation !== undefined){let data6 = data2.animation;if(!((data6 === "trace") || (data6 === "none"))){const err13 = {instancePath:instancePath+"/meta/animation",schemaPath:"#/properties/meta/properties/animation/enum",keyword:"enum",params:{allowedValues: schema92.properties.meta.properties.animation.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data2.visual_preset !== undefined){let data7 = data2.visual_preset;if(!(((data7 === "classic") || (data7 === "signal-flow")) || (data7 === "blueprint"))){const err14 = {instancePath:instancePath+"/meta/visual_preset",schemaPath:"#/properties/meta/properties/visual_preset/enum",keyword:"enum",params:{allowedValues: schema92.properties.meta.properties.visual_preset.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data2.quality_profile !== undefined){let data8 = data2.quality_profile;if(!((data8 === "standard") || (data8 === "showcase"))){const err15 = {instancePath:instancePath+"/meta/quality_profile",schemaPath:"#/properties/meta/properties/quality_profile/enum",keyword:"enum",params:{allowedValues: schema92.properties.meta.properties.quality_profile.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data2.views !== undefined){if(!(validate34(data2.views, {instancePath:instancePath+"/meta/views",parentData:data2,parentDataProperty:"views",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate34.errors : vErrors.concat(validate34.errors);errors = vErrors.length;}}if(data2.viewBox !== undefined){let data10 = data2.viewBox;if(Array.isArray(data10)){if(data10.length > 2){const err16 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}if(data10.length < 2){const err17 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}const len0 = data10.length;if(len0 > 0){let data11 = data10[0];if((typeof data11 == "number") && (isFinite(data11))){if(data11 < 320 || isNaN(data11)){const err18 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/minimum",keyword:"minimum",params:{comparison: ">=", limit: 320},message:"must be >= 320"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}else {const err19 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}if(len0 > 1){let data12 = data10[1];if((typeof data12 == "number") && (isFinite(data12))){if(data12 < 240 || isNaN(data12)){const err20 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/minimum",keyword:"minimum",params:{comparison: ">=", limit: 240},message:"must be >= 240"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}else {const err21 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}const len1 = data10.length;if(!(len1 <= 2)){const err22 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}else {const err23 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}}else {const err24 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}if(data.layout !== undefined){let data13 = data.layout;if(data13 && typeof data13 == "object" && !Array.isArray(data13)){if(data13.mode === undefined){const err25 = {instancePath:instancePath+"/layout",schemaPath:"#/properties/layout/required",keyword:"required",params:{missingProperty: "mode"},message:"must have required property '"+"mode"+"'"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}for(const key2 in data13){if(!(((((((key2 === "mode") || (key2 === "origin")) || (key2 === "cols")) || (key2 === "gapX")) || (key2 === "gapY")) || (key2 === "cellW")) || (key2 === "cellH"))){const err26 = {instancePath:instancePath+"/layout",schemaPath:"#/properties/layout/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}if(data13.mode !== undefined){if(!(data13.mode === "grid")){const err27 = {instancePath:instancePath+"/layout/mode",schemaPath:"#/properties/layout/properties/mode/enum",keyword:"enum",params:{allowedValues: schema92.properties.layout.properties.mode.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}}if(data13.origin !== undefined){let data15 = data13.origin;if(Array.isArray(data15)){if(data15.length > 2){const err28 = {instancePath:instancePath+"/layout/origin",schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}if(data15.length < 2){const err29 = {instancePath:instancePath+"/layout/origin",schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}const len2 = data15.length;if(len2 > 0){let data16 = data15[0];if(!((typeof data16 == "number") && (isFinite(data16)))){const err30 = {instancePath:instancePath+"/layout/origin/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}}if(len2 > 1){let data17 = data15[1];if(!((typeof data17 == "number") && (isFinite(data17)))){const err31 = {instancePath:instancePath+"/layout/origin/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}const len3 = data15.length;if(!(len3 <= 2)){const err32 = {instancePath:instancePath+"/layout/origin",schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}else {const err33 = {instancePath:instancePath+"/layout/origin",schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}if(data13.cols !== undefined){let data18 = data13.cols;if(!(((typeof data18 == "number") && (!(data18 % 1) && !isNaN(data18))) && (isFinite(data18)))){const err34 = {instancePath:instancePath+"/layout/cols",schemaPath:"#/properties/layout/properties/cols/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}if((typeof data18 == "number") && (isFinite(data18))){if(data18 > 12 || isNaN(data18)){const err35 = {instancePath:instancePath+"/layout/cols",schemaPath:"#/properties/layout/properties/cols/maximum",keyword:"maximum",params:{comparison: "<=", limit: 12},message:"must be <= 12"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}if(data18 < 1 || isNaN(data18)){const err36 = {instancePath:instancePath+"/layout/cols",schemaPath:"#/properties/layout/properties/cols/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}}if(data13.gapX !== undefined){let data19 = data13.gapX;if((typeof data19 == "number") && (isFinite(data19))){if(data19 < 0 || isNaN(data19)){const err37 = {instancePath:instancePath+"/layout/gapX",schemaPath:"#/properties/layout/properties/gapX/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}}else {const err38 = {instancePath:instancePath+"/layout/gapX",schemaPath:"#/properties/layout/properties/gapX/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}}if(data13.gapY !== undefined){let data20 = data13.gapY;if((typeof data20 == "number") && (isFinite(data20))){if(data20 < 0 || isNaN(data20)){const err39 = {instancePath:instancePath+"/layout/gapY",schemaPath:"#/properties/layout/properties/gapY/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}}else {const err40 = {instancePath:instancePath+"/layout/gapY",schemaPath:"#/properties/layout/properties/gapY/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}}if(data13.cellW !== undefined){let data21 = data13.cellW;if((typeof data21 == "number") && (isFinite(data21))){if(data21 < 40 || isNaN(data21)){const err41 = {instancePath:instancePath+"/layout/cellW",schemaPath:"#/properties/layout/properties/cellW/minimum",keyword:"minimum",params:{comparison: ">=", limit: 40},message:"must be >= 40"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}}else {const err42 = {instancePath:instancePath+"/layout/cellW",schemaPath:"#/properties/layout/properties/cellW/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}}if(data13.cellH !== undefined){let data22 = data13.cellH;if((typeof data22 == "number") && (isFinite(data22))){if(data22 < 24 || isNaN(data22)){const err43 = {instancePath:instancePath+"/layout/cellH",schemaPath:"#/properties/layout/properties/cellH/minimum",keyword:"minimum",params:{comparison: ">=", limit: 24},message:"must be >= 24"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}}else {const err44 = {instancePath:instancePath+"/layout/cellH",schemaPath:"#/properties/layout/properties/cellH/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}}}else {const err45 = {instancePath:instancePath+"/layout",schemaPath:"#/properties/layout/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}}if(data.components !== undefined){let data23 = data.components;if(Array.isArray(data23)){if(data23.length < 1){const err46 = {instancePath:instancePath+"/components",schemaPath:"#/properties/components/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}const len4 = data23.length;for(let i0=0; i0<len4; i0++){let data24 = data23[i0];if(data24 && typeof data24 == "object" && !Array.isArray(data24)){if(data24.id === undefined){const err47 = {instancePath:instancePath+"/components/" + i0,schemaPath:"#/properties/components/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}if(data24.type === undefined){const err48 = {instancePath:instancePath+"/components/" + i0,schemaPath:"#/properties/components/items/required",keyword:"required",params:{missingProperty: "type"},message:"must have required property '"+"type"+"'"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}if(data24.label === undefined){const err49 = {instancePath:instancePath+"/components/" + i0,schemaPath:"#/properties/components/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}for(const key3 in data24){if(!(func1.call(schema92.properties.components.items.properties, key3))){const err50 = {instancePath:instancePath+"/components/" + i0,schemaPath:"#/properties/components/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}}if(data24.id !== undefined){let data25 = data24.id;if(typeof data25 === "string"){if(!pattern4.test(data25)){const err51 = {instancePath:instancePath+"/components/" + i0+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}}else {const err52 = {instancePath:instancePath+"/components/" + i0+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}}if(data24.type !== undefined){let data26 = data24.type;if(!(((((((data26 === "frontend") || (data26 === "backend")) || (data26 === "database")) || (data26 === "cloud")) || (data26 === "security")) || (data26 === "messagebus")) || (data26 === "external"))){const err53 = {instancePath:instancePath+"/components/" + i0+"/type",schemaPath:"common.schema.json#/$defs/componentType/enum",keyword:"enum",params:{allowedValues: schema43.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}}if(data24.label !== undefined){let data27 = data24.label;if(typeof data27 === "string"){if(func2(data27) < 1){const err54 = {instancePath:instancePath+"/components/" + i0+"/label",schemaPath:"#/properties/components/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}}else {const err55 = {instancePath:instancePath+"/components/" + i0+"/label",schemaPath:"#/properties/components/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}}if(data24.sublabel !== undefined){if(typeof data24.sublabel !== "string"){const err56 = {instancePath:instancePath+"/components/" + i0+"/sublabel",schemaPath:"#/properties/components/items/properties/sublabel/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}}if(data24.tag !== undefined){if(typeof data24.tag !== "string"){const err57 = {instancePath:instancePath+"/components/" + i0+"/tag",schemaPath:"#/properties/components/items/properties/tag/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}}if(data24.row !== undefined){let data30 = data24.row;if(!(((typeof data30 == "number") && (!(data30 % 1) && !isNaN(data30))) && (isFinite(data30)))){const err58 = {instancePath:instancePath+"/components/" + i0+"/row",schemaPath:"#/properties/components/items/properties/row/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}if((typeof data30 == "number") && (isFinite(data30))){if(data30 < 0 || isNaN(data30)){const err59 = {instancePath:instancePath+"/components/" + i0+"/row",schemaPath:"#/properties/components/items/properties/row/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}}}if(data24.col !== undefined){let data31 = data24.col;if(!(((typeof data31 == "number") && (!(data31 % 1) && !isNaN(data31))) && (isFinite(data31)))){const err60 = {instancePath:instancePath+"/components/" + i0+"/col",schemaPath:"#/properties/components/items/properties/col/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}if((typeof data31 == "number") && (isFinite(data31))){if(data31 < 0 || isNaN(data31)){const err61 = {instancePath:instancePath+"/components/" + i0+"/col",schemaPath:"#/properties/components/items/properties/col/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err61];}else {vErrors.push(err61);}errors++;}}}if(data24.pos !== undefined){let data32 = data24.pos;if(Array.isArray(data32)){if(data32.length > 2){const err62 = {instancePath:instancePath+"/components/" + i0+"/pos",schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err62];}else {vErrors.push(err62);}errors++;}if(data32.length < 2){const err63 = {instancePath:instancePath+"/components/" + i0+"/pos",schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;}const len5 = data32.length;if(len5 > 0){let data33 = data32[0];if(!((typeof data33 == "number") && (isFinite(data33)))){const err64 = {instancePath:instancePath+"/components/" + i0+"/pos/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}}if(len5 > 1){let data34 = data32[1];if(!((typeof data34 == "number") && (isFinite(data34)))){const err65 = {instancePath:instancePath+"/components/" + i0+"/pos/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}}const len6 = data32.length;if(!(len6 <= 2)){const err66 = {instancePath:instancePath+"/components/" + i0+"/pos",schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err66];}else {vErrors.push(err66);}errors++;}}else {const err67 = {instancePath:instancePath+"/components/" + i0+"/pos",schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err67];}else {vErrors.push(err67);}errors++;}}if(data24.size !== undefined){let data35 = data24.size;if(Array.isArray(data35)){if(data35.length > 2){const err68 = {instancePath:instancePath+"/components/" + i0+"/size",schemaPath:"#/properties/components/items/properties/size/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;}if(data35.length < 2){const err69 = {instancePath:instancePath+"/components/" + i0+"/size",schemaPath:"#/properties/components/items/properties/size/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err69];}else {vErrors.push(err69);}errors++;}const len7 = data35.length;if(len7 > 0){let data36 = data35[0];if((typeof data36 == "number") && (isFinite(data36))){if(data36 <= 0 || isNaN(data36)){const err70 = {instancePath:instancePath+"/components/" + i0+"/size/0",schemaPath:"#/properties/components/items/properties/size/prefixItems/0/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison: ">", limit: 0},message:"must be > 0"};if(vErrors === null){vErrors = [err70];}else {vErrors.push(err70);}errors++;}}else {const err71 = {instancePath:instancePath+"/components/" + i0+"/size/0",schemaPath:"#/properties/components/items/properties/size/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err71];}else {vErrors.push(err71);}errors++;}}if(len7 > 1){let data37 = data35[1];if((typeof data37 == "number") && (isFinite(data37))){if(data37 <= 0 || isNaN(data37)){const err72 = {instancePath:instancePath+"/components/" + i0+"/size/1",schemaPath:"#/properties/components/items/properties/size/prefixItems/1/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison: ">", limit: 0},message:"must be > 0"};if(vErrors === null){vErrors = [err72];}else {vErrors.push(err72);}errors++;}}else {const err73 = {instancePath:instancePath+"/components/" + i0+"/size/1",schemaPath:"#/properties/components/items/properties/size/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err73];}else {vErrors.push(err73);}errors++;}}const len8 = data35.length;if(!(len8 <= 2)){const err74 = {instancePath:instancePath+"/components/" + i0+"/size",schemaPath:"#/properties/components/items/properties/size/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err74];}else {vErrors.push(err74);}errors++;}}else {const err75 = {instancePath:instancePath+"/components/" + i0+"/size",schemaPath:"#/properties/components/items/properties/size/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err75];}else {vErrors.push(err75);}errors++;}}}else {const err76 = {instancePath:instancePath+"/components/" + i0,schemaPath:"#/properties/components/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err76];}else {vErrors.push(err76);}errors++;}}}else {const err77 = {instancePath:instancePath+"/components",schemaPath:"#/properties/components/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err77];}else {vErrors.push(err77);}errors++;}}if(data.boundaries !== undefined){let data38 = data.boundaries;if(Array.isArray(data38)){const len9 = data38.length;for(let i1=0; i1<len9; i1++){let data39 = data38[i1];if(data39 && typeof data39 == "object" && !Array.isArray(data39)){if(data39.kind === undefined){const err78 = {instancePath:instancePath+"/boundaries/" + i1,schemaPath:"#/properties/boundaries/items/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err78];}else {vErrors.push(err78);}errors++;}if(data39.label === undefined){const err79 = {instancePath:instancePath+"/boundaries/" + i1,schemaPath:"#/properties/boundaries/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err79];}else {vErrors.push(err79);}errors++;}if(data39.wraps === undefined){const err80 = {instancePath:instancePath+"/boundaries/" + i1,schemaPath:"#/properties/boundaries/items/required",keyword:"required",params:{missingProperty: "wraps"},message:"must have required property '"+"wraps"+"'"};if(vErrors === null){vErrors = [err80];}else {vErrors.push(err80);}errors++;}for(const key4 in data39){if(!((((key4 === "kind") || (key4 === "label")) || (key4 === "wraps")) || (key4 === "pad"))){const err81 = {instancePath:instancePath+"/boundaries/" + i1,schemaPath:"#/properties/boundaries/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key4},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err81];}else {vErrors.push(err81);}errors++;}}if(data39.kind !== undefined){let data40 = data39.kind;if(!((data40 === "region") || (data40 === "security-group"))){const err82 = {instancePath:instancePath+"/boundaries/" + i1+"/kind",schemaPath:"#/properties/boundaries/items/properties/kind/enum",keyword:"enum",params:{allowedValues: schema92.properties.boundaries.items.properties.kind.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err82];}else {vErrors.push(err82);}errors++;}}if(data39.label !== undefined){let data41 = data39.label;if(typeof data41 === "string"){if(func2(data41) < 1){const err83 = {instancePath:instancePath+"/boundaries/" + i1+"/label",schemaPath:"#/properties/boundaries/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err83];}else {vErrors.push(err83);}errors++;}}else {const err84 = {instancePath:instancePath+"/boundaries/" + i1+"/label",schemaPath:"#/properties/boundaries/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err84];}else {vErrors.push(err84);}errors++;}}if(data39.wraps !== undefined){let data42 = data39.wraps;if(Array.isArray(data42)){if(data42.length < 1){const err85 = {instancePath:instancePath+"/boundaries/" + i1+"/wraps",schemaPath:"#/properties/boundaries/items/properties/wraps/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err85];}else {vErrors.push(err85);}errors++;}const len10 = data42.length;for(let i2=0; i2<len10; i2++){let data43 = data42[i2];if(typeof data43 === "string"){if(!pattern4.test(data43)){const err86 = {instancePath:instancePath+"/boundaries/" + i1+"/wraps/" + i2,schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err86];}else {vErrors.push(err86);}errors++;}}else {const err87 = {instancePath:instancePath+"/boundaries/" + i1+"/wraps/" + i2,schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err87];}else {vErrors.push(err87);}errors++;}}}else {const err88 = {instancePath:instancePath+"/boundaries/" + i1+"/wraps",schemaPath:"#/properties/boundaries/items/properties/wraps/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err88];}else {vErrors.push(err88);}errors++;}}if(data39.pad !== undefined){let data44 = data39.pad;if((typeof data44 == "number") && (isFinite(data44))){if(data44 < 0 || isNaN(data44)){const err89 = {instancePath:instancePath+"/boundaries/" + i1+"/pad",schemaPath:"#/properties/boundaries/items/properties/pad/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err89];}else {vErrors.push(err89);}errors++;}}else {const err90 = {instancePath:instancePath+"/boundaries/" + i1+"/pad",schemaPath:"#/properties/boundaries/items/properties/pad/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err90];}else {vErrors.push(err90);}errors++;}}}else {const err91 = {instancePath:instancePath+"/boundaries/" + i1,schemaPath:"#/properties/boundaries/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err91];}else {vErrors.push(err91);}errors++;}}}else {const err92 = {instancePath:instancePath+"/boundaries",schemaPath:"#/properties/boundaries/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err92];}else {vErrors.push(err92);}errors++;}}if(data.connections !== undefined){let data45 = data.connections;if(Array.isArray(data45)){const len11 = data45.length;for(let i3=0; i3<len11; i3++){let data46 = data45[i3];if(data46 && typeof data46 == "object" && !Array.isArray(data46)){if(data46.from === undefined){const err93 = {instancePath:instancePath+"/connections/" + i3,schemaPath:"#/properties/connections/items/required",keyword:"required",params:{missingProperty: "from"},message:"must have required property '"+"from"+"'"};if(vErrors === null){vErrors = [err93];}else {vErrors.push(err93);}errors++;}if(data46.to === undefined){const err94 = {instancePath:instancePath+"/connections/" + i3,schemaPath:"#/properties/connections/items/required",keyword:"required",params:{missingProperty: "to"},message:"must have required property '"+"to"+"'"};if(vErrors === null){vErrors = [err94];}else {vErrors.push(err94);}errors++;}for(const key5 in data46){if(!(func1.call(schema92.properties.connections.items.properties, key5))){const err95 = {instancePath:instancePath+"/connections/" + i3,schemaPath:"#/properties/connections/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key5},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err95];}else {vErrors.push(err95);}errors++;}}if(data46.id !== undefined){let data47 = data46.id;if(typeof data47 === "string"){if(!pattern4.test(data47)){const err96 = {instancePath:instancePath+"/connections/" + i3+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err96];}else {vErrors.push(err96);}errors++;}}else {const err97 = {instancePath:instancePath+"/connections/" + i3+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err97];}else {vErrors.push(err97);}errors++;}}if(data46.from !== undefined){let data48 = data46.from;if(typeof data48 === "string"){if(!pattern4.test(data48)){const err98 = {instancePath:instancePath+"/connections/" + i3+"/from",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err98];}else {vErrors.push(err98);}errors++;}}else {const err99 = {instancePath:instancePath+"/connections/" + i3+"/from",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err99];}else {vErrors.push(err99);}errors++;}}if(data46.to !== undefined){let data49 = data46.to;if(typeof data49 === "string"){if(!pattern4.test(data49)){const err100 = {instancePath:instancePath+"/connections/" + i3+"/to",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err100];}else {vErrors.push(err100);}errors++;}}else {const err101 = {instancePath:instancePath+"/connections/" + i3+"/to",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err101];}else {vErrors.push(err101);}errors++;}}if(data46.label !== undefined){if(typeof data46.label !== "string"){const err102 = {instancePath:instancePath+"/connections/" + i3+"/label",schemaPath:"#/properties/connections/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err102];}else {vErrors.push(err102);}errors++;}}if(data46.variant !== undefined){let data51 = data46.variant;if(!((((data51 === "default") || (data51 === "emphasis")) || (data51 === "security")) || (data51 === "dashed"))){const err103 = {instancePath:instancePath+"/connections/" + i3+"/variant",schemaPath:"common.schema.json#/$defs/variant/enum",keyword:"enum",params:{allowedValues: schema47.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err103];}else {vErrors.push(err103);}errors++;}}if(data46.fromSide !== undefined){let data52 = data46.fromSide;if(!((((data52 === "left") || (data52 === "right")) || (data52 === "top")) || (data52 === "bottom"))){const err104 = {instancePath:instancePath+"/connections/" + i3+"/fromSide",schemaPath:"#/properties/connections/items/properties/fromSide/enum",keyword:"enum",params:{allowedValues: schema92.properties.connections.items.properties.fromSide.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err104];}else {vErrors.push(err104);}errors++;}}if(data46.toSide !== undefined){let data53 = data46.toSide;if(!((((data53 === "left") || (data53 === "right")) || (data53 === "top")) || (data53 === "bottom"))){const err105 = {instancePath:instancePath+"/connections/" + i3+"/toSide",schemaPath:"#/properties/connections/items/properties/toSide/enum",keyword:"enum",params:{allowedValues: schema92.properties.connections.items.properties.toSide.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err105];}else {vErrors.push(err105);}errors++;}}if(data46.route !== undefined){let data54 = data46.route;if(!((((data54 === "auto") || (data54 === "straight")) || (data54 === "orthogonal-h")) || (data54 === "orthogonal-v"))){const err106 = {instancePath:instancePath+"/connections/" + i3+"/route",schemaPath:"#/properties/connections/items/properties/route/enum",keyword:"enum",params:{allowedValues: schema92.properties.connections.items.properties.route.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err106];}else {vErrors.push(err106);}errors++;}}if(data46.via !== undefined){let data55 = data46.via;if(Array.isArray(data55)){const len12 = data55.length;for(let i4=0; i4<len12; i4++){let data56 = data55[i4];if(Array.isArray(data56)){if(data56.length > 2){const err107 = {instancePath:instancePath+"/connections/" + i3+"/via/" + i4,schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err107];}else {vErrors.push(err107);}errors++;}if(data56.length < 2){const err108 = {instancePath:instancePath+"/connections/" + i3+"/via/" + i4,schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err108];}else {vErrors.push(err108);}errors++;}const len13 = data56.length;if(len13 > 0){let data57 = data56[0];if(!((typeof data57 == "number") && (isFinite(data57)))){const err109 = {instancePath:instancePath+"/connections/" + i3+"/via/" + i4+"/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err109];}else {vErrors.push(err109);}errors++;}}if(len13 > 1){let data58 = data56[1];if(!((typeof data58 == "number") && (isFinite(data58)))){const err110 = {instancePath:instancePath+"/connections/" + i3+"/via/" + i4+"/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err110];}else {vErrors.push(err110);}errors++;}}const len14 = data56.length;if(!(len14 <= 2)){const err111 = {instancePath:instancePath+"/connections/" + i3+"/via/" + i4,schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err111];}else {vErrors.push(err111);}errors++;}}else {const err112 = {instancePath:instancePath+"/connections/" + i3+"/via/" + i4,schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err112];}else {vErrors.push(err112);}errors++;}}}else {const err113 = {instancePath:instancePath+"/connections/" + i3+"/via",schemaPath:"#/properties/connections/items/properties/via/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err113];}else {vErrors.push(err113);}errors++;}}if(data46.labelAt !== undefined){let data59 = data46.labelAt;if(Array.isArray(data59)){if(data59.length > 2){const err114 = {instancePath:instancePath+"/connections/" + i3+"/labelAt",schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err114];}else {vErrors.push(err114);}errors++;}if(data59.length < 2){const err115 = {instancePath:instancePath+"/connections/" + i3+"/labelAt",schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err115];}else {vErrors.push(err115);}errors++;}const len15 = data59.length;if(len15 > 0){let data60 = data59[0];if(!((typeof data60 == "number") && (isFinite(data60)))){const err116 = {instancePath:instancePath+"/connections/" + i3+"/labelAt/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err116];}else {vErrors.push(err116);}errors++;}}if(len15 > 1){let data61 = data59[1];if(!((typeof data61 == "number") && (isFinite(data61)))){const err117 = {instancePath:instancePath+"/connections/" + i3+"/labelAt/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err117];}else {vErrors.push(err117);}errors++;}}const len16 = data59.length;if(!(len16 <= 2)){const err118 = {instancePath:instancePath+"/connections/" + i3+"/labelAt",schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err118];}else {vErrors.push(err118);}errors++;}}else {const err119 = {instancePath:instancePath+"/connections/" + i3+"/labelAt",schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err119];}else {vErrors.push(err119);}errors++;}}if(data46.labelDx !== undefined){let data62 = data46.labelDx;if(!((typeof data62 == "number") && (isFinite(data62)))){const err120 = {instancePath:instancePath+"/connections/" + i3+"/labelDx",schemaPath:"#/properties/connections/items/properties/labelDx/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err120];}else {vErrors.push(err120);}errors++;}}if(data46.labelDy !== undefined){let data63 = data46.labelDy;if(!((typeof data63 == "number") && (isFinite(data63)))){const err121 = {instancePath:instancePath+"/connections/" + i3+"/labelDy",schemaPath:"#/properties/connections/items/properties/labelDy/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err121];}else {vErrors.push(err121);}errors++;}}if(data46.labelSegment !== undefined){let data64 = data46.labelSegment;if(!(((typeof data64 == "number") && (!(data64 % 1) && !isNaN(data64))) && (isFinite(data64)))){const err122 = {instancePath:instancePath+"/connections/" + i3+"/labelSegment",schemaPath:"#/properties/connections/items/properties/labelSegment/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err122];}else {vErrors.push(err122);}errors++;}if((typeof data64 == "number") && (isFinite(data64))){if(data64 < 0 || isNaN(data64)){const err123 = {instancePath:instancePath+"/connections/" + i3+"/labelSegment",schemaPath:"#/properties/connections/items/properties/labelSegment/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err123];}else {vErrors.push(err123);}errors++;}}}if(data46.width !== undefined){let data65 = data46.width;if((typeof data65 == "number") && (isFinite(data65))){if(data65 < 0.5 || isNaN(data65)){const err124 = {instancePath:instancePath+"/connections/" + i3+"/width",schemaPath:"#/properties/connections/items/properties/width/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0.5},message:"must be >= 0.5"};if(vErrors === null){vErrors = [err124];}else {vErrors.push(err124);}errors++;}}else {const err125 = {instancePath:instancePath+"/connections/" + i3+"/width",schemaPath:"#/properties/connections/items/properties/width/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err125];}else {vErrors.push(err125);}errors++;}}}else {const err126 = {instancePath:instancePath+"/connections/" + i3,schemaPath:"#/properties/connections/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err126];}else {vErrors.push(err126);}errors++;}}}else {const err127 = {instancePath:instancePath+"/connections",schemaPath:"#/properties/connections/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err127];}else {vErrors.push(err127);}errors++;}}if(data.cards !== undefined){let data66 = data.cards;if(Array.isArray(data66)){const len17 = data66.length;for(let i5=0; i5<len17; i5++){let data67 = data66[i5];if(data67 && typeof data67 == "object" && !Array.isArray(data67)){if(data67.dot === undefined){const err128 = {instancePath:instancePath+"/cards/" + i5,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "dot"},message:"must have required property '"+"dot"+"'"};if(vErrors === null){vErrors = [err128];}else {vErrors.push(err128);}errors++;}if(data67.title === undefined){const err129 = {instancePath:instancePath+"/cards/" + i5,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err129];}else {vErrors.push(err129);}errors++;}if(data67.items === undefined){const err130 = {instancePath:instancePath+"/cards/" + i5,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "items"},message:"must have required property '"+"items"+"'"};if(vErrors === null){vErrors = [err130];}else {vErrors.push(err130);}errors++;}for(const key6 in data67){if(!(((key6 === "dot") || (key6 === "title")) || (key6 === "items"))){const err131 = {instancePath:instancePath+"/cards/" + i5,schemaPath:"common.schema.json#/$defs/cards/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key6},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err131];}else {vErrors.push(err131);}errors++;}}if(data67.dot !== undefined){let data68 = data67.dot;if(!(((((((data68 === "cyan") || (data68 === "emerald")) || (data68 === "violet")) || (data68 === "amber")) || (data68 === "rose")) || (data68 === "orange")) || (data68 === "slate"))){const err132 = {instancePath:instancePath+"/cards/" + i5+"/dot",schemaPath:"common.schema.json#/$defs/cards/items/properties/dot/enum",keyword:"enum",params:{allowedValues: schema52.items.properties.dot.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err132];}else {vErrors.push(err132);}errors++;}}if(data67.title !== undefined){let data69 = data67.title;if(typeof data69 === "string"){if(func2(data69) < 1){const err133 = {instancePath:instancePath+"/cards/" + i5+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err133];}else {vErrors.push(err133);}errors++;}}else {const err134 = {instancePath:instancePath+"/cards/" + i5+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err134];}else {vErrors.push(err134);}errors++;}}if(data67.items !== undefined){let data70 = data67.items;if(Array.isArray(data70)){const len18 = data70.length;for(let i6=0; i6<len18; i6++){if(typeof data70[i6] !== "string"){const err135 = {instancePath:instancePath+"/cards/" + i5+"/items/" + i6,schemaPath:"common.schema.json#/$defs/cards/items/properties/items/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err135];}else {vErrors.push(err135);}errors++;}}}else {const err136 = {instancePath:instancePath+"/cards/" + i5+"/items",schemaPath:"common.schema.json#/$defs/cards/items/properties/items/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err136];}else {vErrors.push(err136);}errors++;}}}else {const err137 = {instancePath:instancePath+"/cards/" + i5,schemaPath:"common.schema.json#/$defs/cards/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err137];}else {vErrors.push(err137);}errors++;}}}else {const err138 = {instancePath:instancePath+"/cards",schemaPath:"common.schema.json#/$defs/cards/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err138];}else {vErrors.push(err138);}errors++;}}}else {const err139 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err139];}else {vErrors.push(err139);}errors++;}validate33.errors = vErrors;return errors === 0;}validate33.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};
+};const schema33 = {"type":"array","maxItems":5,"items":{"type":"object","additionalProperties":false,"required":["id","label","focus"],"properties":{"id":{"$ref":"#/$defs/id"},"label":{"type":"string","minLength":1,"maxLength":48},"focus":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/id"}},"note":{"type":"string","maxLength":140}}}};const pattern4 = new RegExp("^[a-zA-Z][a-zA-Z0-9_-]*$", "u");function validate22(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate22.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(Array.isArray(data)){if(data.length > 5){const err0 = {instancePath,schemaPath:"#/maxItems",keyword:"maxItems",params:{limit: 5},message:"must NOT have more than 5 items"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];if(data0 && typeof data0 == "object" && !Array.isArray(data0)){if(data0.id === undefined){const err1 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data0.label === undefined){const err2 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data0.focus === undefined){const err3 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "focus"},message:"must have required property '"+"focus"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data0){if(!((((key0 === "id") || (key0 === "label")) || (key0 === "focus")) || (key0 === "note"))){const err4 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data0.id !== undefined){let data1 = data0.id;if(typeof data1 === "string"){if(!pattern4.test(data1)){const err5 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data0.label !== undefined){let data2 = data0.label;if(typeof data2 === "string"){if(func2(data2) > 48){const err7 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/maxLength",keyword:"maxLength",params:{limit: 48},message:"must NOT have more than 48 characters"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(func2(data2) < 1){const err8 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data0.focus !== undefined){let data3 = data0.focus;if(Array.isArray(data3)){if(data3.length < 1){const err10 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}const len1 = data3.length;for(let i1=0; i1<len1; i1++){let data4 = data3[i1];if(typeof data4 === "string"){if(!pattern4.test(data4)){const err11 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data0.note !== undefined){let data5 = data0.note;if(typeof data5 === "string"){if(func2(data5) > 140){const err14 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/maxLength",keyword:"maxLength",params:{limit: 140},message:"must NOT have more than 140 characters"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}else {const err15 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}}else {const err16 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}}else {const err17 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}validate22.errors = vErrors;return errors === 0;}validate22.evaluated = {"items":true,"dynamicProps":false,"dynamicItems":false};function validate20(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://github.com/tt-a1i/archify/schemas/workflow.schema.json" */;let vErrors = null;let errors = 0;const evaluated0 = validate20.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.schema_version === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "schema_version"},message:"must have required property '"+"schema_version"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.diagram_type === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "diagram_type"},message:"must have required property '"+"diagram_type"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.meta === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "meta"},message:"must have required property '"+"meta"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.lanes === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "lanes"},message:"must have required property '"+"lanes"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.nodes === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "nodes"},message:"must have required property '"+"nodes"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.edges === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "edges"},message:"must have required property '"+"edges"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}for(const key0 in data){if(!(func1.call(schema31.properties, key0))){const err6 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.schema_version !== undefined){if(1 !== data.schema_version){const err7 = {instancePath:instancePath+"/schema_version",schemaPath:"#/properties/schema_version/const",keyword:"const",params:{allowedValue: 1},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.diagram_type !== undefined){if("workflow" !== data.diagram_type){const err8 = {instancePath:instancePath+"/diagram_type",schemaPath:"#/properties/diagram_type/const",keyword:"const",params:{allowedValue: "workflow"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.meta !== undefined){let data2 = data.meta;if(data2 && typeof data2 == "object" && !Array.isArray(data2)){if(data2.title === undefined){const err9 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}for(const key1 in data2){if(!((((((((key1 === "title") || (key1 === "subtitle")) || (key1 === "output")) || (key1 === "animation")) || (key1 === "visual_preset")) || (key1 === "quality_profile")) || (key1 === "views")) || (key1 === "viewBox"))){const err10 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data2.title !== undefined){let data3 = data2.title;if(typeof data3 === "string"){if(func2(data3) < 1){const err11 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data2.subtitle !== undefined){if(typeof data2.subtitle !== "string"){const err13 = {instancePath:instancePath+"/meta/subtitle",schemaPath:"#/properties/meta/properties/subtitle/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data2.output !== undefined){if(typeof data2.output !== "string"){const err14 = {instancePath:instancePath+"/meta/output",schemaPath:"#/properties/meta/properties/output/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data2.animation !== undefined){let data6 = data2.animation;if(!((data6 === "trace") || (data6 === "none"))){const err15 = {instancePath:instancePath+"/meta/animation",schemaPath:"#/properties/meta/properties/animation/enum",keyword:"enum",params:{allowedValues: schema31.properties.meta.properties.animation.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data2.visual_preset !== undefined){let data7 = data2.visual_preset;if(!(((data7 === "classic") || (data7 === "signal-flow")) || (data7 === "blueprint"))){const err16 = {instancePath:instancePath+"/meta/visual_preset",schemaPath:"#/properties/meta/properties/visual_preset/enum",keyword:"enum",params:{allowedValues: schema31.properties.meta.properties.visual_preset.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data2.quality_profile !== undefined){let data8 = data2.quality_profile;if(!((data8 === "standard") || (data8 === "showcase"))){const err17 = {instancePath:instancePath+"/meta/quality_profile",schemaPath:"#/properties/meta/properties/quality_profile/enum",keyword:"enum",params:{allowedValues: schema31.properties.meta.properties.quality_profile.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data2.views !== undefined){if(!(validate22(data2.views, {instancePath:instancePath+"/meta/views",parentData:data2,parentDataProperty:"views",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate22.errors : vErrors.concat(validate22.errors);errors = vErrors.length;}}if(data2.viewBox !== undefined){let data10 = data2.viewBox;if(Array.isArray(data10)){if(data10.length > 2){const err18 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}if(data10.length < 2){const err19 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}const len0 = data10.length;if(len0 > 0){let data11 = data10[0];if((typeof data11 == "number") && (isFinite(data11))){if(data11 < 700 || isNaN(data11)){const err20 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/minimum",keyword:"minimum",params:{comparison: ">=", limit: 700},message:"must be >= 700"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}else {const err21 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(len0 > 1){let data12 = data10[1];if((typeof data12 == "number") && (isFinite(data12))){if(data12 < 240 || isNaN(data12)){const err22 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/minimum",keyword:"minimum",params:{comparison: ">=", limit: 240},message:"must be >= 240"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}else {const err23 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}const len1 = data10.length;if(!(len1 <= 2)){const err24 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}else {const err25 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}}else {const err26 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}if(data.lanes !== undefined){let data13 = data.lanes;if(Array.isArray(data13)){if(data13.length < 1){const err27 = {instancePath:instancePath+"/lanes",schemaPath:"#/properties/lanes/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}const len2 = data13.length;for(let i0=0; i0<len2; i0++){let data14 = data13[i0];if(data14 && typeof data14 == "object" && !Array.isArray(data14)){if(data14.id === undefined){const err28 = {instancePath:instancePath+"/lanes/" + i0,schemaPath:"#/properties/lanes/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}if(data14.label === undefined){const err29 = {instancePath:instancePath+"/lanes/" + i0,schemaPath:"#/properties/lanes/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}for(const key2 in data14){if(!(((key2 === "id") || (key2 === "label")) || (key2 === "variant"))){const err30 = {instancePath:instancePath+"/lanes/" + i0,schemaPath:"#/properties/lanes/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}}if(data14.id !== undefined){let data15 = data14.id;if(typeof data15 === "string"){if(!pattern4.test(data15)){const err31 = {instancePath:instancePath+"/lanes/" + i0+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}else {const err32 = {instancePath:instancePath+"/lanes/" + i0+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}if(data14.label !== undefined){let data16 = data14.label;if(typeof data16 === "string"){if(func2(data16) < 1){const err33 = {instancePath:instancePath+"/lanes/" + i0+"/label",schemaPath:"#/properties/lanes/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}else {const err34 = {instancePath:instancePath+"/lanes/" + i0+"/label",schemaPath:"#/properties/lanes/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}if(data14.variant !== undefined){let data17 = data14.variant;if(!((data17 === "normal") || (data17 === "exception"))){const err35 = {instancePath:instancePath+"/lanes/" + i0+"/variant",schemaPath:"#/properties/lanes/items/properties/variant/enum",keyword:"enum",params:{allowedValues: schema31.properties.lanes.items.properties.variant.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}}else {const err36 = {instancePath:instancePath+"/lanes/" + i0,schemaPath:"#/properties/lanes/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}}else {const err37 = {instancePath:instancePath+"/lanes",schemaPath:"#/properties/lanes/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}}if(data.phases !== undefined){let data18 = data.phases;if(Array.isArray(data18)){const len3 = data18.length;for(let i1=0; i1<len3; i1++){let data19 = data18[i1];if(data19 && typeof data19 == "object" && !Array.isArray(data19)){if(data19.id === undefined){const err38 = {instancePath:instancePath+"/phases/" + i1,schemaPath:"#/properties/phases/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}if(data19.label === undefined){const err39 = {instancePath:instancePath+"/phases/" + i1,schemaPath:"#/properties/phases/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}if(data19.fromCol === undefined){const err40 = {instancePath:instancePath+"/phases/" + i1,schemaPath:"#/properties/phases/items/required",keyword:"required",params:{missingProperty: "fromCol"},message:"must have required property '"+"fromCol"+"'"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}if(data19.toCol === undefined){const err41 = {instancePath:instancePath+"/phases/" + i1,schemaPath:"#/properties/phases/items/required",keyword:"required",params:{missingProperty: "toCol"},message:"must have required property '"+"toCol"+"'"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}for(const key3 in data19){if(!(((((key3 === "id") || (key3 === "label")) || (key3 === "fromCol")) || (key3 === "toCol")) || (key3 === "variant"))){const err42 = {instancePath:instancePath+"/phases/" + i1,schemaPath:"#/properties/phases/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}}if(data19.id !== undefined){let data20 = data19.id;if(typeof data20 === "string"){if(!pattern4.test(data20)){const err43 = {instancePath:instancePath+"/phases/" + i1+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}}else {const err44 = {instancePath:instancePath+"/phases/" + i1+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}}if(data19.label !== undefined){let data21 = data19.label;if(typeof data21 === "string"){if(func2(data21) < 1){const err45 = {instancePath:instancePath+"/phases/" + i1+"/label",schemaPath:"#/properties/phases/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}}else {const err46 = {instancePath:instancePath+"/phases/" + i1+"/label",schemaPath:"#/properties/phases/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}}if(data19.fromCol !== undefined){let data22 = data19.fromCol;if(!(((typeof data22 == "number") && (!(data22 % 1) && !isNaN(data22))) && (isFinite(data22)))){const err47 = {instancePath:instancePath+"/phases/" + i1+"/fromCol",schemaPath:"#/properties/phases/items/properties/fromCol/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}if((typeof data22 == "number") && (isFinite(data22))){if(data22 > 5 || isNaN(data22)){const err48 = {instancePath:instancePath+"/phases/" + i1+"/fromCol",schemaPath:"#/properties/phases/items/properties/fromCol/maximum",keyword:"maximum",params:{comparison: "<=", limit: 5},message:"must be <= 5"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}if(data22 < 0 || isNaN(data22)){const err49 = {instancePath:instancePath+"/phases/" + i1+"/fromCol",schemaPath:"#/properties/phases/items/properties/fromCol/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}}}if(data19.toCol !== undefined){let data23 = data19.toCol;if(!(((typeof data23 == "number") && (!(data23 % 1) && !isNaN(data23))) && (isFinite(data23)))){const err50 = {instancePath:instancePath+"/phases/" + i1+"/toCol",schemaPath:"#/properties/phases/items/properties/toCol/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}if((typeof data23 == "number") && (isFinite(data23))){if(data23 > 5 || isNaN(data23)){const err51 = {instancePath:instancePath+"/phases/" + i1+"/toCol",schemaPath:"#/properties/phases/items/properties/toCol/maximum",keyword:"maximum",params:{comparison: "<=", limit: 5},message:"must be <= 5"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}if(data23 < 0 || isNaN(data23)){const err52 = {instancePath:instancePath+"/phases/" + i1+"/toCol",schemaPath:"#/properties/phases/items/properties/toCol/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}}}if(data19.variant !== undefined){let data24 = data19.variant;if(!((((data24 === "default") || (data24 === "emphasis")) || (data24 === "security")) || (data24 === "dashed"))){const err53 = {instancePath:instancePath+"/phases/" + i1+"/variant",schemaPath:"#/properties/phases/items/properties/variant/enum",keyword:"enum",params:{allowedValues: schema31.properties.phases.items.properties.variant.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}}}else {const err54 = {instancePath:instancePath+"/phases/" + i1,schemaPath:"#/properties/phases/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}}}else {const err55 = {instancePath:instancePath+"/phases",schemaPath:"#/properties/phases/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}}if(data.groups !== undefined){let data25 = data.groups;if(Array.isArray(data25)){const len4 = data25.length;for(let i2=0; i2<len4; i2++){let data26 = data25[i2];if(data26 && typeof data26 == "object" && !Array.isArray(data26)){if(data26.id === undefined){const err56 = {instancePath:instancePath+"/groups/" + i2,schemaPath:"#/properties/groups/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}if(data26.label === undefined){const err57 = {instancePath:instancePath+"/groups/" + i2,schemaPath:"#/properties/groups/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}if(data26.lane === undefined){const err58 = {instancePath:instancePath+"/groups/" + i2,schemaPath:"#/properties/groups/items/required",keyword:"required",params:{missingProperty: "lane"},message:"must have required property '"+"lane"+"'"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}if(data26.fromCol === undefined){const err59 = {instancePath:instancePath+"/groups/" + i2,schemaPath:"#/properties/groups/items/required",keyword:"required",params:{missingProperty: "fromCol"},message:"must have required property '"+"fromCol"+"'"};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}if(data26.toCol === undefined){const err60 = {instancePath:instancePath+"/groups/" + i2,schemaPath:"#/properties/groups/items/required",keyword:"required",params:{missingProperty: "toCol"},message:"must have required property '"+"toCol"+"'"};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}for(const key4 in data26){if(!((((((key4 === "id") || (key4 === "label")) || (key4 === "lane")) || (key4 === "fromCol")) || (key4 === "toCol")) || (key4 === "variant"))){const err61 = {instancePath:instancePath+"/groups/" + i2,schemaPath:"#/properties/groups/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key4},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err61];}else {vErrors.push(err61);}errors++;}}if(data26.id !== undefined){let data27 = data26.id;if(typeof data27 === "string"){if(!pattern4.test(data27)){const err62 = {instancePath:instancePath+"/groups/" + i2+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err62];}else {vErrors.push(err62);}errors++;}}else {const err63 = {instancePath:instancePath+"/groups/" + i2+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;}}if(data26.label !== undefined){let data28 = data26.label;if(typeof data28 === "string"){if(func2(data28) < 1){const err64 = {instancePath:instancePath+"/groups/" + i2+"/label",schemaPath:"#/properties/groups/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}}else {const err65 = {instancePath:instancePath+"/groups/" + i2+"/label",schemaPath:"#/properties/groups/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}}if(data26.lane !== undefined){let data29 = data26.lane;if(typeof data29 === "string"){if(!pattern4.test(data29)){const err66 = {instancePath:instancePath+"/groups/" + i2+"/lane",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err66];}else {vErrors.push(err66);}errors++;}}else {const err67 = {instancePath:instancePath+"/groups/" + i2+"/lane",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err67];}else {vErrors.push(err67);}errors++;}}if(data26.fromCol !== undefined){let data30 = data26.fromCol;if(!(((typeof data30 == "number") && (!(data30 % 1) && !isNaN(data30))) && (isFinite(data30)))){const err68 = {instancePath:instancePath+"/groups/" + i2+"/fromCol",schemaPath:"#/properties/groups/items/properties/fromCol/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;}if((typeof data30 == "number") && (isFinite(data30))){if(data30 > 5 || isNaN(data30)){const err69 = {instancePath:instancePath+"/groups/" + i2+"/fromCol",schemaPath:"#/properties/groups/items/properties/fromCol/maximum",keyword:"maximum",params:{comparison: "<=", limit: 5},message:"must be <= 5"};if(vErrors === null){vErrors = [err69];}else {vErrors.push(err69);}errors++;}if(data30 < 0 || isNaN(data30)){const err70 = {instancePath:instancePath+"/groups/" + i2+"/fromCol",schemaPath:"#/properties/groups/items/properties/fromCol/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err70];}else {vErrors.push(err70);}errors++;}}}if(data26.toCol !== undefined){let data31 = data26.toCol;if(!(((typeof data31 == "number") && (!(data31 % 1) && !isNaN(data31))) && (isFinite(data31)))){const err71 = {instancePath:instancePath+"/groups/" + i2+"/toCol",schemaPath:"#/properties/groups/items/properties/toCol/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err71];}else {vErrors.push(err71);}errors++;}if((typeof data31 == "number") && (isFinite(data31))){if(data31 > 5 || isNaN(data31)){const err72 = {instancePath:instancePath+"/groups/" + i2+"/toCol",schemaPath:"#/properties/groups/items/properties/toCol/maximum",keyword:"maximum",params:{comparison: "<=", limit: 5},message:"must be <= 5"};if(vErrors === null){vErrors = [err72];}else {vErrors.push(err72);}errors++;}if(data31 < 0 || isNaN(data31)){const err73 = {instancePath:instancePath+"/groups/" + i2+"/toCol",schemaPath:"#/properties/groups/items/properties/toCol/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err73];}else {vErrors.push(err73);}errors++;}}}if(data26.variant !== undefined){let data32 = data26.variant;if(!((((data32 === "default") || (data32 === "emphasis")) || (data32 === "security")) || (data32 === "dashed"))){const err74 = {instancePath:instancePath+"/groups/" + i2+"/variant",schemaPath:"#/properties/groups/items/properties/variant/enum",keyword:"enum",params:{allowedValues: schema31.properties.groups.items.properties.variant.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err74];}else {vErrors.push(err74);}errors++;}}}else {const err75 = {instancePath:instancePath+"/groups/" + i2,schemaPath:"#/properties/groups/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err75];}else {vErrors.push(err75);}errors++;}}}else {const err76 = {instancePath:instancePath+"/groups",schemaPath:"#/properties/groups/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err76];}else {vErrors.push(err76);}errors++;}}if(data.mainPath !== undefined){let data33 = data.mainPath;if(Array.isArray(data33)){if(data33.length < 2){const err77 = {instancePath:instancePath+"/mainPath",schemaPath:"#/properties/mainPath/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err77];}else {vErrors.push(err77);}errors++;}const len5 = data33.length;for(let i3=0; i3<len5; i3++){let data34 = data33[i3];if(typeof data34 === "string"){if(!pattern4.test(data34)){const err78 = {instancePath:instancePath+"/mainPath/" + i3,schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err78];}else {vErrors.push(err78);}errors++;}}else {const err79 = {instancePath:instancePath+"/mainPath/" + i3,schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err79];}else {vErrors.push(err79);}errors++;}}}else {const err80 = {instancePath:instancePath+"/mainPath",schemaPath:"#/properties/mainPath/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err80];}else {vErrors.push(err80);}errors++;}}if(data.nodes !== undefined){let data35 = data.nodes;if(Array.isArray(data35)){if(data35.length < 1){const err81 = {instancePath:instancePath+"/nodes",schemaPath:"#/properties/nodes/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err81];}else {vErrors.push(err81);}errors++;}const len6 = data35.length;for(let i4=0; i4<len6; i4++){let data36 = data35[i4];if(data36 && typeof data36 == "object" && !Array.isArray(data36)){if(data36.id === undefined){const err82 = {instancePath:instancePath+"/nodes/" + i4,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err82];}else {vErrors.push(err82);}errors++;}if(data36.lane === undefined){const err83 = {instancePath:instancePath+"/nodes/" + i4,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "lane"},message:"must have required property '"+"lane"+"'"};if(vErrors === null){vErrors = [err83];}else {vErrors.push(err83);}errors++;}if(data36.col === undefined){const err84 = {instancePath:instancePath+"/nodes/" + i4,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "col"},message:"must have required property '"+"col"+"'"};if(vErrors === null){vErrors = [err84];}else {vErrors.push(err84);}errors++;}if(data36.type === undefined){const err85 = {instancePath:instancePath+"/nodes/" + i4,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "type"},message:"must have required property '"+"type"+"'"};if(vErrors === null){vErrors = [err85];}else {vErrors.push(err85);}errors++;}if(data36.label === undefined){const err86 = {instancePath:instancePath+"/nodes/" + i4,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err86];}else {vErrors.push(err86);}errors++;}for(const key5 in data36){if(!(func1.call(schema31.properties.nodes.items.properties, key5))){const err87 = {instancePath:instancePath+"/nodes/" + i4,schemaPath:"#/properties/nodes/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key5},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err87];}else {vErrors.push(err87);}errors++;}}if(data36.id !== undefined){let data37 = data36.id;if(typeof data37 === "string"){if(!pattern4.test(data37)){const err88 = {instancePath:instancePath+"/nodes/" + i4+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err88];}else {vErrors.push(err88);}errors++;}}else {const err89 = {instancePath:instancePath+"/nodes/" + i4+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err89];}else {vErrors.push(err89);}errors++;}}if(data36.lane !== undefined){let data38 = data36.lane;if(typeof data38 === "string"){if(!pattern4.test(data38)){const err90 = {instancePath:instancePath+"/nodes/" + i4+"/lane",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err90];}else {vErrors.push(err90);}errors++;}}else {const err91 = {instancePath:instancePath+"/nodes/" + i4+"/lane",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err91];}else {vErrors.push(err91);}errors++;}}if(data36.col !== undefined){let data39 = data36.col;if(!(((typeof data39 == "number") && (!(data39 % 1) && !isNaN(data39))) && (isFinite(data39)))){const err92 = {instancePath:instancePath+"/nodes/" + i4+"/col",schemaPath:"#/properties/nodes/items/properties/col/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err92];}else {vErrors.push(err92);}errors++;}if((typeof data39 == "number") && (isFinite(data39))){if(data39 > 5 || isNaN(data39)){const err93 = {instancePath:instancePath+"/nodes/" + i4+"/col",schemaPath:"#/properties/nodes/items/properties/col/maximum",keyword:"maximum",params:{comparison: "<=", limit: 5},message:"must be <= 5"};if(vErrors === null){vErrors = [err93];}else {vErrors.push(err93);}errors++;}if(data39 < 0 || isNaN(data39)){const err94 = {instancePath:instancePath+"/nodes/" + i4+"/col",schemaPath:"#/properties/nodes/items/properties/col/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err94];}else {vErrors.push(err94);}errors++;}}}if(data36.type !== undefined){let data40 = data36.type;if(!(((((((data40 === "frontend") || (data40 === "backend")) || (data40 === "database")) || (data40 === "cloud")) || (data40 === "security")) || (data40 === "messagebus")) || (data40 === "external"))){const err95 = {instancePath:instancePath+"/nodes/" + i4+"/type",schemaPath:"common.schema.json#/$defs/componentType/enum",keyword:"enum",params:{allowedValues: schema43.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err95];}else {vErrors.push(err95);}errors++;}}if(data36.label !== undefined){let data41 = data36.label;if(typeof data41 === "string"){if(func2(data41) < 1){const err96 = {instancePath:instancePath+"/nodes/" + i4+"/label",schemaPath:"#/properties/nodes/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err96];}else {vErrors.push(err96);}errors++;}}else {const err97 = {instancePath:instancePath+"/nodes/" + i4+"/label",schemaPath:"#/properties/nodes/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err97];}else {vErrors.push(err97);}errors++;}}if(data36.sublabel !== undefined){if(typeof data36.sublabel !== "string"){const err98 = {instancePath:instancePath+"/nodes/" + i4+"/sublabel",schemaPath:"#/properties/nodes/items/properties/sublabel/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err98];}else {vErrors.push(err98);}errors++;}}if(data36.tag !== undefined){if(typeof data36.tag !== "string"){const err99 = {instancePath:instancePath+"/nodes/" + i4+"/tag",schemaPath:"#/properties/nodes/items/properties/tag/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err99];}else {vErrors.push(err99);}errors++;}}if(data36.width !== undefined){let data44 = data36.width;if((typeof data44 == "number") && (isFinite(data44))){if(data44 < 32 || isNaN(data44)){const err100 = {instancePath:instancePath+"/nodes/" + i4+"/width",schemaPath:"#/properties/nodes/items/properties/width/minimum",keyword:"minimum",params:{comparison: ">=", limit: 32},message:"must be >= 32"};if(vErrors === null){vErrors = [err100];}else {vErrors.push(err100);}errors++;}}else {const err101 = {instancePath:instancePath+"/nodes/" + i4+"/width",schemaPath:"#/properties/nodes/items/properties/width/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err101];}else {vErrors.push(err101);}errors++;}}if(data36.height !== undefined){let data45 = data36.height;if((typeof data45 == "number") && (isFinite(data45))){if(data45 < 32 || isNaN(data45)){const err102 = {instancePath:instancePath+"/nodes/" + i4+"/height",schemaPath:"#/properties/nodes/items/properties/height/minimum",keyword:"minimum",params:{comparison: ">=", limit: 32},message:"must be >= 32"};if(vErrors === null){vErrors = [err102];}else {vErrors.push(err102);}errors++;}}else {const err103 = {instancePath:instancePath+"/nodes/" + i4+"/height",schemaPath:"#/properties/nodes/items/properties/height/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err103];}else {vErrors.push(err103);}errors++;}}if(data36.yOffset !== undefined){let data46 = data36.yOffset;if(!((typeof data46 == "number") && (isFinite(data46)))){const err104 = {instancePath:instancePath+"/nodes/" + i4+"/yOffset",schemaPath:"#/properties/nodes/items/properties/yOffset/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err104];}else {vErrors.push(err104);}errors++;}}}else {const err105 = {instancePath:instancePath+"/nodes/" + i4,schemaPath:"#/properties/nodes/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err105];}else {vErrors.push(err105);}errors++;}}}else {const err106 = {instancePath:instancePath+"/nodes",schemaPath:"#/properties/nodes/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err106];}else {vErrors.push(err106);}errors++;}}if(data.edges !== undefined){let data47 = data.edges;if(Array.isArray(data47)){const len7 = data47.length;for(let i5=0; i5<len7; i5++){let data48 = data47[i5];if(data48 && typeof data48 == "object" && !Array.isArray(data48)){if(data48.from === undefined){const err107 = {instancePath:instancePath+"/edges/" + i5,schemaPath:"#/properties/edges/items/required",keyword:"required",params:{missingProperty: "from"},message:"must have required property '"+"from"+"'"};if(vErrors === null){vErrors = [err107];}else {vErrors.push(err107);}errors++;}if(data48.to === undefined){const err108 = {instancePath:instancePath+"/edges/" + i5,schemaPath:"#/properties/edges/items/required",keyword:"required",params:{missingProperty: "to"},message:"must have required property '"+"to"+"'"};if(vErrors === null){vErrors = [err108];}else {vErrors.push(err108);}errors++;}for(const key6 in data48){if(!(func1.call(schema31.properties.edges.items.properties, key6))){const err109 = {instancePath:instancePath+"/edges/" + i5,schemaPath:"#/properties/edges/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key6},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err109];}else {vErrors.push(err109);}errors++;}}if(data48.id !== undefined){let data49 = data48.id;if(typeof data49 === "string"){if(!pattern4.test(data49)){const err110 = {instancePath:instancePath+"/edges/" + i5+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err110];}else {vErrors.push(err110);}errors++;}}else {const err111 = {instancePath:instancePath+"/edges/" + i5+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err111];}else {vErrors.push(err111);}errors++;}}if(data48.from !== undefined){let data50 = data48.from;if(typeof data50 === "string"){if(!pattern4.test(data50)){const err112 = {instancePath:instancePath+"/edges/" + i5+"/from",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err112];}else {vErrors.push(err112);}errors++;}}else {const err113 = {instancePath:instancePath+"/edges/" + i5+"/from",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err113];}else {vErrors.push(err113);}errors++;}}if(data48.to !== undefined){let data51 = data48.to;if(typeof data51 === "string"){if(!pattern4.test(data51)){const err114 = {instancePath:instancePath+"/edges/" + i5+"/to",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err114];}else {vErrors.push(err114);}errors++;}}else {const err115 = {instancePath:instancePath+"/edges/" + i5+"/to",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err115];}else {vErrors.push(err115);}errors++;}}if(data48.label !== undefined){if(typeof data48.label !== "string"){const err116 = {instancePath:instancePath+"/edges/" + i5+"/label",schemaPath:"#/properties/edges/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err116];}else {vErrors.push(err116);}errors++;}}if(data48.variant !== undefined){let data53 = data48.variant;if(!((((data53 === "default") || (data53 === "emphasis")) || (data53 === "security")) || (data53 === "dashed"))){const err117 = {instancePath:instancePath+"/edges/" + i5+"/variant",schemaPath:"common.schema.json#/$defs/variant/enum",keyword:"enum",params:{allowedValues: schema47.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err117];}else {vErrors.push(err117);}errors++;}}if(data48.role !== undefined){let data54 = data48.role;if(!(((((data54 === "main") || (data54 === "branch")) || (data54 === "async")) || (data54 === "return")) || (data54 === "error"))){const err118 = {instancePath:instancePath+"/edges/" + i5+"/role",schemaPath:"#/properties/edges/items/properties/role/enum",keyword:"enum",params:{allowedValues: schema31.properties.edges.items.properties.role.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err118];}else {vErrors.push(err118);}errors++;}}if(data48.fromSide !== undefined){let data55 = data48.fromSide;if(!((((data55 === "left") || (data55 === "right")) || (data55 === "top")) || (data55 === "bottom"))){const err119 = {instancePath:instancePath+"/edges/" + i5+"/fromSide",schemaPath:"#/$defs/side/enum",keyword:"enum",params:{allowedValues: schema48.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err119];}else {vErrors.push(err119);}errors++;}}if(data48.toSide !== undefined){let data56 = data48.toSide;if(!((((data56 === "left") || (data56 === "right")) || (data56 === "top")) || (data56 === "bottom"))){const err120 = {instancePath:instancePath+"/edges/" + i5+"/toSide",schemaPath:"#/$defs/side/enum",keyword:"enum",params:{allowedValues: schema48.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err120];}else {vErrors.push(err120);}errors++;}}if(data48.route !== undefined){let data57 = data48.route;if(!(((((((data57 === "auto") || (data57 === "straight")) || (data57 === "drop")) || (data57 === "outside-right")) || (data57 === "return-left")) || (data57 === "bottom-channel")) || (data57 === "up-channel"))){const err121 = {instancePath:instancePath+"/edges/" + i5+"/route",schemaPath:"#/properties/edges/items/properties/route/enum",keyword:"enum",params:{allowedValues: schema31.properties.edges.items.properties.route.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err121];}else {vErrors.push(err121);}errors++;}}if(data48.via !== undefined){let data58 = data48.via;if(Array.isArray(data58)){const len8 = data58.length;for(let i6=0; i6<len8; i6++){let data59 = data58[i6];if(Array.isArray(data59)){if(data59.length > 2){const err122 = {instancePath:instancePath+"/edges/" + i5+"/via/" + i6,schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err122];}else {vErrors.push(err122);}errors++;}if(data59.length < 2){const err123 = {instancePath:instancePath+"/edges/" + i5+"/via/" + i6,schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err123];}else {vErrors.push(err123);}errors++;}const len9 = data59.length;if(len9 > 0){let data60 = data59[0];if(!((typeof data60 == "number") && (isFinite(data60)))){const err124 = {instancePath:instancePath+"/edges/" + i5+"/via/" + i6+"/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err124];}else {vErrors.push(err124);}errors++;}}if(len9 > 1){let data61 = data59[1];if(!((typeof data61 == "number") && (isFinite(data61)))){const err125 = {instancePath:instancePath+"/edges/" + i5+"/via/" + i6+"/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err125];}else {vErrors.push(err125);}errors++;}}const len10 = data59.length;if(!(len10 <= 2)){const err126 = {instancePath:instancePath+"/edges/" + i5+"/via/" + i6,schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err126];}else {vErrors.push(err126);}errors++;}}else {const err127 = {instancePath:instancePath+"/edges/" + i5+"/via/" + i6,schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err127];}else {vErrors.push(err127);}errors++;}}}else {const err128 = {instancePath:instancePath+"/edges/" + i5+"/via",schemaPath:"#/properties/edges/items/properties/via/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err128];}else {vErrors.push(err128);}errors++;}}if(data48.labelAt !== undefined){let data62 = data48.labelAt;if(Array.isArray(data62)){if(data62.length > 2){const err129 = {instancePath:instancePath+"/edges/" + i5+"/labelAt",schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err129];}else {vErrors.push(err129);}errors++;}if(data62.length < 2){const err130 = {instancePath:instancePath+"/edges/" + i5+"/labelAt",schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err130];}else {vErrors.push(err130);}errors++;}const len11 = data62.length;if(len11 > 0){let data63 = data62[0];if(!((typeof data63 == "number") && (isFinite(data63)))){const err131 = {instancePath:instancePath+"/edges/" + i5+"/labelAt/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err131];}else {vErrors.push(err131);}errors++;}}if(len11 > 1){let data64 = data62[1];if(!((typeof data64 == "number") && (isFinite(data64)))){const err132 = {instancePath:instancePath+"/edges/" + i5+"/labelAt/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err132];}else {vErrors.push(err132);}errors++;}}const len12 = data62.length;if(!(len12 <= 2)){const err133 = {instancePath:instancePath+"/edges/" + i5+"/labelAt",schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err133];}else {vErrors.push(err133);}errors++;}}else {const err134 = {instancePath:instancePath+"/edges/" + i5+"/labelAt",schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err134];}else {vErrors.push(err134);}errors++;}}if(data48.labelDx !== undefined){let data65 = data48.labelDx;if(!((typeof data65 == "number") && (isFinite(data65)))){const err135 = {instancePath:instancePath+"/edges/" + i5+"/labelDx",schemaPath:"#/properties/edges/items/properties/labelDx/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err135];}else {vErrors.push(err135);}errors++;}}if(data48.labelDy !== undefined){let data66 = data48.labelDy;if(!((typeof data66 == "number") && (isFinite(data66)))){const err136 = {instancePath:instancePath+"/edges/" + i5+"/labelDy",schemaPath:"#/properties/edges/items/properties/labelDy/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err136];}else {vErrors.push(err136);}errors++;}}if(data48.labelSegment !== undefined){let data67 = data48.labelSegment;if(!(((typeof data67 == "number") && (!(data67 % 1) && !isNaN(data67))) && (isFinite(data67)))){const err137 = {instancePath:instancePath+"/edges/" + i5+"/labelSegment",schemaPath:"#/properties/edges/items/properties/labelSegment/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err137];}else {vErrors.push(err137);}errors++;}if((typeof data67 == "number") && (isFinite(data67))){if(data67 < 0 || isNaN(data67)){const err138 = {instancePath:instancePath+"/edges/" + i5+"/labelSegment",schemaPath:"#/properties/edges/items/properties/labelSegment/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err138];}else {vErrors.push(err138);}errors++;}}}if(data48.channelX !== undefined){let data68 = data48.channelX;if(!((typeof data68 == "number") && (isFinite(data68)))){const err139 = {instancePath:instancePath+"/edges/" + i5+"/channelX",schemaPath:"#/properties/edges/items/properties/channelX/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err139];}else {vErrors.push(err139);}errors++;}}if(data48.channelY !== undefined){let data69 = data48.channelY;if(!((typeof data69 == "number") && (isFinite(data69)))){const err140 = {instancePath:instancePath+"/edges/" + i5+"/channelY",schemaPath:"#/properties/edges/items/properties/channelY/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err140];}else {vErrors.push(err140);}errors++;}}if(data48.bias !== undefined){let data70 = data48.bias;if((typeof data70 == "number") && (isFinite(data70))){if(data70 > 1 || isNaN(data70)){const err141 = {instancePath:instancePath+"/edges/" + i5+"/bias",schemaPath:"#/properties/edges/items/properties/bias/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err141];}else {vErrors.push(err141);}errors++;}if(data70 < 0 || isNaN(data70)){const err142 = {instancePath:instancePath+"/edges/" + i5+"/bias",schemaPath:"#/properties/edges/items/properties/bias/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err142];}else {vErrors.push(err142);}errors++;}}else {const err143 = {instancePath:instancePath+"/edges/" + i5+"/bias",schemaPath:"#/properties/edges/items/properties/bias/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err143];}else {vErrors.push(err143);}errors++;}}if(data48.width !== undefined){let data71 = data48.width;if((typeof data71 == "number") && (isFinite(data71))){if(data71 < 0.5 || isNaN(data71)){const err144 = {instancePath:instancePath+"/edges/" + i5+"/width",schemaPath:"#/properties/edges/items/properties/width/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0.5},message:"must be >= 0.5"};if(vErrors === null){vErrors = [err144];}else {vErrors.push(err144);}errors++;}}else {const err145 = {instancePath:instancePath+"/edges/" + i5+"/width",schemaPath:"#/properties/edges/items/properties/width/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err145];}else {vErrors.push(err145);}errors++;}}}else {const err146 = {instancePath:instancePath+"/edges/" + i5,schemaPath:"#/properties/edges/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err146];}else {vErrors.push(err146);}errors++;}}}else {const err147 = {instancePath:instancePath+"/edges",schemaPath:"#/properties/edges/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err147];}else {vErrors.push(err147);}errors++;}}if(data.cards !== undefined){let data72 = data.cards;if(Array.isArray(data72)){const len13 = data72.length;for(let i7=0; i7<len13; i7++){let data73 = data72[i7];if(data73 && typeof data73 == "object" && !Array.isArray(data73)){if(data73.dot === undefined){const err148 = {instancePath:instancePath+"/cards/" + i7,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "dot"},message:"must have required property '"+"dot"+"'"};if(vErrors === null){vErrors = [err148];}else {vErrors.push(err148);}errors++;}if(data73.title === undefined){const err149 = {instancePath:instancePath+"/cards/" + i7,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err149];}else {vErrors.push(err149);}errors++;}if(data73.items === undefined){const err150 = {instancePath:instancePath+"/cards/" + i7,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "items"},message:"must have required property '"+"items"+"'"};if(vErrors === null){vErrors = [err150];}else {vErrors.push(err150);}errors++;}for(const key7 in data73){if(!(((key7 === "dot") || (key7 === "title")) || (key7 === "items"))){const err151 = {instancePath:instancePath+"/cards/" + i7,schemaPath:"common.schema.json#/$defs/cards/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key7},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err151];}else {vErrors.push(err151);}errors++;}}if(data73.dot !== undefined){let data74 = data73.dot;if(!(((((((data74 === "cyan") || (data74 === "emerald")) || (data74 === "violet")) || (data74 === "amber")) || (data74 === "rose")) || (data74 === "orange")) || (data74 === "slate"))){const err152 = {instancePath:instancePath+"/cards/" + i7+"/dot",schemaPath:"common.schema.json#/$defs/cards/items/properties/dot/enum",keyword:"enum",params:{allowedValues: schema52.items.properties.dot.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err152];}else {vErrors.push(err152);}errors++;}}if(data73.title !== undefined){let data75 = data73.title;if(typeof data75 === "string"){if(func2(data75) < 1){const err153 = {instancePath:instancePath+"/cards/" + i7+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err153];}else {vErrors.push(err153);}errors++;}}else {const err154 = {instancePath:instancePath+"/cards/" + i7+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err154];}else {vErrors.push(err154);}errors++;}}if(data73.items !== undefined){let data76 = data73.items;if(Array.isArray(data76)){const len14 = data76.length;for(let i8=0; i8<len14; i8++){if(typeof data76[i8] !== "string"){const err155 = {instancePath:instancePath+"/cards/" + i7+"/items/" + i8,schemaPath:"common.schema.json#/$defs/cards/items/properties/items/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err155];}else {vErrors.push(err155);}errors++;}}}else {const err156 = {instancePath:instancePath+"/cards/" + i7+"/items",schemaPath:"common.schema.json#/$defs/cards/items/properties/items/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err156];}else {vErrors.push(err156);}errors++;}}}else {const err157 = {instancePath:instancePath+"/cards/" + i7,schemaPath:"common.schema.json#/$defs/cards/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err157];}else {vErrors.push(err157);}errors++;}}}else {const err158 = {instancePath:instancePath+"/cards",schemaPath:"common.schema.json#/$defs/cards/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err158];}else {vErrors.push(err158);}errors++;}}}else {const err159 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err159];}else {vErrors.push(err159);}errors++;}validate20.errors = vErrors;return errors === 0;}validate20.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};export const sequence = validate24;const schema53 = {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://github.com/tt-a1i/archify/schemas/sequence.schema.json","title":"Archify Sequence Diagram","type":"object","additionalProperties":false,"required":["schema_version","diagram_type","meta","participants","messages"],"properties":{"schema_version":{"const":1},"diagram_type":{"const":"sequence"},"meta":{"type":"object","additionalProperties":false,"required":["title"],"properties":{"title":{"type":"string","minLength":1},"subtitle":{"type":"string"},"output":{"type":"string"},"animation":{"enum":["trace","none"]},"visual_preset":{"enum":["classic","signal-flow","blueprint"]},"quality_profile":{"enum":["standard","showcase"]},"views":{"$ref":"common.schema.json#/$defs/guidedViews"},"viewBox":{"type":"array","prefixItems":[{"type":"number","minimum":480},{"type":"number","minimum":480}],"items":false,"minItems":2,"maxItems":2}}},"participants":{"type":"array","minItems":2,"items":{"type":"object","additionalProperties":false,"required":["id","type","label"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"type":{"$ref":"common.schema.json#/$defs/componentType"},"label":{"type":"string","minLength":1},"sublabel":{"type":"string"}}}},"segments":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["from","to","label"],"properties":{"from":{"type":"number"},"to":{"type":"number"},"label":{"type":"string","minLength":1}}}},"messages":{"type":"array","minItems":1,"items":{"type":"object","additionalProperties":false,"required":["from","to","y","label"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"from":{"$ref":"common.schema.json#/$defs/id"},"to":{"$ref":"common.schema.json#/$defs/id"},"y":{"type":"number","minimum":160},"label":{"type":"string","minLength":1},"variant":{"enum":["default","emphasis","security","dashed","return"]},"note":{"type":"string"}}}},"activations":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["participant","from","to"],"properties":{"participant":{"$ref":"common.schema.json#/$defs/id"},"from":{"type":"number"},"to":{"type":"number"},"type":{"$ref":"common.schema.json#/$defs/componentType"}}}},"cards":{"$ref":"common.schema.json#/$defs/cards"}}};function validate25(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate25.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(Array.isArray(data)){if(data.length > 5){const err0 = {instancePath,schemaPath:"#/maxItems",keyword:"maxItems",params:{limit: 5},message:"must NOT have more than 5 items"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];if(data0 && typeof data0 == "object" && !Array.isArray(data0)){if(data0.id === undefined){const err1 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data0.label === undefined){const err2 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data0.focus === undefined){const err3 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "focus"},message:"must have required property '"+"focus"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data0){if(!((((key0 === "id") || (key0 === "label")) || (key0 === "focus")) || (key0 === "note"))){const err4 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data0.id !== undefined){let data1 = data0.id;if(typeof data1 === "string"){if(!pattern4.test(data1)){const err5 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data0.label !== undefined){let data2 = data0.label;if(typeof data2 === "string"){if(func2(data2) > 48){const err7 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/maxLength",keyword:"maxLength",params:{limit: 48},message:"must NOT have more than 48 characters"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(func2(data2) < 1){const err8 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data0.focus !== undefined){let data3 = data0.focus;if(Array.isArray(data3)){if(data3.length < 1){const err10 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}const len1 = data3.length;for(let i1=0; i1<len1; i1++){let data4 = data3[i1];if(typeof data4 === "string"){if(!pattern4.test(data4)){const err11 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data0.note !== undefined){let data5 = data0.note;if(typeof data5 === "string"){if(func2(data5) > 140){const err14 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/maxLength",keyword:"maxLength",params:{limit: 140},message:"must NOT have more than 140 characters"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}else {const err15 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}}else {const err16 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}}else {const err17 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}validate25.errors = vErrors;return errors === 0;}validate25.evaluated = {"items":true,"dynamicProps":false,"dynamicItems":false};function validate24(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://github.com/tt-a1i/archify/schemas/sequence.schema.json" */;let vErrors = null;let errors = 0;const evaluated0 = validate24.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.schema_version === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "schema_version"},message:"must have required property '"+"schema_version"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.diagram_type === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "diagram_type"},message:"must have required property '"+"diagram_type"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.meta === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "meta"},message:"must have required property '"+"meta"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.participants === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "participants"},message:"must have required property '"+"participants"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.messages === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "messages"},message:"must have required property '"+"messages"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}for(const key0 in data){if(!((((((((key0 === "schema_version") || (key0 === "diagram_type")) || (key0 === "meta")) || (key0 === "participants")) || (key0 === "segments")) || (key0 === "messages")) || (key0 === "activations")) || (key0 === "cards"))){const err5 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.schema_version !== undefined){if(1 !== data.schema_version){const err6 = {instancePath:instancePath+"/schema_version",schemaPath:"#/properties/schema_version/const",keyword:"const",params:{allowedValue: 1},message:"must be equal to constant"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.diagram_type !== undefined){if("sequence" !== data.diagram_type){const err7 = {instancePath:instancePath+"/diagram_type",schemaPath:"#/properties/diagram_type/const",keyword:"const",params:{allowedValue: "sequence"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.meta !== undefined){let data2 = data.meta;if(data2 && typeof data2 == "object" && !Array.isArray(data2)){if(data2.title === undefined){const err8 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}for(const key1 in data2){if(!((((((((key1 === "title") || (key1 === "subtitle")) || (key1 === "output")) || (key1 === "animation")) || (key1 === "visual_preset")) || (key1 === "quality_profile")) || (key1 === "views")) || (key1 === "viewBox"))){const err9 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data2.title !== undefined){let data3 = data2.title;if(typeof data3 === "string"){if(func2(data3) < 1){const err10 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}else {const err11 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data2.subtitle !== undefined){if(typeof data2.subtitle !== "string"){const err12 = {instancePath:instancePath+"/meta/subtitle",schemaPath:"#/properties/meta/properties/subtitle/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data2.output !== undefined){if(typeof data2.output !== "string"){const err13 = {instancePath:instancePath+"/meta/output",schemaPath:"#/properties/meta/properties/output/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data2.animation !== undefined){let data6 = data2.animation;if(!((data6 === "trace") || (data6 === "none"))){const err14 = {instancePath:instancePath+"/meta/animation",schemaPath:"#/properties/meta/properties/animation/enum",keyword:"enum",params:{allowedValues: schema53.properties.meta.properties.animation.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data2.visual_preset !== undefined){let data7 = data2.visual_preset;if(!(((data7 === "classic") || (data7 === "signal-flow")) || (data7 === "blueprint"))){const err15 = {instancePath:instancePath+"/meta/visual_preset",schemaPath:"#/properties/meta/properties/visual_preset/enum",keyword:"enum",params:{allowedValues: schema53.properties.meta.properties.visual_preset.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data2.quality_profile !== undefined){let data8 = data2.quality_profile;if(!((data8 === "standard") || (data8 === "showcase"))){const err16 = {instancePath:instancePath+"/meta/quality_profile",schemaPath:"#/properties/meta/properties/quality_profile/enum",keyword:"enum",params:{allowedValues: schema53.properties.meta.properties.quality_profile.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data2.views !== undefined){if(!(validate25(data2.views, {instancePath:instancePath+"/meta/views",parentData:data2,parentDataProperty:"views",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate25.errors : vErrors.concat(validate25.errors);errors = vErrors.length;}}if(data2.viewBox !== undefined){let data10 = data2.viewBox;if(Array.isArray(data10)){if(data10.length > 2){const err17 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}if(data10.length < 2){const err18 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}const len0 = data10.length;if(len0 > 0){let data11 = data10[0];if((typeof data11 == "number") && (isFinite(data11))){if(data11 < 480 || isNaN(data11)){const err19 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/minimum",keyword:"minimum",params:{comparison: ">=", limit: 480},message:"must be >= 480"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}else {const err20 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}if(len0 > 1){let data12 = data10[1];if((typeof data12 == "number") && (isFinite(data12))){if(data12 < 480 || isNaN(data12)){const err21 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/minimum",keyword:"minimum",params:{comparison: ">=", limit: 480},message:"must be >= 480"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}else {const err22 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}const len1 = data10.length;if(!(len1 <= 2)){const err23 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}else {const err24 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}}else {const err25 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}if(data.participants !== undefined){let data13 = data.participants;if(Array.isArray(data13)){if(data13.length < 2){const err26 = {instancePath:instancePath+"/participants",schemaPath:"#/properties/participants/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}const len2 = data13.length;for(let i0=0; i0<len2; i0++){let data14 = data13[i0];if(data14 && typeof data14 == "object" && !Array.isArray(data14)){if(data14.id === undefined){const err27 = {instancePath:instancePath+"/participants/" + i0,schemaPath:"#/properties/participants/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}if(data14.type === undefined){const err28 = {instancePath:instancePath+"/participants/" + i0,schemaPath:"#/properties/participants/items/required",keyword:"required",params:{missingProperty: "type"},message:"must have required property '"+"type"+"'"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}if(data14.label === undefined){const err29 = {instancePath:instancePath+"/participants/" + i0,schemaPath:"#/properties/participants/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}for(const key2 in data14){if(!((((key2 === "id") || (key2 === "type")) || (key2 === "label")) || (key2 === "sublabel"))){const err30 = {instancePath:instancePath+"/participants/" + i0,schemaPath:"#/properties/participants/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}}if(data14.id !== undefined){let data15 = data14.id;if(typeof data15 === "string"){if(!pattern4.test(data15)){const err31 = {instancePath:instancePath+"/participants/" + i0+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}else {const err32 = {instancePath:instancePath+"/participants/" + i0+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}if(data14.type !== undefined){let data16 = data14.type;if(!(((((((data16 === "frontend") || (data16 === "backend")) || (data16 === "database")) || (data16 === "cloud")) || (data16 === "security")) || (data16 === "messagebus")) || (data16 === "external"))){const err33 = {instancePath:instancePath+"/participants/" + i0+"/type",schemaPath:"common.schema.json#/$defs/componentType/enum",keyword:"enum",params:{allowedValues: schema43.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}if(data14.label !== undefined){let data17 = data14.label;if(typeof data17 === "string"){if(func2(data17) < 1){const err34 = {instancePath:instancePath+"/participants/" + i0+"/label",schemaPath:"#/properties/participants/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}else {const err35 = {instancePath:instancePath+"/participants/" + i0+"/label",schemaPath:"#/properties/participants/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}if(data14.sublabel !== undefined){if(typeof data14.sublabel !== "string"){const err36 = {instancePath:instancePath+"/participants/" + i0+"/sublabel",schemaPath:"#/properties/participants/items/properties/sublabel/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}}else {const err37 = {instancePath:instancePath+"/participants/" + i0,schemaPath:"#/properties/participants/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}}}else {const err38 = {instancePath:instancePath+"/participants",schemaPath:"#/properties/participants/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}}if(data.segments !== undefined){let data19 = data.segments;if(Array.isArray(data19)){const len3 = data19.length;for(let i1=0; i1<len3; i1++){let data20 = data19[i1];if(data20 && typeof data20 == "object" && !Array.isArray(data20)){if(data20.from === undefined){const err39 = {instancePath:instancePath+"/segments/" + i1,schemaPath:"#/properties/segments/items/required",keyword:"required",params:{missingProperty: "from"},message:"must have required property '"+"from"+"'"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}if(data20.to === undefined){const err40 = {instancePath:instancePath+"/segments/" + i1,schemaPath:"#/properties/segments/items/required",keyword:"required",params:{missingProperty: "to"},message:"must have required property '"+"to"+"'"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}if(data20.label === undefined){const err41 = {instancePath:instancePath+"/segments/" + i1,schemaPath:"#/properties/segments/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}for(const key3 in data20){if(!(((key3 === "from") || (key3 === "to")) || (key3 === "label"))){const err42 = {instancePath:instancePath+"/segments/" + i1,schemaPath:"#/properties/segments/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}}if(data20.from !== undefined){let data21 = data20.from;if(!((typeof data21 == "number") && (isFinite(data21)))){const err43 = {instancePath:instancePath+"/segments/" + i1+"/from",schemaPath:"#/properties/segments/items/properties/from/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}}if(data20.to !== undefined){let data22 = data20.to;if(!((typeof data22 == "number") && (isFinite(data22)))){const err44 = {instancePath:instancePath+"/segments/" + i1+"/to",schemaPath:"#/properties/segments/items/properties/to/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}}if(data20.label !== undefined){let data23 = data20.label;if(typeof data23 === "string"){if(func2(data23) < 1){const err45 = {instancePath:instancePath+"/segments/" + i1+"/label",schemaPath:"#/properties/segments/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}}else {const err46 = {instancePath:instancePath+"/segments/" + i1+"/label",schemaPath:"#/properties/segments/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}}}else {const err47 = {instancePath:instancePath+"/segments/" + i1,schemaPath:"#/properties/segments/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}}}else {const err48 = {instancePath:instancePath+"/segments",schemaPath:"#/properties/segments/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}}if(data.messages !== undefined){let data24 = data.messages;if(Array.isArray(data24)){if(data24.length < 1){const err49 = {instancePath:instancePath+"/messages",schemaPath:"#/properties/messages/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}const len4 = data24.length;for(let i2=0; i2<len4; i2++){let data25 = data24[i2];if(data25 && typeof data25 == "object" && !Array.isArray(data25)){if(data25.from === undefined){const err50 = {instancePath:instancePath+"/messages/" + i2,schemaPath:"#/properties/messages/items/required",keyword:"required",params:{missingProperty: "from"},message:"must have required property '"+"from"+"'"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}if(data25.to === undefined){const err51 = {instancePath:instancePath+"/messages/" + i2,schemaPath:"#/properties/messages/items/required",keyword:"required",params:{missingProperty: "to"},message:"must have required property '"+"to"+"'"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}if(data25.y === undefined){const err52 = {instancePath:instancePath+"/messages/" + i2,schemaPath:"#/properties/messages/items/required",keyword:"required",params:{missingProperty: "y"},message:"must have required property '"+"y"+"'"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}if(data25.label === undefined){const err53 = {instancePath:instancePath+"/messages/" + i2,schemaPath:"#/properties/messages/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}for(const key4 in data25){if(!(((((((key4 === "id") || (key4 === "from")) || (key4 === "to")) || (key4 === "y")) || (key4 === "label")) || (key4 === "variant")) || (key4 === "note"))){const err54 = {instancePath:instancePath+"/messages/" + i2,schemaPath:"#/properties/messages/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key4},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}}if(data25.id !== undefined){let data26 = data25.id;if(typeof data26 === "string"){if(!pattern4.test(data26)){const err55 = {instancePath:instancePath+"/messages/" + i2+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}}else {const err56 = {instancePath:instancePath+"/messages/" + i2+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}}if(data25.from !== undefined){let data27 = data25.from;if(typeof data27 === "string"){if(!pattern4.test(data27)){const err57 = {instancePath:instancePath+"/messages/" + i2+"/from",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}}else {const err58 = {instancePath:instancePath+"/messages/" + i2+"/from",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}}if(data25.to !== undefined){let data28 = data25.to;if(typeof data28 === "string"){if(!pattern4.test(data28)){const err59 = {instancePath:instancePath+"/messages/" + i2+"/to",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}}else {const err60 = {instancePath:instancePath+"/messages/" + i2+"/to",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}}if(data25.y !== undefined){let data29 = data25.y;if((typeof data29 == "number") && (isFinite(data29))){if(data29 < 160 || isNaN(data29)){const err61 = {instancePath:instancePath+"/messages/" + i2+"/y",schemaPath:"#/properties/messages/items/properties/y/minimum",keyword:"minimum",params:{comparison: ">=", limit: 160},message:"must be >= 160"};if(vErrors === null){vErrors = [err61];}else {vErrors.push(err61);}errors++;}}else {const err62 = {instancePath:instancePath+"/messages/" + i2+"/y",schemaPath:"#/properties/messages/items/properties/y/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err62];}else {vErrors.push(err62);}errors++;}}if(data25.label !== undefined){let data30 = data25.label;if(typeof data30 === "string"){if(func2(data30) < 1){const err63 = {instancePath:instancePath+"/messages/" + i2+"/label",schemaPath:"#/properties/messages/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;}}else {const err64 = {instancePath:instancePath+"/messages/" + i2+"/label",schemaPath:"#/properties/messages/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}}if(data25.variant !== undefined){let data31 = data25.variant;if(!(((((data31 === "default") || (data31 === "emphasis")) || (data31 === "security")) || (data31 === "dashed")) || (data31 === "return"))){const err65 = {instancePath:instancePath+"/messages/" + i2+"/variant",schemaPath:"#/properties/messages/items/properties/variant/enum",keyword:"enum",params:{allowedValues: schema53.properties.messages.items.properties.variant.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}}if(data25.note !== undefined){if(typeof data25.note !== "string"){const err66 = {instancePath:instancePath+"/messages/" + i2+"/note",schemaPath:"#/properties/messages/items/properties/note/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err66];}else {vErrors.push(err66);}errors++;}}}else {const err67 = {instancePath:instancePath+"/messages/" + i2,schemaPath:"#/properties/messages/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err67];}else {vErrors.push(err67);}errors++;}}}else {const err68 = {instancePath:instancePath+"/messages",schemaPath:"#/properties/messages/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;}}if(data.activations !== undefined){let data33 = data.activations;if(Array.isArray(data33)){const len5 = data33.length;for(let i3=0; i3<len5; i3++){let data34 = data33[i3];if(data34 && typeof data34 == "object" && !Array.isArray(data34)){if(data34.participant === undefined){const err69 = {instancePath:instancePath+"/activations/" + i3,schemaPath:"#/properties/activations/items/required",keyword:"required",params:{missingProperty: "participant"},message:"must have required property '"+"participant"+"'"};if(vErrors === null){vErrors = [err69];}else {vErrors.push(err69);}errors++;}if(data34.from === undefined){const err70 = {instancePath:instancePath+"/activations/" + i3,schemaPath:"#/properties/activations/items/required",keyword:"required",params:{missingProperty: "from"},message:"must have required property '"+"from"+"'"};if(vErrors === null){vErrors = [err70];}else {vErrors.push(err70);}errors++;}if(data34.to === undefined){const err71 = {instancePath:instancePath+"/activations/" + i3,schemaPath:"#/properties/activations/items/required",keyword:"required",params:{missingProperty: "to"},message:"must have required property '"+"to"+"'"};if(vErrors === null){vErrors = [err71];}else {vErrors.push(err71);}errors++;}for(const key5 in data34){if(!((((key5 === "participant") || (key5 === "from")) || (key5 === "to")) || (key5 === "type"))){const err72 = {instancePath:instancePath+"/activations/" + i3,schemaPath:"#/properties/activations/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key5},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err72];}else {vErrors.push(err72);}errors++;}}if(data34.participant !== undefined){let data35 = data34.participant;if(typeof data35 === "string"){if(!pattern4.test(data35)){const err73 = {instancePath:instancePath+"/activations/" + i3+"/participant",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err73];}else {vErrors.push(err73);}errors++;}}else {const err74 = {instancePath:instancePath+"/activations/" + i3+"/participant",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err74];}else {vErrors.push(err74);}errors++;}}if(data34.from !== undefined){let data36 = data34.from;if(!((typeof data36 == "number") && (isFinite(data36)))){const err75 = {instancePath:instancePath+"/activations/" + i3+"/from",schemaPath:"#/properties/activations/items/properties/from/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err75];}else {vErrors.push(err75);}errors++;}}if(data34.to !== undefined){let data37 = data34.to;if(!((typeof data37 == "number") && (isFinite(data37)))){const err76 = {instancePath:instancePath+"/activations/" + i3+"/to",schemaPath:"#/properties/activations/items/properties/to/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err76];}else {vErrors.push(err76);}errors++;}}if(data34.type !== undefined){let data38 = data34.type;if(!(((((((data38 === "frontend") || (data38 === "backend")) || (data38 === "database")) || (data38 === "cloud")) || (data38 === "security")) || (data38 === "messagebus")) || (data38 === "external"))){const err77 = {instancePath:instancePath+"/activations/" + i3+"/type",schemaPath:"common.schema.json#/$defs/componentType/enum",keyword:"enum",params:{allowedValues: schema43.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err77];}else {vErrors.push(err77);}errors++;}}}else {const err78 = {instancePath:instancePath+"/activations/" + i3,schemaPath:"#/properties/activations/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err78];}else {vErrors.push(err78);}errors++;}}}else {const err79 = {instancePath:instancePath+"/activations",schemaPath:"#/properties/activations/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err79];}else {vErrors.push(err79);}errors++;}}if(data.cards !== undefined){let data39 = data.cards;if(Array.isArray(data39)){const len6 = data39.length;for(let i4=0; i4<len6; i4++){let data40 = data39[i4];if(data40 && typeof data40 == "object" && !Array.isArray(data40)){if(data40.dot === undefined){const err80 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "dot"},message:"must have required property '"+"dot"+"'"};if(vErrors === null){vErrors = [err80];}else {vErrors.push(err80);}errors++;}if(data40.title === undefined){const err81 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err81];}else {vErrors.push(err81);}errors++;}if(data40.items === undefined){const err82 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "items"},message:"must have required property '"+"items"+"'"};if(vErrors === null){vErrors = [err82];}else {vErrors.push(err82);}errors++;}for(const key6 in data40){if(!(((key6 === "dot") || (key6 === "title")) || (key6 === "items"))){const err83 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key6},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err83];}else {vErrors.push(err83);}errors++;}}if(data40.dot !== undefined){let data41 = data40.dot;if(!(((((((data41 === "cyan") || (data41 === "emerald")) || (data41 === "violet")) || (data41 === "amber")) || (data41 === "rose")) || (data41 === "orange")) || (data41 === "slate"))){const err84 = {instancePath:instancePath+"/cards/" + i4+"/dot",schemaPath:"common.schema.json#/$defs/cards/items/properties/dot/enum",keyword:"enum",params:{allowedValues: schema52.items.properties.dot.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err84];}else {vErrors.push(err84);}errors++;}}if(data40.title !== undefined){let data42 = data40.title;if(typeof data42 === "string"){if(func2(data42) < 1){const err85 = {instancePath:instancePath+"/cards/" + i4+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err85];}else {vErrors.push(err85);}errors++;}}else {const err86 = {instancePath:instancePath+"/cards/" + i4+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err86];}else {vErrors.push(err86);}errors++;}}if(data40.items !== undefined){let data43 = data40.items;if(Array.isArray(data43)){const len7 = data43.length;for(let i5=0; i5<len7; i5++){if(typeof data43[i5] !== "string"){const err87 = {instancePath:instancePath+"/cards/" + i4+"/items/" + i5,schemaPath:"common.schema.json#/$defs/cards/items/properties/items/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err87];}else {vErrors.push(err87);}errors++;}}}else {const err88 = {instancePath:instancePath+"/cards/" + i4+"/items",schemaPath:"common.schema.json#/$defs/cards/items/properties/items/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err88];}else {vErrors.push(err88);}errors++;}}}else {const err89 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err89];}else {vErrors.push(err89);}errors++;}}}else {const err90 = {instancePath:instancePath+"/cards",schemaPath:"common.schema.json#/$defs/cards/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err90];}else {vErrors.push(err90);}errors++;}}}else {const err91 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err91];}else {vErrors.push(err91);}errors++;}validate24.errors = vErrors;return errors === 0;}validate24.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};export const dataflow = validate27;const schema65 = {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://github.com/tt-a1i/archify/schemas/dataflow.schema.json","title":"Archify Data Flow Diagram","type":"object","additionalProperties":false,"required":["schema_version","diagram_type","meta","stages","nodes","flows"],"properties":{"schema_version":{"const":1},"diagram_type":{"const":"dataflow"},"meta":{"type":"object","additionalProperties":false,"required":["title"],"properties":{"title":{"type":"string","minLength":1},"subtitle":{"type":"string"},"output":{"type":"string"},"animation":{"enum":["trace","none"]},"visual_preset":{"enum":["classic","signal-flow","blueprint"]},"quality_profile":{"enum":["standard","showcase"]},"views":{"$ref":"common.schema.json#/$defs/guidedViews"},"viewBox":{"type":"array","prefixItems":[{"type":"number","minimum":360},{"type":"number","minimum":360}],"items":false,"minItems":2,"maxItems":2}}},"stages":{"type":"array","minItems":2,"maxItems":5,"items":{"type":"object","additionalProperties":false,"required":["label"],"properties":{"label":{"type":"string","minLength":1}}}},"nodes":{"type":"array","minItems":2,"items":{"type":"object","additionalProperties":false,"required":["id","type","label","stage","row"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"type":{"$ref":"common.schema.json#/$defs/componentType"},"label":{"type":"string","minLength":1},"sublabel":{"type":"string"},"tag":{"type":"string"},"stage":{"type":"integer","minimum":0},"row":{"type":"integer","minimum":0},"width":{"type":"number","minimum":48},"height":{"type":"number","minimum":36},"yOffset":{"type":"number"}}}},"flows":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["from","to","label"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"from":{"$ref":"common.schema.json#/$defs/id"},"to":{"$ref":"common.schema.json#/$defs/id"},"label":{"type":"string","minLength":1},"classification":{"type":"string"},"variant":{"$ref":"common.schema.json#/$defs/variant"},"route":{"enum":["auto","straight","vertical-channel","bottom-channel","top-channel"]},"fromSide":{"enum":["left","right","top","bottom"]},"toSide":{"enum":["left","right","top","bottom"]},"channelX":{"type":"number"},"channelY":{"type":"number"},"labelAt":{"$ref":"common.schema.json#/$defs/point"},"labelDx":{"type":"number"},"labelDy":{"type":"number"},"labelSegment":{"type":"integer","minimum":0},"via":{"type":"array","items":{"$ref":"common.schema.json#/$defs/point"}},"width":{"type":"number","minimum":0.5}}}},"cards":{"$ref":"common.schema.json#/$defs/cards"}}};function validate28(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate28.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(Array.isArray(data)){if(data.length > 5){const err0 = {instancePath,schemaPath:"#/maxItems",keyword:"maxItems",params:{limit: 5},message:"must NOT have more than 5 items"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];if(data0 && typeof data0 == "object" && !Array.isArray(data0)){if(data0.id === undefined){const err1 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data0.label === undefined){const err2 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data0.focus === undefined){const err3 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "focus"},message:"must have required property '"+"focus"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data0){if(!((((key0 === "id") || (key0 === "label")) || (key0 === "focus")) || (key0 === "note"))){const err4 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data0.id !== undefined){let data1 = data0.id;if(typeof data1 === "string"){if(!pattern4.test(data1)){const err5 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data0.label !== undefined){let data2 = data0.label;if(typeof data2 === "string"){if(func2(data2) > 48){const err7 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/maxLength",keyword:"maxLength",params:{limit: 48},message:"must NOT have more than 48 characters"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(func2(data2) < 1){const err8 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data0.focus !== undefined){let data3 = data0.focus;if(Array.isArray(data3)){if(data3.length < 1){const err10 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}const len1 = data3.length;for(let i1=0; i1<len1; i1++){let data4 = data3[i1];if(typeof data4 === "string"){if(!pattern4.test(data4)){const err11 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data0.note !== undefined){let data5 = data0.note;if(typeof data5 === "string"){if(func2(data5) > 140){const err14 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/maxLength",keyword:"maxLength",params:{limit: 140},message:"must NOT have more than 140 characters"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}else {const err15 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}}else {const err16 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}}else {const err17 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}validate28.errors = vErrors;return errors === 0;}validate28.evaluated = {"items":true,"dynamicProps":false,"dynamicItems":false};function validate27(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://github.com/tt-a1i/archify/schemas/dataflow.schema.json" */;let vErrors = null;let errors = 0;const evaluated0 = validate27.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.schema_version === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "schema_version"},message:"must have required property '"+"schema_version"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.diagram_type === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "diagram_type"},message:"must have required property '"+"diagram_type"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.meta === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "meta"},message:"must have required property '"+"meta"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.stages === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "stages"},message:"must have required property '"+"stages"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.nodes === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "nodes"},message:"must have required property '"+"nodes"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.flows === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "flows"},message:"must have required property '"+"flows"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}for(const key0 in data){if(!(((((((key0 === "schema_version") || (key0 === "diagram_type")) || (key0 === "meta")) || (key0 === "stages")) || (key0 === "nodes")) || (key0 === "flows")) || (key0 === "cards"))){const err6 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.schema_version !== undefined){if(1 !== data.schema_version){const err7 = {instancePath:instancePath+"/schema_version",schemaPath:"#/properties/schema_version/const",keyword:"const",params:{allowedValue: 1},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.diagram_type !== undefined){if("dataflow" !== data.diagram_type){const err8 = {instancePath:instancePath+"/diagram_type",schemaPath:"#/properties/diagram_type/const",keyword:"const",params:{allowedValue: "dataflow"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.meta !== undefined){let data2 = data.meta;if(data2 && typeof data2 == "object" && !Array.isArray(data2)){if(data2.title === undefined){const err9 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}for(const key1 in data2){if(!((((((((key1 === "title") || (key1 === "subtitle")) || (key1 === "output")) || (key1 === "animation")) || (key1 === "visual_preset")) || (key1 === "quality_profile")) || (key1 === "views")) || (key1 === "viewBox"))){const err10 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data2.title !== undefined){let data3 = data2.title;if(typeof data3 === "string"){if(func2(data3) < 1){const err11 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data2.subtitle !== undefined){if(typeof data2.subtitle !== "string"){const err13 = {instancePath:instancePath+"/meta/subtitle",schemaPath:"#/properties/meta/properties/subtitle/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data2.output !== undefined){if(typeof data2.output !== "string"){const err14 = {instancePath:instancePath+"/meta/output",schemaPath:"#/properties/meta/properties/output/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data2.animation !== undefined){let data6 = data2.animation;if(!((data6 === "trace") || (data6 === "none"))){const err15 = {instancePath:instancePath+"/meta/animation",schemaPath:"#/properties/meta/properties/animation/enum",keyword:"enum",params:{allowedValues: schema65.properties.meta.properties.animation.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data2.visual_preset !== undefined){let data7 = data2.visual_preset;if(!(((data7 === "classic") || (data7 === "signal-flow")) || (data7 === "blueprint"))){const err16 = {instancePath:instancePath+"/meta/visual_preset",schemaPath:"#/properties/meta/properties/visual_preset/enum",keyword:"enum",params:{allowedValues: schema65.properties.meta.properties.visual_preset.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data2.quality_profile !== undefined){let data8 = data2.quality_profile;if(!((data8 === "standard") || (data8 === "showcase"))){const err17 = {instancePath:instancePath+"/meta/quality_profile",schemaPath:"#/properties/meta/properties/quality_profile/enum",keyword:"enum",params:{allowedValues: schema65.properties.meta.properties.quality_profile.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data2.views !== undefined){if(!(validate28(data2.views, {instancePath:instancePath+"/meta/views",parentData:data2,parentDataProperty:"views",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate28.errors : vErrors.concat(validate28.errors);errors = vErrors.length;}}if(data2.viewBox !== undefined){let data10 = data2.viewBox;if(Array.isArray(data10)){if(data10.length > 2){const err18 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}if(data10.length < 2){const err19 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}const len0 = data10.length;if(len0 > 0){let data11 = data10[0];if((typeof data11 == "number") && (isFinite(data11))){if(data11 < 360 || isNaN(data11)){const err20 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/minimum",keyword:"minimum",params:{comparison: ">=", limit: 360},message:"must be >= 360"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}else {const err21 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(len0 > 1){let data12 = data10[1];if((typeof data12 == "number") && (isFinite(data12))){if(data12 < 360 || isNaN(data12)){const err22 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/minimum",keyword:"minimum",params:{comparison: ">=", limit: 360},message:"must be >= 360"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}else {const err23 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}const len1 = data10.length;if(!(len1 <= 2)){const err24 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}else {const err25 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}}else {const err26 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}if(data.stages !== undefined){let data13 = data.stages;if(Array.isArray(data13)){if(data13.length > 5){const err27 = {instancePath:instancePath+"/stages",schemaPath:"#/properties/stages/maxItems",keyword:"maxItems",params:{limit: 5},message:"must NOT have more than 5 items"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}if(data13.length < 2){const err28 = {instancePath:instancePath+"/stages",schemaPath:"#/properties/stages/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}const len2 = data13.length;for(let i0=0; i0<len2; i0++){let data14 = data13[i0];if(data14 && typeof data14 == "object" && !Array.isArray(data14)){if(data14.label === undefined){const err29 = {instancePath:instancePath+"/stages/" + i0,schemaPath:"#/properties/stages/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}for(const key2 in data14){if(!(key2 === "label")){const err30 = {instancePath:instancePath+"/stages/" + i0,schemaPath:"#/properties/stages/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}}if(data14.label !== undefined){let data15 = data14.label;if(typeof data15 === "string"){if(func2(data15) < 1){const err31 = {instancePath:instancePath+"/stages/" + i0+"/label",schemaPath:"#/properties/stages/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}else {const err32 = {instancePath:instancePath+"/stages/" + i0+"/label",schemaPath:"#/properties/stages/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}}else {const err33 = {instancePath:instancePath+"/stages/" + i0,schemaPath:"#/properties/stages/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}}else {const err34 = {instancePath:instancePath+"/stages",schemaPath:"#/properties/stages/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}if(data.nodes !== undefined){let data16 = data.nodes;if(Array.isArray(data16)){if(data16.length < 2){const err35 = {instancePath:instancePath+"/nodes",schemaPath:"#/properties/nodes/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}const len3 = data16.length;for(let i1=0; i1<len3; i1++){let data17 = data16[i1];if(data17 && typeof data17 == "object" && !Array.isArray(data17)){if(data17.id === undefined){const err36 = {instancePath:instancePath+"/nodes/" + i1,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}if(data17.type === undefined){const err37 = {instancePath:instancePath+"/nodes/" + i1,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "type"},message:"must have required property '"+"type"+"'"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}if(data17.label === undefined){const err38 = {instancePath:instancePath+"/nodes/" + i1,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}if(data17.stage === undefined){const err39 = {instancePath:instancePath+"/nodes/" + i1,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "stage"},message:"must have required property '"+"stage"+"'"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}if(data17.row === undefined){const err40 = {instancePath:instancePath+"/nodes/" + i1,schemaPath:"#/properties/nodes/items/required",keyword:"required",params:{missingProperty: "row"},message:"must have required property '"+"row"+"'"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}for(const key3 in data17){if(!(func1.call(schema65.properties.nodes.items.properties, key3))){const err41 = {instancePath:instancePath+"/nodes/" + i1,schemaPath:"#/properties/nodes/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}}if(data17.id !== undefined){let data18 = data17.id;if(typeof data18 === "string"){if(!pattern4.test(data18)){const err42 = {instancePath:instancePath+"/nodes/" + i1+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}}else {const err43 = {instancePath:instancePath+"/nodes/" + i1+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}}if(data17.type !== undefined){let data19 = data17.type;if(!(((((((data19 === "frontend") || (data19 === "backend")) || (data19 === "database")) || (data19 === "cloud")) || (data19 === "security")) || (data19 === "messagebus")) || (data19 === "external"))){const err44 = {instancePath:instancePath+"/nodes/" + i1+"/type",schemaPath:"common.schema.json#/$defs/componentType/enum",keyword:"enum",params:{allowedValues: schema43.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}}if(data17.label !== undefined){let data20 = data17.label;if(typeof data20 === "string"){if(func2(data20) < 1){const err45 = {instancePath:instancePath+"/nodes/" + i1+"/label",schemaPath:"#/properties/nodes/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}}else {const err46 = {instancePath:instancePath+"/nodes/" + i1+"/label",schemaPath:"#/properties/nodes/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}}if(data17.sublabel !== undefined){if(typeof data17.sublabel !== "string"){const err47 = {instancePath:instancePath+"/nodes/" + i1+"/sublabel",schemaPath:"#/properties/nodes/items/properties/sublabel/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}}if(data17.tag !== undefined){if(typeof data17.tag !== "string"){const err48 = {instancePath:instancePath+"/nodes/" + i1+"/tag",schemaPath:"#/properties/nodes/items/properties/tag/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}}if(data17.stage !== undefined){let data23 = data17.stage;if(!(((typeof data23 == "number") && (!(data23 % 1) && !isNaN(data23))) && (isFinite(data23)))){const err49 = {instancePath:instancePath+"/nodes/" + i1+"/stage",schemaPath:"#/properties/nodes/items/properties/stage/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}if((typeof data23 == "number") && (isFinite(data23))){if(data23 < 0 || isNaN(data23)){const err50 = {instancePath:instancePath+"/nodes/" + i1+"/stage",schemaPath:"#/properties/nodes/items/properties/stage/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}}}if(data17.row !== undefined){let data24 = data17.row;if(!(((typeof data24 == "number") && (!(data24 % 1) && !isNaN(data24))) && (isFinite(data24)))){const err51 = {instancePath:instancePath+"/nodes/" + i1+"/row",schemaPath:"#/properties/nodes/items/properties/row/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}if((typeof data24 == "number") && (isFinite(data24))){if(data24 < 0 || isNaN(data24)){const err52 = {instancePath:instancePath+"/nodes/" + i1+"/row",schemaPath:"#/properties/nodes/items/properties/row/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}}}if(data17.width !== undefined){let data25 = data17.width;if((typeof data25 == "number") && (isFinite(data25))){if(data25 < 48 || isNaN(data25)){const err53 = {instancePath:instancePath+"/nodes/" + i1+"/width",schemaPath:"#/properties/nodes/items/properties/width/minimum",keyword:"minimum",params:{comparison: ">=", limit: 48},message:"must be >= 48"};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}}else {const err54 = {instancePath:instancePath+"/nodes/" + i1+"/width",schemaPath:"#/properties/nodes/items/properties/width/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}}if(data17.height !== undefined){let data26 = data17.height;if((typeof data26 == "number") && (isFinite(data26))){if(data26 < 36 || isNaN(data26)){const err55 = {instancePath:instancePath+"/nodes/" + i1+"/height",schemaPath:"#/properties/nodes/items/properties/height/minimum",keyword:"minimum",params:{comparison: ">=", limit: 36},message:"must be >= 36"};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}}else {const err56 = {instancePath:instancePath+"/nodes/" + i1+"/height",schemaPath:"#/properties/nodes/items/properties/height/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}}if(data17.yOffset !== undefined){let data27 = data17.yOffset;if(!((typeof data27 == "number") && (isFinite(data27)))){const err57 = {instancePath:instancePath+"/nodes/" + i1+"/yOffset",schemaPath:"#/properties/nodes/items/properties/yOffset/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}}}else {const err58 = {instancePath:instancePath+"/nodes/" + i1,schemaPath:"#/properties/nodes/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}}}else {const err59 = {instancePath:instancePath+"/nodes",schemaPath:"#/properties/nodes/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}}if(data.flows !== undefined){let data28 = data.flows;if(Array.isArray(data28)){const len4 = data28.length;for(let i2=0; i2<len4; i2++){let data29 = data28[i2];if(data29 && typeof data29 == "object" && !Array.isArray(data29)){if(data29.from === undefined){const err60 = {instancePath:instancePath+"/flows/" + i2,schemaPath:"#/properties/flows/items/required",keyword:"required",params:{missingProperty: "from"},message:"must have required property '"+"from"+"'"};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}if(data29.to === undefined){const err61 = {instancePath:instancePath+"/flows/" + i2,schemaPath:"#/properties/flows/items/required",keyword:"required",params:{missingProperty: "to"},message:"must have required property '"+"to"+"'"};if(vErrors === null){vErrors = [err61];}else {vErrors.push(err61);}errors++;}if(data29.label === undefined){const err62 = {instancePath:instancePath+"/flows/" + i2,schemaPath:"#/properties/flows/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err62];}else {vErrors.push(err62);}errors++;}for(const key4 in data29){if(!(func1.call(schema65.properties.flows.items.properties, key4))){const err63 = {instancePath:instancePath+"/flows/" + i2,schemaPath:"#/properties/flows/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key4},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;}}if(data29.id !== undefined){let data30 = data29.id;if(typeof data30 === "string"){if(!pattern4.test(data30)){const err64 = {instancePath:instancePath+"/flows/" + i2+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}}else {const err65 = {instancePath:instancePath+"/flows/" + i2+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}}if(data29.from !== undefined){let data31 = data29.from;if(typeof data31 === "string"){if(!pattern4.test(data31)){const err66 = {instancePath:instancePath+"/flows/" + i2+"/from",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err66];}else {vErrors.push(err66);}errors++;}}else {const err67 = {instancePath:instancePath+"/flows/" + i2+"/from",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err67];}else {vErrors.push(err67);}errors++;}}if(data29.to !== undefined){let data32 = data29.to;if(typeof data32 === "string"){if(!pattern4.test(data32)){const err68 = {instancePath:instancePath+"/flows/" + i2+"/to",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;}}else {const err69 = {instancePath:instancePath+"/flows/" + i2+"/to",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err69];}else {vErrors.push(err69);}errors++;}}if(data29.label !== undefined){let data33 = data29.label;if(typeof data33 === "string"){if(func2(data33) < 1){const err70 = {instancePath:instancePath+"/flows/" + i2+"/label",schemaPath:"#/properties/flows/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err70];}else {vErrors.push(err70);}errors++;}}else {const err71 = {instancePath:instancePath+"/flows/" + i2+"/label",schemaPath:"#/properties/flows/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err71];}else {vErrors.push(err71);}errors++;}}if(data29.classification !== undefined){if(typeof data29.classification !== "string"){const err72 = {instancePath:instancePath+"/flows/" + i2+"/classification",schemaPath:"#/properties/flows/items/properties/classification/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err72];}else {vErrors.push(err72);}errors++;}}if(data29.variant !== undefined){let data35 = data29.variant;if(!((((data35 === "default") || (data35 === "emphasis")) || (data35 === "security")) || (data35 === "dashed"))){const err73 = {instancePath:instancePath+"/flows/" + i2+"/variant",schemaPath:"common.schema.json#/$defs/variant/enum",keyword:"enum",params:{allowedValues: schema47.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err73];}else {vErrors.push(err73);}errors++;}}if(data29.route !== undefined){let data36 = data29.route;if(!(((((data36 === "auto") || (data36 === "straight")) || (data36 === "vertical-channel")) || (data36 === "bottom-channel")) || (data36 === "top-channel"))){const err74 = {instancePath:instancePath+"/flows/" + i2+"/route",schemaPath:"#/properties/flows/items/properties/route/enum",keyword:"enum",params:{allowedValues: schema65.properties.flows.items.properties.route.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err74];}else {vErrors.push(err74);}errors++;}}if(data29.fromSide !== undefined){let data37 = data29.fromSide;if(!((((data37 === "left") || (data37 === "right")) || (data37 === "top")) || (data37 === "bottom"))){const err75 = {instancePath:instancePath+"/flows/" + i2+"/fromSide",schemaPath:"#/properties/flows/items/properties/fromSide/enum",keyword:"enum",params:{allowedValues: schema65.properties.flows.items.properties.fromSide.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err75];}else {vErrors.push(err75);}errors++;}}if(data29.toSide !== undefined){let data38 = data29.toSide;if(!((((data38 === "left") || (data38 === "right")) || (data38 === "top")) || (data38 === "bottom"))){const err76 = {instancePath:instancePath+"/flows/" + i2+"/toSide",schemaPath:"#/properties/flows/items/properties/toSide/enum",keyword:"enum",params:{allowedValues: schema65.properties.flows.items.properties.toSide.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err76];}else {vErrors.push(err76);}errors++;}}if(data29.channelX !== undefined){let data39 = data29.channelX;if(!((typeof data39 == "number") && (isFinite(data39)))){const err77 = {instancePath:instancePath+"/flows/" + i2+"/channelX",schemaPath:"#/properties/flows/items/properties/channelX/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err77];}else {vErrors.push(err77);}errors++;}}if(data29.channelY !== undefined){let data40 = data29.channelY;if(!((typeof data40 == "number") && (isFinite(data40)))){const err78 = {instancePath:instancePath+"/flows/" + i2+"/channelY",schemaPath:"#/properties/flows/items/properties/channelY/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err78];}else {vErrors.push(err78);}errors++;}}if(data29.labelAt !== undefined){let data41 = data29.labelAt;if(Array.isArray(data41)){if(data41.length > 2){const err79 = {instancePath:instancePath+"/flows/" + i2+"/labelAt",schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err79];}else {vErrors.push(err79);}errors++;}if(data41.length < 2){const err80 = {instancePath:instancePath+"/flows/" + i2+"/labelAt",schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err80];}else {vErrors.push(err80);}errors++;}const len5 = data41.length;if(len5 > 0){let data42 = data41[0];if(!((typeof data42 == "number") && (isFinite(data42)))){const err81 = {instancePath:instancePath+"/flows/" + i2+"/labelAt/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err81];}else {vErrors.push(err81);}errors++;}}if(len5 > 1){let data43 = data41[1];if(!((typeof data43 == "number") && (isFinite(data43)))){const err82 = {instancePath:instancePath+"/flows/" + i2+"/labelAt/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err82];}else {vErrors.push(err82);}errors++;}}const len6 = data41.length;if(!(len6 <= 2)){const err83 = {instancePath:instancePath+"/flows/" + i2+"/labelAt",schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err83];}else {vErrors.push(err83);}errors++;}}else {const err84 = {instancePath:instancePath+"/flows/" + i2+"/labelAt",schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err84];}else {vErrors.push(err84);}errors++;}}if(data29.labelDx !== undefined){let data44 = data29.labelDx;if(!((typeof data44 == "number") && (isFinite(data44)))){const err85 = {instancePath:instancePath+"/flows/" + i2+"/labelDx",schemaPath:"#/properties/flows/items/properties/labelDx/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err85];}else {vErrors.push(err85);}errors++;}}if(data29.labelDy !== undefined){let data45 = data29.labelDy;if(!((typeof data45 == "number") && (isFinite(data45)))){const err86 = {instancePath:instancePath+"/flows/" + i2+"/labelDy",schemaPath:"#/properties/flows/items/properties/labelDy/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err86];}else {vErrors.push(err86);}errors++;}}if(data29.labelSegment !== undefined){let data46 = data29.labelSegment;if(!(((typeof data46 == "number") && (!(data46 % 1) && !isNaN(data46))) && (isFinite(data46)))){const err87 = {instancePath:instancePath+"/flows/" + i2+"/labelSegment",schemaPath:"#/properties/flows/items/properties/labelSegment/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err87];}else {vErrors.push(err87);}errors++;}if((typeof data46 == "number") && (isFinite(data46))){if(data46 < 0 || isNaN(data46)){const err88 = {instancePath:instancePath+"/flows/" + i2+"/labelSegment",schemaPath:"#/properties/flows/items/properties/labelSegment/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err88];}else {vErrors.push(err88);}errors++;}}}if(data29.via !== undefined){let data47 = data29.via;if(Array.isArray(data47)){const len7 = data47.length;for(let i3=0; i3<len7; i3++){let data48 = data47[i3];if(Array.isArray(data48)){if(data48.length > 2){const err89 = {instancePath:instancePath+"/flows/" + i2+"/via/" + i3,schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err89];}else {vErrors.push(err89);}errors++;}if(data48.length < 2){const err90 = {instancePath:instancePath+"/flows/" + i2+"/via/" + i3,schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err90];}else {vErrors.push(err90);}errors++;}const len8 = data48.length;if(len8 > 0){let data49 = data48[0];if(!((typeof data49 == "number") && (isFinite(data49)))){const err91 = {instancePath:instancePath+"/flows/" + i2+"/via/" + i3+"/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err91];}else {vErrors.push(err91);}errors++;}}if(len8 > 1){let data50 = data48[1];if(!((typeof data50 == "number") && (isFinite(data50)))){const err92 = {instancePath:instancePath+"/flows/" + i2+"/via/" + i3+"/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err92];}else {vErrors.push(err92);}errors++;}}const len9 = data48.length;if(!(len9 <= 2)){const err93 = {instancePath:instancePath+"/flows/" + i2+"/via/" + i3,schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err93];}else {vErrors.push(err93);}errors++;}}else {const err94 = {instancePath:instancePath+"/flows/" + i2+"/via/" + i3,schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err94];}else {vErrors.push(err94);}errors++;}}}else {const err95 = {instancePath:instancePath+"/flows/" + i2+"/via",schemaPath:"#/properties/flows/items/properties/via/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err95];}else {vErrors.push(err95);}errors++;}}if(data29.width !== undefined){let data51 = data29.width;if((typeof data51 == "number") && (isFinite(data51))){if(data51 < 0.5 || isNaN(data51)){const err96 = {instancePath:instancePath+"/flows/" + i2+"/width",schemaPath:"#/properties/flows/items/properties/width/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0.5},message:"must be >= 0.5"};if(vErrors === null){vErrors = [err96];}else {vErrors.push(err96);}errors++;}}else {const err97 = {instancePath:instancePath+"/flows/" + i2+"/width",schemaPath:"#/properties/flows/items/properties/width/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err97];}else {vErrors.push(err97);}errors++;}}}else {const err98 = {instancePath:instancePath+"/flows/" + i2,schemaPath:"#/properties/flows/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err98];}else {vErrors.push(err98);}errors++;}}}else {const err99 = {instancePath:instancePath+"/flows",schemaPath:"#/properties/flows/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err99];}else {vErrors.push(err99);}errors++;}}if(data.cards !== undefined){let data52 = data.cards;if(Array.isArray(data52)){const len10 = data52.length;for(let i4=0; i4<len10; i4++){let data53 = data52[i4];if(data53 && typeof data53 == "object" && !Array.isArray(data53)){if(data53.dot === undefined){const err100 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "dot"},message:"must have required property '"+"dot"+"'"};if(vErrors === null){vErrors = [err100];}else {vErrors.push(err100);}errors++;}if(data53.title === undefined){const err101 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err101];}else {vErrors.push(err101);}errors++;}if(data53.items === undefined){const err102 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "items"},message:"must have required property '"+"items"+"'"};if(vErrors === null){vErrors = [err102];}else {vErrors.push(err102);}errors++;}for(const key5 in data53){if(!(((key5 === "dot") || (key5 === "title")) || (key5 === "items"))){const err103 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key5},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err103];}else {vErrors.push(err103);}errors++;}}if(data53.dot !== undefined){let data54 = data53.dot;if(!(((((((data54 === "cyan") || (data54 === "emerald")) || (data54 === "violet")) || (data54 === "amber")) || (data54 === "rose")) || (data54 === "orange")) || (data54 === "slate"))){const err104 = {instancePath:instancePath+"/cards/" + i4+"/dot",schemaPath:"common.schema.json#/$defs/cards/items/properties/dot/enum",keyword:"enum",params:{allowedValues: schema52.items.properties.dot.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err104];}else {vErrors.push(err104);}errors++;}}if(data53.title !== undefined){let data55 = data53.title;if(typeof data55 === "string"){if(func2(data55) < 1){const err105 = {instancePath:instancePath+"/cards/" + i4+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err105];}else {vErrors.push(err105);}errors++;}}else {const err106 = {instancePath:instancePath+"/cards/" + i4+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err106];}else {vErrors.push(err106);}errors++;}}if(data53.items !== undefined){let data56 = data53.items;if(Array.isArray(data56)){const len11 = data56.length;for(let i5=0; i5<len11; i5++){if(typeof data56[i5] !== "string"){const err107 = {instancePath:instancePath+"/cards/" + i4+"/items/" + i5,schemaPath:"common.schema.json#/$defs/cards/items/properties/items/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err107];}else {vErrors.push(err107);}errors++;}}}else {const err108 = {instancePath:instancePath+"/cards/" + i4+"/items",schemaPath:"common.schema.json#/$defs/cards/items/properties/items/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err108];}else {vErrors.push(err108);}errors++;}}}else {const err109 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err109];}else {vErrors.push(err109);}errors++;}}}else {const err110 = {instancePath:instancePath+"/cards",schemaPath:"common.schema.json#/$defs/cards/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err110];}else {vErrors.push(err110);}errors++;}}}else {const err111 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err111];}else {vErrors.push(err111);}errors++;}validate27.errors = vErrors;return errors === 0;}validate27.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};export const lifecycle = validate30;const schema78 = {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://github.com/tt-a1i/archify/schemas/lifecycle.schema.json","title":"Archify Lifecycle Diagram","type":"object","additionalProperties":false,"required":["schema_version","diagram_type","meta","lanes","states","transitions"],"properties":{"schema_version":{"const":1},"diagram_type":{"const":"lifecycle"},"meta":{"type":"object","additionalProperties":false,"required":["title"],"properties":{"title":{"type":"string","minLength":1},"subtitle":{"type":"string"},"output":{"type":"string"},"animation":{"enum":["trace","none"]},"visual_preset":{"enum":["classic","signal-flow","blueprint"]},"quality_profile":{"enum":["standard","showcase"]},"views":{"$ref":"common.schema.json#/$defs/guidedViews"},"viewBox":{"type":"array","prefixItems":[{"type":"number","minimum":420},{"type":"number","minimum":566}],"items":false,"minItems":2,"maxItems":2}}},"lanes":{"type":"array","minItems":1,"maxItems":4,"items":{"type":"object","additionalProperties":false,"required":["id","label"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"label":{"type":"string","minLength":1}}}},"states":{"type":"array","minItems":2,"items":{"type":"object","additionalProperties":false,"required":["id","type","label","lane","col"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"type":{"enum":["start","active","waiting","decision","success","failure","neutral","external"]},"label":{"type":"string","minLength":1},"sublabel":{"type":"string"},"tag":{"type":"string"},"step":{"type":"string"},"lane":{"$ref":"common.schema.json#/$defs/id"},"col":{"type":"integer","minimum":0,"maximum":4},"width":{"type":"number","minimum":48},"height":{"type":"number","minimum":36},"yOffset":{"type":"number"}}}},"transitions":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["from","to"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"from":{"$ref":"common.schema.json#/$defs/id"},"to":{"$ref":"common.schema.json#/$defs/id"},"label":{"type":"string"},"note":{"type":"string"},"variant":{"$ref":"common.schema.json#/$defs/variant"},"route":{"enum":["auto","straight","drop","bottom-channel","top-channel","right-channel","left-channel"]},"fromSide":{"enum":["left","right","top","bottom"]},"toSide":{"enum":["left","right","top","bottom"]},"channelX":{"type":"number"},"channelY":{"type":"number"},"cornerRadius":{"type":"number","minimum":0},"labelAt":{"$ref":"common.schema.json#/$defs/point"},"labelDx":{"type":"number"},"labelDy":{"type":"number"},"labelSegment":{"type":"integer","minimum":0},"via":{"type":"array","items":{"$ref":"common.schema.json#/$defs/point"}},"width":{"type":"number","minimum":0.5}}}},"cards":{"$ref":"common.schema.json#/$defs/cards"}}};function validate31(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate31.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(Array.isArray(data)){if(data.length > 5){const err0 = {instancePath,schemaPath:"#/maxItems",keyword:"maxItems",params:{limit: 5},message:"must NOT have more than 5 items"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];if(data0 && typeof data0 == "object" && !Array.isArray(data0)){if(data0.id === undefined){const err1 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data0.label === undefined){const err2 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data0.focus === undefined){const err3 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "focus"},message:"must have required property '"+"focus"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data0){if(!((((key0 === "id") || (key0 === "label")) || (key0 === "focus")) || (key0 === "note"))){const err4 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data0.id !== undefined){let data1 = data0.id;if(typeof data1 === "string"){if(!pattern4.test(data1)){const err5 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data0.label !== undefined){let data2 = data0.label;if(typeof data2 === "string"){if(func2(data2) > 48){const err7 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/maxLength",keyword:"maxLength",params:{limit: 48},message:"must NOT have more than 48 characters"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(func2(data2) < 1){const err8 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data0.focus !== undefined){let data3 = data0.focus;if(Array.isArray(data3)){if(data3.length < 1){const err10 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}const len1 = data3.length;for(let i1=0; i1<len1; i1++){let data4 = data3[i1];if(typeof data4 === "string"){if(!pattern4.test(data4)){const err11 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data0.note !== undefined){let data5 = data0.note;if(typeof data5 === "string"){if(func2(data5) > 140){const err14 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/maxLength",keyword:"maxLength",params:{limit: 140},message:"must NOT have more than 140 characters"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}else {const err15 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}}else {const err16 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}}else {const err17 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}validate31.errors = vErrors;return errors === 0;}validate31.evaluated = {"items":true,"dynamicProps":false,"dynamicItems":false};function validate30(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://github.com/tt-a1i/archify/schemas/lifecycle.schema.json" */;let vErrors = null;let errors = 0;const evaluated0 = validate30.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.schema_version === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "schema_version"},message:"must have required property '"+"schema_version"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.diagram_type === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "diagram_type"},message:"must have required property '"+"diagram_type"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.meta === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "meta"},message:"must have required property '"+"meta"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.lanes === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "lanes"},message:"must have required property '"+"lanes"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.states === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "states"},message:"must have required property '"+"states"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.transitions === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "transitions"},message:"must have required property '"+"transitions"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}for(const key0 in data){if(!(((((((key0 === "schema_version") || (key0 === "diagram_type")) || (key0 === "meta")) || (key0 === "lanes")) || (key0 === "states")) || (key0 === "transitions")) || (key0 === "cards"))){const err6 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.schema_version !== undefined){if(1 !== data.schema_version){const err7 = {instancePath:instancePath+"/schema_version",schemaPath:"#/properties/schema_version/const",keyword:"const",params:{allowedValue: 1},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.diagram_type !== undefined){if("lifecycle" !== data.diagram_type){const err8 = {instancePath:instancePath+"/diagram_type",schemaPath:"#/properties/diagram_type/const",keyword:"const",params:{allowedValue: "lifecycle"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.meta !== undefined){let data2 = data.meta;if(data2 && typeof data2 == "object" && !Array.isArray(data2)){if(data2.title === undefined){const err9 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}for(const key1 in data2){if(!((((((((key1 === "title") || (key1 === "subtitle")) || (key1 === "output")) || (key1 === "animation")) || (key1 === "visual_preset")) || (key1 === "quality_profile")) || (key1 === "views")) || (key1 === "viewBox"))){const err10 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data2.title !== undefined){let data3 = data2.title;if(typeof data3 === "string"){if(func2(data3) < 1){const err11 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data2.subtitle !== undefined){if(typeof data2.subtitle !== "string"){const err13 = {instancePath:instancePath+"/meta/subtitle",schemaPath:"#/properties/meta/properties/subtitle/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data2.output !== undefined){if(typeof data2.output !== "string"){const err14 = {instancePath:instancePath+"/meta/output",schemaPath:"#/properties/meta/properties/output/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data2.animation !== undefined){let data6 = data2.animation;if(!((data6 === "trace") || (data6 === "none"))){const err15 = {instancePath:instancePath+"/meta/animation",schemaPath:"#/properties/meta/properties/animation/enum",keyword:"enum",params:{allowedValues: schema78.properties.meta.properties.animation.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data2.visual_preset !== undefined){let data7 = data2.visual_preset;if(!(((data7 === "classic") || (data7 === "signal-flow")) || (data7 === "blueprint"))){const err16 = {instancePath:instancePath+"/meta/visual_preset",schemaPath:"#/properties/meta/properties/visual_preset/enum",keyword:"enum",params:{allowedValues: schema78.properties.meta.properties.visual_preset.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data2.quality_profile !== undefined){let data8 = data2.quality_profile;if(!((data8 === "standard") || (data8 === "showcase"))){const err17 = {instancePath:instancePath+"/meta/quality_profile",schemaPath:"#/properties/meta/properties/quality_profile/enum",keyword:"enum",params:{allowedValues: schema78.properties.meta.properties.quality_profile.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data2.views !== undefined){if(!(validate31(data2.views, {instancePath:instancePath+"/meta/views",parentData:data2,parentDataProperty:"views",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate31.errors : vErrors.concat(validate31.errors);errors = vErrors.length;}}if(data2.viewBox !== undefined){let data10 = data2.viewBox;if(Array.isArray(data10)){if(data10.length > 2){const err18 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}if(data10.length < 2){const err19 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}const len0 = data10.length;if(len0 > 0){let data11 = data10[0];if((typeof data11 == "number") && (isFinite(data11))){if(data11 < 420 || isNaN(data11)){const err20 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/minimum",keyword:"minimum",params:{comparison: ">=", limit: 420},message:"must be >= 420"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}else {const err21 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(len0 > 1){let data12 = data10[1];if((typeof data12 == "number") && (isFinite(data12))){if(data12 < 566 || isNaN(data12)){const err22 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/minimum",keyword:"minimum",params:{comparison: ">=", limit: 566},message:"must be >= 566"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}else {const err23 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}const len1 = data10.length;if(!(len1 <= 2)){const err24 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}else {const err25 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}}else {const err26 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}if(data.lanes !== undefined){let data13 = data.lanes;if(Array.isArray(data13)){if(data13.length > 4){const err27 = {instancePath:instancePath+"/lanes",schemaPath:"#/properties/lanes/maxItems",keyword:"maxItems",params:{limit: 4},message:"must NOT have more than 4 items"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}if(data13.length < 1){const err28 = {instancePath:instancePath+"/lanes",schemaPath:"#/properties/lanes/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}const len2 = data13.length;for(let i0=0; i0<len2; i0++){let data14 = data13[i0];if(data14 && typeof data14 == "object" && !Array.isArray(data14)){if(data14.id === undefined){const err29 = {instancePath:instancePath+"/lanes/" + i0,schemaPath:"#/properties/lanes/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}if(data14.label === undefined){const err30 = {instancePath:instancePath+"/lanes/" + i0,schemaPath:"#/properties/lanes/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}for(const key2 in data14){if(!((key2 === "id") || (key2 === "label"))){const err31 = {instancePath:instancePath+"/lanes/" + i0,schemaPath:"#/properties/lanes/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}if(data14.id !== undefined){let data15 = data14.id;if(typeof data15 === "string"){if(!pattern4.test(data15)){const err32 = {instancePath:instancePath+"/lanes/" + i0+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}else {const err33 = {instancePath:instancePath+"/lanes/" + i0+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}if(data14.label !== undefined){let data16 = data14.label;if(typeof data16 === "string"){if(func2(data16) < 1){const err34 = {instancePath:instancePath+"/lanes/" + i0+"/label",schemaPath:"#/properties/lanes/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}else {const err35 = {instancePath:instancePath+"/lanes/" + i0+"/label",schemaPath:"#/properties/lanes/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}}else {const err36 = {instancePath:instancePath+"/lanes/" + i0,schemaPath:"#/properties/lanes/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}}else {const err37 = {instancePath:instancePath+"/lanes",schemaPath:"#/properties/lanes/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}}if(data.states !== undefined){let data17 = data.states;if(Array.isArray(data17)){if(data17.length < 2){const err38 = {instancePath:instancePath+"/states",schemaPath:"#/properties/states/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}const len3 = data17.length;for(let i1=0; i1<len3; i1++){let data18 = data17[i1];if(data18 && typeof data18 == "object" && !Array.isArray(data18)){if(data18.id === undefined){const err39 = {instancePath:instancePath+"/states/" + i1,schemaPath:"#/properties/states/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}if(data18.type === undefined){const err40 = {instancePath:instancePath+"/states/" + i1,schemaPath:"#/properties/states/items/required",keyword:"required",params:{missingProperty: "type"},message:"must have required property '"+"type"+"'"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}if(data18.label === undefined){const err41 = {instancePath:instancePath+"/states/" + i1,schemaPath:"#/properties/states/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}if(data18.lane === undefined){const err42 = {instancePath:instancePath+"/states/" + i1,schemaPath:"#/properties/states/items/required",keyword:"required",params:{missingProperty: "lane"},message:"must have required property '"+"lane"+"'"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}if(data18.col === undefined){const err43 = {instancePath:instancePath+"/states/" + i1,schemaPath:"#/properties/states/items/required",keyword:"required",params:{missingProperty: "col"},message:"must have required property '"+"col"+"'"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}for(const key3 in data18){if(!(func1.call(schema78.properties.states.items.properties, key3))){const err44 = {instancePath:instancePath+"/states/" + i1,schemaPath:"#/properties/states/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}}if(data18.id !== undefined){let data19 = data18.id;if(typeof data19 === "string"){if(!pattern4.test(data19)){const err45 = {instancePath:instancePath+"/states/" + i1+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}}else {const err46 = {instancePath:instancePath+"/states/" + i1+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}}if(data18.type !== undefined){let data20 = data18.type;if(!((((((((data20 === "start") || (data20 === "active")) || (data20 === "waiting")) || (data20 === "decision")) || (data20 === "success")) || (data20 === "failure")) || (data20 === "neutral")) || (data20 === "external"))){const err47 = {instancePath:instancePath+"/states/" + i1+"/type",schemaPath:"#/properties/states/items/properties/type/enum",keyword:"enum",params:{allowedValues: schema78.properties.states.items.properties.type.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}}if(data18.label !== undefined){let data21 = data18.label;if(typeof data21 === "string"){if(func2(data21) < 1){const err48 = {instancePath:instancePath+"/states/" + i1+"/label",schemaPath:"#/properties/states/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}}else {const err49 = {instancePath:instancePath+"/states/" + i1+"/label",schemaPath:"#/properties/states/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}}if(data18.sublabel !== undefined){if(typeof data18.sublabel !== "string"){const err50 = {instancePath:instancePath+"/states/" + i1+"/sublabel",schemaPath:"#/properties/states/items/properties/sublabel/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}}if(data18.tag !== undefined){if(typeof data18.tag !== "string"){const err51 = {instancePath:instancePath+"/states/" + i1+"/tag",schemaPath:"#/properties/states/items/properties/tag/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}}if(data18.step !== undefined){if(typeof data18.step !== "string"){const err52 = {instancePath:instancePath+"/states/" + i1+"/step",schemaPath:"#/properties/states/items/properties/step/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}}if(data18.lane !== undefined){let data25 = data18.lane;if(typeof data25 === "string"){if(!pattern4.test(data25)){const err53 = {instancePath:instancePath+"/states/" + i1+"/lane",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}}else {const err54 = {instancePath:instancePath+"/states/" + i1+"/lane",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}}if(data18.col !== undefined){let data26 = data18.col;if(!(((typeof data26 == "number") && (!(data26 % 1) && !isNaN(data26))) && (isFinite(data26)))){const err55 = {instancePath:instancePath+"/states/" + i1+"/col",schemaPath:"#/properties/states/items/properties/col/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}if((typeof data26 == "number") && (isFinite(data26))){if(data26 > 4 || isNaN(data26)){const err56 = {instancePath:instancePath+"/states/" + i1+"/col",schemaPath:"#/properties/states/items/properties/col/maximum",keyword:"maximum",params:{comparison: "<=", limit: 4},message:"must be <= 4"};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}if(data26 < 0 || isNaN(data26)){const err57 = {instancePath:instancePath+"/states/" + i1+"/col",schemaPath:"#/properties/states/items/properties/col/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}}}if(data18.width !== undefined){let data27 = data18.width;if((typeof data27 == "number") && (isFinite(data27))){if(data27 < 48 || isNaN(data27)){const err58 = {instancePath:instancePath+"/states/" + i1+"/width",schemaPath:"#/properties/states/items/properties/width/minimum",keyword:"minimum",params:{comparison: ">=", limit: 48},message:"must be >= 48"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}}else {const err59 = {instancePath:instancePath+"/states/" + i1+"/width",schemaPath:"#/properties/states/items/properties/width/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}}if(data18.height !== undefined){let data28 = data18.height;if((typeof data28 == "number") && (isFinite(data28))){if(data28 < 36 || isNaN(data28)){const err60 = {instancePath:instancePath+"/states/" + i1+"/height",schemaPath:"#/properties/states/items/properties/height/minimum",keyword:"minimum",params:{comparison: ">=", limit: 36},message:"must be >= 36"};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}}else {const err61 = {instancePath:instancePath+"/states/" + i1+"/height",schemaPath:"#/properties/states/items/properties/height/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err61];}else {vErrors.push(err61);}errors++;}}if(data18.yOffset !== undefined){let data29 = data18.yOffset;if(!((typeof data29 == "number") && (isFinite(data29)))){const err62 = {instancePath:instancePath+"/states/" + i1+"/yOffset",schemaPath:"#/properties/states/items/properties/yOffset/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err62];}else {vErrors.push(err62);}errors++;}}}else {const err63 = {instancePath:instancePath+"/states/" + i1,schemaPath:"#/properties/states/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;}}}else {const err64 = {instancePath:instancePath+"/states",schemaPath:"#/properties/states/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}}if(data.transitions !== undefined){let data30 = data.transitions;if(Array.isArray(data30)){const len4 = data30.length;for(let i2=0; i2<len4; i2++){let data31 = data30[i2];if(data31 && typeof data31 == "object" && !Array.isArray(data31)){if(data31.from === undefined){const err65 = {instancePath:instancePath+"/transitions/" + i2,schemaPath:"#/properties/transitions/items/required",keyword:"required",params:{missingProperty: "from"},message:"must have required property '"+"from"+"'"};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}if(data31.to === undefined){const err66 = {instancePath:instancePath+"/transitions/" + i2,schemaPath:"#/properties/transitions/items/required",keyword:"required",params:{missingProperty: "to"},message:"must have required property '"+"to"+"'"};if(vErrors === null){vErrors = [err66];}else {vErrors.push(err66);}errors++;}for(const key4 in data31){if(!(func1.call(schema78.properties.transitions.items.properties, key4))){const err67 = {instancePath:instancePath+"/transitions/" + i2,schemaPath:"#/properties/transitions/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key4},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err67];}else {vErrors.push(err67);}errors++;}}if(data31.id !== undefined){let data32 = data31.id;if(typeof data32 === "string"){if(!pattern4.test(data32)){const err68 = {instancePath:instancePath+"/transitions/" + i2+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;}}else {const err69 = {instancePath:instancePath+"/transitions/" + i2+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err69];}else {vErrors.push(err69);}errors++;}}if(data31.from !== undefined){let data33 = data31.from;if(typeof data33 === "string"){if(!pattern4.test(data33)){const err70 = {instancePath:instancePath+"/transitions/" + i2+"/from",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err70];}else {vErrors.push(err70);}errors++;}}else {const err71 = {instancePath:instancePath+"/transitions/" + i2+"/from",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err71];}else {vErrors.push(err71);}errors++;}}if(data31.to !== undefined){let data34 = data31.to;if(typeof data34 === "string"){if(!pattern4.test(data34)){const err72 = {instancePath:instancePath+"/transitions/" + i2+"/to",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err72];}else {vErrors.push(err72);}errors++;}}else {const err73 = {instancePath:instancePath+"/transitions/" + i2+"/to",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err73];}else {vErrors.push(err73);}errors++;}}if(data31.label !== undefined){if(typeof data31.label !== "string"){const err74 = {instancePath:instancePath+"/transitions/" + i2+"/label",schemaPath:"#/properties/transitions/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err74];}else {vErrors.push(err74);}errors++;}}if(data31.note !== undefined){if(typeof data31.note !== "string"){const err75 = {instancePath:instancePath+"/transitions/" + i2+"/note",schemaPath:"#/properties/transitions/items/properties/note/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err75];}else {vErrors.push(err75);}errors++;}}if(data31.variant !== undefined){let data37 = data31.variant;if(!((((data37 === "default") || (data37 === "emphasis")) || (data37 === "security")) || (data37 === "dashed"))){const err76 = {instancePath:instancePath+"/transitions/" + i2+"/variant",schemaPath:"common.schema.json#/$defs/variant/enum",keyword:"enum",params:{allowedValues: schema47.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err76];}else {vErrors.push(err76);}errors++;}}if(data31.route !== undefined){let data38 = data31.route;if(!(((((((data38 === "auto") || (data38 === "straight")) || (data38 === "drop")) || (data38 === "bottom-channel")) || (data38 === "top-channel")) || (data38 === "right-channel")) || (data38 === "left-channel"))){const err77 = {instancePath:instancePath+"/transitions/" + i2+"/route",schemaPath:"#/properties/transitions/items/properties/route/enum",keyword:"enum",params:{allowedValues: schema78.properties.transitions.items.properties.route.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err77];}else {vErrors.push(err77);}errors++;}}if(data31.fromSide !== undefined){let data39 = data31.fromSide;if(!((((data39 === "left") || (data39 === "right")) || (data39 === "top")) || (data39 === "bottom"))){const err78 = {instancePath:instancePath+"/transitions/" + i2+"/fromSide",schemaPath:"#/properties/transitions/items/properties/fromSide/enum",keyword:"enum",params:{allowedValues: schema78.properties.transitions.items.properties.fromSide.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err78];}else {vErrors.push(err78);}errors++;}}if(data31.toSide !== undefined){let data40 = data31.toSide;if(!((((data40 === "left") || (data40 === "right")) || (data40 === "top")) || (data40 === "bottom"))){const err79 = {instancePath:instancePath+"/transitions/" + i2+"/toSide",schemaPath:"#/properties/transitions/items/properties/toSide/enum",keyword:"enum",params:{allowedValues: schema78.properties.transitions.items.properties.toSide.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err79];}else {vErrors.push(err79);}errors++;}}if(data31.channelX !== undefined){let data41 = data31.channelX;if(!((typeof data41 == "number") && (isFinite(data41)))){const err80 = {instancePath:instancePath+"/transitions/" + i2+"/channelX",schemaPath:"#/properties/transitions/items/properties/channelX/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err80];}else {vErrors.push(err80);}errors++;}}if(data31.channelY !== undefined){let data42 = data31.channelY;if(!((typeof data42 == "number") && (isFinite(data42)))){const err81 = {instancePath:instancePath+"/transitions/" + i2+"/channelY",schemaPath:"#/properties/transitions/items/properties/channelY/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err81];}else {vErrors.push(err81);}errors++;}}if(data31.cornerRadius !== undefined){let data43 = data31.cornerRadius;if((typeof data43 == "number") && (isFinite(data43))){if(data43 < 0 || isNaN(data43)){const err82 = {instancePath:instancePath+"/transitions/" + i2+"/cornerRadius",schemaPath:"#/properties/transitions/items/properties/cornerRadius/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err82];}else {vErrors.push(err82);}errors++;}}else {const err83 = {instancePath:instancePath+"/transitions/" + i2+"/cornerRadius",schemaPath:"#/properties/transitions/items/properties/cornerRadius/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err83];}else {vErrors.push(err83);}errors++;}}if(data31.labelAt !== undefined){let data44 = data31.labelAt;if(Array.isArray(data44)){if(data44.length > 2){const err84 = {instancePath:instancePath+"/transitions/" + i2+"/labelAt",schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err84];}else {vErrors.push(err84);}errors++;}if(data44.length < 2){const err85 = {instancePath:instancePath+"/transitions/" + i2+"/labelAt",schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err85];}else {vErrors.push(err85);}errors++;}const len5 = data44.length;if(len5 > 0){let data45 = data44[0];if(!((typeof data45 == "number") && (isFinite(data45)))){const err86 = {instancePath:instancePath+"/transitions/" + i2+"/labelAt/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err86];}else {vErrors.push(err86);}errors++;}}if(len5 > 1){let data46 = data44[1];if(!((typeof data46 == "number") && (isFinite(data46)))){const err87 = {instancePath:instancePath+"/transitions/" + i2+"/labelAt/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err87];}else {vErrors.push(err87);}errors++;}}const len6 = data44.length;if(!(len6 <= 2)){const err88 = {instancePath:instancePath+"/transitions/" + i2+"/labelAt",schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err88];}else {vErrors.push(err88);}errors++;}}else {const err89 = {instancePath:instancePath+"/transitions/" + i2+"/labelAt",schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err89];}else {vErrors.push(err89);}errors++;}}if(data31.labelDx !== undefined){let data47 = data31.labelDx;if(!((typeof data47 == "number") && (isFinite(data47)))){const err90 = {instancePath:instancePath+"/transitions/" + i2+"/labelDx",schemaPath:"#/properties/transitions/items/properties/labelDx/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err90];}else {vErrors.push(err90);}errors++;}}if(data31.labelDy !== undefined){let data48 = data31.labelDy;if(!((typeof data48 == "number") && (isFinite(data48)))){const err91 = {instancePath:instancePath+"/transitions/" + i2+"/labelDy",schemaPath:"#/properties/transitions/items/properties/labelDy/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err91];}else {vErrors.push(err91);}errors++;}}if(data31.labelSegment !== undefined){let data49 = data31.labelSegment;if(!(((typeof data49 == "number") && (!(data49 % 1) && !isNaN(data49))) && (isFinite(data49)))){const err92 = {instancePath:instancePath+"/transitions/" + i2+"/labelSegment",schemaPath:"#/properties/transitions/items/properties/labelSegment/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err92];}else {vErrors.push(err92);}errors++;}if((typeof data49 == "number") && (isFinite(data49))){if(data49 < 0 || isNaN(data49)){const err93 = {instancePath:instancePath+"/transitions/" + i2+"/labelSegment",schemaPath:"#/properties/transitions/items/properties/labelSegment/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err93];}else {vErrors.push(err93);}errors++;}}}if(data31.via !== undefined){let data50 = data31.via;if(Array.isArray(data50)){const len7 = data50.length;for(let i3=0; i3<len7; i3++){let data51 = data50[i3];if(Array.isArray(data51)){if(data51.length > 2){const err94 = {instancePath:instancePath+"/transitions/" + i2+"/via/" + i3,schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err94];}else {vErrors.push(err94);}errors++;}if(data51.length < 2){const err95 = {instancePath:instancePath+"/transitions/" + i2+"/via/" + i3,schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err95];}else {vErrors.push(err95);}errors++;}const len8 = data51.length;if(len8 > 0){let data52 = data51[0];if(!((typeof data52 == "number") && (isFinite(data52)))){const err96 = {instancePath:instancePath+"/transitions/" + i2+"/via/" + i3+"/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err96];}else {vErrors.push(err96);}errors++;}}if(len8 > 1){let data53 = data51[1];if(!((typeof data53 == "number") && (isFinite(data53)))){const err97 = {instancePath:instancePath+"/transitions/" + i2+"/via/" + i3+"/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err97];}else {vErrors.push(err97);}errors++;}}const len9 = data51.length;if(!(len9 <= 2)){const err98 = {instancePath:instancePath+"/transitions/" + i2+"/via/" + i3,schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err98];}else {vErrors.push(err98);}errors++;}}else {const err99 = {instancePath:instancePath+"/transitions/" + i2+"/via/" + i3,schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err99];}else {vErrors.push(err99);}errors++;}}}else {const err100 = {instancePath:instancePath+"/transitions/" + i2+"/via",schemaPath:"#/properties/transitions/items/properties/via/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err100];}else {vErrors.push(err100);}errors++;}}if(data31.width !== undefined){let data54 = data31.width;if((typeof data54 == "number") && (isFinite(data54))){if(data54 < 0.5 || isNaN(data54)){const err101 = {instancePath:instancePath+"/transitions/" + i2+"/width",schemaPath:"#/properties/transitions/items/properties/width/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0.5},message:"must be >= 0.5"};if(vErrors === null){vErrors = [err101];}else {vErrors.push(err101);}errors++;}}else {const err102 = {instancePath:instancePath+"/transitions/" + i2+"/width",schemaPath:"#/properties/transitions/items/properties/width/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err102];}else {vErrors.push(err102);}errors++;}}}else {const err103 = {instancePath:instancePath+"/transitions/" + i2,schemaPath:"#/properties/transitions/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err103];}else {vErrors.push(err103);}errors++;}}}else {const err104 = {instancePath:instancePath+"/transitions",schemaPath:"#/properties/transitions/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err104];}else {vErrors.push(err104);}errors++;}}if(data.cards !== undefined){let data55 = data.cards;if(Array.isArray(data55)){const len10 = data55.length;for(let i4=0; i4<len10; i4++){let data56 = data55[i4];if(data56 && typeof data56 == "object" && !Array.isArray(data56)){if(data56.dot === undefined){const err105 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "dot"},message:"must have required property '"+"dot"+"'"};if(vErrors === null){vErrors = [err105];}else {vErrors.push(err105);}errors++;}if(data56.title === undefined){const err106 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err106];}else {vErrors.push(err106);}errors++;}if(data56.items === undefined){const err107 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "items"},message:"must have required property '"+"items"+"'"};if(vErrors === null){vErrors = [err107];}else {vErrors.push(err107);}errors++;}for(const key5 in data56){if(!(((key5 === "dot") || (key5 === "title")) || (key5 === "items"))){const err108 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key5},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err108];}else {vErrors.push(err108);}errors++;}}if(data56.dot !== undefined){let data57 = data56.dot;if(!(((((((data57 === "cyan") || (data57 === "emerald")) || (data57 === "violet")) || (data57 === "amber")) || (data57 === "rose")) || (data57 === "orange")) || (data57 === "slate"))){const err109 = {instancePath:instancePath+"/cards/" + i4+"/dot",schemaPath:"common.schema.json#/$defs/cards/items/properties/dot/enum",keyword:"enum",params:{allowedValues: schema52.items.properties.dot.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err109];}else {vErrors.push(err109);}errors++;}}if(data56.title !== undefined){let data58 = data56.title;if(typeof data58 === "string"){if(func2(data58) < 1){const err110 = {instancePath:instancePath+"/cards/" + i4+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err110];}else {vErrors.push(err110);}errors++;}}else {const err111 = {instancePath:instancePath+"/cards/" + i4+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err111];}else {vErrors.push(err111);}errors++;}}if(data56.items !== undefined){let data59 = data56.items;if(Array.isArray(data59)){const len11 = data59.length;for(let i5=0; i5<len11; i5++){if(typeof data59[i5] !== "string"){const err112 = {instancePath:instancePath+"/cards/" + i4+"/items/" + i5,schemaPath:"common.schema.json#/$defs/cards/items/properties/items/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err112];}else {vErrors.push(err112);}errors++;}}}else {const err113 = {instancePath:instancePath+"/cards/" + i4+"/items",schemaPath:"common.schema.json#/$defs/cards/items/properties/items/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err113];}else {vErrors.push(err113);}errors++;}}}else {const err114 = {instancePath:instancePath+"/cards/" + i4,schemaPath:"common.schema.json#/$defs/cards/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err114];}else {vErrors.push(err114);}errors++;}}}else {const err115 = {instancePath:instancePath+"/cards",schemaPath:"common.schema.json#/$defs/cards/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err115];}else {vErrors.push(err115);}errors++;}}}else {const err116 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err116];}else {vErrors.push(err116);}errors++;}validate30.errors = vErrors;return errors === 0;}validate30.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};export const architecture = validate33;const schema92 = {"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://github.com/tt-a1i/archify/schemas/architecture.schema.json","title":"Archify Architecture Diagram","type":"object","additionalProperties":false,"required":["schema_version","diagram_type","meta","components"],"properties":{"schema_version":{"const":1},"diagram_type":{"const":"architecture"},"meta":{"type":"object","additionalProperties":false,"required":["title"],"properties":{"title":{"type":"string","minLength":1},"subtitle":{"type":"string"},"output":{"type":"string"},"animation":{"enum":["trace","none"]},"visual_preset":{"enum":["classic","signal-flow","blueprint"]},"quality_profile":{"enum":["standard","showcase"]},"repository":{"type":"object","additionalProperties":false,"required":["url","revision"],"properties":{"url":{"type":"string","pattern":"^https://github\\.com/[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+(?:\\.git)?/?$"},"revision":{"type":"string","pattern":"^[a-fA-F0-9]{40}$"}}},"views":{"$ref":"common.schema.json#/$defs/guidedViews"},"viewBox":{"type":"array","prefixItems":[{"type":"number","minimum":320},{"type":"number","minimum":240}],"items":false,"minItems":2,"maxItems":2}}},"layout":{"type":"object","additionalProperties":false,"required":["mode"],"properties":{"mode":{"enum":["grid"]},"origin":{"$ref":"common.schema.json#/$defs/point"},"cols":{"type":"integer","minimum":1,"maximum":12},"gapX":{"type":"number","minimum":0},"gapY":{"type":"number","minimum":0},"cellW":{"type":"number","minimum":40},"cellH":{"type":"number","minimum":24}}},"components":{"type":"array","minItems":1,"items":{"type":"object","additionalProperties":false,"required":["id","type","label"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"type":{"$ref":"common.schema.json#/$defs/componentType"},"label":{"type":"string","minLength":1},"sublabel":{"type":"string"},"tag":{"type":"string"},"sources":{"type":"array","minItems":1,"maxItems":3,"items":{"type":"object","additionalProperties":false,"required":["path"],"properties":{"path":{"type":"string","minLength":1,"maxLength":240},"line":{"type":"integer","minimum":1},"end_line":{"type":"integer","minimum":1},"label":{"type":"string","minLength":1,"maxLength":48}}}},"row":{"type":"integer","minimum":0},"col":{"type":"integer","minimum":0},"pos":{"$ref":"common.schema.json#/$defs/point"},"size":{"type":"array","prefixItems":[{"type":"number","exclusiveMinimum":0},{"type":"number","exclusiveMinimum":0}],"items":false,"minItems":2,"maxItems":2}}}},"boundaries":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["kind","label","wraps"],"properties":{"kind":{"enum":["region","security-group"]},"label":{"type":"string","minLength":1},"wraps":{"type":"array","minItems":1,"items":{"$ref":"common.schema.json#/$defs/id"}},"pad":{"type":"number","minimum":0}}}},"connections":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["from","to"],"properties":{"id":{"$ref":"common.schema.json#/$defs/id"},"from":{"$ref":"common.schema.json#/$defs/id"},"to":{"$ref":"common.schema.json#/$defs/id"},"label":{"type":"string"},"variant":{"$ref":"common.schema.json#/$defs/variant"},"fromSide":{"enum":["left","right","top","bottom"]},"toSide":{"enum":["left","right","top","bottom"]},"route":{"enum":["auto","straight","orthogonal-h","orthogonal-v"]},"via":{"type":"array","items":{"$ref":"common.schema.json#/$defs/point"}},"labelAt":{"$ref":"common.schema.json#/$defs/point"},"labelDx":{"type":"number"},"labelDy":{"type":"number"},"labelSegment":{"type":"integer","minimum":0},"width":{"type":"number","minimum":0.5}}}},"cards":{"$ref":"common.schema.json#/$defs/cards"}}};const pattern37 = new RegExp("^https://github\\.com/[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+(?:\\.git)?/?$", "u");const pattern38 = new RegExp("^[a-fA-F0-9]{40}$", "u");function validate34(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate34.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(Array.isArray(data)){if(data.length > 5){const err0 = {instancePath,schemaPath:"#/maxItems",keyword:"maxItems",params:{limit: 5},message:"must NOT have more than 5 items"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}const len0 = data.length;for(let i0=0; i0<len0; i0++){let data0 = data[i0];if(data0 && typeof data0 == "object" && !Array.isArray(data0)){if(data0.id === undefined){const err1 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data0.label === undefined){const err2 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data0.focus === undefined){const err3 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/required",keyword:"required",params:{missingProperty: "focus"},message:"must have required property '"+"focus"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data0){if(!((((key0 === "id") || (key0 === "label")) || (key0 === "focus")) || (key0 === "note"))){const err4 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data0.id !== undefined){let data1 = data0.id;if(typeof data1 === "string"){if(!pattern4.test(data1)){const err5 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/" + i0+"/id",schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data0.label !== undefined){let data2 = data0.label;if(typeof data2 === "string"){if(func2(data2) > 48){const err7 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/maxLength",keyword:"maxLength",params:{limit: 48},message:"must NOT have more than 48 characters"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(func2(data2) < 1){const err8 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+"/" + i0+"/label",schemaPath:"#/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data0.focus !== undefined){let data3 = data0.focus;if(Array.isArray(data3)){if(data3.length < 1){const err10 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}const len1 = data3.length;for(let i1=0; i1<len1; i1++){let data4 = data3[i1];if(typeof data4 === "string"){if(!pattern4.test(data4)){const err11 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/" + i0+"/focus/" + i1,schemaPath:"#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath:instancePath+"/" + i0+"/focus",schemaPath:"#/items/properties/focus/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data0.note !== undefined){let data5 = data0.note;if(typeof data5 === "string"){if(func2(data5) > 140){const err14 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/maxLength",keyword:"maxLength",params:{limit: 140},message:"must NOT have more than 140 characters"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}else {const err15 = {instancePath:instancePath+"/" + i0+"/note",schemaPath:"#/items/properties/note/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}}else {const err16 = {instancePath:instancePath+"/" + i0,schemaPath:"#/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}}else {const err17 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}validate34.errors = vErrors;return errors === 0;}validate34.evaluated = {"items":true,"dynamicProps":false,"dynamicItems":false};function validate33(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){/*# sourceURL="https://github.com/tt-a1i/archify/schemas/architecture.schema.json" */;let vErrors = null;let errors = 0;const evaluated0 = validate33.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.schema_version === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "schema_version"},message:"must have required property '"+"schema_version"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.diagram_type === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "diagram_type"},message:"must have required property '"+"diagram_type"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.meta === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "meta"},message:"must have required property '"+"meta"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.components === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "components"},message:"must have required property '"+"components"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data){if(!((((((((key0 === "schema_version") || (key0 === "diagram_type")) || (key0 === "meta")) || (key0 === "layout")) || (key0 === "components")) || (key0 === "boundaries")) || (key0 === "connections")) || (key0 === "cards"))){const err4 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.schema_version !== undefined){if(1 !== data.schema_version){const err5 = {instancePath:instancePath+"/schema_version",schemaPath:"#/properties/schema_version/const",keyword:"const",params:{allowedValue: 1},message:"must be equal to constant"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.diagram_type !== undefined){if("architecture" !== data.diagram_type){const err6 = {instancePath:instancePath+"/diagram_type",schemaPath:"#/properties/diagram_type/const",keyword:"const",params:{allowedValue: "architecture"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.meta !== undefined){let data2 = data.meta;if(data2 && typeof data2 == "object" && !Array.isArray(data2)){if(data2.title === undefined){const err7 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}for(const key1 in data2){if(!(func1.call(schema92.properties.meta.properties, key1))){const err8 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data2.title !== undefined){let data3 = data2.title;if(typeof data3 === "string"){if(func2(data3) < 1){const err9 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}else {const err10 = {instancePath:instancePath+"/meta/title",schemaPath:"#/properties/meta/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data2.subtitle !== undefined){if(typeof data2.subtitle !== "string"){const err11 = {instancePath:instancePath+"/meta/subtitle",schemaPath:"#/properties/meta/properties/subtitle/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data2.output !== undefined){if(typeof data2.output !== "string"){const err12 = {instancePath:instancePath+"/meta/output",schemaPath:"#/properties/meta/properties/output/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data2.animation !== undefined){let data6 = data2.animation;if(!((data6 === "trace") || (data6 === "none"))){const err13 = {instancePath:instancePath+"/meta/animation",schemaPath:"#/properties/meta/properties/animation/enum",keyword:"enum",params:{allowedValues: schema92.properties.meta.properties.animation.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data2.visual_preset !== undefined){let data7 = data2.visual_preset;if(!(((data7 === "classic") || (data7 === "signal-flow")) || (data7 === "blueprint"))){const err14 = {instancePath:instancePath+"/meta/visual_preset",schemaPath:"#/properties/meta/properties/visual_preset/enum",keyword:"enum",params:{allowedValues: schema92.properties.meta.properties.visual_preset.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data2.quality_profile !== undefined){let data8 = data2.quality_profile;if(!((data8 === "standard") || (data8 === "showcase"))){const err15 = {instancePath:instancePath+"/meta/quality_profile",schemaPath:"#/properties/meta/properties/quality_profile/enum",keyword:"enum",params:{allowedValues: schema92.properties.meta.properties.quality_profile.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data2.repository !== undefined){let data9 = data2.repository;if(data9 && typeof data9 == "object" && !Array.isArray(data9)){if(data9.url === undefined){const err16 = {instancePath:instancePath+"/meta/repository",schemaPath:"#/properties/meta/properties/repository/required",keyword:"required",params:{missingProperty: "url"},message:"must have required property '"+"url"+"'"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}if(data9.revision === undefined){const err17 = {instancePath:instancePath+"/meta/repository",schemaPath:"#/properties/meta/properties/repository/required",keyword:"required",params:{missingProperty: "revision"},message:"must have required property '"+"revision"+"'"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}for(const key2 in data9){if(!((key2 === "url") || (key2 === "revision"))){const err18 = {instancePath:instancePath+"/meta/repository",schemaPath:"#/properties/meta/properties/repository/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}if(data9.url !== undefined){let data10 = data9.url;if(typeof data10 === "string"){if(!pattern37.test(data10)){const err19 = {instancePath:instancePath+"/meta/repository/url",schemaPath:"#/properties/meta/properties/repository/properties/url/pattern",keyword:"pattern",params:{pattern: "^https://github\\.com/[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+(?:\\.git)?/?$"},message:"must match pattern \""+"^https://github\\.com/[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+(?:\\.git)?/?$"+"\""};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}else {const err20 = {instancePath:instancePath+"/meta/repository/url",schemaPath:"#/properties/meta/properties/repository/properties/url/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}if(data9.revision !== undefined){let data11 = data9.revision;if(typeof data11 === "string"){if(!pattern38.test(data11)){const err21 = {instancePath:instancePath+"/meta/repository/revision",schemaPath:"#/properties/meta/properties/repository/properties/revision/pattern",keyword:"pattern",params:{pattern: "^[a-fA-F0-9]{40}$"},message:"must match pattern \""+"^[a-fA-F0-9]{40}$"+"\""};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}else {const err22 = {instancePath:instancePath+"/meta/repository/revision",schemaPath:"#/properties/meta/properties/repository/properties/revision/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}}else {const err23 = {instancePath:instancePath+"/meta/repository",schemaPath:"#/properties/meta/properties/repository/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}if(data2.views !== undefined){if(!(validate34(data2.views, {instancePath:instancePath+"/meta/views",parentData:data2,parentDataProperty:"views",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate34.errors : vErrors.concat(validate34.errors);errors = vErrors.length;}}if(data2.viewBox !== undefined){let data13 = data2.viewBox;if(Array.isArray(data13)){if(data13.length > 2){const err24 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}if(data13.length < 2){const err25 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}const len0 = data13.length;if(len0 > 0){let data14 = data13[0];if((typeof data14 == "number") && (isFinite(data14))){if(data14 < 320 || isNaN(data14)){const err26 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/minimum",keyword:"minimum",params:{comparison: ">=", limit: 320},message:"must be >= 320"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}else {const err27 = {instancePath:instancePath+"/meta/viewBox/0",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}}if(len0 > 1){let data15 = data13[1];if((typeof data15 == "number") && (isFinite(data15))){if(data15 < 240 || isNaN(data15)){const err28 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/minimum",keyword:"minimum",params:{comparison: ">=", limit: 240},message:"must be >= 240"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}}else {const err29 = {instancePath:instancePath+"/meta/viewBox/1",schemaPath:"#/properties/meta/properties/viewBox/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}}const len1 = data13.length;if(!(len1 <= 2)){const err30 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}}else {const err31 = {instancePath:instancePath+"/meta/viewBox",schemaPath:"#/properties/meta/properties/viewBox/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}}else {const err32 = {instancePath:instancePath+"/meta",schemaPath:"#/properties/meta/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}if(data.layout !== undefined){let data16 = data.layout;if(data16 && typeof data16 == "object" && !Array.isArray(data16)){if(data16.mode === undefined){const err33 = {instancePath:instancePath+"/layout",schemaPath:"#/properties/layout/required",keyword:"required",params:{missingProperty: "mode"},message:"must have required property '"+"mode"+"'"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}for(const key3 in data16){if(!(((((((key3 === "mode") || (key3 === "origin")) || (key3 === "cols")) || (key3 === "gapX")) || (key3 === "gapY")) || (key3 === "cellW")) || (key3 === "cellH"))){const err34 = {instancePath:instancePath+"/layout",schemaPath:"#/properties/layout/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}if(data16.mode !== undefined){if(!(data16.mode === "grid")){const err35 = {instancePath:instancePath+"/layout/mode",schemaPath:"#/properties/layout/properties/mode/enum",keyword:"enum",params:{allowedValues: schema92.properties.layout.properties.mode.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}if(data16.origin !== undefined){let data18 = data16.origin;if(Array.isArray(data18)){if(data18.length > 2){const err36 = {instancePath:instancePath+"/layout/origin",schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}if(data18.length < 2){const err37 = {instancePath:instancePath+"/layout/origin",schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}const len2 = data18.length;if(len2 > 0){let data19 = data18[0];if(!((typeof data19 == "number") && (isFinite(data19)))){const err38 = {instancePath:instancePath+"/layout/origin/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}}if(len2 > 1){let data20 = data18[1];if(!((typeof data20 == "number") && (isFinite(data20)))){const err39 = {instancePath:instancePath+"/layout/origin/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}}const len3 = data18.length;if(!(len3 <= 2)){const err40 = {instancePath:instancePath+"/layout/origin",schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}}else {const err41 = {instancePath:instancePath+"/layout/origin",schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}}if(data16.cols !== undefined){let data21 = data16.cols;if(!(((typeof data21 == "number") && (!(data21 % 1) && !isNaN(data21))) && (isFinite(data21)))){const err42 = {instancePath:instancePath+"/layout/cols",schemaPath:"#/properties/layout/properties/cols/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}if((typeof data21 == "number") && (isFinite(data21))){if(data21 > 12 || isNaN(data21)){const err43 = {instancePath:instancePath+"/layout/cols",schemaPath:"#/properties/layout/properties/cols/maximum",keyword:"maximum",params:{comparison: "<=", limit: 12},message:"must be <= 12"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}if(data21 < 1 || isNaN(data21)){const err44 = {instancePath:instancePath+"/layout/cols",schemaPath:"#/properties/layout/properties/cols/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}}}if(data16.gapX !== undefined){let data22 = data16.gapX;if((typeof data22 == "number") && (isFinite(data22))){if(data22 < 0 || isNaN(data22)){const err45 = {instancePath:instancePath+"/layout/gapX",schemaPath:"#/properties/layout/properties/gapX/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}}else {const err46 = {instancePath:instancePath+"/layout/gapX",schemaPath:"#/properties/layout/properties/gapX/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}}if(data16.gapY !== undefined){let data23 = data16.gapY;if((typeof data23 == "number") && (isFinite(data23))){if(data23 < 0 || isNaN(data23)){const err47 = {instancePath:instancePath+"/layout/gapY",schemaPath:"#/properties/layout/properties/gapY/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}}else {const err48 = {instancePath:instancePath+"/layout/gapY",schemaPath:"#/properties/layout/properties/gapY/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}}if(data16.cellW !== undefined){let data24 = data16.cellW;if((typeof data24 == "number") && (isFinite(data24))){if(data24 < 40 || isNaN(data24)){const err49 = {instancePath:instancePath+"/layout/cellW",schemaPath:"#/properties/layout/properties/cellW/minimum",keyword:"minimum",params:{comparison: ">=", limit: 40},message:"must be >= 40"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}}else {const err50 = {instancePath:instancePath+"/layout/cellW",schemaPath:"#/properties/layout/properties/cellW/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}}if(data16.cellH !== undefined){let data25 = data16.cellH;if((typeof data25 == "number") && (isFinite(data25))){if(data25 < 24 || isNaN(data25)){const err51 = {instancePath:instancePath+"/layout/cellH",schemaPath:"#/properties/layout/properties/cellH/minimum",keyword:"minimum",params:{comparison: ">=", limit: 24},message:"must be >= 24"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}}else {const err52 = {instancePath:instancePath+"/layout/cellH",schemaPath:"#/properties/layout/properties/cellH/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}}}else {const err53 = {instancePath:instancePath+"/layout",schemaPath:"#/properties/layout/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}}if(data.components !== undefined){let data26 = data.components;if(Array.isArray(data26)){if(data26.length < 1){const err54 = {instancePath:instancePath+"/components",schemaPath:"#/properties/components/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}const len4 = data26.length;for(let i0=0; i0<len4; i0++){let data27 = data26[i0];if(data27 && typeof data27 == "object" && !Array.isArray(data27)){if(data27.id === undefined){const err55 = {instancePath:instancePath+"/components/" + i0,schemaPath:"#/properties/components/items/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}if(data27.type === undefined){const err56 = {instancePath:instancePath+"/components/" + i0,schemaPath:"#/properties/components/items/required",keyword:"required",params:{missingProperty: "type"},message:"must have required property '"+"type"+"'"};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}if(data27.label === undefined){const err57 = {instancePath:instancePath+"/components/" + i0,schemaPath:"#/properties/components/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}for(const key4 in data27){if(!(func1.call(schema92.properties.components.items.properties, key4))){const err58 = {instancePath:instancePath+"/components/" + i0,schemaPath:"#/properties/components/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key4},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}}if(data27.id !== undefined){let data28 = data27.id;if(typeof data28 === "string"){if(!pattern4.test(data28)){const err59 = {instancePath:instancePath+"/components/" + i0+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}}else {const err60 = {instancePath:instancePath+"/components/" + i0+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}}if(data27.type !== undefined){let data29 = data27.type;if(!(((((((data29 === "frontend") || (data29 === "backend")) || (data29 === "database")) || (data29 === "cloud")) || (data29 === "security")) || (data29 === "messagebus")) || (data29 === "external"))){const err61 = {instancePath:instancePath+"/components/" + i0+"/type",schemaPath:"common.schema.json#/$defs/componentType/enum",keyword:"enum",params:{allowedValues: schema43.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err61];}else {vErrors.push(err61);}errors++;}}if(data27.label !== undefined){let data30 = data27.label;if(typeof data30 === "string"){if(func2(data30) < 1){const err62 = {instancePath:instancePath+"/components/" + i0+"/label",schemaPath:"#/properties/components/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err62];}else {vErrors.push(err62);}errors++;}}else {const err63 = {instancePath:instancePath+"/components/" + i0+"/label",schemaPath:"#/properties/components/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err63];}else {vErrors.push(err63);}errors++;}}if(data27.sublabel !== undefined){if(typeof data27.sublabel !== "string"){const err64 = {instancePath:instancePath+"/components/" + i0+"/sublabel",schemaPath:"#/properties/components/items/properties/sublabel/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err64];}else {vErrors.push(err64);}errors++;}}if(data27.tag !== undefined){if(typeof data27.tag !== "string"){const err65 = {instancePath:instancePath+"/components/" + i0+"/tag",schemaPath:"#/properties/components/items/properties/tag/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err65];}else {vErrors.push(err65);}errors++;}}if(data27.sources !== undefined){let data33 = data27.sources;if(Array.isArray(data33)){if(data33.length > 3){const err66 = {instancePath:instancePath+"/components/" + i0+"/sources",schemaPath:"#/properties/components/items/properties/sources/maxItems",keyword:"maxItems",params:{limit: 3},message:"must NOT have more than 3 items"};if(vErrors === null){vErrors = [err66];}else {vErrors.push(err66);}errors++;}if(data33.length < 1){const err67 = {instancePath:instancePath+"/components/" + i0+"/sources",schemaPath:"#/properties/components/items/properties/sources/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err67];}else {vErrors.push(err67);}errors++;}const len5 = data33.length;for(let i1=0; i1<len5; i1++){let data34 = data33[i1];if(data34 && typeof data34 == "object" && !Array.isArray(data34)){if(data34.path === undefined){const err68 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1,schemaPath:"#/properties/components/items/properties/sources/items/required",keyword:"required",params:{missingProperty: "path"},message:"must have required property '"+"path"+"'"};if(vErrors === null){vErrors = [err68];}else {vErrors.push(err68);}errors++;}for(const key5 in data34){if(!((((key5 === "path") || (key5 === "line")) || (key5 === "end_line")) || (key5 === "label"))){const err69 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1,schemaPath:"#/properties/components/items/properties/sources/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key5},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err69];}else {vErrors.push(err69);}errors++;}}if(data34.path !== undefined){let data35 = data34.path;if(typeof data35 === "string"){if(func2(data35) > 240){const err70 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1+"/path",schemaPath:"#/properties/components/items/properties/sources/items/properties/path/maxLength",keyword:"maxLength",params:{limit: 240},message:"must NOT have more than 240 characters"};if(vErrors === null){vErrors = [err70];}else {vErrors.push(err70);}errors++;}if(func2(data35) < 1){const err71 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1+"/path",schemaPath:"#/properties/components/items/properties/sources/items/properties/path/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err71];}else {vErrors.push(err71);}errors++;}}else {const err72 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1+"/path",schemaPath:"#/properties/components/items/properties/sources/items/properties/path/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err72];}else {vErrors.push(err72);}errors++;}}if(data34.line !== undefined){let data36 = data34.line;if(!(((typeof data36 == "number") && (!(data36 % 1) && !isNaN(data36))) && (isFinite(data36)))){const err73 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1+"/line",schemaPath:"#/properties/components/items/properties/sources/items/properties/line/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err73];}else {vErrors.push(err73);}errors++;}if((typeof data36 == "number") && (isFinite(data36))){if(data36 < 1 || isNaN(data36)){const err74 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1+"/line",schemaPath:"#/properties/components/items/properties/sources/items/properties/line/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"};if(vErrors === null){vErrors = [err74];}else {vErrors.push(err74);}errors++;}}}if(data34.end_line !== undefined){let data37 = data34.end_line;if(!(((typeof data37 == "number") && (!(data37 % 1) && !isNaN(data37))) && (isFinite(data37)))){const err75 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1+"/end_line",schemaPath:"#/properties/components/items/properties/sources/items/properties/end_line/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err75];}else {vErrors.push(err75);}errors++;}if((typeof data37 == "number") && (isFinite(data37))){if(data37 < 1 || isNaN(data37)){const err76 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1+"/end_line",schemaPath:"#/properties/components/items/properties/sources/items/properties/end_line/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"};if(vErrors === null){vErrors = [err76];}else {vErrors.push(err76);}errors++;}}}if(data34.label !== undefined){let data38 = data34.label;if(typeof data38 === "string"){if(func2(data38) > 48){const err77 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1+"/label",schemaPath:"#/properties/components/items/properties/sources/items/properties/label/maxLength",keyword:"maxLength",params:{limit: 48},message:"must NOT have more than 48 characters"};if(vErrors === null){vErrors = [err77];}else {vErrors.push(err77);}errors++;}if(func2(data38) < 1){const err78 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1+"/label",schemaPath:"#/properties/components/items/properties/sources/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err78];}else {vErrors.push(err78);}errors++;}}else {const err79 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1+"/label",schemaPath:"#/properties/components/items/properties/sources/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err79];}else {vErrors.push(err79);}errors++;}}}else {const err80 = {instancePath:instancePath+"/components/" + i0+"/sources/" + i1,schemaPath:"#/properties/components/items/properties/sources/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err80];}else {vErrors.push(err80);}errors++;}}}else {const err81 = {instancePath:instancePath+"/components/" + i0+"/sources",schemaPath:"#/properties/components/items/properties/sources/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err81];}else {vErrors.push(err81);}errors++;}}if(data27.row !== undefined){let data39 = data27.row;if(!(((typeof data39 == "number") && (!(data39 % 1) && !isNaN(data39))) && (isFinite(data39)))){const err82 = {instancePath:instancePath+"/components/" + i0+"/row",schemaPath:"#/properties/components/items/properties/row/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err82];}else {vErrors.push(err82);}errors++;}if((typeof data39 == "number") && (isFinite(data39))){if(data39 < 0 || isNaN(data39)){const err83 = {instancePath:instancePath+"/components/" + i0+"/row",schemaPath:"#/properties/components/items/properties/row/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err83];}else {vErrors.push(err83);}errors++;}}}if(data27.col !== undefined){let data40 = data27.col;if(!(((typeof data40 == "number") && (!(data40 % 1) && !isNaN(data40))) && (isFinite(data40)))){const err84 = {instancePath:instancePath+"/components/" + i0+"/col",schemaPath:"#/properties/components/items/properties/col/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err84];}else {vErrors.push(err84);}errors++;}if((typeof data40 == "number") && (isFinite(data40))){if(data40 < 0 || isNaN(data40)){const err85 = {instancePath:instancePath+"/components/" + i0+"/col",schemaPath:"#/properties/components/items/properties/col/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err85];}else {vErrors.push(err85);}errors++;}}}if(data27.pos !== undefined){let data41 = data27.pos;if(Array.isArray(data41)){if(data41.length > 2){const err86 = {instancePath:instancePath+"/components/" + i0+"/pos",schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err86];}else {vErrors.push(err86);}errors++;}if(data41.length < 2){const err87 = {instancePath:instancePath+"/components/" + i0+"/pos",schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err87];}else {vErrors.push(err87);}errors++;}const len6 = data41.length;if(len6 > 0){let data42 = data41[0];if(!((typeof data42 == "number") && (isFinite(data42)))){const err88 = {instancePath:instancePath+"/components/" + i0+"/pos/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err88];}else {vErrors.push(err88);}errors++;}}if(len6 > 1){let data43 = data41[1];if(!((typeof data43 == "number") && (isFinite(data43)))){const err89 = {instancePath:instancePath+"/components/" + i0+"/pos/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err89];}else {vErrors.push(err89);}errors++;}}const len7 = data41.length;if(!(len7 <= 2)){const err90 = {instancePath:instancePath+"/components/" + i0+"/pos",schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err90];}else {vErrors.push(err90);}errors++;}}else {const err91 = {instancePath:instancePath+"/components/" + i0+"/pos",schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err91];}else {vErrors.push(err91);}errors++;}}if(data27.size !== undefined){let data44 = data27.size;if(Array.isArray(data44)){if(data44.length > 2){const err92 = {instancePath:instancePath+"/components/" + i0+"/size",schemaPath:"#/properties/components/items/properties/size/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err92];}else {vErrors.push(err92);}errors++;}if(data44.length < 2){const err93 = {instancePath:instancePath+"/components/" + i0+"/size",schemaPath:"#/properties/components/items/properties/size/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err93];}else {vErrors.push(err93);}errors++;}const len8 = data44.length;if(len8 > 0){let data45 = data44[0];if((typeof data45 == "number") && (isFinite(data45))){if(data45 <= 0 || isNaN(data45)){const err94 = {instancePath:instancePath+"/components/" + i0+"/size/0",schemaPath:"#/properties/components/items/properties/size/prefixItems/0/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison: ">", limit: 0},message:"must be > 0"};if(vErrors === null){vErrors = [err94];}else {vErrors.push(err94);}errors++;}}else {const err95 = {instancePath:instancePath+"/components/" + i0+"/size/0",schemaPath:"#/properties/components/items/properties/size/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err95];}else {vErrors.push(err95);}errors++;}}if(len8 > 1){let data46 = data44[1];if((typeof data46 == "number") && (isFinite(data46))){if(data46 <= 0 || isNaN(data46)){const err96 = {instancePath:instancePath+"/components/" + i0+"/size/1",schemaPath:"#/properties/components/items/properties/size/prefixItems/1/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison: ">", limit: 0},message:"must be > 0"};if(vErrors === null){vErrors = [err96];}else {vErrors.push(err96);}errors++;}}else {const err97 = {instancePath:instancePath+"/components/" + i0+"/size/1",schemaPath:"#/properties/components/items/properties/size/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err97];}else {vErrors.push(err97);}errors++;}}const len9 = data44.length;if(!(len9 <= 2)){const err98 = {instancePath:instancePath+"/components/" + i0+"/size",schemaPath:"#/properties/components/items/properties/size/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err98];}else {vErrors.push(err98);}errors++;}}else {const err99 = {instancePath:instancePath+"/components/" + i0+"/size",schemaPath:"#/properties/components/items/properties/size/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err99];}else {vErrors.push(err99);}errors++;}}}else {const err100 = {instancePath:instancePath+"/components/" + i0,schemaPath:"#/properties/components/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err100];}else {vErrors.push(err100);}errors++;}}}else {const err101 = {instancePath:instancePath+"/components",schemaPath:"#/properties/components/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err101];}else {vErrors.push(err101);}errors++;}}if(data.boundaries !== undefined){let data47 = data.boundaries;if(Array.isArray(data47)){const len10 = data47.length;for(let i2=0; i2<len10; i2++){let data48 = data47[i2];if(data48 && typeof data48 == "object" && !Array.isArray(data48)){if(data48.kind === undefined){const err102 = {instancePath:instancePath+"/boundaries/" + i2,schemaPath:"#/properties/boundaries/items/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err102];}else {vErrors.push(err102);}errors++;}if(data48.label === undefined){const err103 = {instancePath:instancePath+"/boundaries/" + i2,schemaPath:"#/properties/boundaries/items/required",keyword:"required",params:{missingProperty: "label"},message:"must have required property '"+"label"+"'"};if(vErrors === null){vErrors = [err103];}else {vErrors.push(err103);}errors++;}if(data48.wraps === undefined){const err104 = {instancePath:instancePath+"/boundaries/" + i2,schemaPath:"#/properties/boundaries/items/required",keyword:"required",params:{missingProperty: "wraps"},message:"must have required property '"+"wraps"+"'"};if(vErrors === null){vErrors = [err104];}else {vErrors.push(err104);}errors++;}for(const key6 in data48){if(!((((key6 === "kind") || (key6 === "label")) || (key6 === "wraps")) || (key6 === "pad"))){const err105 = {instancePath:instancePath+"/boundaries/" + i2,schemaPath:"#/properties/boundaries/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key6},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err105];}else {vErrors.push(err105);}errors++;}}if(data48.kind !== undefined){let data49 = data48.kind;if(!((data49 === "region") || (data49 === "security-group"))){const err106 = {instancePath:instancePath+"/boundaries/" + i2+"/kind",schemaPath:"#/properties/boundaries/items/properties/kind/enum",keyword:"enum",params:{allowedValues: schema92.properties.boundaries.items.properties.kind.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err106];}else {vErrors.push(err106);}errors++;}}if(data48.label !== undefined){let data50 = data48.label;if(typeof data50 === "string"){if(func2(data50) < 1){const err107 = {instancePath:instancePath+"/boundaries/" + i2+"/label",schemaPath:"#/properties/boundaries/items/properties/label/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err107];}else {vErrors.push(err107);}errors++;}}else {const err108 = {instancePath:instancePath+"/boundaries/" + i2+"/label",schemaPath:"#/properties/boundaries/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err108];}else {vErrors.push(err108);}errors++;}}if(data48.wraps !== undefined){let data51 = data48.wraps;if(Array.isArray(data51)){if(data51.length < 1){const err109 = {instancePath:instancePath+"/boundaries/" + i2+"/wraps",schemaPath:"#/properties/boundaries/items/properties/wraps/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err109];}else {vErrors.push(err109);}errors++;}const len11 = data51.length;for(let i3=0; i3<len11; i3++){let data52 = data51[i3];if(typeof data52 === "string"){if(!pattern4.test(data52)){const err110 = {instancePath:instancePath+"/boundaries/" + i2+"/wraps/" + i3,schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err110];}else {vErrors.push(err110);}errors++;}}else {const err111 = {instancePath:instancePath+"/boundaries/" + i2+"/wraps/" + i3,schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err111];}else {vErrors.push(err111);}errors++;}}}else {const err112 = {instancePath:instancePath+"/boundaries/" + i2+"/wraps",schemaPath:"#/properties/boundaries/items/properties/wraps/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err112];}else {vErrors.push(err112);}errors++;}}if(data48.pad !== undefined){let data53 = data48.pad;if((typeof data53 == "number") && (isFinite(data53))){if(data53 < 0 || isNaN(data53)){const err113 = {instancePath:instancePath+"/boundaries/" + i2+"/pad",schemaPath:"#/properties/boundaries/items/properties/pad/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err113];}else {vErrors.push(err113);}errors++;}}else {const err114 = {instancePath:instancePath+"/boundaries/" + i2+"/pad",schemaPath:"#/properties/boundaries/items/properties/pad/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err114];}else {vErrors.push(err114);}errors++;}}}else {const err115 = {instancePath:instancePath+"/boundaries/" + i2,schemaPath:"#/properties/boundaries/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err115];}else {vErrors.push(err115);}errors++;}}}else {const err116 = {instancePath:instancePath+"/boundaries",schemaPath:"#/properties/boundaries/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err116];}else {vErrors.push(err116);}errors++;}}if(data.connections !== undefined){let data54 = data.connections;if(Array.isArray(data54)){const len12 = data54.length;for(let i4=0; i4<len12; i4++){let data55 = data54[i4];if(data55 && typeof data55 == "object" && !Array.isArray(data55)){if(data55.from === undefined){const err117 = {instancePath:instancePath+"/connections/" + i4,schemaPath:"#/properties/connections/items/required",keyword:"required",params:{missingProperty: "from"},message:"must have required property '"+"from"+"'"};if(vErrors === null){vErrors = [err117];}else {vErrors.push(err117);}errors++;}if(data55.to === undefined){const err118 = {instancePath:instancePath+"/connections/" + i4,schemaPath:"#/properties/connections/items/required",keyword:"required",params:{missingProperty: "to"},message:"must have required property '"+"to"+"'"};if(vErrors === null){vErrors = [err118];}else {vErrors.push(err118);}errors++;}for(const key7 in data55){if(!(func1.call(schema92.properties.connections.items.properties, key7))){const err119 = {instancePath:instancePath+"/connections/" + i4,schemaPath:"#/properties/connections/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key7},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err119];}else {vErrors.push(err119);}errors++;}}if(data55.id !== undefined){let data56 = data55.id;if(typeof data56 === "string"){if(!pattern4.test(data56)){const err120 = {instancePath:instancePath+"/connections/" + i4+"/id",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err120];}else {vErrors.push(err120);}errors++;}}else {const err121 = {instancePath:instancePath+"/connections/" + i4+"/id",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err121];}else {vErrors.push(err121);}errors++;}}if(data55.from !== undefined){let data57 = data55.from;if(typeof data57 === "string"){if(!pattern4.test(data57)){const err122 = {instancePath:instancePath+"/connections/" + i4+"/from",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err122];}else {vErrors.push(err122);}errors++;}}else {const err123 = {instancePath:instancePath+"/connections/" + i4+"/from",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err123];}else {vErrors.push(err123);}errors++;}}if(data55.to !== undefined){let data58 = data55.to;if(typeof data58 === "string"){if(!pattern4.test(data58)){const err124 = {instancePath:instancePath+"/connections/" + i4+"/to",schemaPath:"common.schema.json#/$defs/id/pattern",keyword:"pattern",params:{pattern: "^[a-zA-Z][a-zA-Z0-9_-]*$"},message:"must match pattern \""+"^[a-zA-Z][a-zA-Z0-9_-]*$"+"\""};if(vErrors === null){vErrors = [err124];}else {vErrors.push(err124);}errors++;}}else {const err125 = {instancePath:instancePath+"/connections/" + i4+"/to",schemaPath:"common.schema.json#/$defs/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err125];}else {vErrors.push(err125);}errors++;}}if(data55.label !== undefined){if(typeof data55.label !== "string"){const err126 = {instancePath:instancePath+"/connections/" + i4+"/label",schemaPath:"#/properties/connections/items/properties/label/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err126];}else {vErrors.push(err126);}errors++;}}if(data55.variant !== undefined){let data60 = data55.variant;if(!((((data60 === "default") || (data60 === "emphasis")) || (data60 === "security")) || (data60 === "dashed"))){const err127 = {instancePath:instancePath+"/connections/" + i4+"/variant",schemaPath:"common.schema.json#/$defs/variant/enum",keyword:"enum",params:{allowedValues: schema47.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err127];}else {vErrors.push(err127);}errors++;}}if(data55.fromSide !== undefined){let data61 = data55.fromSide;if(!((((data61 === "left") || (data61 === "right")) || (data61 === "top")) || (data61 === "bottom"))){const err128 = {instancePath:instancePath+"/connections/" + i4+"/fromSide",schemaPath:"#/properties/connections/items/properties/fromSide/enum",keyword:"enum",params:{allowedValues: schema92.properties.connections.items.properties.fromSide.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err128];}else {vErrors.push(err128);}errors++;}}if(data55.toSide !== undefined){let data62 = data55.toSide;if(!((((data62 === "left") || (data62 === "right")) || (data62 === "top")) || (data62 === "bottom"))){const err129 = {instancePath:instancePath+"/connections/" + i4+"/toSide",schemaPath:"#/properties/connections/items/properties/toSide/enum",keyword:"enum",params:{allowedValues: schema92.properties.connections.items.properties.toSide.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err129];}else {vErrors.push(err129);}errors++;}}if(data55.route !== undefined){let data63 = data55.route;if(!((((data63 === "auto") || (data63 === "straight")) || (data63 === "orthogonal-h")) || (data63 === "orthogonal-v"))){const err130 = {instancePath:instancePath+"/connections/" + i4+"/route",schemaPath:"#/properties/connections/items/properties/route/enum",keyword:"enum",params:{allowedValues: schema92.properties.connections.items.properties.route.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err130];}else {vErrors.push(err130);}errors++;}}if(data55.via !== undefined){let data64 = data55.via;if(Array.isArray(data64)){const len13 = data64.length;for(let i5=0; i5<len13; i5++){let data65 = data64[i5];if(Array.isArray(data65)){if(data65.length > 2){const err131 = {instancePath:instancePath+"/connections/" + i4+"/via/" + i5,schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err131];}else {vErrors.push(err131);}errors++;}if(data65.length < 2){const err132 = {instancePath:instancePath+"/connections/" + i4+"/via/" + i5,schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err132];}else {vErrors.push(err132);}errors++;}const len14 = data65.length;if(len14 > 0){let data66 = data65[0];if(!((typeof data66 == "number") && (isFinite(data66)))){const err133 = {instancePath:instancePath+"/connections/" + i4+"/via/" + i5+"/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err133];}else {vErrors.push(err133);}errors++;}}if(len14 > 1){let data67 = data65[1];if(!((typeof data67 == "number") && (isFinite(data67)))){const err134 = {instancePath:instancePath+"/connections/" + i4+"/via/" + i5+"/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err134];}else {vErrors.push(err134);}errors++;}}const len15 = data65.length;if(!(len15 <= 2)){const err135 = {instancePath:instancePath+"/connections/" + i4+"/via/" + i5,schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err135];}else {vErrors.push(err135);}errors++;}}else {const err136 = {instancePath:instancePath+"/connections/" + i4+"/via/" + i5,schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err136];}else {vErrors.push(err136);}errors++;}}}else {const err137 = {instancePath:instancePath+"/connections/" + i4+"/via",schemaPath:"#/properties/connections/items/properties/via/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err137];}else {vErrors.push(err137);}errors++;}}if(data55.labelAt !== undefined){let data68 = data55.labelAt;if(Array.isArray(data68)){if(data68.length > 2){const err138 = {instancePath:instancePath+"/connections/" + i4+"/labelAt",schemaPath:"common.schema.json#/$defs/point/maxItems",keyword:"maxItems",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err138];}else {vErrors.push(err138);}errors++;}if(data68.length < 2){const err139 = {instancePath:instancePath+"/connections/" + i4+"/labelAt",schemaPath:"common.schema.json#/$defs/point/minItems",keyword:"minItems",params:{limit: 2},message:"must NOT have fewer than 2 items"};if(vErrors === null){vErrors = [err139];}else {vErrors.push(err139);}errors++;}const len16 = data68.length;if(len16 > 0){let data69 = data68[0];if(!((typeof data69 == "number") && (isFinite(data69)))){const err140 = {instancePath:instancePath+"/connections/" + i4+"/labelAt/0",schemaPath:"common.schema.json#/$defs/point/prefixItems/0/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err140];}else {vErrors.push(err140);}errors++;}}if(len16 > 1){let data70 = data68[1];if(!((typeof data70 == "number") && (isFinite(data70)))){const err141 = {instancePath:instancePath+"/connections/" + i4+"/labelAt/1",schemaPath:"common.schema.json#/$defs/point/prefixItems/1/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err141];}else {vErrors.push(err141);}errors++;}}const len17 = data68.length;if(!(len17 <= 2)){const err142 = {instancePath:instancePath+"/connections/" + i4+"/labelAt",schemaPath:"common.schema.json#/$defs/point/items",keyword:"items",params:{limit: 2},message:"must NOT have more than 2 items"};if(vErrors === null){vErrors = [err142];}else {vErrors.push(err142);}errors++;}}else {const err143 = {instancePath:instancePath+"/connections/" + i4+"/labelAt",schemaPath:"common.schema.json#/$defs/point/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err143];}else {vErrors.push(err143);}errors++;}}if(data55.labelDx !== undefined){let data71 = data55.labelDx;if(!((typeof data71 == "number") && (isFinite(data71)))){const err144 = {instancePath:instancePath+"/connections/" + i4+"/labelDx",schemaPath:"#/properties/connections/items/properties/labelDx/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err144];}else {vErrors.push(err144);}errors++;}}if(data55.labelDy !== undefined){let data72 = data55.labelDy;if(!((typeof data72 == "number") && (isFinite(data72)))){const err145 = {instancePath:instancePath+"/connections/" + i4+"/labelDy",schemaPath:"#/properties/connections/items/properties/labelDy/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err145];}else {vErrors.push(err145);}errors++;}}if(data55.labelSegment !== undefined){let data73 = data55.labelSegment;if(!(((typeof data73 == "number") && (!(data73 % 1) && !isNaN(data73))) && (isFinite(data73)))){const err146 = {instancePath:instancePath+"/connections/" + i4+"/labelSegment",schemaPath:"#/properties/connections/items/properties/labelSegment/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err146];}else {vErrors.push(err146);}errors++;}if((typeof data73 == "number") && (isFinite(data73))){if(data73 < 0 || isNaN(data73)){const err147 = {instancePath:instancePath+"/connections/" + i4+"/labelSegment",schemaPath:"#/properties/connections/items/properties/labelSegment/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err147];}else {vErrors.push(err147);}errors++;}}}if(data55.width !== undefined){let data74 = data55.width;if((typeof data74 == "number") && (isFinite(data74))){if(data74 < 0.5 || isNaN(data74)){const err148 = {instancePath:instancePath+"/connections/" + i4+"/width",schemaPath:"#/properties/connections/items/properties/width/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0.5},message:"must be >= 0.5"};if(vErrors === null){vErrors = [err148];}else {vErrors.push(err148);}errors++;}}else {const err149 = {instancePath:instancePath+"/connections/" + i4+"/width",schemaPath:"#/properties/connections/items/properties/width/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err149];}else {vErrors.push(err149);}errors++;}}}else {const err150 = {instancePath:instancePath+"/connections/" + i4,schemaPath:"#/properties/connections/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err150];}else {vErrors.push(err150);}errors++;}}}else {const err151 = {instancePath:instancePath+"/connections",schemaPath:"#/properties/connections/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err151];}else {vErrors.push(err151);}errors++;}}if(data.cards !== undefined){let data75 = data.cards;if(Array.isArray(data75)){const len18 = data75.length;for(let i6=0; i6<len18; i6++){let data76 = data75[i6];if(data76 && typeof data76 == "object" && !Array.isArray(data76)){if(data76.dot === undefined){const err152 = {instancePath:instancePath+"/cards/" + i6,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "dot"},message:"must have required property '"+"dot"+"'"};if(vErrors === null){vErrors = [err152];}else {vErrors.push(err152);}errors++;}if(data76.title === undefined){const err153 = {instancePath:instancePath+"/cards/" + i6,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "title"},message:"must have required property '"+"title"+"'"};if(vErrors === null){vErrors = [err153];}else {vErrors.push(err153);}errors++;}if(data76.items === undefined){const err154 = {instancePath:instancePath+"/cards/" + i6,schemaPath:"common.schema.json#/$defs/cards/items/required",keyword:"required",params:{missingProperty: "items"},message:"must have required property '"+"items"+"'"};if(vErrors === null){vErrors = [err154];}else {vErrors.push(err154);}errors++;}for(const key8 in data76){if(!(((key8 === "dot") || (key8 === "title")) || (key8 === "items"))){const err155 = {instancePath:instancePath+"/cards/" + i6,schemaPath:"common.schema.json#/$defs/cards/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key8},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err155];}else {vErrors.push(err155);}errors++;}}if(data76.dot !== undefined){let data77 = data76.dot;if(!(((((((data77 === "cyan") || (data77 === "emerald")) || (data77 === "violet")) || (data77 === "amber")) || (data77 === "rose")) || (data77 === "orange")) || (data77 === "slate"))){const err156 = {instancePath:instancePath+"/cards/" + i6+"/dot",schemaPath:"common.schema.json#/$defs/cards/items/properties/dot/enum",keyword:"enum",params:{allowedValues: schema52.items.properties.dot.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err156];}else {vErrors.push(err156);}errors++;}}if(data76.title !== undefined){let data78 = data76.title;if(typeof data78 === "string"){if(func2(data78) < 1){const err157 = {instancePath:instancePath+"/cards/" + i6+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err157];}else {vErrors.push(err157);}errors++;}}else {const err158 = {instancePath:instancePath+"/cards/" + i6+"/title",schemaPath:"common.schema.json#/$defs/cards/items/properties/title/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err158];}else {vErrors.push(err158);}errors++;}}if(data76.items !== undefined){let data79 = data76.items;if(Array.isArray(data79)){const len19 = data79.length;for(let i7=0; i7<len19; i7++){if(typeof data79[i7] !== "string"){const err159 = {instancePath:instancePath+"/cards/" + i6+"/items/" + i7,schemaPath:"common.schema.json#/$defs/cards/items/properties/items/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err159];}else {vErrors.push(err159);}errors++;}}}else {const err160 = {instancePath:instancePath+"/cards/" + i6+"/items",schemaPath:"common.schema.json#/$defs/cards/items/properties/items/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err160];}else {vErrors.push(err160);}errors++;}}}else {const err161 = {instancePath:instancePath+"/cards/" + i6,schemaPath:"common.schema.json#/$defs/cards/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err161];}else {vErrors.push(err161);}errors++;}}}else {const err162 = {instancePath:instancePath+"/cards",schemaPath:"common.schema.json#/$defs/cards/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err162];}else {vErrors.push(err162);}errors++;}}}else {const err163 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err163];}else {vErrors.push(err163);}errors++;}validate33.errors = vErrors;return errors === 0;}validate33.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};
diff --git a/archify/renderers/shared/repository-evidence.mjs b/archify/renderers/shared/repository-evidence.mjs
new file mode 100644
index 00000000..fa739721
--- /dev/null
+++ b/archify/renderers/shared/repository-evidence.mjs
@@ -0,0 +1,154 @@
+import { spawnSync } from 'node:child_process';
+import fs from 'node:fs';
+import path from 'node:path';
+
+const FULL_SHA_RE = /^[a-f0-9]{40}$/i;
+const CONTROL_CHARACTER_RE = /[\u0000-\u001f\u007f]/;
+
+function runGit(repoRoot, args) {
+ const result = spawnSync('git', ['-C', repoRoot, ...args], {
+ encoding: 'utf8',
+ maxBuffer: 16 * 1024 * 1024,
+ });
+ if (result.error) throw new Error(`Could not run Git: ${result.error.message}`);
+ return result;
+}
+
+function gitValue(repoRoot, args, failure) {
+ const result = runGit(repoRoot, args);
+ if (result.status !== 0) throw new Error(failure);
+ return result.stdout.trim();
+}
+
+function githubSlug(value) {
+ const raw = String(value || '').trim();
+ const match = raw.match(/^(?:https:\/\/github\.com\/|git@github\.com:|ssh:\/\/git@github\.com\/)([^/\s]+)\/([^/\s]+?)(?:\.git)?\/?$/i);
+ return match ? `${match[1]}/${match[2]}`.toLowerCase() : null;
+}
+
+function verifiedSourcePath(value, where) {
+ const sourcePath = String(value || '');
+ if (!sourcePath || sourcePath.startsWith('/') || sourcePath.includes('\\') || CONTROL_CHARACTER_RE.test(sourcePath)) {
+ throw new Error(`${where} must be a repo-relative POSIX path.`);
+ }
+ const segments = sourcePath.split('/');
+ if (segments.some((segment) => !segment || segment === '.' || segment === '..') || segments[0] === '.git') {
+ throw new Error(`${where} must stay inside the repository and may not address .git.`);
+ }
+ return segments.join('/');
+}
+
+function sourceHref(repositoryUrl, revision, source) {
+ const encodedPath = source.path.split('/').map(encodeURIComponent).join('/');
+ const lineFragment = source.line
+ ? `#L${source.line}${source.endLine && source.endLine !== source.line ? `-L${source.endLine}` : ''}`
+ : '';
+ return `${repositoryUrl}/blob/${revision}/${encodedPath}${lineFragment}`;
+}
+
+function sourceLineCount(content) {
+ if (!content.length) return 0;
+ const lines = content.split(/\r\n|\n|\r/);
+ return lines.length - (/(?:\r\n|\n|\r)$/.test(content) ? 1 : 0);
+}
+
+export function hasRepositoryEvidence(diagramType, diagram) {
+ if (diagramType !== 'architecture') return false;
+ const components = Array.isArray(diagram?.components) ? diagram.components : [];
+ return Boolean(diagram?.meta?.repository) || components.some((component) => Array.isArray(component?.sources) && component.sources.length);
+}
+
+export function verifyRepositoryEvidence(diagramType, diagram, repoRootInput) {
+ if (!hasRepositoryEvidence(diagramType, diagram)) return null;
+ if (diagramType !== 'architecture') throw new Error('Repository evidence is currently supported for architecture diagrams only.');
+
+ const repository = diagram.meta?.repository;
+ if (!repository) throw new Error('Repository evidence requires /meta/repository.');
+ if (!FULL_SHA_RE.test(repository.revision || '')) {
+ throw new Error('/meta/repository/revision must be a full 40-character commit SHA.');
+ }
+ const authoredSlug = githubSlug(repository.url);
+ if (!authoredSlug || !String(repository.url).startsWith('https://github.com/')) {
+ throw new Error('/meta/repository/url must be a public https://github.com owner/repository URL.');
+ }
+ if (!repoRootInput) {
+ throw new Error('This diagram declares source evidence. Pass --repo-root <repository> so Archify can verify it before rendering.');
+ }
+
+ const requestedRoot = path.resolve(repoRootInput);
+ let realRoot;
+ try {
+ realRoot = fs.realpathSync(requestedRoot);
+ } catch (error) {
+ throw new Error(`Could not resolve evidence repository root "${requestedRoot}": ${error.message}`);
+ }
+ const gitRoot = gitValue(realRoot, ['rev-parse', '--show-toplevel'], `Evidence root "${realRoot}" is not a Git repository.`);
+ if (fs.realpathSync(gitRoot) !== realRoot) {
+ throw new Error(`Evidence root must be the Git top-level directory: ${gitRoot}`);
+ }
+ const origin = gitValue(realRoot, ['remote', 'get-url', 'origin'], 'Evidence repository must have an origin remote.');
+ if (githubSlug(origin) !== authoredSlug) {
+ throw new Error(`Evidence repository origin ${JSON.stringify(origin)} does not match ${JSON.stringify(repository.url)}.`);
+ }
+
+ const revision = repository.revision.toLowerCase();
+ const commit = runGit(realRoot, ['cat-file', '-e', `${revision}^{commit}`]);
+ if (commit.status !== 0) {
+ throw new Error(`Evidence revision ${revision} is not available in the local repository.`);
+ }
+
+ const nodes = Object.create(null);
+ let referenceCount = 0;
+ const components = Array.isArray(diagram.components) ? diagram.components : [];
+ for (const [componentIndex, component] of components.entries()) {
+ if (!Array.isArray(component.sources) || component.sources.length === 0) continue;
+ const verified = [];
+ for (const [sourceIndex, authored] of component.sources.entries()) {
+ const where = `/components/${componentIndex}/sources/${sourceIndex}/path`;
+ const source = {
+ path: verifiedSourcePath(authored.path, where),
+ ...(authored.line ? { line: authored.line } : {}),
+ ...(authored.end_line ? { endLine: authored.end_line } : {}),
+ ...(authored.label ? { label: authored.label } : {}),
+ };
+ if (source.endLine && !source.line) {
+ throw new Error(`/components/${componentIndex}/sources/${sourceIndex}/end_line requires line.`);
+ }
+ if (source.endLine && source.endLine < source.line) {
+ throw new Error(`/components/${componentIndex}/sources/${sourceIndex}/end_line must be greater than or equal to line.`);
+ }
+ const object = `${revision}:${source.path}`;
+ const type = runGit(realRoot, ['cat-file', '-t', object]);
+ if (type.status !== 0 || type.stdout.trim() !== 'blob') {
+ throw new Error(`${where} does not identify a file at revision ${revision}.`);
+ }
+ if (source.line) {
+ const content = runGit(realRoot, ['show', object]);
+ if (content.status !== 0) throw new Error(`${where} could not be read at revision ${revision}.`);
+ const lineCount = sourceLineCount(content.stdout);
+ const requestedLine = source.endLine || source.line;
+ if (requestedLine > lineCount) {
+ throw new Error(`/components/${componentIndex}/sources/${sourceIndex} requests line ${requestedLine}, but ${source.path} has ${lineCount} lines at revision ${revision}.`);
+ }
+ }
+ verified.push({ ...source, href: sourceHref(repository.url.replace(/\.git\/?$/i, '').replace(/\/$/, ''), revision, source) });
+ referenceCount += 1;
+ }
+ nodes[component.id] = verified;
+ }
+ if (referenceCount === 0) {
+ throw new Error('/meta/repository requires at least one component source reference.');
+ }
+
+ return {
+ schemaVersion: 1,
+ verified: true,
+ repository: {
+ url: repository.url.replace(/\.git\/?$/i, '').replace(/\/$/, ''),
+ revision,
+ shortRevision: revision.slice(0, 7),
+ },
+ referenceCount,
+ nodes,
+ };
+}
diff --git a/archify/renderers/shared/utils.mjs b/archify/renderers/shared/utils.mjs
index 8b1d5164..a79196d9 100644
--- a/archify/renderers/shared/utils.mjs
+++ b/archify/renderers/shared/utils.mjs
@@ -101,6 +101,7 @@ ${card.items.map((item) => ` <li>&bull; ${esc(item)}</li>`).join('\n')}
const SVG_SLOT_RE = / <!-- ARCHIFY:SVG_SLOT_START -->[\s\S]*? <!-- ARCHIFY:SVG_SLOT_END -->/;
const CARDS_SLOT_RE = / <!-- ARCHIFY:CARDS_SLOT_START -->[\s\S]*? <!-- ARCHIFY:CARDS_SLOT_END -->/;
const GUIDED_VIEWS_PLACEHOLDER = '<!-- ARCHIFY:GUIDED_VIEWS_DATA -->';
+const SOURCE_EVIDENCE_PLACEHOLDER = ' <!-- ARCHIFY:SOURCE_EVIDENCE_DATA -->';
const TEMPLATE_PLACEHOLDERS = [
'<html lang="en" data-theme="dark" data-preset="[VISUAL PRESET]">',
@@ -113,7 +114,7 @@ const TEMPLATE_PLACEHOLDERS = [
// `footer` is injected as raw HTML so callers can embed <kbd> hints;
// pass only trusted strings here, never user input.
-export function applyTemplate(template, { title, subtitle, footer, svg, cards, visualPreset = 'classic', guidedViews = [] }) {
+export function applyTemplate(template, { title, subtitle, footer, svg, cards, visualPreset = 'classic', guidedViews = [], sourceEvidence = null }) {
if (!SVG_SLOT_RE.test(template)) {
throw new Error('applyTemplate: template missing ARCHIFY:SVG_SLOT sentinel');
}
@@ -125,12 +126,22 @@ export function applyTemplate(template, { title, subtitle, footer, svg, cards, v
throw new Error(`applyTemplate: template missing placeholder ${JSON.stringify(ph)}`);
}
}
+ // Keep existing custom templates compatible when evidence is not requested.
+ // Silently dropping verified evidence would be misleading, so the new slot
+ // becomes mandatory only for the opt-in evidence path.
+ if (sourceEvidence && !template.includes(SOURCE_EVIDENCE_PLACEHOLDER)) {
+ throw new Error(`applyTemplate: repository evidence requires placeholder ${JSON.stringify(SOURCE_EVIDENCE_PLACEHOLDER)}`);
+ }
// Function replacers: a literal `$&`, `$'`, `$\`` or `$$` in titles, labels,
// or rendered SVG must not be interpreted as a replacement pattern.
const guidedViewsJson = JSON.stringify(guidedViews)
.replaceAll('<', '\\u003c')
.replaceAll('>', '\\u003e')
.replaceAll('&', '\\u0026');
+ const sourceEvidenceJson = JSON.stringify(sourceEvidence)
+ .replaceAll('<', '\\u003c')
+ .replaceAll('>', '\\u003e')
+ .replaceAll('&', '\\u0026');
return template
.replace(TEMPLATE_PLACEHOLDERS[0], () => `<html lang="en" data-theme="dark" data-preset="${esc(visualPreset)}">`)
.replace(TEMPLATE_PLACEHOLDERS[1], () => `<title>${esc(title)} Diagram</title>`)
@@ -139,7 +150,10 @@ export function applyTemplate(template, { title, subtitle, footer, svg, cards, v
.replace(SVG_SLOT_RE, () => svg)
.replace(CARDS_SLOT_RE, () => cards)
.replace(TEMPLATE_PLACEHOLDERS[4], () => footer)
- .replace(GUIDED_VIEWS_PLACEHOLDER, () => `<script id="archify-guided-views-data" type="application/json">${guidedViewsJson}</script>`);
+ .replace(GUIDED_VIEWS_PLACEHOLDER, () => `<script id="archify-guided-views-data" type="application/json">${guidedViewsJson}</script>`)
+ .replace(SOURCE_EVIDENCE_PLACEHOLDER, () => sourceEvidence
+ ? ` <script id="archify-source-evidence-data" type="application/json">${sourceEvidenceJson}</script>`
+ : '');
}
// CJK and other wide/fullwidth glyphs render at roughly twice the advance
diff --git a/archify/schemas/README.md b/archify/schemas/README.md
index 433f2164..286e9b14 100644
--- a/archify/schemas/README.md
+++ b/archify/schemas/README.md
@@ -75,6 +75,15 @@ express cleanly here: duplicate view IDs, duplicate focus IDs, focus IDs that do
not exist in the diagram's semantic collection, and duplicate authored
relationship IDs within the mode's relationship collection.
+Architecture additionally supports opt-in, revision-pinned repository evidence.
+`meta.repository` names a public GitHub URL and full commit SHA; a component may
+carry one to three `sources` with repo-relative POSIX paths, optional line
+ranges, and optional labels. Shape is schema-checked, then the renderer requires
+`--repo-root`: the local Git origin must match, and Git must prove the commit,
+blobs, and requested lines. Verified evidence is embedded outside the canonical
+SVG for the Semantic Passport and Node Finder; ordinary documents and visual
+exports carry no repository evidence.
+
`npm test` runs the generator in check mode and fails when the committed
validators drift from their schemas.
diff --git a/archify/schemas/architecture.schema.json b/archify/schemas/architecture.schema.json
index 3bac19c3..b7f83fd5 100644
--- a/archify/schemas/architecture.schema.json
+++ b/archify/schemas/architecture.schema.json
@@ -19,6 +19,18 @@
"animation": { "enum": ["trace", "none"] },
"visual_preset": { "enum": ["classic", "signal-flow", "blueprint"] },
"quality_profile": { "enum": ["standard", "showcase"] },
+ "repository": {
+ "type": "object",
+ "additionalProperties": false,
+ "required": ["url", "revision"],
+ "properties": {
+ "url": {
+ "type": "string",
+ "pattern": "^https://github\\.com/[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+(?:\\.git)?/?$"
+ },
+ "revision": { "type": "string", "pattern": "^[a-fA-F0-9]{40}$" }
+ }
+ },
"views": { "$ref": "common.schema.json#/$defs/guidedViews" },
"viewBox": {
"type": "array",
@@ -59,6 +71,22 @@
"label": { "type": "string", "minLength": 1 },
"sublabel": { "type": "string" },
"tag": { "type": "string" },
+ "sources": {
+ "type": "array",
+ "minItems": 1,
+ "maxItems": 3,
+ "items": {
+ "type": "object",
+ "additionalProperties": false,
+ "required": ["path"],
+ "properties": {
+ "path": { "type": "string", "minLength": 1, "maxLength": 240 },
+ "line": { "type": "integer", "minimum": 1 },
+ "end_line": { "type": "integer", "minimum": 1 },
+ "label": { "type": "string", "minLength": 1, "maxLength": 48 }
+ }
+ }
+ },
"row": { "type": "integer", "minimum": 0 },
"col": { "type": "integer", "minimum": 0 },
"pos": { "$ref": "common.schema.json#/$defs/point" },
diff --git a/archify/test/finder.test.mjs b/archify/test/finder.test.mjs
index ee46d545..4a38ef52 100644
--- a/archify/test/finder.test.mjs
+++ b/archify/test/finder.test.mjs
@@ -46,7 +46,7 @@ test('all typed renderers ship the same geometry-neutral node finder', () => {
test('finder searches semantic ids and labels, then delegates to focus and reveal', () => {
const html = render('architecture', CASES.architecture);
- assert.match(html, /search: \(id \+ ' ' \+ label \+ ' ' \+ type \+ ' ' \+ sublabel \+ ' ' \+ context \+ ' ' \+ tag \+ ' ' \+ text\)\.toLowerCase\(\)/);
+ assert.match(html, /search: \(id \+ ' ' \+ label \+ ' ' \+ type \+ ' ' \+ sublabel \+ ' ' \+ context \+ ' ' \+ tag \+ ' ' \+ sourceSearch \+ ' ' \+ text\)\.toLowerCase\(\)/);
assert.match(html, /item\.search\.indexOf\(query\) !== -1/);
assert.match(html, /Archify\.guidedViews\.showAll\(\{ clearFocus: false, updateUrl: false \}\)/);
assert.match(html, /Archify\.view\.reset\(\{ automatic: true \}\)/);
diff --git a/archify/test/geometry.test.mjs b/archify/test/geometry.test.mjs
index 4cc0be15..046561ed 100644
--- a/archify/test/geometry.test.mjs
+++ b/archify/test/geometry.test.mjs
@@ -582,3 +582,21 @@ test('applyTemplate preserves dollar sequences in titles', () => {
});
assert.match(html, /Plan \$\$50 tier/);
});
+
+test('applyTemplate requires the new evidence slot only when evidence is present', () => {
+ const legacyTemplate = `<html lang="en" data-theme="dark" data-preset="[VISUAL PRESET]">
+<title>[PROJECT NAME] Architecture Diagram</title>
+<h1>[PROJECT NAME] Architecture</h1>
+<p class="subtitle">[Subtitle description]</p>
+<!-- ARCHIFY:GUIDED_VIEWS_DATA -->
+ <!-- ARCHIFY:SVG_SLOT_START --><svg></svg> <!-- ARCHIFY:SVG_SLOT_END -->
+ <!-- ARCHIFY:CARDS_SLOT_START --><div></div> <!-- ARCHIFY:CARDS_SLOT_END -->
+[Project Name] &bull; [Additional metadata]`;
+ assert.doesNotThrow(() => applyTemplate(legacyTemplate, {
+ title: 'Legacy', subtitle: '', footer: '', svg: '<svg/>', cards: '',
+ }));
+ assert.throws(() => applyTemplate(legacyTemplate, {
+ title: 'Evidence', subtitle: '', footer: '', svg: '<svg/>', cards: '',
+ sourceEvidence: { verified: true },
+ }), /repository evidence requires placeholder/);
+});
diff --git a/archify/test/repository-evidence.test.mjs b/archify/test/repository-evidence.test.mjs
new file mode 100644
index 00000000..75a0d85a
--- /dev/null
+++ b/archify/test/repository-evidence.test.mjs
@@ -0,0 +1,196 @@
+import assert from 'node:assert/strict';
+import { execFileSync, spawnSync } from 'node:child_process';
+import fs from 'node:fs';
+import os from 'node:os';
+import path from 'node:path';
+import test from 'node:test';
+import { fileURLToPath } from 'node:url';
+import { startPreview } from '../bin/preview.mjs';
+
+const here = path.dirname(fileURLToPath(import.meta.url));
+const skillRoot = path.resolve(here, '..');
+const cli = path.join(skillRoot, 'bin', 'archify.mjs');
+
+function git(repo, ...args) {
+ return execFileSync('git', ['-C', repo, ...args], { encoding: 'utf8' }).trim();
+}
+
+function fixture() {
+ const root = fs.mkdtempSync(path.join(os.tmpdir(), 'archify-evidence-repo-'));
+ fs.mkdirSync(path.join(root, 'src'), { recursive: true });
+ fs.writeFileSync(path.join(root, 'src', 'router.js'), 'export function route(input) {\n return input.kind;\n}\n');
+ fs.writeFileSync(path.join(root, 'src', 'store.js'), 'export const store = new Map();\n');
+ git(root, 'init');
+ git(root, 'config', 'user.name', 'Archify Tests');
+ git(root, 'config', 'user.email', '[email protected]');
+ git(root, 'remote', 'add', 'origin', '[email protected]:example/evidence-repo.git');
+ git(root, 'add', '.');
+ git(root, 'commit', '-m', 'fixture');
+ const revision = git(root, 'rev-parse', 'HEAD');
+
+ const diagram = JSON.parse(fs.readFileSync(path.join(skillRoot, 'examples', 'web-app.architecture.json'), 'utf8'));
+ diagram.meta.repository = {
+ url: 'https://github.com/example/evidence-repo',
+ revision,
+ };
+ diagram.components[0].sources = [
+ { path: 'src/router.js', line: 1, end_line: 3, label: 'Request router' },
+ { path: 'src/store.js', line: 1 },
+ ];
+ const input = path.join(root, 'diagram.architecture.json');
+ fs.writeFileSync(input, JSON.stringify(diagram, null, 2));
+ return { root, revision, diagram, input };
+}
+
+function run(args) {
+ return spawnSync(process.execPath, [cli, ...args], {
+ cwd: skillRoot,
+ encoding: 'utf8',
+ });
+}
+
+function evidencePayload(html) {
+ const match = html.match(/<script id="archify-source-evidence-data" type="application\/json">([\s\S]*?)<\/script>/);
+ assert.ok(match, 'verified evidence payload missing');
+ return JSON.parse(match[1]);
+}
+
+async function waitForState(url, predicate, timeoutMs = 12000) {
+ const started = Date.now();
+ let latest;
+ while (Date.now() - started < timeoutMs) {
+ latest = await (await fetch(new URL('/state', url))).json();
+ if (predicate(latest)) return latest;
+ await new Promise((resolve) => setTimeout(resolve, 40));
+ }
+ assert.fail(`preview did not settle; latest state: ${JSON.stringify(latest)}`);
+}
+
+test('repository evidence is revision-verified, receipt-backed, searchable, and export-clean', () => {
+ const data = fixture();
+ const output = path.join(data.root, 'verified.html');
+ const result = run(['deliver', 'architecture', data.input, output, '--repo-root', data.root, '--json']);
+ assert.equal(result.status, 0, result.stderr || result.stdout);
+
+ const receipt = JSON.parse(result.stdout);
+ assert.deepEqual(receipt.evidence, {
+ verified: true,
+ repository: 'https://github.com/example/evidence-repo',
+ revision: data.revision,
+ references: 2,
+ });
+
+ const html = fs.readFileSync(output, 'utf8');
+ const evidence = evidencePayload(html);
+ assert.equal(evidence.verified, true);
+ assert.equal(evidence.repository.shortRevision, data.revision.slice(0, 7));
+ assert.equal(evidence.nodes.users.length, 2);
+ assert.equal(evidence.nodes.users[0].href, `https://github.com/example/evidence-repo/blob/${data.revision}/src/router.js#L1-L3`);
+ assert.match(html, /Verified source/);
+ assert.match(html, /Archify\.sourceEvidence = \(function \(\)/);
+ assert.match(html, /var sourceSearch = sources\.map/);
+ assert.match(html, /renderSourceEvidence\(id\)/);
+ assert.match(html, /referrerPolicy = 'no-referrer'/);
+
+ const svg = html.match(/<svg\b[\s\S]*?<\/svg>/)?.[0] || '';
+ assert.doesNotMatch(svg, /src\/router\.js|github\.com\/example\/evidence-repo|source-evidence/);
+});
+
+test('repository evidence is opt-in and never appears in ordinary artifacts', () => {
+ const output = path.join(fs.mkdtempSync(path.join(os.tmpdir(), 'archify-no-evidence-')), 'plain.html');
+ const input = path.join(skillRoot, 'examples', 'web-app.architecture.json');
+ const result = run(['render', 'architecture', input, output]);
+ assert.equal(result.status, 0, result.stderr);
+ const html = fs.readFileSync(output, 'utf8');
+ assert.doesNotMatch(html, /id="archify-source-evidence-data"/);
+ assert.match(html, /id="focus-evidence" hidden/);
+});
+
+test('evidence fails closed without a root, on wrong origin, missing blobs, or impossible lines', () => {
+ const data = fixture();
+ const output = path.join(data.root, 'must-stay.html');
+ fs.writeFileSync(output, 'trusted previous artifact');
+
+ let result = run(['deliver', 'architecture', data.input, output, '--json']);
+ assert.equal(result.status, 1);
+ assert.equal(JSON.parse(result.stdout).stage, 'render');
+ assert.match(JSON.parse(result.stdout).error, /Pass --repo-root/);
+ assert.equal(fs.readFileSync(output, 'utf8'), 'trusted previous artifact');
+
+ git(data.root, 'remote', 'set-url', 'origin', 'https://github.com/example/other-repo.git');
+ result = run(['deliver', 'architecture', data.input, output, '--repo-root', data.root, '--json']);
+ assert.equal(result.status, 1);
+ assert.match(JSON.parse(result.stdout).error, /does not match/);
+ git(data.root, 'remote', 'set-url', 'origin', '[email protected]:example/evidence-repo.git');
+
+ data.diagram.components[0].sources = [{ path: '../outside.js' }];
+ fs.writeFileSync(data.input, JSON.stringify(data.diagram));
+ result = run(['deliver', 'architecture', data.input, output, '--repo-root', data.root, '--json']);
+ assert.equal(result.status, 1);
+ assert.match(JSON.parse(result.stdout).error, /must stay inside the repository/);
+
+ data.diagram.components[0].sources = [{ path: 'src/router.js\n' }];
+ fs.writeFileSync(data.input, JSON.stringify(data.diagram));
+ result = run(['deliver', 'architecture', data.input, output, '--repo-root', data.root, '--json']);
+ assert.equal(result.status, 1);
+ assert.match(JSON.parse(result.stdout).error, /repo-relative POSIX path/);
+
+ data.diagram.components[0].sources = [{ path: 'src/missing.js' }];
+ fs.writeFileSync(data.input, JSON.stringify(data.diagram));
+ result = run(['deliver', 'architecture', data.input, output, '--repo-root', data.root, '--json']);
+ assert.equal(result.status, 1);
+ assert.match(JSON.parse(result.stdout).error, /does not identify a file/);
+
+ data.diagram.components[0].sources = [{ path: 'src/router.js', line: 99 }];
+ fs.writeFileSync(data.input, JSON.stringify(data.diagram));
+ result = run(['deliver', 'architecture', data.input, output, '--repo-root', data.root, '--json']);
+ assert.equal(result.status, 1);
+ assert.match(JSON.parse(result.stdout).error, /requests line 99/);
+
+ data.diagram.components[0].sources = [{ path: 'src/router.js', line: 4 }];
+ fs.writeFileSync(data.input, JSON.stringify(data.diagram));
+ result = run(['deliver', 'architecture', data.input, output, '--repo-root', data.root, '--json']);
+ assert.equal(result.status, 1);
+ assert.match(JSON.parse(result.stdout).error, /has 3 lines/);
+ assert.equal(fs.readFileSync(output, 'utf8'), 'trusted previous artifact');
+});
+
+test('--repo-root stays bounded to architecture and schema limits evidence shape', () => {
+ const data = fixture();
+ let result = run(['render', 'workflow', path.join(skillRoot, 'examples', 'agent-tool-call.workflow.json'), '--repo-root', data.root]);
+ assert.equal(result.status, 2);
+ assert.match(result.stderr, /architecture diagrams only/);
+
+ data.diagram.components[0].sources = [
+ { path: 'src/router.js' },
+ { path: 'src/router.js' },
+ { path: 'src/router.js' },
+ { path: 'src/router.js' },
+ ];
+ fs.writeFileSync(data.input, JSON.stringify(data.diagram));
+ result = run(['validate', 'architecture', data.input, '--repo-root', data.root]);
+ assert.equal(result.status, 1);
+ assert.match(result.stderr, /must NOT have more than 3 items/);
+});
+
+test('live preview forwards repo-root and publishes only verified evidence', { timeout: 20000 }, async () => {
+ const data = fixture();
+ const output = path.join(data.root, 'preview.html');
+ const preview = await startPreview({
+ type: 'architecture',
+ input: data.input,
+ output,
+ repoRoot: data.root,
+ open: false,
+ debounceMs: 30,
+ pollMs: 60,
+ });
+ try {
+ const state = await waitForState(preview.url, (candidate) => candidate.status === 'verified');
+ assert.equal(state.revision, 1);
+ const html = await (await fetch(new URL('/artifact.html', preview.url))).text();
+ assert.equal(evidencePayload(html).repository.revision, data.revision);
+ } finally {
+ await preview.stop();
+ }
+});
diff --git a/archify/test/semantic-passport.test.mjs b/archify/test/semantic-passport.test.mjs
index 067e0497..df40b595 100644
--- a/archify/test/semantic-passport.test.mjs
+++ b/archify/test/semantic-passport.test.mjs
@@ -85,7 +85,7 @@ test('Node Finder searches and presents the same passport facts', () => {
assert.match(html, /var sublabel = node\.getAttribute\('data-node-sublabel'\) \|\| ''/);
assert.match(html, /var context = node\.getAttribute\('data-node-context'\) \|\| ''/);
assert.match(html, /var tag = node\.getAttribute\('data-node-tag'\) \|\| ''/);
- assert.match(html, /search: \(id \+ ' ' \+ label \+ ' ' \+ type \+ ' ' \+ sublabel \+ ' ' \+ context \+ ' ' \+ tag \+ ' ' \+ text\)\.toLowerCase\(\)/);
+ assert.match(html, /search: \(id \+ ' ' \+ label \+ ' ' \+ type \+ ' ' \+ sublabel \+ ' ' \+ context \+ ' ' \+ tag \+ ' ' \+ sourceSearch \+ ' ' \+ text\)\.toLowerCase\(\)/);
assert.match(html, /\[item\.type, item\.id, item\.sublabel, item\.tag\]\.filter\(Boolean\)\.join\(' \\u00b7 '\)/);
assert.match(html, /meta\.title = \[item\.type, item\.id, item\.context, item\.sublabel, item\.tag\]\.filter\(Boolean\)\.join\(' \\u00b7 '\)/);
});
diff --git a/docs/assets/archify-live-proof.gif b/docs/assets/archify-live-proof.gif
index bf0e1ab4..7f2d4566 100644
Binary files a/docs/assets/archify-live-proof.gif and b/docs/assets/archify-live-proof.gif differ
diff --git a/docs/assets/archify-live-proof.json b/docs/assets/archify-live-proof.json
index f44b9b1a..a54d289f 100644
--- a/docs/assets/archify-live-proof.json
+++ b/docs/assets/archify-live-proof.json
@@ -7,13 +7,13 @@
"fps": 10,
"frameCount": 54,
"durationSeconds": 5.4,
- "bytes": 1585315,
- "sha256": "37792f4749d7b3aef8c9d914669f4ab89785c0237688ffb0ed8ea8aeeb55bd42",
+ "bytes": 1702853,
+ "sha256": "29cdc49abd4669694c24f88f8293d5196d9ba2d157c479c81708b16615c72824",
"scenes": [
{
"id": "signal-flow",
"artifact": "docs/gallery/artifacts/agent-tool-call.workflow.html",
- "artifactSha256": "5c43a0ab01c71246f1d5456c83e2ded3bc22b69c3d07d21a3c2d239e47844093",
+ "artifactSha256": "1e9cc73669e2c164794a5ec4541643fc2f33668a3050aaba6718bae44c98ca7d",
"view": "happy-path",
"eyebrow": "WORKFLOW · SIGNAL FLOW",
"title": "Agent Tool Call",
@@ -22,7 +22,7 @@
{
"id": "blueprint",
"artifact": "docs/gallery/artifacts/production-deployment.architecture.html",
- "artifactSha256": "3274690d0ead342d5becbc393cdb875622c64cd9fc1207aa26056bceb4cfd701",
+ "artifactSha256": "47493c9094bf3f9490680c26e52d252ac2ccfacb8c88946751f054cdeddb4491",
"view": "request-boundary",
"eyebrow": "ARCHITECTURE · BLUEPRINT",
"title": "Production Deployment",
@@ -31,7 +31,7 @@
{
"id": "classic",
"artifact": "docs/gallery/artifacts/cache-miss.sequence.html",
- "artifactSha256": "e7389ac65fe931fdf4b1e2884417d4b28993782a03f7c58c54ed4c94e0024ea7",
+ "artifactSha256": "cf31805f2e1646457102c9c9820c7bb43564ca803ce02f88f0acd11be8216191",
"view": "cache-fallback",
"eyebrow": "SEQUENCE · CLASSIC",
"title": "Cache Miss Request",
diff --git a/docs/cases/mco-runtime.architecture.html b/docs/cases/mco-runtime.architecture.html
index 336bfaa6..27ec4682 100644
--- a/docs/cases/mco-runtime.architecture.html
+++ b/docs/cases/mco-runtime.architecture.html
@@ -1420,6 +1420,88 @@
.semantic-passport-meta [hidden] { display: none; }
html[data-preset="blueprint"] .semantic-passport-meta span,
html[data-preset="blueprint"] .semantic-passport-meta code { border-radius: 0.1rem; }
+ .semantic-passport-evidence {
+ margin-top: 0.52rem;
+ padding: 0.5rem;
+ border: 1px solid color-mix(in srgb, var(--backend-stroke) 32%, var(--toolbar-border));
+ border-radius: 0.55rem;
+ background: color-mix(in srgb, var(--backend-fill) 18%, var(--panel));
+ }
+ .semantic-passport-evidence[hidden] { display: none; }
+ html[data-preset="blueprint"] .semantic-passport-evidence { border-radius: 0.18rem; }
+ .semantic-passport-evidence-head {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.55rem;
+ margin-bottom: 0.35rem;
+ }
+ .semantic-passport-evidence-status {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.28rem;
+ color: var(--backend-stroke);
+ font-size: 0.5rem;
+ font-weight: 800;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ }
+ .semantic-passport-evidence-status::before {
+ content: '';
+ width: 0.38rem;
+ height: 0.38rem;
+ border-radius: 50%;
+ background: var(--backend-stroke);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--backend-stroke) 14%, transparent);
+ }
+ .semantic-passport-repository {
+ min-width: 0;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-decoration: none;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-repository:hover,
+ .semantic-passport-repository:focus-visible { color: var(--backend-stroke); }
+ .semantic-passport-evidence-links { display: grid; gap: 0.22rem; }
+ .semantic-passport-source {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) auto;
+ gap: 0.15rem 0.45rem;
+ align-items: center;
+ padding: 0.34rem 0.4rem;
+ border: 1px solid transparent;
+ border-radius: 0.38rem;
+ color: var(--text-muted);
+ text-decoration: none;
+ }
+ .semantic-passport-source:hover,
+ .semantic-passport-source:focus-visible {
+ border-color: color-mix(in srgb, var(--backend-stroke) 42%, transparent);
+ background: color-mix(in srgb, var(--backend-fill) 32%, transparent);
+ color: var(--text);
+ }
+ .semantic-passport-source strong {
+ overflow: hidden;
+ font-size: 0.5625rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-source code {
+ color: var(--backend-stroke);
+ font: inherit;
+ font-size: 0.5rem;
+ }
+ .semantic-passport-source small {
+ grid-column: 1 / -1;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
.relationship-lens-summary {
display: block;
margin-top: 0.12rem;
@@ -3841,6 +3923,7 @@
</div>
<script id="archify-guided-views-data" type="application/json">[{"id":"dispatch-path","label":"Dispatch path","focus":["callers","entry","router","policy","workflow","adapters","provider_clis"],"note":"An explicit provider team crosses one validated execution-policy boundary before MCO starts parallel work."},{"id":"answer-evidence","label":"Answer evidence","focus":["adapters","answer_transport","artifacts","consumers"],"note":"Provider output is decoded and persisted without turning raw answers into an automatic decision."},{"id":"durable-sessions","label":"Durable sessions","focus":["router","session_daemon","session_state"],"note":"Detached local workers use Unix sockets plus state.json and history.jsonl for resumable sessions."}]</script>
+
<div class="guided-views no-print" id="guided-views" hidden aria-label="Guided diagram views">
<button id="guided-view-prev" type="button" aria-label="Previous guided view" title="Previous guided view ([)">&#8592;</button>
<div class="guided-view-copy">
@@ -4238,6 +4321,13 @@
<span id="focus-tag" data-passport="tag" hidden></span>
<code id="focus-id" data-passport="id"></code>
</div>
+ <div class="semantic-passport-evidence" id="focus-evidence" hidden aria-label="Verified source evidence">
+ <div class="semantic-passport-evidence-head">
+ <span class="semantic-passport-evidence-status">Verified source</span>
+ <a class="semantic-passport-repository" id="focus-repository" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer"></a>
+ </div>
+ <div class="semantic-passport-evidence-links" id="focus-evidence-links"></div>
+ </div>
<span class="relationship-lens-summary" id="focus-summary" aria-live="polite"></span>
</div>
<div class="relationship-lens-actions">
@@ -5991,6 +6081,29 @@
};
})();
+ /* Verified repository evidence is emitted only after the renderer checks
+ the authored GitHub revision, source blobs, and optional line ranges
+ against the explicit --repo-root. It remains outside the SVG so every
+ canonical visual export stays free of repository paths. */
+ Archify.sourceEvidence = (function () {
+ var element = document.getElementById('archify-source-evidence-data');
+ var payload = null;
+ if (element) {
+ try {
+ var parsed = JSON.parse(element.textContent || 'null');
+ if (parsed && parsed.verified === true && parsed.repository && parsed.nodes) payload = parsed;
+ } catch (_) {}
+ }
+ return {
+ available: function () { return Boolean(payload); },
+ repository: function () { return payload ? payload.repository : null; },
+ node: function (id) {
+ var sources = payload && payload.nodes ? payload.nodes[id] : null;
+ return Array.isArray(sources) ? sources.slice() : [];
+ }
+ };
+ })();
+
/* ============================================================
Explore — stable-ID neighborhood focus + dependency-free pan/zoom.
Renderer IDs become deep-linkable semantic hooks without turning the
@@ -6007,6 +6120,9 @@
var context = document.getElementById('focus-context');
var tag = document.getElementById('focus-tag');
var semanticId = document.getElementById('focus-id');
+ var evidence = document.getElementById('focus-evidence');
+ var repositoryLink = document.getElementById('focus-repository');
+ var evidenceLinks = document.getElementById('focus-evidence-links');
var summary = document.getElementById('focus-summary');
var relationshipList = document.getElementById('relationship-lens-list');
var copyBtn = document.getElementById('btn-focus-copy');
@@ -6039,6 +6155,43 @@
element.textContent = normalized;
element.hidden = !normalized;
}
+ function renderSourceEvidence(id) {
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
+ var sources = Archify.sourceEvidence.node(id);
+ var repository = Archify.sourceEvidence.repository();
+ if (!repository || !sources.length) {
+ evidence.hidden = true;
+ return;
+ }
+ var slug = repository.url.replace(/^https:\/\/github\.com\//, '').replace(/\/$/, '');
+ repositoryLink.href = repository.url + '/tree/' + repository.revision;
+ repositoryLink.textContent = slug + ' @ ' + repository.shortRevision;
+ repositoryLink.setAttribute('aria-label', 'Open verified repository revision ' + repository.revision);
+ sources.forEach(function (source) {
+ var link = document.createElement('a');
+ link.className = 'semantic-passport-source';
+ link.href = source.href;
+ link.target = '_blank';
+ link.rel = 'noopener noreferrer';
+ link.referrerPolicy = 'no-referrer';
+ link.setAttribute('aria-label', 'Open verified source ' + source.path + ' at revision ' + repository.shortRevision);
+ var name = document.createElement('strong');
+ name.textContent = source.label || source.path.split('/').pop() || source.path;
+ var location = document.createElement('code');
+ location.textContent = source.line
+ ? 'L' + source.line + (source.endLine && source.endLine !== source.line ? '–' + source.endLine : '') + ' ↗'
+ : 'Open ↗';
+ var sourcePath = document.createElement('small');
+ sourcePath.textContent = source.path;
+ link.appendChild(name);
+ link.appendChild(location);
+ link.appendChild(sourcePath);
+ evidenceLinks.appendChild(link);
+ });
+ evidence.hidden = false;
+ }
function renderPassport(id, node) {
setPassportValue(detail, node.getAttribute('data-node-sublabel'));
setPassportValue(kind, node.getAttribute('data-node-kind') || 'node');
@@ -6046,6 +6199,7 @@
setPassportValue(tag, node.getAttribute('data-node-tag'));
semanticId.textContent = id;
semanticId.hidden = false;
+ renderSourceEvidence(id);
}
function relationshipsFor(id, byId) {
var seen = {};
@@ -6725,6 +6879,10 @@
tag.hidden = true;
semanticId.textContent = '';
semanticId.hidden = true;
+ evidence.hidden = true;
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
summary.textContent = '';
relationshipList.textContent = '';
copyBtn.textContent = 'Copy link';
@@ -9746,6 +9904,10 @@
var context = node.getAttribute('data-node-context') || '';
var tag = node.getAttribute('data-node-tag') || '';
var type = semanticType(node);
+ var sources = Archify.sourceEvidence.node(id);
+ var sourceSearch = sources.map(function (source) {
+ return [source.path, source.label, source.line, source.endLine].filter(Boolean).join(' ');
+ }).join(' ');
return {
id: id,
label: label,
@@ -9753,8 +9915,9 @@
sublabel: sublabel,
context: context,
tag: tag,
+ sources: sources,
links: connectionsFor(id),
- search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + text).toLowerCase(),
+ search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + sourceSearch + ' ' + text).toLowerCase(),
node: node
};
});
diff --git a/docs/gallery.html b/docs/gallery.html
index f57b23a3..beabd3b7 100644
--- a/docs/gallery.html
+++ b/docs/gallery.html
@@ -324,7 +324,7 @@
<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div>
<div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div>
<div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">12N · 11E</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="5c43a0ab01c71246f1d5456c83e2ded3bc22b69c3d07d21a3c2d239e47844093">5c43a0ab01c7</span></div>
+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="1e9cc73669e2c164794a5ec4541643fc2f33668a3050aaba6718bae44c98ca7d">1e9cc73669e2</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/agent-tool-call.workflow.html?present=1&amp;play=1#view=happy-path" target="_blank" rel="noopener" data-en="Play named chapter ↗" data-zh="播放命名章节 ↗">Play named chapter ↗</a>
@@ -352,7 +352,7 @@
<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div>
<div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div>
<div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">12N · 12E</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="3274690d0ead342d5becbc393cdb875622c64cd9fc1207aa26056bceb4cfd701">3274690d0ead</span></div>
+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="47493c9094bf3f9490680c26e52d252ac2ccfacb8c88946751f054cdeddb4491">47493c9094bf</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/production-deployment.architecture.html?present=1&amp;play=1#view=request-boundary" target="_blank" rel="noopener" data-en="Play named chapter ↗" data-zh="播放命名章节 ↗">Play named chapter ↗</a>
@@ -380,7 +380,7 @@
<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div>
<div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div>
<div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">7N · 12E</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="e7389ac65fe931fdf4b1e2884417d4b28993782a03f7c58c54ed4c94e0024ea7">e7389ac65fe9</span></div>
+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="cf31805f2e1646457102c9c9820c7bb43564ca803ce02f88f0acd11be8216191">cf31805f2e16</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/cache-miss.sequence.html?present=1&amp;play=1#view=cache-fallback" target="_blank" rel="noopener" data-en="Play named chapter ↗" data-zh="播放命名章节 ↗">Play named chapter ↗</a>
@@ -408,7 +408,7 @@
<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div>
<div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div>
<div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">10N · 10E</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="69e46e690349a1f7246da03fda8203e7408ae78fe31b58fbd5ffbfa077798238">69e46e690349</span></div>
+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="69efaaeadb260286252f7099dcaf6c87d456a11dab663ea8c7dcd56e9d870d82">69efaaeadb26</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/release-delivery.workflow.html?present=1&amp;play=1#view=approval-to-production" target="_blank" rel="noopener" data-en="Play named chapter ↗" data-zh="播放命名章节 ↗">Play named chapter ↗</a>
@@ -436,7 +436,7 @@
<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div>
<div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div>
<div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">11N · 10E</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="3e2cb119d619870cd7b0d0a7fbcb8bc28203fdf1fc6f6b0736fbf0656ff3e741">3e2cb119d619</span></div>
+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="28d5bd0b40a69f1d1bee30ba0bd7731cd77d34c75d1f1695b1645bcdb75bf649">28d5bd0b40a6</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/incident-response.workflow.html?present=1&amp;play=1#view=mitigate-and-verify" target="_blank" rel="noopener" data-en="Play named chapter ↗" data-zh="播放命名章节 ↗">Play named chapter ↗</a>
@@ -464,7 +464,7 @@
<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div>
<div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div>
<div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">10N · 10E</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="9b9e2540f2c2564132bfc8a1d2aa925d4c67e10abef09316990c87487a486dd8">9b9e2540f2c2</span></div>
+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="90b1e36a2349ff984629d803d12d8c8b3ac7707e0981733bb29ddc5044a76c36">90b1e36a2349</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/product-analytics.dataflow.html?present=1&amp;play=1#view=consent-boundary" target="_blank" rel="noopener" data-en="Play named chapter ↗" data-zh="播放命名章节 ↗">Play named chapter ↗</a>
@@ -492,7 +492,7 @@
<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div>
<div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div>
<div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">7N · 14E</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="893d6bc5ee7a0f512dfecc6cae28e300ba0b3288c5287b66ee61934e70f0e7fd">893d6bc5ee7a</span></div>
+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="09361c5cab0a63c01896ea8f719c0b2f4612dbddec847d6a54064e844a8d434c">09361c5cab0a</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/async-job-roundtrip.sequence.html?present=1&amp;play=1#view=work-and-retry" target="_blank" rel="noopener" data-en="Play named chapter ↗" data-zh="播放命名章节 ↗">Play named chapter ↗</a>
@@ -520,7 +520,7 @@
<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div>
<div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div>
<div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">12N · 12E</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="a7db3af4cbc78cb319f2fba4bb82382a2b54afe92a5cef3ced2c9a0e70d3c9aa">a7db3af4cbc7</span></div>
+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="28cfb49400b3ff96d7d4a6ebd97bae32cfdf8f86597a2ef33f90fec808ae2738">28cfb49400b3</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/event-stream.dataflow.html?present=1&amp;play=1#view=order-transit" target="_blank" rel="noopener" data-en="Play named chapter ↗" data-zh="播放命名章节 ↗">Play named chapter ↗</a>
@@ -548,7 +548,7 @@
<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div>
<div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div>
<div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">10N · 5E</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="07aa1003935a795145dce6379e26fbbabc77f7ad94573df0961a32fec82e4aaf">07aa1003935a</span></div>
+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="2385eaddc81e4c2d56ea23077fad4540b195433358d00205be80704034e0fb41">2385eaddc81e</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/agent-run.lifecycle.html?present=1&amp;play=1#view=main-lifecycle" target="_blank" rel="noopener" data-en="Play named chapter ↗" data-zh="播放命名章节 ↗">Play named chapter ↗</a>
@@ -576,7 +576,7 @@
<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div>
<div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div>
<div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">11N · 6E</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="fff08f8739134b212ab95f81cd2cb83248c7465c48ee1884074c946a8e90342c">fff08f873913</span></div>
+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="9517099984856af3452af0fa1eb432d6e6be637ab27f9b84b20fe146d02bafc7">951709998485</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/deployment-release.lifecycle.html?present=1&amp;play=1#view=rollback-outcomes" target="_blank" rel="noopener" data-en="Play named chapter ↗" data-zh="播放命名章节 ↗">Play named chapter ↗</a>
@@ -604,7 +604,7 @@
<div class="receipt-cell"><span class="receipt-label">Artifact</span><span class="receipt-value ok">9/9 pass</span></div>
<div class="receipt-cell"><span class="receipt-label">Composition</span><span class="receipt-value ok" title="0 crossings · 0 border runs · 0 micro segments · 0 cramped turns">SHOWCASE · PASS</span></div>
<div class="receipt-cell"><span class="receipt-label">Graph</span><span class="receipt-value">10N · 9E</span></div>
- <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="d8267f4a7745b439f26e167672a55b1821cff70791006920f55e5114289dc46f">d8267f4a7745</span></div>
+ <div class="receipt-cell"><span class="receipt-label">SHA-256</span><span class="receipt-value" title="47b23020b78a0aff76a04c0bf97d4391471fa1e33c9a4ab14b18179969c2f648">47b23020b78a</span></div>
</div>
<div class="card-actions">
<a class="card-link primary" href="gallery/artifacts/web-app.architecture.html?present=1&amp;play=1#view=request-path" target="_blank" rel="noopener" data-en="Play named chapter ↗" data-zh="播放命名章节 ↗">Play named chapter ↗</a>
@@ -681,8 +681,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>
"animation": "trace",
"nodeCount": 12,
"edgeCount": 11,
- "artifactBytes": 555609,
- "artifactSha256": "5c43a0ab01c71246f1d5456c83e2ded3bc22b69c3d07d21a3c2d239e47844093",
+ "artifactBytes": 562473,
+ "artifactSha256": "1e9cc73669e2c164794a5ec4541643fc2f33668a3050aaba6718bae44c98ca7d",
"sourceBytes": 6470,
"sourceSha256": "a3afc6b30044eb256aa15c6195ddfbbcd1a14880d99967ed5605bc621ffb7e5f",
"checks": [
@@ -778,8 +778,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>
"animation": "trace",
"nodeCount": 12,
"edgeCount": 12,
- "artifactBytes": 554765,
- "artifactSha256": "3274690d0ead342d5becbc393cdb875622c64cd9fc1207aa26056bceb4cfd701",
+ "artifactBytes": 561629,
+ "artifactSha256": "47493c9094bf3f9490680c26e52d252ac2ccfacb8c88946751f054cdeddb4491",
"sourceBytes": 5308,
"sourceSha256": "c3c4ddc8fd8910d8d2bcf2ba97434017d6fa347eb4ee436d2fb519dd0f27c814",
"checks": [
@@ -875,8 +875,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>
"animation": "trace",
"nodeCount": 7,
"edgeCount": 12,
- "artifactBytes": 549256,
- "artifactSha256": "e7389ac65fe931fdf4b1e2884417d4b28993782a03f7c58c54ed4c94e0024ea7",
+ "artifactBytes": 556120,
+ "artifactSha256": "cf31805f2e1646457102c9c9820c7bb43564ca803ce02f88f0acd11be8216191",
"sourceBytes": 4442,
"sourceSha256": "30098d81006a18813bab447da698edf74604a1463770f01dc056b0af8cb314ef",
"checks": [
@@ -972,8 +972,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>
"animation": "trace",
"nodeCount": 10,
"edgeCount": 10,
- "artifactBytes": 551875,
- "artifactSha256": "69e46e690349a1f7246da03fda8203e7408ae78fe31b58fbd5ffbfa077798238",
+ "artifactBytes": 558739,
+ "artifactSha256": "69efaaeadb260286252f7099dcaf6c87d456a11dab663ea8c7dcd56e9d870d82",
"sourceBytes": 5256,
"sourceSha256": "44aa56ac6ca807937dfe84a6404e8b07d6394a38ae2ac53248a1985337dfd671",
"checks": [
@@ -1069,8 +1069,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>
"animation": "trace",
"nodeCount": 11,
"edgeCount": 10,
- "artifactBytes": 551733,
- "artifactSha256": "3e2cb119d619870cd7b0d0a7fbcb8bc28203fdf1fc6f6b0736fbf0656ff3e741",
+ "artifactBytes": 558597,
+ "artifactSha256": "28d5bd0b40a69f1d1bee30ba0bd7731cd77d34c75d1f1695b1645bcdb75bf649",
"sourceBytes": 5471,
"sourceSha256": "9beb8698b275679a2fc92d4b51288cd5b5fc2115696d06b9168f3d7fef253a72",
"checks": [
@@ -1166,8 +1166,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>
"animation": "trace",
"nodeCount": 10,
"edgeCount": 10,
- "artifactBytes": 553266,
- "artifactSha256": "9b9e2540f2c2564132bfc8a1d2aa925d4c67e10abef09316990c87487a486dd8",
+ "artifactBytes": 560130,
+ "artifactSha256": "90b1e36a2349ff984629d803d12d8c8b3ac7707e0981733bb29ddc5044a76c36",
"sourceBytes": 5719,
"sourceSha256": "f71c89288f80255bdedcdc0057bcbc155d1d8b1b7476d024b35f4e27c730c974",
"checks": [
@@ -1263,8 +1263,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>
"animation": "trace",
"nodeCount": 7,
"edgeCount": 14,
- "artifactBytes": 550041,
- "artifactSha256": "893d6bc5ee7a0f512dfecc6cae28e300ba0b3288c5287b66ee61934e70f0e7fd",
+ "artifactBytes": 556905,
+ "artifactSha256": "09361c5cab0a63c01896ea8f719c0b2f4612dbddec847d6a54064e844a8d434c",
"sourceBytes": 4483,
"sourceSha256": "1b53d7c4ce7b2d8f6f40b8f33a394abe1d37fc991272b534c1ccd0255920ab52",
"checks": [
@@ -1360,8 +1360,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>
"animation": "trace",
"nodeCount": 12,
"edgeCount": 12,
- "artifactBytes": 557221,
- "artifactSha256": "a7db3af4cbc78cb319f2fba4bb82382a2b54afe92a5cef3ced2c9a0e70d3c9aa",
+ "artifactBytes": 564085,
+ "artifactSha256": "28cfb49400b3ff96d7d4a6ebd97bae32cfdf8f86597a2ef33f90fec808ae2738",
"sourceBytes": 5543,
"sourceSha256": "bbfedc2f1b73bf50932490f7f56d45d5f853e970d2fab26660a04947a783969c",
"checks": [
@@ -1457,8 +1457,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>
"animation": "trace",
"nodeCount": 10,
"edgeCount": 5,
- "artifactBytes": 546211,
- "artifactSha256": "07aa1003935a795145dce6379e26fbbabc77f7ad94573df0961a32fec82e4aaf",
+ "artifactBytes": 553075,
+ "artifactSha256": "2385eaddc81e4c2d56ea23077fad4540b195433358d00205be80704034e0fb41",
"sourceBytes": 4353,
"sourceSha256": "1d6b34282e014cb2730662b1993158ec67bc0ad2a40520cb441aaee1ad21e4c6",
"checks": [
@@ -1554,8 +1554,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>
"animation": "trace",
"nodeCount": 11,
"edgeCount": 6,
- "artifactBytes": 547588,
- "artifactSha256": "fff08f8739134b212ab95f81cd2cb83248c7465c48ee1884074c946a8e90342c",
+ "artifactBytes": 554452,
+ "artifactSha256": "9517099984856af3452af0fa1eb432d6e6be637ab27f9b84b20fe146d02bafc7",
"sourceBytes": 4394,
"sourceSha256": "aa614f0c9a82f210e301e382f362dfbd7f290bda4d5501de3c99a6cd81b4c0a4",
"checks": [
@@ -1651,8 +1651,8 @@ receipt 99 checks / 11 artifacts / deterministic hashes</pre>
"animation": "static",
"nodeCount": 10,
"edgeCount": 9,
- "artifactBytes": 547220,
- "artifactSha256": "d8267f4a7745b439f26e167672a55b1821cff70791006920f55e5114289dc46f",
+ "artifactBytes": 554084,
+ "artifactSha256": "47b23020b78a0aff76a04c0bf97d4391471fa1e33c9a4ab14b18179969c2f648",
"sourceBytes": 3863,
"sourceSha256": "01567b5e49cad5139baa071533a028d22f0e80fedfb49095e0d9330aee7f87db",
"checks": [
diff --git a/docs/gallery/artifacts/agent-run.lifecycle.html b/docs/gallery/artifacts/agent-run.lifecycle.html
index 25f3d154..81272aed 100644
--- a/docs/gallery/artifacts/agent-run.lifecycle.html
+++ b/docs/gallery/artifacts/agent-run.lifecycle.html
@@ -1420,6 +1420,88 @@
.semantic-passport-meta [hidden] { display: none; }
html[data-preset="blueprint"] .semantic-passport-meta span,
html[data-preset="blueprint"] .semantic-passport-meta code { border-radius: 0.1rem; }
+ .semantic-passport-evidence {
+ margin-top: 0.52rem;
+ padding: 0.5rem;
+ border: 1px solid color-mix(in srgb, var(--backend-stroke) 32%, var(--toolbar-border));
+ border-radius: 0.55rem;
+ background: color-mix(in srgb, var(--backend-fill) 18%, var(--panel));
+ }
+ .semantic-passport-evidence[hidden] { display: none; }
+ html[data-preset="blueprint"] .semantic-passport-evidence { border-radius: 0.18rem; }
+ .semantic-passport-evidence-head {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.55rem;
+ margin-bottom: 0.35rem;
+ }
+ .semantic-passport-evidence-status {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.28rem;
+ color: var(--backend-stroke);
+ font-size: 0.5rem;
+ font-weight: 800;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ }
+ .semantic-passport-evidence-status::before {
+ content: '';
+ width: 0.38rem;
+ height: 0.38rem;
+ border-radius: 50%;
+ background: var(--backend-stroke);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--backend-stroke) 14%, transparent);
+ }
+ .semantic-passport-repository {
+ min-width: 0;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-decoration: none;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-repository:hover,
+ .semantic-passport-repository:focus-visible { color: var(--backend-stroke); }
+ .semantic-passport-evidence-links { display: grid; gap: 0.22rem; }
+ .semantic-passport-source {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) auto;
+ gap: 0.15rem 0.45rem;
+ align-items: center;
+ padding: 0.34rem 0.4rem;
+ border: 1px solid transparent;
+ border-radius: 0.38rem;
+ color: var(--text-muted);
+ text-decoration: none;
+ }
+ .semantic-passport-source:hover,
+ .semantic-passport-source:focus-visible {
+ border-color: color-mix(in srgb, var(--backend-stroke) 42%, transparent);
+ background: color-mix(in srgb, var(--backend-fill) 32%, transparent);
+ color: var(--text);
+ }
+ .semantic-passport-source strong {
+ overflow: hidden;
+ font-size: 0.5625rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-source code {
+ color: var(--backend-stroke);
+ font: inherit;
+ font-size: 0.5rem;
+ }
+ .semantic-passport-source small {
+ grid-column: 1 / -1;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
.relationship-lens-summary {
display: block;
margin-top: 0.12rem;
@@ -3841,6 +3923,7 @@
</div>
<script id="archify-guided-views-data" type="application/json">[{"id":"main-lifecycle","label":"Main lifecycle","focus":["queued","planning","executing","reviewing","completed"],"note":"Follow the ordered phases from accepted request to completed response."},{"id":"human-waits","label":"Human and input waits","focus":["executing","approval","reviewing","blocked"],"note":"See where the run pauses without becoming terminal."},{"id":"recovery-and-exits","label":"Recovery and terminal exits","focus":["executing","failed","blocked","cancelled","expired"],"note":"Separate retryable failure from cancellation and expiry."}]</script>
+
<div class="guided-views no-print" id="guided-views" hidden aria-label="Guided diagram views">
<button id="guided-view-prev" type="button" aria-label="Previous guided view" title="Previous guided view ([)">&#8592;</button>
<div class="guided-view-copy">
@@ -4170,6 +4253,13 @@
<span id="focus-tag" data-passport="tag" hidden></span>
<code id="focus-id" data-passport="id"></code>
</div>
+ <div class="semantic-passport-evidence" id="focus-evidence" hidden aria-label="Verified source evidence">
+ <div class="semantic-passport-evidence-head">
+ <span class="semantic-passport-evidence-status">Verified source</span>
+ <a class="semantic-passport-repository" id="focus-repository" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer"></a>
+ </div>
+ <div class="semantic-passport-evidence-links" id="focus-evidence-links"></div>
+ </div>
<span class="relationship-lens-summary" id="focus-summary" aria-live="polite"></span>
</div>
<div class="relationship-lens-actions">
@@ -5923,6 +6013,29 @@
};
})();
+ /* Verified repository evidence is emitted only after the renderer checks
+ the authored GitHub revision, source blobs, and optional line ranges
+ against the explicit --repo-root. It remains outside the SVG so every
+ canonical visual export stays free of repository paths. */
+ Archify.sourceEvidence = (function () {
+ var element = document.getElementById('archify-source-evidence-data');
+ var payload = null;
+ if (element) {
+ try {
+ var parsed = JSON.parse(element.textContent || 'null');
+ if (parsed && parsed.verified === true && parsed.repository && parsed.nodes) payload = parsed;
+ } catch (_) {}
+ }
+ return {
+ available: function () { return Boolean(payload); },
+ repository: function () { return payload ? payload.repository : null; },
+ node: function (id) {
+ var sources = payload && payload.nodes ? payload.nodes[id] : null;
+ return Array.isArray(sources) ? sources.slice() : [];
+ }
+ };
+ })();
+
/* ============================================================
Explore — stable-ID neighborhood focus + dependency-free pan/zoom.
Renderer IDs become deep-linkable semantic hooks without turning the
@@ -5939,6 +6052,9 @@
var context = document.getElementById('focus-context');
var tag = document.getElementById('focus-tag');
var semanticId = document.getElementById('focus-id');
+ var evidence = document.getElementById('focus-evidence');
+ var repositoryLink = document.getElementById('focus-repository');
+ var evidenceLinks = document.getElementById('focus-evidence-links');
var summary = document.getElementById('focus-summary');
var relationshipList = document.getElementById('relationship-lens-list');
var copyBtn = document.getElementById('btn-focus-copy');
@@ -5971,6 +6087,43 @@
element.textContent = normalized;
element.hidden = !normalized;
}
+ function renderSourceEvidence(id) {
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
+ var sources = Archify.sourceEvidence.node(id);
+ var repository = Archify.sourceEvidence.repository();
+ if (!repository || !sources.length) {
+ evidence.hidden = true;
+ return;
+ }
+ var slug = repository.url.replace(/^https:\/\/github\.com\//, '').replace(/\/$/, '');
+ repositoryLink.href = repository.url + '/tree/' + repository.revision;
+ repositoryLink.textContent = slug + ' @ ' + repository.shortRevision;
+ repositoryLink.setAttribute('aria-label', 'Open verified repository revision ' + repository.revision);
+ sources.forEach(function (source) {
+ var link = document.createElement('a');
+ link.className = 'semantic-passport-source';
+ link.href = source.href;
+ link.target = '_blank';
+ link.rel = 'noopener noreferrer';
+ link.referrerPolicy = 'no-referrer';
+ link.setAttribute('aria-label', 'Open verified source ' + source.path + ' at revision ' + repository.shortRevision);
+ var name = document.createElement('strong');
+ name.textContent = source.label || source.path.split('/').pop() || source.path;
+ var location = document.createElement('code');
+ location.textContent = source.line
+ ? 'L' + source.line + (source.endLine && source.endLine !== source.line ? '–' + source.endLine : '') + ' ↗'
+ : 'Open ↗';
+ var sourcePath = document.createElement('small');
+ sourcePath.textContent = source.path;
+ link.appendChild(name);
+ link.appendChild(location);
+ link.appendChild(sourcePath);
+ evidenceLinks.appendChild(link);
+ });
+ evidence.hidden = false;
+ }
function renderPassport(id, node) {
setPassportValue(detail, node.getAttribute('data-node-sublabel'));
setPassportValue(kind, node.getAttribute('data-node-kind') || 'node');
@@ -5978,6 +6131,7 @@
setPassportValue(tag, node.getAttribute('data-node-tag'));
semanticId.textContent = id;
semanticId.hidden = false;
+ renderSourceEvidence(id);
}
function relationshipsFor(id, byId) {
var seen = {};
@@ -6657,6 +6811,10 @@
tag.hidden = true;
semanticId.textContent = '';
semanticId.hidden = true;
+ evidence.hidden = true;
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
summary.textContent = '';
relationshipList.textContent = '';
copyBtn.textContent = 'Copy link';
@@ -9678,6 +9836,10 @@
var context = node.getAttribute('data-node-context') || '';
var tag = node.getAttribute('data-node-tag') || '';
var type = semanticType(node);
+ var sources = Archify.sourceEvidence.node(id);
+ var sourceSearch = sources.map(function (source) {
+ return [source.path, source.label, source.line, source.endLine].filter(Boolean).join(' ');
+ }).join(' ');
return {
id: id,
label: label,
@@ -9685,8 +9847,9 @@
sublabel: sublabel,
context: context,
tag: tag,
+ sources: sources,
links: connectionsFor(id),
- search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + text).toLowerCase(),
+ search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + sourceSearch + ' ' + text).toLowerCase(),
node: node
};
});
diff --git a/docs/gallery/artifacts/agent-tool-call.workflow.html b/docs/gallery/artifacts/agent-tool-call.workflow.html
index 355f32f9..6d982a47 100644
--- a/docs/gallery/artifacts/agent-tool-call.workflow.html
+++ b/docs/gallery/artifacts/agent-tool-call.workflow.html
@@ -1420,6 +1420,88 @@
.semantic-passport-meta [hidden] { display: none; }
html[data-preset="blueprint"] .semantic-passport-meta span,
html[data-preset="blueprint"] .semantic-passport-meta code { border-radius: 0.1rem; }
+ .semantic-passport-evidence {
+ margin-top: 0.52rem;
+ padding: 0.5rem;
+ border: 1px solid color-mix(in srgb, var(--backend-stroke) 32%, var(--toolbar-border));
+ border-radius: 0.55rem;
+ background: color-mix(in srgb, var(--backend-fill) 18%, var(--panel));
+ }
+ .semantic-passport-evidence[hidden] { display: none; }
+ html[data-preset="blueprint"] .semantic-passport-evidence { border-radius: 0.18rem; }
+ .semantic-passport-evidence-head {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.55rem;
+ margin-bottom: 0.35rem;
+ }
+ .semantic-passport-evidence-status {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.28rem;
+ color: var(--backend-stroke);
+ font-size: 0.5rem;
+ font-weight: 800;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ }
+ .semantic-passport-evidence-status::before {
+ content: '';
+ width: 0.38rem;
+ height: 0.38rem;
+ border-radius: 50%;
+ background: var(--backend-stroke);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--backend-stroke) 14%, transparent);
+ }
+ .semantic-passport-repository {
+ min-width: 0;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-decoration: none;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-repository:hover,
+ .semantic-passport-repository:focus-visible { color: var(--backend-stroke); }
+ .semantic-passport-evidence-links { display: grid; gap: 0.22rem; }
+ .semantic-passport-source {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) auto;
+ gap: 0.15rem 0.45rem;
+ align-items: center;
+ padding: 0.34rem 0.4rem;
+ border: 1px solid transparent;
+ border-radius: 0.38rem;
+ color: var(--text-muted);
+ text-decoration: none;
+ }
+ .semantic-passport-source:hover,
+ .semantic-passport-source:focus-visible {
+ border-color: color-mix(in srgb, var(--backend-stroke) 42%, transparent);
+ background: color-mix(in srgb, var(--backend-fill) 32%, transparent);
+ color: var(--text);
+ }
+ .semantic-passport-source strong {
+ overflow: hidden;
+ font-size: 0.5625rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-source code {
+ color: var(--backend-stroke);
+ font: inherit;
+ font-size: 0.5rem;
+ }
+ .semantic-passport-source small {
+ grid-column: 1 / -1;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
.relationship-lens-summary {
display: block;
margin-top: 0.12rem;
@@ -3841,6 +3923,7 @@
</div>
<script id="archify-guided-views-data" type="application/json">[{"id":"happy-path","label":"Request to result","focus":["user","chat","planner","router","approval","tool","external","final"],"note":"Follow the successful request from user intent to the final reply."},{"id":"safety-gate","label":"Policy and recovery","focus":["router","approval","blocked","retry"],"note":"See where risky work stops, waits for consent, or returns for revision."},{"id":"evidence-loop","label":"Evidence and memory","focus":["external","store","trace"],"note":"Isolate the durable trace and context path behind the visible answer."}]</script>
+
<div class="guided-views no-print" id="guided-views" hidden aria-label="Guided diagram views">
<button id="guided-view-prev" type="button" aria-label="Previous guided view" title="Previous guided view ([)">&#8592;</button>
<div class="guided-view-copy">
@@ -4247,6 +4330,13 @@
<span id="focus-tag" data-passport="tag" hidden></span>
<code id="focus-id" data-passport="id"></code>
</div>
+ <div class="semantic-passport-evidence" id="focus-evidence" hidden aria-label="Verified source evidence">
+ <div class="semantic-passport-evidence-head">
+ <span class="semantic-passport-evidence-status">Verified source</span>
+ <a class="semantic-passport-repository" id="focus-repository" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer"></a>
+ </div>
+ <div class="semantic-passport-evidence-links" id="focus-evidence-links"></div>
+ </div>
<span class="relationship-lens-summary" id="focus-summary" aria-live="polite"></span>
</div>
<div class="relationship-lens-actions">
@@ -6003,6 +6093,29 @@
};
})();
+ /* Verified repository evidence is emitted only after the renderer checks
+ the authored GitHub revision, source blobs, and optional line ranges
+ against the explicit --repo-root. It remains outside the SVG so every
+ canonical visual export stays free of repository paths. */
+ Archify.sourceEvidence = (function () {
+ var element = document.getElementById('archify-source-evidence-data');
+ var payload = null;
+ if (element) {
+ try {
+ var parsed = JSON.parse(element.textContent || 'null');
+ if (parsed && parsed.verified === true && parsed.repository && parsed.nodes) payload = parsed;
+ } catch (_) {}
+ }
+ return {
+ available: function () { return Boolean(payload); },
+ repository: function () { return payload ? payload.repository : null; },
+ node: function (id) {
+ var sources = payload && payload.nodes ? payload.nodes[id] : null;
+ return Array.isArray(sources) ? sources.slice() : [];
+ }
+ };
+ })();
+
/* ============================================================
Explore — stable-ID neighborhood focus + dependency-free pan/zoom.
Renderer IDs become deep-linkable semantic hooks without turning the
@@ -6019,6 +6132,9 @@
var context = document.getElementById('focus-context');
var tag = document.getElementById('focus-tag');
var semanticId = document.getElementById('focus-id');
+ var evidence = document.getElementById('focus-evidence');
+ var repositoryLink = document.getElementById('focus-repository');
+ var evidenceLinks = document.getElementById('focus-evidence-links');
var summary = document.getElementById('focus-summary');
var relationshipList = document.getElementById('relationship-lens-list');
var copyBtn = document.getElementById('btn-focus-copy');
@@ -6051,6 +6167,43 @@
element.textContent = normalized;
element.hidden = !normalized;
}
+ function renderSourceEvidence(id) {
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
+ var sources = Archify.sourceEvidence.node(id);
+ var repository = Archify.sourceEvidence.repository();
+ if (!repository || !sources.length) {
+ evidence.hidden = true;
+ return;
+ }
+ var slug = repository.url.replace(/^https:\/\/github\.com\//, '').replace(/\/$/, '');
+ repositoryLink.href = repository.url + '/tree/' + repository.revision;
+ repositoryLink.textContent = slug + ' @ ' + repository.shortRevision;
+ repositoryLink.setAttribute('aria-label', 'Open verified repository revision ' + repository.revision);
+ sources.forEach(function (source) {
+ var link = document.createElement('a');
+ link.className = 'semantic-passport-source';
+ link.href = source.href;
+ link.target = '_blank';
+ link.rel = 'noopener noreferrer';
+ link.referrerPolicy = 'no-referrer';
+ link.setAttribute('aria-label', 'Open verified source ' + source.path + ' at revision ' + repository.shortRevision);
+ var name = document.createElement('strong');
+ name.textContent = source.label || source.path.split('/').pop() || source.path;
+ var location = document.createElement('code');
+ location.textContent = source.line
+ ? 'L' + source.line + (source.endLine && source.endLine !== source.line ? '–' + source.endLine : '') + ' ↗'
+ : 'Open ↗';
+ var sourcePath = document.createElement('small');
+ sourcePath.textContent = source.path;
+ link.appendChild(name);
+ link.appendChild(location);
+ link.appendChild(sourcePath);
+ evidenceLinks.appendChild(link);
+ });
+ evidence.hidden = false;
+ }
function renderPassport(id, node) {
setPassportValue(detail, node.getAttribute('data-node-sublabel'));
setPassportValue(kind, node.getAttribute('data-node-kind') || 'node');
@@ -6058,6 +6211,7 @@
setPassportValue(tag, node.getAttribute('data-node-tag'));
semanticId.textContent = id;
semanticId.hidden = false;
+ renderSourceEvidence(id);
}
function relationshipsFor(id, byId) {
var seen = {};
@@ -6737,6 +6891,10 @@
tag.hidden = true;
semanticId.textContent = '';
semanticId.hidden = true;
+ evidence.hidden = true;
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
summary.textContent = '';
relationshipList.textContent = '';
copyBtn.textContent = 'Copy link';
@@ -9758,6 +9916,10 @@
var context = node.getAttribute('data-node-context') || '';
var tag = node.getAttribute('data-node-tag') || '';
var type = semanticType(node);
+ var sources = Archify.sourceEvidence.node(id);
+ var sourceSearch = sources.map(function (source) {
+ return [source.path, source.label, source.line, source.endLine].filter(Boolean).join(' ');
+ }).join(' ');
return {
id: id,
label: label,
@@ -9765,8 +9927,9 @@
sublabel: sublabel,
context: context,
tag: tag,
+ sources: sources,
links: connectionsFor(id),
- search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + text).toLowerCase(),
+ search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + sourceSearch + ' ' + text).toLowerCase(),
node: node
};
});
diff --git a/docs/gallery/artifacts/async-job-roundtrip.sequence.html b/docs/gallery/artifacts/async-job-roundtrip.sequence.html
index 12ed9da7..5f7ffb7d 100644
--- a/docs/gallery/artifacts/async-job-roundtrip.sequence.html
+++ b/docs/gallery/artifacts/async-job-roundtrip.sequence.html
@@ -1420,6 +1420,88 @@
.semantic-passport-meta [hidden] { display: none; }
html[data-preset="blueprint"] .semantic-passport-meta span,
html[data-preset="blueprint"] .semantic-passport-meta code { border-radius: 0.1rem; }
+ .semantic-passport-evidence {
+ margin-top: 0.52rem;
+ padding: 0.5rem;
+ border: 1px solid color-mix(in srgb, var(--backend-stroke) 32%, var(--toolbar-border));
+ border-radius: 0.55rem;
+ background: color-mix(in srgb, var(--backend-fill) 18%, var(--panel));
+ }
+ .semantic-passport-evidence[hidden] { display: none; }
+ html[data-preset="blueprint"] .semantic-passport-evidence { border-radius: 0.18rem; }
+ .semantic-passport-evidence-head {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.55rem;
+ margin-bottom: 0.35rem;
+ }
+ .semantic-passport-evidence-status {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.28rem;
+ color: var(--backend-stroke);
+ font-size: 0.5rem;
+ font-weight: 800;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ }
+ .semantic-passport-evidence-status::before {
+ content: '';
+ width: 0.38rem;
+ height: 0.38rem;
+ border-radius: 50%;
+ background: var(--backend-stroke);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--backend-stroke) 14%, transparent);
+ }
+ .semantic-passport-repository {
+ min-width: 0;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-decoration: none;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-repository:hover,
+ .semantic-passport-repository:focus-visible { color: var(--backend-stroke); }
+ .semantic-passport-evidence-links { display: grid; gap: 0.22rem; }
+ .semantic-passport-source {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) auto;
+ gap: 0.15rem 0.45rem;
+ align-items: center;
+ padding: 0.34rem 0.4rem;
+ border: 1px solid transparent;
+ border-radius: 0.38rem;
+ color: var(--text-muted);
+ text-decoration: none;
+ }
+ .semantic-passport-source:hover,
+ .semantic-passport-source:focus-visible {
+ border-color: color-mix(in srgb, var(--backend-stroke) 42%, transparent);
+ background: color-mix(in srgb, var(--backend-fill) 32%, transparent);
+ color: var(--text);
+ }
+ .semantic-passport-source strong {
+ overflow: hidden;
+ font-size: 0.5625rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-source code {
+ color: var(--backend-stroke);
+ font: inherit;
+ font-size: 0.5rem;
+ }
+ .semantic-passport-source small {
+ grid-column: 1 / -1;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
.relationship-lens-summary {
display: block;
margin-top: 0.12rem;
@@ -3841,6 +3923,7 @@
</div>
<script id="archify-guided-views-data" type="application/json">[{"id":"accept-and-enqueue","label":"Accept without blocking","focus":["client","api","queue"],"note":"The API acknowledges quickly after durable enqueue."},{"id":"work-and-retry","label":"Background work and retry","focus":["queue","worker","provider"],"note":"Timeouts re-enter the queue instead of holding the original request open."},{"id":"observe-final-state","label":"Observe final consistency","focus":["worker","store","notify","client","api"],"note":"Webhook delivery is primary; polling remains a bounded fallback."}]</script>
+
<div class="guided-views no-print" id="guided-views" hidden aria-label="Guided diagram views">
<button id="guided-view-prev" type="button" aria-label="Previous guided view" title="Previous guided view ([)">&#8592;</button>
<div class="guided-view-copy">
@@ -4237,6 +4320,13 @@
<span id="focus-tag" data-passport="tag" hidden></span>
<code id="focus-id" data-passport="id"></code>
</div>
+ <div class="semantic-passport-evidence" id="focus-evidence" hidden aria-label="Verified source evidence">
+ <div class="semantic-passport-evidence-head">
+ <span class="semantic-passport-evidence-status">Verified source</span>
+ <a class="semantic-passport-repository" id="focus-repository" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer"></a>
+ </div>
+ <div class="semantic-passport-evidence-links" id="focus-evidence-links"></div>
+ </div>
<span class="relationship-lens-summary" id="focus-summary" aria-live="polite"></span>
</div>
<div class="relationship-lens-actions">
@@ -5990,6 +6080,29 @@
};
})();
+ /* Verified repository evidence is emitted only after the renderer checks
+ the authored GitHub revision, source blobs, and optional line ranges
+ against the explicit --repo-root. It remains outside the SVG so every
+ canonical visual export stays free of repository paths. */
+ Archify.sourceEvidence = (function () {
+ var element = document.getElementById('archify-source-evidence-data');
+ var payload = null;
+ if (element) {
+ try {
+ var parsed = JSON.parse(element.textContent || 'null');
+ if (parsed && parsed.verified === true && parsed.repository && parsed.nodes) payload = parsed;
+ } catch (_) {}
+ }
+ return {
+ available: function () { return Boolean(payload); },
+ repository: function () { return payload ? payload.repository : null; },
+ node: function (id) {
+ var sources = payload && payload.nodes ? payload.nodes[id] : null;
+ return Array.isArray(sources) ? sources.slice() : [];
+ }
+ };
+ })();
+
/* ============================================================
Explore — stable-ID neighborhood focus + dependency-free pan/zoom.
Renderer IDs become deep-linkable semantic hooks without turning the
@@ -6006,6 +6119,9 @@
var context = document.getElementById('focus-context');
var tag = document.getElementById('focus-tag');
var semanticId = document.getElementById('focus-id');
+ var evidence = document.getElementById('focus-evidence');
+ var repositoryLink = document.getElementById('focus-repository');
+ var evidenceLinks = document.getElementById('focus-evidence-links');
var summary = document.getElementById('focus-summary');
var relationshipList = document.getElementById('relationship-lens-list');
var copyBtn = document.getElementById('btn-focus-copy');
@@ -6038,6 +6154,43 @@
element.textContent = normalized;
element.hidden = !normalized;
}
+ function renderSourceEvidence(id) {
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
+ var sources = Archify.sourceEvidence.node(id);
+ var repository = Archify.sourceEvidence.repository();
+ if (!repository || !sources.length) {
+ evidence.hidden = true;
+ return;
+ }
+ var slug = repository.url.replace(/^https:\/\/github\.com\//, '').replace(/\/$/, '');
+ repositoryLink.href = repository.url + '/tree/' + repository.revision;
+ repositoryLink.textContent = slug + ' @ ' + repository.shortRevision;
+ repositoryLink.setAttribute('aria-label', 'Open verified repository revision ' + repository.revision);
+ sources.forEach(function (source) {
+ var link = document.createElement('a');
+ link.className = 'semantic-passport-source';
+ link.href = source.href;
+ link.target = '_blank';
+ link.rel = 'noopener noreferrer';
+ link.referrerPolicy = 'no-referrer';
+ link.setAttribute('aria-label', 'Open verified source ' + source.path + ' at revision ' + repository.shortRevision);
+ var name = document.createElement('strong');
+ name.textContent = source.label || source.path.split('/').pop() || source.path;
+ var location = document.createElement('code');
+ location.textContent = source.line
+ ? 'L' + source.line + (source.endLine && source.endLine !== source.line ? '–' + source.endLine : '') + ' ↗'
+ : 'Open ↗';
+ var sourcePath = document.createElement('small');
+ sourcePath.textContent = source.path;
+ link.appendChild(name);
+ link.appendChild(location);
+ link.appendChild(sourcePath);
+ evidenceLinks.appendChild(link);
+ });
+ evidence.hidden = false;
+ }
function renderPassport(id, node) {
setPassportValue(detail, node.getAttribute('data-node-sublabel'));
setPassportValue(kind, node.getAttribute('data-node-kind') || 'node');
@@ -6045,6 +6198,7 @@
setPassportValue(tag, node.getAttribute('data-node-tag'));
semanticId.textContent = id;
semanticId.hidden = false;
+ renderSourceEvidence(id);
}
function relationshipsFor(id, byId) {
var seen = {};
@@ -6724,6 +6878,10 @@
tag.hidden = true;
semanticId.textContent = '';
semanticId.hidden = true;
+ evidence.hidden = true;
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
summary.textContent = '';
relationshipList.textContent = '';
copyBtn.textContent = 'Copy link';
@@ -9745,6 +9903,10 @@
var context = node.getAttribute('data-node-context') || '';
var tag = node.getAttribute('data-node-tag') || '';
var type = semanticType(node);
+ var sources = Archify.sourceEvidence.node(id);
+ var sourceSearch = sources.map(function (source) {
+ return [source.path, source.label, source.line, source.endLine].filter(Boolean).join(' ');
+ }).join(' ');
return {
id: id,
label: label,
@@ -9752,8 +9914,9 @@
sublabel: sublabel,
context: context,
tag: tag,
+ sources: sources,
links: connectionsFor(id),
- search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + text).toLowerCase(),
+ search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + sourceSearch + ' ' + text).toLowerCase(),
node: node
};
});
diff --git a/docs/gallery/artifacts/cache-miss.sequence.html b/docs/gallery/artifacts/cache-miss.sequence.html
index f70ab69f..de3e8572 100644
--- a/docs/gallery/artifacts/cache-miss.sequence.html
+++ b/docs/gallery/artifacts/cache-miss.sequence.html
@@ -1420,6 +1420,88 @@
.semantic-passport-meta [hidden] { display: none; }
html[data-preset="blueprint"] .semantic-passport-meta span,
html[data-preset="blueprint"] .semantic-passport-meta code { border-radius: 0.1rem; }
+ .semantic-passport-evidence {
+ margin-top: 0.52rem;
+ padding: 0.5rem;
+ border: 1px solid color-mix(in srgb, var(--backend-stroke) 32%, var(--toolbar-border));
+ border-radius: 0.55rem;
+ background: color-mix(in srgb, var(--backend-fill) 18%, var(--panel));
+ }
+ .semantic-passport-evidence[hidden] { display: none; }
+ html[data-preset="blueprint"] .semantic-passport-evidence { border-radius: 0.18rem; }
+ .semantic-passport-evidence-head {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.55rem;
+ margin-bottom: 0.35rem;
+ }
+ .semantic-passport-evidence-status {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.28rem;
+ color: var(--backend-stroke);
+ font-size: 0.5rem;
+ font-weight: 800;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ }
+ .semantic-passport-evidence-status::before {
+ content: '';
+ width: 0.38rem;
+ height: 0.38rem;
+ border-radius: 50%;
+ background: var(--backend-stroke);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--backend-stroke) 14%, transparent);
+ }
+ .semantic-passport-repository {
+ min-width: 0;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-decoration: none;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-repository:hover,
+ .semantic-passport-repository:focus-visible { color: var(--backend-stroke); }
+ .semantic-passport-evidence-links { display: grid; gap: 0.22rem; }
+ .semantic-passport-source {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) auto;
+ gap: 0.15rem 0.45rem;
+ align-items: center;
+ padding: 0.34rem 0.4rem;
+ border: 1px solid transparent;
+ border-radius: 0.38rem;
+ color: var(--text-muted);
+ text-decoration: none;
+ }
+ .semantic-passport-source:hover,
+ .semantic-passport-source:focus-visible {
+ border-color: color-mix(in srgb, var(--backend-stroke) 42%, transparent);
+ background: color-mix(in srgb, var(--backend-fill) 32%, transparent);
+ color: var(--text);
+ }
+ .semantic-passport-source strong {
+ overflow: hidden;
+ font-size: 0.5625rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-source code {
+ color: var(--backend-stroke);
+ font: inherit;
+ font-size: 0.5rem;
+ }
+ .semantic-passport-source small {
+ grid-column: 1 / -1;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
.relationship-lens-summary {
display: block;
margin-top: 0.12rem;
@@ -3841,6 +3923,7 @@
</div>
<script id="archify-guided-views-data" type="application/json">[{"id":"request-and-auth","label":"Request and identity","focus":["user","web","api","auth"],"note":"Follow the user request through the authentication check."},{"id":"cache-fallback","label":"Cache fallback","focus":["api","redis","db"],"note":"See the cache miss and the source-of-truth query it triggers."},{"id":"return-and-trace","label":"Return and trace","focus":["db","api","redis","trace","web","user"],"note":"Separate response latency from the non-blocking observability write."}]</script>
+
<div class="guided-views no-print" id="guided-views" hidden aria-label="Guided diagram views">
<button id="guided-view-prev" type="button" aria-label="Previous guided view" title="Previous guided view ([)">&#8592;</button>
<div class="guided-view-copy">
@@ -4221,6 +4304,13 @@
<span id="focus-tag" data-passport="tag" hidden></span>
<code id="focus-id" data-passport="id"></code>
</div>
+ <div class="semantic-passport-evidence" id="focus-evidence" hidden aria-label="Verified source evidence">
+ <div class="semantic-passport-evidence-head">
+ <span class="semantic-passport-evidence-status">Verified source</span>
+ <a class="semantic-passport-repository" id="focus-repository" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer"></a>
+ </div>
+ <div class="semantic-passport-evidence-links" id="focus-evidence-links"></div>
+ </div>
<span class="relationship-lens-summary" id="focus-summary" aria-live="polite"></span>
</div>
<div class="relationship-lens-actions">
@@ -5974,6 +6064,29 @@
};
})();
+ /* Verified repository evidence is emitted only after the renderer checks
+ the authored GitHub revision, source blobs, and optional line ranges
+ against the explicit --repo-root. It remains outside the SVG so every
+ canonical visual export stays free of repository paths. */
+ Archify.sourceEvidence = (function () {
+ var element = document.getElementById('archify-source-evidence-data');
+ var payload = null;
+ if (element) {
+ try {
+ var parsed = JSON.parse(element.textContent || 'null');
+ if (parsed && parsed.verified === true && parsed.repository && parsed.nodes) payload = parsed;
+ } catch (_) {}
+ }
+ return {
+ available: function () { return Boolean(payload); },
+ repository: function () { return payload ? payload.repository : null; },
+ node: function (id) {
+ var sources = payload && payload.nodes ? payload.nodes[id] : null;
+ return Array.isArray(sources) ? sources.slice() : [];
+ }
+ };
+ })();
+
/* ============================================================
Explore — stable-ID neighborhood focus + dependency-free pan/zoom.
Renderer IDs become deep-linkable semantic hooks without turning the
@@ -5990,6 +6103,9 @@
var context = document.getElementById('focus-context');
var tag = document.getElementById('focus-tag');
var semanticId = document.getElementById('focus-id');
+ var evidence = document.getElementById('focus-evidence');
+ var repositoryLink = document.getElementById('focus-repository');
+ var evidenceLinks = document.getElementById('focus-evidence-links');
var summary = document.getElementById('focus-summary');
var relationshipList = document.getElementById('relationship-lens-list');
var copyBtn = document.getElementById('btn-focus-copy');
@@ -6022,6 +6138,43 @@
element.textContent = normalized;
element.hidden = !normalized;
}
+ function renderSourceEvidence(id) {
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
+ var sources = Archify.sourceEvidence.node(id);
+ var repository = Archify.sourceEvidence.repository();
+ if (!repository || !sources.length) {
+ evidence.hidden = true;
+ return;
+ }
+ var slug = repository.url.replace(/^https:\/\/github\.com\//, '').replace(/\/$/, '');
+ repositoryLink.href = repository.url + '/tree/' + repository.revision;
+ repositoryLink.textContent = slug + ' @ ' + repository.shortRevision;
+ repositoryLink.setAttribute('aria-label', 'Open verified repository revision ' + repository.revision);
+ sources.forEach(function (source) {
+ var link = document.createElement('a');
+ link.className = 'semantic-passport-source';
+ link.href = source.href;
+ link.target = '_blank';
+ link.rel = 'noopener noreferrer';
+ link.referrerPolicy = 'no-referrer';
+ link.setAttribute('aria-label', 'Open verified source ' + source.path + ' at revision ' + repository.shortRevision);
+ var name = document.createElement('strong');
+ name.textContent = source.label || source.path.split('/').pop() || source.path;
+ var location = document.createElement('code');
+ location.textContent = source.line
+ ? 'L' + source.line + (source.endLine && source.endLine !== source.line ? '–' + source.endLine : '') + ' ↗'
+ : 'Open ↗';
+ var sourcePath = document.createElement('small');
+ sourcePath.textContent = source.path;
+ link.appendChild(name);
+ link.appendChild(location);
+ link.appendChild(sourcePath);
+ evidenceLinks.appendChild(link);
+ });
+ evidence.hidden = false;
+ }
function renderPassport(id, node) {
setPassportValue(detail, node.getAttribute('data-node-sublabel'));
setPassportValue(kind, node.getAttribute('data-node-kind') || 'node');
@@ -6029,6 +6182,7 @@
setPassportValue(tag, node.getAttribute('data-node-tag'));
semanticId.textContent = id;
semanticId.hidden = false;
+ renderSourceEvidence(id);
}
function relationshipsFor(id, byId) {
var seen = {};
@@ -6708,6 +6862,10 @@
tag.hidden = true;
semanticId.textContent = '';
semanticId.hidden = true;
+ evidence.hidden = true;
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
summary.textContent = '';
relationshipList.textContent = '';
copyBtn.textContent = 'Copy link';
@@ -9729,6 +9887,10 @@
var context = node.getAttribute('data-node-context') || '';
var tag = node.getAttribute('data-node-tag') || '';
var type = semanticType(node);
+ var sources = Archify.sourceEvidence.node(id);
+ var sourceSearch = sources.map(function (source) {
+ return [source.path, source.label, source.line, source.endLine].filter(Boolean).join(' ');
+ }).join(' ');
return {
id: id,
label: label,
@@ -9736,8 +9898,9 @@
sublabel: sublabel,
context: context,
tag: tag,
+ sources: sources,
links: connectionsFor(id),
- search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + text).toLowerCase(),
+ search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + sourceSearch + ' ' + text).toLowerCase(),
node: node
};
});
diff --git a/docs/gallery/artifacts/deployment-release.lifecycle.html b/docs/gallery/artifacts/deployment-release.lifecycle.html
index a3e20092..d44142bb 100644
--- a/docs/gallery/artifacts/deployment-release.lifecycle.html
+++ b/docs/gallery/artifacts/deployment-release.lifecycle.html
@@ -1420,6 +1420,88 @@
.semantic-passport-meta [hidden] { display: none; }
html[data-preset="blueprint"] .semantic-passport-meta span,
html[data-preset="blueprint"] .semantic-passport-meta code { border-radius: 0.1rem; }
+ .semantic-passport-evidence {
+ margin-top: 0.52rem;
+ padding: 0.5rem;
+ border: 1px solid color-mix(in srgb, var(--backend-stroke) 32%, var(--toolbar-border));
+ border-radius: 0.55rem;
+ background: color-mix(in srgb, var(--backend-fill) 18%, var(--panel));
+ }
+ .semantic-passport-evidence[hidden] { display: none; }
+ html[data-preset="blueprint"] .semantic-passport-evidence { border-radius: 0.18rem; }
+ .semantic-passport-evidence-head {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.55rem;
+ margin-bottom: 0.35rem;
+ }
+ .semantic-passport-evidence-status {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.28rem;
+ color: var(--backend-stroke);
+ font-size: 0.5rem;
+ font-weight: 800;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ }
+ .semantic-passport-evidence-status::before {
+ content: '';
+ width: 0.38rem;
+ height: 0.38rem;
+ border-radius: 50%;
+ background: var(--backend-stroke);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--backend-stroke) 14%, transparent);
+ }
+ .semantic-passport-repository {
+ min-width: 0;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-decoration: none;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-repository:hover,
+ .semantic-passport-repository:focus-visible { color: var(--backend-stroke); }
+ .semantic-passport-evidence-links { display: grid; gap: 0.22rem; }
+ .semantic-passport-source {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) auto;
+ gap: 0.15rem 0.45rem;
+ align-items: center;
+ padding: 0.34rem 0.4rem;
+ border: 1px solid transparent;
+ border-radius: 0.38rem;
+ color: var(--text-muted);
+ text-decoration: none;
+ }
+ .semantic-passport-source:hover,
+ .semantic-passport-source:focus-visible {
+ border-color: color-mix(in srgb, var(--backend-stroke) 42%, transparent);
+ background: color-mix(in srgb, var(--backend-fill) 32%, transparent);
+ color: var(--text);
+ }
+ .semantic-passport-source strong {
+ overflow: hidden;
+ font-size: 0.5625rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-source code {
+ color: var(--backend-stroke);
+ font: inherit;
+ font-size: 0.5rem;
+ }
+ .semantic-passport-source small {
+ grid-column: 1 / -1;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
.relationship-lens-summary {
display: block;
margin-top: 0.12rem;
@@ -3841,6 +3923,7 @@
</div>
<script id="archify-guided-views-data" type="application/json">[{"id":"promotion-rail","label":"Promotion rail","focus":["queued","building","verifying","ready","live"],"note":"Follow the deployment object from accepted change to healthy production."},{"id":"approval-gate","label":"Approval gate","focus":["verifying","approval","cancelled","ready"],"note":"Approval pauses promotion and can terminate the release cleanly."},{"id":"rollback-outcomes","label":"Rollback outcomes","focus":["ready","rollback","failed","live","paused","rolled_back"],"note":"Separate pre-promotion failure from post-promotion health regression."}]</script>
+
<div class="guided-views no-print" id="guided-views" hidden aria-label="Guided diagram views">
<button id="guided-view-prev" type="button" aria-label="Previous guided view" title="Previous guided view ([)">&#8592;</button>
<div class="guided-view-copy">
@@ -4184,6 +4267,13 @@
<span id="focus-tag" data-passport="tag" hidden></span>
<code id="focus-id" data-passport="id"></code>
</div>
+ <div class="semantic-passport-evidence" id="focus-evidence" hidden aria-label="Verified source evidence">
+ <div class="semantic-passport-evidence-head">
+ <span class="semantic-passport-evidence-status">Verified source</span>
+ <a class="semantic-passport-repository" id="focus-repository" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer"></a>
+ </div>
+ <div class="semantic-passport-evidence-links" id="focus-evidence-links"></div>
+ </div>
<span class="relationship-lens-summary" id="focus-summary" aria-live="polite"></span>
</div>
<div class="relationship-lens-actions">
@@ -5937,6 +6027,29 @@
};
})();
+ /* Verified repository evidence is emitted only after the renderer checks
+ the authored GitHub revision, source blobs, and optional line ranges
+ against the explicit --repo-root. It remains outside the SVG so every
+ canonical visual export stays free of repository paths. */
+ Archify.sourceEvidence = (function () {
+ var element = document.getElementById('archify-source-evidence-data');
+ var payload = null;
+ if (element) {
+ try {
+ var parsed = JSON.parse(element.textContent || 'null');
+ if (parsed && parsed.verified === true && parsed.repository && parsed.nodes) payload = parsed;
+ } catch (_) {}
+ }
+ return {
+ available: function () { return Boolean(payload); },
+ repository: function () { return payload ? payload.repository : null; },
+ node: function (id) {
+ var sources = payload && payload.nodes ? payload.nodes[id] : null;
+ return Array.isArray(sources) ? sources.slice() : [];
+ }
+ };
+ })();
+
/* ============================================================
Explore — stable-ID neighborhood focus + dependency-free pan/zoom.
Renderer IDs become deep-linkable semantic hooks without turning the
@@ -5953,6 +6066,9 @@
var context = document.getElementById('focus-context');
var tag = document.getElementById('focus-tag');
var semanticId = document.getElementById('focus-id');
+ var evidence = document.getElementById('focus-evidence');
+ var repositoryLink = document.getElementById('focus-repository');
+ var evidenceLinks = document.getElementById('focus-evidence-links');
var summary = document.getElementById('focus-summary');
var relationshipList = document.getElementById('relationship-lens-list');
var copyBtn = document.getElementById('btn-focus-copy');
@@ -5985,6 +6101,43 @@
element.textContent = normalized;
element.hidden = !normalized;
}
+ function renderSourceEvidence(id) {
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
+ var sources = Archify.sourceEvidence.node(id);
+ var repository = Archify.sourceEvidence.repository();
+ if (!repository || !sources.length) {
+ evidence.hidden = true;
+ return;
+ }
+ var slug = repository.url.replace(/^https:\/\/github\.com\//, '').replace(/\/$/, '');
+ repositoryLink.href = repository.url + '/tree/' + repository.revision;
+ repositoryLink.textContent = slug + ' @ ' + repository.shortRevision;
+ repositoryLink.setAttribute('aria-label', 'Open verified repository revision ' + repository.revision);
+ sources.forEach(function (source) {
+ var link = document.createElement('a');
+ link.className = 'semantic-passport-source';
+ link.href = source.href;
+ link.target = '_blank';
+ link.rel = 'noopener noreferrer';
+ link.referrerPolicy = 'no-referrer';
+ link.setAttribute('aria-label', 'Open verified source ' + source.path + ' at revision ' + repository.shortRevision);
+ var name = document.createElement('strong');
+ name.textContent = source.label || source.path.split('/').pop() || source.path;
+ var location = document.createElement('code');
+ location.textContent = source.line
+ ? 'L' + source.line + (source.endLine && source.endLine !== source.line ? '–' + source.endLine : '') + ' ↗'
+ : 'Open ↗';
+ var sourcePath = document.createElement('small');
+ sourcePath.textContent = source.path;
+ link.appendChild(name);
+ link.appendChild(location);
+ link.appendChild(sourcePath);
+ evidenceLinks.appendChild(link);
+ });
+ evidence.hidden = false;
+ }
function renderPassport(id, node) {
setPassportValue(detail, node.getAttribute('data-node-sublabel'));
setPassportValue(kind, node.getAttribute('data-node-kind') || 'node');
@@ -5992,6 +6145,7 @@
setPassportValue(tag, node.getAttribute('data-node-tag'));
semanticId.textContent = id;
semanticId.hidden = false;
+ renderSourceEvidence(id);
}
function relationshipsFor(id, byId) {
var seen = {};
@@ -6671,6 +6825,10 @@
tag.hidden = true;
semanticId.textContent = '';
semanticId.hidden = true;
+ evidence.hidden = true;
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
summary.textContent = '';
relationshipList.textContent = '';
copyBtn.textContent = 'Copy link';
@@ -9692,6 +9850,10 @@
var context = node.getAttribute('data-node-context') || '';
var tag = node.getAttribute('data-node-tag') || '';
var type = semanticType(node);
+ var sources = Archify.sourceEvidence.node(id);
+ var sourceSearch = sources.map(function (source) {
+ return [source.path, source.label, source.line, source.endLine].filter(Boolean).join(' ');
+ }).join(' ');
return {
id: id,
label: label,
@@ -9699,8 +9861,9 @@
sublabel: sublabel,
context: context,
tag: tag,
+ sources: sources,
links: connectionsFor(id),
- search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + text).toLowerCase(),
+ search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + sourceSearch + ' ' + text).toLowerCase(),
node: node
};
});
diff --git a/docs/gallery/artifacts/event-stream.dataflow.html b/docs/gallery/artifacts/event-stream.dataflow.html
index d3eb754e..0e050c40 100644
--- a/docs/gallery/artifacts/event-stream.dataflow.html
+++ b/docs/gallery/artifacts/event-stream.dataflow.html
@@ -1420,6 +1420,88 @@
.semantic-passport-meta [hidden] { display: none; }
html[data-preset="blueprint"] .semantic-passport-meta span,
html[data-preset="blueprint"] .semantic-passport-meta code { border-radius: 0.1rem; }
+ .semantic-passport-evidence {
+ margin-top: 0.52rem;
+ padding: 0.5rem;
+ border: 1px solid color-mix(in srgb, var(--backend-stroke) 32%, var(--toolbar-border));
+ border-radius: 0.55rem;
+ background: color-mix(in srgb, var(--backend-fill) 18%, var(--panel));
+ }
+ .semantic-passport-evidence[hidden] { display: none; }
+ html[data-preset="blueprint"] .semantic-passport-evidence { border-radius: 0.18rem; }
+ .semantic-passport-evidence-head {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.55rem;
+ margin-bottom: 0.35rem;
+ }
+ .semantic-passport-evidence-status {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.28rem;
+ color: var(--backend-stroke);
+ font-size: 0.5rem;
+ font-weight: 800;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ }
+ .semantic-passport-evidence-status::before {
+ content: '';
+ width: 0.38rem;
+ height: 0.38rem;
+ border-radius: 50%;
+ background: var(--backend-stroke);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--backend-stroke) 14%, transparent);
+ }
+ .semantic-passport-repository {
+ min-width: 0;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-decoration: none;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-repository:hover,
+ .semantic-passport-repository:focus-visible { color: var(--backend-stroke); }
+ .semantic-passport-evidence-links { display: grid; gap: 0.22rem; }
+ .semantic-passport-source {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) auto;
+ gap: 0.15rem 0.45rem;
+ align-items: center;
+ padding: 0.34rem 0.4rem;
+ border: 1px solid transparent;
+ border-radius: 0.38rem;
+ color: var(--text-muted);
+ text-decoration: none;
+ }
+ .semantic-passport-source:hover,
+ .semantic-passport-source:focus-visible {
+ border-color: color-mix(in srgb, var(--backend-stroke) 42%, transparent);
+ background: color-mix(in srgb, var(--backend-fill) 32%, transparent);
+ color: var(--text);
+ }
+ .semantic-passport-source strong {
+ overflow: hidden;
+ font-size: 0.5625rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-source code {
+ color: var(--backend-stroke);
+ font: inherit;
+ font-size: 0.5rem;
+ }
+ .semantic-passport-source small {
+ grid-column: 1 / -1;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
.relationship-lens-summary {
display: block;
margin-top: 0.12rem;
@@ -3841,6 +3923,7 @@
</div>
<script id="archify-guided-views-data" type="application/json">[{"id":"order-transit","label":"Order event transit","focus":["checkout","orders","validate","state","fulfillment"],"note":"Follow an order from producer through ordered processing to fulfillment."},{"id":"payment-transit","label":"Payment event transit","focus":["billing","payments","enrich","state","analytics"],"note":"Track payment facts into the shared materialized state and analytics."},{"id":"failure-and-replay","label":"Failure and replay","focus":["validate","enrich","dlq","replay","ops"],"note":"Isolate dead letters, operator review, and controlled replay ownership."}]</script>
+
<div class="guided-views no-print" id="guided-views" hidden aria-label="Guided diagram views">
<button id="guided-view-prev" type="button" aria-label="Previous guided view" title="Previous guided view ([)">&#8592;</button>
<div class="guided-view-copy">
@@ -4256,6 +4339,13 @@
<span id="focus-tag" data-passport="tag" hidden></span>
<code id="focus-id" data-passport="id"></code>
</div>
+ <div class="semantic-passport-evidence" id="focus-evidence" hidden aria-label="Verified source evidence">
+ <div class="semantic-passport-evidence-head">
+ <span class="semantic-passport-evidence-status">Verified source</span>
+ <a class="semantic-passport-repository" id="focus-repository" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer"></a>
+ </div>
+ <div class="semantic-passport-evidence-links" id="focus-evidence-links"></div>
+ </div>
<span class="relationship-lens-summary" id="focus-summary" aria-live="polite"></span>
</div>
<div class="relationship-lens-actions">
@@ -6009,6 +6099,29 @@
};
})();
+ /* Verified repository evidence is emitted only after the renderer checks
+ the authored GitHub revision, source blobs, and optional line ranges
+ against the explicit --repo-root. It remains outside the SVG so every
+ canonical visual export stays free of repository paths. */
+ Archify.sourceEvidence = (function () {
+ var element = document.getElementById('archify-source-evidence-data');
+ var payload = null;
+ if (element) {
+ try {
+ var parsed = JSON.parse(element.textContent || 'null');
+ if (parsed && parsed.verified === true && parsed.repository && parsed.nodes) payload = parsed;
+ } catch (_) {}
+ }
+ return {
+ available: function () { return Boolean(payload); },
+ repository: function () { return payload ? payload.repository : null; },
+ node: function (id) {
+ var sources = payload && payload.nodes ? payload.nodes[id] : null;
+ return Array.isArray(sources) ? sources.slice() : [];
+ }
+ };
+ })();
+
/* ============================================================
Explore — stable-ID neighborhood focus + dependency-free pan/zoom.
Renderer IDs become deep-linkable semantic hooks without turning the
@@ -6025,6 +6138,9 @@
var context = document.getElementById('focus-context');
var tag = document.getElementById('focus-tag');
var semanticId = document.getElementById('focus-id');
+ var evidence = document.getElementById('focus-evidence');
+ var repositoryLink = document.getElementById('focus-repository');
+ var evidenceLinks = document.getElementById('focus-evidence-links');
var summary = document.getElementById('focus-summary');
var relationshipList = document.getElementById('relationship-lens-list');
var copyBtn = document.getElementById('btn-focus-copy');
@@ -6057,6 +6173,43 @@
element.textContent = normalized;
element.hidden = !normalized;
}
+ function renderSourceEvidence(id) {
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
+ var sources = Archify.sourceEvidence.node(id);
+ var repository = Archify.sourceEvidence.repository();
+ if (!repository || !sources.length) {
+ evidence.hidden = true;
+ return;
+ }
+ var slug = repository.url.replace(/^https:\/\/github\.com\//, '').replace(/\/$/, '');
+ repositoryLink.href = repository.url + '/tree/' + repository.revision;
+ repositoryLink.textContent = slug + ' @ ' + repository.shortRevision;
+ repositoryLink.setAttribute('aria-label', 'Open verified repository revision ' + repository.revision);
+ sources.forEach(function (source) {
+ var link = document.createElement('a');
+ link.className = 'semantic-passport-source';
+ link.href = source.href;
+ link.target = '_blank';
+ link.rel = 'noopener noreferrer';
+ link.referrerPolicy = 'no-referrer';
+ link.setAttribute('aria-label', 'Open verified source ' + source.path + ' at revision ' + repository.shortRevision);
+ var name = document.createElement('strong');
+ name.textContent = source.label || source.path.split('/').pop() || source.path;
+ var location = document.createElement('code');
+ location.textContent = source.line
+ ? 'L' + source.line + (source.endLine && source.endLine !== source.line ? '–' + source.endLine : '') + ' ↗'
+ : 'Open ↗';
+ var sourcePath = document.createElement('small');
+ sourcePath.textContent = source.path;
+ link.appendChild(name);
+ link.appendChild(location);
+ link.appendChild(sourcePath);
+ evidenceLinks.appendChild(link);
+ });
+ evidence.hidden = false;
+ }
function renderPassport(id, node) {
setPassportValue(detail, node.getAttribute('data-node-sublabel'));
setPassportValue(kind, node.getAttribute('data-node-kind') || 'node');
@@ -6064,6 +6217,7 @@
setPassportValue(tag, node.getAttribute('data-node-tag'));
semanticId.textContent = id;
semanticId.hidden = false;
+ renderSourceEvidence(id);
}
function relationshipsFor(id, byId) {
var seen = {};
@@ -6743,6 +6897,10 @@
tag.hidden = true;
semanticId.textContent = '';
semanticId.hidden = true;
+ evidence.hidden = true;
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
summary.textContent = '';
relationshipList.textContent = '';
copyBtn.textContent = 'Copy link';
@@ -9764,6 +9922,10 @@
var context = node.getAttribute('data-node-context') || '';
var tag = node.getAttribute('data-node-tag') || '';
var type = semanticType(node);
+ var sources = Archify.sourceEvidence.node(id);
+ var sourceSearch = sources.map(function (source) {
+ return [source.path, source.label, source.line, source.endLine].filter(Boolean).join(' ');
+ }).join(' ');
return {
id: id,
label: label,
@@ -9771,8 +9933,9 @@
sublabel: sublabel,
context: context,
tag: tag,
+ sources: sources,
links: connectionsFor(id),
- search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + text).toLowerCase(),
+ search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + sourceSearch + ' ' + text).toLowerCase(),
node: node
};
});
diff --git a/docs/gallery/artifacts/incident-response.workflow.html b/docs/gallery/artifacts/incident-response.workflow.html
index 643a613d..43a7642e 100644
--- a/docs/gallery/artifacts/incident-response.workflow.html
+++ b/docs/gallery/artifacts/incident-response.workflow.html
@@ -1420,6 +1420,88 @@
.semantic-passport-meta [hidden] { display: none; }
html[data-preset="blueprint"] .semantic-passport-meta span,
html[data-preset="blueprint"] .semantic-passport-meta code { border-radius: 0.1rem; }
+ .semantic-passport-evidence {
+ margin-top: 0.52rem;
+ padding: 0.5rem;
+ border: 1px solid color-mix(in srgb, var(--backend-stroke) 32%, var(--toolbar-border));
+ border-radius: 0.55rem;
+ background: color-mix(in srgb, var(--backend-fill) 18%, var(--panel));
+ }
+ .semantic-passport-evidence[hidden] { display: none; }
+ html[data-preset="blueprint"] .semantic-passport-evidence { border-radius: 0.18rem; }
+ .semantic-passport-evidence-head {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.55rem;
+ margin-bottom: 0.35rem;
+ }
+ .semantic-passport-evidence-status {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.28rem;
+ color: var(--backend-stroke);
+ font-size: 0.5rem;
+ font-weight: 800;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ }
+ .semantic-passport-evidence-status::before {
+ content: '';
+ width: 0.38rem;
+ height: 0.38rem;
+ border-radius: 50%;
+ background: var(--backend-stroke);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--backend-stroke) 14%, transparent);
+ }
+ .semantic-passport-repository {
+ min-width: 0;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-decoration: none;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-repository:hover,
+ .semantic-passport-repository:focus-visible { color: var(--backend-stroke); }
+ .semantic-passport-evidence-links { display: grid; gap: 0.22rem; }
+ .semantic-passport-source {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) auto;
+ gap: 0.15rem 0.45rem;
+ align-items: center;
+ padding: 0.34rem 0.4rem;
+ border: 1px solid transparent;
+ border-radius: 0.38rem;
+ color: var(--text-muted);
+ text-decoration: none;
+ }
+ .semantic-passport-source:hover,
+ .semantic-passport-source:focus-visible {
+ border-color: color-mix(in srgb, var(--backend-stroke) 42%, transparent);
+ background: color-mix(in srgb, var(--backend-fill) 32%, transparent);
+ color: var(--text);
+ }
+ .semantic-passport-source strong {
+ overflow: hidden;
+ font-size: 0.5625rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-source code {
+ color: var(--backend-stroke);
+ font: inherit;
+ font-size: 0.5rem;
+ }
+ .semantic-passport-source small {
+ grid-column: 1 / -1;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
.relationship-lens-summary {
display: block;
margin-top: 0.12rem;
@@ -3841,6 +3923,7 @@
</div>
<script id="archify-guided-views-data" type="application/json">[{"id":"detect-and-triage","label":"Detect and establish command","focus":["alert","page","triage","declare"],"note":"Follow the first minutes from signal to an owned incident."},{"id":"mitigate-and-verify","label":"Mitigate and prove recovery","focus":["triage","contain","recover","verify","close"],"note":"Keep mitigation separate from the evidence required to close."},{"id":"escalate-and-communicate","label":"Escalation and communication","focus":["declare","escalate","update","rollback"],"note":"See who is paged, what stakeholders hear, and when rollback begins."}]</script>
+
<div class="guided-views no-print" id="guided-views" hidden aria-label="Guided diagram views">
<button id="guided-view-prev" type="button" aria-label="Previous guided view" title="Previous guided view ([)">&#8592;</button>
<div class="guided-view-copy">
@@ -4219,6 +4302,13 @@
<span id="focus-tag" data-passport="tag" hidden></span>
<code id="focus-id" data-passport="id"></code>
</div>
+ <div class="semantic-passport-evidence" id="focus-evidence" hidden aria-label="Verified source evidence">
+ <div class="semantic-passport-evidence-head">
+ <span class="semantic-passport-evidence-status">Verified source</span>
+ <a class="semantic-passport-repository" id="focus-repository" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer"></a>
+ </div>
+ <div class="semantic-passport-evidence-links" id="focus-evidence-links"></div>
+ </div>
<span class="relationship-lens-summary" id="focus-summary" aria-live="polite"></span>
</div>
<div class="relationship-lens-actions">
@@ -5972,6 +6062,29 @@
};
})();
+ /* Verified repository evidence is emitted only after the renderer checks
+ the authored GitHub revision, source blobs, and optional line ranges
+ against the explicit --repo-root. It remains outside the SVG so every
+ canonical visual export stays free of repository paths. */
+ Archify.sourceEvidence = (function () {
+ var element = document.getElementById('archify-source-evidence-data');
+ var payload = null;
+ if (element) {
+ try {
+ var parsed = JSON.parse(element.textContent || 'null');
+ if (parsed && parsed.verified === true && parsed.repository && parsed.nodes) payload = parsed;
+ } catch (_) {}
+ }
+ return {
+ available: function () { return Boolean(payload); },
+ repository: function () { return payload ? payload.repository : null; },
+ node: function (id) {
+ var sources = payload && payload.nodes ? payload.nodes[id] : null;
+ return Array.isArray(sources) ? sources.slice() : [];
+ }
+ };
+ })();
+
/* ============================================================
Explore — stable-ID neighborhood focus + dependency-free pan/zoom.
Renderer IDs become deep-linkable semantic hooks without turning the
@@ -5988,6 +6101,9 @@
var context = document.getElementById('focus-context');
var tag = document.getElementById('focus-tag');
var semanticId = document.getElementById('focus-id');
+ var evidence = document.getElementById('focus-evidence');
+ var repositoryLink = document.getElementById('focus-repository');
+ var evidenceLinks = document.getElementById('focus-evidence-links');
var summary = document.getElementById('focus-summary');
var relationshipList = document.getElementById('relationship-lens-list');
var copyBtn = document.getElementById('btn-focus-copy');
@@ -6020,6 +6136,43 @@
element.textContent = normalized;
element.hidden = !normalized;
}
+ function renderSourceEvidence(id) {
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
+ var sources = Archify.sourceEvidence.node(id);
+ var repository = Archify.sourceEvidence.repository();
+ if (!repository || !sources.length) {
+ evidence.hidden = true;
+ return;
+ }
+ var slug = repository.url.replace(/^https:\/\/github\.com\//, '').replace(/\/$/, '');
+ repositoryLink.href = repository.url + '/tree/' + repository.revision;
+ repositoryLink.textContent = slug + ' @ ' + repository.shortRevision;
+ repositoryLink.setAttribute('aria-label', 'Open verified repository revision ' + repository.revision);
+ sources.forEach(function (source) {
+ var link = document.createElement('a');
+ link.className = 'semantic-passport-source';
+ link.href = source.href;
+ link.target = '_blank';
+ link.rel = 'noopener noreferrer';
+ link.referrerPolicy = 'no-referrer';
+ link.setAttribute('aria-label', 'Open verified source ' + source.path + ' at revision ' + repository.shortRevision);
+ var name = document.createElement('strong');
+ name.textContent = source.label || source.path.split('/').pop() || source.path;
+ var location = document.createElement('code');
+ location.textContent = source.line
+ ? 'L' + source.line + (source.endLine && source.endLine !== source.line ? '–' + source.endLine : '') + ' ↗'
+ : 'Open ↗';
+ var sourcePath = document.createElement('small');
+ sourcePath.textContent = source.path;
+ link.appendChild(name);
+ link.appendChild(location);
+ link.appendChild(sourcePath);
+ evidenceLinks.appendChild(link);
+ });
+ evidence.hidden = false;
+ }
function renderPassport(id, node) {
setPassportValue(detail, node.getAttribute('data-node-sublabel'));
setPassportValue(kind, node.getAttribute('data-node-kind') || 'node');
@@ -6027,6 +6180,7 @@
setPassportValue(tag, node.getAttribute('data-node-tag'));
semanticId.textContent = id;
semanticId.hidden = false;
+ renderSourceEvidence(id);
}
function relationshipsFor(id, byId) {
var seen = {};
@@ -6706,6 +6860,10 @@
tag.hidden = true;
semanticId.textContent = '';
semanticId.hidden = true;
+ evidence.hidden = true;
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
summary.textContent = '';
relationshipList.textContent = '';
copyBtn.textContent = 'Copy link';
@@ -9727,6 +9885,10 @@
var context = node.getAttribute('data-node-context') || '';
var tag = node.getAttribute('data-node-tag') || '';
var type = semanticType(node);
+ var sources = Archify.sourceEvidence.node(id);
+ var sourceSearch = sources.map(function (source) {
+ return [source.path, source.label, source.line, source.endLine].filter(Boolean).join(' ');
+ }).join(' ');
return {
id: id,
label: label,
@@ -9734,8 +9896,9 @@
sublabel: sublabel,
context: context,
tag: tag,
+ sources: sources,
links: connectionsFor(id),
- search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + text).toLowerCase(),
+ search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + sourceSearch + ' ' + text).toLowerCase(),
node: node
};
});
diff --git a/docs/gallery/artifacts/product-analytics.dataflow.html b/docs/gallery/artifacts/product-analytics.dataflow.html
index b168261e..cb539363 100644
--- a/docs/gallery/artifacts/product-analytics.dataflow.html
+++ b/docs/gallery/artifacts/product-analytics.dataflow.html
@@ -1420,6 +1420,88 @@
.semantic-passport-meta [hidden] { display: none; }
html[data-preset="blueprint"] .semantic-passport-meta span,
html[data-preset="blueprint"] .semantic-passport-meta code { border-radius: 0.1rem; }
+ .semantic-passport-evidence {
+ margin-top: 0.52rem;
+ padding: 0.5rem;
+ border: 1px solid color-mix(in srgb, var(--backend-stroke) 32%, var(--toolbar-border));
+ border-radius: 0.55rem;
+ background: color-mix(in srgb, var(--backend-fill) 18%, var(--panel));
+ }
+ .semantic-passport-evidence[hidden] { display: none; }
+ html[data-preset="blueprint"] .semantic-passport-evidence { border-radius: 0.18rem; }
+ .semantic-passport-evidence-head {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.55rem;
+ margin-bottom: 0.35rem;
+ }
+ .semantic-passport-evidence-status {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.28rem;
+ color: var(--backend-stroke);
+ font-size: 0.5rem;
+ font-weight: 800;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ }
+ .semantic-passport-evidence-status::before {
+ content: '';
+ width: 0.38rem;
+ height: 0.38rem;
+ border-radius: 50%;
+ background: var(--backend-stroke);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--backend-stroke) 14%, transparent);
+ }
+ .semantic-passport-repository {
+ min-width: 0;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-decoration: none;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-repository:hover,
+ .semantic-passport-repository:focus-visible { color: var(--backend-stroke); }
+ .semantic-passport-evidence-links { display: grid; gap: 0.22rem; }
+ .semantic-passport-source {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) auto;
+ gap: 0.15rem 0.45rem;
+ align-items: center;
+ padding: 0.34rem 0.4rem;
+ border: 1px solid transparent;
+ border-radius: 0.38rem;
+ color: var(--text-muted);
+ text-decoration: none;
+ }
+ .semantic-passport-source:hover,
+ .semantic-passport-source:focus-visible {
+ border-color: color-mix(in srgb, var(--backend-stroke) 42%, transparent);
+ background: color-mix(in srgb, var(--backend-fill) 32%, transparent);
+ color: var(--text);
+ }
+ .semantic-passport-source strong {
+ overflow: hidden;
+ font-size: 0.5625rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-source code {
+ color: var(--backend-stroke);
+ font: inherit;
+ font-size: 0.5rem;
+ }
+ .semantic-passport-source small {
+ grid-column: 1 / -1;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
.relationship-lens-summary {
display: block;
margin-top: 0.12rem;
@@ -3841,6 +3923,7 @@
</div>
<script id="archify-guided-views-data" type="application/json">[{"id":"collection-path","label":"Collection path","focus":["web","mobile","edge","stream"],"note":"Follow product events from clients into the ordered event stream."},{"id":"consent-boundary","label":"Consent and PII","focus":["edge","consent","pii"],"note":"Isolate the policy gate and restricted identity store."},{"id":"analytics-consumers","label":"Curated consumers","focus":["stream","warehouse","dashboard","features","model"],"note":"See curated facts, dashboards, and the derived feature path."}]</script>
+
<div class="guided-views no-print" id="guided-views" hidden aria-label="Guided diagram views">
<button id="guided-view-prev" type="button" aria-label="Previous guided view" title="Previous guided view ([)">&#8592;</button>
<div class="guided-view-copy">
@@ -4217,6 +4300,13 @@
<span id="focus-tag" data-passport="tag" hidden></span>
<code id="focus-id" data-passport="id"></code>
</div>
+ <div class="semantic-passport-evidence" id="focus-evidence" hidden aria-label="Verified source evidence">
+ <div class="semantic-passport-evidence-head">
+ <span class="semantic-passport-evidence-status">Verified source</span>
+ <a class="semantic-passport-repository" id="focus-repository" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer"></a>
+ </div>
+ <div class="semantic-passport-evidence-links" id="focus-evidence-links"></div>
+ </div>
<span class="relationship-lens-summary" id="focus-summary" aria-live="polite"></span>
</div>
<div class="relationship-lens-actions">
@@ -5970,6 +6060,29 @@
};
})();
+ /* Verified repository evidence is emitted only after the renderer checks
+ the authored GitHub revision, source blobs, and optional line ranges
+ against the explicit --repo-root. It remains outside the SVG so every
+ canonical visual export stays free of repository paths. */
+ Archify.sourceEvidence = (function () {
+ var element = document.getElementById('archify-source-evidence-data');
+ var payload = null;
+ if (element) {
+ try {
+ var parsed = JSON.parse(element.textContent || 'null');
+ if (parsed && parsed.verified === true && parsed.repository && parsed.nodes) payload = parsed;
+ } catch (_) {}
+ }
+ return {
+ available: function () { return Boolean(payload); },
+ repository: function () { return payload ? payload.repository : null; },
+ node: function (id) {
+ var sources = payload && payload.nodes ? payload.nodes[id] : null;
+ return Array.isArray(sources) ? sources.slice() : [];
+ }
+ };
+ })();
+
/* ============================================================
Explore — stable-ID neighborhood focus + dependency-free pan/zoom.
Renderer IDs become deep-linkable semantic hooks without turning the
@@ -5986,6 +6099,9 @@
var context = document.getElementById('focus-context');
var tag = document.getElementById('focus-tag');
var semanticId = document.getElementById('focus-id');
+ var evidence = document.getElementById('focus-evidence');
+ var repositoryLink = document.getElementById('focus-repository');
+ var evidenceLinks = document.getElementById('focus-evidence-links');
var summary = document.getElementById('focus-summary');
var relationshipList = document.getElementById('relationship-lens-list');
var copyBtn = document.getElementById('btn-focus-copy');
@@ -6018,6 +6134,43 @@
element.textContent = normalized;
element.hidden = !normalized;
}
+ function renderSourceEvidence(id) {
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
+ var sources = Archify.sourceEvidence.node(id);
+ var repository = Archify.sourceEvidence.repository();
+ if (!repository || !sources.length) {
+ evidence.hidden = true;
+ return;
+ }
+ var slug = repository.url.replace(/^https:\/\/github\.com\//, '').replace(/\/$/, '');
+ repositoryLink.href = repository.url + '/tree/' + repository.revision;
+ repositoryLink.textContent = slug + ' @ ' + repository.shortRevision;
+ repositoryLink.setAttribute('aria-label', 'Open verified repository revision ' + repository.revision);
+ sources.forEach(function (source) {
+ var link = document.createElement('a');
+ link.className = 'semantic-passport-source';
+ link.href = source.href;
+ link.target = '_blank';
+ link.rel = 'noopener noreferrer';
+ link.referrerPolicy = 'no-referrer';
+ link.setAttribute('aria-label', 'Open verified source ' + source.path + ' at revision ' + repository.shortRevision);
+ var name = document.createElement('strong');
+ name.textContent = source.label || source.path.split('/').pop() || source.path;
+ var location = document.createElement('code');
+ location.textContent = source.line
+ ? 'L' + source.line + (source.endLine && source.endLine !== source.line ? '–' + source.endLine : '') + ' ↗'
+ : 'Open ↗';
+ var sourcePath = document.createElement('small');
+ sourcePath.textContent = source.path;
+ link.appendChild(name);
+ link.appendChild(location);
+ link.appendChild(sourcePath);
+ evidenceLinks.appendChild(link);
+ });
+ evidence.hidden = false;
+ }
function renderPassport(id, node) {
setPassportValue(detail, node.getAttribute('data-node-sublabel'));
setPassportValue(kind, node.getAttribute('data-node-kind') || 'node');
@@ -6025,6 +6178,7 @@
setPassportValue(tag, node.getAttribute('data-node-tag'));
semanticId.textContent = id;
semanticId.hidden = false;
+ renderSourceEvidence(id);
}
function relationshipsFor(id, byId) {
var seen = {};
@@ -6704,6 +6858,10 @@
tag.hidden = true;
semanticId.textContent = '';
semanticId.hidden = true;
+ evidence.hidden = true;
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
summary.textContent = '';
relationshipList.textContent = '';
copyBtn.textContent = 'Copy link';
@@ -9725,6 +9883,10 @@
var context = node.getAttribute('data-node-context') || '';
var tag = node.getAttribute('data-node-tag') || '';
var type = semanticType(node);
+ var sources = Archify.sourceEvidence.node(id);
+ var sourceSearch = sources.map(function (source) {
+ return [source.path, source.label, source.line, source.endLine].filter(Boolean).join(' ');
+ }).join(' ');
return {
id: id,
label: label,
@@ -9732,8 +9894,9 @@
sublabel: sublabel,
context: context,
tag: tag,
+ sources: sources,
links: connectionsFor(id),
- search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + text).toLowerCase(),
+ search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + sourceSearch + ' ' + text).toLowerCase(),
node: node
};
});
diff --git a/docs/gallery/artifacts/production-deployment.architecture.html b/docs/gallery/artifacts/production-deployment.architecture.html
index 9a8f6703..9d21fee7 100644
--- a/docs/gallery/artifacts/production-deployment.architecture.html
+++ b/docs/gallery/artifacts/production-deployment.architecture.html
@@ -1420,6 +1420,88 @@
.semantic-passport-meta [hidden] { display: none; }
html[data-preset="blueprint"] .semantic-passport-meta span,
html[data-preset="blueprint"] .semantic-passport-meta code { border-radius: 0.1rem; }
+ .semantic-passport-evidence {
+ margin-top: 0.52rem;
+ padding: 0.5rem;
+ border: 1px solid color-mix(in srgb, var(--backend-stroke) 32%, var(--toolbar-border));
+ border-radius: 0.55rem;
+ background: color-mix(in srgb, var(--backend-fill) 18%, var(--panel));
+ }
+ .semantic-passport-evidence[hidden] { display: none; }
+ html[data-preset="blueprint"] .semantic-passport-evidence { border-radius: 0.18rem; }
+ .semantic-passport-evidence-head {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.55rem;
+ margin-bottom: 0.35rem;
+ }
+ .semantic-passport-evidence-status {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.28rem;
+ color: var(--backend-stroke);
+ font-size: 0.5rem;
+ font-weight: 800;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ }
+ .semantic-passport-evidence-status::before {
+ content: '';
+ width: 0.38rem;
+ height: 0.38rem;
+ border-radius: 50%;
+ background: var(--backend-stroke);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--backend-stroke) 14%, transparent);
+ }
+ .semantic-passport-repository {
+ min-width: 0;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-decoration: none;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-repository:hover,
+ .semantic-passport-repository:focus-visible { color: var(--backend-stroke); }
+ .semantic-passport-evidence-links { display: grid; gap: 0.22rem; }
+ .semantic-passport-source {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) auto;
+ gap: 0.15rem 0.45rem;
+ align-items: center;
+ padding: 0.34rem 0.4rem;
+ border: 1px solid transparent;
+ border-radius: 0.38rem;
+ color: var(--text-muted);
+ text-decoration: none;
+ }
+ .semantic-passport-source:hover,
+ .semantic-passport-source:focus-visible {
+ border-color: color-mix(in srgb, var(--backend-stroke) 42%, transparent);
+ background: color-mix(in srgb, var(--backend-fill) 32%, transparent);
+ color: var(--text);
+ }
+ .semantic-passport-source strong {
+ overflow: hidden;
+ font-size: 0.5625rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-source code {
+ color: var(--backend-stroke);
+ font: inherit;
+ font-size: 0.5rem;
+ }
+ .semantic-passport-source small {
+ grid-column: 1 / -1;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
.relationship-lens-summary {
display: block;
margin-top: 0.12rem;
@@ -3841,6 +3923,7 @@
</div>
<script id="archify-guided-views-data" type="application/json">[{"id":"request-boundary","label":"Request crosses the edge","focus":["clients","edge","gateway","api_a","api_b"],"note":"Follow public traffic into the private application network."},{"id":"state-ownership","label":"State and ownership","focus":["api_a","api_b","redis","postgres","replica"],"note":"Separate stateless platform workloads from data-team-owned state."},{"id":"async-operations","label":"Async and operations","focus":["api_b","events","worker","audit","observability"],"note":"See the asynchronous work and the evidence it emits."}]</script>
+
<div class="guided-views no-print" id="guided-views" hidden aria-label="Guided diagram views">
<button id="guided-view-prev" type="button" aria-label="Previous guided view" title="Previous guided view ([)">&#8592;</button>
<div class="guided-view-copy">
@@ -4236,6 +4319,13 @@
<span id="focus-tag" data-passport="tag" hidden></span>
<code id="focus-id" data-passport="id"></code>
</div>
+ <div class="semantic-passport-evidence" id="focus-evidence" hidden aria-label="Verified source evidence">
+ <div class="semantic-passport-evidence-head">
+ <span class="semantic-passport-evidence-status">Verified source</span>
+ <a class="semantic-passport-repository" id="focus-repository" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer"></a>
+ </div>
+ <div class="semantic-passport-evidence-links" id="focus-evidence-links"></div>
+ </div>
<span class="relationship-lens-summary" id="focus-summary" aria-live="polite"></span>
</div>
<div class="relationship-lens-actions">
@@ -5989,6 +6079,29 @@
};
})();
+ /* Verified repository evidence is emitted only after the renderer checks
+ the authored GitHub revision, source blobs, and optional line ranges
+ against the explicit --repo-root. It remains outside the SVG so every
+ canonical visual export stays free of repository paths. */
+ Archify.sourceEvidence = (function () {
+ var element = document.getElementById('archify-source-evidence-data');
+ var payload = null;
+ if (element) {
+ try {
+ var parsed = JSON.parse(element.textContent || 'null');
+ if (parsed && parsed.verified === true && parsed.repository && parsed.nodes) payload = parsed;
+ } catch (_) {}
+ }
+ return {
+ available: function () { return Boolean(payload); },
+ repository: function () { return payload ? payload.repository : null; },
+ node: function (id) {
+ var sources = payload && payload.nodes ? payload.nodes[id] : null;
+ return Array.isArray(sources) ? sources.slice() : [];
+ }
+ };
+ })();
+
/* ============================================================
Explore — stable-ID neighborhood focus + dependency-free pan/zoom.
Renderer IDs become deep-linkable semantic hooks without turning the
@@ -6005,6 +6118,9 @@
var context = document.getElementById('focus-context');
var tag = document.getElementById('focus-tag');
var semanticId = document.getElementById('focus-id');
+ var evidence = document.getElementById('focus-evidence');
+ var repositoryLink = document.getElementById('focus-repository');
+ var evidenceLinks = document.getElementById('focus-evidence-links');
var summary = document.getElementById('focus-summary');
var relationshipList = document.getElementById('relationship-lens-list');
var copyBtn = document.getElementById('btn-focus-copy');
@@ -6037,6 +6153,43 @@
element.textContent = normalized;
element.hidden = !normalized;
}
+ function renderSourceEvidence(id) {
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
+ var sources = Archify.sourceEvidence.node(id);
+ var repository = Archify.sourceEvidence.repository();
+ if (!repository || !sources.length) {
+ evidence.hidden = true;
+ return;
+ }
+ var slug = repository.url.replace(/^https:\/\/github\.com\//, '').replace(/\/$/, '');
+ repositoryLink.href = repository.url + '/tree/' + repository.revision;
+ repositoryLink.textContent = slug + ' @ ' + repository.shortRevision;
+ repositoryLink.setAttribute('aria-label', 'Open verified repository revision ' + repository.revision);
+ sources.forEach(function (source) {
+ var link = document.createElement('a');
+ link.className = 'semantic-passport-source';
+ link.href = source.href;
+ link.target = '_blank';
+ link.rel = 'noopener noreferrer';
+ link.referrerPolicy = 'no-referrer';
+ link.setAttribute('aria-label', 'Open verified source ' + source.path + ' at revision ' + repository.shortRevision);
+ var name = document.createElement('strong');
+ name.textContent = source.label || source.path.split('/').pop() || source.path;
+ var location = document.createElement('code');
+ location.textContent = source.line
+ ? 'L' + source.line + (source.endLine && source.endLine !== source.line ? '–' + source.endLine : '') + ' ↗'
+ : 'Open ↗';
+ var sourcePath = document.createElement('small');
+ sourcePath.textContent = source.path;
+ link.appendChild(name);
+ link.appendChild(location);
+ link.appendChild(sourcePath);
+ evidenceLinks.appendChild(link);
+ });
+ evidence.hidden = false;
+ }
function renderPassport(id, node) {
setPassportValue(detail, node.getAttribute('data-node-sublabel'));
setPassportValue(kind, node.getAttribute('data-node-kind') || 'node');
@@ -6044,6 +6197,7 @@
setPassportValue(tag, node.getAttribute('data-node-tag'));
semanticId.textContent = id;
semanticId.hidden = false;
+ renderSourceEvidence(id);
}
function relationshipsFor(id, byId) {
var seen = {};
@@ -6723,6 +6877,10 @@
tag.hidden = true;
semanticId.textContent = '';
semanticId.hidden = true;
+ evidence.hidden = true;
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
summary.textContent = '';
relationshipList.textContent = '';
copyBtn.textContent = 'Copy link';
@@ -9744,6 +9902,10 @@
var context = node.getAttribute('data-node-context') || '';
var tag = node.getAttribute('data-node-tag') || '';
var type = semanticType(node);
+ var sources = Archify.sourceEvidence.node(id);
+ var sourceSearch = sources.map(function (source) {
+ return [source.path, source.label, source.line, source.endLine].filter(Boolean).join(' ');
+ }).join(' ');
return {
id: id,
label: label,
@@ -9751,8 +9913,9 @@
sublabel: sublabel,
context: context,
tag: tag,
+ sources: sources,
links: connectionsFor(id),
- search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + text).toLowerCase(),
+ search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + sourceSearch + ' ' + text).toLowerCase(),
node: node
};
});
diff --git a/docs/gallery/artifacts/release-delivery.workflow.html b/docs/gallery/artifacts/release-delivery.workflow.html
index 9ea36080..b7e523a7 100644
--- a/docs/gallery/artifacts/release-delivery.workflow.html
+++ b/docs/gallery/artifacts/release-delivery.workflow.html
@@ -1420,6 +1420,88 @@
.semantic-passport-meta [hidden] { display: none; }
html[data-preset="blueprint"] .semantic-passport-meta span,
html[data-preset="blueprint"] .semantic-passport-meta code { border-radius: 0.1rem; }
+ .semantic-passport-evidence {
+ margin-top: 0.52rem;
+ padding: 0.5rem;
+ border: 1px solid color-mix(in srgb, var(--backend-stroke) 32%, var(--toolbar-border));
+ border-radius: 0.55rem;
+ background: color-mix(in srgb, var(--backend-fill) 18%, var(--panel));
+ }
+ .semantic-passport-evidence[hidden] { display: none; }
+ html[data-preset="blueprint"] .semantic-passport-evidence { border-radius: 0.18rem; }
+ .semantic-passport-evidence-head {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.55rem;
+ margin-bottom: 0.35rem;
+ }
+ .semantic-passport-evidence-status {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.28rem;
+ color: var(--backend-stroke);
+ font-size: 0.5rem;
+ font-weight: 800;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ }
+ .semantic-passport-evidence-status::before {
+ content: '';
+ width: 0.38rem;
+ height: 0.38rem;
+ border-radius: 50%;
+ background: var(--backend-stroke);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--backend-stroke) 14%, transparent);
+ }
+ .semantic-passport-repository {
+ min-width: 0;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-decoration: none;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-repository:hover,
+ .semantic-passport-repository:focus-visible { color: var(--backend-stroke); }
+ .semantic-passport-evidence-links { display: grid; gap: 0.22rem; }
+ .semantic-passport-source {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) auto;
+ gap: 0.15rem 0.45rem;
+ align-items: center;
+ padding: 0.34rem 0.4rem;
+ border: 1px solid transparent;
+ border-radius: 0.38rem;
+ color: var(--text-muted);
+ text-decoration: none;
+ }
+ .semantic-passport-source:hover,
+ .semantic-passport-source:focus-visible {
+ border-color: color-mix(in srgb, var(--backend-stroke) 42%, transparent);
+ background: color-mix(in srgb, var(--backend-fill) 32%, transparent);
+ color: var(--text);
+ }
+ .semantic-passport-source strong {
+ overflow: hidden;
+ font-size: 0.5625rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-source code {
+ color: var(--backend-stroke);
+ font: inherit;
+ font-size: 0.5rem;
+ }
+ .semantic-passport-source small {
+ grid-column: 1 / -1;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
.relationship-lens-summary {
display: block;
margin-top: 0.12rem;
@@ -3841,6 +3923,7 @@
</div>
<script id="archify-guided-views-data" type="application/json">[{"id":"commit-to-checks","label":"Commit to green build","focus":["commit","pull_request","build","checks"],"note":"Follow the change through reproducible build and blocking quality gates."},{"id":"approval-to-production","label":"Approve and promote","focus":["checks","approval","deploy","verify_prod","announce"],"note":"See who authorizes production and how success is verified."},{"id":"rollback-path","label":"Failure and rollback","focus":["checks","failed","verify_prod","rollback","deploy"],"note":"Isolate the two places where delivery stops or reverses safely."}]</script>
+
<div class="guided-views no-print" id="guided-views" hidden aria-label="Guided diagram views">
<button id="guided-view-prev" type="button" aria-label="Previous guided view" title="Previous guided view ([)">&#8592;</button>
<div class="guided-view-copy">
@@ -4219,6 +4302,13 @@
<span id="focus-tag" data-passport="tag" hidden></span>
<code id="focus-id" data-passport="id"></code>
</div>
+ <div class="semantic-passport-evidence" id="focus-evidence" hidden aria-label="Verified source evidence">
+ <div class="semantic-passport-evidence-head">
+ <span class="semantic-passport-evidence-status">Verified source</span>
+ <a class="semantic-passport-repository" id="focus-repository" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer"></a>
+ </div>
+ <div class="semantic-passport-evidence-links" id="focus-evidence-links"></div>
+ </div>
<span class="relationship-lens-summary" id="focus-summary" aria-live="polite"></span>
</div>
<div class="relationship-lens-actions">
@@ -5972,6 +6062,29 @@
};
})();
+ /* Verified repository evidence is emitted only after the renderer checks
+ the authored GitHub revision, source blobs, and optional line ranges
+ against the explicit --repo-root. It remains outside the SVG so every
+ canonical visual export stays free of repository paths. */
+ Archify.sourceEvidence = (function () {
+ var element = document.getElementById('archify-source-evidence-data');
+ var payload = null;
+ if (element) {
+ try {
+ var parsed = JSON.parse(element.textContent || 'null');
+ if (parsed && parsed.verified === true && parsed.repository && parsed.nodes) payload = parsed;
+ } catch (_) {}
+ }
+ return {
+ available: function () { return Boolean(payload); },
+ repository: function () { return payload ? payload.repository : null; },
+ node: function (id) {
+ var sources = payload && payload.nodes ? payload.nodes[id] : null;
+ return Array.isArray(sources) ? sources.slice() : [];
+ }
+ };
+ })();
+
/* ============================================================
Explore — stable-ID neighborhood focus + dependency-free pan/zoom.
Renderer IDs become deep-linkable semantic hooks without turning the
@@ -5988,6 +6101,9 @@
var context = document.getElementById('focus-context');
var tag = document.getElementById('focus-tag');
var semanticId = document.getElementById('focus-id');
+ var evidence = document.getElementById('focus-evidence');
+ var repositoryLink = document.getElementById('focus-repository');
+ var evidenceLinks = document.getElementById('focus-evidence-links');
var summary = document.getElementById('focus-summary');
var relationshipList = document.getElementById('relationship-lens-list');
var copyBtn = document.getElementById('btn-focus-copy');
@@ -6020,6 +6136,43 @@
element.textContent = normalized;
element.hidden = !normalized;
}
+ function renderSourceEvidence(id) {
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
+ var sources = Archify.sourceEvidence.node(id);
+ var repository = Archify.sourceEvidence.repository();
+ if (!repository || !sources.length) {
+ evidence.hidden = true;
+ return;
+ }
+ var slug = repository.url.replace(/^https:\/\/github\.com\//, '').replace(/\/$/, '');
+ repositoryLink.href = repository.url + '/tree/' + repository.revision;
+ repositoryLink.textContent = slug + ' @ ' + repository.shortRevision;
+ repositoryLink.setAttribute('aria-label', 'Open verified repository revision ' + repository.revision);
+ sources.forEach(function (source) {
+ var link = document.createElement('a');
+ link.className = 'semantic-passport-source';
+ link.href = source.href;
+ link.target = '_blank';
+ link.rel = 'noopener noreferrer';
+ link.referrerPolicy = 'no-referrer';
+ link.setAttribute('aria-label', 'Open verified source ' + source.path + ' at revision ' + repository.shortRevision);
+ var name = document.createElement('strong');
+ name.textContent = source.label || source.path.split('/').pop() || source.path;
+ var location = document.createElement('code');
+ location.textContent = source.line
+ ? 'L' + source.line + (source.endLine && source.endLine !== source.line ? '–' + source.endLine : '') + ' ↗'
+ : 'Open ↗';
+ var sourcePath = document.createElement('small');
+ sourcePath.textContent = source.path;
+ link.appendChild(name);
+ link.appendChild(location);
+ link.appendChild(sourcePath);
+ evidenceLinks.appendChild(link);
+ });
+ evidence.hidden = false;
+ }
function renderPassport(id, node) {
setPassportValue(detail, node.getAttribute('data-node-sublabel'));
setPassportValue(kind, node.getAttribute('data-node-kind') || 'node');
@@ -6027,6 +6180,7 @@
setPassportValue(tag, node.getAttribute('data-node-tag'));
semanticId.textContent = id;
semanticId.hidden = false;
+ renderSourceEvidence(id);
}
function relationshipsFor(id, byId) {
var seen = {};
@@ -6706,6 +6860,10 @@
tag.hidden = true;
semanticId.textContent = '';
semanticId.hidden = true;
+ evidence.hidden = true;
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
summary.textContent = '';
relationshipList.textContent = '';
copyBtn.textContent = 'Copy link';
@@ -9727,6 +9885,10 @@
var context = node.getAttribute('data-node-context') || '';
var tag = node.getAttribute('data-node-tag') || '';
var type = semanticType(node);
+ var sources = Archify.sourceEvidence.node(id);
+ var sourceSearch = sources.map(function (source) {
+ return [source.path, source.label, source.line, source.endLine].filter(Boolean).join(' ');
+ }).join(' ');
return {
id: id,
label: label,
@@ -9734,8 +9896,9 @@
sublabel: sublabel,
context: context,
tag: tag,
+ sources: sources,
links: connectionsFor(id),
- search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + text).toLowerCase(),
+ search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + sourceSearch + ' ' + text).toLowerCase(),
node: node
};
});
diff --git a/docs/gallery/artifacts/web-app.architecture.html b/docs/gallery/artifacts/web-app.architecture.html
index 445c2df7..fbe7ff8e 100644
--- a/docs/gallery/artifacts/web-app.architecture.html
+++ b/docs/gallery/artifacts/web-app.architecture.html
@@ -1420,6 +1420,88 @@
.semantic-passport-meta [hidden] { display: none; }
html[data-preset="blueprint"] .semantic-passport-meta span,
html[data-preset="blueprint"] .semantic-passport-meta code { border-radius: 0.1rem; }
+ .semantic-passport-evidence {
+ margin-top: 0.52rem;
+ padding: 0.5rem;
+ border: 1px solid color-mix(in srgb, var(--backend-stroke) 32%, var(--toolbar-border));
+ border-radius: 0.55rem;
+ background: color-mix(in srgb, var(--backend-fill) 18%, var(--panel));
+ }
+ .semantic-passport-evidence[hidden] { display: none; }
+ html[data-preset="blueprint"] .semantic-passport-evidence { border-radius: 0.18rem; }
+ .semantic-passport-evidence-head {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.55rem;
+ margin-bottom: 0.35rem;
+ }
+ .semantic-passport-evidence-status {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.28rem;
+ color: var(--backend-stroke);
+ font-size: 0.5rem;
+ font-weight: 800;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ }
+ .semantic-passport-evidence-status::before {
+ content: '';
+ width: 0.38rem;
+ height: 0.38rem;
+ border-radius: 50%;
+ background: var(--backend-stroke);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--backend-stroke) 14%, transparent);
+ }
+ .semantic-passport-repository {
+ min-width: 0;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-decoration: none;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-repository:hover,
+ .semantic-passport-repository:focus-visible { color: var(--backend-stroke); }
+ .semantic-passport-evidence-links { display: grid; gap: 0.22rem; }
+ .semantic-passport-source {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) auto;
+ gap: 0.15rem 0.45rem;
+ align-items: center;
+ padding: 0.34rem 0.4rem;
+ border: 1px solid transparent;
+ border-radius: 0.38rem;
+ color: var(--text-muted);
+ text-decoration: none;
+ }
+ .semantic-passport-source:hover,
+ .semantic-passport-source:focus-visible {
+ border-color: color-mix(in srgb, var(--backend-stroke) 42%, transparent);
+ background: color-mix(in srgb, var(--backend-fill) 32%, transparent);
+ color: var(--text);
+ }
+ .semantic-passport-source strong {
+ overflow: hidden;
+ font-size: 0.5625rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-source code {
+ color: var(--backend-stroke);
+ font: inherit;
+ font-size: 0.5rem;
+ }
+ .semantic-passport-source small {
+ grid-column: 1 / -1;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
.relationship-lens-summary {
display: block;
margin-top: 0.12rem;
@@ -3841,6 +3923,7 @@
</div>
<script id="archify-guided-views-data" type="application/json">[{"id":"request-path","label":"Primary request path","focus":["users","cdn","lb","api","db"],"note":"Follow the primary customer request from the edge to durable state."},{"id":"identity-and-cache","label":"Identity and cache","focus":["auth","api","cache"],"note":"Isolate authentication and the read-through cache beside the request path."},{"id":"async-work","label":"Static and async work","focus":["cdn","s3","api","queue","worker"],"note":"See the two secondary paths without adding noise to the main request."}]</script>
+
<div class="guided-views no-print" id="guided-views" hidden aria-label="Guided diagram views">
<button id="guided-view-prev" type="button" aria-label="Previous guided view" title="Previous guided view ([)">&#8592;</button>
<div class="guided-view-copy">
@@ -4188,6 +4271,13 @@
<span id="focus-tag" data-passport="tag" hidden></span>
<code id="focus-id" data-passport="id"></code>
</div>
+ <div class="semantic-passport-evidence" id="focus-evidence" hidden aria-label="Verified source evidence">
+ <div class="semantic-passport-evidence-head">
+ <span class="semantic-passport-evidence-status">Verified source</span>
+ <a class="semantic-passport-repository" id="focus-repository" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer"></a>
+ </div>
+ <div class="semantic-passport-evidence-links" id="focus-evidence-links"></div>
+ </div>
<span class="relationship-lens-summary" id="focus-summary" aria-live="polite"></span>
</div>
<div class="relationship-lens-actions">
@@ -5939,6 +6029,29 @@
};
})();
+ /* Verified repository evidence is emitted only after the renderer checks
+ the authored GitHub revision, source blobs, and optional line ranges
+ against the explicit --repo-root. It remains outside the SVG so every
+ canonical visual export stays free of repository paths. */
+ Archify.sourceEvidence = (function () {
+ var element = document.getElementById('archify-source-evidence-data');
+ var payload = null;
+ if (element) {
+ try {
+ var parsed = JSON.parse(element.textContent || 'null');
+ if (parsed && parsed.verified === true && parsed.repository && parsed.nodes) payload = parsed;
+ } catch (_) {}
+ }
+ return {
+ available: function () { return Boolean(payload); },
+ repository: function () { return payload ? payload.repository : null; },
+ node: function (id) {
+ var sources = payload && payload.nodes ? payload.nodes[id] : null;
+ return Array.isArray(sources) ? sources.slice() : [];
+ }
+ };
+ })();
+
/* ============================================================
Explore — stable-ID neighborhood focus + dependency-free pan/zoom.
Renderer IDs become deep-linkable semantic hooks without turning the
@@ -5955,6 +6068,9 @@
var context = document.getElementById('focus-context');
var tag = document.getElementById('focus-tag');
var semanticId = document.getElementById('focus-id');
+ var evidence = document.getElementById('focus-evidence');
+ var repositoryLink = document.getElementById('focus-repository');
+ var evidenceLinks = document.getElementById('focus-evidence-links');
var summary = document.getElementById('focus-summary');
var relationshipList = document.getElementById('relationship-lens-list');
var copyBtn = document.getElementById('btn-focus-copy');
@@ -5987,6 +6103,43 @@
element.textContent = normalized;
element.hidden = !normalized;
}
+ function renderSourceEvidence(id) {
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
+ var sources = Archify.sourceEvidence.node(id);
+ var repository = Archify.sourceEvidence.repository();
+ if (!repository || !sources.length) {
+ evidence.hidden = true;
+ return;
+ }
+ var slug = repository.url.replace(/^https:\/\/github\.com\//, '').replace(/\/$/, '');
+ repositoryLink.href = repository.url + '/tree/' + repository.revision;
+ repositoryLink.textContent = slug + ' @ ' + repository.shortRevision;
+ repositoryLink.setAttribute('aria-label', 'Open verified repository revision ' + repository.revision);
+ sources.forEach(function (source) {
+ var link = document.createElement('a');
+ link.className = 'semantic-passport-source';
+ link.href = source.href;
+ link.target = '_blank';
+ link.rel = 'noopener noreferrer';
+ link.referrerPolicy = 'no-referrer';
+ link.setAttribute('aria-label', 'Open verified source ' + source.path + ' at revision ' + repository.shortRevision);
+ var name = document.createElement('strong');
+ name.textContent = source.label || source.path.split('/').pop() || source.path;
+ var location = document.createElement('code');
+ location.textContent = source.line
+ ? 'L' + source.line + (source.endLine && source.endLine !== source.line ? '–' + source.endLine : '') + ' ↗'
+ : 'Open ↗';
+ var sourcePath = document.createElement('small');
+ sourcePath.textContent = source.path;
+ link.appendChild(name);
+ link.appendChild(location);
+ link.appendChild(sourcePath);
+ evidenceLinks.appendChild(link);
+ });
+ evidence.hidden = false;
+ }
function renderPassport(id, node) {
setPassportValue(detail, node.getAttribute('data-node-sublabel'));
setPassportValue(kind, node.getAttribute('data-node-kind') || 'node');
@@ -5994,6 +6147,7 @@
setPassportValue(tag, node.getAttribute('data-node-tag'));
semanticId.textContent = id;
semanticId.hidden = false;
+ renderSourceEvidence(id);
}
function relationshipsFor(id, byId) {
var seen = {};
@@ -6673,6 +6827,10 @@
tag.hidden = true;
semanticId.textContent = '';
semanticId.hidden = true;
+ evidence.hidden = true;
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
summary.textContent = '';
relationshipList.textContent = '';
copyBtn.textContent = 'Copy link';
@@ -9694,6 +9852,10 @@
var context = node.getAttribute('data-node-context') || '';
var tag = node.getAttribute('data-node-tag') || '';
var type = semanticType(node);
+ var sources = Archify.sourceEvidence.node(id);
+ var sourceSearch = sources.map(function (source) {
+ return [source.path, source.label, source.line, source.endLine].filter(Boolean).join(' ');
+ }).join(' ');
return {
id: id,
label: label,
@@ -9701,8 +9863,9 @@
sublabel: sublabel,
context: context,
tag: tag,
+ sources: sources,
links: connectionsFor(id),
- search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + text).toLowerCase(),
+ search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + sourceSearch + ' ' + text).toLowerCase(),
node: node
};
});
diff --git a/docs/gallery/manifest.json b/docs/gallery/manifest.json
index 6467528d..eec168ec 100644
--- a/docs/gallery/manifest.json
+++ b/docs/gallery/manifest.json
@@ -26,8 +26,8 @@
"animation": "trace",
"nodeCount": 12,
"edgeCount": 11,
- "artifactBytes": 555609,
- "artifactSha256": "5c43a0ab01c71246f1d5456c83e2ded3bc22b69c3d07d21a3c2d239e47844093",
+ "artifactBytes": 562473,
+ "artifactSha256": "1e9cc73669e2c164794a5ec4541643fc2f33668a3050aaba6718bae44c98ca7d",
"sourceBytes": 6470,
"sourceSha256": "a3afc6b30044eb256aa15c6195ddfbbcd1a14880d99967ed5605bc621ffb7e5f",
"checks": [
@@ -123,8 +123,8 @@
"animation": "trace",
"nodeCount": 12,
"edgeCount": 12,
- "artifactBytes": 554765,
- "artifactSha256": "3274690d0ead342d5becbc393cdb875622c64cd9fc1207aa26056bceb4cfd701",
+ "artifactBytes": 561629,
+ "artifactSha256": "47493c9094bf3f9490680c26e52d252ac2ccfacb8c88946751f054cdeddb4491",
"sourceBytes": 5308,
"sourceSha256": "c3c4ddc8fd8910d8d2bcf2ba97434017d6fa347eb4ee436d2fb519dd0f27c814",
"checks": [
@@ -220,8 +220,8 @@
"animation": "trace",
"nodeCount": 7,
"edgeCount": 12,
- "artifactBytes": 549256,
- "artifactSha256": "e7389ac65fe931fdf4b1e2884417d4b28993782a03f7c58c54ed4c94e0024ea7",
+ "artifactBytes": 556120,
+ "artifactSha256": "cf31805f2e1646457102c9c9820c7bb43564ca803ce02f88f0acd11be8216191",
"sourceBytes": 4442,
"sourceSha256": "30098d81006a18813bab447da698edf74604a1463770f01dc056b0af8cb314ef",
"checks": [
@@ -317,8 +317,8 @@
"animation": "trace",
"nodeCount": 10,
"edgeCount": 10,
- "artifactBytes": 551875,
- "artifactSha256": "69e46e690349a1f7246da03fda8203e7408ae78fe31b58fbd5ffbfa077798238",
+ "artifactBytes": 558739,
+ "artifactSha256": "69efaaeadb260286252f7099dcaf6c87d456a11dab663ea8c7dcd56e9d870d82",
"sourceBytes": 5256,
"sourceSha256": "44aa56ac6ca807937dfe84a6404e8b07d6394a38ae2ac53248a1985337dfd671",
"checks": [
@@ -414,8 +414,8 @@
"animation": "trace",
"nodeCount": 11,
"edgeCount": 10,
- "artifactBytes": 551733,
- "artifactSha256": "3e2cb119d619870cd7b0d0a7fbcb8bc28203fdf1fc6f6b0736fbf0656ff3e741",
+ "artifactBytes": 558597,
+ "artifactSha256": "28d5bd0b40a69f1d1bee30ba0bd7731cd77d34c75d1f1695b1645bcdb75bf649",
"sourceBytes": 5471,
"sourceSha256": "9beb8698b275679a2fc92d4b51288cd5b5fc2115696d06b9168f3d7fef253a72",
"checks": [
@@ -511,8 +511,8 @@
"animation": "trace",
"nodeCount": 10,
"edgeCount": 10,
- "artifactBytes": 553266,
- "artifactSha256": "9b9e2540f2c2564132bfc8a1d2aa925d4c67e10abef09316990c87487a486dd8",
+ "artifactBytes": 560130,
+ "artifactSha256": "90b1e36a2349ff984629d803d12d8c8b3ac7707e0981733bb29ddc5044a76c36",
"sourceBytes": 5719,
"sourceSha256": "f71c89288f80255bdedcdc0057bcbc155d1d8b1b7476d024b35f4e27c730c974",
"checks": [
@@ -608,8 +608,8 @@
"animation": "trace",
"nodeCount": 7,
"edgeCount": 14,
- "artifactBytes": 550041,
- "artifactSha256": "893d6bc5ee7a0f512dfecc6cae28e300ba0b3288c5287b66ee61934e70f0e7fd",
+ "artifactBytes": 556905,
+ "artifactSha256": "09361c5cab0a63c01896ea8f719c0b2f4612dbddec847d6a54064e844a8d434c",
"sourceBytes": 4483,
"sourceSha256": "1b53d7c4ce7b2d8f6f40b8f33a394abe1d37fc991272b534c1ccd0255920ab52",
"checks": [
@@ -705,8 +705,8 @@
"animation": "trace",
"nodeCount": 12,
"edgeCount": 12,
- "artifactBytes": 557221,
- "artifactSha256": "a7db3af4cbc78cb319f2fba4bb82382a2b54afe92a5cef3ced2c9a0e70d3c9aa",
+ "artifactBytes": 564085,
+ "artifactSha256": "28cfb49400b3ff96d7d4a6ebd97bae32cfdf8f86597a2ef33f90fec808ae2738",
"sourceBytes": 5543,
"sourceSha256": "bbfedc2f1b73bf50932490f7f56d45d5f853e970d2fab26660a04947a783969c",
"checks": [
@@ -802,8 +802,8 @@
"animation": "trace",
"nodeCount": 10,
"edgeCount": 5,
- "artifactBytes": 546211,
- "artifactSha256": "07aa1003935a795145dce6379e26fbbabc77f7ad94573df0961a32fec82e4aaf",
+ "artifactBytes": 553075,
+ "artifactSha256": "2385eaddc81e4c2d56ea23077fad4540b195433358d00205be80704034e0fb41",
"sourceBytes": 4353,
"sourceSha256": "1d6b34282e014cb2730662b1993158ec67bc0ad2a40520cb441aaee1ad21e4c6",
"checks": [
@@ -899,8 +899,8 @@
"animation": "trace",
"nodeCount": 11,
"edgeCount": 6,
- "artifactBytes": 547588,
- "artifactSha256": "fff08f8739134b212ab95f81cd2cb83248c7465c48ee1884074c946a8e90342c",
+ "artifactBytes": 554452,
+ "artifactSha256": "9517099984856af3452af0fa1eb432d6e6be637ab27f9b84b20fe146d02bafc7",
"sourceBytes": 4394,
"sourceSha256": "aa614f0c9a82f210e301e382f362dfbd7f290bda4d5501de3c99a6cd81b4c0a4",
"checks": [
@@ -996,8 +996,8 @@
"animation": "static",
"nodeCount": 10,
"edgeCount": 9,
- "artifactBytes": 547220,
- "artifactSha256": "d8267f4a7745b439f26e167672a55b1821cff70791006920f55e5114289dc46f",
+ "artifactBytes": 554084,
+ "artifactSha256": "47b23020b78a0aff76a04c0bf97d4391471fa1e33c9a4ab14b18179969c2f648",
"sourceBytes": 3863,
"sourceSha256": "01567b5e49cad5139baa071533a028d22f0e80fedfb49095e0d9330aee7f87db",
"checks": [
diff --git a/docs/research-repo-evidence-passport-2026-07-23.md b/docs/research-repo-evidence-passport-2026-07-23.md
new file mode 100644
index 00000000..29951dca
--- /dev/null
+++ b/docs/research-repo-evidence-passport-2026-07-23.md
@@ -0,0 +1,46 @@
+# Repository Evidence Passport — focused research note
+
+Date: 2026-07-23
+Decision: build one bounded Architecture-only slice; do not widen Archify into a code indexer.
+
+## Signal from adjacent projects
+
+- GitNexus treats a code map as useful when it carries real execution flows, impact, staleness, and local/private operation—not merely more node styles ([README at `cdbdf21`, execution model](https://github.com/abhigyanpatwari/GitNexus/blob/cdbdf219dce797e51cdeb8cfa386e77ab2d35628/README.md#L32-L32), [privacy and local operation](https://github.com/abhigyanpatwari/GitNexus/blob/cdbdf219dce797e51cdeb8cfa386e77ab2d35628/README.md#L83-L93), [staleness and process resources](https://github.com/abhigyanpatwari/GitNexus/blob/cdbdf219dce797e51cdeb8cfa386e77ab2d35628/README.md#L168-L172)).
+- CodeBoarding leads with architecture and component diagrams that remain navigable across local workflows, IDEs, CI, and docs ([README at `96c6015`](https://github.com/CodeBoarding/CodeBoarding/blob/96c60153f5169102d49dc3cf4150293df0db1eb0/README.md#L5-L32)).
+- Understand Anything says the graph should teach, then makes nodes clickable/searchable and pairs them with source, relationships, and dependency-ordered tours ([README at `6ae7187`](https://github.com/Egonex-AI/Understand-Anything/blob/6ae71878beb50226a1e4b7e2f52ac6468c86f74b/README.md#L51-L80)). Archify already has search, relationships, guided views, and stories; the missing part is source evidence.
+- CodeVisualizer likewise makes click-to-code, auto-refresh, and local parsing prominent ([README at `5b100b8`](https://github.com/DucPhamNgoc08/CodeVisualizer/blob/5b100b847ec9a86ac07129f7f6ed1a9deafc9ecc/README.md#L96-L119), [privacy](https://github.com/DucPhamNgoc08/CodeVisualizer/blob/5b100b847ec9a86ac07129f7f6ed1a9deafc9ecc/README.md#L264-L269)).
+- Fireworks Tech Graph wins attention through visual breadth and motion, but its current public surface already overlaps Archify's offline HTML/export strengths ([README at `50c819d`](https://github.com/yizhiyanhua-ai/fireworks-tech-graph/blob/50c819d68fd4fee330b3010988cd13e98b678d44/README.md#L136-L153)). Copying more styles is lower-value than making Archify's existing semantic exploration more trustworthy.
+
+## Borrow / skip
+
+Borrow:
+
+1. A selected architecture node can open the exact source file and optional line range.
+2. File paths participate in the existing Node Finder.
+3. Evidence is pinned to a full commit SHA so links cannot silently drift.
+4. Local verification happens before an artifact is written.
+
+Skip:
+
+1. No AST parser, repository crawler, knowledge graph, LLM indexing pipeline, IDE extension, or server.
+2. No additional toolbar control or permanent panel.
+3. No generic “source” label that merely repeats an unverified path.
+4. No private filesystem paths in the artifact, receipt, SVG, raster, Share Card, or WebM.
+
+## Product contract
+
+The feature is opt-in and Architecture-only in its first version:
+
+- `meta.repository.url` is a public GitHub repository URL.
+- `meta.repository.revision` is a full 40-character commit SHA.
+- a component may carry one to three `sources` with repo-relative POSIX paths, optional line ranges, and an optional reader label;
+- `archify render|validate|deliver|preview ... --repo-root <path>` is required when evidence exists;
+- the local repository origin must match the authored public repository;
+- Git must prove the revision, every blob, and every requested line before rendering;
+- a successful delivery receipt reports the verified repository, revision, and reference count;
+- verified references appear inside the existing Semantic Passport and participate in the existing Node Finder;
+- the evidence payload stays outside the canonical SVG, so visual exports remain repository-path-free.
+
+## Why this slice
+
+It closes a concrete trust gap without disturbing the stable renderer, geometry, export, motion, or interaction contracts. It also gives Archify a better growth sentence than “more diagram styles”: **turn a high-level architecture map into a revision-pinned doorway to the code that proves it.**
diff --git a/examples/dataflow-product-analytics.html b/examples/dataflow-product-analytics.html
index b168261e..cb539363 100644
--- a/examples/dataflow-product-analytics.html
+++ b/examples/dataflow-product-analytics.html
@@ -1420,6 +1420,88 @@
.semantic-passport-meta [hidden] { display: none; }
html[data-preset="blueprint"] .semantic-passport-meta span,
html[data-preset="blueprint"] .semantic-passport-meta code { border-radius: 0.1rem; }
+ .semantic-passport-evidence {
+ margin-top: 0.52rem;
+ padding: 0.5rem;
+ border: 1px solid color-mix(in srgb, var(--backend-stroke) 32%, var(--toolbar-border));
+ border-radius: 0.55rem;
+ background: color-mix(in srgb, var(--backend-fill) 18%, var(--panel));
+ }
+ .semantic-passport-evidence[hidden] { display: none; }
+ html[data-preset="blueprint"] .semantic-passport-evidence { border-radius: 0.18rem; }
+ .semantic-passport-evidence-head {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.55rem;
+ margin-bottom: 0.35rem;
+ }
+ .semantic-passport-evidence-status {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.28rem;
+ color: var(--backend-stroke);
+ font-size: 0.5rem;
+ font-weight: 800;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ }
+ .semantic-passport-evidence-status::before {
+ content: '';
+ width: 0.38rem;
+ height: 0.38rem;
+ border-radius: 50%;
+ background: var(--backend-stroke);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--backend-stroke) 14%, transparent);
+ }
+ .semantic-passport-repository {
+ min-width: 0;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-decoration: none;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-repository:hover,
+ .semantic-passport-repository:focus-visible { color: var(--backend-stroke); }
+ .semantic-passport-evidence-links { display: grid; gap: 0.22rem; }
+ .semantic-passport-source {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) auto;
+ gap: 0.15rem 0.45rem;
+ align-items: center;
+ padding: 0.34rem 0.4rem;
+ border: 1px solid transparent;
+ border-radius: 0.38rem;
+ color: var(--text-muted);
+ text-decoration: none;
+ }
+ .semantic-passport-source:hover,
+ .semantic-passport-source:focus-visible {
+ border-color: color-mix(in srgb, var(--backend-stroke) 42%, transparent);
+ background: color-mix(in srgb, var(--backend-fill) 32%, transparent);
+ color: var(--text);
+ }
+ .semantic-passport-source strong {
+ overflow: hidden;
+ font-size: 0.5625rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-source code {
+ color: var(--backend-stroke);
+ font: inherit;
+ font-size: 0.5rem;
+ }
+ .semantic-passport-source small {
+ grid-column: 1 / -1;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
.relationship-lens-summary {
display: block;
margin-top: 0.12rem;
@@ -3841,6 +3923,7 @@
</div>
<script id="archify-guided-views-data" type="application/json">[{"id":"collection-path","label":"Collection path","focus":["web","mobile","edge","stream"],"note":"Follow product events from clients into the ordered event stream."},{"id":"consent-boundary","label":"Consent and PII","focus":["edge","consent","pii"],"note":"Isolate the policy gate and restricted identity store."},{"id":"analytics-consumers","label":"Curated consumers","focus":["stream","warehouse","dashboard","features","model"],"note":"See curated facts, dashboards, and the derived feature path."}]</script>
+
<div class="guided-views no-print" id="guided-views" hidden aria-label="Guided diagram views">
<button id="guided-view-prev" type="button" aria-label="Previous guided view" title="Previous guided view ([)">&#8592;</button>
<div class="guided-view-copy">
@@ -4217,6 +4300,13 @@
<span id="focus-tag" data-passport="tag" hidden></span>
<code id="focus-id" data-passport="id"></code>
</div>
+ <div class="semantic-passport-evidence" id="focus-evidence" hidden aria-label="Verified source evidence">
+ <div class="semantic-passport-evidence-head">
+ <span class="semantic-passport-evidence-status">Verified source</span>
+ <a class="semantic-passport-repository" id="focus-repository" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer"></a>
+ </div>
+ <div class="semantic-passport-evidence-links" id="focus-evidence-links"></div>
+ </div>
<span class="relationship-lens-summary" id="focus-summary" aria-live="polite"></span>
</div>
<div class="relationship-lens-actions">
@@ -5970,6 +6060,29 @@
};
})();
+ /* Verified repository evidence is emitted only after the renderer checks
+ the authored GitHub revision, source blobs, and optional line ranges
+ against the explicit --repo-root. It remains outside the SVG so every
+ canonical visual export stays free of repository paths. */
+ Archify.sourceEvidence = (function () {
+ var element = document.getElementById('archify-source-evidence-data');
+ var payload = null;
+ if (element) {
+ try {
+ var parsed = JSON.parse(element.textContent || 'null');
+ if (parsed && parsed.verified === true && parsed.repository && parsed.nodes) payload = parsed;
+ } catch (_) {}
+ }
+ return {
+ available: function () { return Boolean(payload); },
+ repository: function () { return payload ? payload.repository : null; },
+ node: function (id) {
+ var sources = payload && payload.nodes ? payload.nodes[id] : null;
+ return Array.isArray(sources) ? sources.slice() : [];
+ }
+ };
+ })();
+
/* ============================================================
Explore — stable-ID neighborhood focus + dependency-free pan/zoom.
Renderer IDs become deep-linkable semantic hooks without turning the
@@ -5986,6 +6099,9 @@
var context = document.getElementById('focus-context');
var tag = document.getElementById('focus-tag');
var semanticId = document.getElementById('focus-id');
+ var evidence = document.getElementById('focus-evidence');
+ var repositoryLink = document.getElementById('focus-repository');
+ var evidenceLinks = document.getElementById('focus-evidence-links');
var summary = document.getElementById('focus-summary');
var relationshipList = document.getElementById('relationship-lens-list');
var copyBtn = document.getElementById('btn-focus-copy');
@@ -6018,6 +6134,43 @@
element.textContent = normalized;
element.hidden = !normalized;
}
+ function renderSourceEvidence(id) {
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
+ var sources = Archify.sourceEvidence.node(id);
+ var repository = Archify.sourceEvidence.repository();
+ if (!repository || !sources.length) {
+ evidence.hidden = true;
+ return;
+ }
+ var slug = repository.url.replace(/^https:\/\/github\.com\//, '').replace(/\/$/, '');
+ repositoryLink.href = repository.url + '/tree/' + repository.revision;
+ repositoryLink.textContent = slug + ' @ ' + repository.shortRevision;
+ repositoryLink.setAttribute('aria-label', 'Open verified repository revision ' + repository.revision);
+ sources.forEach(function (source) {
+ var link = document.createElement('a');
+ link.className = 'semantic-passport-source';
+ link.href = source.href;
+ link.target = '_blank';
+ link.rel = 'noopener noreferrer';
+ link.referrerPolicy = 'no-referrer';
+ link.setAttribute('aria-label', 'Open verified source ' + source.path + ' at revision ' + repository.shortRevision);
+ var name = document.createElement('strong');
+ name.textContent = source.label || source.path.split('/').pop() || source.path;
+ var location = document.createElement('code');
+ location.textContent = source.line
+ ? 'L' + source.line + (source.endLine && source.endLine !== source.line ? '–' + source.endLine : '') + ' ↗'
+ : 'Open ↗';
+ var sourcePath = document.createElement('small');
+ sourcePath.textContent = source.path;
+ link.appendChild(name);
+ link.appendChild(location);
+ link.appendChild(sourcePath);
+ evidenceLinks.appendChild(link);
+ });
+ evidence.hidden = false;
+ }
function renderPassport(id, node) {
setPassportValue(detail, node.getAttribute('data-node-sublabel'));
setPassportValue(kind, node.getAttribute('data-node-kind') || 'node');
@@ -6025,6 +6178,7 @@
setPassportValue(tag, node.getAttribute('data-node-tag'));
semanticId.textContent = id;
semanticId.hidden = false;
+ renderSourceEvidence(id);
}
function relationshipsFor(id, byId) {
var seen = {};
@@ -6704,6 +6858,10 @@
tag.hidden = true;
semanticId.textContent = '';
semanticId.hidden = true;
+ evidence.hidden = true;
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
summary.textContent = '';
relationshipList.textContent = '';
copyBtn.textContent = 'Copy link';
@@ -9725,6 +9883,10 @@
var context = node.getAttribute('data-node-context') || '';
var tag = node.getAttribute('data-node-tag') || '';
var type = semanticType(node);
+ var sources = Archify.sourceEvidence.node(id);
+ var sourceSearch = sources.map(function (source) {
+ return [source.path, source.label, source.line, source.endLine].filter(Boolean).join(' ');
+ }).join(' ');
return {
id: id,
label: label,
@@ -9732,8 +9894,9 @@
sublabel: sublabel,
context: context,
tag: tag,
+ sources: sources,
links: connectionsFor(id),
- search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + text).toLowerCase(),
+ search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + sourceSearch + ' ' + text).toLowerCase(),
node: node
};
});
diff --git a/examples/lifecycle-agent-run.html b/examples/lifecycle-agent-run.html
index 25f3d154..81272aed 100644
--- a/examples/lifecycle-agent-run.html
+++ b/examples/lifecycle-agent-run.html
@@ -1420,6 +1420,88 @@
.semantic-passport-meta [hidden] { display: none; }
html[data-preset="blueprint"] .semantic-passport-meta span,
html[data-preset="blueprint"] .semantic-passport-meta code { border-radius: 0.1rem; }
+ .semantic-passport-evidence {
+ margin-top: 0.52rem;
+ padding: 0.5rem;
+ border: 1px solid color-mix(in srgb, var(--backend-stroke) 32%, var(--toolbar-border));
+ border-radius: 0.55rem;
+ background: color-mix(in srgb, var(--backend-fill) 18%, var(--panel));
+ }
+ .semantic-passport-evidence[hidden] { display: none; }
+ html[data-preset="blueprint"] .semantic-passport-evidence { border-radius: 0.18rem; }
+ .semantic-passport-evidence-head {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.55rem;
+ margin-bottom: 0.35rem;
+ }
+ .semantic-passport-evidence-status {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.28rem;
+ color: var(--backend-stroke);
+ font-size: 0.5rem;
+ font-weight: 800;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ }
+ .semantic-passport-evidence-status::before {
+ content: '';
+ width: 0.38rem;
+ height: 0.38rem;
+ border-radius: 50%;
+ background: var(--backend-stroke);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--backend-stroke) 14%, transparent);
+ }
+ .semantic-passport-repository {
+ min-width: 0;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-decoration: none;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-repository:hover,
+ .semantic-passport-repository:focus-visible { color: var(--backend-stroke); }
+ .semantic-passport-evidence-links { display: grid; gap: 0.22rem; }
+ .semantic-passport-source {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) auto;
+ gap: 0.15rem 0.45rem;
+ align-items: center;
+ padding: 0.34rem 0.4rem;
+ border: 1px solid transparent;
+ border-radius: 0.38rem;
+ color: var(--text-muted);
+ text-decoration: none;
+ }
+ .semantic-passport-source:hover,
+ .semantic-passport-source:focus-visible {
+ border-color: color-mix(in srgb, var(--backend-stroke) 42%, transparent);
+ background: color-mix(in srgb, var(--backend-fill) 32%, transparent);
+ color: var(--text);
+ }
+ .semantic-passport-source strong {
+ overflow: hidden;
+ font-size: 0.5625rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-source code {
+ color: var(--backend-stroke);
+ font: inherit;
+ font-size: 0.5rem;
+ }
+ .semantic-passport-source small {
+ grid-column: 1 / -1;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
.relationship-lens-summary {
display: block;
margin-top: 0.12rem;
@@ -3841,6 +3923,7 @@
</div>
<script id="archify-guided-views-data" type="application/json">[{"id":"main-lifecycle","label":"Main lifecycle","focus":["queued","planning","executing","reviewing","completed"],"note":"Follow the ordered phases from accepted request to completed response."},{"id":"human-waits","label":"Human and input waits","focus":["executing","approval","reviewing","blocked"],"note":"See where the run pauses without becoming terminal."},{"id":"recovery-and-exits","label":"Recovery and terminal exits","focus":["executing","failed","blocked","cancelled","expired"],"note":"Separate retryable failure from cancellation and expiry."}]</script>
+
<div class="guided-views no-print" id="guided-views" hidden aria-label="Guided diagram views">
<button id="guided-view-prev" type="button" aria-label="Previous guided view" title="Previous guided view ([)">&#8592;</button>
<div class="guided-view-copy">
@@ -4170,6 +4253,13 @@
<span id="focus-tag" data-passport="tag" hidden></span>
<code id="focus-id" data-passport="id"></code>
</div>
+ <div class="semantic-passport-evidence" id="focus-evidence" hidden aria-label="Verified source evidence">
+ <div class="semantic-passport-evidence-head">
+ <span class="semantic-passport-evidence-status">Verified source</span>
+ <a class="semantic-passport-repository" id="focus-repository" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer"></a>
+ </div>
+ <div class="semantic-passport-evidence-links" id="focus-evidence-links"></div>
+ </div>
<span class="relationship-lens-summary" id="focus-summary" aria-live="polite"></span>
</div>
<div class="relationship-lens-actions">
@@ -5923,6 +6013,29 @@
};
})();
+ /* Verified repository evidence is emitted only after the renderer checks
+ the authored GitHub revision, source blobs, and optional line ranges
+ against the explicit --repo-root. It remains outside the SVG so every
+ canonical visual export stays free of repository paths. */
+ Archify.sourceEvidence = (function () {
+ var element = document.getElementById('archify-source-evidence-data');
+ var payload = null;
+ if (element) {
+ try {
+ var parsed = JSON.parse(element.textContent || 'null');
+ if (parsed && parsed.verified === true && parsed.repository && parsed.nodes) payload = parsed;
+ } catch (_) {}
+ }
+ return {
+ available: function () { return Boolean(payload); },
+ repository: function () { return payload ? payload.repository : null; },
+ node: function (id) {
+ var sources = payload && payload.nodes ? payload.nodes[id] : null;
+ return Array.isArray(sources) ? sources.slice() : [];
+ }
+ };
+ })();
+
/* ============================================================
Explore — stable-ID neighborhood focus + dependency-free pan/zoom.
Renderer IDs become deep-linkable semantic hooks without turning the
@@ -5939,6 +6052,9 @@
var context = document.getElementById('focus-context');
var tag = document.getElementById('focus-tag');
var semanticId = document.getElementById('focus-id');
+ var evidence = document.getElementById('focus-evidence');
+ var repositoryLink = document.getElementById('focus-repository');
+ var evidenceLinks = document.getElementById('focus-evidence-links');
var summary = document.getElementById('focus-summary');
var relationshipList = document.getElementById('relationship-lens-list');
var copyBtn = document.getElementById('btn-focus-copy');
@@ -5971,6 +6087,43 @@
element.textContent = normalized;
element.hidden = !normalized;
}
+ function renderSourceEvidence(id) {
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
+ var sources = Archify.sourceEvidence.node(id);
+ var repository = Archify.sourceEvidence.repository();
+ if (!repository || !sources.length) {
+ evidence.hidden = true;
+ return;
+ }
+ var slug = repository.url.replace(/^https:\/\/github\.com\//, '').replace(/\/$/, '');
+ repositoryLink.href = repository.url + '/tree/' + repository.revision;
+ repositoryLink.textContent = slug + ' @ ' + repository.shortRevision;
+ repositoryLink.setAttribute('aria-label', 'Open verified repository revision ' + repository.revision);
+ sources.forEach(function (source) {
+ var link = document.createElement('a');
+ link.className = 'semantic-passport-source';
+ link.href = source.href;
+ link.target = '_blank';
+ link.rel = 'noopener noreferrer';
+ link.referrerPolicy = 'no-referrer';
+ link.setAttribute('aria-label', 'Open verified source ' + source.path + ' at revision ' + repository.shortRevision);
+ var name = document.createElement('strong');
+ name.textContent = source.label || source.path.split('/').pop() || source.path;
+ var location = document.createElement('code');
+ location.textContent = source.line
+ ? 'L' + source.line + (source.endLine && source.endLine !== source.line ? '–' + source.endLine : '') + ' ↗'
+ : 'Open ↗';
+ var sourcePath = document.createElement('small');
+ sourcePath.textContent = source.path;
+ link.appendChild(name);
+ link.appendChild(location);
+ link.appendChild(sourcePath);
+ evidenceLinks.appendChild(link);
+ });
+ evidence.hidden = false;
+ }
function renderPassport(id, node) {
setPassportValue(detail, node.getAttribute('data-node-sublabel'));
setPassportValue(kind, node.getAttribute('data-node-kind') || 'node');
@@ -5978,6 +6131,7 @@
setPassportValue(tag, node.getAttribute('data-node-tag'));
semanticId.textContent = id;
semanticId.hidden = false;
+ renderSourceEvidence(id);
}
function relationshipsFor(id, byId) {
var seen = {};
@@ -6657,6 +6811,10 @@
tag.hidden = true;
semanticId.textContent = '';
semanticId.hidden = true;
+ evidence.hidden = true;
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
summary.textContent = '';
relationshipList.textContent = '';
copyBtn.textContent = 'Copy link';
@@ -9678,6 +9836,10 @@
var context = node.getAttribute('data-node-context') || '';
var tag = node.getAttribute('data-node-tag') || '';
var type = semanticType(node);
+ var sources = Archify.sourceEvidence.node(id);
+ var sourceSearch = sources.map(function (source) {
+ return [source.path, source.label, source.line, source.endLine].filter(Boolean).join(' ');
+ }).join(' ');
return {
id: id,
label: label,
@@ -9685,8 +9847,9 @@
sublabel: sublabel,
context: context,
tag: tag,
+ sources: sources,
links: connectionsFor(id),
- search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + text).toLowerCase(),
+ search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + sourceSearch + ' ' + text).toLowerCase(),
node: node
};
});
diff --git a/examples/sequence-cache-miss-request.html b/examples/sequence-cache-miss-request.html
index f70ab69f..de3e8572 100644
--- a/examples/sequence-cache-miss-request.html
+++ b/examples/sequence-cache-miss-request.html
@@ -1420,6 +1420,88 @@
.semantic-passport-meta [hidden] { display: none; }
html[data-preset="blueprint"] .semantic-passport-meta span,
html[data-preset="blueprint"] .semantic-passport-meta code { border-radius: 0.1rem; }
+ .semantic-passport-evidence {
+ margin-top: 0.52rem;
+ padding: 0.5rem;
+ border: 1px solid color-mix(in srgb, var(--backend-stroke) 32%, var(--toolbar-border));
+ border-radius: 0.55rem;
+ background: color-mix(in srgb, var(--backend-fill) 18%, var(--panel));
+ }
+ .semantic-passport-evidence[hidden] { display: none; }
+ html[data-preset="blueprint"] .semantic-passport-evidence { border-radius: 0.18rem; }
+ .semantic-passport-evidence-head {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.55rem;
+ margin-bottom: 0.35rem;
+ }
+ .semantic-passport-evidence-status {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.28rem;
+ color: var(--backend-stroke);
+ font-size: 0.5rem;
+ font-weight: 800;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ }
+ .semantic-passport-evidence-status::before {
+ content: '';
+ width: 0.38rem;
+ height: 0.38rem;
+ border-radius: 50%;
+ background: var(--backend-stroke);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--backend-stroke) 14%, transparent);
+ }
+ .semantic-passport-repository {
+ min-width: 0;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-decoration: none;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-repository:hover,
+ .semantic-passport-repository:focus-visible { color: var(--backend-stroke); }
+ .semantic-passport-evidence-links { display: grid; gap: 0.22rem; }
+ .semantic-passport-source {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) auto;
+ gap: 0.15rem 0.45rem;
+ align-items: center;
+ padding: 0.34rem 0.4rem;
+ border: 1px solid transparent;
+ border-radius: 0.38rem;
+ color: var(--text-muted);
+ text-decoration: none;
+ }
+ .semantic-passport-source:hover,
+ .semantic-passport-source:focus-visible {
+ border-color: color-mix(in srgb, var(--backend-stroke) 42%, transparent);
+ background: color-mix(in srgb, var(--backend-fill) 32%, transparent);
+ color: var(--text);
+ }
+ .semantic-passport-source strong {
+ overflow: hidden;
+ font-size: 0.5625rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-source code {
+ color: var(--backend-stroke);
+ font: inherit;
+ font-size: 0.5rem;
+ }
+ .semantic-passport-source small {
+ grid-column: 1 / -1;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
.relationship-lens-summary {
display: block;
margin-top: 0.12rem;
@@ -3841,6 +3923,7 @@
</div>
<script id="archify-guided-views-data" type="application/json">[{"id":"request-and-auth","label":"Request and identity","focus":["user","web","api","auth"],"note":"Follow the user request through the authentication check."},{"id":"cache-fallback","label":"Cache fallback","focus":["api","redis","db"],"note":"See the cache miss and the source-of-truth query it triggers."},{"id":"return-and-trace","label":"Return and trace","focus":["db","api","redis","trace","web","user"],"note":"Separate response latency from the non-blocking observability write."}]</script>
+
<div class="guided-views no-print" id="guided-views" hidden aria-label="Guided diagram views">
<button id="guided-view-prev" type="button" aria-label="Previous guided view" title="Previous guided view ([)">&#8592;</button>
<div class="guided-view-copy">
@@ -4221,6 +4304,13 @@
<span id="focus-tag" data-passport="tag" hidden></span>
<code id="focus-id" data-passport="id"></code>
</div>
+ <div class="semantic-passport-evidence" id="focus-evidence" hidden aria-label="Verified source evidence">
+ <div class="semantic-passport-evidence-head">
+ <span class="semantic-passport-evidence-status">Verified source</span>
+ <a class="semantic-passport-repository" id="focus-repository" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer"></a>
+ </div>
+ <div class="semantic-passport-evidence-links" id="focus-evidence-links"></div>
+ </div>
<span class="relationship-lens-summary" id="focus-summary" aria-live="polite"></span>
</div>
<div class="relationship-lens-actions">
@@ -5974,6 +6064,29 @@
};
})();
+ /* Verified repository evidence is emitted only after the renderer checks
+ the authored GitHub revision, source blobs, and optional line ranges
+ against the explicit --repo-root. It remains outside the SVG so every
+ canonical visual export stays free of repository paths. */
+ Archify.sourceEvidence = (function () {
+ var element = document.getElementById('archify-source-evidence-data');
+ var payload = null;
+ if (element) {
+ try {
+ var parsed = JSON.parse(element.textContent || 'null');
+ if (parsed && parsed.verified === true && parsed.repository && parsed.nodes) payload = parsed;
+ } catch (_) {}
+ }
+ return {
+ available: function () { return Boolean(payload); },
+ repository: function () { return payload ? payload.repository : null; },
+ node: function (id) {
+ var sources = payload && payload.nodes ? payload.nodes[id] : null;
+ return Array.isArray(sources) ? sources.slice() : [];
+ }
+ };
+ })();
+
/* ============================================================
Explore — stable-ID neighborhood focus + dependency-free pan/zoom.
Renderer IDs become deep-linkable semantic hooks without turning the
@@ -5990,6 +6103,9 @@
var context = document.getElementById('focus-context');
var tag = document.getElementById('focus-tag');
var semanticId = document.getElementById('focus-id');
+ var evidence = document.getElementById('focus-evidence');
+ var repositoryLink = document.getElementById('focus-repository');
+ var evidenceLinks = document.getElementById('focus-evidence-links');
var summary = document.getElementById('focus-summary');
var relationshipList = document.getElementById('relationship-lens-list');
var copyBtn = document.getElementById('btn-focus-copy');
@@ -6022,6 +6138,43 @@
element.textContent = normalized;
element.hidden = !normalized;
}
+ function renderSourceEvidence(id) {
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
+ var sources = Archify.sourceEvidence.node(id);
+ var repository = Archify.sourceEvidence.repository();
+ if (!repository || !sources.length) {
+ evidence.hidden = true;
+ return;
+ }
+ var slug = repository.url.replace(/^https:\/\/github\.com\//, '').replace(/\/$/, '');
+ repositoryLink.href = repository.url + '/tree/' + repository.revision;
+ repositoryLink.textContent = slug + ' @ ' + repository.shortRevision;
+ repositoryLink.setAttribute('aria-label', 'Open verified repository revision ' + repository.revision);
+ sources.forEach(function (source) {
+ var link = document.createElement('a');
+ link.className = 'semantic-passport-source';
+ link.href = source.href;
+ link.target = '_blank';
+ link.rel = 'noopener noreferrer';
+ link.referrerPolicy = 'no-referrer';
+ link.setAttribute('aria-label', 'Open verified source ' + source.path + ' at revision ' + repository.shortRevision);
+ var name = document.createElement('strong');
+ name.textContent = source.label || source.path.split('/').pop() || source.path;
+ var location = document.createElement('code');
+ location.textContent = source.line
+ ? 'L' + source.line + (source.endLine && source.endLine !== source.line ? '–' + source.endLine : '') + ' ↗'
+ : 'Open ↗';
+ var sourcePath = document.createElement('small');
+ sourcePath.textContent = source.path;
+ link.appendChild(name);
+ link.appendChild(location);
+ link.appendChild(sourcePath);
+ evidenceLinks.appendChild(link);
+ });
+ evidence.hidden = false;
+ }
function renderPassport(id, node) {
setPassportValue(detail, node.getAttribute('data-node-sublabel'));
setPassportValue(kind, node.getAttribute('data-node-kind') || 'node');
@@ -6029,6 +6182,7 @@
setPassportValue(tag, node.getAttribute('data-node-tag'));
semanticId.textContent = id;
semanticId.hidden = false;
+ renderSourceEvidence(id);
}
function relationshipsFor(id, byId) {
var seen = {};
@@ -6708,6 +6862,10 @@
tag.hidden = true;
semanticId.textContent = '';
semanticId.hidden = true;
+ evidence.hidden = true;
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
summary.textContent = '';
relationshipList.textContent = '';
copyBtn.textContent = 'Copy link';
@@ -9729,6 +9887,10 @@
var context = node.getAttribute('data-node-context') || '';
var tag = node.getAttribute('data-node-tag') || '';
var type = semanticType(node);
+ var sources = Archify.sourceEvidence.node(id);
+ var sourceSearch = sources.map(function (source) {
+ return [source.path, source.label, source.line, source.endLine].filter(Boolean).join(' ');
+ }).join(' ');
return {
id: id,
label: label,
@@ -9736,8 +9898,9 @@
sublabel: sublabel,
context: context,
tag: tag,
+ sources: sources,
links: connectionsFor(id),
- search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + text).toLowerCase(),
+ search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + sourceSearch + ' ' + text).toLowerCase(),
node: node
};
});
diff --git a/examples/web-app-rendered.html b/examples/web-app-rendered.html
index 445c2df7..fbe7ff8e 100644
--- a/examples/web-app-rendered.html
+++ b/examples/web-app-rendered.html
@@ -1420,6 +1420,88 @@
.semantic-passport-meta [hidden] { display: none; }
html[data-preset="blueprint"] .semantic-passport-meta span,
html[data-preset="blueprint"] .semantic-passport-meta code { border-radius: 0.1rem; }
+ .semantic-passport-evidence {
+ margin-top: 0.52rem;
+ padding: 0.5rem;
+ border: 1px solid color-mix(in srgb, var(--backend-stroke) 32%, var(--toolbar-border));
+ border-radius: 0.55rem;
+ background: color-mix(in srgb, var(--backend-fill) 18%, var(--panel));
+ }
+ .semantic-passport-evidence[hidden] { display: none; }
+ html[data-preset="blueprint"] .semantic-passport-evidence { border-radius: 0.18rem; }
+ .semantic-passport-evidence-head {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.55rem;
+ margin-bottom: 0.35rem;
+ }
+ .semantic-passport-evidence-status {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.28rem;
+ color: var(--backend-stroke);
+ font-size: 0.5rem;
+ font-weight: 800;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ }
+ .semantic-passport-evidence-status::before {
+ content: '';
+ width: 0.38rem;
+ height: 0.38rem;
+ border-radius: 50%;
+ background: var(--backend-stroke);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--backend-stroke) 14%, transparent);
+ }
+ .semantic-passport-repository {
+ min-width: 0;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-decoration: none;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-repository:hover,
+ .semantic-passport-repository:focus-visible { color: var(--backend-stroke); }
+ .semantic-passport-evidence-links { display: grid; gap: 0.22rem; }
+ .semantic-passport-source {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) auto;
+ gap: 0.15rem 0.45rem;
+ align-items: center;
+ padding: 0.34rem 0.4rem;
+ border: 1px solid transparent;
+ border-radius: 0.38rem;
+ color: var(--text-muted);
+ text-decoration: none;
+ }
+ .semantic-passport-source:hover,
+ .semantic-passport-source:focus-visible {
+ border-color: color-mix(in srgb, var(--backend-stroke) 42%, transparent);
+ background: color-mix(in srgb, var(--backend-fill) 32%, transparent);
+ color: var(--text);
+ }
+ .semantic-passport-source strong {
+ overflow: hidden;
+ font-size: 0.5625rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-source code {
+ color: var(--backend-stroke);
+ font: inherit;
+ font-size: 0.5rem;
+ }
+ .semantic-passport-source small {
+ grid-column: 1 / -1;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
.relationship-lens-summary {
display: block;
margin-top: 0.12rem;
@@ -3841,6 +3923,7 @@
</div>
<script id="archify-guided-views-data" type="application/json">[{"id":"request-path","label":"Primary request path","focus":["users","cdn","lb","api","db"],"note":"Follow the primary customer request from the edge to durable state."},{"id":"identity-and-cache","label":"Identity and cache","focus":["auth","api","cache"],"note":"Isolate authentication and the read-through cache beside the request path."},{"id":"async-work","label":"Static and async work","focus":["cdn","s3","api","queue","worker"],"note":"See the two secondary paths without adding noise to the main request."}]</script>
+
<div class="guided-views no-print" id="guided-views" hidden aria-label="Guided diagram views">
<button id="guided-view-prev" type="button" aria-label="Previous guided view" title="Previous guided view ([)">&#8592;</button>
<div class="guided-view-copy">
@@ -4188,6 +4271,13 @@
<span id="focus-tag" data-passport="tag" hidden></span>
<code id="focus-id" data-passport="id"></code>
</div>
+ <div class="semantic-passport-evidence" id="focus-evidence" hidden aria-label="Verified source evidence">
+ <div class="semantic-passport-evidence-head">
+ <span class="semantic-passport-evidence-status">Verified source</span>
+ <a class="semantic-passport-repository" id="focus-repository" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer"></a>
+ </div>
+ <div class="semantic-passport-evidence-links" id="focus-evidence-links"></div>
+ </div>
<span class="relationship-lens-summary" id="focus-summary" aria-live="polite"></span>
</div>
<div class="relationship-lens-actions">
@@ -5939,6 +6029,29 @@
};
})();
+ /* Verified repository evidence is emitted only after the renderer checks
+ the authored GitHub revision, source blobs, and optional line ranges
+ against the explicit --repo-root. It remains outside the SVG so every
+ canonical visual export stays free of repository paths. */
+ Archify.sourceEvidence = (function () {
+ var element = document.getElementById('archify-source-evidence-data');
+ var payload = null;
+ if (element) {
+ try {
+ var parsed = JSON.parse(element.textContent || 'null');
+ if (parsed && parsed.verified === true && parsed.repository && parsed.nodes) payload = parsed;
+ } catch (_) {}
+ }
+ return {
+ available: function () { return Boolean(payload); },
+ repository: function () { return payload ? payload.repository : null; },
+ node: function (id) {
+ var sources = payload && payload.nodes ? payload.nodes[id] : null;
+ return Array.isArray(sources) ? sources.slice() : [];
+ }
+ };
+ })();
+
/* ============================================================
Explore — stable-ID neighborhood focus + dependency-free pan/zoom.
Renderer IDs become deep-linkable semantic hooks without turning the
@@ -5955,6 +6068,9 @@
var context = document.getElementById('focus-context');
var tag = document.getElementById('focus-tag');
var semanticId = document.getElementById('focus-id');
+ var evidence = document.getElementById('focus-evidence');
+ var repositoryLink = document.getElementById('focus-repository');
+ var evidenceLinks = document.getElementById('focus-evidence-links');
var summary = document.getElementById('focus-summary');
var relationshipList = document.getElementById('relationship-lens-list');
var copyBtn = document.getElementById('btn-focus-copy');
@@ -5987,6 +6103,43 @@
element.textContent = normalized;
element.hidden = !normalized;
}
+ function renderSourceEvidence(id) {
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
+ var sources = Archify.sourceEvidence.node(id);
+ var repository = Archify.sourceEvidence.repository();
+ if (!repository || !sources.length) {
+ evidence.hidden = true;
+ return;
+ }
+ var slug = repository.url.replace(/^https:\/\/github\.com\//, '').replace(/\/$/, '');
+ repositoryLink.href = repository.url + '/tree/' + repository.revision;
+ repositoryLink.textContent = slug + ' @ ' + repository.shortRevision;
+ repositoryLink.setAttribute('aria-label', 'Open verified repository revision ' + repository.revision);
+ sources.forEach(function (source) {
+ var link = document.createElement('a');
+ link.className = 'semantic-passport-source';
+ link.href = source.href;
+ link.target = '_blank';
+ link.rel = 'noopener noreferrer';
+ link.referrerPolicy = 'no-referrer';
+ link.setAttribute('aria-label', 'Open verified source ' + source.path + ' at revision ' + repository.shortRevision);
+ var name = document.createElement('strong');
+ name.textContent = source.label || source.path.split('/').pop() || source.path;
+ var location = document.createElement('code');
+ location.textContent = source.line
+ ? 'L' + source.line + (source.endLine && source.endLine !== source.line ? '–' + source.endLine : '') + ' ↗'
+ : 'Open ↗';
+ var sourcePath = document.createElement('small');
+ sourcePath.textContent = source.path;
+ link.appendChild(name);
+ link.appendChild(location);
+ link.appendChild(sourcePath);
+ evidenceLinks.appendChild(link);
+ });
+ evidence.hidden = false;
+ }
function renderPassport(id, node) {
setPassportValue(detail, node.getAttribute('data-node-sublabel'));
setPassportValue(kind, node.getAttribute('data-node-kind') || 'node');
@@ -5994,6 +6147,7 @@
setPassportValue(tag, node.getAttribute('data-node-tag'));
semanticId.textContent = id;
semanticId.hidden = false;
+ renderSourceEvidence(id);
}
function relationshipsFor(id, byId) {
var seen = {};
@@ -6673,6 +6827,10 @@
tag.hidden = true;
semanticId.textContent = '';
semanticId.hidden = true;
+ evidence.hidden = true;
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
summary.textContent = '';
relationshipList.textContent = '';
copyBtn.textContent = 'Copy link';
@@ -9694,6 +9852,10 @@
var context = node.getAttribute('data-node-context') || '';
var tag = node.getAttribute('data-node-tag') || '';
var type = semanticType(node);
+ var sources = Archify.sourceEvidence.node(id);
+ var sourceSearch = sources.map(function (source) {
+ return [source.path, source.label, source.line, source.endLine].filter(Boolean).join(' ');
+ }).join(' ');
return {
id: id,
label: label,
@@ -9701,8 +9863,9 @@
sublabel: sublabel,
context: context,
tag: tag,
+ sources: sources,
links: connectionsFor(id),
- search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + text).toLowerCase(),
+ search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + sourceSearch + ' ' + text).toLowerCase(),
node: node
};
});
diff --git a/examples/web-app.html b/examples/web-app.html
index 445c2df7..fbe7ff8e 100644
--- a/examples/web-app.html
+++ b/examples/web-app.html
@@ -1420,6 +1420,88 @@
.semantic-passport-meta [hidden] { display: none; }
html[data-preset="blueprint"] .semantic-passport-meta span,
html[data-preset="blueprint"] .semantic-passport-meta code { border-radius: 0.1rem; }
+ .semantic-passport-evidence {
+ margin-top: 0.52rem;
+ padding: 0.5rem;
+ border: 1px solid color-mix(in srgb, var(--backend-stroke) 32%, var(--toolbar-border));
+ border-radius: 0.55rem;
+ background: color-mix(in srgb, var(--backend-fill) 18%, var(--panel));
+ }
+ .semantic-passport-evidence[hidden] { display: none; }
+ html[data-preset="blueprint"] .semantic-passport-evidence { border-radius: 0.18rem; }
+ .semantic-passport-evidence-head {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.55rem;
+ margin-bottom: 0.35rem;
+ }
+ .semantic-passport-evidence-status {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.28rem;
+ color: var(--backend-stroke);
+ font-size: 0.5rem;
+ font-weight: 800;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ }
+ .semantic-passport-evidence-status::before {
+ content: '';
+ width: 0.38rem;
+ height: 0.38rem;
+ border-radius: 50%;
+ background: var(--backend-stroke);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--backend-stroke) 14%, transparent);
+ }
+ .semantic-passport-repository {
+ min-width: 0;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-decoration: none;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-repository:hover,
+ .semantic-passport-repository:focus-visible { color: var(--backend-stroke); }
+ .semantic-passport-evidence-links { display: grid; gap: 0.22rem; }
+ .semantic-passport-source {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) auto;
+ gap: 0.15rem 0.45rem;
+ align-items: center;
+ padding: 0.34rem 0.4rem;
+ border: 1px solid transparent;
+ border-radius: 0.38rem;
+ color: var(--text-muted);
+ text-decoration: none;
+ }
+ .semantic-passport-source:hover,
+ .semantic-passport-source:focus-visible {
+ border-color: color-mix(in srgb, var(--backend-stroke) 42%, transparent);
+ background: color-mix(in srgb, var(--backend-fill) 32%, transparent);
+ color: var(--text);
+ }
+ .semantic-passport-source strong {
+ overflow: hidden;
+ font-size: 0.5625rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-source code {
+ color: var(--backend-stroke);
+ font: inherit;
+ font-size: 0.5rem;
+ }
+ .semantic-passport-source small {
+ grid-column: 1 / -1;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
.relationship-lens-summary {
display: block;
margin-top: 0.12rem;
@@ -3841,6 +3923,7 @@
</div>
<script id="archify-guided-views-data" type="application/json">[{"id":"request-path","label":"Primary request path","focus":["users","cdn","lb","api","db"],"note":"Follow the primary customer request from the edge to durable state."},{"id":"identity-and-cache","label":"Identity and cache","focus":["auth","api","cache"],"note":"Isolate authentication and the read-through cache beside the request path."},{"id":"async-work","label":"Static and async work","focus":["cdn","s3","api","queue","worker"],"note":"See the two secondary paths without adding noise to the main request."}]</script>
+
<div class="guided-views no-print" id="guided-views" hidden aria-label="Guided diagram views">
<button id="guided-view-prev" type="button" aria-label="Previous guided view" title="Previous guided view ([)">&#8592;</button>
<div class="guided-view-copy">
@@ -4188,6 +4271,13 @@
<span id="focus-tag" data-passport="tag" hidden></span>
<code id="focus-id" data-passport="id"></code>
</div>
+ <div class="semantic-passport-evidence" id="focus-evidence" hidden aria-label="Verified source evidence">
+ <div class="semantic-passport-evidence-head">
+ <span class="semantic-passport-evidence-status">Verified source</span>
+ <a class="semantic-passport-repository" id="focus-repository" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer"></a>
+ </div>
+ <div class="semantic-passport-evidence-links" id="focus-evidence-links"></div>
+ </div>
<span class="relationship-lens-summary" id="focus-summary" aria-live="polite"></span>
</div>
<div class="relationship-lens-actions">
@@ -5939,6 +6029,29 @@
};
})();
+ /* Verified repository evidence is emitted only after the renderer checks
+ the authored GitHub revision, source blobs, and optional line ranges
+ against the explicit --repo-root. It remains outside the SVG so every
+ canonical visual export stays free of repository paths. */
+ Archify.sourceEvidence = (function () {
+ var element = document.getElementById('archify-source-evidence-data');
+ var payload = null;
+ if (element) {
+ try {
+ var parsed = JSON.parse(element.textContent || 'null');
+ if (parsed && parsed.verified === true && parsed.repository && parsed.nodes) payload = parsed;
+ } catch (_) {}
+ }
+ return {
+ available: function () { return Boolean(payload); },
+ repository: function () { return payload ? payload.repository : null; },
+ node: function (id) {
+ var sources = payload && payload.nodes ? payload.nodes[id] : null;
+ return Array.isArray(sources) ? sources.slice() : [];
+ }
+ };
+ })();
+
/* ============================================================
Explore — stable-ID neighborhood focus + dependency-free pan/zoom.
Renderer IDs become deep-linkable semantic hooks without turning the
@@ -5955,6 +6068,9 @@
var context = document.getElementById('focus-context');
var tag = document.getElementById('focus-tag');
var semanticId = document.getElementById('focus-id');
+ var evidence = document.getElementById('focus-evidence');
+ var repositoryLink = document.getElementById('focus-repository');
+ var evidenceLinks = document.getElementById('focus-evidence-links');
var summary = document.getElementById('focus-summary');
var relationshipList = document.getElementById('relationship-lens-list');
var copyBtn = document.getElementById('btn-focus-copy');
@@ -5987,6 +6103,43 @@
element.textContent = normalized;
element.hidden = !normalized;
}
+ function renderSourceEvidence(id) {
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
+ var sources = Archify.sourceEvidence.node(id);
+ var repository = Archify.sourceEvidence.repository();
+ if (!repository || !sources.length) {
+ evidence.hidden = true;
+ return;
+ }
+ var slug = repository.url.replace(/^https:\/\/github\.com\//, '').replace(/\/$/, '');
+ repositoryLink.href = repository.url + '/tree/' + repository.revision;
+ repositoryLink.textContent = slug + ' @ ' + repository.shortRevision;
+ repositoryLink.setAttribute('aria-label', 'Open verified repository revision ' + repository.revision);
+ sources.forEach(function (source) {
+ var link = document.createElement('a');
+ link.className = 'semantic-passport-source';
+ link.href = source.href;
+ link.target = '_blank';
+ link.rel = 'noopener noreferrer';
+ link.referrerPolicy = 'no-referrer';
+ link.setAttribute('aria-label', 'Open verified source ' + source.path + ' at revision ' + repository.shortRevision);
+ var name = document.createElement('strong');
+ name.textContent = source.label || source.path.split('/').pop() || source.path;
+ var location = document.createElement('code');
+ location.textContent = source.line
+ ? 'L' + source.line + (source.endLine && source.endLine !== source.line ? '–' + source.endLine : '') + ' ↗'
+ : 'Open ↗';
+ var sourcePath = document.createElement('small');
+ sourcePath.textContent = source.path;
+ link.appendChild(name);
+ link.appendChild(location);
+ link.appendChild(sourcePath);
+ evidenceLinks.appendChild(link);
+ });
+ evidence.hidden = false;
+ }
function renderPassport(id, node) {
setPassportValue(detail, node.getAttribute('data-node-sublabel'));
setPassportValue(kind, node.getAttribute('data-node-kind') || 'node');
@@ -5994,6 +6147,7 @@
setPassportValue(tag, node.getAttribute('data-node-tag'));
semanticId.textContent = id;
semanticId.hidden = false;
+ renderSourceEvidence(id);
}
function relationshipsFor(id, byId) {
var seen = {};
@@ -6673,6 +6827,10 @@
tag.hidden = true;
semanticId.textContent = '';
semanticId.hidden = true;
+ evidence.hidden = true;
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
summary.textContent = '';
relationshipList.textContent = '';
copyBtn.textContent = 'Copy link';
@@ -9694,6 +9852,10 @@
var context = node.getAttribute('data-node-context') || '';
var tag = node.getAttribute('data-node-tag') || '';
var type = semanticType(node);
+ var sources = Archify.sourceEvidence.node(id);
+ var sourceSearch = sources.map(function (source) {
+ return [source.path, source.label, source.line, source.endLine].filter(Boolean).join(' ');
+ }).join(' ');
return {
id: id,
label: label,
@@ -9701,8 +9863,9 @@
sublabel: sublabel,
context: context,
tag: tag,
+ sources: sources,
links: connectionsFor(id),
- search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + text).toLowerCase(),
+ search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + sourceSearch + ' ' + text).toLowerCase(),
node: node
};
});
diff --git a/examples/workflow-agent-tool-call-rendered.html b/examples/workflow-agent-tool-call-rendered.html
index 355f32f9..6d982a47 100644
--- a/examples/workflow-agent-tool-call-rendered.html
+++ b/examples/workflow-agent-tool-call-rendered.html
@@ -1420,6 +1420,88 @@
.semantic-passport-meta [hidden] { display: none; }
html[data-preset="blueprint"] .semantic-passport-meta span,
html[data-preset="blueprint"] .semantic-passport-meta code { border-radius: 0.1rem; }
+ .semantic-passport-evidence {
+ margin-top: 0.52rem;
+ padding: 0.5rem;
+ border: 1px solid color-mix(in srgb, var(--backend-stroke) 32%, var(--toolbar-border));
+ border-radius: 0.55rem;
+ background: color-mix(in srgb, var(--backend-fill) 18%, var(--panel));
+ }
+ .semantic-passport-evidence[hidden] { display: none; }
+ html[data-preset="blueprint"] .semantic-passport-evidence { border-radius: 0.18rem; }
+ .semantic-passport-evidence-head {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.55rem;
+ margin-bottom: 0.35rem;
+ }
+ .semantic-passport-evidence-status {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.28rem;
+ color: var(--backend-stroke);
+ font-size: 0.5rem;
+ font-weight: 800;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ }
+ .semantic-passport-evidence-status::before {
+ content: '';
+ width: 0.38rem;
+ height: 0.38rem;
+ border-radius: 50%;
+ background: var(--backend-stroke);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--backend-stroke) 14%, transparent);
+ }
+ .semantic-passport-repository {
+ min-width: 0;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-decoration: none;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-repository:hover,
+ .semantic-passport-repository:focus-visible { color: var(--backend-stroke); }
+ .semantic-passport-evidence-links { display: grid; gap: 0.22rem; }
+ .semantic-passport-source {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) auto;
+ gap: 0.15rem 0.45rem;
+ align-items: center;
+ padding: 0.34rem 0.4rem;
+ border: 1px solid transparent;
+ border-radius: 0.38rem;
+ color: var(--text-muted);
+ text-decoration: none;
+ }
+ .semantic-passport-source:hover,
+ .semantic-passport-source:focus-visible {
+ border-color: color-mix(in srgb, var(--backend-stroke) 42%, transparent);
+ background: color-mix(in srgb, var(--backend-fill) 32%, transparent);
+ color: var(--text);
+ }
+ .semantic-passport-source strong {
+ overflow: hidden;
+ font-size: 0.5625rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-source code {
+ color: var(--backend-stroke);
+ font: inherit;
+ font-size: 0.5rem;
+ }
+ .semantic-passport-source small {
+ grid-column: 1 / -1;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
.relationship-lens-summary {
display: block;
margin-top: 0.12rem;
@@ -3841,6 +3923,7 @@
</div>
<script id="archify-guided-views-data" type="application/json">[{"id":"happy-path","label":"Request to result","focus":["user","chat","planner","router","approval","tool","external","final"],"note":"Follow the successful request from user intent to the final reply."},{"id":"safety-gate","label":"Policy and recovery","focus":["router","approval","blocked","retry"],"note":"See where risky work stops, waits for consent, or returns for revision."},{"id":"evidence-loop","label":"Evidence and memory","focus":["external","store","trace"],"note":"Isolate the durable trace and context path behind the visible answer."}]</script>
+
<div class="guided-views no-print" id="guided-views" hidden aria-label="Guided diagram views">
<button id="guided-view-prev" type="button" aria-label="Previous guided view" title="Previous guided view ([)">&#8592;</button>
<div class="guided-view-copy">
@@ -4247,6 +4330,13 @@
<span id="focus-tag" data-passport="tag" hidden></span>
<code id="focus-id" data-passport="id"></code>
</div>
+ <div class="semantic-passport-evidence" id="focus-evidence" hidden aria-label="Verified source evidence">
+ <div class="semantic-passport-evidence-head">
+ <span class="semantic-passport-evidence-status">Verified source</span>
+ <a class="semantic-passport-repository" id="focus-repository" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer"></a>
+ </div>
+ <div class="semantic-passport-evidence-links" id="focus-evidence-links"></div>
+ </div>
<span class="relationship-lens-summary" id="focus-summary" aria-live="polite"></span>
</div>
<div class="relationship-lens-actions">
@@ -6003,6 +6093,29 @@
};
})();
+ /* Verified repository evidence is emitted only after the renderer checks
+ the authored GitHub revision, source blobs, and optional line ranges
+ against the explicit --repo-root. It remains outside the SVG so every
+ canonical visual export stays free of repository paths. */
+ Archify.sourceEvidence = (function () {
+ var element = document.getElementById('archify-source-evidence-data');
+ var payload = null;
+ if (element) {
+ try {
+ var parsed = JSON.parse(element.textContent || 'null');
+ if (parsed && parsed.verified === true && parsed.repository && parsed.nodes) payload = parsed;
+ } catch (_) {}
+ }
+ return {
+ available: function () { return Boolean(payload); },
+ repository: function () { return payload ? payload.repository : null; },
+ node: function (id) {
+ var sources = payload && payload.nodes ? payload.nodes[id] : null;
+ return Array.isArray(sources) ? sources.slice() : [];
+ }
+ };
+ })();
+
/* ============================================================
Explore — stable-ID neighborhood focus + dependency-free pan/zoom.
Renderer IDs become deep-linkable semantic hooks without turning the
@@ -6019,6 +6132,9 @@
var context = document.getElementById('focus-context');
var tag = document.getElementById('focus-tag');
var semanticId = document.getElementById('focus-id');
+ var evidence = document.getElementById('focus-evidence');
+ var repositoryLink = document.getElementById('focus-repository');
+ var evidenceLinks = document.getElementById('focus-evidence-links');
var summary = document.getElementById('focus-summary');
var relationshipList = document.getElementById('relationship-lens-list');
var copyBtn = document.getElementById('btn-focus-copy');
@@ -6051,6 +6167,43 @@
element.textContent = normalized;
element.hidden = !normalized;
}
+ function renderSourceEvidence(id) {
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
+ var sources = Archify.sourceEvidence.node(id);
+ var repository = Archify.sourceEvidence.repository();
+ if (!repository || !sources.length) {
+ evidence.hidden = true;
+ return;
+ }
+ var slug = repository.url.replace(/^https:\/\/github\.com\//, '').replace(/\/$/, '');
+ repositoryLink.href = repository.url + '/tree/' + repository.revision;
+ repositoryLink.textContent = slug + ' @ ' + repository.shortRevision;
+ repositoryLink.setAttribute('aria-label', 'Open verified repository revision ' + repository.revision);
+ sources.forEach(function (source) {
+ var link = document.createElement('a');
+ link.className = 'semantic-passport-source';
+ link.href = source.href;
+ link.target = '_blank';
+ link.rel = 'noopener noreferrer';
+ link.referrerPolicy = 'no-referrer';
+ link.setAttribute('aria-label', 'Open verified source ' + source.path + ' at revision ' + repository.shortRevision);
+ var name = document.createElement('strong');
+ name.textContent = source.label || source.path.split('/').pop() || source.path;
+ var location = document.createElement('code');
+ location.textContent = source.line
+ ? 'L' + source.line + (source.endLine && source.endLine !== source.line ? '–' + source.endLine : '') + ' ↗'
+ : 'Open ↗';
+ var sourcePath = document.createElement('small');
+ sourcePath.textContent = source.path;
+ link.appendChild(name);
+ link.appendChild(location);
+ link.appendChild(sourcePath);
+ evidenceLinks.appendChild(link);
+ });
+ evidence.hidden = false;
+ }
function renderPassport(id, node) {
setPassportValue(detail, node.getAttribute('data-node-sublabel'));
setPassportValue(kind, node.getAttribute('data-node-kind') || 'node');
@@ -6058,6 +6211,7 @@
setPassportValue(tag, node.getAttribute('data-node-tag'));
semanticId.textContent = id;
semanticId.hidden = false;
+ renderSourceEvidence(id);
}
function relationshipsFor(id, byId) {
var seen = {};
@@ -6737,6 +6891,10 @@
tag.hidden = true;
semanticId.textContent = '';
semanticId.hidden = true;
+ evidence.hidden = true;
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
summary.textContent = '';
relationshipList.textContent = '';
copyBtn.textContent = 'Copy link';
@@ -9758,6 +9916,10 @@
var context = node.getAttribute('data-node-context') || '';
var tag = node.getAttribute('data-node-tag') || '';
var type = semanticType(node);
+ var sources = Archify.sourceEvidence.node(id);
+ var sourceSearch = sources.map(function (source) {
+ return [source.path, source.label, source.line, source.endLine].filter(Boolean).join(' ');
+ }).join(' ');
return {
id: id,
label: label,
@@ -9765,8 +9927,9 @@
sublabel: sublabel,
context: context,
tag: tag,
+ sources: sources,
links: connectionsFor(id),
- search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + text).toLowerCase(),
+ search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + sourceSearch + ' ' + text).toLowerCase(),
node: node
};
});
diff --git a/experiments/mco-showcase/mco-runtime.architecture.json b/experiments/mco-showcase/mco-runtime.architecture.json
index e7307c41..ea5696de 100644
--- a/experiments/mco-showcase/mco-runtime.architecture.json
+++ b/experiments/mco-showcase/mco-runtime.architecture.json
@@ -8,6 +8,10 @@
"visual_preset": "signal-flow",
"animation": "trace",
"quality_profile": "showcase",
+ "repository": {
+ "url": "https://github.com/mco-org/mco",
+ "revision": "9f1a1cf1afdc04d7b5406782b40dfec76d9bc798"
+ },
"viewBox": [1680, 720],
"views": [
{
@@ -32,16 +36,16 @@
},
"components": [
{ "id": "callers", "type": "external", "label": "Callers", "sublabel": "human · coding agent", "pos": [30, 280], "size": [132, 66] },
- { "id": "entry", "type": "frontend", "label": "Entry Surfaces", "sublabel": "npm · Python CLI · MCP", "pos": [210, 280], "size": [150, 66], "tag": "bin/mco.js · mco" },
- { "id": "router", "type": "backend", "label": "Command Router", "sublabel": "run · review · doctor", "pos": [410, 280], "size": [150, 66], "tag": "runtime.cli" },
- { "id": "policy", "type": "security", "label": "Config + Policy", "sublabel": "scope · permissions · risk", "pos": [610, 280], "size": [158, 66], "tag": "read_only · write · yolo" },
- { "id": "invocation", "type": "backend", "label": "Invocation Workflow", "sublabel": "parallel · chain · debate", "pos": [820, 280], "size": [170, 66], "tag": "timeouts · cancellation" },
- { "id": "adapters", "type": "backend", "label": "Adapter Registry", "sublabel": "detect · run · poll · cancel", "pos": [1040, 280], "size": [158, 66], "tag": "ProviderAdapter contract" },
- { "id": "transport", "type": "messagebus", "label": "Transport Layer", "sublabel": "shim stdout · ACP JSON-RPC", "pos": [1240, 280], "size": [166, 66], "tag": "decode_transport" },
+ { "id": "entry", "type": "frontend", "label": "Entry Surfaces", "sublabel": "npm · Python CLI · MCP", "pos": [210, 280], "size": [150, 66], "tag": "bin/mco.js · mco", "sources": [{ "path": "bin/mco.js", "line": 1, "label": "npm entry" }, { "path": "runtime/mcp_server.py", "line": 108, "end_line": 153, "label": "MCP entry" }] },
+ { "id": "router", "type": "backend", "label": "Command Router", "sublabel": "run · review · doctor", "pos": [410, 280], "size": [150, 66], "tag": "runtime.cli", "sources": [{ "path": "runtime/cli.py", "line": 1945, "label": "CLI main" }] },
+ { "id": "policy", "type": "security", "label": "Config + Policy", "sublabel": "scope · permissions · risk", "pos": [610, 280], "size": [158, 66], "tag": "read_only · write · yolo", "sources": [{ "path": "runtime/config.py", "line": 24, "label": "Review policy" }, { "path": "runtime/policy.py", "line": 34, "label": "Provider policy preview" }] },
+ { "id": "invocation", "type": "backend", "label": "Invocation Workflow", "sublabel": "parallel · chain · debate", "pos": [820, 280], "size": [170, 66], "tag": "timeouts · cancellation", "sources": [{ "path": "runtime/invocation_runtime.py", "line": 696, "label": "Workflow entry" }, { "path": "runtime/invocation_runtime.py", "line": 156, "label": "Single invocation" }] },
+ { "id": "adapters", "type": "backend", "label": "Adapter Registry", "sublabel": "detect · run · poll · cancel", "pos": [1040, 280], "size": [158, 66], "tag": "ProviderAdapter contract", "sources": [{ "path": "runtime/adapters/__init__.py", "line": 57, "label": "Adapter registry" }, { "path": "runtime/contracts.py", "line": 77, "label": "Provider contract" }] },
+ { "id": "transport", "type": "messagebus", "label": "Transport Layer", "sublabel": "shim stdout · ACP JSON-RPC", "pos": [1240, 280], "size": [166, 66], "tag": "decode_transport", "sources": [{ "path": "runtime/adapters/shim.py", "line": 98, "label": "Shim decode" }, { "path": "runtime/acp/adapter.py", "line": 126, "label": "ACP decode" }] },
{ "id": "providers", "type": "external", "label": "Provider CLIs", "sublabel": "Claude · Codex · Pi · 7 more", "pos": [1460, 280], "size": [176, 66], "tag": "native auth + sandbox" },
- { "id": "session", "type": "backend", "label": "Session Daemon", "sublabel": "detached worker + socket", "pos": [405, 500], "size": [160, 66], "tag": "queue · retry · cancel" },
- { "id": "session_state", "type": "database", "label": "Session State", "sublabel": ".mco/sessions", "pos": [640, 500], "size": [150, 66], "tag": "state · history · logs" },
- { "id": "artifacts", "type": "database", "label": "Invocation Artifacts", "sublabel": "answers · result.md · run.json", "pos": [1240, 500], "size": [166, 66], "tag": "per-stage evidence" },
+ { "id": "session", "type": "backend", "label": "Session Daemon", "sublabel": "detached worker + socket", "pos": [405, 500], "size": [160, 66], "tag": "queue · retry · cancel", "sources": [{ "path": "runtime/session/daemon.py", "line": 50, "label": "Daemon context" }] },
+ { "id": "session_state", "type": "database", "label": "Session State", "sublabel": ".mco/sessions", "pos": [640, 500], "size": [150, 66], "tag": "state · history · logs", "sources": [{ "path": "runtime/session/state.py", "line": 25, "label": "Session state" }] },
+ { "id": "artifacts", "type": "database", "label": "Invocation Artifacts", "sublabel": "answers · result.md · run.json", "pos": [1240, 500], "size": [166, 66], "tag": "per-stage evidence", "sources": [{ "path": "runtime/invocation_artifacts.py", "line": 8, "label": "Artifact writer" }] },
{ "id": "outputs", "type": "external", "label": "Output Consumers", "sublabel": "terminal · agent · CI", "pos": [1460, 500], "size": [176, 66], "tag": "text · JSON · JSONL" }
],
"boundaries": [
diff --git a/experiments/mco-showcase/mco-runtime.html b/experiments/mco-showcase/mco-runtime.html
index b15832bf..2d74d938 100644
--- a/experiments/mco-showcase/mco-runtime.html
+++ b/experiments/mco-showcase/mco-runtime.html
@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name="generator" content="archify 2.11.0">
+ <meta name="generator" content="archify 2.12.0">
<title>MCO Runtime Architecture Diagram</title>
<script>
// Resolve the theme before first paint so light-preference users don't
@@ -505,10 +505,10 @@
.container { max-width: 1200px; margin: 0 auto; }
- .header { margin-bottom: 2rem; padding-right: 23rem; }
+ .header { margin-bottom: 2rem; padding-right: 29.5rem; }
html[data-preset="signal-flow"] .header,
- html[data-preset="blueprint"] .header { padding-right: 23rem; }
+ html[data-preset="blueprint"] .header { padding-right: 29.5rem; }
.header-row {
display: flex;
@@ -1420,6 +1420,88 @@
.semantic-passport-meta [hidden] { display: none; }
html[data-preset="blueprint"] .semantic-passport-meta span,
html[data-preset="blueprint"] .semantic-passport-meta code { border-radius: 0.1rem; }
+ .semantic-passport-evidence {
+ margin-top: 0.52rem;
+ padding: 0.5rem;
+ border: 1px solid color-mix(in srgb, var(--backend-stroke) 32%, var(--toolbar-border));
+ border-radius: 0.55rem;
+ background: color-mix(in srgb, var(--backend-fill) 18%, var(--panel));
+ }
+ .semantic-passport-evidence[hidden] { display: none; }
+ html[data-preset="blueprint"] .semantic-passport-evidence { border-radius: 0.18rem; }
+ .semantic-passport-evidence-head {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.55rem;
+ margin-bottom: 0.35rem;
+ }
+ .semantic-passport-evidence-status {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.28rem;
+ color: var(--backend-stroke);
+ font-size: 0.5rem;
+ font-weight: 800;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ }
+ .semantic-passport-evidence-status::before {
+ content: '';
+ width: 0.38rem;
+ height: 0.38rem;
+ border-radius: 50%;
+ background: var(--backend-stroke);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--backend-stroke) 14%, transparent);
+ }
+ .semantic-passport-repository {
+ min-width: 0;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-decoration: none;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-repository:hover,
+ .semantic-passport-repository:focus-visible { color: var(--backend-stroke); }
+ .semantic-passport-evidence-links { display: grid; gap: 0.22rem; }
+ .semantic-passport-source {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr) auto;
+ gap: 0.15rem 0.45rem;
+ align-items: center;
+ padding: 0.34rem 0.4rem;
+ border: 1px solid transparent;
+ border-radius: 0.38rem;
+ color: var(--text-muted);
+ text-decoration: none;
+ }
+ .semantic-passport-source:hover,
+ .semantic-passport-source:focus-visible {
+ border-color: color-mix(in srgb, var(--backend-stroke) 42%, transparent);
+ background: color-mix(in srgb, var(--backend-fill) 32%, transparent);
+ color: var(--text);
+ }
+ .semantic-passport-source strong {
+ overflow: hidden;
+ font-size: 0.5625rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .semantic-passport-source code {
+ color: var(--backend-stroke);
+ font: inherit;
+ font-size: 0.5rem;
+ }
+ .semantic-passport-source small {
+ grid-column: 1 / -1;
+ overflow: hidden;
+ color: var(--text-faint);
+ font-size: 0.5rem;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
.relationship-lens-summary {
display: block;
margin-top: 0.12rem;
@@ -1698,13 +1780,16 @@
top: 1rem;
left: 1rem;
z-index: 24;
+ display: flex;
+ flex-direction: column;
width: min(22rem, calc(100% - 2rem));
+ max-height: calc(100% - 2rem);
overflow: hidden;
border: 1px solid var(--toolbar-border);
border-radius: 0.85rem;
background: var(--toolbar-menu-bg);
color: var(--toolbar-text);
- box-shadow: 0 18px 52px rgba(0, 0, 0, 0.34);
+ box-shadow: 0 6px 8px rgba(0, 0, 0, 0.22);
backdrop-filter: blur(16px);
}
.node-finder[hidden] { display: none; }
@@ -1744,7 +1829,6 @@
.node-finder-close:hover,
.node-finder-close:focus-visible { background: var(--toolbar-hover); }
.node-finder-close:focus-visible,
- .node-finder-input:focus-visible,
.node-finder-result:focus-visible {
outline: 2px solid var(--frontend-stroke);
outline-offset: -2px;
@@ -1760,10 +1844,16 @@
border: 1px solid var(--toolbar-border);
border-radius: 0.55rem;
background: color-mix(in srgb, var(--panel) 78%, transparent);
+ transition: border-color 160ms ease-out, box-shadow 160ms ease-out;
}
html[data-preset="blueprint"] .node-finder-search { border-radius: 0.18rem; }
.node-finder-search > span { color: var(--frontend-stroke); font-size: 0.875rem; }
+ .node-finder-search:focus-within {
+ border-color: var(--frontend-stroke);
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--frontend-stroke) 20%, transparent);
+ }
.node-finder-input {
+ appearance: none;
width: 100%;
min-width: 0;
border: 0;
@@ -1773,6 +1863,7 @@
font: inherit;
font-size: 0.75rem;
}
+ .node-finder-input:focus-visible { outline: none; }
.node-finder-input::placeholder { color: var(--text-faint); }
.node-finder kbd {
padding: 0.1rem 0.32rem;
@@ -1784,34 +1875,50 @@
}
.node-finder-results {
display: grid;
- gap: 0.18rem;
+ flex: 1 1 auto;
+ gap: 0;
+ min-height: 0;
max-height: min(18rem, 48vh);
- margin: 0;
- padding: 0 0.55rem 0.55rem;
+ margin: 0 0.55rem 0.45rem;
+ padding: 0;
overflow-y: auto;
overscroll-behavior: contain;
+ border: 1px solid color-mix(in srgb, var(--toolbar-border) 78%, transparent);
+ border-radius: 0.55rem;
+ background: color-mix(in srgb, var(--panel) 54%, transparent);
+ scroll-padding-block: 0.25rem;
scrollbar-width: thin;
}
+ html[data-preset="blueprint"] .node-finder-results { border-radius: 0.18rem; }
.node-finder-result {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 0.2rem 0.75rem;
width: 100%;
- padding: 0.55rem 0.65rem;
+ min-height: 3.25rem;
+ padding: 0.58rem 0.65rem;
border: 0;
- border-radius: 0.45rem;
+ border-radius: 0;
background: transparent;
color: var(--text);
font: inherit;
text-align: left;
cursor: pointer;
+ transition: background-color 160ms ease-out;
+ }
+ .node-finder-result:not(:last-child) {
+ border-bottom: 1px solid color-mix(in srgb, var(--toolbar-border) 62%, transparent);
}
- html[data-preset="blueprint"] .node-finder-result { border-radius: 0.12rem; }
.node-finder-result:hover,
- .node-finder-result:focus-visible { background: var(--toolbar-hover); }
+ .node-finder-result:focus-visible {
+ position: relative;
+ z-index: 1;
+ background: color-mix(in srgb, var(--frontend-fill) 48%, var(--toolbar-hover));
+ }
.node-finder-result strong {
overflow: hidden;
font-size: 0.75rem;
+ line-height: 1.25;
text-overflow: ellipsis;
white-space: nowrap;
}
@@ -1820,7 +1927,7 @@
overflow: hidden;
color: var(--text-faint);
font-size: 0.5625rem;
- letter-spacing: 0.03em;
+ letter-spacing: 0.015em;
text-overflow: ellipsis;
white-space: nowrap;
}
@@ -1847,8 +1954,8 @@
text-align: center;
}
.node-finder-status {
- padding: 0.5rem 0.8rem;
- border-top: 1px solid var(--toolbar-border);
+ margin: 0;
+ padding: 0.1rem 0.8rem 0.65rem;
color: var(--text-faint);
font-size: 0.5625rem;
}
@@ -2402,6 +2509,19 @@
font-size: 0.75rem;
}
+ .footer .artifact-start-link {
+ color: var(--text-faint);
+ text-decoration-color: color-mix(in srgb, var(--frontend-stroke) 48%, transparent);
+ text-underline-offset: 0.22em;
+ transition: color 0.15s ease, text-decoration-color 0.15s ease;
+ }
+
+ .footer .artifact-start-link:hover,
+ .footer .artifact-start-link:focus-visible {
+ color: var(--frontend-stroke);
+ text-decoration-color: currentColor;
+ }
+
/* ==========================================================
Print stylesheet — hide interactive controls, force light,
drop the grid so the diagram doesn't waste ink, use landscape
@@ -2528,6 +2648,26 @@
.toolbar #btn-motion[hidden] { display: none !important; }
.toolbar #btn-motion { min-width: 4.4rem; }
.toolbar #btn-motion:disabled { cursor: default; opacity: 0.58; }
+ .toolbar #btn-preset { min-width: 5.4rem; }
+ .preset-control-mark {
+ width: 0.58rem;
+ height: 0.58rem;
+ flex: 0 0 auto;
+ border: 1px solid var(--frontend-stroke);
+ border-radius: 0.2rem;
+ background: color-mix(in srgb, var(--frontend-stroke) 28%, transparent);
+ transition: border-radius 0.15s, box-shadow 0.15s, transform 0.15s;
+ }
+ #btn-preset[data-preset-option="signal-flow"] .preset-control-mark {
+ border-radius: 50%;
+ box-shadow: 0 0 10px color-mix(in srgb, var(--frontend-stroke) 78%, transparent);
+ }
+ #btn-preset[data-preset-option="blueprint"] .preset-control-mark {
+ border-radius: 0.06rem;
+ background: transparent;
+ box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--frontend-stroke) 32%, transparent);
+ transform: rotate(45deg) scale(0.84);
+ }
.motion-control-dot {
width: 0.46rem;
height: 0.46rem;
@@ -2564,6 +2704,7 @@
text-align: left;
padding: 0.5rem 0.75rem;
}
+ .toolbar .export-menu button[hidden] { display: none; }
.toolbar .export-menu button:hover {
background: var(--toolbar-hover);
}
@@ -2926,7 +3067,7 @@
.toolbar { gap: 0.25rem; }
.toolbar button { padding-right: 0.58rem; padding-left: 0.58rem; }
.toolbar #btn-motion { min-width: 4.4rem; padding-right: 0.58rem; padding-left: 0.58rem; }
- #theme-label, #present-label { display: none; }
+ #theme-label, #preset-label, #present-label { display: none; }
.guided-view-handoff { max-width: 6.5rem; }
}
@@ -3714,9 +3855,9 @@
</style>
</head>
<body>
- <!-- Toolbar: theme, trace motion, presentation stage, and export.
+ <!-- Toolbar: theme, live visual style, trace motion, presentation stage, and export.
Motion appears only for trace-enabled artifacts and has no shortcut;
- Keyboard: T toggles theme, F toggles the stage, E opens export. -->
+ Keyboard: T toggles theme, S cycles style, F toggles the stage, E opens export. -->
<div class="toolbar" role="toolbar" aria-label="Diagram actions">
<button id="btn-theme" type="button"
title="Toggle theme (T)"
@@ -3725,6 +3866,12 @@
<span id="theme-icon" aria-hidden="true">&#9790;</span>
<span id="theme-label">Dark</span>
</button>
+ <button id="btn-preset" type="button"
+ title="Cycle visual style (S)"
+ aria-label="Cycle visual style">
+ <span class="preset-control-mark" aria-hidden="true"></span>
+ <span id="preset-label">Style</span>
+ </button>
<button id="btn-motion" type="button" hidden
title="Pause motion"
aria-label="Pause motion"
@@ -3749,6 +3896,10 @@
Export <span aria-hidden="true">&#9662;</span>
</button>
<div class="export-menu" id="export-menu" role="menu" aria-label="Export">
+ <button data-format="share-card" type="button" role="menuitem" tabindex="-1">Share Card <span class="hint">1200&times;630 PNG</span></button>
+ <button data-action="route-share-card" type="button" role="menuitem" tabindex="-1" hidden disabled>Route Share Card <span class="hint">1200&times;630 PNG</span></button>
+ <button data-action="copy-share-card" type="button" role="menuitem" tabindex="-1">Copy Share Card <span class="hint">PNG</span></button>
+ <hr role="separator">
<button data-action="copy" type="button" role="menuitem" tabindex="-1">Copy to clipboard <span class="hint">PNG</span></button>
<hr role="separator">
<button data-format="png" type="button" role="menuitem" tabindex="-1">Download PNG</button>
@@ -3772,6 +3923,7 @@
</div>
<script id="archify-guided-views-data" type="application/json">[{"id":"dispatch-path","label":"Dispatch one task","focus":["callers","entry","router","policy","invocation","adapters","transport","providers"],"note":"Follow an explicit task from the caller through policy resolution into the selected native provider CLIs."},{"id":"persistent-session","label":"Keep a provider session","focus":["callers","entry","router","session","session_state"],"note":"See how the CLI starts a detached daemon, exchanges requests over a local socket, and persists history."},{"id":"evidence-output","label":"Preserve raw evidence","focus":["invocation","adapters","transport","artifacts","outputs"],"note":"Provider responses stay opaque while MCO records per-invocation answers, status, usage, and run metadata."}]</script>
+ <script id="archify-source-evidence-data" type="application/json">{"schemaVersion":1,"verified":true,"repository":{"url":"https://github.com/mco-org/mco","revision":"9f1a1cf1afdc04d7b5406782b40dfec76d9bc798","shortRevision":"9f1a1cf"},"referenceCount":14,"nodes":{"entry":[{"path":"bin/mco.js","line":1,"label":"npm entry","href":"https://github.com/mco-org/mco/blob/9f1a1cf1afdc04d7b5406782b40dfec76d9bc798/bin/mco.js#L1"},{"path":"runtime/mcp_server.py","line":108,"endLine":153,"label":"MCP entry","href":"https://github.com/mco-org/mco/blob/9f1a1cf1afdc04d7b5406782b40dfec76d9bc798/runtime/mcp_server.py#L108-L153"}],"router":[{"path":"runtime/cli.py","line":1945,"label":"CLI main","href":"https://github.com/mco-org/mco/blob/9f1a1cf1afdc04d7b5406782b40dfec76d9bc798/runtime/cli.py#L1945"}],"policy":[{"path":"runtime/config.py","line":24,"label":"Review policy","href":"https://github.com/mco-org/mco/blob/9f1a1cf1afdc04d7b5406782b40dfec76d9bc798/runtime/config.py#L24"},{"path":"runtime/policy.py","line":34,"label":"Provider policy preview","href":"https://github.com/mco-org/mco/blob/9f1a1cf1afdc04d7b5406782b40dfec76d9bc798/runtime/policy.py#L34"}],"invocation":[{"path":"runtime/invocation_runtime.py","line":696,"label":"Workflow entry","href":"https://github.com/mco-org/mco/blob/9f1a1cf1afdc04d7b5406782b40dfec76d9bc798/runtime/invocation_runtime.py#L696"},{"path":"runtime/invocation_runtime.py","line":156,"label":"Single invocation","href":"https://github.com/mco-org/mco/blob/9f1a1cf1afdc04d7b5406782b40dfec76d9bc798/runtime/invocation_runtime.py#L156"}],"adapters":[{"path":"runtime/adapters/__init__.py","line":57,"label":"Adapter registry","href":"https://github.com/mco-org/mco/blob/9f1a1cf1afdc04d7b5406782b40dfec76d9bc798/runtime/adapters/__init__.py#L57"},{"path":"runtime/contracts.py","line":77,"label":"Provider contract","href":"https://github.com/mco-org/mco/blob/9f1a1cf1afdc04d7b5406782b40dfec76d9bc798/runtime/contracts.py#L77"}],"transport":[{"path":"runtime/adapters/shim.py","line":98,"label":"Shim decode","href":"https://github.com/mco-org/mco/blob/9f1a1cf1afdc04d7b5406782b40dfec76d9bc798/runtime/adapters/shim.py#L98"},{"path":"runtime/acp/adapter.py","line":126,"label":"ACP decode","href":"https://github.com/mco-org/mco/blob/9f1a1cf1afdc04d7b5406782b40dfec76d9bc798/runtime/acp/adapter.py#L126"}],"session":[{"path":"runtime/session/daemon.py","line":50,"label":"Daemon context","href":"https://github.com/mco-org/mco/blob/9f1a1cf1afdc04d7b5406782b40dfec76d9bc798/runtime/session/daemon.py#L50"}],"session_state":[{"path":"runtime/session/state.py","line":25,"label":"Session state","href":"https://github.com/mco-org/mco/blob/9f1a1cf1afdc04d7b5406782b40dfec76d9bc798/runtime/session/state.py#L25"}],"artifacts":[{"path":"runtime/invocation_artifacts.py","line":8,"label":"Artifact writer","href":"https://github.com/mco-org/mco/blob/9f1a1cf1afdc04d7b5406782b40dfec76d9bc798/runtime/invocation_artifacts.py#L8"}]}}</script>
<div class="guided-views no-print" id="guided-views" hidden aria-label="Guided diagram views">
<button id="guided-view-prev" type="button" aria-label="Previous guided view" title="Previous guided view ([)">&#8592;</button>
<div class="guided-view-copy">
@@ -4135,7 +4287,7 @@
</button>
</div>
<div class="diagram-guide-shortcuts" aria-label="Additional keyboard shortcuts">
- <span><kbd>E</kbd> Export</span><span><kbd>T</kbd> Theme</span><span><kbd>0</kbd> Reset</span><span><kbd>+</kbd> Zoom in</span><span><kbd>-</kbd> Zoom out</span><span><kbd>Esc</kbd> Close</span>
+ <span><kbd>E</kbd> Export</span><span><kbd>T</kbd> Theme</span><span><kbd>S</kbd> Style</span><span><kbd>0</kbd> Reset</span><span><kbd>+</kbd> Zoom in</span><span><kbd>-</kbd> Zoom out</span><span><kbd>Esc</kbd> Close</span>
</div>
<p class="diagram-guide-feedback" id="diagram-guide-feedback" aria-live="polite"></p>
</div>
@@ -4146,7 +4298,7 @@
</div>
<div class="node-finder-search">
<span aria-hidden="true">&#8981;</span>
- <input class="node-finder-input" id="node-finder-input" type="search" autocomplete="off" spellcheck="false" placeholder="Search labels or IDs" aria-describedby="node-finder-status">
+ <input class="node-finder-input" id="node-finder-input" type="search" autocomplete="off" spellcheck="false" placeholder="Search labels or IDs" aria-label="Search diagram nodes" aria-describedby="node-finder-status">
<kbd aria-hidden="true">/</kbd>
</div>
<div class="node-finder-results" id="node-finder-results" role="group" aria-label="Diagram nodes"></div>
@@ -4165,6 +4317,13 @@
<span id="focus-tag" data-passport="tag" hidden></span>
<code id="focus-id" data-passport="id"></code>
</div>
+ <div class="semantic-passport-evidence" id="focus-evidence" hidden aria-label="Verified source evidence">
+ <div class="semantic-passport-evidence-head">
+ <span class="semantic-passport-evidence-status">Verified source</span>
+ <a class="semantic-passport-repository" id="focus-repository" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer"></a>
+ </div>
+ <div class="semantic-passport-evidence-links" id="focus-evidence-links"></div>
+ </div>
<span class="relationship-lens-summary" id="focus-summary" aria-live="polite"></span>
</div>
<div class="relationship-lens-actions">
@@ -4282,15 +4441,80 @@
<!-- Footer -->
<p class="footer">
- Architecture diagram &bull; Built with Archify<span class="no-print"> &bull; Hover to trace &bull; <kbd>R</kbd> route &bull; Click to focus &bull; <kbd>+</kbd>/<kbd>&minus;</kbd> zoom &bull; <kbd>M</kbd> radar &bull; <kbd>[</kbd>/<kbd>]</kbd> views &bull; <kbd>P</kbd> play story &bull; <kbd>T</kbd> theme &bull; <kbd>E</kbd> export</span>
+ Architecture diagram &bull; Built with Archify<span class="no-print"> &bull; <a class="artifact-start-link" href="https://tt-a1i.github.io/archify/start.html?type=architecture" target="_blank" rel="noopener noreferrer">Create yours &nearr;</a> &bull; Hover to trace &bull; <kbd>R</kbd> route &bull; Click to focus &bull; <kbd>+</kbd>/<kbd>&minus;</kbd> zoom &bull; <kbd>M</kbd> radar &bull; <kbd>[</kbd>/<kbd>]</kbd> views &bull; <kbd>P</kbd> play story &bull; <kbd>T</kbd> theme &bull; <kbd>E</kbd> export</span>
</p>
</div>
<script>
+ var Archify = {};
+
+ function hasDrawableGeometry(element) {
+ if (!element) return false;
+ var geometries = /^(path|line|polyline)$/i.test(element.tagName)
+ ? [element]
+ : Array.prototype.slice.call(element.querySelectorAll('path, line, polyline'));
+ return geometries.some(function (geometry) {
+ var source = geometry.tagName.toLowerCase() === 'path'
+ ? geometry.getAttribute('d')
+ : geometry.tagName.toLowerCase() === 'polyline'
+ ? geometry.getAttribute('points')
+ : [geometry.getAttribute('x1'), geometry.getAttribute('y1'), geometry.getAttribute('x2'), geometry.getAttribute('y2')].join(' ');
+ if (!source || /(?:^|[^a-z])(?:nan|infinity)(?:[^a-z]|$)/i.test(source) || typeof geometry.getTotalLength !== 'function') return false;
+ try {
+ var length = Number(geometry.getTotalLength());
+ return Number.isFinite(length) && length > 0;
+ } catch (_) {
+ return false;
+ }
+ });
+ }
+
+ /* ============================================================
+ Visual style try-on — one topology, three bundled presets.
+ The reader's choice is intentionally session-only: it updates the
+ live page and canonical SVG together, but never rewrites the source,
+ URL, or a later diagram's authored default.
+ ============================================================ */
+ Archify.preset = (function () {
+ var PRESETS = ['classic', 'signal-flow', 'blueprint'];
+ var LABELS = { classic: 'Classic', 'signal-flow': 'Flow', blueprint: 'Blueprint' };
+ var html = document.documentElement;
+ var svg = document.querySelector('.diagram-container svg');
+ var btn = document.getElementById('btn-preset');
+ var label = document.getElementById('preset-label');
+ var authored = PRESETS.indexOf(html.getAttribute('data-preset')) >= 0
+ ? html.getAttribute('data-preset')
+ : 'classic';
+
+ function current() {
+ var value = html.getAttribute('data-preset');
+ return PRESETS.indexOf(value) >= 0 ? value : authored;
+ }
+ function nextAfter(preset) {
+ return PRESETS[(PRESETS.indexOf(preset) + 1) % PRESETS.length];
+ }
+ function apply(preset) {
+ if (html.getAttribute('data-embed') === 'true') return false;
+ if (PRESETS.indexOf(preset) < 0) return false;
+ html.setAttribute('data-preset', preset);
+ svg.setAttribute('data-preset', preset);
+ btn.setAttribute('data-preset-option', preset);
+ label.textContent = LABELS[preset];
+ var next = nextAfter(preset);
+ btn.setAttribute('aria-label', 'Visual style: ' + LABELS[preset] + '. Activate for ' + LABELS[next]);
+ btn.title = 'Cycle visual style (S)';
+ return true;
+ }
+ function cycle() { return apply(nextAfter(current())); }
+
+ apply(authored);
+ btn.addEventListener('click', cycle);
+ return { cycle: cycle, apply: apply, current: current, authored: authored };
+ })();
+
/* ============================================================
Theme toggle — persists to localStorage, respects system pref
============================================================ */
- var Archify = {};
Archify.theme = (function () {
var STORAGE_KEY = 'archify-theme';
@@ -4356,7 +4580,7 @@
})();
/* ============================================================
- Export — PNG / JPEG / WebP / SVG / WebM and Copy PNG (clipboard)
+ Export — Share Card / PNG / JPEG / WebP / SVG / WebM and clipboard
Raster exports are always rendered at 4x source resolution for
maximum sharpness. The trick: we set the serialized SVG's
@@ -4371,6 +4595,10 @@
var RASTER_SCALE = 4;
var MOTION_DURATION = 6000;
var MOTION_FPS = 30;
+ var SHARE_CARD_WIDTH = 1200;
+ var SHARE_CARD_HEIGHT = 630;
+ var SHARE_CARD_PADDING = 36;
+ var SHARE_CARD_HEADER = 112;
function diagramFilename() {
var title = (document.title || 'diagram')
@@ -4400,6 +4628,84 @@
* self-themes when embedded in GitHub READMEs or other hosts that
* expose a color scheme. Used for "Download SVG".
*/
+ function applyRouteSnapshot(clone, snapshot) {
+ if (!snapshot || !Array.isArray(snapshot.nodeIds) || !Array.isArray(snapshot.edges) ||
+ snapshot.nodeIds.length < 2 || snapshot.edges.length !== snapshot.nodeIds.length - 1 ||
+ snapshot.hops !== snapshot.edges.length ||
+ !snapshot.source || !snapshot.target ||
+ snapshot.source.id !== snapshot.nodeIds[0] ||
+ snapshot.target.id !== snapshot.nodeIds[snapshot.nodeIds.length - 1]) return false;
+
+ clone.removeAttribute('data-animation');
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-animate]'), function (element) {
+ element.removeAttribute('data-animate');
+ element.style.removeProperty('--step');
+ });
+
+ var cloneNodes = Array.prototype.slice.call(clone.querySelectorAll('[data-node-id]'));
+ var cloneEdges = Array.prototype.slice.call(clone.querySelectorAll('[data-edge-key]'));
+ var nodeIds = Object.create(null);
+ var edgeKeys = Object.create(null);
+ var nodeMatches = [];
+ var edgeMatches = [];
+
+ for (var nodeIndex = 0; nodeIndex < snapshot.nodeIds.length; nodeIndex++) {
+ var nodeId = snapshot.nodeIds[nodeIndex];
+ if (typeof nodeId !== 'string' || !nodeId || nodeIds[nodeId]) return false;
+ var matchedNodes = cloneNodes.filter(function (candidate) {
+ return candidate.getAttribute('data-node-id') === nodeId;
+ });
+ if (matchedNodes.length !== 1) return false;
+ nodeIds[nodeId] = true;
+ nodeMatches.push(matchedNodes);
+ }
+
+ for (var edgeIndex = 0; edgeIndex < snapshot.edges.length; edgeIndex++) {
+ var edge = snapshot.edges[edgeIndex];
+ var fromId = snapshot.nodeIds[edgeIndex];
+ var toId = snapshot.nodeIds[edgeIndex + 1];
+ if (!edge || typeof edge.key !== 'string' || !edge.key || edgeKeys[edge.key] ||
+ edge.from !== fromId || edge.to !== toId) return false;
+ var matchedEdges = cloneEdges.filter(function (candidate) {
+ return candidate.getAttribute('data-edge-key') === edge.key;
+ });
+ var drawableMatches = matchedEdges.filter(hasDrawableGeometry);
+ if (!matchedEdges.length || drawableMatches.length !== 1 || !matchedEdges.every(function (candidate) {
+ return candidate.getAttribute('data-edge-from') === edge.from &&
+ candidate.getAttribute('data-edge-to') === edge.to &&
+ (candidate.getAttribute('data-edge-id') || '') === (edge.id || '');
+ })) return false;
+ edgeKeys[edge.key] = true;
+ edgeMatches.push(matchedEdges);
+ }
+
+ clone.setAttribute('data-share-route', '');
+ nodeMatches.forEach(function (matches, step) {
+ matches.forEach(function (element) {
+ element.setAttribute('data-share-route-match', '');
+ element.setAttribute('data-share-route-step', String(step));
+ if (step === 0) element.setAttribute('data-share-route-start', '');
+ else if (step === snapshot.nodeIds.length - 1) element.setAttribute('data-share-route-end', '');
+ else element.setAttribute('data-share-route-middle', '');
+ });
+ });
+ edgeMatches.forEach(function (matches, step) {
+ matches.forEach(function (element) {
+ element.setAttribute('data-share-route-match', '');
+ element.setAttribute('data-share-route-step', String(step));
+ });
+ });
+
+ return clone.hasAttribute('data-share-route') &&
+ !clone.hasAttribute('data-animation') &&
+ !clone.hasAttribute('data-route-active') &&
+ !clone.hasAttribute('data-route-journey') &&
+ clone.querySelectorAll('[data-animate], [data-route-match], [data-route-step], [data-route-start], [data-route-end], [data-route-journey-state], [data-route-journey-current], [data-route-journey-overlay]').length === 0 &&
+ clone.querySelectorAll('[data-share-route-match]').length ===
+ nodeMatches.reduce(function (count, matches) { return count + matches.length; }, 0) +
+ edgeMatches.reduce(function (count, matches) { return count + matches.length; }, 0);
+ }
+
function serializeSvg(scale, opts) {
// scale: integer multiplier for intrinsic SVG pixel dimensions used by
// the raster path. Defaults to 1 (natural size) for SVG download.
@@ -4425,6 +4731,7 @@
clone.removeAttribute('data-route-picking');
clone.removeAttribute('data-route-active');
clone.removeAttribute('data-route-journey');
+ clone.removeAttribute('data-share-route');
clone.removeAttribute('data-story-active');
clone.removeAttribute('data-story-playing');
clone.removeAttribute('data-story-beat');
@@ -4524,6 +4831,13 @@
el.removeAttribute('data-route-journey-current');
el.style.removeProperty('--route-step');
});
+ Array.prototype.forEach.call(clone.querySelectorAll('[data-share-route-match], [data-share-route-step], [data-share-route-start], [data-share-route-end], [data-share-route-middle]'), function (el) {
+ el.removeAttribute('data-share-route-match');
+ el.removeAttribute('data-share-route-step');
+ el.removeAttribute('data-share-route-start');
+ el.removeAttribute('data-share-route-end');
+ el.removeAttribute('data-share-route-middle');
+ });
Array.prototype.forEach.call(clone.querySelectorAll('[data-detail], [data-detail-anchor]'), function (el) {
el.removeAttribute('data-detail');
el.removeAttribute('data-detail-anchor');
@@ -4543,6 +4857,7 @@
!clone.hasAttribute('data-route-picking') &&
!clone.hasAttribute('data-route-active') &&
!clone.hasAttribute('data-route-journey') &&
+ !clone.hasAttribute('data-share-route') &&
!clone.hasAttribute('data-story-active') &&
!clone.hasAttribute('data-story-playing') &&
!clone.hasAttribute('data-story-beat') &&
@@ -4552,9 +4867,14 @@
!clone.hasAttribute('data-chapter-anchor') &&
!clone.hasAttribute('data-chapter-preview') &&
!clone.style.getPropertyValue('transform') &&
- clone.querySelectorAll('[data-story-overlay], [data-story-carrier-overlay], [data-story-carrier-token], [data-story-step], [data-story-beat-state], [data-story-beat-step], [data-chapter-handoff-overlay], [data-chapter-role], [data-chapter-preview-role], [data-focus-match], [data-focus-selected], [data-semantic-lens-overlay], [data-lens-match], [data-lens-selected], [data-lens-peer], [data-legend-bridge], [data-legend-kind], [data-legend-bridge-runtime], [data-legend-count], [data-legend-zero], [data-legend-selected], [data-legend-preview-match], [data-legend-preview-selected], [data-legend-preview-peer], [data-relationship-hit-overlay], [data-relationship-pulse-overlay], [data-relationship-preview], [data-relationship-preview-node], [data-relationship-preview-source], [data-relationship-preview-target], [data-intent-trace-overlay], [data-intent-trace-match], [data-intent-trace-selected], [data-route-probe-overlay], [data-route-journey-overlay], [data-route-match], [data-route-start], [data-route-end], [data-route-step], [data-route-candidate], [data-route-journey-state], [data-route-journey-current], [data-detail], [data-detail-anchor]').length === 0;
+ clone.querySelectorAll('[data-story-overlay], [data-story-carrier-overlay], [data-story-carrier-token], [data-story-step], [data-story-beat-state], [data-story-beat-step], [data-chapter-handoff-overlay], [data-chapter-role], [data-chapter-preview-role], [data-focus-match], [data-focus-selected], [data-semantic-lens-overlay], [data-lens-match], [data-lens-selected], [data-lens-peer], [data-legend-bridge], [data-legend-kind], [data-legend-bridge-runtime], [data-legend-count], [data-legend-zero], [data-legend-selected], [data-legend-preview-match], [data-legend-preview-selected], [data-legend-preview-peer], [data-relationship-hit-overlay], [data-relationship-pulse-overlay], [data-relationship-preview], [data-relationship-preview-node], [data-relationship-preview-source], [data-relationship-preview-target], [data-intent-trace-overlay], [data-intent-trace-match], [data-intent-trace-selected], [data-route-probe-overlay], [data-route-journey-overlay], [data-route-match], [data-route-start], [data-route-end], [data-route-step], [data-route-candidate], [data-route-journey-state], [data-route-journey-current], [data-share-route-match], [data-share-route-step], [data-share-route-start], [data-share-route-end], [data-share-route-middle], [data-detail], [data-detail-anchor]').length === 0;
var vb = svg.viewBox.baseVal;
+ var finiteSvgDimensions = Number.isFinite(vb.x) && Number.isFinite(vb.y) &&
+ Number.isFinite(vb.width) && Number.isFinite(vb.height) && vb.width > 0 && vb.height > 0;
+ var routeStateClean = opts.routeSnapshot
+ ? canonicalStateClean && finiteSvgDimensions && applyRouteSnapshot(clone, opts.routeSnapshot)
+ : null;
// Scale width/height so the browser rasterizes the vectors at target
// resolution directly. viewBox stays unchanged so coordinates don't
// shift. This is the key to sharp rasters — do NOT scale later via
@@ -4678,6 +4998,14 @@
bgRect.setAttribute('fill', computed.getPropertyValue('--bg').trim() || '#ffffff');
}
+ if (opts.routeSnapshot) {
+ style.textContent += "\nsvg[data-share-route] [data-node-id], svg[data-share-route] [data-edge-from] { opacity: 0.18; }\n" +
+ "svg[data-share-route] [data-share-route-match] { opacity: 1; }\n" +
+ "svg[data-share-route] [data-share-route-start] > :is(rect, circle, polygon):not(.c-mask) { stroke-width: 3; stroke-dasharray: 5 3; }\n" +
+ "svg[data-share-route] [data-share-route-middle] > :is(rect, circle, polygon):not(.c-mask) { stroke-width: 2.2; }\n" +
+ "svg[data-share-route] [data-share-route-end] > :is(rect, circle, polygon):not(.c-mask) { stroke-width: 3.4; stroke-dasharray: 1 0; }\n";
+ }
+
clone.insertBefore(style, clone.firstChild);
clone.insertBefore(bgRect, style.nextSibling);
@@ -4685,7 +5013,8 @@
svgString: new XMLSerializer().serializeToString(clone),
width: vb.width * scale,
height: vb.height * scale,
- canonicalStateClean: canonicalStateClean
+ canonicalStateClean: canonicalStateClean,
+ routeStateClean: routeStateClean
};
}
@@ -4729,24 +5058,148 @@
return new Promise(function (resolve, reject) {
var img = new Image();
img.onload = function () {
- var canvas = document.createElement('canvas');
- canvas.width = data.width;
- canvas.height = data.height;
- var ctx = canvas.getContext('2d');
- if (format === 'jpeg') {
- ctx.fillStyle = currentBg();
- ctx.fillRect(0, 0, canvas.width, canvas.height);
+ try {
+ var canvas = document.createElement('canvas');
+ canvas.width = data.width;
+ canvas.height = data.height;
+ var ctx = canvas2dOrThrow(canvas, format);
+ if (format === 'jpeg') {
+ ctx.fillStyle = currentBg();
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
+ }
+ // Draw at natural size — SVG was already rasterized at target res.
+ ctx.drawImage(img, 0, 0);
+ URL.revokeObjectURL(svgUrl);
+ var mime = format === 'jpeg' ? 'image/jpeg' :
+ format === 'webp' ? 'image/webp' : 'image/png';
+ var quality = format === 'png' ? undefined : 0.95;
+ canvas.toBlob(function (blob) {
+ if (!blob) reject(new Error('toBlob returned null for ' + format));
+ else resolve(blob);
+ }, mime, quality);
+ } catch (error) {
+ URL.revokeObjectURL(svgUrl);
+ reject(error);
}
- // Draw at natural size — SVG was already rasterized at target res.
- ctx.drawImage(img, 0, 0);
+ };
+ img.onerror = function (e) {
URL.revokeObjectURL(svgUrl);
- var mime = format === 'jpeg' ? 'image/jpeg' :
- format === 'webp' ? 'image/webp' : 'image/png';
- var quality = format === 'png' ? undefined : 0.95;
- canvas.toBlob(function (blob) {
- if (!blob) reject(new Error('toBlob returned null for ' + format));
- else resolve(blob);
- }, mime, quality);
+ reject(e);
+ };
+ img.src = svgUrl;
+ });
+ }
+
+ function fitCanvasText(ctx, text, maxWidth, startSize, minSize, weight) {
+ var value = String(text || '').trim();
+ var size = startSize;
+ var family = "'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
+ while (size > minSize) {
+ ctx.font = (weight || '600') + ' ' + size + 'px ' + family;
+ if (ctx.measureText(value).width <= maxWidth) return value;
+ size -= 1;
+ }
+ ctx.font = (weight || '600') + ' ' + minSize + 'px ' + family;
+ if (ctx.measureText(value).width <= maxWidth) return value;
+ var suffix = '\u2026';
+ while (value.length > 1 && ctx.measureText(value + suffix).width > maxWidth) {
+ value = value.slice(0, -1);
+ }
+ return value + suffix;
+ }
+
+ function canvas2dOrThrow(canvas, label) {
+ if (!canvas || typeof canvas.getContext !== 'function') {
+ throw new Error('Canvas unavailable for ' + label);
+ }
+ var ctx = canvas.getContext('2d');
+ if (!ctx) throw new Error('2D canvas context unavailable for ' + label);
+ if (typeof canvas.toBlob !== 'function') throw new Error('canvas.toBlob unavailable for ' + label);
+ return ctx;
+ }
+
+ function renderShareCard(options) {
+ options = options || {};
+ var routeSnapshot = options.routeSnapshot || null;
+ var svg = document.querySelector('.diagram-container svg');
+ var vb = svg.viewBox.baseVal;
+ var sourceScale = Math.min(2, pickSafeScale(vb.width, vb.height));
+ var data = serializeSvg(sourceScale, { routeSnapshot: routeSnapshot });
+ if (!data.canonicalStateClean) return Promise.reject(new Error('Share Card export could not remove temporary viewer state'));
+ if (routeSnapshot && !data.routeStateClean) return Promise.reject(new Error('Route Card export could not preserve the resolved route safely'));
+ var svgBlob = new Blob([data.svgString], { type: 'image/svg+xml;charset=utf-8' });
+ var svgUrl = URL.createObjectURL(svgBlob);
+
+ return new Promise(function (resolve, reject) {
+ var img = new Image();
+ img.onload = function () {
+ try {
+ var canvas = document.createElement('canvas');
+ canvas.width = SHARE_CARD_WIDTH;
+ canvas.height = SHARE_CARD_HEIGHT;
+ var ctx = canvas2dOrThrow(canvas, 'Share Card');
+ var computed = getComputedStyle(document.documentElement);
+ var bg = computed.getPropertyValue('--bg').trim() || currentBg();
+ var text = computed.getPropertyValue('--text').trim() || '#ffffff';
+ var muted = computed.getPropertyValue('--text-muted').trim() || '#94a3b8';
+ var border = computed.getPropertyValue('--panel-border').trim() || '#334155';
+ var accent = computed.getPropertyValue('--frontend-stroke').trim() || '#22d3ee';
+ var titleNode = document.querySelector('.header h1');
+ var subtitleNode = document.querySelector('.header .subtitle');
+ var title = titleNode ? titleNode.textContent : document.title;
+ var subtitle = routeSnapshot
+ ? 'Route: ' + routeSnapshot.source.label + ' → ' + routeSnapshot.target.label + ' · ' + routeSnapshot.hops + ' directed hops'
+ : subtitleNode ? subtitleNode.textContent : '';
+ var preset = document.documentElement.getAttribute('data-preset') || 'classic';
+ var theme = document.documentElement.getAttribute('data-theme') || 'dark';
+ var presetLabel = preset === 'signal-flow' ? 'FLOW' : preset.toUpperCase();
+ var cardLabel = routeSnapshot
+ ? 'ARCHIFY · ROUTE · ' + routeSnapshot.hops + ' HOPS'
+ : 'ARCHIFY · ' + presetLabel + ' · ' + theme.toUpperCase();
+
+ ctx.fillStyle = bg;
+ ctx.fillRect(0, 0, SHARE_CARD_WIDTH, SHARE_CARD_HEIGHT);
+
+ ctx.fillStyle = accent;
+ ctx.fillRect(SHARE_CARD_PADDING, 27, 42, 3);
+
+ ctx.textBaseline = 'alphabetic';
+ ctx.fillStyle = text;
+ var fittedTitle = fitCanvasText(ctx, title, SHARE_CARD_WIDTH - SHARE_CARD_PADDING * 2 - 330, 29, 18, '700');
+ ctx.fillText(fittedTitle, SHARE_CARD_PADDING, 62);
+
+ ctx.fillStyle = muted;
+ var fittedSubtitle = fitCanvasText(ctx, subtitle, SHARE_CARD_WIDTH - SHARE_CARD_PADDING * 2 - 280, 13, 11, '500');
+ ctx.fillText(fittedSubtitle, SHARE_CARD_PADDING, 87);
+
+ ctx.font = "600 12px 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";
+ ctx.textAlign = 'right';
+ ctx.fillStyle = accent;
+ ctx.fillText(cardLabel, SHARE_CARD_WIDTH - SHARE_CARD_PADDING, 50);
+ ctx.textAlign = 'left';
+
+ var availableWidth = SHARE_CARD_WIDTH - SHARE_CARD_PADDING * 2;
+ var availableHeight = SHARE_CARD_HEIGHT - SHARE_CARD_HEADER - SHARE_CARD_PADDING;
+ var fit = Math.min(availableWidth / data.width, availableHeight / data.height);
+ var drawWidth = data.width * fit;
+ var drawHeight = data.height * fit;
+ var drawX = SHARE_CARD_PADDING + (availableWidth - drawWidth) / 2;
+ var drawY = SHARE_CARD_HEADER + (availableHeight - drawHeight) / 2;
+
+ ctx.strokeStyle = border;
+ ctx.lineWidth = 1;
+ ctx.strokeRect(drawX - 0.5, drawY - 0.5, drawWidth + 1, drawHeight + 1);
+ ctx.drawImage(img, drawX, drawY, drawWidth, drawHeight);
+ URL.revokeObjectURL(svgUrl);
+
+ canvas.toBlob(function (blob) {
+ if (!blob) reject(new Error('toBlob returned null for Share Card'));
+ else resolve(blob);
+ }, 'image/png');
+ } catch (error) {
+ URL.revokeObjectURL(svgUrl);
+ reject(error);
+ }
};
img.onerror = function (e) {
URL.revokeObjectURL(svgUrl);
@@ -4756,6 +5209,15 @@
});
}
+ function rasterizeShareCard(options) {
+ options = options || {};
+ if (!options.variant) return renderShareCard();
+ if (options.variant !== 'route') return Promise.reject(new Error('Unknown Share Card variant: ' + options.variant));
+ var snapshot = Archify.routeProbe && Archify.routeProbe.exportSnapshot();
+ if (!snapshot) return Promise.reject(new Error('Trace a route before exporting a Route Share Card'));
+ return renderShareCard({ routeSnapshot: snapshot });
+ }
+
function motionMimeType() {
if (typeof MediaRecorder === 'undefined') return '';
var candidates = [
@@ -5018,10 +5480,20 @@
var menu = document.getElementById('export-menu');
var btn = document.getElementById('btn-export');
+ var routeShareItem = menu.querySelector('button[data-action="route-share-card"]');
var items = function () {
return Array.prototype.slice.call(menu.querySelectorAll('button[role="menuitem"]'));
};
+ function syncRouteShareItem() {
+ var snapshot = Archify.routeProbe && typeof Archify.routeProbe.exportSnapshot === 'function'
+ ? Archify.routeProbe.exportSnapshot()
+ : null;
+ routeShareItem.hidden = !snapshot;
+ routeShareItem.disabled = !snapshot;
+ return snapshot;
+ }
+
// ---- Clipboard support ----------------------------------------------
function canCopyImage() {
return typeof ClipboardItem !== 'undefined' &&
@@ -5033,6 +5505,7 @@
// canvas.toBlob('image/webp') silently returns a PNG on browsers without
// WebP encoding (older Safari), so detect explicitly.
function supports(format) {
+ if (format === 'share-card') return true;
if (format === 'svg' || format === 'png') return true;
if (format === 'webm') return canRecordMotion();
var mime = format === 'jpeg' ? 'image/jpeg' : 'image/webp';
@@ -5050,7 +5523,7 @@
it.title = 'Not supported by this browser';
it.style.opacity = '0.5';
}
- if (it.dataset.action === 'copy' && !canCopyImage()) {
+ if ((it.dataset.action === 'copy' || it.dataset.action === 'copy-share-card') && !canCopyImage()) {
it.disabled = true;
it.title = 'Clipboard image write not supported by this browser';
it.style.opacity = '0.5';
@@ -5079,9 +5552,10 @@
function open(focusLast) {
if (Archify.semanticLens && typeof Archify.semanticLens.clearPreview === 'function') Archify.semanticLens.clearPreview();
if (Archify.semanticLens && Archify.semanticLens.isOpen()) Archify.semanticLens.close({ restoreFocus: false });
+ syncRouteShareItem();
menu.classList.add('open');
btn.setAttribute('aria-expanded', 'true');
- var available = items().filter(function (i) { return !i.disabled; });
+ var available = items().filter(function (i) { return !i.hidden && !i.disabled; });
var target = focusLast ? available[available.length - 1] : available[0];
if (target) target.focus();
}
@@ -5115,7 +5589,7 @@
if (e.key === 'Escape') { e.preventDefault(); close(true); return; }
if (e.key === 'Tab') { close(false); return; }
- var available = items().filter(function (i) { return !i.disabled; });
+ var available = items().filter(function (i) { return !i.hidden && !i.disabled; });
var current = available.indexOf(document.activeElement);
switch (e.key) {
case 'ArrowDown':
@@ -5140,10 +5614,15 @@
function runExport(format) {
var base = diagramFilename();
close(true);
- document.documentElement.removeAttribute('data-last-export-error');
- document.documentElement.removeAttribute('data-last-export-error-format');
+ clearExportReceipt();
if (format === 'webm') toast('Recording 6 seconds of motion…');
- return (format === 'svg'
+ return (format === 'share-card'
+ ? rasterizeShareCard().then(function (blob) {
+ recordExportReceipt('share-card', blob, true, { width: SHARE_CARD_WIDTH, height: SHARE_CARD_HEIGHT });
+ download(blob, base + '-share-card.png');
+ toast('Downloaded Share Card');
+ })
+ : format === 'svg'
? Promise.resolve(serializeSvg(1, { autoTheme: true })).then(function (d) {
var blob = new Blob([d.svgString], { type: 'image/svg+xml;charset=utf-8' });
recordExportReceipt('svg', blob, d.canonicalStateClean);
@@ -5179,35 +5658,109 @@
});
}
+ function runRouteShareCard() {
+ close(false);
+ clearExportReceipt();
+ var snapshot = Archify.routeProbe && Archify.routeProbe.exportSnapshot();
+ var blobPromise = snapshot
+ ? renderShareCard({ routeSnapshot: snapshot })
+ : Promise.reject(new Error('Trace a route before exporting a Route Share Card'));
+ return blobPromise.then(function (blob) {
+ recordExportReceipt('share-card', blob, false, { width: SHARE_CARD_WIDTH, height: SHARE_CARD_HEIGHT }, 'route', true);
+ download(blob, diagramFilename() + '-route-share-card.png');
+ toast('Downloaded Route Share Card');
+ return blob;
+ }).catch(function (err) {
+ console.error(err);
+ var message = err && err.message ? err.message : 'share-card';
+ document.documentElement.setAttribute('data-last-export-error-format', 'share-card');
+ document.documentElement.setAttribute('data-last-export-error', message);
+ alert('Route Share Card export failed: ' + message);
+ });
+ }
+
// A compact, machine-readable receipt for local QA and generated proof
// galleries. It exposes no diagram contents, only the completed format,
// byte count, and whether temporary viewer state was excluded.
- function recordExportReceipt(format, blob, canonical) {
+ function recordExportReceipt(format, blob, canonical, dimensions, variant, routeStateClean) {
document.documentElement.setAttribute('data-last-export-format', format);
document.documentElement.setAttribute('data-last-export-bytes', String(blob.size));
document.documentElement.setAttribute('data-last-export-canonical', canonical ? 'true' : 'false');
+ if (variant) {
+ document.documentElement.setAttribute('data-last-export-variant', variant);
+ } else {
+ document.documentElement.removeAttribute('data-last-export-variant');
+ }
+ if (routeStateClean === true) {
+ document.documentElement.setAttribute('data-last-export-route-state-clean', 'true');
+ } else {
+ document.documentElement.removeAttribute('data-last-export-route-state-clean');
+ }
+ if (dimensions) {
+ document.documentElement.setAttribute('data-last-export-width', String(dimensions.width));
+ document.documentElement.setAttribute('data-last-export-height', String(dimensions.height));
+ } else {
+ document.documentElement.removeAttribute('data-last-export-width');
+ document.documentElement.removeAttribute('data-last-export-height');
+ }
+ }
+
+ function clearExportReceipt() {
+ document.documentElement.removeAttribute('data-last-export-format');
+ document.documentElement.removeAttribute('data-last-export-bytes');
+ document.documentElement.removeAttribute('data-last-export-canonical');
+ document.documentElement.removeAttribute('data-last-export-width');
+ document.documentElement.removeAttribute('data-last-export-height');
+ document.documentElement.removeAttribute('data-last-export-variant');
+ document.documentElement.removeAttribute('data-last-export-route-state-clean');
+ document.documentElement.removeAttribute('data-last-export-error-format');
+ document.documentElement.removeAttribute('data-last-export-error');
+ }
+
+ function writePngToClipboard(blobPromise) {
+ // WebKit requires ClipboardItem to be constructed synchronously inside
+ // the user gesture. Chromium accepts the same pending Promise<Blob>;
+ // engines that reject promise values fall back to an awaited Blob.
+ try {
+ return navigator.clipboard.write([new ClipboardItem({ 'image/png': blobPromise })]);
+ } catch (_) {
+ return blobPromise.then(function (blob) {
+ return navigator.clipboard.write([new ClipboardItem({ 'image/png': blob })]);
+ });
+ }
+ }
+
+ function runCopyShareCard() {
+ close(true);
+ clearExportReceipt();
+ if (!canCopyImage()) {
+ alert('Clipboard image write not supported by this browser.');
+ return;
+ }
+ var blobPromise = rasterizeShareCard();
+ return writePngToClipboard(blobPromise).then(function () {
+ return blobPromise.then(function (blob) {
+ recordExportReceipt('share-card', blob, true, { width: SHARE_CARD_WIDTH, height: SHARE_CARD_HEIGHT });
+ toast('Copied Share Card');
+ });
+ }).catch(function (err) {
+ console.error(err);
+ var message = err && err.message ? err.message : 'unknown';
+ document.documentElement.setAttribute('data-last-export-error-format', 'share-card');
+ document.documentElement.setAttribute('data-last-export-error', message);
+ alert('Copy failed: ' + message);
+ });
}
function runCopy() {
close(true);
+ clearExportReceipt();
if (!canCopyImage()) {
alert('Clipboard image write not supported in this browser.');
return;
}
- // WebKit requires ClipboardItem to be constructed synchronously inside
- // the user gesture — pass the pending Promise<Blob> as the item value.
- // Browsers that reject promise values throw synchronously; fall back
- // to awaiting the blob first (works in Chromium/Firefox).
var blobPromise = rasterize('png');
- var writePromise;
- try {
- writePromise = navigator.clipboard.write([new ClipboardItem({ 'image/png': blobPromise })]);
- } catch (_) {
- writePromise = blobPromise.then(function (blob) {
- return navigator.clipboard.write([new ClipboardItem({ 'image/png': blob })]);
- });
- }
- return writePromise.then(function () {
+ return writePngToClipboard(blobPromise).then(function () {
toast('Copied PNG to clipboard');
}).catch(function (err) {
console.error(err);
@@ -5216,6 +5769,12 @@
}
menu.addEventListener('click', function (e) {
+ var routeShareCardBtn = e.target.closest('button[data-action="route-share-card"]');
+ if (routeShareCardBtn && !routeShareCardBtn.disabled && !routeShareCardBtn.hidden) { runRouteShareCard(); return; }
+
+ var copyShareCardBtn = e.target.closest('button[data-action="copy-share-card"]');
+ if (copyShareCardBtn && !copyShareCardBtn.disabled) { runCopyShareCard(); return; }
+
var copyBtn = e.target.closest('button[data-action="copy"]');
if (copyBtn && !copyBtn.disabled) { runCopy(); return; }
@@ -5224,7 +5783,16 @@
});
Archify.motion = { canRecord: canRecordMotion, recordWebm: recordWebm };
- Archify.exportMenu = { open: open, close: close, isOpen: isOpen, run: runExport };
+ Archify.exportMenu = {
+ open: open,
+ close: close,
+ isOpen: isOpen,
+ run: runExport,
+ shareCard: rasterizeShareCard,
+ downloadRouteShareCard: runRouteShareCard,
+ syncRouteShare: syncRouteShareItem,
+ copyShareCard: runCopyShareCard
+ };
// Auto-open on page load for demo/screenshot purposes: ?openExport=1
// Wait for fonts (so the menu doesn't flash before typography lands)
@@ -5509,6 +6077,29 @@
};
})();
+ /* Verified repository evidence is emitted only after the renderer checks
+ the authored GitHub revision, source blobs, and optional line ranges
+ against the explicit --repo-root. It remains outside the SVG so every
+ canonical visual export stays free of repository paths. */
+ Archify.sourceEvidence = (function () {
+ var element = document.getElementById('archify-source-evidence-data');
+ var payload = null;
+ if (element) {
+ try {
+ var parsed = JSON.parse(element.textContent || 'null');
+ if (parsed && parsed.verified === true && parsed.repository && parsed.nodes) payload = parsed;
+ } catch (_) {}
+ }
+ return {
+ available: function () { return Boolean(payload); },
+ repository: function () { return payload ? payload.repository : null; },
+ node: function (id) {
+ var sources = payload && payload.nodes ? payload.nodes[id] : null;
+ return Array.isArray(sources) ? sources.slice() : [];
+ }
+ };
+ })();
+
/* ============================================================
Explore — stable-ID neighborhood focus + dependency-free pan/zoom.
Renderer IDs become deep-linkable semantic hooks without turning the
@@ -5525,6 +6116,9 @@
var context = document.getElementById('focus-context');
var tag = document.getElementById('focus-tag');
var semanticId = document.getElementById('focus-id');
+ var evidence = document.getElementById('focus-evidence');
+ var repositoryLink = document.getElementById('focus-repository');
+ var evidenceLinks = document.getElementById('focus-evidence-links');
var summary = document.getElementById('focus-summary');
var relationshipList = document.getElementById('relationship-lens-list');
var copyBtn = document.getElementById('btn-focus-copy');
@@ -5557,6 +6151,43 @@
element.textContent = normalized;
element.hidden = !normalized;
}
+ function renderSourceEvidence(id) {
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
+ var sources = Archify.sourceEvidence.node(id);
+ var repository = Archify.sourceEvidence.repository();
+ if (!repository || !sources.length) {
+ evidence.hidden = true;
+ return;
+ }
+ var slug = repository.url.replace(/^https:\/\/github\.com\//, '').replace(/\/$/, '');
+ repositoryLink.href = repository.url + '/tree/' + repository.revision;
+ repositoryLink.textContent = slug + ' @ ' + repository.shortRevision;
+ repositoryLink.setAttribute('aria-label', 'Open verified repository revision ' + repository.revision);
+ sources.forEach(function (source) {
+ var link = document.createElement('a');
+ link.className = 'semantic-passport-source';
+ link.href = source.href;
+ link.target = '_blank';
+ link.rel = 'noopener noreferrer';
+ link.referrerPolicy = 'no-referrer';
+ link.setAttribute('aria-label', 'Open verified source ' + source.path + ' at revision ' + repository.shortRevision);
+ var name = document.createElement('strong');
+ name.textContent = source.label || source.path.split('/').pop() || source.path;
+ var location = document.createElement('code');
+ location.textContent = source.line
+ ? 'L' + source.line + (source.endLine && source.endLine !== source.line ? '–' + source.endLine : '') + ' ↗'
+ : 'Open ↗';
+ var sourcePath = document.createElement('small');
+ sourcePath.textContent = source.path;
+ link.appendChild(name);
+ link.appendChild(location);
+ link.appendChild(sourcePath);
+ evidenceLinks.appendChild(link);
+ });
+ evidence.hidden = false;
+ }
function renderPassport(id, node) {
setPassportValue(detail, node.getAttribute('data-node-sublabel'));
setPassportValue(kind, node.getAttribute('data-node-kind') || 'node');
@@ -5564,6 +6195,7 @@
setPassportValue(tag, node.getAttribute('data-node-tag'));
semanticId.textContent = id;
semanticId.hidden = false;
+ renderSourceEvidence(id);
}
function relationshipsFor(id, byId) {
var seen = {};
@@ -6243,6 +6875,10 @@
tag.hidden = true;
semanticId.textContent = '';
semanticId.hidden = true;
+ evidence.hidden = true;
+ evidenceLinks.textContent = '';
+ repositoryLink.removeAttribute('href');
+ repositoryLink.textContent = '';
summary.textContent = '';
relationshipList.textContent = '';
copyBtn.textContent = 'Copy link';
@@ -9264,6 +9900,10 @@
var context = node.getAttribute('data-node-context') || '';
var tag = node.getAttribute('data-node-tag') || '';
var type = semanticType(node);
+ var sources = Archify.sourceEvidence.node(id);
+ var sourceSearch = sources.map(function (source) {
+ return [source.path, source.label, source.line, source.endLine].filter(Boolean).join(' ');
+ }).join(' ');
return {
id: id,
label: label,
@@ -9271,8 +9911,9 @@
sublabel: sublabel,
context: context,
tag: tag,
+ sources: sources,
links: connectionsFor(id),
- search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + text).toLowerCase(),
+ search: (id + ' ' + label + ' ' + type + ' ' + sublabel + ' ' + context + ' ' + tag + ' ' + sourceSearch + ' ' + text).toLowerCase(),
node: node
};
});
@@ -9341,7 +9982,11 @@
button.type = 'button';
button.className = 'node-finder-result';
button.setAttribute('data-node-id', item.id);
- var badge = context.badges && context.badges[item.id] ? context.badges[item.id] : String(item.links);
+ var badge = context.badges && context.badges[item.id]
+ ? context.badges[item.id]
+ : context.kind === 'focus'
+ ? item.links + (item.links === 1 ? ' link' : ' links')
+ : String(item.links);
var action = context.kind === 'route-source'
? 'Choose ' + item.label + ' as route start'
: context.kind === 'route-target'
@@ -9353,11 +9998,10 @@
name.textContent = item.label;
var links = document.createElement('em');
links.textContent = badge;
- links.title = context.kind === 'focus'
- ? item.links + ' related connection' + (item.links === 1 ? '' : 's')
- : action;
+ links.title = context.kind === 'focus' ? badge : action;
var meta = document.createElement('small');
- meta.textContent = [item.type, item.context, item.sublabel, item.tag, item.id].filter(Boolean).join(' \u00b7 ');
+ meta.textContent = [item.type, item.id, item.sublabel, item.tag].filter(Boolean).join(' \u00b7 ');
+ meta.title = [item.type, item.id, item.context, item.sublabel, item.tag].filter(Boolean).join(' \u00b7 ');
button.appendChild(name);
button.appendChild(links);
button.appendChild(meta);
@@ -9365,7 +10009,9 @@
results.appendChild(button);
});
empty.hidden = visibleItems.length !== 0;
- status.textContent = visibleItems.length + ' of ' + available.length + ' ' + context.availableNoun + (query ? ' match' : ' available');
+ status.textContent = query
+ ? visibleItems.length + ' of ' + available.length + ' ' + context.availableNoun
+ : available.length + ' ' + context.availableNoun;
}
function open(options) {
@@ -9498,7 +10144,7 @@
return Array.prototype.slice.call(svg.querySelectorAll('[data-edge-from][data-edge-to]'));
}
function nodesById() {
- var out = {};
+ var out = Object.create(null);
nodes().forEach(function (node) { out[node.getAttribute('data-node-id')] = node; });
return out;
}
@@ -9506,6 +10152,54 @@
return node.getAttribute('data-node-label') ||
(node.getAttribute('aria-label') || fallback).replace(/^Focus\s+/, '').split(',')[0];
}
+ function exportSnapshot() {
+ if (mode !== 'result' || activeNodeIds.length < 2 || activeEdges.length !== activeNodeIds.length - 1) return null;
+ var allNodes = nodes();
+ var byId = nodesById();
+ var seenNodeIds = Object.create(null);
+ var seenEdgeKeys = Object.create(null);
+ if (startId !== activeNodeIds[0] || endId !== activeNodeIds[activeNodeIds.length - 1] ||
+ activeNodeIds.some(function (id) {
+ if (seenNodeIds[id] || allNodes.filter(function (node) {
+ return node.getAttribute('data-node-id') === id;
+ }).length !== 1) return true;
+ seenNodeIds[id] = true;
+ return !byId[id];
+ }) ||
+ activeEdges.some(function (edge, index) {
+ if (!edge || !svg.contains(edge)) return true;
+ var edgeKey = edge.getAttribute('data-edge-key');
+ var edgeId = edge.getAttribute('data-edge-id') || '';
+ if (!edgeKey || seenEdgeKeys[edgeKey]) return true;
+ seenEdgeKeys[edgeKey] = true;
+ var fragments = Array.prototype.slice.call(svg.querySelectorAll('[data-edge-key]')).filter(function (candidate) {
+ return candidate.getAttribute('data-edge-key') === edgeKey;
+ });
+ var drawableFragments = fragments.filter(hasDrawableGeometry);
+ return !fragments.length || !fragments.every(function (fragment) {
+ return fragment.getAttribute('data-edge-from') === activeNodeIds[index] &&
+ fragment.getAttribute('data-edge-to') === activeNodeIds[index + 1] &&
+ (fragment.getAttribute('data-edge-id') || '') === edgeId;
+ }) || drawableFragments.length !== 1 || drawableFragments[0] !== edge ||
+ edge.getAttribute('data-edge-from') !== activeNodeIds[index] ||
+ edge.getAttribute('data-edge-to') !== activeNodeIds[index + 1];
+ })) return null;
+ return {
+ source: { id: startId, label: nodeLabel(byId[startId], startId) },
+ target: { id: endId, label: nodeLabel(byId[endId], endId) },
+ nodeIds: activeNodeIds.slice(),
+ hops: activeEdges.length,
+ edges: activeEdges.map(function (edge) {
+ return {
+ key: edge.getAttribute('data-edge-key'),
+ id: edge.getAttribute('data-edge-id') || '',
+ from: edge.getAttribute('data-edge-from'),
+ to: edge.getAttribute('data-edge-to'),
+ label: edge.getAttribute('data-edge-label') || ''
+ };
+ })
+ };
+ }
function edgeShapes(edge) {
if (/^(path|line|polyline)$/i.test(edge.tagName)) return [edge];
return Array.prototype.slice.call(edge.querySelectorAll('path, line, polyline'));
@@ -9654,6 +10348,7 @@
findBtn.setAttribute('aria-label', 'Find a route start');
copyBtn.hidden = true;
copyBtn.textContent = 'Copy link';
+ if (Archify.exportMenu && typeof Archify.exportMenu.syncRouteShare === 'function') Archify.exportMenu.syncRouteShare();
setTrigger(false);
if (wasActive && options.preserveView !== true && Archify.view && typeof Archify.view.reset === 'function') {
Archify.view.reset({ automatic: true });
@@ -10133,6 +10828,7 @@
findBtn.hidden = true;
copyBtn.hidden = false;
setTrigger(true);
+ if (Archify.exportMenu && typeof Archify.exportMenu.syncRouteShare === 'function') Archify.exportMenu.syncRouteShare();
if (options.updateUrl !== false) {
replaceRouteHash(encodeURIComponent(startId) + '~' + encodeURIComponent(endId));
}
@@ -10403,6 +11099,7 @@
finderOpening: finderOpening,
finderClosed: finderClosed,
openFinder: openFinder,
+ exportSnapshot: exportSnapshot,
active: function () { return mode === 'idle' ? null : mode; },
result: function () {
return mode === 'result'
@@ -11181,6 +11878,7 @@
if (action === 'present') return Archify.presentation.enter();
if (action === 'export') return Archify.exportMenu.open();
if (action === 'theme') return Archify.theme.toggle();
+ if (action === 'preset') return Archify.preset.cycle();
if (action === 'reset') return Archify.view.reset();
if (action === 'zoom-in') return Archify.view.zoomIn();
if (action === 'zoom-out') return Archify.view.zoomOut();
@@ -11196,6 +11894,7 @@
f: 'present',
e: 'export',
t: 'theme',
+ s: 'preset',
'0': 'reset',
'+': 'zoom-in',
'=': 'zoom-in',
@@ -11262,9 +11961,10 @@
/* ============================================================
Global keyboard shortcuts
- ? -> open Diagram Guide
- T -> toggle theme
- E -> open export menu
+ ? -> open Diagram Guide
+ T -> toggle theme
+ S -> cycle visual style
+ E -> open export menu
F -> toggle presentation stage
M -> toggle Semantic Radar
L -> toggle Semantic Lens
@@ -11288,6 +11988,9 @@
} else if (e.key === 't' || e.key === 'T') {
e.preventDefault();
Archify.theme.toggle();
+ } else if (e.key === 's' || e.key === 'S') {
+ e.preventDefault();
+ Archify.preset.cycle();
} else if (e.key === 'e' || e.key === 'E') {
e.preventDefault();
if (!Archify.exportMenu.isOpen()) Archify.exportMenu.open();