{ "version": 3, "sources": ["../src/diagrams/flowchart/flowRenderer-v2.js", "../src/diagrams/flowchart/styles.ts"], "sourcesContent": ["import * as graphlib from 'dagre-d3-es/src/graphlib/index.js';\nimport { select, curveLinear, selectAll } from 'd3';\n\nimport flowDb from './flowDb.js';\nimport { getConfig } from '../../config.js';\nimport utils from '../../utils.js';\n\nimport { render } from '../../dagre-wrapper/index.js';\nimport { addHtmlLabel } from 'dagre-d3-es/src/dagre-js/label/add-html-label.js';\nimport { log } from '../../logger.js';\nimport common, { evaluate } from '../common/common.js';\nimport { interpolateToCurve, getStylesFromArray } from '../../utils.js';\nimport { setupGraphViewbox } from '../../setupGraphViewbox.js';\n\nconst conf = {};\nexport const setConf = function (cnf) {\n const keys = Object.keys(cnf);\n for (const key of keys) {\n conf[key] = cnf[key];\n }\n};\n\n/**\n * Function that adds the vertices found during parsing to the graph to be rendered.\n *\n * @param vert Object containing the vertices.\n * @param g The graph that is to be drawn.\n * @param svgId\n * @param root\n * @param doc\n * @param diagObj\n */\nexport const addVertices = function (vert, g, svgId, root, doc, diagObj) {\n const svg = root.select(`[id=\"${svgId}\"]`);\n const keys = Object.keys(vert);\n\n // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition\n keys.forEach(function (id) {\n const vertex = vert[id];\n\n /**\n * Variable for storing the classes for the vertex\n *\n * @type {string}\n */\n let classStr = 'default';\n if (vertex.classes.length > 0) {\n classStr = vertex.classes.join(' ');\n }\n classStr = classStr + ' flowchart-label';\n const styles = getStylesFromArray(vertex.styles);\n\n // Use vertex id as text in the box if no text is provided by the graph definition\n let vertexText = vertex.text !== undefined ? vertex.text : vertex.id;\n\n // We create a SVG label, either by delegating to addHtmlLabel or manually\n let vertexNode;\n log.info('vertex', vertex, vertex.labelType);\n if (vertex.labelType === 'markdown') {\n log.info('vertex', vertex, vertex.labelType);\n } else {\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that?\n const node = {\n label: vertexText.replace(\n /fa[blrs]?:fa-[\\w-]+/g,\n (s) => ``\n ),\n };\n vertexNode = addHtmlLabel(svg, node).node();\n vertexNode.parentNode.removeChild(vertexNode);\n } else {\n const svgLabel = doc.createElementNS('http://www.w3.org/2000/svg', 'text');\n svgLabel.setAttribute('style', styles.labelStyle.replace('color:', 'fill:'));\n\n const rows = vertexText.split(common.lineBreakRegex);\n\n for (const row of rows) {\n const tspan = doc.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n tspan.setAttribute('dy', '1em');\n tspan.setAttribute('x', '1');\n tspan.textContent = row;\n svgLabel.appendChild(tspan);\n }\n vertexNode = svgLabel;\n }\n }\n\n let radious = 0;\n let _shape = '';\n // Set the shape based parameters\n switch (vertex.type) {\n case 'round':\n radious = 5;\n _shape = 'rect';\n break;\n case 'square':\n _shape = 'rect';\n break;\n case 'diamond':\n _shape = 'question';\n break;\n case 'hexagon':\n _shape = 'hexagon';\n break;\n case 'odd':\n _shape = 'rect_left_inv_arrow';\n break;\n case 'lean_right':\n _shape = 'lean_right';\n break;\n case 'lean_left':\n _shape = 'lean_left';\n break;\n case 'trapezoid':\n _shape = 'trapezoid';\n break;\n case 'inv_trapezoid':\n _shape = 'inv_trapezoid';\n break;\n case 'odd_right':\n _shape = 'rect_left_inv_arrow';\n break;\n case 'circle':\n _shape = 'circle';\n break;\n case 'ellipse':\n _shape = 'ellipse';\n break;\n case 'stadium':\n _shape = 'stadium';\n break;\n case 'subroutine':\n _shape = 'subroutine';\n break;\n case 'cylinder':\n _shape = 'cylinder';\n break;\n case 'group':\n _shape = 'rect';\n break;\n case 'doublecircle':\n _shape = 'doublecircle';\n break;\n default:\n _shape = 'rect';\n }\n // Add the node\n g.setNode(vertex.id, {\n labelStyle: styles.labelStyle,\n shape: _shape,\n labelText: vertexText,\n labelType: vertex.labelType,\n rx: radious,\n ry: radious,\n class: classStr,\n style: styles.style,\n id: vertex.id,\n link: vertex.link,\n linkTarget: vertex.linkTarget,\n tooltip: diagObj.db.getTooltip(vertex.id) || '',\n domId: diagObj.db.lookUpDomId(vertex.id),\n haveCallback: vertex.haveCallback,\n width: vertex.type === 'group' ? 500 : undefined,\n dir: vertex.dir,\n type: vertex.type,\n props: vertex.props,\n padding: getConfig().flowchart.padding,\n });\n\n log.info('setNode', {\n labelStyle: styles.labelStyle,\n labelType: vertex.labelType,\n shape: _shape,\n labelText: vertexText,\n rx: radious,\n ry: radious,\n class: classStr,\n style: styles.style,\n id: vertex.id,\n domId: diagObj.db.lookUpDomId(vertex.id),\n width: vertex.type === 'group' ? 500 : undefined,\n type: vertex.type,\n dir: vertex.dir,\n props: vertex.props,\n padding: getConfig().flowchart.padding,\n });\n });\n};\n\n/**\n * Add edges to graph based on parsed graph definition\n *\n * @param {object} edges The edges to add to the graph\n * @param {object} g The graph object\n * @param diagObj\n */\nexport const addEdges = function (edges, g, diagObj) {\n log.info('abc78 edges = ', edges);\n let cnt = 0;\n let linkIdCnt = {};\n\n let defaultStyle;\n let defaultLabelStyle;\n\n if (edges.defaultStyle !== undefined) {\n const defaultStyles = getStylesFromArray(edges.defaultStyle);\n defaultStyle = defaultStyles.style;\n defaultLabelStyle = defaultStyles.labelStyle;\n }\n\n edges.forEach(function (edge) {\n cnt++;\n\n // Identify Link\n const linkIdBase = 'L-' + edge.start + '-' + edge.end;\n // count the links from+to the same node to give unique id\n if (linkIdCnt[linkIdBase] === undefined) {\n linkIdCnt[linkIdBase] = 0;\n log.info('abc78 new entry', linkIdBase, linkIdCnt[linkIdBase]);\n } else {\n linkIdCnt[linkIdBase]++;\n log.info('abc78 new entry', linkIdBase, linkIdCnt[linkIdBase]);\n }\n let linkId = linkIdBase + '-' + linkIdCnt[linkIdBase];\n log.info('abc78 new link id to be used is', linkIdBase, linkId, linkIdCnt[linkIdBase]);\n const linkNameStart = 'LS-' + edge.start;\n const linkNameEnd = 'LE-' + edge.end;\n\n const edgeData = { style: '', labelStyle: '' };\n edgeData.minlen = edge.length || 1;\n //edgeData.id = 'id' + cnt;\n\n // Set link type for rendering\n if (edge.type === 'arrow_open') {\n edgeData.arrowhead = 'none';\n } else {\n edgeData.arrowhead = 'normal';\n }\n\n // Check of arrow types, placed here in order not to break old rendering\n edgeData.arrowTypeStart = 'arrow_open';\n edgeData.arrowTypeEnd = 'arrow_open';\n\n /* eslint-disable no-fallthrough */\n switch (edge.type) {\n case 'double_arrow_cross':\n edgeData.arrowTypeStart = 'arrow_cross';\n case 'arrow_cross':\n edgeData.arrowTypeEnd = 'arrow_cross';\n break;\n case 'double_arrow_point':\n edgeData.arrowTypeStart = 'arrow_point';\n case 'arrow_point':\n edgeData.arrowTypeEnd = 'arrow_point';\n break;\n case 'double_arrow_circle':\n edgeData.arrowTypeStart = 'arrow_circle';\n case 'arrow_circle':\n edgeData.arrowTypeEnd = 'arrow_circle';\n break;\n }\n\n let style = '';\n let labelStyle = '';\n\n switch (edge.stroke) {\n case 'normal':\n style = 'fill:none;';\n if (defaultStyle !== undefined) {\n style = defaultStyle;\n }\n if (defaultLabelStyle !== undefined) {\n labelStyle = defaultLabelStyle;\n }\n edgeData.thickness = 'normal';\n edgeData.pattern = 'solid';\n break;\n case 'dotted':\n edgeData.thickness = 'normal';\n edgeData.pattern = 'dotted';\n edgeData.style = 'fill:none;stroke-width:2px;stroke-dasharray:3;';\n break;\n case 'thick':\n edgeData.thickness = 'thick';\n edgeData.pattern = 'solid';\n edgeData.style = 'stroke-width: 3.5px;fill:none;';\n break;\n case 'invisible':\n edgeData.thickness = 'invisible';\n edgeData.pattern = 'solid';\n edgeData.style = 'stroke-width: 0;fill:none;';\n break;\n }\n if (edge.style !== undefined) {\n const styles = getStylesFromArray(edge.style);\n style = styles.style;\n labelStyle = styles.labelStyle;\n }\n\n edgeData.style = edgeData.style += style;\n edgeData.labelStyle = edgeData.labelStyle += labelStyle;\n\n if (edge.interpolate !== undefined) {\n edgeData.curve = interpolateToCurve(edge.interpolate, curveLinear);\n } else if (edges.defaultInterpolate !== undefined) {\n edgeData.curve = interpolateToCurve(edges.defaultInterpolate, curveLinear);\n } else {\n edgeData.curve = interpolateToCurve(conf.curve, curveLinear);\n }\n\n if (edge.text === undefined) {\n if (edge.style !== undefined) {\n edgeData.arrowheadStyle = 'fill: #333';\n }\n } else {\n edgeData.arrowheadStyle = 'fill: #333';\n edgeData.labelpos = 'c';\n }\n\n edgeData.labelType = edge.labelType;\n edgeData.label = edge.text.replace(common.lineBreakRegex, '\\n');\n\n if (edge.style === undefined) {\n edgeData.style = edgeData.style || 'stroke: #333; stroke-width: 1.5px;fill:none;';\n }\n\n edgeData.labelStyle = edgeData.labelStyle.replace('color:', 'fill:');\n\n edgeData.id = linkId;\n edgeData.classes = 'flowchart-link ' + linkNameStart + ' ' + linkNameEnd;\n\n // Add the edge to the graph\n g.setEdge(edge.start, edge.end, edgeData, cnt);\n });\n};\n\n/**\n * Returns the all the styles from classDef statements in the graph definition.\n *\n * @param text\n * @param diagObj\n * @returns {object} ClassDef styles\n */\nexport const getClasses = function (text, diagObj) {\n log.info('Extracting classes');\n diagObj.db.clear();\n try {\n // Parse the graph definition\n diagObj.parse(text);\n return diagObj.db.getClasses();\n } catch (e) {\n return;\n }\n};\n\n/**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n *\n * @param text\n * @param id\n */\n\nexport const draw = async function (text, id, _version, diagObj) {\n log.info('Drawing flowchart');\n diagObj.db.clear();\n flowDb.setGen('gen-2');\n // Parse the graph definition\n diagObj.parser.parse(text);\n\n // Fetch the default direction, use TD if none was found\n let dir = diagObj.db.getDirection();\n if (dir === undefined) {\n dir = 'TD';\n }\n\n const { securityLevel, flowchart: conf } = getConfig();\n const nodeSpacing = conf.nodeSpacing || 50;\n const rankSpacing = conf.rankSpacing || 50;\n\n // Handle root and document for when rendering in sandbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n const doc = securityLevel === 'sandbox' ? sandboxElement.nodes()[0].contentDocument : document;\n\n // Create the input mermaid.graph\n const g = new graphlib.Graph({\n multigraph: true,\n compound: true,\n })\n .setGraph({\n rankdir: dir,\n nodesep: nodeSpacing,\n ranksep: rankSpacing,\n marginx: 0,\n marginy: 0,\n })\n .setDefaultEdgeLabel(function () {\n return {};\n });\n\n let subG;\n const subGraphs = diagObj.db.getSubGraphs();\n log.info('Subgraphs - ', subGraphs);\n for (let i = subGraphs.length - 1; i >= 0; i--) {\n subG = subGraphs[i];\n log.info('Subgraph - ', subG);\n diagObj.db.addVertex(\n subG.id,\n { text: subG.title, type: subG.labelType },\n 'group',\n undefined,\n subG.classes,\n subG.dir\n );\n }\n\n // Fetch the vertices/nodes and edges/links from the parsed graph definition\n const vert = diagObj.db.getVertices();\n\n const edges = diagObj.db.getEdges();\n\n log.info('Edges', edges);\n let i = 0;\n for (i = subGraphs.length - 1; i >= 0; i--) {\n // for (let i = 0; i < subGraphs.length; i++) {\n subG = subGraphs[i];\n\n selectAll('cluster').append('text');\n\n for (let j = 0; j < subG.nodes.length; j++) {\n log.info('Setting up subgraphs', subG.nodes[j], subG.id);\n g.setParent(subG.nodes[j], subG.id);\n }\n }\n addVertices(vert, g, id, root, doc, diagObj);\n addEdges(edges, g, diagObj);\n\n // Add custom shapes\n // flowChartShapes.addToRenderV2(addShape);\n\n // Set up an SVG group so that we can translate the final graph.\n const svg = root.select(`[id=\"${id}\"]`);\n\n // Run the renderer. This is what draws the final graph.\n const element = root.select('#' + id + ' g');\n await render(element, g, ['point', 'circle', 'cross'], 'flowchart', id);\n\n utils.insertTitle(svg, 'flowchartTitleText', conf.titleTopMargin, diagObj.db.getDiagramTitle());\n\n setupGraphViewbox(g, svg, conf.diagramPadding, conf.useMaxWidth);\n\n // Index nodes\n diagObj.db.indexNodes('subGraph' + i);\n\n // Add label rects for non html labels\n if (!conf.htmlLabels) {\n const labels = doc.querySelectorAll('[id=\"' + id + '\"] .edgeLabel .label');\n for (const label of labels) {\n // Get dimensions of label\n const dim = label.getBBox();\n\n const rect = doc.createElementNS('http://www.w3.org/2000/svg', 'rect');\n rect.setAttribute('rx', 0);\n rect.setAttribute('ry', 0);\n rect.setAttribute('width', dim.width);\n rect.setAttribute('height', dim.height);\n\n label.insertBefore(rect, label.firstChild);\n }\n }\n\n // If node has a link, wrap it in an anchor SVG object.\n const keys = Object.keys(vert);\n keys.forEach(function (key) {\n const vertex = vert[key];\n\n if (vertex.link) {\n const node = select('#' + id + ' [id=\"' + key + '\"]');\n if (node) {\n const link = doc.createElementNS('http://www.w3.org/2000/svg', 'a');\n link.setAttributeNS('http://www.w3.org/2000/svg', 'class', vertex.classes.join(' '));\n link.setAttributeNS('http://www.w3.org/2000/svg', 'href', vertex.link);\n link.setAttributeNS('http://www.w3.org/2000/svg', 'rel', 'noopener');\n if (securityLevel === 'sandbox') {\n link.setAttributeNS('http://www.w3.org/2000/svg', 'target', '_top');\n } else if (vertex.linkTarget) {\n link.setAttributeNS('http://www.w3.org/2000/svg', 'target', vertex.linkTarget);\n }\n\n const linkNode = node.insert(function () {\n return link;\n }, ':first-child');\n\n const shape = node.select('.label-container');\n if (shape) {\n linkNode.append(function () {\n return shape.node();\n });\n }\n\n const label = node.select('.label');\n if (label) {\n linkNode.append(function () {\n return label.node();\n });\n }\n }\n }\n });\n};\n\nexport default {\n setConf,\n addVertices,\n addEdges,\n getClasses,\n draw,\n};\n", "// import khroma from 'khroma';\nimport * as khroma from 'khroma';\n\n/** Returns the styles given options */\nexport interface FlowChartStyleOptions {\n arrowheadColor: string;\n border2: string;\n clusterBkg: string;\n clusterBorder: string;\n edgeLabelBackground: string;\n fontFamily: string;\n lineColor: string;\n mainBkg: string;\n nodeBorder: string;\n nodeTextColor: string;\n tertiaryColor: string;\n textColor: string;\n titleColor: string;\n}\n\nconst fade = (color: string, opacity: number) => {\n // @ts-ignore TODO: incorrect types from khroma\n const channel = khroma.channel;\n\n const r = channel(color, 'r');\n const g = channel(color, 'g');\n const b = channel(color, 'b');\n\n // @ts-ignore incorrect types from khroma\n return khroma.rgba(r, g, b, opacity);\n};\n\nconst getStyles = (options: FlowChartStyleOptions) =>\n `.label {\n font-family: ${options.fontFamily};\n color: ${options.nodeTextColor || options.textColor};\n }\n .cluster-label text {\n fill: ${options.titleColor};\n }\n .cluster-label span,p {\n color: ${options.titleColor};\n }\n\n .label text,span,p {\n fill: ${options.nodeTextColor || options.textColor};\n color: ${options.nodeTextColor || options.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${options.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${options.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${options.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${options.edgeLabelBackground};\n rect {\n opacity: 0.5;\n background-color: ${options.edgeLabelBackground};\n fill: ${options.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${fade(options.edgeLabelBackground, 0.5)};\n // background-color: \n }\n\n .cluster rect {\n fill: ${options.clusterBkg};\n stroke: ${options.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${options.titleColor};\n }\n\n .cluster span,p {\n color: ${options.titleColor};\n }\n /* .cluster div {\n color: ${options.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${options.fontFamily};\n font-size: 12px;\n background: ${options.tertiaryColor};\n border: 1px solid ${options.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${options.textColor};\n }\n`;\n\nexport default getStyles;\n"], "mappings": "uPAAA,UAAYA,MAAc,oCAC1B,OAAS,UAAAC,EAAQ,eAAAC,EAAa,aAAAC,MAAiB,KAO/C,OAAS,gBAAAC,MAAoB,mDAM7B,IAAMC,EAAO,CAAC,EACDC,EAAUC,EAAA,SAAUC,EAAK,CACpC,IAAMC,EAAO,OAAO,KAAKD,CAAG,EAC5B,QAAWE,KAAOD,EAChBJ,EAAKK,CAAG,EAAIF,EAAIE,CAAG,CAEvB,EALuB,WAiBVC,EAAcJ,EAAA,SAAUK,EAAMC,EAAGC,EAAOC,EAAMC,EAAKC,EAAS,CACvE,IAAMC,EAAMH,EAAK,OAAO,QAAQD,CAAK,IAAI,EAC5B,OAAO,KAAKF,CAAI,EAGxB,QAAQ,SAAUO,EAAI,CACzB,IAAMC,EAASR,EAAKO,CAAE,EAOlBE,EAAW,UACXD,EAAO,QAAQ,OAAS,IAC1BC,EAAWD,EAAO,QAAQ,KAAK,GAAG,GAEpCC,EAAWA,EAAW,mBACtB,IAAMC,EAASC,EAAmBH,EAAO,MAAM,EAG3CI,EAAaJ,EAAO,OAAS,OAAYA,EAAO,KAAOA,EAAO,GAG9DK,EAEJ,GADAC,EAAI,KAAK,SAAUN,EAAQA,EAAO,SAAS,EACvCA,EAAO,YAAc,WACvBM,EAAI,KAAK,SAAUN,EAAQA,EAAO,SAAS,UAEvCO,EAASC,EAAU,EAAE,UAAU,UAAU,EAAG,CAE9C,IAAMC,EAAO,CACX,MAAOL,EAAW,QAChB,uBACCM,GAAM,aAAaA,EAAE,QAAQ,IAAK,GAAG,CAAC,QACzC,CACF,EACAL,EAAaM,EAAab,EAAKW,CAAI,EAAE,KAAK,EAC1CJ,EAAW,WAAW,YAAYA,CAAU,CAC9C,KAAO,CACL,IAAMO,EAAWhB,EAAI,gBAAgB,6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,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA,wBAKPA,EAAQ,mBAAmB;AAAA;AAAA;AAAA,0BAGzBA,EAAQ,mBAAmB;AAAA,cACvCA,EAAQ,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAOjBT,EAAKS,EAAQ,oBAAqB,EAAG,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,YAKlDA,EAAQ,UAAU;AAAA,cAChBA,EAAQ,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA,YAKvBA,EAAQ,UAAU;AAAA;AAAA;AAAA;AAAA,aAIjBA,EAAQ,UAAU;AAAA;AAAA;AAAA,aAGlBA,EAAQ,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAQZA,EAAQ,UAAU;AAAA;AAAA,kBAEnBA,EAAQ,aAAa;AAAA,wBACfA,EAAQ,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAS3BA,EAAQ,SAAS;AAAA;AAAA,EA3GX,aA+GXC,GAAQF", "names": ["graphlib", "select", "curveLinear", "selectAll", "addHtmlLabel", "conf", "setConf", "__name", "cnf", "keys", "key", "addVertices", "vert", "g", "svgId", "root", "doc", "diagObj", "svg", "id", "vertex", "classStr", "styles", "getStylesFromArray", "vertexText", "vertexNode", "log", "evaluate", "getConfig", "node", "s", "addHtmlLabel", "svgLabel", "rows", "common_default", "row", "tspan", "radious", "_shape", "addEdges", "edges", "cnt", "linkIdCnt", "defaultStyle", "defaultLabelStyle", "defaultStyles", "edge", "linkIdBase", "linkId", "linkNameStart", "linkNameEnd", "edgeData", "style", "labelStyle", "interpolateToCurve", "curveLinear", "getClasses", "text", "draw", "_version", "flowDb_default", "dir", "securityLevel", "nodeSpacing", "rankSpacing", "sandboxElement", "select", "subG", "subGraphs", "i", "selectAll", "j", "element", "render", "utils_default", "setupGraphViewbox", "labels", "label", "dim", "rect", "link", "linkNode", "shape", "flowRenderer_v2_default", "khroma", "fade", "__name", "color", "opacity", "channel", "r", "g", "b", "getStyles", "options", "styles_default"] }