{
  "definitions": [
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "presentation/renderers/anatomy.renderer.ts",
          "name": "repositoryKey",
          "source": {
            "href": "https://banes-lab.com/anatomy/tree#file-presentation-renderers-anatomy-renderer-ts",
            "json": "https://banes-lab.com/json/source/tree/presentation/renderers/anatomy.renderer.ts",
            "label": "presentation/renderers/anatomy.renderer.ts",
            "markdown": "https://banes-lab.com/source/tree/presentation/renderers/anatomy.renderer.ts.md",
            "ref": "anatomy:file-presentation-renderers-anatomy-renderer-ts"
          }
        },
        {
          "file": "presentation/renderers/folder.renderer.ts",
          "name": "pathOf",
          "source": {
            "href": "https://banes-lab.com/anatomy/tree#file-presentation-renderers-folder-renderer-ts",
            "json": "https://banes-lab.com/json/source/tree/presentation/renderers/folder.renderer.ts",
            "label": "presentation/renderers/folder.renderer.ts",
            "markdown": "https://banes-lab.com/source/tree/presentation/renderers/folder.renderer.ts.md",
            "ref": "anatomy:file-presentation-renderers-folder-renderer-ts"
          }
        },
        {
          "file": "presentation/renderers/folder.renderer.ts",
          "name": "renderNode",
          "source": {
            "href": "https://banes-lab.com/anatomy/tree#file-presentation-renderers-folder-renderer-ts",
            "json": "https://banes-lab.com/json/source/tree/presentation/renderers/folder.renderer.ts",
            "label": "presentation/renderers/folder.renderer.ts",
            "markdown": "https://banes-lab.com/source/tree/presentation/renderers/folder.renderer.ts.md",
            "ref": "anatomy:file-presentation-renderers-folder-renderer-ts"
          }
        }
      ],
      "exported": true,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 55,
      "name": "isFolder",
      "signature": "export const isFolder = function isFolder(node: TreeNode): node is FolderNode {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "presentation/components/folder.component.ts",
          "name": "renderFileEntry",
          "source": {
            "href": "https://banes-lab.com/anatomy/tree#file-presentation-components-folder-component-ts",
            "json": "https://banes-lab.com/json/source/tree/presentation/components/folder.component.ts",
            "label": "presentation/components/folder.component.ts",
            "markdown": "https://banes-lab.com/source/tree/presentation/components/folder.component.ts.md",
            "ref": "anatomy:file-presentation-components-folder-component-ts"
          }
        },
        {
          "file": "presentation/renderers/folder.renderer.ts",
          "name": "renderCrumbs",
          "source": {
            "href": "https://banes-lab.com/anatomy/tree#file-presentation-renderers-folder-renderer-ts",
            "json": "https://banes-lab.com/json/source/tree/presentation/renderers/folder.renderer.ts",
            "label": "presentation/renderers/folder.renderer.ts",
            "markdown": "https://banes-lab.com/source/tree/presentation/renderers/folder.renderer.ts.md",
            "ref": "anatomy:file-presentation-renderers-folder-renderer-ts"
          }
        },
        {
          "file": "presentation/renderers/folder.renderer.ts",
          "name": "renderFileCard",
          "source": {
            "href": "https://banes-lab.com/anatomy/tree#file-presentation-renderers-folder-renderer-ts",
            "json": "https://banes-lab.com/json/source/tree/presentation/renderers/folder.renderer.ts",
            "label": "presentation/renderers/folder.renderer.ts",
            "markdown": "https://banes-lab.com/source/tree/presentation/renderers/folder.renderer.ts.md",
            "ref": "anatomy:file-presentation-renderers-folder-renderer-ts"
          }
        }
      ],
      "exported": true,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 77,
      "name": "treeLink",
      "signature": "export const treeLink = function treeLink(node: TreeNode, className: string): HTMLAnchorElement {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "core/factories/element.factory.ts",
          "name": "appendChildren",
          "source": {
            "href": "https://banes-lab.com/anatomy/tree#file-core-factories-element-factory-ts",
            "json": "https://banes-lab.com/json/source/tree/core/factories/element.factory.ts",
            "label": "core/factories/element.factory.ts",
            "markdown": "https://banes-lab.com/source/tree/core/factories/element.factory.ts.md",
            "ref": "anatomy:file-core-factories-element-factory-ts"
          }
        },
        {
          "file": "core/factories/element.factory.ts",
          "name": "createElement",
          "source": {
            "href": "https://banes-lab.com/anatomy/tree#file-core-factories-element-factory-ts",
            "json": "https://banes-lab.com/json/source/tree/core/factories/element.factory.ts",
            "label": "core/factories/element.factory.ts",
            "markdown": "https://banes-lab.com/source/tree/core/factories/element.factory.ts.md",
            "ref": "anatomy:file-core-factories-element-factory-ts"
          }
        }
      ],
      "callers": [
        {
          "file": "presentation/components/folder.component.ts",
          "name": "renderTree",
          "source": {
            "href": "https://banes-lab.com/anatomy/tree#file-presentation-components-folder-component-ts",
            "json": "https://banes-lab.com/json/source/tree/presentation/components/folder.component.ts",
            "label": "presentation/components/folder.component.ts",
            "markdown": "https://banes-lab.com/source/tree/presentation/components/folder.component.ts.md",
            "ref": "anatomy:file-presentation-components-folder-component-ts"
          }
        }
      ],
      "exported": false,
      "flow": "relay",
      "kind": "lexical_declaration",
      "line": 93,
      "name": "renderFolderEntry",
      "signature": "const renderFolderEntry = function renderFolderEntry(node: FolderNode, open: boolean): Element {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "presentation/components/folder.component.ts",
          "name": "treeNodesOf",
          "source": {
            "href": "https://banes-lab.com/anatomy/tree#file-presentation-components-folder-component-ts",
            "json": "https://banes-lab.com/json/source/tree/presentation/components/folder.component.ts",
            "label": "presentation/components/folder.component.ts",
            "markdown": "https://banes-lab.com/source/tree/presentation/components/folder.component.ts.md",
            "ref": "anatomy:file-presentation-components-folder-component-ts"
          }
        }
      ],
      "exported": false,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 15,
      "name": "folderNode",
      "signature": "const folderNode = function folderNode(section: Section, path: string, name: string): FolderNode {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "presentation/components/folder.component.ts",
          "name": "treeNodesOf",
          "source": {
            "href": "https://banes-lab.com/anatomy/tree#file-presentation-components-folder-component-ts",
            "json": "https://banes-lab.com/json/source/tree/presentation/components/folder.component.ts",
            "label": "presentation/components/folder.component.ts",
            "markdown": "https://banes-lab.com/source/tree/presentation/components/folder.component.ts.md",
            "ref": "anatomy:file-presentation-components-folder-component-ts"
          }
        }
      ],
      "exported": false,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 25,
      "name": "withChildren",
      "signature": "const withChildren = function withChildren("
    },
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "presentation/renderers/anatomy.renderer.ts",
          "name": "select",
          "source": {
            "href": "https://banes-lab.com/anatomy/tree#file-presentation-renderers-anatomy-renderer-ts",
            "json": "https://banes-lab.com/json/source/tree/presentation/renderers/anatomy.renderer.ts",
            "label": "presentation/renderers/anatomy.renderer.ts",
            "markdown": "https://banes-lab.com/source/tree/presentation/renderers/anatomy.renderer.ts.md",
            "ref": "anatomy:file-presentation-renderers-anatomy-renderer-ts"
          }
        }
      ],
      "exported": true,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 121,
      "name": "markSelected",
      "signature": "export const markSelected = function markSelected(tree: Element, id: string): void {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "presentation/components/folder.component.ts",
          "name": "folderNode",
          "source": {
            "href": "https://banes-lab.com/anatomy/tree#file-presentation-components-folder-component-ts",
            "json": "https://banes-lab.com/json/source/tree/presentation/components/folder.component.ts",
            "label": "presentation/components/folder.component.ts",
            "markdown": "https://banes-lab.com/source/tree/presentation/components/folder.component.ts.md",
            "ref": "anatomy:file-presentation-components-folder-component-ts"
          }
        },
        {
          "file": "presentation/components/folder.component.ts",
          "name": "withChildren",
          "source": {
            "href": "https://banes-lab.com/anatomy/tree#file-presentation-components-folder-component-ts",
            "json": "https://banes-lab.com/json/source/tree/presentation/components/folder.component.ts",
            "label": "presentation/components/folder.component.ts",
            "markdown": "https://banes-lab.com/source/tree/presentation/components/folder.component.ts.md",
            "ref": "anatomy:file-presentation-components-folder-component-ts"
          }
        }
      ],
      "callers": [],
      "exported": true,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 43,
      "name": "treeNodesOf",
      "signature": "export const treeNodesOf = function treeNodesOf("
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "core/factories/element.factory.ts",
          "name": "createElement",
          "source": {
            "href": "https://banes-lab.com/anatomy/tree#file-core-factories-element-factory-ts",
            "json": "https://banes-lab.com/json/source/tree/core/factories/element.factory.ts",
            "label": "core/factories/element.factory.ts",
            "markdown": "https://banes-lab.com/source/tree/core/factories/element.factory.ts.md",
            "ref": "anatomy:file-core-factories-element-factory-ts"
          }
        },
        {
          "file": "presentation/components/folder.component.ts",
          "name": "treeLink",
          "source": {
            "href": "https://banes-lab.com/anatomy/tree#file-presentation-components-folder-component-ts",
            "json": "https://banes-lab.com/json/source/tree/presentation/components/folder.component.ts",
            "label": "presentation/components/folder.component.ts",
            "markdown": "https://banes-lab.com/source/tree/presentation/components/folder.component.ts.md",
            "ref": "anatomy:file-presentation-components-folder-component-ts"
          }
        }
      ],
      "callers": [],
      "exported": false,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 89,
      "name": "renderFileEntry",
      "signature": "const renderFileEntry = function renderFileEntry(file: FileNode): Element {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "core/factories/element.factory.ts",
          "name": "createElement",
          "source": {
            "href": "https://banes-lab.com/anatomy/tree#file-core-factories-element-factory-ts",
            "json": "https://banes-lab.com/json/source/tree/core/factories/element.factory.ts",
            "label": "core/factories/element.factory.ts",
            "markdown": "https://banes-lab.com/source/tree/core/factories/element.factory.ts.md",
            "ref": "anatomy:file-core-factories-element-factory-ts"
          }
        },
        {
          "file": "presentation/components/folder.component.ts",
          "name": "renderFolderEntry",
          "source": {
            "href": "https://banes-lab.com/anatomy/tree#file-presentation-components-folder-component-ts",
            "json": "https://banes-lab.com/json/source/tree/presentation/components/folder.component.ts",
            "label": "presentation/components/folder.component.ts",
            "markdown": "https://banes-lab.com/source/tree/presentation/components/folder.component.ts.md",
            "ref": "anatomy:file-presentation-components-folder-component-ts"
          }
        }
      ],
      "callers": [],
      "exported": true,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 111,
      "name": "renderTree",
      "signature": "export const renderTree = function renderTree(root: FolderNode): Element {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 16,
      "name": "files",
      "signature": "const files = section.subsections.map((sub, index) => ({"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 30,
      "name": "ids",
      "signature": "const ids = Object.hasOwn(folders, node.id) ? (folders[node.id] ?? []) : [];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 31,
      "name": "children",
      "signature": "const children = ids.flatMap((id) => {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 32,
      "name": "section",
      "signature": "const section = sections.get(id);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 36,
      "name": "path",
      "signature": "const path = section.title;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 37,
      "name": "child",
      "signature": "const child = folderNode(section, path, path.slice(path.lastIndexOf(PATH_SEPARATOR) + 1));"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 47,
      "name": "[rootSection]",
      "signature": "const [rootSection] = sections;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 51,
      "name": "byId",
      "signature": "const byId = new Map(sections.map((section) => [section.id, section] as const));"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 59,
      "name": "ancestorsOf",
      "signature": "export const ancestorsOf = function ancestorsOf(root: FolderNode, path: string): readonly FolderNode[] {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 60,
      "name": "crumbs",
      "signature": "const crumbs: FolderNode[] = [root];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 61,
      "name": "current",
      "signature": "let current = root;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 63,
      "name": "next",
      "signature": "const next = current.folders.find((folder) => folder.name === segment);"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 73,
      "name": "flatten",
      "signature": "export const flatten = function flatten(root: FolderNode): readonly TreeNode[] {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 78,
      "name": "folder",
      "signature": "const folder = isFolder(node);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 79,
      "name": "link",
      "signature": "const link = createLink(ANCHOR_PREFIX + node.id, className, ["
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 99,
      "name": "summary",
      "signature": "const summary = createElement(\"summary\", {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 106,
      "name": "details",
      "signature": "const details = createElement(DETAILS_TAG, { children: [summary, list], className: TREE_FOLDER_CLASS });"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 112,
      "name": "list",
      "signature": "const list = createElement(\"ul\", { className: \"tree-list tree-root\" });"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 114,
      "name": "scroll",
      "signature": "const scroll = createElement(\"div\", {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 125,
      "name": "selected",
      "signature": "const selected = tree.querySelector<HTMLAnchorElement>(`[${NODE_ATTRIBUTE}=\"${id}\"]`);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 126,
      "name": "ancestor",
      "signature": "let ancestor = selected?.closest<HTMLDetailsElement>(DETAILS_TAG) ?? null;"
    }
  ],
  "document": null,
  "findings": [],
  "generated": false,
  "href": "https://banes-lab.com/anatomy/tree#file-presentation-components-folder-component-ts",
  "language": "typescript",
  "layer": "product",
  "name": "folder.component.ts",
  "path": "presentation/components/folder.component.ts",
  "ref": "anatomy:file-presentation-components-folder-component-ts",
  "relations": [
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/tree#folder-presentation-components",
          "json": "https://banes-lab.com/json/anatomy/tree/folder-presentation-components",
          "label": "presentation/components",
          "markdown": "https://banes-lab.com/anatomy/tree/folder-presentation-components.md",
          "ref": "chapter:/anatomy/tree#folder-presentation-components"
        }
      ],
      "relation": "contained-in"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/tree#file-core-factories-element-factory-ts",
          "json": "https://banes-lab.com/json/source/tree/core/factories/element.factory.ts",
          "label": "core/factories/element.factory.ts",
          "markdown": "https://banes-lab.com/source/tree/core/factories/element.factory.ts.md",
          "ref": "anatomy:file-core-factories-element-factory-ts"
        }
      ],
      "relation": "uses"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/tree#file-presentation-renderers-anatomy-renderer-ts",
          "json": "https://banes-lab.com/json/source/tree/presentation/renderers/anatomy.renderer.ts",
          "label": "presentation/renderers/anatomy.renderer.ts",
          "markdown": "https://banes-lab.com/source/tree/presentation/renderers/anatomy.renderer.ts.md",
          "ref": "anatomy:file-presentation-renderers-anatomy-renderer-ts"
        },
        {
          "href": "https://banes-lab.com/anatomy/tree#file-presentation-renderers-folder-renderer-ts",
          "json": "https://banes-lab.com/json/source/tree/presentation/renderers/folder.renderer.ts",
          "label": "presentation/renderers/folder.renderer.ts",
          "markdown": "https://banes-lab.com/source/tree/presentation/renderers/folder.renderer.ts.md",
          "ref": "anatomy:file-presentation-renderers-folder-renderer-ts"
        }
      ],
      "relation": "used-by"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/tree#folder-core-factories",
          "json": "https://banes-lab.com/json/anatomy/tree/folder-core-factories",
          "label": "core/factories",
          "markdown": "https://banes-lab.com/anatomy/tree/folder-core-factories.md",
          "ref": "chapter:/anatomy/tree#folder-core-factories"
        },
        {
          "href": "https://banes-lab.com/anatomy/tree#folder-presentation-components",
          "json": "https://banes-lab.com/json/anatomy/tree/folder-presentation-components",
          "label": "presentation/components",
          "markdown": "https://banes-lab.com/anatomy/tree/folder-presentation-components.md",
          "ref": "chapter:/anatomy/tree#folder-presentation-components"
        },
        {
          "href": "https://banes-lab.com/anatomy/tree#folder-presentation-renderers",
          "json": "https://banes-lab.com/json/anatomy/tree/folder-presentation-renderers",
          "label": "presentation/renderers",
          "markdown": "https://banes-lab.com/anatomy/tree/folder-presentation-renderers.md",
          "ref": "chapter:/anatomy/tree#folder-presentation-renderers"
        }
      ],
      "relation": "linked-from"
    }
  ],
  "slots": {
    "concern": "component",
    "subject": "folder",
    "variant": null
  },
  "stats": {
    "bytes": 5890,
    "callable": 11,
    "definitions": 30,
    "edges": 8,
    "exported": 18,
    "files": 1,
    "findings": {},
    "flows": {
      "leaf": 5,
      "relay": 1,
      "entry": 3,
      "isolated": 21
    },
    "lines": {
      "blank": 11,
      "code": 120,
      "total": 131
    }
  },
  "summary": "120 lines of code and 30 definitions.",
  "text": "https://banes-lab.com/source/tree/presentation/components/folder.component.ts.txt",
  "tree": "tree",
  "siblings": {
    "next": {
      "href": "https://banes-lab.com/anatomy/tree#file-presentation-components-home-component-ts",
      "json": "https://banes-lab.com/json/source/tree/presentation/components/home.component.ts",
      "label": "presentation/components/home.component.ts",
      "markdown": "https://banes-lab.com/source/tree/presentation/components/home.component.ts.md",
      "ref": "anatomy:file-presentation-components-home-component-ts"
    },
    "previous": {
      "href": "https://banes-lab.com/anatomy/tree#file-presentation-components-filter-component-ts",
      "json": "https://banes-lab.com/json/source/tree/presentation/components/filter.component.ts",
      "label": "presentation/components/filter.component.ts",
      "markdown": "https://banes-lab.com/source/tree/presentation/components/filter.component.ts.md",
      "ref": "anatomy:file-presentation-components-filter-component-ts"
    }
  },
  "up": {
    "href": null,
    "json": "https://banes-lab.com/json/api/source/tree/presentation/components",
    "label": "presentation/components",
    "markdown": "https://banes-lab.com/api/source/tree/presentation/components.md",
    "ref": "api:source/tree/presentation/components"
  }
}
