import{m as e}from"./chunk-K5T4RW27-BPgPjo39.mjs";import"./chunk-7N4EOEYR-DzEIb3Sc.mjs";import"./chunk-67CJDMHE-C58W8DAL.mjs";import"./chunk-KGLVRYIC-CmkADDeV.mjs";import"./chunk-FOC6F5B3-Cv5O0Fxp.mjs";import"./chunk-AA7GKIK3-DKgpQZxa.mjs";import"./chunk-2KRD3SAO-BXl7sX-7.mjs";import"./chunk-ORNJ4GCN-R_gUIosC.mjs";import"./chunk-LIHQZDEY-Fy8O-IVI.mjs";import"./chunk-CIAEETIT-CH33zQ9L.mjs";var t={},n={info:e(async()=>{let{createInfoServices:e}=await import(`./info-OMHHGYJF-11Qh6VJr.mjs`);t.info=e().Info.parser.LangiumParser},`info`),packet:e(async()=>{let{createPacketServices:e}=await import(`./packet-4T2RLAQJ-jzF54bgp.mjs`);t.packet=e().Packet.parser.LangiumParser},`packet`),pie:e(async()=>{let{createPieServices:e}=await import(`./pie-ZZUOXDRM-x8WFG16Q.mjs`);t.pie=e().Pie.parser.LangiumParser},`pie`),treeView:e(async()=>{let{createTreeViewServices:e}=await import(`./treeView-SZITEDCU-DXyZ3zQc.mjs`);t.treeView=e().TreeView.parser.LangiumParser},`treeView`),architecture:e(async()=>{let{createArchitectureServices:e}=await import(`./architecture-YZFGNWBL-YPACCZ88.mjs`);t.architecture=e().Architecture.parser.LangiumParser},`architecture`),gitGraph:e(async()=>{let{createGitGraphServices:e}=await import(`./gitGraph-7Q5UKJZL-ClGjTWw6.mjs`);t.gitGraph=e().GitGraph.parser.LangiumParser},`gitGraph`),radar:e(async()=>{let{createRadarServices:e}=await import(`./radar-PYXPWWZC-C-wbHKao.mjs`);t.radar=e().Radar.parser.LangiumParser},`radar`),treemap:e(async()=>{let{createTreemapServices:e}=await import(`./treemap-W4RFUUIX-CZRYHpYU.mjs`);t.treemap=e().Treemap.parser.LangiumParser},`treemap`),wardley:e(async()=>{let{createWardleyServices:e}=await import(`./wardley-RL74JXVD-UKzwcBOa.mjs`);t.wardley=e().Wardley.parser.LangiumParser},`wardley`)};async function r(e,r){let a=n[e];if(!a)throw Error(`Unknown diagram type: ${e}`);t[e]||await a();let o=t[e].parse(r);if(o.lexerErrors.length>0||o.parserErrors.length>0)throw new i(o);return o.value}e(r,`parse`);var i=class extends Error{constructor(e){let t=e.lexerErrors.map(e=>`Lexer error on line ${e.line!==void 0&&!isNaN(e.line)?e.line:`?`}, column ${e.column!==void 0&&!isNaN(e.column)?e.column:`?`}: ${e.message}`).join(`
`),n=e.parserErrors.map(e=>`Parse error on line ${e.token.startLine!==void 0&&!isNaN(e.token.startLine)?e.token.startLine:`?`}, column ${e.token.startColumn!==void 0&&!isNaN(e.token.startColumn)?e.token.startColumn:`?`}: ${e.message}`).join(`
`);super(`Parsing failed: ${t} ${n}`),this.result=e}static{e(this,`MermaidParseError`)}};export{r as t};
//# sourceMappingURL=mermaid-parser.core-Cx4njenA.mjs.map