package.dist.chunks.mermaid.esm.dagre-YJZDXZCU.mjs.map Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mermaid Show documentation
Show all versions of mermaid Show documentation
Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.
{
"version": 3,
"sources": ["../../../src/rendering-util/layout-algorithms/dagre/mermaid-graphlib.js", "../../../src/rendering-util/layout-algorithms/dagre/index.js"],
"sourcesContent": ["/** Decorates with functions required by mermaids dagre-wrapper. */\nimport { log } from '$root/logger.js';\nimport * as graphlib from 'dagre-d3-es/src/graphlib/index.js';\nimport * as graphlibJson from 'dagre-d3-es/src/graphlib/json.js';\n\nexport let clusterDb = new Map();\nlet descendants = new Map();\nlet parents = new Map();\n\nexport const clear = () => {\n descendants.clear();\n parents.clear();\n clusterDb.clear();\n};\n\nconst isDescendant = (id, ancestorId) => {\n const ancestorDescendants = descendants.get(ancestorId) || [];\n log.trace('In isDescendant', ancestorId, ' ', id, ' = ', ancestorDescendants.includes(id));\n return ancestorDescendants.includes(id);\n};\n\nconst edgeInCluster = (edge, clusterId) => {\n const clusterDescendants = descendants.get(clusterId) || [];\n log.info('Descendants of ', clusterId, ' is ', clusterDescendants);\n log.info('Edge is ', edge);\n if (edge.v === clusterId || edge.w === clusterId) {\n return false;\n }\n\n if (!clusterDescendants) {\n log.debug('Tilt, ', clusterId, ',not in descendants');\n return false;\n }\n\n return (\n clusterDescendants.includes(edge.v) ||\n isDescendant(edge.v, clusterId) ||\n isDescendant(edge.w, clusterId) ||\n clusterDescendants.includes(edge.w)\n );\n};\n\nconst copy = (clusterId, graph, newGraph, rootId) => {\n log.warn(\n 'Copying children of ',\n clusterId,\n 'root',\n rootId,\n 'data',\n graph.node(clusterId),\n rootId\n );\n const nodes = graph.children(clusterId) || [];\n\n if (clusterId !== rootId) {\n nodes.push(clusterId);\n }\n\n log.warn('Copying (nodes) clusterId', clusterId, 'nodes', nodes);\n\n nodes.forEach((node) => {\n if (graph.children(node).length > 0) {\n copy(node, graph, newGraph, rootId);\n } else {\n const data = graph.node(node);\n log.info('cp ', node, ' to ', rootId, ' with parent ', clusterId);\n newGraph.setNode(node, data);\n if (rootId !== graph.parent(node)) {\n log.warn('Setting parent', node, graph.parent(node));\n newGraph.setParent(node, graph.parent(node));\n }\n\n if (clusterId !== rootId && node !== clusterId) {\n log.debug('Setting parent', node, clusterId);\n newGraph.setParent(node, clusterId);\n } else {\n log.info('In copy ', clusterId, 'root', rootId, 'data', graph.node(clusterId), rootId);\n log.debug(\n 'Not Setting parent for node=',\n node,\n 'cluster!==rootId',\n clusterId !== rootId,\n 'node!==clusterId',\n node !== clusterId\n );\n }\n const edges = graph.edges(node);\n log.debug('Copying Edges', edges);\n edges.forEach((edge) => {\n log.info('Edge', edge);\n const data = graph.edge(edge.v, edge.w, edge.name);\n log.info('Edge data', data, rootId);\n try {\n if (edgeInCluster(edge, rootId)) {\n log.info('Copying as ', edge.v, edge.w, data, edge.name);\n newGraph.setEdge(edge.v, edge.w, data, edge.name);\n log.info('newGraph edges ', newGraph.edges(), newGraph.edge(newGraph.edges()[0]));\n } else {\n log.info(\n 'Skipping copy of edge ',\n edge.v,\n '-->',\n edge.w,\n ' rootId: ',\n rootId,\n ' clusterId:',\n clusterId\n );\n }\n } catch (e) {\n log.error(e);\n }\n });\n }\n log.debug('Removing node', node);\n graph.removeNode(node);\n });\n};\n\nexport const extractDescendants = (id, graph) => {\n const children = graph.children(id);\n let res = [...children];\n\n for (const child of children) {\n parents.set(child, id);\n res = [...res, ...extractDescendants(child, graph)];\n }\n\n return res;\n};\n\nexport const validate = (graph) => {\n const edges = graph.edges();\n log.trace('Edges: ', edges);\n for (const edge of edges) {\n if (graph.children(edge.v).length > 0) {\n log.trace('The node ', edge.v, ' is part of and edge even though it has children');\n return false;\n }\n if (graph.children(edge.w).length > 0) {\n log.trace('The node ', edge.w, ' is part of and edge even though it has children');\n return false;\n }\n }\n return true;\n};\n\nconst findCommonEdges = (graph, id1, id2) => {\n const edges1 = graph.edges().filter((edge) => edge.v === id1 || edge.w === id1);\n const edges2 = graph.edges().filter((edge) => edge.v === id2 || edge.w === id2);\n const edges1Prim = edges1.map((edge) => {\n return { v: edge.v === id1 ? id2 : edge.v, w: edge.w === id1 ? id1 : edge.w };\n });\n const edges2Prim = edges2.map((edge) => {\n return { v: edge.v, w: edge.w };\n });\n const result = edges1Prim.filter((edgeIn1) => {\n return edges2Prim.some((edge) => edgeIn1.v === edge.v && edgeIn1.w === edge.w);\n });\n\n return result;\n};\n\nexport const findNonClusterChild = (id, graph, clusterId) => {\n const children = graph.children(id);\n log.trace('Searching children of id ', id, children);\n if (children.length < 1) {\n return id;\n }\n let reserve;\n for (const child of children) {\n const _id = findNonClusterChild(child, graph, clusterId);\n\n const commonEdges = findCommonEdges(graph, clusterId, _id);\n\n if (_id) {\n if (commonEdges.length > 0) {\n reserve = _id;\n } else {\n return _id;\n }\n }\n }\n return reserve;\n};\n\nconst getAnchorId = (id) => {\n if (!clusterDb.has(id)) {\n return id;\n }\n if (!clusterDb.get(id).externalConnections) {\n return id;\n }\n\n if (clusterDb.has(id)) {\n return clusterDb.get(id).id;\n }\n return id;\n};\n\nexport const adjustClustersAndEdges = (graph, depth) => {\n if (!graph || depth > 10) {\n log.debug('Opting out, no graph ');\n return;\n } else {\n log.debug('Opting in, graph ');\n }\n\n graph.nodes().forEach(function (id) {\n const children = graph.children(id);\n if (children.length > 0) {\n log.warn(\n 'Cluster identified',\n id,\n ' Replacement id in edges: ',\n findNonClusterChild(id, graph, id)\n );\n descendants.set(id, extractDescendants(id, graph));\n clusterDb.set(id, { id: findNonClusterChild(id, graph, id), clusterData: graph.node(id) });\n }\n });\n\n graph.nodes().forEach(function (id) {\n const children = graph.children(id);\n const edges = graph.edges();\n if (children.length > 0) {\n log.debug('Cluster identified', id, descendants);\n edges.forEach((edge) => {\n const d1 = isDescendant(edge.v, id);\n const d2 = isDescendant(edge.w, id);\n\n if (d1 ^ d2) {\n log.warn('Edge: ', edge, ' leaves cluster ', id);\n log.warn('Descendants of XXX ', id, ': ', descendants.get(id));\n clusterDb.get(id).externalConnections = true;\n }\n });\n } else {\n log.debug('Not a cluster ', id, descendants);\n }\n });\n\n for (let id of clusterDb.keys()) {\n const nonClusterChild = clusterDb.get(id).id;\n const parent = graph.parent(nonClusterChild);\n\n if (parent !== id && clusterDb.has(parent) && !clusterDb.get(parent).externalConnections) {\n clusterDb.get(id).id = parent;\n }\n }\n\n graph.edges().forEach(function (e) {\n const edge = graph.edge(e);\n log.warn('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e));\n log.warn('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(graph.edge(e)));\n\n let v = e.v;\n let w = e.w;\n log.warn(\n 'Fix XXX',\n clusterDb,\n 'ids:',\n e.v,\n e.w,\n 'Translating: ',\n clusterDb.get(e.v),\n ' --- ',\n clusterDb.get(e.w)\n );\n if (clusterDb.get(e.v) && clusterDb.get(e.w) && clusterDb.get(e.v) === clusterDb.get(e.w)) {\n log.warn('Fixing and trying link to self - removing XXX', e.v, e.w, e.name);\n log.warn('Fixing and trying - removing XXX', e.v, e.w, e.name);\n v = getAnchorId(e.v);\n w = getAnchorId(e.w);\n graph.removeEdge(e.v, e.w, e.name);\n const specialId1 = e.w + '---' + e.v + '---1';\n const specialId2 = e.w + '---' + e.v + '---2';\n graph.setNode(specialId1, {\n domId: specialId1,\n id: specialId1,\n labelStyle: '',\n label: '',\n padding: 0,\n shape: 'labelRect',\n style: '',\n width: 10,\n height: 10,\n });\n graph.setNode(specialId2, {\n domId: specialId2,\n id: specialId2,\n labelStyle: '',\n padding: 0,\n shape: 'labelRect',\n style: '',\n width: 10,\n height: 10,\n });\n const edge1 = structuredClone(edge);\n const edgeMid = structuredClone(edge);\n const edge2 = structuredClone(edge);\n edge1.label = '';\n edge1.arrowTypeEnd = 'none';\n edge1.id = e.name + '-cyclic-special-1';\n edgeMid.arrowTypeEnd = 'none';\n edgeMid.id = e.name + '-cyclic-special-mid';\n edge2.label = '';\n edge1.fromCluster = e.v;\n edge2.toCluster = e.v;\n edge2.id = e.name + '-cyclic-special-2';\n graph.setEdge(v, specialId1, edge1, e.name + '-cyclic-special-0');\n graph.setEdge(specialId1, specialId2, edgeMid, e.name + '-cyclic-special-1');\n graph.setEdge(specialId2, w, edge2, e.name + '-cyclic-special-2');\n } else if (clusterDb.get(e.v) || clusterDb.get(e.w)) {\n log.warn('Fixing and trying - removing XXX', e.v, e.w, e.name);\n v = getAnchorId(e.v);\n w = getAnchorId(e.w);\n graph.removeEdge(e.v, e.w, e.name);\n if (v !== e.v) {\n const parent = graph.parent(v);\n clusterDb.get(parent).externalConnections = true;\n edge.fromCluster = e.v;\n }\n if (w !== e.w) {\n const parent = graph.parent(w);\n clusterDb.get(parent).externalConnections = true;\n edge.toCluster = e.w;\n }\n log.warn('Fix Replacing with XXX', v, w, e.name);\n graph.setEdge(v, w, edge, e.name);\n }\n });\n log.warn('Adjusted Graph', graphlibJson.write(graph));\n extractor(graph, 0);\n\n log.trace(clusterDb);\n\n // Remove references to extracted cluster\n // graph.edges().forEach((edge) => {\n // if (isDescendant(edge.v, clusterId) || isDescendant(edge.w, clusterId)) {\n // graph.removeEdge(edge);\n // }\n // });\n};\n\nexport const extractor = (graph, depth) => {\n log.warn('extractor - ', depth, graphlibJson.write(graph), graph.children('D'));\n if (depth > 10) {\n log.error('Bailing out');\n return;\n }\n let nodes = graph.nodes();\n let hasChildren = false;\n for (const node of nodes) {\n const children = graph.children(node);\n hasChildren = hasChildren || children.length > 0;\n }\n\n if (!hasChildren) {\n log.debug('Done, no node has children', graph.nodes());\n return;\n }\n log.debug('Nodes = ', nodes, depth);\n for (const node of nodes) {\n log.debug(\n 'Extracting node',\n node,\n clusterDb,\n clusterDb.has(node) && !clusterDb.get(node).externalConnections,\n !graph.parent(node),\n graph.node(node),\n graph.children('D'),\n ' Depth ',\n depth\n );\n if (!clusterDb.has(node)) {\n log.debug('Not a cluster', node, depth);\n } else if (\n !clusterDb.get(node).externalConnections &&\n graph.children(node) &&\n graph.children(node).length > 0\n ) {\n log.warn(\n 'Cluster without external connections, without a parent and with children',\n node,\n depth\n );\n\n const graphSettings = graph.graph();\n let dir = graphSettings.rankdir === 'TB' ? 'LR' : 'TB';\n if (clusterDb.get(node)?.clusterData?.dir) {\n dir = clusterDb.get(node).clusterData.dir;\n log.warn('Fixing dir', clusterDb.get(node).clusterData.dir, dir);\n }\n\n const clusterGraph = new graphlib.Graph({\n multigraph: true,\n compound: true,\n })\n .setGraph({\n rankdir: dir,\n nodesep: 50,\n ranksep: 50,\n marginx: 8,\n marginy: 8,\n })\n .setDefaultEdgeLabel(function () {\n return {};\n });\n\n log.warn('Old graph before copy', graphlibJson.write(graph));\n copy(node, graph, clusterGraph, node);\n graph.setNode(node, {\n clusterNode: true,\n id: node,\n clusterData: clusterDb.get(node).clusterData,\n label: clusterDb.get(node).label,\n graph: clusterGraph,\n });\n log.warn('New graph after copy node: (', node, ')', graphlibJson.write(clusterGraph));\n log.debug('Old graph after copy', graphlibJson.write(graph));\n } else {\n log.warn(\n 'Cluster ** ',\n node,\n ' **not meeting the criteria !externalConnections:',\n !clusterDb.get(node).externalConnections,\n ' no parent: ',\n !graph.parent(node),\n ' children ',\n graph.children(node) && graph.children(node).length > 0,\n graph.children('D'),\n depth\n );\n log.debug(clusterDb);\n }\n }\n\n nodes = graph.nodes();\n log.warn('New list of nodes', nodes);\n for (const node of nodes) {\n const data = graph.node(node);\n log.warn(' Now next level', node, data);\n if (data.clusterNode) {\n extractor(data.graph, depth + 1);\n }\n }\n};\n\nconst sorter = (graph, nodes) => {\n if (nodes.length === 0) {\n return [];\n }\n let result = Object.assign([], nodes);\n nodes.forEach((node) => {\n const children = graph.children(node);\n const sorted = sorter(graph, children);\n result = [...result, ...sorted];\n });\n\n return result;\n};\n\nexport const sortNodesByHierarchy = (graph) => sorter(graph, graph.children());\n", "import { layout as dagreLayout } from 'dagre-d3-es/src/dagre/index.js';\nimport * as graphlibJson from 'dagre-d3-es/src/graphlib/json.js';\nimport * as graphlib from 'dagre-d3-es/src/graphlib/index.js';\nimport insertMarkers from '../../rendering-elements/markers.js';\nimport { updateNodeBounds } from '../../rendering-elements/shapes/util.js';\nimport {\n clear as clearGraphlib,\n clusterDb,\n adjustClustersAndEdges,\n findNonClusterChild,\n sortNodesByHierarchy,\n} from './mermaid-graphlib.js';\nimport {\n insertNode,\n positionNode,\n clear as clearNodes,\n setNodeElem,\n} from '../../rendering-elements/nodes.js';\nimport { insertCluster, clear as clearClusters } from '../../rendering-elements/clusters.js';\nimport {\n insertEdgeLabel,\n positionEdgeLabel,\n insertEdge,\n clear as clearEdges,\n} from '../../rendering-elements/edges.js';\nimport { log } from '$root/logger.js';\nimport { getSubGraphTitleMargins } from '../../../utils/subGraphTitleMargins.js';\nimport { getConfig } from '../../../diagram-api/diagramAPI.js';\n\nconst recursiveRender = async (_elem, graph, diagramType, id, parentCluster, siteConfig) => {\n log.info('Graph in recursive render: XXX', graphlibJson.write(graph), parentCluster);\n const dir = graph.graph().rankdir;\n log.trace('Dir in recursive render - dir:', dir);\n\n const elem = _elem.insert('g').attr('class', 'root');\n if (!graph.nodes()) {\n log.info('No nodes found for', graph);\n } else {\n log.info('Recursive render XXX', graph.nodes());\n }\n if (graph.edges().length > 0) {\n log.info('Recursive edges', graph.edge(graph.edges()[0]));\n }\n const clusters = elem.insert('g').attr('class', 'clusters');\n const edgePaths = elem.insert('g').attr('class', 'edgePaths');\n const edgeLabels = elem.insert('g').attr('class', 'edgeLabels');\n const nodes = elem.insert('g').attr('class', 'nodes');\n\n // Insert nodes, this will insert them into the dom and each node will get a size. The size is updated\n // to the abstract node and is later used by dagre for the layout\n await Promise.all(\n graph.nodes().map(async function (v) {\n const node = graph.node(v);\n if (parentCluster !== undefined) {\n const data = JSON.parse(JSON.stringify(parentCluster.clusterData));\n // data.clusterPositioning = true;\n log.trace(\n 'Setting data for parent cluster XXX\\n Node.id = ',\n v,\n '\\n data=',\n data.height,\n '\\nParent cluster',\n parentCluster.height\n );\n graph.setNode(parentCluster.id, data);\n if (!graph.parent(v)) {\n log.trace('Setting parent', v, parentCluster.id);\n graph.setParent(v, parentCluster.id, data);\n }\n }\n log.info('(Insert) Node XXX' + v + ': ' + JSON.stringify(graph.node(v)));\n if (node?.clusterNode) {\n // const children = graph.children(v);\n log.info('Cluster identified XBX', v, node.width, graph.node(v));\n\n // `node.graph.setGraph` applies the graph configurations such as nodeSpacing to subgraphs as without this the default values would be used\n // We override only the `ranksep` and `nodesep` configurations to allow for setting subgraph spacing while avoiding overriding other properties\n const { ranksep, nodesep } = graph.graph();\n node.graph.setGraph({\n ...node.graph.graph(),\n ranksep: ranksep + 25,\n nodesep,\n });\n\n // \"o\" will contain the full cluster not just the children\n const o = await recursiveRender(\n nodes,\n node.graph,\n diagramType,\n id,\n graph.node(v),\n siteConfig\n );\n const newEl = o.elem;\n updateNodeBounds(node, newEl);\n // node.height = o.diff;\n node.diff = o.diff || 0;\n log.info(\n 'New compound node after recursive render XAX',\n v,\n 'width',\n // node,\n node.width,\n 'height',\n node.height\n // node.x,\n // node.y\n );\n setNodeElem(newEl, node);\n } else {\n if (graph.children(v).length > 0) {\n // This is a cluster but not to be rendered recursively\n // Render as before\n log.info(\n 'Cluster - the non recursive path XBX',\n v,\n node.id,\n node,\n node.width,\n 'Graph:',\n graph\n );\n log.info(findNonClusterChild(node.id, graph));\n clusterDb.set(node.id, { id: findNonClusterChild(node.id, graph), node });\n // insertCluster(clusters, graph.node(v));\n } else {\n log.trace('Node - the non recursive path XAX', v, node.id, node);\n await insertNode(nodes, graph.node(v), dir);\n }\n }\n })\n );\n\n const processEdges = async () => {\n const edgePromises = graph.edges().map(async function (e) {\n const edge = graph.edge(e.v, e.w, e.name);\n log.info('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e));\n log.info('Edge ' + e.v + ' -> ' + e.w + ': ', e, ' ', JSON.stringify(graph.edge(e)));\n\n // Check if link is either from or to a cluster\n log.info(\n 'Fix',\n clusterDb,\n 'ids:',\n e.v,\n e.w,\n 'Translating: ',\n clusterDb.get(e.v),\n clusterDb.get(e.w)\n );\n await insertEdgeLabel(edgeLabels, edge);\n });\n\n await Promise.all(edgePromises);\n };\n\n await processEdges();\n\n log.info('Graph before layout:', JSON.stringify(graphlibJson.write(graph)));\n\n log.info('############################################# XXX');\n log.info('### Layout ### XXX');\n log.info('############################################# XXX');\n\n dagreLayout(graph);\n\n log.info('Graph after layout:', JSON.stringify(graphlibJson.write(graph)));\n // Move the nodes to the correct place\n let diff = 0;\n let { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig);\n await Promise.all(\n sortNodesByHierarchy(graph).map(async function (v) {\n const node = graph.node(v);\n log.info(\n 'Position XBX => ' + v + ': (' + node.x,\n ',' + node.y,\n ') width: ',\n node.width,\n ' height: ',\n node.height\n );\n if (node?.clusterNode) {\n // Adjust for padding when on root level\n node.y += subGraphTitleTotalMargin;\n\n log.info(\n 'A tainted cluster node XBX1',\n v,\n node.id,\n node.width,\n node.height,\n node.x,\n node.y,\n graph.parent(v)\n );\n clusterDb.get(node.id).node = node;\n positionNode(node);\n } else {\n // A tainted cluster node\n if (graph.children(v).length > 0) {\n log.info(\n 'A pure cluster node XBX1',\n v,\n node.id,\n node.x,\n node.y,\n node.width,\n node.height,\n graph.parent(v)\n );\n node.height += subGraphTitleTotalMargin;\n graph.node(node.parentId);\n const halfPadding = node?.padding / 2 || 0;\n const labelHeight = node?.labelBBox?.height || 0;\n const offsetY = labelHeight - halfPadding || 0;\n log.debug('OffsetY', offsetY, 'labelHeight', labelHeight, 'halfPadding', halfPadding);\n await insertCluster(clusters, node);\n\n // A cluster in the non-recursive way\n clusterDb.get(node.id).node = node;\n } else {\n // Regular node\n const parent = graph.node(node.parentId);\n node.y += subGraphTitleTotalMargin / 2;\n log.info(\n 'A regular node XBX1 - using the padding',\n node.id,\n 'parent',\n node.parentId,\n node.width,\n node.height,\n node.x,\n node.y,\n 'offsetY',\n node.offsetY,\n 'parent',\n parent,\n parent?.offsetY,\n node\n );\n\n positionNode(node);\n }\n }\n })\n );\n\n // Move the edge labels to the correct place after layout\n graph.edges().forEach(function (e) {\n const edge = graph.edge(e);\n log.info('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(edge), edge);\n\n edge.points.forEach((point) => (point.y += subGraphTitleTotalMargin / 2));\n const startNode = graph.node(e.v);\n var endNode = graph.node(e.w);\n const paths = insertEdge(edgePaths, edge, clusterDb, diagramType, startNode, endNode, id);\n positionEdgeLabel(edge, paths);\n });\n\n graph.nodes().forEach(function (v) {\n const n = graph.node(v);\n log.info(v, n.type, n.diff);\n if (n.isGroup) {\n diff = n.diff;\n }\n });\n log.warn('Returning from recursive render XAX', elem, diff);\n return { elem, diff };\n};\n\nexport const render = async (data4Layout, svg) => {\n const graph = new graphlib.Graph({\n multigraph: true,\n compound: true,\n })\n .setGraph({\n rankdir: data4Layout.direction,\n nodesep:\n data4Layout.config?.nodeSpacing ||\n data4Layout.config?.flowchart?.nodeSpacing ||\n data4Layout.nodeSpacing,\n ranksep:\n data4Layout.config?.rankSpacing ||\n data4Layout.config?.flowchart?.rankSpacing ||\n data4Layout.rankSpacing,\n marginx: 8,\n marginy: 8,\n })\n .setDefaultEdgeLabel(function () {\n return {};\n });\n const element = svg.select('g');\n insertMarkers(element, data4Layout.markers, data4Layout.type, data4Layout.diagramId);\n clearNodes();\n clearEdges();\n clearClusters();\n clearGraphlib();\n\n data4Layout.nodes.forEach((node) => {\n graph.setNode(node.id, { ...node });\n if (node.parentId) {\n graph.setParent(node.id, node.parentId);\n }\n });\n\n log.debug('Edges:', data4Layout.edges);\n data4Layout.edges.forEach((edge) => {\n graph.setEdge(edge.start, edge.end, { ...edge }, edge.id);\n });\n\n log.warn('Graph at first:', JSON.stringify(graphlibJson.write(graph)));\n adjustClustersAndEdges(graph);\n log.warn('Graph after:', JSON.stringify(graphlibJson.write(graph)));\n const siteConfig = getConf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