package.dist.chunks.mermaid.esm.min.chunk-XIWCMPW2.mjs 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.
import{f as t}from"./chunk-MHJHRR6Z.mjs";import{a as o}from"./chunk-GTKDMUJJ.mjs";var a={},n={info:t(async()=>{let{createInfoServices:e}=await import("./info-46DW6VJ7-2OFFXANV.mjs"),r=e().Info.parser.LangiumParser;a.info=r},"info"),packet:t(async()=>{let{createPacketServices:e}=await import("./packet-W2GHVCYJ-YAX3ZPUQ.mjs"),r=e().Packet.parser.LangiumParser;a.packet=r},"packet"),pie:t(async()=>{let{createPieServices:e}=await import("./pie-BEWT4RHE-KQMA6ZQR.mjs"),r=e().Pie.parser.LangiumParser;a.pie=r},"pie"),architecture:t(async()=>{let{createArchitectureServices:e}=await import("./architecture-I3QFYML2-KW2RUYQB.mjs"),r=e().Architecture.parser.LangiumParser;a.architecture=r},"architecture"),gitGraph:t(async()=>{let{createGitGraphServices:e}=await import("./gitGraph-YCYPL57B-QPBUOVDP.mjs"),r=e().GitGraph.parser.LangiumParser;a.gitGraph=r},"gitGraph")};async function p(e,r){let i=n[e];if(!i)throw new Error(`Unknown diagram type: ${e}`);a[e]||await i();let s=a[e].parse(r);if(s.lexerErrors.length>0||s.parserErrors.length>0)throw new m(s);return s.value}o(p,"parse");t(p,"parse");var m=class extends Error{static{o(this,"MermaidParseError")}constructor(e){let r=e.lexerErrors.map(c=>c.message).join(`
`),i=e.parserErrors.map(c=>c.message).join(`
`);super(`Parsing failed: ${r} ${i}`),this.result=e}static{t(this,"MermaidParseError")}};export{p as a};