import{f as t}from"./chunk-45I6NZL6.js";import{j as i}from"./chunk-62QEBAUP.js";var o={},m={info:t(()=>i(null,null,function*(){let{createInfoServices:e}=yield import("./chunk-CQGVTP5U.js"),r=e().Info.parser.LangiumParser;o.info=r}),"info"),packet:t(()=>i(null,null,function*(){let{createPacketServices:e}=yield import("./chunk-FDOGZBGG.js"),r=e().Packet.parser.LangiumParser;o.packet=r}),"packet"),pie:t(()=>i(null,null,function*(){let{createPieServices:e}=yield import("./chunk-O3T3UURS.js"),r=e().Pie.parser.LangiumParser;o.pie=r}),"pie"),architecture:t(()=>i(null,null,function*(){let{createArchitectureServices:e}=yield import("./chunk-SGVEOS7W.js"),r=e().Architecture.parser.LangiumParser;o.architecture=r}),"architecture"),gitGraph:t(()=>i(null,null,function*(){let{createGitGraphServices:e}=yield import("./chunk-EK5WMXDM.js"),r=e().GitGraph.parser.LangiumParser;o.gitGraph=r}),"gitGraph"),radar:t(()=>i(null,null,function*(){let{createRadarServices:e}=yield import("./chunk-BSA67Q3M.js"),r=e().Radar.parser.LangiumParser;o.radar=r}),"radar"),treemap:t(()=>i(null,null,function*(){let{createTreemapServices:e}=yield import("./chunk-D2PGUVQB.js"),r=e().Treemap.parser.LangiumParser;o.treemap=r}),"treemap")};function p(e,r){return i(this,null,function*(){let c=m[e];if(!c)throw new Error(`Unknown diagram type: ${e}`);o[e]||(yield c());let s=o[e].parse(r);if(s.lexerErrors.length>0||s.parserErrors.length>0)throw new u(s);return s.value})}t(p,"parse");var u=class extends Error{constructor(e){let r=e.lexerErrors.map(a=>{let s=a.line!==void 0&&!isNaN(a.line)?a.line:"?",n=a.column!==void 0&&!isNaN(a.column)?a.column:"?";return`Lexer error on line ${s}, column ${n}: ${a.message}`}).join(`
`),c=e.parserErrors.map(a=>{let s=a.token.startLine!==void 0&&!isNaN(a.token.startLine)?a.token.startLine:"?",n=a.token.startColumn!==void 0&&!isNaN(a.token.startColumn)?a.token.startColumn:"?";return`Parse error on line ${s}, column ${n}: ${a.message}`}).join(`
`);super(`Parsing failed: ${r} ${c}`),this.result=e}static{t(this,"MermaidParseError")}};export{p as a};
