e1a355ffe6fdb486abcfed6b073d5a253a6f76ee425349814dbdefcc8829d966.json 19 KB

1
  1. {"ast":null,"code":"import _asyncToGenerator from \"F:/workspace/202226701027/huinongbao-app/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nfunction _escapeNodeLabel(nodeLabel) {\n // Escapes the node label for Mermaid syntax.\n return nodeLabel.replace(/[^a-zA-Z-_0-9]/g, \"_\");\n}\nconst MARKDOWN_SPECIAL_CHARS = [\"*\", \"_\", \"`\"];\nfunction _generateMermaidGraphStyles(nodeColors) {\n let styles = \"\";\n for (const [className, color] of Object.entries(nodeColors)) {\n styles += `\\tclassDef ${className} ${color};\\n`;\n }\n return styles;\n}\n/**\n * Draws a Mermaid graph using the provided graph data\n */\nexport function drawMermaid(nodes, edges, config) {\n var _edgeGroups$;\n const {\n firstNode,\n lastNode,\n nodeColors,\n withStyles = true,\n curveStyle = \"linear\",\n wrapLabelNWords = 9\n } = config !== null && config !== void 0 ? config : {};\n // Initialize Mermaid graph configuration\n let mermaidGraph = withStyles ? `%%{init: {'flowchart': {'curve': '${curveStyle}'}}}%%\\ngraph TD;\\n` : \"graph TD;\\n\";\n if (withStyles) {\n // Node formatting templates\n const defaultClassLabel = \"default\";\n const formatDict = {\n [defaultClassLabel]: \"{0}({1})\"\n };\n if (firstNode !== undefined) {\n formatDict[firstNode] = \"{0}([{1}]):::first\";\n }\n if (lastNode !== undefined) {\n formatDict[lastNode] = \"{0}([{1}]):::last\";\n }\n // Add nodes to the graph\n for (const [key, node] of Object.entries(nodes)) {\n var _node$name$split$pop, _node$metadata, _formatDict$key;\n const nodeName = (_node$name$split$pop = node.name.split(\":\").pop()) !== null && _node$name$split$pop !== void 0 ? _node$name$split$pop : \"\";\n const label = MARKDOWN_SPECIAL_CHARS.some(char => nodeName.startsWith(char) && nodeName.endsWith(char)) ? `<p>${nodeName}</p>` : nodeName;\n let finalLabel = label;\n if (Object.keys((_node$metadata = node.metadata) !== null && _node$metadata !== void 0 ? _node$metadata : {}).length) {\n var _node$metadata2;\n finalLabel += `<hr/><small><em>${Object.entries((_node$metadata2 = node.metadata) !== null && _node$metadata2 !== void 0 ? _node$metadata2 : {}).map(([k, v]) => `${k} = ${v}`).join(\"\\n\")}</em></small>`;\n }\n const nodeLabel = ((_formatDict$key = formatDict[key]) !== null && _formatDict$key !== void 0 ? _formatDict$key : formatDict[defaultClassLabel]).replace(\"{0}\", _escapeNodeLabel(key)).replace(\"{1}\", finalLabel);\n mermaidGraph += `\\t${nodeLabel}\\n`;\n }\n }\n // Group edges by their common prefixes\n const edgeGroups = {};\n for (const edge of edges) {\n const srcParts = edge.source.split(\":\");\n const tgtParts = edge.target.split(\":\");\n const commonPrefix = srcParts.filter((src, i) => src === tgtParts[i]).join(\":\");\n if (!edgeGroups[commonPrefix]) {\n edgeGroups[commonPrefix] = [];\n }\n edgeGroups[commonPrefix].push(edge);\n }\n const seenSubgraphs = new Set();\n function addSubgraph(edges, prefix) {\n const selfLoop = edges.length === 1 && edges[0].source === edges[0].target;\n if (prefix && !selfLoop) {\n const subgraph = prefix.split(\":\").pop();\n if (seenSubgraphs.has(subgraph)) {\n throw new Error(`Found duplicate subgraph '${subgraph}' -- this likely means that ` + \"you're reusing a subgraph node with the same name. \" + \"Please adjust your graph to have subgraph nodes with unique names.\");\n }\n seenSubgraphs.add(subgraph);\n mermaidGraph += `\\tsubgraph ${subgraph}\\n`;\n }\n for (const edge of edges) {\n const {\n source,\n target,\n data,\n conditional\n } = edge;\n let edgeLabel = \"\";\n if (data !== undefined) {\n let edgeData = data;\n const words = edgeData.split(\" \");\n if (words.length > wrapLabelNWords) {\n edgeData = Array.from({\n length: Math.ceil(words.length / wrapLabelNWords)\n }, (_, i) => words.slice(i * wrapLabelNWords, (i + 1) * wrapLabelNWords).join(\" \")).join(\"&nbsp;<br>&nbsp;\");\n }\n edgeLabel = conditional ? ` -. &nbsp;${edgeData}&nbsp; .-> ` : ` -- &nbsp;${edgeData}&nbsp; --> `;\n } else {\n edgeLabel = conditional ? \" -.-> \" : \" --> \";\n }\n mermaidGraph += `\\t${_escapeNodeLabel(source)}${edgeLabel}${_escapeNodeLabel(target)};\\n`;\n }\n // Recursively add nested subgraphs\n for (const nestedPrefix in edgeGroups) {\n if (nestedPrefix.startsWith(`${prefix}:`) && nestedPrefix !== prefix) {\n addSubgraph(edgeGroups[nestedPrefix], nestedPrefix);\n }\n }\n if (prefix && !selfLoop) {\n mermaidGraph += \"\\tend\\n\";\n }\n }\n // Start with the top-level edges (no common prefix)\n addSubgraph((_edgeGroups$ = edgeGroups[\"\"]) !== null && _edgeGroups$ !== void 0 ? _edgeGroups$ : [], \"\");\n // Add remaining subgraphs\n for (const prefix in edgeGroups) {\n if (!prefix.includes(\":\") && prefix !== \"\") {\n addSubgraph(edgeGroups[prefix], prefix);\n }\n }\n // Add custom styles for nodes\n if (withStyles) {\n mermaidGraph += _generateMermaidGraphStyles(nodeColors !== null && nodeColors !== void 0 ? nodeColors : {});\n }\n return mermaidGraph;\n}\n/**\n * Renders Mermaid graph using the Mermaid.INK API.\n */\nexport function drawMermaidPng(_x, _x2) {\n return _drawMermaidPng.apply(this, arguments);\n}\nfunction _drawMermaidPng() {\n _drawMermaidPng = _asyncToGenerator(function* (mermaidSyntax, config) {\n let {\n backgroundColor = \"white\"\n } = config !== null && config !== void 0 ? config : {};\n // Use btoa for compatibility, assume ASCII\n const mermaidSyntaxEncoded = btoa(mermaidSyntax);\n // Check if the background color is a hexadecimal color code using regex\n if (backgroundColor !== undefined) {\n const hexColorPattern = /^#(?:[0-9a-fA-F]{3}){1,2}$/;\n if (!hexColorPattern.test(backgroundColor)) {\n backgroundColor = `!${backgroundColor}`;\n }\n }\n const imageUrl = `https://mermaid.ink/img/${mermaidSyntaxEncoded}?bgColor=${backgroundColor}`;\n const res = yield fetch(imageUrl);\n if (!res.ok) {\n throw new Error([`Failed to render the graph using the Mermaid.INK API.`, `Status code: ${res.status}`, `Status text: ${res.statusText}`].join(\"\\n\"));\n }\n const content = yield res.blob();\n return content;\n });\n return _drawMermaidPng.apply(this, arguments);\n}","map":{"version":3,"names":["_escapeNodeLabel","nodeLabel","replace","MARKDOWN_SPECIAL_CHARS","_generateMermaidGraphStyles","nodeColors","styles","className","color","Object","entries","drawMermaid","nodes","edges","config","_edgeGroups$","firstNode","lastNode","withStyles","curveStyle","wrapLabelNWords","mermaidGraph","defaultClassLabel","formatDict","undefined","key","node","_node$name$split$pop","_node$metadata","_formatDict$key","nodeName","name","split","pop","label","some","char","startsWith","endsWith","finalLabel","keys","metadata","length","_node$metadata2","map","k","v","join","edgeGroups","edge","srcParts","source","tgtParts","target","commonPrefix","filter","src","i","push","seenSubgraphs","Set","addSubgraph","prefix","selfLoop","subgraph","has","Error","add","data","conditional","edgeLabel","edgeData","words","Array","from","Math","ceil","_","slice","nestedPrefix","includes","drawMermaidPng","_x","_x2","_drawMermaidPng","apply","arguments","_asyncToGenerator","mermaidSyntax","backgroundColor","mermaidSyntaxEncoded","btoa","hexColorPattern","test","imageUrl","res","fetch","ok","status","statusText","content","blob"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@langchain/core/dist/runnables/graph_mermaid.js"],"sourcesContent":["function _escapeNodeLabel(nodeLabel) {\n // Escapes the node label for Mermaid syntax.\n return nodeLabel.replace(/[^a-zA-Z-_0-9]/g, \"_\");\n}\nconst MARKDOWN_SPECIAL_CHARS = [\"*\", \"_\", \"`\"];\nfunction _generateMermaidGraphStyles(nodeColors) {\n let styles = \"\";\n for (const [className, color] of Object.entries(nodeColors)) {\n styles += `\\tclassDef ${className} ${color};\\n`;\n }\n return styles;\n}\n/**\n * Draws a Mermaid graph using the provided graph data\n */\nexport function drawMermaid(nodes, edges, config) {\n const { firstNode, lastNode, nodeColors, withStyles = true, curveStyle = \"linear\", wrapLabelNWords = 9, } = config ?? {};\n // Initialize Mermaid graph configuration\n let mermaidGraph = withStyles\n ? `%%{init: {'flowchart': {'curve': '${curveStyle}'}}}%%\\ngraph TD;\\n`\n : \"graph TD;\\n\";\n if (withStyles) {\n // Node formatting templates\n const defaultClassLabel = \"default\";\n const formatDict = {\n [defaultClassLabel]: \"{0}({1})\",\n };\n if (firstNode !== undefined) {\n formatDict[firstNode] = \"{0}([{1}]):::first\";\n }\n if (lastNode !== undefined) {\n formatDict[lastNode] = \"{0}([{1}]):::last\";\n }\n // Add nodes to the graph\n for (const [key, node] of Object.entries(nodes)) {\n const nodeName = node.name.split(\":\").pop() ?? \"\";\n const label = MARKDOWN_SPECIAL_CHARS.some((char) => nodeName.startsWith(char) && nodeName.endsWith(char))\n ? `<p>${nodeName}</p>`\n : nodeName;\n let finalLabel = label;\n if (Object.keys(node.metadata ?? {}).length) {\n finalLabel += `<hr/><small><em>${Object.entries(node.metadata ?? {})\n .map(([k, v]) => `${k} = ${v}`)\n .join(\"\\n\")}</em></small>`;\n }\n const nodeLabel = (formatDict[key] ?? formatDict[defaultClassLabel])\n .replace(\"{0}\", _escapeNodeLabel(key))\n .replace(\"{1}\", finalLabel);\n mermaidGraph += `\\t${nodeLabel}\\n`;\n }\n }\n // Group edges by their common prefixes\n const edgeGroups = {};\n for (const edge of edges) {\n const srcParts = edge.source.split(\":\");\n const tgtParts = edge.target.split(\":\");\n const commonPrefix = srcParts\n .filter((src, i) => src === tgtParts[i])\n .join(\":\");\n if (!edgeGroups[commonPrefix]) {\n edgeGroups[commonPrefix] = [];\n }\n edgeGroups[commonPrefix].push(edge);\n }\n const seenSubgraphs = new Set();\n function addSubgraph(edges, prefix) {\n const selfLoop = edges.length === 1 && edges[0].source === edges[0].target;\n if (prefix && !selfLoop) {\n const subgraph = prefix.split(\":\").pop();\n if (seenSubgraphs.has(subgraph)) {\n throw new Error(`Found duplicate subgraph '${subgraph}' -- this likely means that ` +\n \"you're reusing a subgraph node with the same name. \" +\n \"Please adjust your graph to have subgraph nodes with unique names.\");\n }\n seenSubgraphs.add(subgraph);\n mermaidGraph += `\\tsubgraph ${subgraph}\\n`;\n }\n for (const edge of edges) {\n const { source, target, data, conditional } = edge;\n let edgeLabel = \"\";\n if (data !== undefined) {\n let edgeData = data;\n const words = edgeData.split(\" \");\n if (words.length > wrapLabelNWords) {\n edgeData = Array.from({ length: Math.ceil(words.length / wrapLabelNWords) }, (_, i) => words\n .slice(i * wrapLabelNWords, (i + 1) * wrapLabelNWords)\n .join(\" \")).join(\"&nbsp;<br>&nbsp;\");\n }\n edgeLabel = conditional\n ? ` -. &nbsp;${edgeData}&nbsp; .-> `\n : ` -- &nbsp;${edgeData}&nbsp; --> `;\n }\n else {\n edgeLabel = conditional ? \" -.-> \" : \" --> \";\n }\n mermaidGraph += `\\t${_escapeNodeLabel(source)}${edgeLabel}${_escapeNodeLabel(target)};\\n`;\n }\n // Recursively add nested subgraphs\n for (const nestedPrefix in edgeGroups) {\n if (nestedPrefix.startsWith(`${prefix}:`) && nestedPrefix !== prefix) {\n addSubgraph(edgeGroups[nestedPrefix], nestedPrefix);\n }\n }\n if (prefix && !selfLoop) {\n mermaidGraph += \"\\tend\\n\";\n }\n }\n // Start with the top-level edges (no common prefix)\n addSubgraph(edgeGroups[\"\"] ?? [], \"\");\n // Add remaining subgraphs\n for (const prefix in edgeGroups) {\n if (!prefix.includes(\":\") && prefix !== \"\") {\n addSubgraph(edgeGroups[prefix], prefix);\n }\n }\n // Add custom styles for nodes\n if (withStyles) {\n mermaidGraph += _generateMermaidGraphStyles(nodeColors ?? {});\n }\n return mermaidGraph;\n}\n/**\n * Renders Mermaid graph using the Mermaid.INK API.\n */\nexport async function drawMermaidPng(mermaidSyntax, config) {\n let { backgroundColor = \"white\" } = config ?? {};\n // Use btoa for compatibility, assume ASCII\n const mermaidSyntaxEncoded = btoa(mermaidSyntax);\n // Check if the background color is a hexadecimal color code using regex\n if (backgroundColor !== undefined) {\n const hexColorPattern = /^#(?:[0-9a-fA-F]{3}){1,2}$/;\n if (!hexColorPattern.test(backgroundColor)) {\n backgroundColor = `!${backgroundColor}`;\n }\n }\n const imageUrl = `https://mermaid.ink/img/${mermaidSyntaxEncoded}?bgColor=${backgroundColor}`;\n const res = await fetch(imageUrl);\n if (!res.ok) {\n throw new Error([\n `Failed to render the graph using the Mermaid.INK API.`,\n `Status code: ${res.status}`,\n `Status text: ${res.statusText}`,\n ].join(\"\\n\"));\n }\n const content = await res.blob();\n return content;\n}\n"],"mappings":";AAAA,SAASA,gBAAgBA,CAACC,SAAS,EAAE;EACjC;EACA,OAAOA,SAAS,CAACC,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC;AACpD;AACA,MAAMC,sBAAsB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;AAC9C,SAASC,2BAA2BA,CAACC,UAAU,EAAE;EAC7C,IAAIC,MAAM,GAAG,EAAE;EACf,KAAK,MAAM,CAACC,SAAS,EAAEC,KAAK,CAAC,IAAIC,MAAM,CAACC,OAAO,CAACL,UAAU,CAAC,EAAE;IACzDC,MAAM,IAAI,cAAcC,SAAS,IAAIC,KAAK,KAAK;EACnD;EACA,OAAOF,MAAM;AACjB;AACA;AACA;AACA;AACA,OAAO,SAASK,WAAWA,CAACC,KAAK,EAAEC,KAAK,EAAEC,MAAM,EAAE;EAAA,IAAAC,YAAA;EAC9C,MAAM;IAAEC,SAAS;IAAEC,QAAQ;IAAEZ,UAAU;IAAEa,UAAU,GAAG,IAAI;IAAEC,UAAU,GAAG,QAAQ;IAAEC,eAAe,GAAG;EAAG,CAAC,GAAGN,MAAM,aAANA,MAAM,cAANA,MAAM,GAAI,CAAC,CAAC;EACxH;EACA,IAAIO,YAAY,GAAGH,UAAU,GACvB,qCAAqCC,UAAU,qBAAqB,GACpE,aAAa;EACnB,IAAID,UAAU,EAAE;IACZ;IACA,MAAMI,iBAAiB,GAAG,SAAS;IACnC,MAAMC,UAAU,GAAG;MACf,CAACD,iBAAiB,GAAG;IACzB,CAAC;IACD,IAAIN,SAAS,KAAKQ,SAAS,EAAE;MACzBD,UAAU,CAACP,SAAS,CAAC,GAAG,oBAAoB;IAChD;IACA,IAAIC,QAAQ,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