import{a as G}from"./chunk-QEUXDD35.mjs";import{a as o,g as R,ua as z}from"./chunk-FI53XPFH.mjs";var $=function(){var y=o(function(f,t,e,i){for(e=e||{},i=f.length;i--;e[f[i]]=t);return e},"o"),p=[6,9,10],d={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:o(function(t,e,i,r,s,n,k){var I=n.length-1;switch(s){case 1:return r;case 4:break;case 6:r.setInfo(!0);break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},y(p,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},y(p,[2,3]),y(p,[2,4]),y(p,[2,5]),y(p,[2,6])],defaultActions:{4:[2,1]},parseError:o(function(t,e){if(e.recoverable)this.trace(t);else{var i=new Error(t);throw i.hash=e,i}},"parseError"),parse:o(function(t){var e=this,i=[0],r=[],s=[null],n=[],k=this.table,I="",v=0,j=0,F=0,M=2,L=1,X=n.slice.call(arguments,1),l=Object.create(this.lexer),g={yy:{}};for(var w in this.yy)Object.prototype.hasOwnProperty.call(this.yy,w)&&(g.yy[w]=this.yy[w]);l.setInput(t,g.yy),g.yy.lexer=l,g.yy.parser=this,typeof l.yylloc>"u"&&(l.yylloc={});var A=l.yylloc;n.push(A);var q=l.options&&l.options.ranges;typeof g.yy.parseError=="function"?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function W(a){i.length=i.length-2*a,s.length=s.length-a,n.length=n.length-a}o(W,"popStack");function C(){var a;return a=r.pop()||l.lex()||L,typeof a!="number"&&(a instanceof Array&&(r=a,a=r.pop()),a=e.symbols_[a]||a),a}o(C,"lex");for(var h,O,m,c,Z,D,_={},S,u,N,E;;){if(m=i[i.length-1],this.defaultActions[m]?c=this.defaultActions[m]:((h===null||typeof h>"u")&&(h=C()),c=k[m]&&k[m][h]),typeof c>"u"||!c.length||!c[0]){var P="";E=[];for(S in k[m])this.terminals_[S]&&S>M&&E.push("'"+this.terminals_[S]+"'");l.showPosition?P="Parse error on line "+(v+1)+`: `+l.showPosition()+` Expecting `+E.join(", ")+", got '"+(this.terminals_[h]||h)+"'":P="Parse error on line "+(v+1)+": Unexpected "+(h==L?"end of input":"'"+(this.terminals_[h]||h)+"'"),this.parseError(P,{text:l.match,token:this.terminals_[h]||h,line:l.yylineno,loc:A,expected:E})}if(c[0]instanceof Array&&c.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+h);switch(c[0]){case 1:i.push(h),s.push(l.yytext),n.push(l.yylloc),i.push(c[1]),h=null,O?(h=O,O=null):(j=l.yyleng,I=l.yytext,v=l.yylineno,A=l.yylloc,F>0&&F--);break;case 2:if(u=this.productions_[c[1]][1],_.$=s[s.length-u],_._$={first_line:n[n.length-(u||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(u||1)].first_column,last_column:n[n.length-1].last_column},q&&(_._$.range=[n[n.length-(u||1)].range[0],n[n.length-1].range[1]]),D=this.performAction.apply(_,[I,j,v,g.yy,c[1],s,n].concat(X)),typeof D<"u")return D;u&&(i=i.slice(0,-1*u*2),s=s.slice(0,-1*u),n=n.slice(0,-1*u)),i.push(this.productions_[c[1]][0]),s.push(_.$),n.push(_._$),N=k[i[i.length-2]][i[i.length-1]],i.push(N);break;case 3:return!0}}return!0},"parse")},x=function(){var f={EOF:1,parseError:o(function(e,i){if(this.yy.parser)this.yy.parser.parseError(e,i);else throw new Error(e)},"parseError"),setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===r.length?this.yylloc.first_column:0)+r[r.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+` `+e+"^"},test_match:function(t,e){var i,r,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var n in s)this[n]=s[n];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,i,r;this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),n=0;ne[0].length)){if(e=i,r=n,this.options.backtrack_lexer){if(t=this.test_match(i,s[n]),t!==!1)return t;if(this._backtrack){e=!1;continue}else return!1}else if(!this.options.flex)break}return e?(t=this.test_match(e,s[r]),t!==!1?t:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:o(function(){var e=this.next();return e||this.lex()},"lex"),begin:o(function(e){this.conditionStack.push(e)},"begin"),popState:o(function(){var e=this.conditionStack.length-1;return e>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:o(function(e){this.begin(e)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(e,i,r,s){var n=s;switch(r){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},"anonymous"),rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};return f}();d.lexer=x;function b(){this.yy={}}return o(b,"Parser"),b.prototype=d,d.Parser=b,new b}();$.parser=$;var B=$;var U={info:!1},T=U.info,H=o(y=>{T=y},"setInfo"),J=o(()=>T,"getInfo"),K=o(()=>{T=U.info},"clear"),V={clear:K,setInfo:H,getInfo:J};var Q=o((y,p,d)=>{R.debug(`rendering info diagram `+y);let x=G(p);z(x,100,400,!0),x.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${d}`)},"draw"),Y={draw:Q};var ut={parser:B,db:V,renderer:Y};export{ut as diagram};