You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2144 lines
2.3 MiB
JavaScript

"use strict";var __esbuild_esm_mermaid=(()=>{var a,o,R,k,T,_,C,S,A,N,I,M,F,$,z=Object.create,G=Object.defineProperty,U=Object.getOwnPropertyDescriptor,W=Object.getOwnPropertyNames,V=Object.getPrototypeOf,Q=Object.prototype.hasOwnProperty,Ae=(t,e)=>G(t,"name",{value:e,configurable:!0}),t=(t,e)=>()=>e=t?t(t=0):e,J=(t,e)=>{for(var r in e)G(t,r,{get:e[r],enumerable:!0})},tt=(e,r,n,i)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let t of W(r))Q.call(e,t)||t===n||G(e,t,{get:()=>r[t],enumerable:!(i=U(r,t))||i.enumerable});return e},et=(t,e,r)=>(tt(t,e,"default"),r&&tt(r,e,"default")),rt=(t,e,r)=>(r=null!=t?z(V(t)):{},tt(!e&&t&&t.__esModule?r:G(r,"default",{value:t,enumerable:!0}),t)),nt=(jMt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports))((t,e)=>{function r(){var i="millisecond",u="second",d="minute",p="hour",g="day",f="week",m="month",y="year",v="date",e="Invalid Date",o=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,t={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:Ae(function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"},"ordinal")},n=Ae(function(t,e,r){var n=String(t);return!n||n.length>=e?t:""+Array(e+1-n.length).join(r)+t},"m"),r={s:n,z:Ae(function(t){var t=-t.utcOffset(),e=Math.abs(t),r=Math.floor(e/60),e=e%60;return(t<=0?"+":"-")+n(r,2,"0")+":"+n(e,2,"0")},"z"),m:Ae(function t(e,r){var n,i,a;return e.date()<r.date()?-t(r,e):(n=12*(r.year()-e.year())+(r.month()-e.month()),a=r-(i=e.clone().add(n,m))<0,e=e.clone().add(n+(a?-1:1),m),+(-(n+(r-i)/(a?i-e:e-i))||0))},"t"),a:Ae(function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},"a"),p:Ae(function(t){return{M:m,y:y,w:f,d:g,D:v,h:p,m:d,s:u,ms:i,Q:"quarter"}[t]||String(t||"").toLowerCase().replace(/s$/,"")},"p"),u:Ae(function(t){return void 0===t},"u")},s="en",l={},a=(l[s]=t,"$isDayjsObject"),c=Ae(function(t){return t instanceof k||!(!t||!t[a])},"S"),h=Ae(function t(e,r,n){var i;if(!e)return s;if("string"==typeof e){var a=e.toLowerCase(),r=(l[a]&&(i=a),r&&(l[a]=r,i=a),e.split("-"));if(!i&&1<r.length)return t(r[0])}else a=e.name,l[a]=e,i=a;return!n&&i&&(s=i),i||!n&&s},"t"),b=Ae(function(t,e){return c(t)?t.clone():((e="object"==typeof e?e:{}).date=t,e.args=arguments,new k(e))},"O"),w=r,k=(w.l=h,w.i=c,w.w=function(t,e){return b(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})},Ae(E,"M"),(t=E.prototype).parse=function(a){this.$d=function(){var t=a.date,e=a.utc;if(null===t)return new Date(NaN);if(w.u(t))return new Date;if(!(t instanceof Date||"string"!=typeof t||/Z$/i.test(t))){var r,n,i=t.match(o);if(i)return r=i[2]-1||0,n=(i[7]||"0").substring(0,3),e?new Date(Date.UTC(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)):new Date(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)}return new Date(t)}(),this.init()},t.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},t.$utils=function(){return w},t.isValid=function(){return this.$d.toString()!==e},t.isSame=function(t,e){return t=b(t),this.startOf(e)<=t&&t<=this.endOf(e)},t.isAfter=function(t,e){return b(t)<this.startOf(e)},t.isBefore=function(t,e){return this.endOf(e)<b(t)},t.$g=function(t,e,r){return w.u(t)?this[e]:this.set(r,t)},t.unix=function(){return Math.floor(this.valueOf()/1e3)},t.valueOf=function(){return this.$d.getTime()},t.startOf=function(t,e){var r=this,n=!!w.u(e)||e,e=w.p(t),i=Ae(function(t,e){return e=w.w(r.$u?Date.UTC(r.$y,e,t):new Date(r.$y,e,t),r),n?e:e.endOf(g)},"l"),a=Ae(function(t,e){return w.w(r.toDate()[t].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(e)),r)},"$"),o=this.$W,s=this.$M,l=this.$D,c="set"+(this.$u?"UTC":"");switch(e){case y:return n?i(1,0):i(31,11);case m:return n?i(1,s):i(0,s+1);case f:var h=(o<(h=this.$local
[ ]{`+Math.min.apply(Math,t)+"}","g"),i=i.map(function(t){return t.replace(n,`
`)})),i[0]=i[0].replace(/^\r?\n/,""),i[0]);return e.forEach(function(t,e){var r=(n=a.match(/(?:^|\n)( *)$/))?n[1]:"",n=t;"string"==typeof t&&t.includes(`
`)&&(n=String(t).split(`
`).map(function(t,e){return 0===e?t:""+r+t}).join(`
`)),a+=n+i[e+1]}),a}var Wt,Vt,Xt,Kt,Zt,Qt,Jt,te,ee,re,ne,ie,ae,oe,se,le,ce,he,ue,de,pe,ge,fe,ye,ve,xe,be,we,ke,Te,Ee,_e,Ce,Se,Le,Ne,Ie,Me,Re,De,Oe,Pe,Be,Fe,$e,ze,Ge,Ue,qe,Ye,je,He,We,Ve,Xe,Ke,Ze,r,Qe,Je,tr,n,er,rr,nr,ir,ar,or,sr,lr,cr,hr,ur,dr,pr,gr,fr,mr,yr,vr,xr,br,wr,kr,Tr,Er,_r,Cr,Sr,Ar,Lr,Nr,Ir,Mr,Rr,Dr,Or,Pr,Br,Fr,$r,zr,Gr=t(()=>{Ae(Ht,"dedent")}),Ur=t(()=>{Wt=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Vt=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Xt=/\s*%%.*\n/gm}),qr=t(()=>{Kt=class extends Error{static{Ae(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}}}),Yr=t(()=>{e(),Ur(),qr(),Zt={},Qt=Ae(function(t,e){t=t.replace(Wt,"").replace(Vt,"").replace(Xt,`
`);for(var[r,{detector:n}]of Object.entries(Zt))if(n(t,e))return r;throw new Kt("No diagram type detected matching given configuration for text: "+t)},"detectType"),Jt=Ae((...t)=>{for(var{id:e,detector:r,loader:n}of t)te(e,r,n)},"registerLazyLoadedDiagrams"),te=Ae((t,e,r)=>{Zt[t]&&R.warn(`Detector with key ${t} already exists. Overwriting.`),Zt[t]={detector:e,loader:r},R.debug(`Detector with key ${t} added`+(r?" with loader":""))},"addDetector"),ee=Ae(t=>Zt[t].loader,"getDiagramLoader")}),jr=t(()=>{function B(){this.yy={}}var t=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,24],r=[1,25],F=[1,26],$=[1,27],z=[1,28],n=[1,63],i=[1,64],a=[1,65],o=[1,66],s=[1,67],l=[1,68],h=[1,69],u=[1,29],d=[1,30],p=[1,31],g=[1,32],f=[1,33],m=[1,34],y=[1,35],v=[1,36],x=[1,37],b=[1,38],w=[1,39],k=[1,40],T=[1,41],E=[1,42],_=[1,43],C=[1,44],S=[1,45],A=[1,46],L=[1,47],N=[1,48],I=[1,50],G=[1,51],U=[1,52],q=[1,53],Y=[1,54],j=[1,55],H=[1,56],W=[1,57],V=[1,58],X=[1,59],K=[1,60],Z=[14,42],Q=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],J=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],M=[1,82],R=[1,83],D=[1,84],O=[1,85],P=[12,14,42],tt=[12,14,33,42],et=[12,14,33,42,76,77,79,80],rt=[12,33],nt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],e={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),o.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],C.$=a[a.length-E],C._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(C._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),typeof(_=this.performAction.apply(C,[l,h,c,f.yy,k[1],a,o].concat(p)))<"u")return _;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(C.$),o.push(C._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},r={EOF:1,parseError:Ae(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:Ae(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},"setInput"),input:Ae(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:Ae(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),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:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:Ae(function(){return this._more=!0,this},"more"),reject:Ae(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:Ae(function(t){this.unput(this.match.slice(t))},"less"),pastInput:Ae(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:Ae(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:Ae(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+e+"^"},"showPosition"),test_match:Ae(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={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)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:Ae(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:Ae(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:Ae(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:Ae(function(t){this.begin(t)},"pushState"),stateStackSize:Ae(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:Ae(function(t,e,r,n){switch(r){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:case 53:return this.begin("rel_u"),66;case 54:case 55:return this.begin("rel_d"),67;case 56:case 57:return this.begin("rel_l"),68;case 58:case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\
`+l),v&&Xt([Z,Q,J],t=>{l=ee(l,t," ")}),p&&k?p.createHTML(l):l},u.setConfig=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};Nt(t),gt=!0},u.clearConfig=function(){I=null,gt=!1},u.isValidAttribute=function(t,e,r){return I||Nt({}),t=N(t),e=N(e),Ut(t,e,r)},u.addHook=function(t,e){"function"==typeof e&&(a[t]=a[t]||[],Zt(a[t],e))},u.removeHook=function(t){if(a[t])return Kt(a[t])},u.removeHooks=function(t){a[t]&&(a[t]=[])},u.removeAllHooks=function(){a={}},u}return Ae(be,"createDOMPurify"),be()}"object"==typeof t&&typeof e<"u"?e.exports=r():"function"==typeof define&&define.amd?define(r):(t=typeof globalThis<"u"?globalThis:t||self).DOMPurify=r()}),Dn={};function On(t){return String(t).replace(gi,t=>pi[t])}function Pn(t){if(t.default)return t.default;if(t=t.type,"string"!=typeof(t=Array.isArray(t)?t[0]:t))return t.enum[0];switch(t){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}function Bn(t){for(var e=0;e<Ai.length;e++)for(var r=Ai[e],n=0;n<r.blocks.length;n++){var i=r.blocks[n];if(t>=i[0]&&t<=i[1])return r.name}return null}function Fn(t){for(var e=0;e<Li.length;e+=2)if(Li[e]<=t&&t<=Li[e+1])return!0;return!1}function $n(t,e){Ui[t]=e}function zn(t,e,r){if(!Ui[e])throw new Error("Font metrics not found for font: "+e+".");var n=t.charCodeAt(0),i=Ui[e][n];if(!i&&t[0]in Yi&&(n=Yi[t[0]].charCodeAt(0),i=Ui[e][n]),i=!i&&"text"===r&&Fn(n)?Ui[e][77]:i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}function Gn(t){var e=5<=t?0:3<=t?1:2;if(!ji[e]){var r,n=ji[e]={cssEmPerMu:qi.quad[e]/18};for(r in qi)qi.hasOwnProperty(r)&&(n[r]=qi[r][e])}return ji[e]}function Un(t){if(t instanceof la)return t;throw new Error("Expected symbolNode but got "+String(t)+".")}function qn(t){if(t instanceof ia)return t;throw new Error("Expected span<HtmlDomNode> but got "+String(t)+".")}function s(t,e,r,n,i,a){ga[t][i]={font:e,group:r,replace:n},a&&n&&(ga[t][n]=ga[t][i])}function l(t){for(var{type:t,names:e,props:r,handler:n,htmlBuilder:i,mathmlBuilder:a}=t,o={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:void 0===r.allowedInMath||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:n},s=0;s<e.length;++s)Za[e[s]]=o;t&&(i&&(Qa[t]=i),a)&&(Ja[t]=a)}function Yn(t){var{type:t,htmlBuilder:e,mathmlBuilder:r}=t;l({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:e,mathmlBuilder:r})}function jn(t,e){return t=ro(["base"],t,e),(e=ro(["strut"])).style.height=K(t.height+t.depth),t.depth&&(e.style.verticalAlign=K(-t.depth)),t.children.unshift(e),t}function Hn(t,e){var r,n=null,i=(1===t.length&&"tag"===t[0].type&&(n=t[0].tag,t=t[0].body),so(t,e,"root"));2===i.length&&i[1].hasClass("tag")&&(r=i.pop());for(var a,o=[],s=[],l=0;l<i.length;l++)if(s.push(i[l]),i[l].hasClass("mbin")||i[l].hasClass("mrel")||i[l].hasClass("allowbreak")){for(var c=!1;l<i.length-1&&i[l+1].hasClass("mspace")&&!i[l+1].hasClass("newline");)l++,s.push(i[l]),i[l].hasClass("nobreak")&&(c=!0);c||(o.push(jn(s,e)),s=[])}else i[l].hasClass("newline")&&(s.pop(),0<s.length&&(o.push(jn(s,e)),s=[]),o.push(i[l]));return 0<s.length&&o.push(jn(s,e)),n?((a=jn(so(n,e,!0))).classes=["tag"],o.push(a)):r&&o.push(r),(t=ro(["katex-html"],o)).setAttribute("aria-hidden","true"),a&&((n=a.children[0]).style.height=K(t.height+t.depth),t.depth)&&(n.style.verticalAlign=K(-t.depth)),t}function Wn(t){return new Gi(t)}function Vn(t,e,r,n,i){return r=1===(t=bo(t,r)).length&&t[0]instanceof fo&&yi.contains(["mrow","mtable"],t[0].type)?t[0]:new E.MathNode("mrow",t),(t=new E.MathNode("annotation",[new E.TextNode(e)])).setAttribute("encoding","application/x-tex"),e=new E.MathNode("semantics",[r,t]),(r=new E.MathNode("math",[e])).setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&r.setAttribute("display","block"),Z.makeSpan([i?"katex":"katex-mathml"],[r])}function Xn(t,e){if(t&&t.type===e)return t;throw new Error("Expected node of type "+e+", but got "+(t?"node of type "
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
c69,-144,104.5,-217.7,106.5,-221
l`+t/2.075+" -"+t+`
c5.3,-9.3,12,-14,20,-14
H400000v`+(40+t)+`H845.2724
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
M`+(834+t)+" "+e+"h400000v"+(40+t)+"h-400000z"},"sqrtMain"),Ii=Ae(function(t,e){return"M263,"+(601+t+e)+`c0.7,0,18,39.7,52,119
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
c340,-704.7,510.7,-1060.3,512,-1067
l`+t/2.084+" -"+t+`
c4.7,-7.3,11,-11,19,-11
H40000v`+(40+t)+`H1012.3
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
M`+(1001+t)+" "+e+"h400000v"+(40+t)+"h-400000z"},"sqrtSize1"),Mi=Ae(function(t,e){return"M983 "+(10+t+e)+`
l`+t/3.13+" -"+t+`
c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+`
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
M`+(1001+t)+" "+e+"h400000v"+(40+t)+"h-400000z"},"sqrtSize2"),Ri=Ae(function(t,e){return"M424,"+(2398+t+e)+`
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
l`+t/4.223+" -"+t+`c4,-6.7,10,-10,18,-10 H400000
v`+(40+t)+`H1014.6
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+e+`
h400000v`+(40+t)+"h-400000z"},"sqrtSize3"),Di=Ae(function(t,e){return"M473,"+(2713+t+e)+`
c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+`
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
606zM`+(1001+t)+" "+e+"h400000v"+(40+t)+"H1017.7z"},"sqrtSize4"),Oi=Ae(function(t){return"M400000 "+t+" H0 L"+t/2+" 0 l65 45 L145 "+(t-80)+" H400000z"},"phasePath"),Pi=Ae(function(t,e,r){return"M702 "+(t+e)+"H400000"+(40+t)+`
H742v`+(r-54-e-t)+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
219 661 l218 661zM702 `+e+"H400000v"+(40+t)+"H742z"},"sqrtTall"),Bi=Ae(function(t,e,r){e*=1e3;var n="";switch(t){case"sqrtMain":n=Ni(e,80);break;case"sqrtSize1":n=Ii(e,80);break;case"sqrtSize2":n=Mi(e,80);break;case"sqrtSize3":n=Ri(e,80);break;case"sqrtSize4":n=Di(e,80);break;case"sqrtTall":n=Pi(e,80,r)}return n},"sqrtPath"),Fi=Ae(function(t,e){switch(t){case"⎜":return"M291 0 H417 V"+e+" H291z M291 0 H417 V"+e+" H291z";case"":return"M145 0 H188 V"+e+" H145z M145 0 H188 V"+e+" H145z";case"∥":return"M145 0 H188 V"+e+" H145z M145 0 H188 V"+e+" H145zM367 0 H410 V"+e+" H367z M367 0 H410 V"+e+" H367z";case"⎟":return"M457 0 H583 V"+e+" H457z M457 0 H583 V"+e+" H457z";case"⎢":return"M319 0 H403 V"+e+" H319z M319 0 H403 V"+e+" H319z";case"⎥":return"M263 0 H347 V"+e+" H263z M263 0 H347 V"+e+" H263z";case"⎪":return"M384 0 H504 V"+e+" H384z M384 0 H504 V"+e+" H384z";case"⏐":return"M312 0 H355 V"+e+" H312z M312 0 H355 V"+e+" H312z";case"‖":return"M257 0 H300 V"+e+" H257z M257 0 H300 V"+e+" H257zM478 0 H521 V"+e+" H478z M478 0 H521 V"+e+" H478z";default:return""}},"innerPath"),$i={doubleleftarrow:`M262 157
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
435 0h399565z`,leftgroupunder:`M400000 262
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},zi=Ae(function(t,e){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+e+` v1759 h347 v-84
H403z M403 1759 V0 H319 V1759 v`+e+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+e+` v1759 H0 v84 H347z
M347 1759 V0 H263 V1759 v`+e+" v1759 h84z";case"vert":return"M145 15 v585 v"+e+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-e+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+e+" v585 h43z";case"doublevert":return"M145 15 v585 v"+e+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-e+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+e+` v585 h43z
M367 15 v585 v`+e+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-e+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+e+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+e+` v1715 h263 v84 H319z
MM319 602 V0 H403 V602 v`+e+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+e+` v1799 H0 v-84 H319z
MM319 602 V0 H403 V602 v`+e+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+e+` v602 h84z
M403 1759 V0 H319 V1759 v`+e+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+e+` v602 h84z
M347 1759 V0 h-84 V1759 v`+e+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
-36,557 l0,`+(e+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
l0,-`+(e+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(e+9)+`
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
l0,-`+(e+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}},"tallDelim"),Gi=class{static{Ae(this,"DocumentFragment")}constructor(t){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return yi.contains(this.classes,t)}toNode(){for(var t=document.createDocumentFragment(),e=0;e<this.children.length;e++)t.appendChild(this.children[e].toNode());return t}toMarkup(){for(var t="",e=0;e<this.children.length;e++)t+=this.children[e].toMarkup();return t}toText(){var t=Ae(t=>t.toText(),"toText");return this.children.map(t).join("")}},Ui={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0
`+h+" children.");u=["brace-left","brace-center","brace-right"],d=["xMinYMin","xMidYMin","xMaxYMin"]}for(var p=0;p<h;p++){var g=new ha(o[p]),g=new ca([g],{width:"400em",height:K(c),viewBox:"0 0 "+r+" "+l,preserveAspectRatio:d[p]+" slice"}),g=Z.makeSvgSpan([u[p]],[g],m);if(1===h)return{span:g,minWidth:s,height:c};g.style.height=K(c),i.push(g)}return{span:Z.makeSpan(["stretchy"],i,m),minWidth:s,height:c}}Ae(t,"buildSvgSpan_");var{span:e,minWidth:r,height:n}=t();return e.height=n,e.style.height=K(n),0<r&&(e.style.minWidth=K(r)),e},"svgSpan"),Os=Ae(function(t,e,r,n,i){var a,t=t.height+t.depth+r+n;return/fbox|color|angl/.test(e)?(a=Z.makeSpan(["stretchy",e],[],i),"fbox"===e&&(r=i.color&&i.getColor())&&(a.style.borderColor=r)):(n=[],/^[bx]cancel$/.test(e)&&n.push(new ua({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(e)&&n.push(new ua({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"})),r=new ca(n,{width:"100%",height:K(t)}),a=Z.makeSvgSpan([],[r],i)),a.height=t,a.style.height=K(t),a},"encloseSpan"),No={encloseSpan:Os,mathMLnode:f,svgSpan:il},Ae(Xn,"assertNodeType"),Ae(Kn,"assertSymbolNodeType"),Ae(Zn,"checkSymbolNodeType"),Io=Ae((t,e)=>{t&&"supsub"===t.type?(s=(r=Xn(t.base,"accent")).base,t.base=s,n=qn(go(t,e)),t.base=r):s=(r=Xn(t,"accent")).base;var r,n,i,a,t=go(s,e.havingCrampedStyle()),o=0,s=(r.isShifty&&yi.isCharacterBox(s)&&(s=yi.getBaseElem(s),o=Un(go(s,e.havingCrampedStyle())).skew),"\\c"===r.label),l=s?t.height+t.depth:Math.min(t.height,e.fontMetrics().xHeight),c=r.isStretchy?(c=No.svgSpan(r,e),Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"elem",elem:c,wrapperClasses:["svg-align"],wrapperStyle:0<o?{width:"calc(100% - "+K(2*o)+")",marginLeft:K(2*o)}:void 0}]},e)):("\\vec"===r.label?(a=Z.staticSvg("vec",e),i=Z.svgData.vec[1]):((a=Un(a=Z.makeOrd({mode:r.mode,text:r.label},e,"textord"))).italic=0,i=a.width,s&&(l+=a.depth)),c=Z.makeSpan(["accent-body"],[a]),(s="\\textcircled"===r.label)&&(c.classes.push("accent-full"),l=t.height),a=o,s||(a-=i/2),c.style.left=K(a),"\\textcircled"===r.label&&(c.style.top=".2em"),Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:-l},{type:"elem",elem:c}]},e)),o=Z.makeSpan(["mord","accent"],[c],e);return n?(n.children[0]=o,n.height=Math.max(o.height,n.height),n.classes[0]="mord",n):o},"htmlBuilder$a"),Bs=Ae((t,e)=>{var r=t.isStretchy?No.mathMLnode(t.label):new E.MathNode("mo",[yo(t.label,t.mode)]);return(t=new E.MathNode("mover",[ko(t.base,e),r])).setAttribute("accent","true"),t},"mathmlBuilder$9"),Mo=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|")),l({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:Ae((t,e)=>{var e=to(e[0]),r=!Mo.test(t.funcName),n=!r||"\\widehat"===t.funcName||"\\widetilde"===t.funcName||"\\widecheck"===t.funcName;return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:r,isShifty:n,base:e}},"handler"),htmlBuilder:Io,mathmlBuilder:Bs}),l({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:Ae((t,e)=>{var e=e[0],r=t.parser.mode;return"math"===r&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:t.funcName,isStretchy:!1,isShifty:!0,base:e}},"handler"),htmlBuilder:Io,mathmlBuilder:Bs}),l({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:Ae((t,e)=>{var{parser:t,funcName:r}=t,e=e[0];return{type:"acce
`,this.tokenRegex.lastIndex))?(this.tokenRegex.lastIndex=t.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=r+1,this.lex()):new ui(n,new hi(this,e,this.tokenRegex.lastIndex))}},Qs=class{static{Ae(this,"Namespace")}constructor(t,e){void 0===t&&(t={}),void 0===e&&(e={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=e,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new X("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t,e=this.undefStack.pop();for(t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;0<this.undefStack.length;)this.endGroup()}has(t){return this.current.hasOwnProperty(t)||this.builtins.hasOwnProperty(t)}get(t){return(this.current.hasOwnProperty(t)?this.current:this.builtins)[t]}set(t,e,r){if(r=void 0!==r&&r){for(var n=0;n<this.undefStack.length;n++)delete this.undefStack[n][t];0<this.undefStack.length&&(this.undefStack[this.undefStack.length-1][t]=e)}else(r=this.undefStack[this.undefStack.length-1])&&!r.hasOwnProperty(t)&&(r[t]=this.current[t]);null==e?delete this.current[t]:this.current[t]=e}},Js=ys,h("\\noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}}),h("\\expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}}),h("\\@firstoftwo",function(t){return{tokens:t.consumeArgs(2)[0],numArgs:0}}),h("\\@secondoftwo",function(t){return{tokens:t.consumeArgs(2)[1],numArgs:0}}),h("\\@ifnextchar",function(t){var e=t.consumeArgs(3),t=(t.consumeSpaces(),t.future());return 1===e[0].length&&e[0][0].text===t.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}}),h("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),h("\\TextOrMath",function(t){var e=t.consumeArgs(2);return"text"===t.mode?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}}),tl={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15},h("\\char",function(t){var e,r,n=t.popToken(),i="";if("'"===n.text)e=8,n=t.popToken();else if('"'===n.text)e=16,n=t.popToken();else if("`"===n.text)if("\\"===(n=t.popToken()).text[0])i=n.text.charCodeAt(1);else{if("EOF"===n.text)throw new X("\\char` missing argument");i=n.text.charCodeAt(0)}else e=10;if(e){if(null==(i=tl[n.text])||e<=i)throw new X("Invalid base-"+e+" digit "+n.text);for(;null!=(r=tl[t.future().text])&&r<e;)i=i*e+r,t.popToken()}return"\\@char{"+i+"}"}),el=Ae((t,e,r)=>{var n=t.consumeArg().tokens;if(1!==n.length)throw new X("\\newcommand's first argument must be a macro name");var i=n[0].text,a=t.isDefined(i);if(a&&!e)throw new X("\\newcommand{"+i+"} attempting to redefine "+i+"; use \\renewcommand");if(!a&&!r)throw new X("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");if(e=0,1===(n=t.consumeArg().tokens).length&&"["===n[0].text){for(var o="",s=t.expandNextToken();"]"!==s.text&&"EOF"!==s.text;)o+=s.text,s=t.expandNextToken();if(!o.match(/^\s*[0-9]+\s*$/))throw new X("Invalid number of arguments: "+o);e=parseInt(o),n=t.consumeArg().tokens}return t.macros.set(i,{tokens:n,numArgs:e}),""},"newcommand"),h("\\newcommand",t=>el(t,!1,!0)),h("\\renewcommand",t=>el(t,!0,!1)),h("\\providecommand",t=>el(t,!0,!0)),h("\\message",t=>(t=t.consumeArgs(1)[0],console.log(t.reverse().map(t=>t.text).join("")),"")),h("\\errmessage",t=>(t=t.consumeArgs(1)[0],console.error(t.reverse().map(t=>t.text).join("")),"")),h("\\show",t=>{var e=t.popToken(),r=e.text;return console.log(e,t.macros.get(r),Xs[r],ga.math[r],ga.text[r]),""}),h("\\bgroup","{"),h("\\egroup","}"),h("~","\\nobreakspace"),h("\\lq","`"),h("\\rq","'"),h("\\aa","\\r a"),h("\\AA","\\r A"),h("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),h("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),h("\\textregistered","\\html@m
please report what input caused this bug`);return{type:"verb",mode:"text",body:n=n.slice(1,-1),star:i}}ul.hasOwnProperty(e[0])&&!ga[this.mode][e[0]]&&(this.settings.strict&&"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+e[0]+'" used in math mode',t),e=ul[e[0]]+e.slice(1));var r=Ks.exec(e);if(r&&("i"===(e=e.substring(0,r.index))?e="ı":"j"===e&&(e="ȷ")),ga[this.mode][e]){this.settings.strict&&"math"===this.mode&&0<=Ia.indexOf(e)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+e[0]+'" used in math mode',t);var n=ga[this.mode][e].group,i=hi.range(t),a=da.hasOwnProperty(n)?{type:"atom",mode:this.mode,family:n,loc:i,text:e}:{type:n,mode:this.mode,loc:i,text:e}}else{if(!(128<=e.charCodeAt(0)))return null;this.settings.strict&&(Fn(e.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+e[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+e[0]+'" ('+e.charCodeAt(0)+")",t)),a={type:"textord",mode:"text",loc:hi.range(t),text:e}}if(this.consume(),r)for(var o=0;o<r[0].length;o++){var s=r[0][o];if(!hl[s])throw new X("Unknown accent ' "+s+"'",t);var l=hl[s][this.mode]||hl[s].text;if(!l)throw new X("Accent "+s+" unsupported in "+this.mode+" mode",t);a={type:"accent",mode:this.mode,loc:hi.range(t),label:l,isStretchy:!1,isShifty:!0,base:a}}return a}}).endOfExpression=["}","\\endgroup","\\end","\\right","&"],pl=Ae(function(t,e){if(!("string"==typeof t||t instanceof String))throw new TypeError("KaTeX can only parse string typed expression");delete(t=new dl(t,e)).gullet.macros.current["\\df@tag"];var r=t.parse();if(delete t.gullet.macros.current["\\current@color"],delete t.gullet.macros.current["\\color"],t.gullet.macros.get("\\df@tag")){if(!e.displayMode)throw new X("\\tag works only in display equations");r=[{type:"tag",mode:"text",body:r,tag:t.subparse([new ui("\\df@tag")])}]}return r},"parseTree"),m=Ae(function(t,e,r){e.textContent="",t=yl(t,r).toNode(),e.appendChild(t)},"render"),typeof document<"u"&&"CSS1Compat"!==document.compatMode&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),m=Ae(function(){throw new X("KaTeX doesn't work in quirks mode.")},"render")),gl=Ae(function(t,e){return yl(t,e).toMarkup()},"renderToString"),fl=Ae(function(t,e){return e=new xi(e),pl(t,e)},"generateParseTree"),ml=Ae(function(t,e,r){if(!r.throwOnError&&t instanceof X)return(e=Z.makeSpan(["katex-error"],[new la(e)])).setAttribute("title",t.toString()),e.setAttribute("style","color:"+r.errorColor),e;throw t},"renderError"),yl=Ae(function(t,e){e=new xi(e);try{var r=pl(t,e);return _o(r,t,e)}catch(r){return ml(r,t,e)}},"renderToDomTree"),y=Ae(function(t,e){e=new xi(e);try{var r=pl(t,e);return Co(r,t,e)}catch(r){return ml(r,t,e)}},"renderToHTMLTree"),vl={version:"0.16.11",render:m,renderToString:gl,ParseError:X,SETTINGS_SCHEMA:vi,__parse:fl,__renderToDomTree:yl,__renderToHTMLTree:y,__setFontMetrics:$n,__defineSymbol:s,__defineFunction:l,__defineMacro:h,__domTree:{Span:ia,Anchor:aa,SymbolNode:la,SvgNode:ca,PathNode:ha,LineNode:ua}}});function bl(){let e="data-temp-href-target";wl.default.addHook("beforeSanitizeAttributes",t=>{"A"===t.tagName&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),wl.default.addHook("afterSanitizeAttributes",t=>{"A"===t.tagName&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),"_blank"===t.getAttribute("target"))&&t.setAttribute("rel","noopener")})}var wl,kl,Tl,El,_l,Cl,Sl,Al,Ll,Nl,Il,Ml,Rl,Dl,Ol,Pl,Bl,Fl,$l,zl,Gl,Ul,ql,Yl,jl,L,Hl,Wl,Vl,Xl,Kl,Zl,Ql,Jl,tc=t(()=>{wl=rt(Rn(),1),kl=/<br\s*\/?>/gi,Tl=Ae(t=>t?Ml(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),El=(()=>{let t=!1;return()=>{t||(bl(),t=!0)}})(),Ae(bl,"setupDompurifyHooks"),_l=Ae(t=>(El(),wl.default.sanitize(t)),"removeScript"),Cl=Ae((t,e)=>(!1!==e.flowchart?.htmlLabels&&("antiscript"===(
font-family: ${r.fontFamily};
font-size: ${r.fontSize};
fill: ${r.textColor}
}
/* Classes common for multiple diagrams */
& .error-icon {
fill: ${r.errorBkgColor};
}
& .error-text {
fill: ${r.errorTextColor};
stroke: ${r.errorTextColor};
}
& .edge-thickness-normal {
stroke-width: 1px;
}
& .edge-thickness-thick {
stroke-width: 3.5px
}
& .edge-pattern-solid {
stroke-dasharray: 0;
}
& .edge-thickness-invisible {
stroke-width: 0;
fill: none;
}
& .edge-pattern-dashed{
stroke-dasharray: 3;
}
.edge-pattern-dotted {
stroke-dasharray: 2;
}
& .marker {
fill: ${r.lineColor};
stroke: ${r.lineColor};
}
& .marker.cross {
stroke: ${r.lineColor};
}
& svg {
font-family: ${r.fontFamily};
font-size: ${r.fontSize};
}
& p {
margin: 0
}
${n}
${e}
`},"getStyles"),Ql=Ae((t,e)=>{void 0!==e&&(Kl[t]=e)},"addStylesForDiagram"),Jl=Zl}),nc={};J(nc,{clear:()=>lc,getAccDescription:()=>dc,getAccTitle:()=>hc,getDiagramTitle:()=>gc,setAccDescription:()=>uc,setAccTitle:()=>cc,setDiagramTitle:()=>pc});var ic,ac,oc,sc,lc,cc,hc,uc,dc,pc,gc,fc,mc,D,yc,vc,xc,bc,wc,kc,Tc,Ec,_c,Cc,Sc,Ac,Lc,Nc,Ic,Mc,Rc,Dc,Oc,Pc,Bc,Fc,$c,zc,Gc,Uc,qc,Yc,jc,Hc,Wc,Vc,Xc,Kc,Zc,Qc,Jc,th,eh,rh,nh,ih,ah,oh,sh,lh,ch,hh,uh,dh,ph,gh,fh=t(()=>{tc(),Mn(),oc=ac=ic="",sc=Ae(t=>Sl(t,Rr()),"sanitizeText"),lc=Ae(()=>{ac=oc=ic=""},"clear"),cc=Ae(t=>{ic=sc(t).replace(/^\s+/g,"")},"setAccTitle"),hc=Ae(()=>ic,"getAccTitle"),uc=Ae(t=>{oc=sc(t).replace(/\n\s+/g,`
`)},"setAccDescription"),dc=Ae(()=>oc,"getAccDescription"),pc=Ae(t=>{ac=sc(t)},"setDiagramTitle"),gc=Ae(()=>ac,"getDiagramTitle")}),i=t(()=>{Yr(),e(),Mn(),tc(),ec(),rc(),fh(),fc=R,mc=k,D=Rr,yc=Mr,vc=kr,xc=Ae(t=>Sl(t,D()),"sanitizeText"),bc=Xl,wc=Ae(()=>nc,"getCommonDb"),kc={},Tc=Ae((t,e,r)=>{kc[t]&&fc.warn(`Diagram with id ${t} already registered. Overwriting.`),kc[t]=e,r&&te(t,r),Ql(t,e.styles),e.injectUtils?.(fc,mc,D,xc,bc,wc(),()=>{})},"registerDiagram"),Ec=Ae(t=>{if(t in kc)return kc[t];throw new _c(t)},"getDiagram"),_c=class extends Error{static{Ae(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}}),mh=t(()=>{i(),tc(),fh(),Cc=[],Sc=[""],Nc=[{alias:Ac="global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:Lc=""}],Mc="",Rc=!(Ic=[]),Dc=4,Oc=2,Bc=Ae(function(){return Pc},"getC4Type"),Fc=Ae(function(t){Pc=Sl(t,D())},"setC4Type"),$c=Ae(function(r,n,i,a,o,s,l,c,h){if(null!=r&&null!=n&&null!=i&&null!=a){let t={},e=Ic.find(t=>t.from===n&&t.to===i);e?t=e:Ic.push(t),t.type=r,t.from=n,t.to=i,t.label={text:a},null==o?t.techn={text:""}:"object"==typeof o?([r,a]=Object.entries(o)[0],t[r]={text:a}):t.techn={text:o},null==s?t.descr={text:""}:"object"==typeof s?([r,a]=Object.entries(s)[0],t[r]={text:a}):t.descr={text:s},"object"==typeof l?([o,r]=Object.entries(l)[0],t[o]=r):t.sprite=l,"object"==typeof c?([a,s]=Object.entries(c)[0],t[a]=s):t.tags=c,"object"==typeof h?([o,r]=Object.entries(h)[0],t[o]=r):t.link=h,t.wrap=lh()}},"addRel"),zc=Ae(function(r,n,i,a,o,s,l){if(null!==n&&null!==i){let t={},e=Cc.find(t=>t.alias===n);var c;e&&n===e.alias?t=e:(t.alias=n,Cc.push(t)),t.label=null==i?{text:""}:{text:i},null==a?t.descr={text:""}:"object"==typeof a?([i,c]=Object.entries(a)[0],t[i]={text:c}):t.descr={text:a},"object"==typeof o?([i,c]=Object.entries(o)[0],t[i]=c):t.sprite=o,"object"==typeof s?([a,i]=Object.entries(s)[0],t[a]=i):t.tags=s,"object"==typeof l?([c,o]=Object.entries(l)[0],t[c]=o):t.link=l,t.typeC4Shape={text:r},t.parentBoundary=Ac,t.wrap=lh()}},"addPersonOrSystem"),Gc=Ae(function(r,n,i,a,o,s,l,c){if(null!==n&&null!==i){let t={},e=Cc.find(t=>t.alias===n);var h;e&&n===e.alias?t=e:(t.alias=n,Cc.push(t)),t.label=null==i?{text:""}:{text:i},null==a?t.techn={text:""}:"object"==typeof a?([i,h]=Object.entries(a)[0],t[i]={text:h}):t.techn={text:a},null==o?t.descr={text:""}:"object"==typeof o?([i,h]=Object.entries(o)[0],t[i]={text:h}):t.descr={text:o},"object"==typeof s?([a,i]=Object.entries(s)[0],t[a]=i):t.sprite=s,"object"==typeof l?([h,o]=Object.entries(l)[0],t[h]=o):t.tags=l,"object"==typeof c?([a,i]=Object.entries(c)[0],t[a]=i):t.link=c,t.wrap=lh(),t.typeC4Shape={text:r},t.parentBoundary=Ac}},"addContainer"),Uc=Ae(function(r,n,i,a,o,s,l,c){if(null!==n&&null!==i){let t={},e=Cc.find(t=>t.alias===n);var h;e&&n===e.alias?t=e:(t.alias=n,Cc.push(t)),t.label=null==i?{text:""}:{text:i},null==a?t.techn={text:""}:"object"==typeof a?([i,h]=Object.entries(a)[0],t[i]={text:h}):t.techn={text:a},null==o?t.descr={text:""}:"object"==typeof o?([i,h]=Object.entries(o)[0],t[i]={text:h}):t.descr={text:o},"object"==typeof s?([a,i]=Object.entries(s)[0],t[a]=i):t.sprite=s,"object"==typeof l?([h,o]=Object.entries(l)[0],t[h]=o):t.tags=l,"object"==typeof c?([a,i]=Object.entries(c)[0],t[a]=i):t.link=c,t.wrap=lh(),t.typeC4Shape={text:r},t.parentBoundary=Ac}},"addComponent"),qc=Ae(function(r,n,i,a,o){if(null!==r&&null!==n){let t={},e=Nc.find(t=>t.alias===r);var s;e&&r===e.alias?t=e:(t.alias=r,Nc.push(t)),t.label=null==n?{text:""}:{text:n},null==i?t.type={text:"system"}:"object"==typeof i?([n,s]=Object.entries(i)[0],t[n]={text:s}):t.type={text:i},"object"==typeof a?([n,s]=Object.entries(a)[0],t[n]=s):t.tags=a,"object"==typeof o?([i,n]=Object.entries(o)[0],t[i]=n):t.link=o,t.parentBoundary=Ac,t.wrap=lh(),Lc=Ac,Ac=r,Sc.push(Lc)}},"addPersonOrSystemBoundary"),Yc=Ae(function(r,n,i,a,o){if(null!==r&&null!==n){let t={},e=Nc.find(t=>t.alias===r);var s;e&&r===e.alias?t=e:(t.alias=r,Nc.push(t)),t.label=null==n?{text:""}:{text:n},null==i?t.type={text:"container"}:"object"==typeof i?([n,s]=Object.entries(i)[0],t[n
`,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),R.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:`+t);for(var n,i,a,o=[];null!==(n=Vt.exec(t));)n.index===Vt.lastIndex&&Vt.lastIndex++,(n&&!e||e&&n[1]?.match(e)||e&&n[2]?.match(e))&&(i=n[1]||n[2],a=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null,o.push({type:i,args:a}));return 0===o.length?{type:t,args:null}:1===o.length?o[0]:o}catch(r){return R.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),S8=Ae(function(t){return t.replace(Vt,"")},"removeDirectives"),A8=Ae(function(t,e){for(var[r,n]of e.entries())if(n.match(t))return r;return-1},"isSubstringInArray"),Ae(c8,"interpolateToCurve"),Ae(h8,"formatUrl"),L8=Ae((e,...t)=>{let r=e.split("."),n=r.length-1,i=r[n],a=window;for(let t=0;t<n;t++)if(!(a=a[r[t]]))return void R.error(`Function name: ${e} not found in window`);a[i](...t)},"runFunc"),Ae(u8,"distance"),Ae(d8,"traverseEdge"),Ae(p8,"calcLabelPosition"),N8=Ae((t,e=2)=>(e=Math.pow(10,e),Math.round(t*e)/e),"roundNumber"),I8=Ae((t,e)=>{let r,n=e;for(var i of t){if(r){var a=u8(i,r);if(a<n)n-=a;else{if((a=n/a)<=0)return r;if(1<=a)return{x:i.x,y:i.y};if(0<a&&a<1)return{x:N8((1-a)*r.x+a*i.x,5),y:N8((1-a)*r.y+a*i.y,5)}}}r=i}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),M8=Ae((t,e,r)=>{R.info("our points "+JSON.stringify(e)),e[0]!==r&&(e=e.reverse());var r=I8(e,25),t=t?10:5,n=Math.atan2(e[0].y-r.y,e[0].x-r.x),i={x:0,y:0};return i.x=Math.sin(n)*t+(e[0].x+r.x)/2,i.y=-Math.cos(n)*t+(e[0].y+r.y)/2,i},"calcCardinalityPosition"),Ae(g8,"calcTerminalLabelPosition"),Ae(f8,"getStylesFromArray"),R8=0,D8=Ae(()=>(R8++,"id-"+Math.random().toString(36).substr(2,12)+"-"+R8),"generateId"),Ae(m8,"makeRandomHex"),O8=Ae(t=>m8(t.length),"random"),P8=Ae(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),B8=Ae(function(t,e){var r=e.text.replace(L.lineBreakRegex," "),[,n]=j8(e.fontSize);return(t=t.append("text")).attr("x",e.x),t.attr("y",e.y),t.style("text-anchor",e.anchor),t.style("font-family",e.fontFamily),t.style("font-size",n),t.style("font-weight",e.fontWeight),t.attr("fill",e.fill),void 0!==e.class&&t.attr("class",e.class),(n=t.append("tspan")).attr("x",e.x+2*e.textMargin),n.attr("fill",e.fill),n.text(r),t},"drawSimpleText"),F8=Cw((t,o,s)=>{if(!t||(s=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},s),L.lineBreakRegex.test(t)))return t;let l=t.split(" ").filter(Boolean),c=[],h="";return l.forEach((t,e)=>{var r,n,i=v8(t+" ",s),a=v8(h,s);h=o<i?({hyphenatedStrings:r,remainingWord:n}=$8(t,o,"-",s),c.push(h,...r),n):o<=a+i?(c.push(h),t):[h,t].filter(Boolean).join(" "),e+1===l.length&&c.push(h)}),c.filter(t=>""!==t).join(s.joinWith)},(t,e,r)=>""+t+e+r.fontSize+r.fontWeight+r.fontFamily+r.joinWith),$8=Cw((t,n,i="-",a)=>{a=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},a);let o=[...t],s=[],l="";return o.forEach((t,e)=>{var r,t=""+l+t;l=v8(t,a)>=n?(e+=1,e=o.length===e,r=t+i,s.push(e?t:r),""):t}),{hyphenatedStrings:s,remainingWord:l}},(t,e,r="-",n)=>""+t+e+r+n.fontSize+n.fontWeight+n.fontFamily),Ae(y8,"calculateTextHeight"),Ae(v8,"calculateTextWidth"),z8=Cw((t,e)=>{var{fontSize:e=12,fontFamily:r="Arial",fontWeight:n=400}=e;if(!t)return{width:0,height:0};var[,i]=j8(e),e=["sans-serif",r],a=t.split(L.lineBreakRegex),o=[];if(!(r=O("body")).remove)return{width:0,height:0,lineHeight:0};var s,l=r.append("svg");for(s of e){var c,h={width:0,height:0,lineHeight:0};for(c of a){var u=P8();if(u.text=c||k8,0===(u=((u=B8(l,u).style("font-size",i).style("font-weight",n).style("font-family",s))._groups||u)[0][0].getBBox()).width&&0===u.height)throw new Error("svg element not in render tree");h.width=Math.round(Math.max(h.width,u.width)),u=Math.round(u.height),h.height+=u,h.lineHeight=Math.round(Math.max(h.lineHeight,u))}o.push(h)}return l.remove(),o[isNaN(o[1].height)||isNaN(o[1].width)||isNaN(o[1].lineHei
stroke: ${t.personBorder};
fill: ${t.personBkg};
}
`,"getStyles"),vE=yE}),wE={};J(wE,{diagram:()=>kE});var kE,TE=t(()=>{jr(),mh(),xE(),bE(),kE={parser:ne,db:gh,renderer:mE,styles:vE,init:Ae(({c4:t,wrap:e})=>{mE.setConf(t),gh.setWrap(e)},"init")}});function EE(t){let e=[];for(var r of t)(r=LE.get(r))?.styles&&(e=[...e,...r.styles??[]].map(t=>t.trim())),r?.textStyles&&(e=[...e,...r.textStyles??[]].map(t=>t.trim()));return e}var _E,CE,SE,AE,LE,NE,IE,ME,RE,DE,OE,PE,BE,FE,$E,zE,GE,UE,qE,YE,jE,HE,WE,VE,XE,KE,ZE,QE,JE,t_,e_,r_,n_,i_,a_,o_,s_,l_,c_,h_,u_,d_,p_,g_,f_,m_,y_,v_,x_,b_,w_,k_,T_,E_,__,C_,S_,A_,L_,N_,I_=t(()=>{Q3(),K8(),i(),tc(),e(),fh(),_E=0,CE=D(),SE=new Map,AE=[],LE=new Map,NE=[],IE=new Map,ME=new Map,DE=!(RE=0),BE=[],FE=Ae(t=>L.sanitizeText(t,CE),"sanitizeText"),$E=Ae(function(t){for(var e of SE.values())if(e.id===t)return e.domId;return t},"lookUpDomId"),zE=Ae(function(r,n,i,a,o,s,l={}){if(r&&0!==r.trim().length){let t,e=SE.get(r);void 0===e&&(e={id:r,labelType:"text",domId:"flowchart-"+r+"-"+_E,styles:[],classes:[]},SE.set(r,e)),_E++,void 0!==n?(CE=D(),t=FE(n.text.trim()),e.labelType=n.type,t.startsWith('"')&&t.endsWith('"')&&(t=t.substring(1,t.length-1)),e.text=t):void 0===e.text&&(e.text=r),void 0!==i&&(e.type=i),a?.forEach(function(t){e.styles.push(t)}),o?.forEach(function(t){e.classes.push(t)}),void 0!==s&&(e.dir=s),void 0===e.props?e.props=l:void 0!==l&&Object.assign(e.props,l)}},"addVertex"),GE=Ae(function(t,e,r){if(R.info("abc78 Got edge...",t={start:t,end:e,type:void 0,text:"",labelType:"text"}),void 0!==(e=r.text)&&(t.text=FE(e.text.trim()),t.text.startsWith('"')&&t.text.endsWith('"')&&(t.text=t.text.substring(1,t.text.length-1)),t.labelType=e.type),void 0!==r&&(t.type=r.type,t.stroke=r.stroke,t.length=10<r.length?10:r.length),!(AE.length<(CE.maxEdges??500)))throw new Error(`Edge limit exceeded. ${AE.length} edges found, but the limit is ${CE.maxEdges}.
Initialize mermaid with maxEdges set to a higher number to allow more edges.
You cannot set this config via configuration inside the diagram as it is a secure config.
You have to call mermaid.initialize.`);R.info("Pushing edge..."),AE.push(t)},"addSingleLink"),UE=Ae(function(t,e,r){R.info("addLink",t,e,r);for(var n of t)for(var i of e)GE(n,i,r)},"addLink"),qE=Ae(function(t,e){t.forEach(function(t){"default"===t?AE.defaultInterpolate=e:AE[t].interpolate=e})},"updateLinkInterpolate"),YE=Ae(function(t,e){t.forEach(function(t){if("number"==typeof t&&t>=AE.length)throw new Error(`The index ${t} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${AE.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);"default"===t?AE.defaultStyle=e:(AE[t].style=e,0<(AE[t]?.style?.length??0)&&!AE[t]?.style?.some(t=>t?.startsWith("fill"))&&AE[t]?.style?.push("fill:none"))})},"updateLink"),jE=Ae(function(t,e){t.split(",").forEach(function(t){let r=LE.get(t);void 0===r&&(r={id:t,styles:[],textStyles:[]},LE.set(t,r)),e?.forEach(function(t){var e;/color/.exec(t)&&(e=t.replace("fill","bgFill"),r.textStyles.push(e)),r.styles.push(t)})})},"addClass"),HE=Ae(function(t){OE=t,/.*</.exec(OE)&&(OE="RL"),/.*\^/.exec(OE)&&(OE="BT"),/.*>/.exec(OE)&&(OE="LR"),"TD"===(OE=/.*v/.exec(OE)?"TB":OE)&&(OE="TB")},"setDirection"),WE=Ae(function(t,e){for(var r of t.split(",")){var n=SE.get(r);n&&n.classes.push(e),(n=IE.get(r))&&n.classes.push(e)}},"setClass"),VE=Ae(function(t,e){if(void 0!==e){e=FE(e);for(var r of t.split(","))ME.set("gen-1"===PE?$E(r):r,e)}},"setTooltip"),XE=Ae(function(t,e,n){let i=$E(t);if("loose"===D().securityLevel&&void 0!==e){let r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e<r.length;e++){let t=r[e].trim();t.startsWith('"')&&t.endsWith('"')&&(t=t.substr(1,t.length-2)),r[e]=t}}0===r.length&&r.push(t),(n=SE.get(t))&&(n.haveCallback=!0,BE.push(function(){var t=document.querySelector(`[id="${i}"]`);null!==t&&t.addEventListener("click",function(){H8.runFunc(e,...r)},!1)}))}},"setClickFun"),KE=Ae(function(t,e,r){t.split(",").forEach(function(t){void 0!==(t=SE.get(t))&&(t.link=H8.formatUrl(e,CE),t.linkTarget=r)}),WE(t,"clickable")},"setLink"),ZE=Ae(function(t){return ME.get(t)},"getTooltip"),QE=Ae(function(t,e,r){t.split(",").forEach(function(t){XE(t,e,r)}),WE(t,"clickable")},"setClickEvent"),JE=Ae(function(e){BE.forEach(function(t){t(e)})},"bindFunctions"),t_=Ae(function(){return OE.trim()},"getDirection"),e_=Ae(function(){return SE},"getVertices"),r_=Ae(function(){return AE},"getEdges"),n_=Ae(function(){return LE},"getClasses"),i_=Ae(function(t){let r=O(".mermaidTooltip");null===(r._groups||r)[0][0]&&(r=O("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),O(t).select("svg").selectAll("g.node").on("mouseover",function(){var t,e=O(this);null!==e.attr("title")&&(t=this?.getBoundingClientRect(),r.transition().duration(200).style("opacity",".9"),r.text(e.attr("title")).style("left",window.scrollX+t.left+(t.right-t.left)/2+"px").style("top",window.scrollY+t.bottom+"px"),r.html(r.html().replace(/&lt;br\/&gt;/g,"<br/>")),e.classed("hover",!0))}).on("mouseout",function(){r.transition().duration(500).style("opacity",0),O(this).classed("hover",!1)})},"setupToolTips"),BE.push(i_),a_=Ae(function(t="gen-1"){SE=new Map,LE=new Map,AE=[],BE=[i_],NE=[],IE=new Map,RE=0,ME=new Map,DE=!0,PE=t,CE=D(),lc()},"clear"),o_=Ae(t=>{PE=t||"gen-2"},"setGen"),s_=Ae(function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},"defaultStyle"),l_=Ae(function(t,e,r){let n=t.text.trim(),i=r.text;function a(t){let r={boolean:{},number:{},string:{}},n=[],i;return{nodeList:t.filter(function(t){var e=typeof t;return t.stmt&&"dir"===t.stmt?(i=t.value,!1):""!==t.trim()&&(e in r?!r[e].hasOwnProperty(t)&&(r[e][t]=!0):!n.includes(t)&&n.push(t))}),dir:i}}t===r&&/\s/.exec(r.text)&&(n=void 0),Ae(a,"uniq");var{nodeList:o,dir:t}=a(e.flat());if("gen-1"===PE)for(let t=0;t<o.length;t++)o[t]=$E(o[t]);return n=n??"subGraph"+RE,i=FE(i=i||""),RE+=1,e={id:n,nodes:o,title:i.trim(),classes:[],dir:t,labelType:r.type},R.info("Adding",e.id,e.nodes,e.dir),e.nodes=w_(e,NE).nodes,NE.push(e),IE.set(n,e),n},"addSubGra
`).map(t=>{var e=t.match(/^\s+/);return null!==e&&([e]=e,e.length>=r.length)?t.slice(r.length):t}).join(`
`)}function Y_(t,e){return LC.parse(t,e)}var j_,H_,W_,V_,X_,K_,Z_,Q_,J_,tC,eC,rC,nC,iC,aC,oC,sC,lC,cC,hC,uC,dC,pC,gC,fC,mC,yC,vC,xC,bC,wC,kC,TC,EC,_C,CC,SC,AC,LC,NC=t(()=>{Ae(R_,"_getDefaults"),j_=R_(),Ae(D_,"changeDefaults"),H_=/[&<>"']/,W_=new RegExp(H_.source,"g"),V_=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,X_=new RegExp(V_.source,"g"),K_={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Z_=Ae(t=>K_[t],"getEscapeReplacement"),Ae(O_,"escape$1"),Q_=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,Ae(P_,"unescape"),J_=/(^|[^\[])\^/g,Ae(B_,"edit"),Ae(F_,"cleanUrl"),tC={exec:Ae(()=>null,"exec")},Ae($_,"splitCells"),Ae(z_,"rtrim"),Ae(G_,"findClosingBracket"),Ae(U_,"outputLink"),Ae(q_,"indentCodeCompensation"),eC=class{static{Ae(this,"_Tokenizer")}options;rules;lexer;constructor(t){this.options=t||j_}space(t){if((t=this.rules.block.newline.exec(t))&&0<t[0].length)return{type:"space",raw:t[0]}}code(t){var e;if(t=this.rules.block.code.exec(t))return e=t[0].replace(/^ {1,4}/gm,""),{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:z_(e,`
`)}}fences(t){var e,r;if(t=this.rules.block.fences.exec(t))return r=q_(e=t[0],t[3]||""),{type:"code",raw:e,lang:t[2]&&t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"),text:r}}heading(e){var r;if(e=this.rules.block.heading.exec(e)){let t=e[2].trim();return/#$/.test(t)&&(r=z_(t,"#"),!this.options.pedantic&&r&&!/ $/.test(r)||(t=r.trim())),{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){if(t=this.rules.block.hr.exec(t))return{type:"hr",raw:z_(t[0],`
`)}}blockquote(t){if(t=this.rules.block.blockquote.exec(t)){let n=z_(t[0],`
`).split(`
`),i="",a="",o=[];for(;0<n.length;){let t=!1,e=[],r;for(r=0;r<n.length;r++)if(/^ {0,3}>/.test(n[r]))e.push(n[r]),t=!0;else{if(t)break;e.push(n[r])}n=n.slice(r);var s,l=(c=e.join(`
`)).replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,`
$1`).replace(/^ {0,3}>[ \t]?/gm,""),c=(i=i?i+`
`+c:c,a=a?a+`
`+l:l,this.lexer.state.top);if(this.lexer.state.top=!0,this.lexer.blockTokens(l,o,!0),this.lexer.state.top=c,0===n.length)break;if("code"===(l=o[o.length-1])?.type)break;if("blockquote"===l?.type){var h=(c=l).raw+`
`+n.join(`
`),h=this.blockquote(h);o[o.length-1]=h,i=i.substring(0,i.length-c.raw.length)+h.raw,a=a.substring(0,a.length-c.text.length)+h.text;break}"list"===l?.type&&(h=(c=l).raw+`
`+n.join(`
`),s=this.list(h),o[o.length-1]=s,i=i.substring(0,i.length-l.raw.length)+s.raw,a=a.substring(0,a.length-c.raw.length)+s.raw,n=h.substring(o[o.length-1].raw.length).split(`
`))}return{type:"blockquote",raw:i,tokens:o,text:a}}}list(d){let p=this.rules.block.list.exec(d);if(p){let t=p[1].trim(),e=1<t.length,c={type:"list",raw:"",ordered:e,start:e?+t.slice(0,-1):"",loose:!1,items:[]},h=(t=e?"\\d{1,9}\\"+t.slice(-1):"\\"+t,this.options.pedantic&&(t=e?t:"[*+-]"),new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`)),u=!1;for(;d;){let t=!1,e="",r="";if(!(p=h.exec(d))||this.rules.block.hr.test(d))break;e=p[0],d=d.substring(e.length);let n=p[2].split(`
`,1)[0].replace(/^\t+/,t=>" ".repeat(3*t.length)),i=d.split(`
`,1)[0],a=!n.trim(),o=0;if(this.options.pedantic?(o=2,r=n.trimStart()):a?o=p[1].length+1:(o=4<(o=p[2].search(/[^ ]/))?1:o,r=n.slice(o),o+=p[1].length),a&&/^ *$/.test(i)&&(e+=i+`
`,d=d.substring(i.length+1),t=!0),!t)for(var g=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),f=new RegExp(`^ {0,${Math.min(3,o-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),m=new RegExp(`^ {0,${Math.min(3,o-1)}}(?:\`\`\`|~~~)`),y=new RegExp(`^ {0,${Math.min(3,o-1)}}#`);d;){var v=d.split(`
`,1)[0];if(i=v,this.options.pedantic&&(i=i.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),m.test(i)||y.test(i)||g.test(i)||f.test(d))break;if(i.search(/[^ ]/)>=o||!i.trim())r+=`
`+i.slice(o);else{if(a||4<=n.search(/[^ ]/)||m.test(n)||y.test(n)||f.test(n))break;r+=`
`+i}a||i.trim()||(a=!0),e+=v+`
`,d=d.substring(v.length+1),n=i.slice(o)}c.loose||(u?c.loose=!0:/\n *\n *$/.test(e)&&(u=!0));let s=null,l;this.options.gfm&&(s=/^\[[ xX]\] /.exec(r))&&(l="[ ] "!==s[0],r=r.replace(/^\[[ xX]\] +/,"")),c.items.push({type:"list_item",raw:e,task:!!s,checked:l,loose:!1,text:r,tokens:[]}),c.raw+=e}c.items[c.items.length-1].raw=c.items[c.items.length-1].raw.trimEnd(),c.items[c.items.length-1].text=c.items[c.items.length-1].text.trimEnd(),c.raw=c.raw.trimEnd();for(let t=0;t<c.items.length;t++){var r;this.lexer.state.top=!1,c.items[t].tokens=this.lexer.blockTokens(c.items[t].text,[]),c.loose||(r=0<(r=c.items[t].tokens.filter(t=>"space"===t.type)).length&&r.some(t=>/\n.*\n/.test(t.raw)),c.loose=r)}if(c.loose)for(let t=0;t<c.items.length;t++)c.items[t].loose=!0;return c}}html(t){if(t=this.rules.block.html.exec(t))return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(t){var e,r,n;if(t=this.rules.block.def.exec(t))return e=t[1].toLowerCase().replace(/\s+/g," "),r=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]&&t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"),{type:"def",tag:e,raw:t[0],href:r,title:n}}table(i){if((i=this.rules.block.table.exec(i))&&/[:|]/.test(i[2])){let e=$_(i[1]),t=i[2].replace(/^\||\| *$/g,"").split("|"),r=i[3]&&i[3].trim()?i[3].replace(/\n[ \t]*$/,"").split(`
`):[],n={type:"table",raw:i[0],header:[],align:[],rows:[]};if(e.length===t.length){for(var a of t)/^ *-+: *$/.test(a)?n.align.push("right"):/^ *:-+: *$/.test(a)?n.align.push("center"):/^ *:-+ *$/.test(a)?n.align.push("left"):n.align.push(null);for(let t=0;t<e.length;t++)n.header.push({text:e[t],tokens:this.lexer.inline(e[t]),header:!0,align:n.align[t]});for(var o of r)n.rows.push($_(o,n.header.length).map((t,e)=>({text:t,tokens:this.lexer.inline(t),header:!1,align:n.align[e]})));return n}}}lheading(t){if(t=this.rules.block.lheading.exec(t))return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(t){var e;if(t=this.rules.block.paragraph.exec(t))return e=t[1].charAt(t[1].length-1)===`
`?t[1].slice(0,-1):t[1],{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}text(t){if(t=this.rules.block.text.exec(t))return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(t){if(t=this.rules.inline.escape.exec(t))return{type:"escape",raw:t[0],text:O_(t[1])}}tag(t){if(t=this.rules.inline.tag.exec(t))return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(r){if(r=this.rules.inline.link.exec(r)){var n,i=r[2].trim();if(!this.options.pedantic&&/^</.test(i)){if(!/>$/.test(i))return;var a=z_(i.slice(0,-1),"\\");if((i.length-a.length)%2==0)return}else-1<(a=G_(r[2],"()"))&&(n=(0===r[0].indexOf("!")?5:4)+r[1].length+a,r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,n).trim(),r[3]="");let t=r[2],e="";return this.options.pedantic?(a=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(t))&&(t=a[1],e=a[3]):e=r[3]?r[3].slice(1,-1):"",t=t.trim(),U_(r,{href:(t=/^</.test(t)?this.options.pedantic&&!/>$/.test(i)?t.slice(1):t.slice(1,-1):t)&&t.replace(this.rules.inline.anyPunctuation,"$1"),title:e&&e.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer)}}reflink(t,e){var r;if(r=(r=this.rules.inline.reflink.exec(t))||this.rules.inline.nolink.exec(t))return(t=e[(r[2]||r[1]).replace(/\s+/g," ").toLowerCase()])?U_(r,t,r[0],this.lexer):{type:"text",raw:e=r[0].charAt(0),text:e}}emStrong(o,s,t=""){let l=this.rules.inline.emStrongLDelim.exec(o);if(!(!l||l[3]&&t.match(/[\p{L}\p{N}]/u))&&(!l[1]&&!l[2]||!t||this.rules.inline.punctuation.exec(t))){let t=[...l[0]].length-1,e,r,n=t,i=0,a="*"===l[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(a.lastIndex=0,s=s.slice(-1*o.length+t);null!=(l=a.exec(s));){var c,h;if(e=l[1]||l[2]||l[3]||l[4]||l[5]||l[6])if(r=[...e].length,l[3]||l[4])n+=r;else if((l[5]||l[6])&&t%3&&!((t+r)%3))i+=r;else if(!(0<(n-=r)))return r=Math.min(r,r+n+i),c=[...l[0]][0].length,c=o.slice(0,t+l.index+c+r),Math.min(t,r)%2?(h=c.slice(1,-1),{type:"em",raw:c,text:h,tokens:this.lexer.inlineTokens(h)}):(h=c.slice(2,-2),{type:"strong",raw:c,text:h,tokens:this.lexer.inlineTokens(h)})}}}codespan(n){if(n=this.rules.inline.code.exec(n)){let t=n[2].replace(/\n/g," "),e=/[^ ]/.test(t),r=/^ /.test(t)&&/ $/.test(t);return t=O_(t=e&&r?t.substring(1,t.length-1):t,!0),{type:"codespan",raw:n[0],text:t}}}br(t){if(t=this.rules.inline.br.exec(t))return{type:"br",raw:t[0]}}del(t){if(t=this.rules.inline.del.exec(t))return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(r){if(r=this.rules.inline.autolink.exec(r)){let t,e;return e="@"===r[2]?"mailto:"+(t=O_(r[1])):t=O_(r[1]),{type:"link",raw:r[0],text:t,href:e,tokens:[{type:"text",raw:t,text:t}]}}}url(t){var r,n;if(r=this.rules.inline.url.exec(t)){let t,e;if("@"===r[2])t=O_(r[0]),e="mailto:"+t;else{for(;n=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"",n!==r[0];);t=O_(r[0]),e="www."===r[1]?"http://"+r[0]:r[0]}return{type:"link",raw:r[0],text:t,href:e,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){var e;if(t=this.rules.inline.text.exec(t))return e=this.lexer.state.inRawBlock?t[0]:O_(t[0]),{type:"text",raw:t[0],text:e}}},sC=/^(?: *(?:\n|$))+/,xC=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,iC=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hC=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,aC=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,oC=/(?:[*+-]|\d{1,9}[.)])/,yC=B_(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,oC).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/bloc
]`).replace("lheading",yC).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},aC=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,bC=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,oC=/^( {2,}|\\)\n(?!\s*$)/,sC=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,vC="\\p{P}\\p{S}",lC=B_(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,vC).getRegex(),xC=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,AC=B_(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,vC).getRegex(),cC=B_("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,vC).getRegex(),hC=B_("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,vC).getRegex(),yC=B_(/\\([punct])/,"gu").replace(/punct/g,vC).getRegex(),vC=B_(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),uC=B_(uC).replace("(?:--\x3e|$)","--\x3e").getRegex(),uC=B_("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",uC).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),dC=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,pC=B_(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",dC).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),gC=B_(/^!?\[(label)\]\[(ref)\]/).replace("label",dC).replace("ref",fC).getRegex(),fC=B_(/^!?\[(ref)\](?:\[\])?/).replace("ref",fC).getRegex(),mC=B_("reflink|nolink(?!\\()","g").replace("reflink",gC).replace("nolink",fC).getRegex(),vC={...yC={_backpedal:tC,anyPunctuation:yC,autolink:vC,blockSkip:xC,br:oC,code:bC,del:tC,emStrongLDelim:AC,emStrongRDelimAst:cC,emStrongRDelimUnd:hC,escape:aC,link:pC,nolink:fC,punctuation:lC,reflink:gC,reflinkSearch:mC,tag:uC,text:sC,url:tC},link:B_(/^!?\[(label)\]\((.*?)\)/).replace("label",dC).getRegex(),reflink:B_(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",dC).getRegex()},xC={...yC,escape:B_(aC).replace("])","~|])").getRegex(),url:B_(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},bC={...xC,br:B_(oC).replace("{2,}","*").getRegex(),text:B_(xC.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},wC={normal:rC,gfm:nC,pedantic:iC},kC={normal:yC,gfm:xC,breaks:bC,pedantic:vC},TC=class r{static{Ae(this,"_Lexer")}tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||j_,this.options.tokenizer=this.options.tokenizer||new eC,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,(this.tokenizer.lexer=this).inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0},t={block:wC.normal,inline:kC.normal},this.options.pedantic?(t.block=wC.pedantic,t.inline=kC.pedantic):this.options.gfm&&(t.block=wC.gfm,
`),this.blockTokens(t,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){var e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(i,e=[],t=!1){i=this.options.pedantic?i.replace(/\t/g," ").replace(/^ +$/gm,""):i.replace(/^( *)(\t+)/gm,(t,e,r)=>e+" ".repeat(r.length));let r,n,a;for(;i;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(t=>!!(r=t.call({lexer:this},i,e))&&(i=i.substring(r.raw.length),e.push(r),!0)))){if(r=this.tokenizer.space(i)){i=i.substring(r.raw.length),1===r.raw.length&&0<e.length?e[e.length-1].raw+=`
`:e.push(r);continue}if(r=this.tokenizer.code(i)){i=i.substring(r.raw.length),!(n=e[e.length-1])||"paragraph"!==n.type&&"text"!==n.type?e.push(r):(n.raw+=`
`+r.raw,n.text+=`
`+r.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);continue}if(r=this.tokenizer.fences(i)){i=i.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.heading(i)){i=i.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.hr(i)){i=i.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.blockquote(i)){i=i.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.list(i)){i=i.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.html(i)){i=i.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.def(i)){i=i.substring(r.raw.length),!(n=e[e.length-1])||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title}):(n.raw+=`
`+r.raw,n.text+=`
`+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);continue}if(r=this.tokenizer.table(i)){i=i.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.lheading(i)){i=i.substring(r.raw.length),e.push(r);continue}if(a=i,this.options.extensions&&this.options.extensions.startBlock){let e=1/0,r=i.slice(1),n;this.options.extensions.startBlock.forEach(t=>{"number"==typeof(n=t.call({lexer:this},r))&&0<=n&&(e=Math.min(e,n))}),e<1/0&&0<=e&&(a=i.substring(0,e+1))}if(this.state.top&&(r=this.tokenizer.paragraph(a))){n=e[e.length-1],t&&"paragraph"===n?.type?(n.raw+=`
`+r.raw,n.text+=`
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):e.push(r),t=a.length!==i.length,i=i.substring(r.raw.length);continue}if(r=this.tokenizer.text(i)){i=i.substring(r.raw.length),(n=e[e.length-1])&&"text"===n.type?(n.raw+=`
`+r.raw,n.text+=`
`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):e.push(r);continue}if(i){var o="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(o);break}throw new Error(o)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(i,e=[]){let r,t,a,n=i,o,s,l;if(this.tokens.links){var c=Object.keys(this.tokens.links);if(0<c.length)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(n));)c.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(n));)n=n.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(n));)n=n.slice(0,o.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;i;)if(s||(l=""),s=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(t=>!!(r=t.call({lexer:this},i,e))&&(i=i.substring(r.raw.length),e.push(r),!0)))){if(r=this.tokenizer.escape(i)){i=i.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.tag(i)){i=i.substring(r.raw.length),(t=e[e.length-1])&&"text"===r.type&&"text"===t.type?(t.raw+=r.raw,t.text+=r.text):e.push(r);continue}if(r=this.tokenizer.link(i)){i=i.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.reflink(i,this.tokens.links)){i=i.substring(r.raw.length),(t=e[e.length-1])&&"text"===r.type&&"text"===t.type?(t.raw+=r.raw,t.text+=r.text):e.push(r);continue}if(r=this.tokenizer.emStrong(i,n,l)){i=i.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.codespan(i)){i=i.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.br(i)){i=i.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.del(i)){i=i.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.autolink(i)){i=i.substring(r.raw.length),e.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(i))){i=i.substring(r.raw.length),e.push(r);continue}if(a=i,this.options.extensions&&this.options.extensions.startInline){let e=1/0,r=i.slice(1),n;this.options.extensions.startInline.forEach(t=>{"number"==typeof(n=t.call({lexer:this},r))&&0<=n&&(e=Math.min(e,n))}),e<1/0&&0<=e&&(a=i.substring(0,e+1))}if(r=this.tokenizer.inlineText(a)){i=i.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(l=r.raw.slice(-1)),s=!0,(t=e[e.length-1])&&"text"===t.type?(t.raw+=r.raw,t.text+=r.text):e.push(r);continue}if(i){var h="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(h);break}throw new Error(h)}}return e}},EC=class{static{Ae(this,"_Renderer")}options;parser;constructor(t){this.options=t||j_}space(t){return""}code({text:t,lang:e,escaped:r}){return e=(e||"").match(/^\S*/)?.[0],t=t.replace(/\n$/,"")+`
`,e?'<pre><code class="language-'+O_(e)+'">'+(r?t:O_(t,!0))+`</code></pre>
`:"<pre><code>"+(r?t:O_(t,!0))+`</code></pre>
`}blockquote({tokens:t}){return`<blockquote>
${this.parser.parse(t)}</blockquote>
`}html({text:t}){return t}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
`}hr(t){return`<hr>
`}list(e){let t=e.ordered,r=e.start,n="";for(let t=0;t<e.items.length;t++){var i=e.items[t];n+=this.listitem(i)}var a=t?"ol":"ul";return"<"+a+(t&&1!==r?' start="'+r+'"':"")+`>
`+n+"</"+a+`>
`}listitem(t){let e="";var r;return t.task&&(r=this.checkbox({checked:!!t.checked}),t.loose?0<t.tokens.length&&"paragraph"===t.tokens[0].type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&0<t.tokens[0].tokens.length&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=r+" "+t.tokens[0].tokens[0].text)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" "}):e+=r+" "),`<li>${e+=this.parser.parse(t.tokens,!!t.loose)}</li>
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
`}table(e){let t="",r="";for(let t=0;t<e.header.length;t++)r+=this.tablecell(e.header[t]);t+=this.tablerow({text:r});let n="";for(let t=0;t<e.rows.length;t++){var i=e.rows[t];r="";for(let t=0;t<i.length;t++)r+=this.tablecell(i[t]);n+=this.tablerow({text:r})}return`<table>
<thead>
`+t+`</thead>
`+(n=n&&`<tbody>${n}</tbody>`)+`</table>
`}tablerow({text:t}){return`<tr>
${t}</tr>
`}tablecell(t){var e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${t}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:r}){var r=this.parser.parseInline(r),n=F_(t);if(null===n)return r;let i='<a href="'+(t=n)+'"';return e&&(i+=' title="'+e+'"'),i+=">"+r+"</a>"}image({href:t,title:e,text:r}){var n=F_(t);if(null===n)return r;let i=`<img src="${t=n}" alt="${r}"`;return e&&(i+=` title="${e}"`),i+=">"}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):t.text}},_C=class{static{Ae(this,"_TextRenderer")}strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},CC=class n{static{Ae(this,"_Parser")}options;renderer;textRenderer;constructor(t){this.options=t||j_,this.options.renderer=this.options.renderer||new EC,this.renderer=this.options.renderer,this.renderer.options=this.options,(this.renderer.parser=this).textRenderer=new _C}static parse(t,e){return new n(e).parse(t)}static parseInline(t,e){return new n(e).parseInline(t)}parse(n,i=!0){let a="";for(let r=0;r<n.length;r++){var t=n[r];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[t.type]){var e=t,o=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==o||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){a+=o||"";continue}}var s=t;switch(s.type){case"space":a+=this.renderer.space(s);continue;case"hr":a+=this.renderer.hr(s);continue;case"heading":a+=this.renderer.heading(s);continue;case"code":a+=this.renderer.code(s);continue;case"table":a+=this.renderer.table(s);continue;case"blockquote":a+=this.renderer.blockquote(s);continue;case"list":a+=this.renderer.list(s);continue;case"html":a+=this.renderer.html(s);continue;case"paragraph":a+=this.renderer.paragraph(s);continue;case"text":{let t=s,e=this.renderer.text(t);for(;r+1<n.length&&"text"===n[r+1].type;)t=n[++r],e+=`
`+this.renderer.text(t);a+=i?this.renderer.paragraph({type:"paragraph",raw:e,text:e,tokens:[{type:"text",raw:e,text:e}]}):e;continue}default:var l='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}return a}parseInline(e,r){r=r||this.renderer;let n="";for(let t=0;t<e.length;t++){var i=e[t];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){var a=this.options.extensions.renderers[i.type].call({parser:this},i);if(!1!==a||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){n+=a||"";continue}}var o=i;switch(o.type){case"escape":n+=r.text(o);break;case"html":n+=r.html(o);break;case"link":n+=r.link(o);break;case"image":n+=r.image(o);break;case"strong":n+=r.strong(o);break;case"em":n+=r.em(o);break;case"codespan":n+=r.codespan(o);break;case"br":n+=r.br(o);break;case"del":n+=r.del(o);break;case"text":n+=r.text(o);break;default:var s='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}return n}},SC=class{static{Ae(this,"_Hooks")}options;constructor(t){this.options=t||j_}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}},AC=class{static{Ae(this,"Marked")}defaults=R_();options=this.setOptions;parse=this.#e(TC.lex,CC.parse);parseInline=this.#e(TC.lexInline,CC.parseInline);Parser=CC;Renderer=EC;TextRenderer=_C;Lexer=TC;Tokenizer=eC;Hooks=SC;constructor(...t){this.use(...t)}walkTokens(t,r){let n=[];for(var i of t)switch(n=n.concat(r.call(this,i)),i.type){case"table":var e,a,o=i;for(e of o.header)n=n.concat(this.walkTokens(e.tokens,r));for(a of o.rows)for(var s of a)n=n.concat(this.walkTokens(s.tokens,r));break;case"list":o=i,n=n.concat(this.walkTokens(o.items,r));break;default:{let e=i;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(t=>{t=e[t].flat(1/0),n=n.concat(this.walkTokens(t,r))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,r)))}}return n}use(...t){let i=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(e=>{var t={...e};if(t.async=this.defaults.async||t.async||!1,e.extensions&&(e.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let r=i.renderers[n.name];r?i.renderers[n.name]=function(...t){var e=n.renderer.apply(this,t);return!1===e?r.apply(this,t):e}:i.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||"block"!==n.level&&"inline"!==n.level)throw new Error("extension level must be 'block' or 'inline'");var t=i[n.level];t?t.unshift(n.tokenizer):i[n.level]=[n.tokenizer],n.start&&("block"===n.level?i.startBlock?i.startBlock.push(n.start):i.startBlock=[n.start]:"inline"===n.level&&(i.startInline?i.startInline.push(n.start):i.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(i.childTokens[n.name]=n.childTokens)}),t.extensions=i),e.renderer){let i=this.defaults.renderer||new EC(this.defaults);for(var a in e.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(!["options","parser"].includes(a)){let t=a,r=e.renderer[t],n=(e.useNewRenderer||(r=this.#t(r,t,i)),i[t]);i[t]=(...t)=>{var e=r.apply(i,t);return(!1===e?n.apply(i,t):e)||""}}}t.renderer=i}if(e.tokenizer){let i=this.defaults.tokenizer||new eC(this.defaults);for(var o in e.tokenizer){if(!(o in i))throw new Error(`tokenizer '${o}' does not exist`);if(!["options","rules","lexer"].includes(o)){let t=o,r=e.tokenizer[t],n=i[t];i[t]=(...t)=>{var e=r.apply(i,t);return!1===e?n.apply(i,t):e}}}t.tokenizer=i}if(e.hooks){let i=this.defaults.hooks||new SC;for(var s in e.hooks){if(!(s in i))throw new Error(`hook '${s}' does not exist`);if("options"!==s){let t=s,r=e.hooks[t],n=i[t];SC.passThroughHooks.has(s)?i[t]=t=>this.defaults.async?Promise.resolve(r.call(i,t)).then(t=>n.call(i,t)):(t=r.call(i,t),n.call(i,t)):i[t]=(...t)=>{var e=r.apply(i,t);return!1===e?n.apply(i,t):e}}}t.hooks=i}if(e.walkTokens){
Please report this to https://github.com/markedjs/marked.`,r)return e="<p>An error occurred:</p><pre>"+O_(t.message+"",!0)+"</pre>",n?Promise.resolve(e):e;if(n)return Promise.reject(t);throw t}}},LC=new AC,Ae(Y_,"marked"),Y_.options=Y_.setOptions=function(t){return LC.setOptions(t),D_(Y_.defaults=LC.defaults),Y_},Y_.getDefaults=R_,Y_.defaults=j_,Y_.use=function(...t){return LC.use(...t),D_(Y_.defaults=LC.defaults),Y_},Y_.walkTokens=function(t,e){return LC.walkTokens(t,e)},Y_.parseInline=LC.parseInline,Y_.Parser=CC,Y_.parser=CC.parse,Y_.Renderer=EC,Y_.TextRenderer=_C,Y_.Lexer=TC,Y_.lexer=TC.lex,Y_.Tokenizer=eC,Y_.Hooks=SC,Y_.parse=Y_,TC.lex});function IC(t,{markdownAutoWrap:e}){return t=Ht(t.replace(/<br\/>/g,`
`).replace(/\n{2,}/g,`
`)),!1===e?t.replace(/ /g,"&nbsp;"):t}function MC(t,e={}){let r=IC(t,e),n=Y_.lexer(r),i=[[]],a=0;function o(e,r="normal"){"text"===e.type?e.text.split(`
`).forEach((t,e)=>{0!==e&&(a++,i.push([])),t.split(" ").forEach(t=>{t&&i[a].push({content:t,type:r})})}):"strong"===e.type||"em"===e.type?e.tokens.forEach(t=>{o(t,e.type)}):"html"===e.type&&i[a].push({content:e.text,type:"normal"})}return Ae(o,"processNode"),n.forEach(t=>{"paragraph"===t.type?t.tokens?.forEach(t=>{o(t)}):"html"===t.type&&i[a].push({content:t.text,type:"normal"})}),i}function RC(t,{markdownAutoWrap:e}={}){function r(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):t.text.replace(/\n */g,"<br/>"):"strong"===t.type?`<strong>${t.tokens?.map(r).join("")}</strong>`:"em"===t.type?`<em>${t.tokens?.map(r).join("")}</em>`:"paragraph"===t.type?`<p>${t.tokens?.map(r).join("")}</p>`:"space"===t.type?"":"html"===t.type?""+t.text:"Unsupported markdown: "+t.type}return t=Y_.lexer(t),Ae(r,"output"),t.map(r).join("")}var DC=t(()=>{NC(),Gr(),Ae(IC,"preprocessMarkdown"),Ae(MC,"markdownToLines"),Ae(RC,"markdownToHTML")});function OC(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map(t=>t.segment):[...t]}function PC(t,e){return BC(t,[],OC(e.content),e.type)}function BC(t,e,r,n){var i,a,o;return 0===r.length?[{content:e.join(""),type:n},{content:"",type:n}]:([i,...a]=r,t([{content:(o=[...e,i]).join(""),type:n}])?BC(t,o,a,n):(0===e.length&&i&&(e.push(i),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}]))}function FC(t,e){if(t.some(({content:t})=>t.includes(`
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return $C(t,e)}function $C(t,e,r=[],n=[]){if(0===t.length)return 0<n.length&&r.push(n),0<r.length?r:[];let i="";" "===t[0].content&&(i=" ",t.shift());var a=t.shift()??{content:" ",type:"normal"},o=[...n];return""!==i&&o.push({content:i,type:"normal"}),o.push(a),e(o)?$C(t,e,r,o):(0<n.length?(r.push(n),t.unshift(a)):a.content&&([o,n]=PC(e,a),r.push([o]),n.content)&&t.unshift(n),$C(t,e,r))}var zC=t(()=>{Ae(OC,"splitTextToChars"),Ae(PC,"splitWordToFitWidth"),Ae(BC,"splitWordToFitWidthRecursion"),Ae(FC,"splitLineToFitWidth"),Ae($C,"splitLineToFitWidthRecursion")});function GC(t,e){e&&t.attr("style",e)}async function UC(t,e,r,n,i=!1){let a=t.append("foreignObject"),o=a.append("xhtml:div"),s=e.label;e.label&&ql(e.label)&&(s=await jl(e.label.replace(L.lineBreakRegex,`
`),D()));var t=e.isNode?"nodeLabel":"edgeLabel",l=o.append("span");return l.html(s),GC(l,e.labelStyle),l.attr("class",t+" "+n),GC(o,e.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),o.style("max-width",r+"px"),o.style("text-align","center"),o.attr("xmlns","http://www.w3.org/1999/xhtml"),i&&o.attr("class","labelBkg"),(l=o.node().getBoundingClientRect()).width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px"),l=o.node().getBoundingClientRect()),a.node()}function qC(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}function YC(t,e,r){return WC(e=qC(t=t.append("text"),1,e),r),r=e.node().getComputedTextLength(),t.remove(),r}function jC(t,e,r){return WC(e=qC(t=t.append("text"),1,e),[{content:r,type:"normal"}]),(r=e.node()?.getBoundingClientRect())&&t.remove(),r}function HC(e,t,r,n=!1){let i=t.append("g"),a=i.insert("rect").attr("class","background").attr("style","stroke: none"),o=i.append("text").attr("y","-10.1"),s=0;for(var l of r){var c,h=Ae(t=>YC(i,1.1,t)<=e,"checkWidth");for(c of h(l)?[l]:FC(l,h))WC(qC(o,s,1.1),c),s++}return(n?(t=o.node().getBBox(),a.attr("x",-2).attr("y",-2).attr("width",t.width+4).attr("height",t.height+4),i):o).node()}function WC(n,t){n.text(""),t.forEach((t,e)=>{var r=n.append("tspan").attr("font-style","em"===t.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===t.type?"bold":"normal");0===e?r.text(t.content):r.text(" "+t.content)})}function VC(t){return t.replace(/fa[bklrs]?:fa-[\w-]+/g,t=>`<i class='${t.replace(":"," ")}'></i>`)}var XC,KC=t(()=>{i(),tc(),Q3(),e(),DC(),K8(),zC(),Ae(GC,"applyStyle"),Ae(UC,"addHtmlSpan"),Ae(qC,"createTspan"),Ae(YC,"computeWidthOfText"),Ae(jC,"computeDimensionOfText"),Ae(HC,"createFormattedText"),Ae(WC,"updateTextContentAndStyles"),Ae(VC,"replaceIconSubstring"),XC=Ae(async(t,e="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:a=!0,isNode:o=!0,width:s=200,addSvgBackground:l=!1}={},c)=>(R.info("XYZ createText",e,r,n,i,a,o,"addSvgBackground: ",l),a?(n=RC(e,c),a=VC(V8(n)),n=e.replace(/\\\\/g,"\\"),UC(t,{isNode:o,label:ql(e)?n:a,labelStyle:r.replace("fill:","color:")},s,i,l)):(n=HC(s,t,MC(e.replace(/<br\s*\/?>/g,"<br/>").replace("<br>","<br/>"),c),!!e&&l),o?(a=(r=/stroke:/.exec(r)?r.replace("stroke:","lineColor:"):r).replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:"),O(n).attr("style",a)):(i=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:"),O(n).select("rect").attr("style",i.replace(/background:/g,"fill:")),s=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:"),O(n).select("text").attr("style",s)),n)),"createText")});function ZC(t,e){e&&t.attr("style",e)}function QC(t){var e=O(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),n=t.label,i=t.isNode?"nodeLabel":"edgeLabel",a=r.append("span");return a.html(n),ZC(a,t.labelStyle),a.attr("class",i),ZC(r,t.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}var JC,tS,eS=t(()=>{Q3(),e(),i(),tc(),K8(),KC(),Ae(ZC,"applyStyle"),Ae(QC,"addHtmlLabel"),JC=Ae((t,e,r,n)=>{let i=t||"";if("object"==typeof i&&(i=i[0]),Dl(D().flowchart.htmlLabels))return i=i.replace(/\\n|\n/g,"<br />"),R.debug("vertexText"+i),QC({isNode:n,label:VC(V8(i)),labelStyle:e.replace("fill:","color:")});var a,o=document.createElementNS("http://www.w3.org/2000/svg","text");o.setAttribute("style",e.replace("color:","fill:"));for(a of"string"==typeof i?i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?i:[]){var s=document.createElementNS("http://www.w3.org/2000/svg","tspan");s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),s.setAttribute("dy","1em"),s.setAttribute("x","0"),r?s.setAttribute("class","
`),D()));var i=t.isNode?"nodeLabel":"edgeLabel";return r.html('<span class="'+i+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+n+"</span>"),T9(r,t.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}var _9,C9,S9,A9,L9,N9,I9,M9,R9,D9,O9,P9,B9,F9,$9,z9,G9=t(()=>{Q3(),e(),i(),tc(),K8(),Ae(T9,"applyStyle"),Ae(E9,"addHtmlLabel"),_9=Ae(async(t,e,r,n)=>{let i=t||"";if("object"==typeof i&&(i=i[0]),Dl(D().flowchart.htmlLabels))return i=i.replace(/\\n|\n/g,"<br />"),R.info("vertexText"+i),E9({isNode:n,label:V8(i).replace(/fa[blrs]?:fa-[\w-]+/g,t=>`<i class='${t.replace(":"," ")}'></i>`),labelStyle:e&&e.replace("fill:","color:")});var a,o=document.createElementNS("http://www.w3.org/2000/svg","text");o.setAttribute("style",e.replace("color:","fill:"));for(a of"string"==typeof i?i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?i:[]){var s=document.createElementNS("http://www.w3.org/2000/svg","tspan");s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),s.setAttribute("dy","1em"),s.setAttribute("x","0"),r?s.setAttribute("class","title-row"):s.setAttribute("class","row"),s.textContent=a.trim(),o.appendChild(s)}return o},"createLabel"),C9=_9}),U9=t(()=>{S9=Ae((t,e,r,n,i)=>["M",t+i,e,"H",t+r-i,"A",i,i,0,0,1,t+r,e+i,"V",e+n-i,"A",i,i,0,0,1,t+r-i,e+n,"H",t+i,"A",i,i,0,0,1,t,e+n-i,"V",e+i,"A",i,i,0,0,1,t+i,e,"Z"].join(" "),"createRoundedRectPathD")}),q9=t(()=>{i(),A9=Ae(t=>({fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:D().handDrawnSeed}),"solidStateFill"),L9=Ae(t=>({stylesMap:t=N9([...t.cssCompiledStyles||[],...t.cssStyles||[]]),stylesArray:[...t]}),"compileStyles"),N9=Ae(t=>{let r=new Map;return t.forEach(t=>{var[t,e]=t.split(":");r.set(t.trim(),e?.trim())}),r},"styles2Map"),I9=Ae(t=>{let e=L9(t).stylesArray,r=[],n=[],i=[],a=[];return e.forEach(t=>{var e=t[0];"color"===e||"font-size"===e||"font-family"===e||"font-weight"===e||"font-style"===e||"text-decoration"===e||"text-align"===e||"text-transform"===e||"line-height"===e||"letter-spacing"===e||"word-spacing"===e||"text-shadow"===e||"text-overflow"===e||"white-space"===e||"word-wrap"===e||"word-break"===e||"overflow-wrap"===e||"hyphens"===e?r.push(t.join(":")+" !important"):(n.push(t.join(":")+" !important"),e.includes("stroke")&&i.push(t.join(":")+" !important"),"fill"===e&&a.push(t.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:e,borderStyles:i,backgroundStyles:a}},"styles2String"),M9=Ae((t,e)=>{var{themeVariables:r,handDrawnSeed:n}=D(),{nodeBorder:r,mainBkg:i}=r,t=L9(t).stylesMap;return Object.assign({roughness:.7,fill:t.get("fill")||i,fillStyle:"hachure",fillWeight:4,stroke:t.get("stroke")||r,seed:n,strokeWidth:1.3},e)},"userNodeOverrides")}),Y9=t(()=>{i(),tc(),e(),dA(),Q3(),w9(),KC(),k9(),G9(),U9(),q9(),R9=Ae(async(n,i)=>{R.info("Creating subgraph rect for ",i.id,i);let t=D(),{themeVariables:e,handDrawnSeed:a}=t,{clusterBkg:o,clusterBorder:s}=e,{labelStyles:r,nodeStyles:l,borderStyles:c,backgroundStyles:h}=I9(i),u=n.insert("g").attr("class","cluster "+i.cssClasses).attr("id",i.id).attr("data-look",i.look),d=Dl(t.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await XC(p,i.label,{style:i.labelStyle,useHtmlLabels:d,isNode:!0}),f=g.getBBox();Dl(t.flowchart.htmlLabels)&&(n=g.children[0],m=O(g),f=n.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height));var n=i.width<=f.width+i.padding?f.width+i.padding:i.width,m=(i.width<=f.width+i.padding?i.diff=(n-i.width)/2-i.padding:i.diff=-i.padding,i.height),y=i.x-n/2,v=i.y-m/2;R.trace("Data ",i,JSON.stringify(i));let x;if("handDrawn"===i.look){let t=v9.svg(u),e=M9(i,{roughness:.7,fill:o,stroke:s,fillWeight:3,seed:a}),r=t.path(S9(y,v,n,m,0),e);(x=u.insert(()=>(R.debug("Rough node insert CXC",r),r),":first-child")).select("path:nth-child(2)").attr("style",c.join(";")),x.select("path").attr("style",h.join(";").replace("fill","stroke"))}else(x=u.insert("rect",":first-child")).attr("style",l).a
outsidePoint: ${JSON.stringify(n)}
insidePoint : ${JSON.stringify(i)}
node : x:${t.x} y:${t.y} w:${t.width} h:`+t.height);let a=t.x,e=t.y,r=Math.abs(a-i.x),o=t.width/2,s=i.x<n.x?o-r:o+r,l=t.height/2,c=Math.abs(n.y-i.y),h=Math.abs(n.x-i.x);var u;if(Math.abs(e-n.y)*o>Math.abs(a-n.x)*l)return t=i.y<n.y?n.y-l-e:e-l-n.y,s=h*t/c,u={x:i.x<n.x?i.x+s:i.x-h+s,y:i.y<n.y?i.y+c-t:i.y-c+t},0===s&&(u.x=n.x,u.y=n.y),0===h&&(u.x=n.x),0===c&&(u.y=n.y),R.debug(`abc89 top/bottom calc, Q ${c}, q ${t}, R ${h}, r `+s,u),u;{let t=c*(s=i.x<n.x?n.x-o-a:a-o-n.x)/h,e=i.x<n.x?i.x+h-s:i.x-h+s,r=i.y<n.y?i.y+t:i.y-t;return R.debug(`sides calc abc89, Q ${c}, q ${t}, R ${h}, r `+s,{_x:e,_y:r}),0===s&&(e=n.x,r=n.y),0===h&&(e=n.x),0===c&&(r=n.y),{x:e,y:r}}},"intersection"),hL=Ae((t,n)=>{R.warn("abc88 cutPathAtIntersect",t,n);let i=[],a=t[0],o=!1;return t.forEach(t=>{if(R.info("abc88 checking point",t,n),lL(n,t)||o)R.warn("abc88 outside",t,a),a=t,o||i.push(t);else{let e=cL(n,a,t),r=(R.debug("abc88 inside",t,a,e),R.debug("abc88 intersection",e,n),!1);i.forEach(t=>{r=r||t.x===e.x&&t.y===e.y}),i.some(t=>t.x===e.x&&t.y===e.y)?R.warn("abc88 no intersect",e,i):i.push(e),o=!0}}),R.debug("returning points",i),i},"cutPathAtIntersect"),Ae(eL,"extractCornerPoints"),uL=Ae(function(t,e,r){var n=e.x-t.x,t=e.y-t.y,r=r/Math.sqrt(n*n+t*t);return{x:e.x-r*n,y:e.y-r*t}},"findAdjacentPoint"),dL=Ae(function(n){var t=eL(n).cornerPointPositions,i=[];for(let r=0;r<n.length;r++)if(t.includes(r)){var a=n[r-1],o=n[r+1],s=n[r],l=uL(a,s,5),c=uL(o,s,5),h=c.x-l.x,u=c.y-l.y;i.push(l);let t=2*Math.sqrt(2),e={x:s.x,y:s.y};10<Math.abs(o.x-a.x)&&10<=Math.abs(o.y-a.y)?(R.debug("Corner point fixing",Math.abs(o.x-a.x),Math.abs(o.y-a.y)),e=s.x===l.x?{x:h<0?l.x-5+t:l.x+5-t,y:u<0?l.y-t:l.y+t}:{x:h<0?l.x-t:l.x+t,y:u<0?l.y-5+t:l.y+5-t}):R.debug("Corner point skipping fixing",Math.abs(o.x-a.x),Math.abs(o.y-a.y)),i.push(e,c)}else i.push(n[r]);return i},"fixCorners"),pL=Ae(function(t,e,r,n,i,a,o){let s=D().handDrawnSeed,l=e.points,c=!1,h=i;(i=a).intersect&&h.intersect&&((l=l.slice(1,e.points.length-1)).unshift(h.intersect(l[0])),R.debug("Last point APA12",e.start,"--\x3e",e.end,l[l.length-1],i,i.intersect(l[l.length-1])),l.push(i.intersect(l[l.length-1]))),e.toCluster&&(R.info("to cluster abc88",r.get(e.toCluster)),l=hL(e.points,r.get(e.toCluster).node),c=!0),e.fromCluster&&(R.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(l,null,2)),l=hL(l.reverse(),r.get(e.fromCluster).node).reverse(),c=!0);var u,a=l.filter(t=>!Number.isNaN(t.y)),i=(a=dL(a))[a.length-1];1<a.length&&(i=a[a.length-1],r=a[a.length-2],u=(i.x-r.x)/2,i=(i.y-r.y)/2,u={x:r.x+u,y:r.y+i},a.splice(-1,0,u));let d=d4,{x:p,y:g}=(e.curve&&(d=e.curve),V9(e)),f=Kb().x(p).y(g).curve(d),m;switch(e.thickness){case"normal":m="edge-thickness-normal";break;case"thick":m="edge-thickness-thick";break;case"invisible":m="edge-thickness-invisible";break;default:m="edge-thickness-normal"}switch(e.pattern){case"solid":m+=" edge-pattern-solid";break;case"dotted":m+=" edge-pattern-dotted";break;case"dashed":m+=" edge-pattern-dashed";break;default:m+=" edge-pattern-solid"}let y,v=f(a),x=Array.isArray(e.style)?e.style:[e.style],b=("handDrawn"===e.look?(r=v9.svg(t),Object.assign([],a),i=r.path(v,{roughness:.3,seed:s}),m+=" transition",u=(y=O(i).select("path").attr("id",e.id).attr("class"," "+m+(e.classes?" "+e.classes:"")).attr("style",x?x.reduce((t,e)=>t+";"+e,""):"")).attr("d"),y.attr("d",u),t.node().appendChild(y.node())):y=t.append("path").attr("d",v).attr("id",e.id).attr("class"," "+m+(e.classes?" "+e.classes:"")).attr("style",x?x.reduce((t,e)=>t+";"+e,""):""),"");return(D().flowchart.arrowMarkerAbsolute||D().state.arrowMarkerAbsolute)&&(b=(b=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(").replace(/\)/g,"\\)")),R.info("arrowTypeStart",e.arrowTypeStart),R.info("arrowTypeEnd",e.arrowTypeEnd),X9(y,e,b,o,n),a={},c&&(a.updatedPath=l),a.originalPath=e.points,a},"insertEdge")}),NL=t(()=>{e(),gL=Ae((e,t,r,n)=>{t.forEach(t=>{EL[t](e,r,n)})},"insertMarkers"),fL=Ae((t,e,r)=>{R.trace("Making markers for ",r),t.append("defs").append("marker").attr("
point:`,t,`
node:
`,i,`
res:`,WL.polygon(i,c,t)),WL.polygon(i,c,t)},a},"question")}),eI=t(()=>{IL(),oN(),q9(),w9(),VN(),NN=Ae((t,e,r,n,i)=>[`M${t+i},`+e,`L${t+r-i},`+e,`L${t+r},`+(e-n/2),`L${t+r-i},`+(e-n),`L${t+i},`+(e-n),`L${t},`+(e-n/2),"Z"].join(" "),"createHexagonPathD"),IN=Ae(async(t,i)=>{var{labelStyles:e,nodeStyles:r}=I9(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await CL(t,i,AL(i)),o=n.height+i.padding,s=o/4,l=n.width+2*s+i.padding,c=[{x:s,y:0},{x:l-s,y:0},{x:l,y:-o/2},{x:l-s,y:-o},{x:s,y:-o},{x:0,y:-o/2}],h,u=i.cssStyles;if("handDrawn"===i.look){let t=v9.svg(a),e=M9(i,{}),r=NN(0,0,l,o,s),n=t.path(r,e);h=a.insert(()=>n,":first-child").attr("transform",`translate(${-l/2}, ${o/2})`),u&&h.attr("style",u)}else h=vN(a,l,o,c);return r&&h.attr("style",r),i.width=l,i.height=o,SL(i,h),i.intersect=function(t){return WL.polygon(i,c,t)},a},"hexagon")}),rI=t(()=>{IL(),oN(),q9(),w9(),VN(),MN=Ae((t,e,r,n)=>[`M${t-2*n/6},`+e,`L${t+r-n/6},`+e,`L${t+r+2*n/6},`+(e-n),`L${t+n/6},`+(e-n),"Z"].join(" "),"createLeanRightPathD"),RN=Ae(async(t,i)=>{var{labelStyles:e,nodeStyles:r}=I9(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await CL(t,i,AL(i)),o=n.width+i.padding,s=n.height+i.padding,l=[{x:-2*s/6,y:0},{x:o-s/6,y:0},{x:o+2*s/6,y:-s},{x:s/6,y:-s}],c,h=i.cssStyles;if("handDrawn"===i.look){let t=v9.svg(a),e=M9(i,{}),r=MN(0,0,o,s),n=t.path(r,e);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=vN(a,o,s,l);return r&&c.attr("style",r),i.width=o,i.height=s,SL(i,c),i.intersect=function(t){return WL.polygon(i,l,t)},a},"lean_right")}),nI=t(()=>{IL(),oN(),q9(),w9(),VN(),DN=Ae((t,e,r,n)=>[`M${t+2*n/6},`+e,`L${t+r+n/6},`+e,`L${t+r-2*n/6},`+(e-n),`L${t-n/6},`+(e-n),"Z"].join(" "),"createLeanLeftPathD"),ON=Ae(async(t,i)=>{var{labelStyles:e,nodeStyles:r}=I9(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await CL(t,i,AL(i)),o=n.width+i.padding,s=n.height+i.padding,l=[{x:2*s/6,y:0},{x:o+s/6,y:0},{x:o-2*s/6,y:-s},{x:-s/6,y:-s}],c,h=i.cssStyles;if("handDrawn"===i.look){let t=v9.svg(a),e=M9(i,{}),r=DN(0,0,o,s),n=t.path(r,e);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=vN(a,o,s,l);return r&&c.attr("style",r),i.width=o,i.height=s,SL(i,c),i.intersect=function(t){return WL.polygon(i,l,t)},a},"lean_left")}),iI=t(()=>{IL(),oN(),q9(),w9(),VN(),PN=Ae((t,e,r,n)=>[`M${t-2*n/6},`+e,`L${t+r+2*n/6},`+e,`L${t+r-n/6},`+(e-n),`L${t+n/6},`+(e-n),"Z"].join(" "),"createTrapezoidPathD"),BN=Ae(async(t,i)=>{var{labelStyles:e,nodeStyles:r}=I9(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await CL(t,i,AL(i)),o=n.width+i.padding,s=n.height+i.padding,l=[{x:-2*s/6,y:0},{x:o+2*s/6,y:0},{x:o-s/6,y:-s},{x:s/6,y:-s}],c,h=i.cssStyles;if("handDrawn"===i.look){let t=v9.svg(a),e=M9(i,{}),r=PN(0,0,o,s),n=t.path(r,e);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=vN(a,o,s,l);return r&&c.attr("style",r),i.width=o,i.height=s,SL(i,c),i.intersect=function(t){return WL.polygon(i,l,t)},a},"trapezoid")}),aI=t(()=>{IL(),oN(),q9(),w9(),VN(),FN=Ae((t,e,r,n)=>[`M${t+n/6},`+e,`L${t+r-n/6},`+e,`L${t+r+2*n/6},`+(e-n),`L${t-2*n/6},`+(e-n),"Z"].join(" "),"createInvertedTrapezoidPathD"),$N=Ae(async(t,i)=>{var{labelStyles:e,nodeStyles:r}=I9(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await CL(t,i,AL(i)),o=n.width+i.padding,s=n.height+i.padding,l=[{x:s/6,y:0},{x:o-s/6,y:0},{x:o+2*s/6,y:-s},{x:-2*s/6,y:-s}],c,h=i.cssStyles;if("handDrawn"===i.look){let t=v9.svg(a),e=M9(i,{}),r=FN(0,0,o,s),n=t.path(r,e);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),h&&c.attr("style",h)}else c=vN(a,o,s,l);return r&&c.attr("style",r),i.width=o,i.height=s,SL(i,c),i.intersect=function(t){return WL.polygon(i,l,t)},a},"inv_trapezoid")}),oI=t(()=>{sN(),IL(),oN(),zN=Ae(async(t,e)=>{var r=(t=(await CL(t,e,"label")).shapeSvg).insert("rect",":first-child");return r.attr("width",.1).attr("height",.1),t.attr("class","label edgeLabel"),SL(e,r),e.intersect=function(t){return WL.rect(e,t)},t},"labelRect")}),sI=t(()=>{e(),lN(),cN(),hN(),uN(),dN(),pN(),gN(),fN(),mN(),yN(),i(),X
Node.id = `,t,`
data=`,e.height,`
Parent cluster`,s.height),i.setNode(s.id,e),i.parent(t)||(R.trace("Setting parent",t,s.id),i.setParent(t,s.id,e))),R.info("(Insert) Node XXX"+t+": "+JSON.stringify(i.node(t))),n?.clusterNode?(R.info("Cluster identified XBX",t,n.width,i.node(t)),{ranksep:e,nodesep:r}=i.graph(),n.graph.setGraph({...n.graph.graph(),ranksep:e+25,nodesep:r}),r=(e=await $j(u,n.graph,a,o,i.node(t),l)).elem,SL(n,r),n.diff=e.diff||0,R.info("New compound node after recursive render XAX",t,"width",n.width,"height",n.height),YN(r,n)):0<i.children(t).length?(R.trace("Cluster - the non recursive path XBX",t,n.id,n,n.width,"Graph:",i),R.trace(Nj(n.id,i)),wj.set(n.id,{id:Nj(n.id,i),node:n})):(R.trace("Node - the non recursive path XAX",t,u,i.node(t),c),await qN(u,i.node(t),c))})),await Ae(async()=>{var t=i.edges().map(async function(t){var e=i.edge(t.v,t.w,t.name);R.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),R.info("Edge "+t.v+" -> "+t.w+": ",t," ",JSON.stringify(i.edge(t))),R.info("Fix",wj,"ids:",t.v,t.w,"Translating: ",wj.get(t.v),wj.get(t.w)),await oL(r,e)});await Promise.all(t)},"processEdges")(),R.info("Graph before layout:",JSON.stringify(vj(i))),R.info("############################################# XXX"),R.info("### Layout ### XXX"),R.info("############################################# XXX"),YY(i),R.info("Graph after layout:",JSON.stringify(vj(i))),0),p=cA(l).subGraphTitleTotalMargin;return await Promise.all(Oj(i).map(async function(t){var e,r=i.node(t);R.info("Position XBX => "+t+": ("+r.x,","+r.y,") width: ",r.width," height: ",r.height),r?.clusterNode?(r.y+=p,R.info("A tainted cluster node XBX1",t,r.id,r.width,r.height,r.x,r.y,i.parent(t)),wj.get(r.id).node=r,HN(r)):0<i.children(t).length?(R.info("A pure cluster node XBX1",t,r.id,r.x,r.y,r.width,r.height,i.parent(t)),r.height+=p,i.node(r.parentId),t=r?.padding/2||0,e=r?.labelBBox?.height||0,R.debug("OffsetY",e-t||0,"labelHeight",e,"halfPadding",t),await $9(n,r),wj.get(r.id).node=r):(e=i.node(r.parentId),r.y+=p/2,R.info("A regular node XBX1 - using the padding",r.id,"parent",r.parentId,r.width,r.height,r.x,r.y,"offsetY",r.offsetY,"parent",e,e?.offsetY,r),HN(r))})),i.edges().forEach(function(t){var e=i.edge(t),r=(R.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e),e),e.points.forEach(t=>t.y+=p/2),i.node(t.v)),t=i.node(t.w),r=pL(h,e,wj,a,r,t,o);sL(e,r)}),i.nodes().forEach(function(t){var e=i.node(t);R.info(t,e.type,e.diff),e.isGroup&&(d=e.diff)}),R.warn("Returning from recursive render XAX",t,d),{elem:t,diff:d}},"recursiveRender"),zj=Ae(async(t,e)=>{let s=new rU({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:t.config?.nodeSpacing||t.config?.flowchart?.nodeSpacing||t.nodeSpacing,ranksep:t.config?.rankSpacing||t.config?.flowchart?.rankSpacing||t.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),r=e.select("g");_L(r,t.markers,t.type,t.diagramId),jN(),iL(),z9(),Ej(),t.nodes.forEach(t=>{s.setNode(t.id,{...t}),t.parentId&&s.setParent(t.id,t.parentId)}),R.debug("Edges:",t.edges),t.edges.forEach(t=>{var e,r,n,i,a,o;t.start===t.end?(r=(e=t.start)+"---"+e+"---1",n=e+"---"+e+"---2",i=s.node(e),s.setNode(r,{domId:r,id:r,parentId:i.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),s.setParent(r,i.parentId),s.setNode(n,{domId:n,id:n,parentId:i.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),s.setParent(n,i.parentId),i=structuredClone(t),a=structuredClone(t),o=structuredClone(t),i.label="",i.arrowTypeEnd="none",i.id=e+"-cyclic-special-1",a.arrowTypeEnd="none",a.id=e+"-cyclic-special-mid",o.label="",i.fromCluster=e,o.toCluster=e,o.id=e+"-cyclic-special-2",s.setEdge(e,r,i,e+"-cyclic-special-0"),s.setEdge(r,n,a,e+"-cyclic-special-1"),s.setEdge(n,e,o,e+"-cyc<lic-special-2")):s.setEdge(t.start,t.end,{...t},t.id)}),R.warn("Graph at first:",JSON.stringify(vj(s))),Mj(s),R.warn("Graph after XAX:",JSON.stringify(vj(s))),e=D(),await $j(r,s,t.type,t.diagramId,void 0,e)},"render")}),nH=t(()=>{lI(),e(),Gj={},Uj=Ae(t=>{for(var e of t)Gj[e.name]=e},"registerLa
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),o.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],C.$=a[a.length-E],C._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(C._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),typeof(_=this.performAction.apply(C,[l,h,c,f.yy,k[1],a,o].concat(p)))<"u")return _;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(C.$),o.push(C._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},F={EOF:1,parseError:Ae(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:Ae(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},"setInput"),input:Ae(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:Ae(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),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:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:Ae(function(){return this._more=!0,this},"more"),reject:Ae(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:Ae(function(t){this.unput(this.match.slice(t))},"less"),pastInput:Ae(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:Ae(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:Ae(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+e+"^"},"showPosition"),test_match:Ae(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={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)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:Ae(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:Ae(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:Ae(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:Ae(function(t){this.begin(t)},"pushState"),stateStackSize:Ae(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:Ae(function(t,e,r,n){switch(r){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:this.begin("callbackname");break;case 8:this.popState();break;case 9:this.popState(),this.begin("callbackargs");break;case 10:return 92;case 11:this.popState();break;case 12:return 93;case 13:return"MD_STR";case 14:this.popState();break;case 15:this.begin("md_string");break;case 16:return"STR";case 17:this.popState();break;case 18:this.pushState("string");break;case 19:return 81;case 20:return 99;case 21:return 82;case 22:return 101;case 23:return 83;case 24:return 84;case 25:return 94;case 26:this.begin("click");break;case 27:this.popState();break;case 28:return 85;case 29:case 30:case 31:return t.lex.firstGraph()&&this.begin("dir"),12;case 32:return 27;case 33:return 32;case 34:case 35:case 36:case 37:return 95;case 38:return this.popState(),13;case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 48:return this.popState(),14;case 49:return 118;case 50:return 119;case 51:return 120;case 52:return 121;case 53:return 102;case 54:return 108;case 55:return 44;case 56:return 58;case 57:return 42;case 58:return 8;case 59:return 103;case 60:return 112;case 61:return this.popState(),75;case 62:return this.pushState("edgeText"),73;case 63:return 116;case 64:return this.popState(),75;case 65:return this.pushState("thickEdgeText"),73;case 66:return 116;case 67:return this.popState(),75;case 68:return this.pushState("dottedEdgeText"),73;case 69:return 116;case 70:return 75;case 71:return this.popState(),51;case 72:return"TEXT";case 73:return this.pushState("ellipseText"),50;case 74:return this.popState(),53;case 75:return this.pushState("text"),52;case 76:return this.popState(),55;case 77:return this.pushState("text"),54;case 78:return 56;case 79:return this.pushState("text"),65;case 80:return this.popState(),62;case 81:return this.pushState("text"),61;case 82:return this.popState(),47;case 83:return this.pushState("text"),46;case 84:return this.popState(),67;case 85:return this.popState(),69;case 86:return 114;case 87:return this.pushState("trapText"),66;case 88:return this.pushState("trapText"),68;case 89:return 115;case 90:return 65;case 91:return 87;case 92:return"SEP";case 93:return 86;case 94:return 112;case 95:return 108;case 96:return 42;case 97:return 106;case 98:return 111;case 99:return 113;case 100:return this.popState(),60;case 101:return this.pushState("text"),60;case 102:return this.popState(),49;case 103:return this.pushState("text"),48;case 104:return this.popState(),31;case 105:return this.pushState("text"),29;case 106:return this.popState(),64;case 107:return this.pushState("text"),63;case 108:return"TEXT";case 109:return"QUOTE";case 110:return 9;case 111:return 10;case 112:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/
font-family: ${t.fontFamily};
color: ${t.nodeTextColor||t.textColor};
}
.cluster-label text {
fill: ${t.titleColor};
}
.cluster-label span {
color: ${t.titleColor};
}
.cluster-label span p {
background-color: transparent;
}
.label text,span {
fill: ${t.nodeTextColor||t.textColor};
color: ${t.nodeTextColor||t.textColor};
}
.node rect,
.node circle,
.node ellipse,
.node polygon,
.node path {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
stroke-width: 1px;
}
.rough-node .label text , .node .label text {
text-anchor: middle;
}
// .flowchart-label .text-outer-tspan {
// text-anchor: middle;
// }
// .flowchart-label .text-inner-tspan {
// text-anchor: start;
// }
.node .katex path {
fill: #000;
stroke: #000;
stroke-width: 1px;
}
.node .label {
text-align: center;
}
.node.clickable {
cursor: pointer;
}
.arrowheadPath {
fill: ${t.arrowheadColor};
}
.edgePath .path {
stroke: ${t.lineColor};
stroke-width: 2.0px;
}
.flowchart-link {
stroke: ${t.lineColor};
fill: none;
}
.edgeLabel {
background-color: ${t.edgeLabelBackground};
p {
background-color: ${t.edgeLabelBackground};
}
rect {
opacity: 0.5;
background-color: ${t.edgeLabelBackground};
fill: ${t.edgeLabelBackground};
}
text-align: center;
}
/* For html labels only */
.labelBkg {
background-color: ${Jj(t.edgeLabelBackground,.5)};
// background-color:
}
.cluster rect {
fill: ${t.clusterBkg};
stroke: ${t.clusterBorder};
stroke-width: 1px;
}
.cluster text {
fill: ${t.titleColor};
}
.cluster span {
color: ${t.titleColor};
}
/* .cluster div {
color: ${t.titleColor};
} */
div.mermaidTooltip {
position: absolute;
text-align: center;
max-width: 200px;
padding: 2px;
font-family: ${t.fontFamily};
font-size: 12px;
background: ${t.tertiaryColor};
border: 1px solid ${t.border2};
border-radius: 2px;
pointer-events: none;
z-index: 100;
}
.flowchartTitleText {
text-anchor: middle;
font-size: 18px;
fill: ${t.textColor};
}
`,"getStyles"),eH=tH}),lH={};J(lH,{diagram:()=>cH});var cH,hH,uH,dH,pH,gH,fH,mH,yH,vH,xH,bH,wH,kH,TH,EH,_H,CH,SH=t(()=>{i(),I_(),aH(),oH(),sH(),cH={parser:Qj,db:A_,renderer:Kj,styles:eH,init:Ae(t=>{t.flowchart||(t.flowchart={}),t.layout&&yc({layout:t.layout}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,yc({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}}),A_.clear(),A_.setGen("gen-2")},"init")}}),AH=t(()=>{function t(){this.yy={}}var e=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[6,8,10,20,22,24,26,27,28],n=[1,10],i=[1,11],a=[1,12],o=[1,13],s=[1,14],l=[1,15],c=[1,21],h=[1,22],u=[1,23],d=[1,24],p=[1,25],g=[6,8,10,13,15,18,19,20,22,24,26,27,28,41,42,43,44,45],f=[1,34],m=[27,28,46,47],y=[41,42,43,44,45],v=[17,34],x=[1,54],b=[1,53],w=[17,34,36,38],n={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,":":13,role:14,BLOCK_START:15,attributes:16,BLOCK_STOP:17,SQS:18,SQE:19,title:20,title_value:21,acc_title:22,acc_title_value:23,acc_descr:24,acc_descr_value:25,acc_descr_multiline_value:26,ALPHANUM:27,ENTITY_NAME:28,attribute:29,attributeType:30,attributeName:31,attributeKeyTypeList:32,attributeComment:33,ATTRIBUTE_WORD:34,attributeKeyType:35,COMMA:36,ATTRIBUTE_KEY:37,COMMENT:38,cardinality:39,relType:40,ZERO_OR_ONE:41,ZERO_OR_MORE:42,ONE_OR_MORE:43,ONLY_ONE:44,MD_PARENT:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:":",15:"BLOCK_START",17:"BLOCK_STOP",18:"SQS",19:"SQE",20:"title",21:"title_value",22:"acc_title",23:"acc_title_value",24:"acc_descr",25:"acc_descr_value",26:"acc_descr_multiline_value",27:"ALPHANUM",28:"ENTITY_NAME",34:"ATTRIBUTE_WORD",36:"COMMA",37:"ATTRIBUTE_KEY",38:"COMMENT",41:"ZERO_OR_ONE",42:"ZERO_OR_MORE",43:"ONE_OR_MORE",44:"ONLY_ONE",45:"MD_PARENT",46:"NON_IDENTIFYING",47:"IDENTIFYING",48:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,4],[9,3],[9,1],[9,7],[9,6],[9,4],[9,2],[9,2],[9,2],[9,1],[11,1],[11,1],[16,1],[16,2],[29,2],[29,3],[29,3],[29,4],[30,1],[31,1],[32,1],[32,3],[35,1],[33,1],[12,3],[39,1],[39,1],[39,1],[39,1],[39,1],[40,1],[40,1],[14,1],[14,1],[14,1]],performAction:Ae(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 1:break;case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:n.addEntity(a[s-4]),n.addEntity(a[s-2]),n.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 9:n.addEntity(a[s-3]),n.addAttributes(a[s-3],a[s-1]);break;case 10:n.addEntity(a[s-2]);break;case 11:n.addEntity(a[s]);break;case 12:n.addEntity(a[s-6],a[s-4]),n.addAttributes(a[s-6],a[s-1]);break;case 13:n.addEntity(a[s-5],a[s-3]);break;case 14:n.addEntity(a[s-3],a[s-1]);break;case 15:case 16:this.$=a[s].trim(),n.setAccTitle(this.$);break;case 17:case 18:this.$=a[s].trim(),n.setAccDescription(this.$);break;case 19:case 43:this.$=a[s];break;case 20:case 41:case 42:this.$=a[s].replace(/"/g,"");break;case 21:case 29:this.$=[a[s]];break;case 22:a[s].push(a[s-1]),this.$=a[s];break;case 23:this.$={attributeType:a[s-1],attributeName:a[s]};break;case 24:this.$={attributeType:a[s-2],attributeName:a[s-1],attributeKeyTypeList:a[s]};break;case 25:this.$={attributeType:a[s-2],attributeName:a[s-1],attributeComment:a[s]};break;case 26:this.$={attributeType:a[s-3],attributeName:a[s-2],attributeKeyTypeList:a[s-1],attributeComment:a[s]};break;case 27:case 28:case 31:this.$=a[s];break;case 30:a[s-2].push(a[s]),this.$=a[s-2];break;case 32:this.$=a[s].replace(/"/g,"");break;case 33:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 34:this.$=n.Cardinality.ZERO_OR_ONE;break;case 35:this.$=n.Cardinality.ZERO_OR_MORE;break;case 36:this.$=n.Cardinality.ONE_OR_MORE;break;case 37:this.$=n.Cardinality.ONLY_ONE;break;case 38:this.$=n.Cardinality.MD_PARENT;break;case 39:this.$=n.Identification.NON_IDENTIFYING;break;case 40:this.$=n.Identification.IDENTIFYING}},"anonymous"),table:[{3:1,4:[1,2]},{1
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),o.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],C.$=a[a.length-E],C._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(C._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),typeof(_=this.performAction.apply(C,[l,h,c,f.yy,k[1],a,o].concat(p)))<"u")return _;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(C.$),o.push(C._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},i={EOF:1,parseError:Ae(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:Ae(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},"setInput"),input:Ae(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:Ae(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),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:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:Ae(function(){return this._more=!0,this},"more"),reject:Ae(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:Ae(function(t){this.unput(this.match.slice(t))},"less"),pastInput:Ae(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:Ae(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:Ae(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+e+"^"},"showPosition"),test_match:Ae(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={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)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:Ae(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:Ae(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:Ae(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:Ae(function(t){this.begin(t)},"pushState"),stateStackSize:Ae(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:Ae(function(t,e,r,n){switch(r){case 0:return this.begin("acc_title"),22;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),24;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 10;case 8:break;case 9:return 8;case 10:return 28;case 11:return 48;case 12:return 4;case 13:return this.begin("block"),15;case 14:return 36;case 15:break;case 16:return 37;case 17:case 18:return 34;case 19:return 38;case 20:break;case 21:return this.popState(),17;case 22:return e.yytext[0];case 23:return 18;case 24:return 19;case 25:return 41;case 26:case 27:case 28:return 43;case 29:case 30:return 41;case 31:case 32:case 33:case 34:case 35:return 42;case 36:return 43;case 37:return 42;case 38:return 43;case 39:case 40:case 41:case 42:return 44;case 43:return 41;case 44:return 42;case 45:return 43;case 46:return 45;case 47:return 46;case 48:case 49:return 47;case 50:case 51:case 52:return 46;case 53:return 27;case 54:return e.yytext[0];case 55:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:,)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[\*A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[14,15,16,17,18,19,20,21,22],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55],inclusive:!0}}};n.lexer=i,Ae(t,"Parser"),(hH=new((t.prototype=n).Parser=t)).parser=hH,uH=hH}),LH=t(()=>{e(),i(),fh(),dH=new Map,pH=[],gH={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},fH={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},mH=Ae(function(t,e=void 0){return dH.has(t)?!dH.get(t).alias&&e&&(dH.get(t).alias=e,R.info(`Add alias '${e}' to entity '${t}'`)):(dH.set(t,{attributes:[],alias:e}),R.info("Added new entity :",t)),dH.get(t)},"addEntity"),yH=Ae(()=>dH,"getEntities"),vH=Ae(function(t,e){let r=mH(t),n;for(n=e.length-1;0<=n;n--)r.attributes.push(e[n]),R.debug("Added attribute ",e[n].attributeName)},"addAttributes"),xH=Ae(function(t,e,r,n){pH.push(t={entityA:t,roleA:e,entityB:r,relSpec:n}),R.debug("Added new relationship :",t
.entityBox {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
}
.attributeBoxOdd {
fill: ${t.attributeBackgroundColorOdd};
stroke: ${t.nodeBorder};
}
.attributeBoxEven {
fill: ${t.attributeBackgroundColorEven};
stroke: ${t.nodeBorder};
}
.relationshipLabelBox {
fill: ${t.tertiaryColor};
opacity: 0.7;
background-color: ${t.tertiaryColor};
rect {
opacity: 0.5;
}
}
.relationshipLine {
stroke: ${t.lineColor};
}
.entityTitleText {
text-anchor: middle;
font-size: 18px;
fill: ${t.textColor};
}
#MD_PARENT_START {
fill: #f5f5f5 !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#MD_PARENT_END {
fill: #f5f5f5 !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
`,"getStyles"),vW=yW}),wW={};J(wW,{diagram:()=>kW});var kW,TW=t(()=>{AH(),LH(),xW(),bW(),kW={parser:uH,db:kH,renderer:mW,styles:vW}});function EW(t){return"object"==typeof t&&null!==t&&"string"==typeof t.$type}function _W(t){return"object"==typeof t&&null!==t&&"string"==typeof t.$refText}function CW(t){return"object"==typeof t&&null!==t&&"string"==typeof t.name&&"string"==typeof t.type&&"string"==typeof t.path}function SW(t){return"object"==typeof t&&null!==t&&EW(t.container)&&_W(t.reference)&&"string"==typeof t.message}function AW(t){return"object"==typeof t&&null!==t&&Array.isArray(t.content)}function LW(t){return"object"==typeof t&&null!==t&&"object"==typeof t.tokenType}function NW(t){return AW(t)&&"string"==typeof t.fullText}var IW,MW=t(()=>{Ae(EW,"isAstNode"),Ae(_W,"isReference"),Ae(CW,"isAstNodeDescription"),Ae(SW,"isLinkingError"),IW=class{static{Ae(this,"AbstractAstReflection")}constructor(){this.subtypes={},this.allSubtypes={}}isInstance(t,e){return EW(t)&&this.isSubtype(t.$type,e)}isSubtype(t,e){var r,n;return t===e||(void 0!==(n=(r=(r=this.subtypes[t])||(this.subtypes[t]={}))[e])?n:(n=this.computeIsSubtype(t,e),r[e]=n))}getAllSubTypes(t){var e=this.allSubtypes[t];if(e)return e;var r,n=[];for(r of this.getAllTypes())this.isSubtype(r,t)&&n.push(r);return this.allSubtypes[t]=n}},Ae(AW,"isCompositeCstNode"),Ae(LW,"isLeafCstNode"),Ae(NW,"isRootCstNode")});function RW(t){return"string"==typeof t?t:"u"<typeof t?"undefined":"function"==typeof t.toString?t.toString():Object.prototype.toString.call(t)}function DW(t){return!!t&&"function"==typeof t[Symbol.iterator]}function OW(...r){if(1===r.length){let e=r[0];if(e instanceof PW)return e;if(DW(e))return new PW(()=>e[Symbol.iterator](),t=>t.next());if("number"==typeof e.length)return new PW(()=>({index:0}),t=>t.index<e.length?{done:!1,value:e[t.index++]}:FW)}return 1<r.length?new PW(()=>({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){var e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}if(t.array){if(t.arrIndex<t.array.length)return{done:!1,value:t.array[t.arrIndex++]};t.array=void 0,t.arrIndex=0}}while(t.collIndex<r.length&&(DW(e=r[t.collIndex++])?t.iterator=e[Symbol.iterator]():e&&"number"==typeof e.length&&(t.array=e)),t.iterator||t.array||t.collIndex<r.length);return FW}):BW}var PW,BW,FW,$W,zW,GW=t(()=>{function t(t){return t.reduce((t,e)=>t+e,0)}function e(t){return t.reduce((t,e)=>t*e,0)}function r(t){return t.reduce((t,e)=>Math.min(t,e))}function n(t){return t.reduce((t,e)=>Math.max(t,e))}var i;PW=class a{static{Ae(this,"StreamImpl")}constructor(t,e){this.startFn=t,this.nextFn=e}iterator(){let t={state:this.startFn(),next:Ae(()=>this.nextFn(t.state),"next"),[Symbol.iterator]:()=>t};return t}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let t=this.iterator(),e=0,r=t.next();for(;!r.done;)e++,r=t.next();return e}toArray(){for(var t,e=[],r=this.iterator();void 0!==(t=r.next()).value&&e.push(t.value),!t.done;);return e}toSet(){return new Set(this)}toMap(e,r){var t=this.map(t=>[e?e(t):t,r?r(t):t]);return new Map(t)}toString(){return this.join()}concat(t){let r=t[Symbol.iterator]();return new a(()=>({first:this.startFn(),firstDone:!1}),t=>{let e;if(!t.firstDone){do{if(!(e=this.nextFn(t.first)).done)return e}while(!e.done);t.firstDone=!0}do{if(!(e=r.next()).done)return e}while(!e.done);return FW})}join(t=","){let e=this.iterator(),r="",n,i=!1;for(;(n=e.next()).done||(i&&(r+=t),r+=RW(n.value)),i=!0,!n.done;);return r}indexOf(t,e=0){let r=this.iterator(),n=0,i=r.next();for(;!i.done;){if(n>=e&&i.value===t)return n;i=r.next(),n++}return-1}every(t){let e=this.iterator(),r=e.next();for(;!r.done;){if(!t(r.value))return!1;r=e.next()}return!0}some(t){let e=this.iterator(),r=e.next();for(;!r.done;){if(t(r.value))return!0;r=e.next()}return!1}forEach(t){let e=this.iterator(),r=0,n=e.next();for(;!n.done;)t(n.value,r),n=e.next(),r++}map(r){return new a(this.startFn,t=>{var{done:t,value:e}=this.nextFn(t);return t?FW:{done:!1,value:r(e)}})}filter(r){return new a(this.startFn,t=>{var e;do{if(!(e=this.nextFn(t)).done&&r(e.value))
`),wK("\r"),wK("\t"),wK("\v"),wK("\t"),wK(" "),wK(""),wK(" "),wK(""),wK(""),wK(""),wK(""),wK(""),wK(""),wK(""),wK(""),wK(""),wK(""),wK("\u2028"),wK("\u2029"),wK(""),wK(""),wK(" "),wK("\ufeff")]}),BK=t(()=>{OK(),PK(),NK=/[0-9a-fA-F]/,IK=/[0-9]/,MK=/[1-9]/,RK=class{static{Ae(this,"RegExpParser")}constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(t){this.idx=t.idx,this.input=t.input,this.groupIdx=t.groupIdx}pattern(t){this.idx=0,this.input=t,this.groupIdx=0,this.consumeChar("/");for(var e=this.disjunction(),r=(this.consumeChar("/"),{type:"Flags",loc:{begin:this.idx,end:t.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1});this.isRegExpFlag();)switch(this.popChar()){case"g":TK(r,"global");break;case"i":TK(r,"ignoreCase");break;case"m":TK(r,"multiLine");break;case"u":TK(r,"unicode");break;case"y":TK(r,"sticky")}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:r,value:e,loc:this.loc(0)}}disjunction(){var t=[],e=this.idx;for(t.push(this.alternative());"|"===this.peekChar();)this.consumeChar("|"),t.push(this.alternative());return{type:"Disjunction",value:t,loc:this.loc(e)}}alternative(){for(var t=[],e=this.idx;this.isTerm();)t.push(this.term());return{type:"Alternative",value:t,loc:this.loc(e)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){var e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let t;switch(this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead"}EK(t);var r=this.disjunction();return this.consumeChar(")"),{type:t,value:r,loc:this.loc(e)}}return _K()}quantifier(t=!1){let e,r=this.idx;switch(this.popChar()){case"*":e={atLeast:0,atMost:1/0};break;case"+":e={atLeast:1,atMost:1/0};break;case"?":e={atLeast:0,atMost:1};break;case"{":var n=this.integerIncludingZero();switch(this.popChar()){case"}":e={atLeast:n,atMost:n};break;case",":e=this.isDigit()?{atLeast:n,atMost:this.integerIncludingZero()}:{atLeast:n,atMost:1/0},this.consumeChar("}")}if(!0===t&&void 0===e)return;EK(e)}if((!0!==t||void 0!==e)&&EK(e))return"?"===this.peekChar(0)?(this.consumeChar("?"),e.greedy=!1):e.greedy=!0,e.type="Quantifier",e.loc=this.loc(r),e}atom(){let t,e=this.idx;switch(this.peekChar()){case".":t=this.dotAll();break;case"\\":t=this.atomEscape();break;case"[":t=this.characterClass();break;case"(":t=this.group()}return EK(t=void 0===t&&this.isPatternCharacter()?this.patternCharacter():t)?(t.loc=this.loc(e),this.isQuantifier()&&(t.quantifier=this.quantifier()),t):_K()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[wK(`
`),wK("\r"),wK("\u2028"),wK("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let t,e=!1;switch(this.popChar()){case"d":t=SK;break;case"D":t=SK,e=!0;break;case"s":t=LK;break;case"S":t=LK,e=!0;break;case"w":t=AK;break;case"W":t=AK,e=!0}return EK(t)?{type:"Set",value:t,complement:e}:_K()}controlEscapeAtom(){let t;switch(this.popChar()){case"f":t=wK("\f");break;case"n":t=wK(`
`);break;case"r":t=wK("\r");break;case"t":t=wK("\t");break;case"v":t=wK("\v")}return EK(t)?{type:"Character",value:t}:_K()}controlLetterEscapeAtom(){this.consumeChar("c");var t=this.popChar();if(!1===/[a-zA-Z]/.test(t))throw Error("Invalid ");return{type:"Character",value:t.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:wK("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:wK(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case`
`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:wK(this.popChar())}}}characterClass(){let t=[],e=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),e=!0);this.isClassAtom();){var r=this.classAtom();if(r.type,CK(r)&&this.isRangeDash()){this.consumeChar("-");var n=this.classAtom();if(n.type,CK(n)){if(n.value<r.value)throw Error("Range out of order in character class");t.push({from:r.value,to:n.value})}else kK(r.value,t),t.push(wK("-")),kK(n.value,t)}else kK(r.value,t)}return this.consumeChar("]"),{type:"Set",complement:e,value:t}}classAtom(){switch(this.peekChar()){case"]":case`
`:case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:wK("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let t=!0;"?"===(this.consumeChar("("),this.peekChar(0))?(this.consumeChar("?"),this.consumeChar(":"),t=!1):this.groupIdx++;var e=this.disjunction(),e=(this.consumeChar(")"),{type:"Group",capturing:t,value:e});return t&&(e.idx=this.groupIdx),e}positiveInteger(){let t=this.popChar();if(!1===MK.test(t))throw Error("Expecting a positive integer");for(;IK.test(this.peekChar(0));)t+=this.popChar();return parseInt(t,10)}integerIncludingZero(){let t=this.popChar();if(!1===IK.test(t))throw Error("Expecting an integer");for(;IK.test(this.peekChar(0));)t+=this.popChar();return parseInt(t,10)}patternCharacter(){var t=this.popChar();switch(t){case`
`:case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:wK(t)}}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}}isRangeDash(){return"-"===this.peekChar()&&this.isClassAtom(1)}isDigit(){return IK.test(this.peekChar(0))}isClassAtom(t=0){switch(this.peekChar(t)){case"]":case`
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return"?"===this.peekChar(1)&&("="===this.peekChar(2)||"!"===this.peekChar(2));default:return!1}}isQuantifier(){var t=this.saveState();try{return void 0!==this.quantifier(!0)}catch{return!1}finally{this.restoreState(t)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case`
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(e){let r="";for(let t=0;t<e;t++){var n=this.popChar();if(!1===NK.test(n))throw Error("Expecting a HexDecimal digits");r+=n}return{type:"Character",value:parseInt(r,16)}}peekChar(t=0){return this.input[this.idx+t]}popChar(){var t=this.peekChar(0);return this.consumeChar(void 0),t}consumeChar(t){if(void 0!==t&&this.input[this.idx]!==t)throw Error("Expected: '"+t+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(t){return{begin:t,end:this.idx}}}}),FK=t(()=>{DK=class{static{Ae(this,"BaseRegExpVisitor")}visitChildren(t){for(var e in t){var r=t[e];t.hasOwnProperty(e)&&(void 0!==r.type?this.visit(r):Array.isArray(r)&&r.forEach(t=>{this.visit(t)},this))}}visit(t){switch(t.type){case"Pattern":this.visitPattern(t);break;case"Flags":this.visitFlags(t);break;case"Disjunction":this.visitDisjunction(t);break;case"Alternative":this.visitAlternative(t);break;case"StartAnchor":this.visitStartAnchor(t);break;case"EndAnchor":this.visitEndAnchor(t);break;case"WordBoundary":this.visitWordBoundary(t);break;case"NonWordBoundary":this.visitNonWordBoundary(t);break;case"Lookahead":this.visitLookahead(t);break;case"NegativeLookahead":this.visitNegativeLookahead(t);break;case"Character":this.visitCharacter(t);break;case"Set":this.visitSet(t);break;case"Group":this.visitGroup(t);break;case"GroupBackReference":this.visitGroupBackReference(t);break;case"Quantifier":this.visitQuantifier(t)}this.visitChildren(t)}visitPattern(t){}visitFlags(t){}visitDisjunction(t){}visitAlternative(t){}visitStartAnchor(t){}visitEndAnchor(t){}visitWordBoundary(t){}visitNonWordBoundary(t){}visitLookahead(t){}visitNegativeLookahead(t){}visitCharacter(t){}visitSet(t){}visitGroup(t){}visitGroupBackReference(t){}visitQuantifier(t){}}}),$K=t(()=>{BK(),FK()}),zK={};function GK(t){try{t=`/${t="string"!=typeof t?t.source:t}/`;var e,r=XK.pattern(t),n=[];for(e of r.value.value)ZK.reset(t),ZK.visit(e),n.push({start:ZK.startRegexp,end:ZK.endRegex});return n}catch{return[]}}function UK(t){try{return t=(t="string"==typeof t?new RegExp(t):t).toString(),ZK.reset(t),ZK.visit(XK.pattern(t)),ZK.multiline}catch{return!1}}function qK(t){return("string"==typeof t?new RegExp(t):t).test(" ")}function YK(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function jK(t){return Array.prototype.map.call(t,t=>/\w/.test(t)?`[${t.toLowerCase()}${t.toUpperCase()}]`:YK(t)).join("")}function HK(t,e){return t=WK(t),!!(e=e.match(t))&&0<e[0].length}function WK(t){let i=t="string"==typeof t?new RegExp(t):t,a=t.source,o=0;function s(){let e="",t;function r(t){e+=a.substr(o,t),o+=t}function n(t){e+="(?:"+a.substr(o,t)+"|$)",o+=t}for(Ae(r,"appendRaw"),Ae(n,"appendOptional");o<a.length;)switch(a[o]){case"\\":switch(a[o+1]){case"c":n(3);break;case"x":n(4);break;case"u":i.unicode?"{"===a[o+2]?n(a.indexOf("}",o)-o+1):n(6):n(2);break;case"p":case"P":i.unicode?n(a.indexOf("}",o)-o+1):n(2);break;case"k":n(a.indexOf(">",o)-o+1);break;default:n(2)}break;case"[":(t=/\[(?:\\.|.)*?\]/g).lastIndex=o,n((t=t.exec(a)||[])[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":r(1);break;case"{":(t=/\{\d+,?\d*\}/g).lastIndex=o,(t=t.exec(a))?r(t[0].length):n(1);break;case"(":if("?"===a[o+1])switch(a[o+2]){case":":e+="(?:",o+=3,e+=s()+"|$)";break;case"=":e+="(?=",o+=3,e+=s()+")";break;case"!":t=o,o+=3,s(),e+=a.substr(t,o-t);break;case"<":switch(a[o+3]){case"=":case"!":t=o,o+=4,s(),e+=a.substr(t,o-t);break;default:r(a.indexOf(">",o)-o+1),e+=s()+"|$)"}}else r(1),e+=s()+"|$)";break;case")":return++o,e;default:n(1)}return e}return Ae(s,"process"),new RegExp(s(),t.flags)}J(zK,{NEWLINE_REGEXP:()=>VK,escapeRegExp:()=>YK,getCaseInsensitivePattern:()=>jK,getTerminalParts:()=>GK,isMultilineComment:()=>UK,isWhitespace:()=>qK,partialMatches:()=>HK,partialRegExp:()=>WK});var VK,XK,KK,ZK,QK=t(()=>{$K(),VK=/\r?\n/gm,XK=new RK,KK=class extends DK{static{Ae(this,"TerminalRegExpVisitor")}constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],t
`||(this.multiline=!0),t.quantifier?(this.isStarting=!1,this.endRegexpStack=[]):(t=YK(e),this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t))}visitSet(t){var e;this.multiline||(e=this.regex.substring(t.loc.begin,t.loc.end),e=new RegExp(e),this.multiline=!!`
`.match(e)),t.quantifier?(this.isStarting=!1,this.endRegexpStack=[]):(e=this.regex.substring(t.loc.begin,t.loc.end),this.endRegexpStack.push(e),this.isStarting&&(this.startRegexp+=e))}visitChildren(t){"Group"===t.type&&t.quantifier||super.visitChildren(t)}},ZK=new KK,Ae(GK,"getTerminalParts"),Ae(UK,"isMultilineComment"),Ae(qK,"isWhitespace"),Ae(YK,"escapeRegExp"),Ae(jK,"getCaseInsensitivePattern"),Ae(HK,"partialMatches"),Ae(WK,"partialRegExp")}),JK={};function tZ(t){return t.rules.find(t=>BV(t)&&t.entry)}function eZ(t){return t.rules.filter(t=>UV(t)&&t.hidden)}function rZ(t,e){var r,n=new Set,i=tZ(t);if(!i)return new Set(t.rules);for(r of[i].concat(eZ(t)))nZ(r,n,e);var a,o=new Set;for(a of t.rules)(n.has(a.name)||UV(a)&&a.hidden)&&o.add(a);return o}function nZ(t,e,r){e.add(t.name),dK(t).forEach(t=>{(rX(t)||r&&aX(t))&&(t=t.rule.ref)&&!e.has(t.name)&&nZ(t,e,r)})}function iZ(t){return t.terminal||(t.type.ref?pZ(t.type.ref)?.terminal:void 0)}function aZ(t){return t.hidden&&!SZ(t).test(" ")}function oZ(t,e){return t&&e?lZ(t,e,t.astNode,!0):[]}function sZ(t,e,r){return t&&e&&0!==(e=lZ(t,e,t.astNode,!0)).length?e[r=void 0!==r?Math.max(0,Math.min(r,e.length-1)):0]:void 0}function lZ(t,e,r,n){return!n&&(n=sK(t.grammarSource,VV))&&n.feature===e?[t]:AW(t)&&t.astNode===r?t.content.flatMap(t=>lZ(t,e,r,!1)):[]}function cZ(t,e){return t?uZ(t,e,t?.astNode):[]}function hZ(t,e,r){return t&&0!==(e=uZ(t,e,t?.astNode)).length?e[r=void 0!==r?Math.max(0,Math.min(r,e.length-1)):0]:void 0}function uZ(t,e,r){if(t.astNode!==r)return[];if(JV(t.grammarSource)&&t.grammarSource.value===e)return[t];for(var n,i,a=qW(t).iterator(),o=[];(i=a.next()).done||((n=i.value).astNode===r?JV(n.grammarSource)&&n.grammarSource.value===e&&o.push(n):a.prune()),!i.done;);return o}function dZ(t){for(var e=t.astNode;e===(null==(r=t.container)?void 0:r.astNode);){var r=sK(t.grammarSource,VV);if(r)return r;t=t.container}}function pZ(t){let e=t;return NV(e)&&(HV(e.$container)?e=e.$container.$container:BV(e.$container)?e=e.$container:uV(e.$container)),gZ(t,e,new Map)}function gZ(n,t,i){var e,r;function a(t,e){let r;return sK(t,VV)||(r=gZ(e,e,i)),i.set(n,r),r}if(Ae(a,"go"),i.has(n))return i.get(n);i.set(n,void 0);for(r of dK(t)){if(VV(r)&&"name"===r.feature.toLowerCase())return i.set(n,r),r;if(rX(r)&&BV(r.rule.ref))return a(r,r.rule.ref);if(zV(r)&&null!=(e=r.typeRef)&&e.ref)return a(r,r.typeRef.ref)}}function fZ(e){var t=e.$container;if(QV(t)){var r=t.elements;for(let t=r.indexOf(e)-1;0<=t;t--){var n=r[t];if(HV(n))return n;if(n=dK(r[t]).find(HV))return n}}if(kV(t))return fZ(t)}function mZ(t,e){return"?"===t||"*"===t||QV(e)&&!!e.guardCondition}function yZ(t){return"*"===t||"+"===t}function vZ(t){return"+="===t}function xZ(t){return bZ(t,new Set)}function bZ(t,e){if(e.has(t))return!0;e.add(t);for(var r of dK(t))if(rX(r)){if(!r.rule.ref||BV(r.rule.ref)&&!bZ(r.rule.ref,e))return!1}else{if(VV(r))return!1;if(HV(r))return!1}return!!t.definition}function wZ(t){return kZ(t.type,new Set)}function kZ(t,e){return!!e.has(t)||(e.add(t),!EV(t)&&!FV(t)&&(jV(t)?t.types.every(t=>kZ(t,e)):!!zV(t)&&(void 0!==t.primitiveType||void 0!==t.stringType||void 0!==t.typeRef&&!!qV(t=t.typeRef.ref)&&kZ(t.type,e))))}function TZ(t){return t.inferredType?t.inferredType.name:t.dataType||(t.returnType&&(t=t.returnType.ref)&&(BV(t)||IV(t)||qV(t))?t.name:void 0)}function EZ(t){if(BV(t))return xZ(t)||null==(e=TZ(t))?t.name:e;if(IV(t)||qV(t)||$V(t))return t.name;if(HV(t)){var e=_Z(t);if(e)return e}else if(NV(t))return t.name;throw new Error("Cannot get name of Unknown Type")}function _Z(t){var e;return t.inferredType?t.inferredType.name:null!=(e=t.type)&&e.ref?EZ(t.type.ref):void 0}function CZ(t){var e;return UV(t)?null!=(e=null==(e=t.type)?void 0:e.name)?e:"string":xZ(t)||null==(e=TZ(t))?t.name:e}function SZ(t){var t=AZ(t.definition,e={s:!1,i:!1,u:!1}),e=Object.entries(e).filter(([,t])=>t).map(([t])=>t).join("");return new RegExp(t,e)}function AZ(t,e){if(nX(t))return LZ(t);if(iX(t))return NZ(t);if(XV(t))return RZ(t);if(aX(t)){var r=t.rule.ref;if(r)return OZ(AZ(r.definition),{cardinality:t.cardinality,lookahead:t
Complement Sets cannot be automatically optimized.
This will disable the lexer's first char optimizations.
See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`):(e=e?`
This will disable the lexer's first char optimizations.
See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`:"",GZ(`${HQ}
Failed parsing: < ${t.toString()} >
Using the @chevrotain/regexp-to-ast library
Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+e))}return[]}function $Q(e,i,a){switch(e.type){case"Disjunction":for(let t=0;t<e.value.length;t++)$Q(e.value[t],i,a);break;case"Alternative":var r=e.value;for(let t=0;t<r.length;t++){var n=r[t];switch(n.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}var o=n;switch(o.type){case"Character":zQ(o.value,i,a);break;case"Set":if(!0===o.complement)throw Error(jQ);v(o.value,e=>{if("number"==typeof e)zQ(e,i,a);else{var r=e;if(!0===a)for(let t=r.from;t<=r.to;t++)zQ(t,i,a);else{for(let t=r.from;t<=r.to&&t<NJ;t++)zQ(t,i,a);if(r.to>=NJ){var e=r.from>=NJ?r.from:NJ,t=r.to,e=wJ(e),n=wJ(t);for(let t=e;t<=n;t++)i[t]=t}}}});break;case"Group":$Q(o.value,i,a);break;default:throw Error("Non Exhaustive Match")}if(n=void 0!==o.quantifier&&0===o.quantifier.atLeast,"Group"===o.type&&!1===qQ(o)||"Group"!==o.type&&0==n)break}break;default:throw Error("non exhaustive match!")}return u$(i)}function zQ(t,e,r){var n=wJ(t);e[n]=n,!0===r&&GQ(t,e)}function GQ(t,e){var r=(t=String.fromCharCode(t)).toUpperCase();r!==t?e[r=wJ(r.charCodeAt(0))]=r:(r=t.toLowerCase())!==t&&(e[t=wJ(r.charCodeAt(0))]=t)}function UQ(t,r){return TF(t.value,t=>{if("number"==typeof t)return f$(r,t);{let e=t;return void 0!==TF(r,t=>e.from<=t&&t<=e.to)}})}function qQ(t){var e=t.quantifier;return!(!e||0!==e.atLeast)||!!t.value&&(Zk(t.value)?lF(t.value,qQ):qQ(t.value))}function YQ(e,t){var r,n;return t instanceof RegExp?(r=RQ(t),(n=new WQ(e)).visit(r),n.found):void 0!==TF(t,t=>f$(e,t.charCodeAt(0)))}var jQ,HQ,WQ,VQ=t(()=>{$K(),XG(),VZ(),BQ(),MJ(),jQ="Complement Sets are not supported for first char optimization",HQ=`Unable to use "first char" lexer optimizations:
`,Ae(FQ,"getOptimizedStartCodesIndices"),Ae($Q,"firstCharOptimizedIndices"),Ae(zQ,"addOptimizedIdxToResult"),Ae(GQ,"handleIgnoreCase"),Ae(UQ,"findCode"),Ae(qQ,"isWholeOptional"),WQ=class extends DK{static{Ae(this,"CharCodeFinder")}constructor(t){super(),this.targetCharCodes=t,this.found=!1}visitChildren(t){if(!0!==this.found){switch(t.type){case"Lookahead":return void this.visitLookahead(t);case"NegativeLookahead":return void this.visitNegativeLookahead(t)}super.visitChildren(t)}}visitCharacter(t){f$(this.targetCharCodes,t.value)&&(this.found=!0)}visitSet(t){t.complement?void 0===UQ(t,this.targetCharCodes)&&(this.found=!0):void 0!==UQ(t,this.targetCharCodes)&&(this.found=!0)}},Ae(YQ,"canMatchCharCode")});function XQ(t,i){var e=(i=SB(i,{useSticky:CJ,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
`],tracer:Ae((t,e)=>e(),"tracer")})).tracer;e("initCharCodeToOptimizedIndexMap",()=>{kJ()});let r,n=(e("Reject Lexer.NA",()=>{r=hG(t,t=>t[TJ]===ZJ.NA)}),!1),a;e("Transform Patterns",()=>{n=!1,a=x(r,t=>{var e,t=t[TJ];if(L$(t))return 1!==(e=t.source).length||"^"===e||"$"===e||"."===e||t.ignoreCase?2!==e.length||"\\"!==e[0]||f$(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],e[1])?(i.useSticky?uJ:hJ)(t):e[1]:e;if(C5(t))return n=!0,{exec:t};if("object"==typeof t)return n=!0,t;if("string"==typeof t)return 1===t.length?t:(e=t.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),t=new RegExp(e),(i.useSticky?uJ:hJ)(t));throw Error("non exhaustive match")})});let o,s,l,c,h;e("misc mapping",()=>{o=x(r,t=>t.tokenTypeIdx),s=x(r,t=>{if((t=t.GROUP)!==ZJ.SKIPPED){if(a$(t))return t;if(R$(t))return!1;throw Error("non exhaustive match")}}),l=x(r,t=>{if(t=t.LONGER_ALT)return Zk(t)?x(t,t=>x$(r,t)):[x$(r,t)]}),c=x(r,t=>t.PUSH_MODE),h=x(r,t=>b(t,"POP_MODE"))});let u;e("Line Terminator Handling",()=>{let e=xJ(i.lineTerminatorCharacters);u=x(r,t=>!1),"onlyOffset"!==i.positionTracking&&(u=x(r,t=>b(t,"LINE_BREAKS")?!!t.LINE_BREAKS:!1===yJ(t,e)&&YQ(e,t.PATTERN)))});let d,p,g,f,m=(e("Misc Mapping #2",()=>{d=x(r,fJ),p=x(a,mJ),g=sG(r,(t,e)=>(e=e.GROUP,a$(e)&&e!==ZJ.SKIPPED&&(t[e]=[]),t),{}),f=x(a,(t,e)=>({pattern:a[e],longerAlt:l[e],canLineTerminator:u[e],isCustom:d[e],short:p[e],group:s[e],push:c[e],pop:h[e],tokenTypeIdx:o[e],tokenType:r[e]}))}),!0),y=[];return i.safeMode||e("First Char Optimization",()=>{y=sG(r,(r,t,n)=>{if("string"==typeof t.PATTERN){var e=wJ(t.PATTERN.charCodeAt(0));bJ(r,e,f[n])}else if(Zk(t.START_CHARS_HINT)){let e;v(t.START_CHARS_HINT,t=>{t=wJ("string"==typeof t?t.charCodeAt(0):t),e!==t&&(e=t,bJ(r,t,f[n]))})}else L$(t.PATTERN)?t.PATTERN.unicode?(m=!1,i.ensureOptimizations&&GZ(`${HQ} Unable to analyze < ${t.PATTERN.toString()} > pattern.
The regexp unicode flag is not currently supported by the regexp-to-ast library.
This will disable the lexer's first char optimizations.
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`)):(e=FQ(t.PATTERN,i.ensureOptimizations),E$(e)&&(m=!1),v(e,t=>{bJ(r,t,f[n])})):(i.ensureOptimizations&&GZ(`${HQ} TokenType: <${t.name}> is using a custom token pattern without providing <start_chars_hint> parameter.
This will disable the lexer's first char optimizations.
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),m=!1);return r},[])}),{emptyGroups:g,patternIdxToConfig:f,charCodeToPatternIdxToConfig:y,hasCustom:n,canBeOptimized:m}}function KQ(t,e){let r=[],n=QQ(t);r=r.concat(n.errors);var i=(t=JQ(n.valid)).valid;return r=(r=(r=(r=(r=r.concat(t.errors)).concat(ZQ(i))).concat(aJ(i))).concat(oJ(i,e))).concat(sJ(i))}function ZQ(t){let e=[],r=gF(t,t=>L$(t[TJ]));return e=(e=(e=(e=(e=e.concat(tJ(r))).concat(rJ(r))).concat(nJ(r))).concat(iJ(r))).concat(eJ(r))}function QQ(t){var e=gF(t,t=>!b(t,TJ));return{errors:x(e,t=>({message:"Token Type: ->"+t.name+"<- missing static 'PATTERN' property",type:XJ.MISSING_PATTERN,tokenTypes:[t]})),valid:BB(t,e)}}function JQ(t){var e=gF(t,t=>(t=t[TJ],!(L$(t)||C5(t)||b(t,"exec")||a$(t))));return{errors:x(e,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:XJ.INVALID_PATTERN,tokenTypes:[t]})),valid:BB(t,e)}}function tJ(t){class n extends DK{static{Ae(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(t){this.found=!0}}return t=gF(t,t=>{t=t.PATTERN;try{var e=RQ(t),r=new n;return r.visit(e),r.found}catch{return SJ.test(t.source)}}),x(t,t=>({message:`Unexpected RegExp Anchor Error:
Token Type: ->`+t.name+`<- static 'PATTERN' cannot contain end of input anchor '$'
See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:XJ.EOI_ANCHOR_FOUND,tokenTypes:[t]}))}function eJ(t){return t=gF(t,t=>t.PATTERN.test("")),x(t,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' must not match an empty string",type:XJ.EMPTY_MATCH_PATTERN,tokenTypes:[t]}))}function rJ(t){class n extends DK{static{Ae(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(t){this.found=!0}}return t=gF(t,t=>{t=t.PATTERN;try{var e=RQ(t),r=new n;return r.visit(e),r.found}catch{return AJ.test(t.source)}}),x(t,t=>({message:`Unexpected RegExp Anchor Error:
Token Type: ->`+t.name+`<- static 'PATTERN' cannot contain start of input anchor '^'
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:XJ.SOI_ANCHOR_FOUND,tokenTypes:[t]}))}function nJ(t){return t=gF(t,t=>(t=t[TJ])instanceof RegExp&&(t.multiline||t.global)),x(t,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:XJ.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[t]}))}function iJ(t){let n=[],e=x(t,r=>sG(t,(t,e)=>(r.PATTERN.source!==e.PATTERN.source||f$(n,e)||e.PATTERN===ZJ.NA||(n.push(e),t.push(e)),t),[]));e=SO(e);var r=gF(e,t=>1<t.length);return x(r,t=>{var e=x(t,t=>t.name);return{message:`The same RegExp pattern ->${SF(t).PATTERN}<-has been used in all of the following Token Types: ${e.join(", ")} <-`,type:XJ.DUPLICATE_PATTERNS_FOUND,tokenTypes:t}})}function aJ(t){return t=gF(t,t=>!!b(t,"GROUP")&&(t=t.GROUP)!==ZJ.SKIPPED&&t!==ZJ.NA&&!a$(t)),x(t,t=>({message:"Token Type: ->"+t.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:XJ.INVALID_GROUP_TYPE_FOUND,tokenTypes:[t]}))}function oJ(t,e){return t=gF(t,t=>void 0!==t.PUSH_MODE&&!f$(e,t.PUSH_MODE)),x(t,t=>({message:`Token Type: ->${t.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${t.PUSH_MODE}<-which does not exist`,type:XJ.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[t]}))}function sJ(t){let a=[],e=sG(t,(t,e,r)=>{var n=e.PATTERN;return n!==ZJ.NA&&(a$(n)?t.push({str:n,idx:r,tokenType:e}):L$(n)&&cJ(n)&&t.push({str:n.source,idx:r,tokenType:e})),t},[]);return v(t,(n,i)=>{v(e,({str:t,idx:e,tokenType:r})=>{i<e&&lJ(t,n.PATTERN)&&(e=`Token: ->${r.name}<- can never be matched.
Because it appears AFTER the Token Type ->${n.name}<-in the lexer's definition.
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`,a.push({message:e,type:XJ.UNREACHABLE_PATTERN,tokenTypes:[n,r]}))})}),a}function lJ(t,e){var r;if(L$(e))return null!==(r=e.exec(t))&&0===r.index;if(C5(e))return e(t,0,[],{});if(b(e,"exec"))return e.exec(t,0,[],{});if("string"==typeof e)return e===t;throw Error("non exhaustive match")}function cJ(e){return void 0===TF([".","\\","[","]","|","^","$","(",")","?","*","+","{"],t=>-1!==e.source.indexOf(t))}function hJ(t){var e=t.ignoreCase?"i":"";return new RegExp(`^(?:${t.source})`,e)}function uJ(t){var e=t.ignoreCase?"iy":"y";return new RegExp(""+t.source,e)}function dJ(t,e,r){let i=[];return b(t,EJ)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+EJ+`> property in its definition
`,type:XJ.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),b(t,_J)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+_J+`> property in its definition
`,type:XJ.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),b(t,_J)&&b(t,EJ)&&!b(t.modes,t.defaultMode)&&i.push({message:`A MultiMode Lexer cannot be initialized with a ${EJ}: <${t.defaultMode}>which does not exist
`,type:XJ.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),b(t,_J)&&v(t.modes,(r,n)=>{v(r,(e,t)=>{R$(e)?i.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${n}> at index: <${t}>
`,type:XJ.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED}):b(e,"LONGER_ALT")&&(t=Zk(e.LONGER_ALT)?e.LONGER_ALT:[e.LONGER_ALT],v(t,t=>{R$(t)||f$(r,t)||i.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${t.name}> on token <${e.name}> outside of mode <${n}>
`,type:XJ.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})}))})}),i}function pJ(t,e,r){let n=[],i=!1,a=SO(pR(u$(t.modes))),o=hG(a,t=>t[TJ]===ZJ.NA),s=xJ(r);return e&&v(o,t=>{var e=yJ(t,s);!1!==e?(e={message:vJ(t,e),type:e.issue,tokenType:t},n.push(e)):b(t,"LINE_BREAKS")?!0===t.LINE_BREAKS&&(i=!0):YQ(s,t.PATTERN)&&(i=!0)}),e&&!i&&n.push({message:`Warning: No LINE_BREAKS Found.
This Lexer has been defined to track line and column information,
But none of the Token Types can be identified as matching a line terminator.
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS
for details.`,type:XJ.NO_LINE_BREAKS_FLAGS}),n}function gJ(r){let n={},t=kM(r);return v(t,t=>{var e=r[t];if(!Zk(e))throw Error("non exhaustive match");n[t]=[]}),n}function fJ(t){if(t=t.PATTERN,L$(t))return!1;if(C5(t))return!0;if(b(t,"exec"))return!0;if(a$(t))return!1;throw Error("non exhaustive match")}function mJ(t){return!(!a$(t)||1!==t.length)&&t.charCodeAt(0)}function yJ(t,e){if(b(t,"LINE_BREAKS"))return!1;if(L$(t.PATTERN)){try{YQ(e,t.PATTERN)}catch(t){return{issue:XJ.IDENTIFY_TERMINATOR,errMsg:t.message}}return!1}if(a$(t.PATTERN))return!1;if(fJ(t))return{issue:XJ.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function vJ(t,e){if(e.issue===XJ.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.
The problem is in the <${t.name}> Token Type
Root cause: ${e.errMsg}.
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===XJ.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
The problem is in the <${t.name}> Token Type
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function xJ(t){return x(t,t=>a$(t)?t.charCodeAt(0):t)}function bJ(t,e,r){void 0===t[e]?t[e]=[r]:t[e].push(r)}function wJ(t){return t<NJ?t:IJ[t]}function kJ(){if(E$(IJ)){IJ=new Array(65536);for(let t=0;t<65536;t++)IJ[t]=255<t?255+~~(t/255):t}}var TJ,EJ,_J,CJ,SJ,AJ,LJ,NJ,IJ,MJ=t(()=>{$K(),ttt(),XG(),VZ(),VQ(),BQ(),TJ="PATTERN",EJ="defaultMode",_J="modes",CJ="boolean"==typeof new RegExp("(?:)").sticky,Ae(XQ,"analyzeTokenTypes"),Ae(KQ,"validatePatterns"),Ae(ZQ,"validateRegExpPattern"),Ae(QQ,"findMissingPatterns"),Ae(JQ,"findInvalidPatterns"),SJ=/[^\\][$]/,Ae(tJ,"findEndOfInputAnchor"),Ae(eJ,"findEmptyMatchRegExps"),AJ=/[^\\[][\^]|^\^/,Ae(rJ,"findStartOfInputAnchor"),Ae(nJ,"findUnsupportedFlags"),Ae(iJ,"findDuplicatePatterns"),Ae(aJ,"findInvalidGroupType"),Ae(oJ,"findModesThatDoNotExist"),Ae(sJ,"findUnreachablePatterns"),Ae(lJ,"testTokenType"),Ae(cJ,"noMetaChar"),Ae(hJ,"addStartOfInput"),Ae(uJ,"addStickyFlag"),Ae(dJ,"performRuntimeChecks"),Ae(pJ,"performWarningRuntimeChecks"),Ae(gJ,"cloneEmptyGroups"),Ae(fJ,"isCustomPattern"),Ae(mJ,"isShortPattern"),LJ={test:Ae(function(e){var r=e.length;for(let t=this.lastIndex;t<r;t++){var n=e.charCodeAt(t);if(10===n)return this.lastIndex=t+1,!0;if(13===n)return 10===e.charCodeAt(t+1)?this.lastIndex=t+2:this.lastIndex=t+1,!0}return!1},"test"),lastIndex:0},Ae(yJ,"checkLineBreaksIssues"),Ae(vJ,"buildLineBreakIssueMessage"),Ae(xJ,"getCharCodes"),Ae(bJ,"addToMapOfArrays"),NJ=256,IJ=[],Ae(wJ,"charCodeToOptimizedIndex"),Ae(kJ,"initCharCodeToOptimizedIndexMap")});function RJ(t,e){return(t=t.tokenTypeIdx)===e.tokenTypeIdx||!0===e.isParent&&!0===e.categoryMatchesMap[t]}function DJ(t,e){return t.tokenTypeIdx===e.tokenTypeIdx}function OJ(t){BJ(t=PJ(t)),$J(t),FJ(t),v(t,t=>{t.isParent=0<t.categoryMatches.length})}function PJ(t){let e=wO(t),r=t,n=!0;for(;n;){r=SO(pR(x(r,t=>t.CATEGORIES)));var i=BB(r,e);e=e.concat(i),E$(i)?n=!1:r=i}return e}function BJ(t){v(t,t=>{GJ(t)||((WJ[HJ]=t).tokenTypeIdx=HJ++),UJ(t)&&!Zk(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),UJ(t)||(t.CATEGORIES=[]),qJ(t)||(t.categoryMatches=[]),YJ(t)||(t.categoryMatchesMap={})})}function FJ(t){v(t,r=>{r.categoryMatches=[],v(r.categoryMatchesMap,(t,e)=>{r.categoryMatches.push(WJ[e].tokenTypeIdx)})})}function $J(t){v(t,t=>{zJ([],t)})}function zJ(r,n){v(r,t=>{n.categoryMatchesMap[t.tokenTypeIdx]=!0}),v(n.CATEGORIES,t=>{var e=r.concat(n);f$(e,t)||zJ(e,t)})}function GJ(t){return b(t,"tokenTypeIdx")}function UJ(t){return b(t,"CATEGORIES")}function qJ(t){return b(t,"categoryMatches")}function YJ(t){return b(t,"categoryMatchesMap")}function jJ(t){return b(t,"tokenTypeIdx")}var HJ,WJ,VJ,XJ,KJ,ZJ,QJ=t(()=>{XG(),Ae(RJ,"tokenStructuredMatcher"),Ae(DJ,"tokenStructuredMatcherNoCategories"),HJ=1,WJ={},Ae(OJ,"augmentTokenTypes"),Ae(PJ,"expandCategories"),Ae(BJ,"assignTokenDefaultProps"),Ae(FJ,"assignCategoriesTokensProp"),Ae($J,"assignCategoriesMapProp"),Ae(zJ,"singleAssignCategoriesToksMap"),Ae(GJ,"hasShortKeyProperty"),Ae(UJ,"hasCategoriesProperty"),Ae(qJ,"hasExtendingTokensTypesProperty"),Ae(YJ,"hasExtendingTokensTypesMapProperty"),Ae(jJ,"isTokenType")}),JJ=t(()=>{VJ={buildUnableToPopLexerModeMessage(t){return`Unable to pop Lexer Mode after encountering Token ->${t.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(t,e,r,n,i){return`unexpected character: ->${t.charAt(e)}<- at offset: ${e}, skipped ${r} characters.`}}}),ttt=t(()=>{var t;MJ(),XG(),VZ(),QJ(),JJ(),BQ(),(t=XJ=XJ||{})[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.
`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:VJ,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0},Object.freeze(KJ),(ZJ=class{static{Ae(this,"Lexer")}constructor(i,a=KJ){if(this.lexerDefinition=i,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(t,e)=>{var r,n,i,a;return!0===this.traceInitPerf?(this.traceInitIndent++,r=new Array(this.traceInitIndent+1).join("\t"),{time:n,value:i}=(this.traceInitIndent<this.traceInitMaxIdent&&console.log(r+`--> <${t}>`),YZ(e)),a=10<n?console.warn:console.log,this.traceInitIndent<this.traceInitMaxIdent&&a(r+`<-- <${t}> time: ${n}ms`),this.traceInitIndent--,i):e()},"boolean"==typeof a)throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.
a boolean 2nd argument is no longer supported`);this.config=_M({},KJ,a);var t=this.config.traceInitPerf;!0===t?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof t&&(this.traceInitMaxIdent=t,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let r,t=!0,n=(this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===KJ.lineTerminatorsPattern)this.config.lineTerminatorsPattern=LJ;else if(this.config.lineTerminatorCharacters===KJ.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(a.safeMode&&a.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),r=Zk(i)?{modes:{defaultMode:wO(i)},defaultMode:EJ}:(t=!1,wO(i))}),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(dJ(r,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(pJ(r,this.trackStartLines,this.config.lineTerminatorCharacters))})),r.modes=r.modes||{},v(r.modes,(t,e)=>{r.modes[e]=hG(t,t=>R$(t))}),kM(r.modes));var e;if(v(r.modes,(e,r)=>{this.TRACE_INIT(`Mode: <${r}> processing`,()=>{if(this.modes.push(r),!1===this.config.skipValidations&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(KQ(e,n))}),E$(this.lexerDefinitionErrors)){OJ(e);let t;this.TRACE_INIT("analyzeTokenTypes",()=>{t=XQ(e,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:a.positionTracking,ensureOptimizations:a.ensureOptimizations,safeMode:a.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[r]=t.patternIdxToConfig,this.charCodeToPatternIdxToConfig[r]=t.charCodeToPatternIdxToConfig,this.emptyGroups=_M({},this.emptyGroups,t.emptyGroups),this.hasCustom=t.hasCustom||this.hasCustom,this.canModeBeOptimized[r]=t.canBeOptimized}})}),this.defaultMode=r.defaultMode,!E$(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling)throw e=x(this.lexerDefinitionErrors,t=>t.message).join(`-----------------------
`),new Error(`Errors detected in definition of Lexer:
`+e);v(this.lexerDefinitionWarning,t=>{UZ(t.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(CJ?(this.chopInput=NT,this.match=this.matchWithTest):(this.updateLastIndex=WI,this.match=this.matchWithExec),t&&(this.handleModes=WI),!1===this.trackStartLines&&(this.computeNewColumn=NT),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=WI),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else{if(!/onlyOffset/i.test(this.config.positionTracking))throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.createTokenInstance=this.createOffsetOnlyToken}this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{var t=sG(this.canModeBeOptimized,(t,e,r)=>(!1===e&&t.push(r),t),[]);if(a.ensureOptimizations&&!E$(t))throw Error(`Lexer Modes: < ${t.join(", ")} > cannot be optimized.
Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.
Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{DQ()}),this.TRACE_INIT("toFastProperties",()=>{HZ(this)})})}tokenize(t,e=this.defaultMode){if(E$(this.lexerDefinitionErrors))return this.tokenizeInternal(t,e);throw t=x(this.lexerDefinitionErrors,t=>t.message).join(`-----------------------
`),new Error(`Unable to Tokenize because Errors detected in definition of Lexer:
`+t)}tokenizeInternal(i,P){let t,a,e,r,n,o,s,l,c,h,B,u,d,F,p,g=i,$=g.length,f=0,m=0,z=this.hasCustom?0:Math.floor(i.length/10),y=new Array(z),v=[],x=this.trackStartLines?1:void 0,b=this.trackStartLines?1:void 0,w=gJ(this.emptyGroups),G=this.trackStartLines,k=this.config.lineTerminatorsPattern,T=0,E=[],_=[],C=[],U=[];Object.freeze(U);let S;function A(){return E}function L(t){return t=wJ(t),void 0===(t=_[t])?U:t}Ae(A,"getPossiblePatternsSlow"),Ae(L,"getPossiblePatternsOptimized");var q=Ae(t=>{var e;1===C.length&&void 0===t.tokenType.PUSH_MODE?(e=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(t),v.push({offset:t.startOffset,line:t.startLine,column:t.startColumn,length:t.image.length,message:e})):(C.pop(),t=GB(C),E=this.patternIdxToConfig[t],_=this.charCodeToPatternIdxToConfig[t],T=E.length,e=this.canModeBeOptimized[t]&&!1===this.config.safeMode,S=_&&e?L:A)},"pop_mode");function N(t){C.push(t),_=this.charCodeToPatternIdxToConfig[t],E=this.patternIdxToConfig[t],T=E.length,T=E.length,t=this.canModeBeOptimized[t]&&!1===this.config.safeMode,S=_&&t?L:A}Ae(N,"push_mode"),N.call(this,P);let I,Y=this.config.recoveryEnabled;for(;f<$;){o=null;var j=g.charCodeAt(f),H=S(j),W=H.length;for(t=0;t<W;t++){var M=(I=H[t]).pattern,V=(s=null,I.short);if(!1!==V?j===V&&(o=M):!0===I.isCustom?null!==(p=M.exec(g,f,y,w))?(o=p[0],void 0!==p.payload&&(s=p.payload)):o=null:(this.updateLastIndex(M,f),o=this.match(M,i,f)),null!==o){if(void 0!==(n=I.longerAlt)){var X=n.length;for(e=0;e<X;e++){var R=E[n[e]],D=R.pattern;if(!(l=null)===R.isCustom?null!==(p=D.exec(g,f,y,w))?(r=p[0],void 0!==p.payload&&(l=p.payload)):r=null:(this.updateLastIndex(D,f),r=this.match(D,i,f)),r&&r.length>o.length){o=r,s=l,I=R;break}}}break}}if(null!==o){if(c=o.length,void 0!==(h=I.group)&&(B=I.tokenTypeIdx,u=this.createTokenInstance(o,f,B,I.tokenType,x,b,c),this.handlePayload(u,s),!1===h?m=this.addToken(y,m,u):w[h].push(u)),i=this.chopInput(i,c),f+=c,b=this.computeNewColumn(b,c),!0===G&&!0===I.canLineTerminator){let t=0,e,r;for(k.lastIndex=0;!0===(e=k.test(o))&&(r=k.lastIndex-1,t++),!0===e;);0!==t&&(x+=t,b=c-r,this.updateTokenEndLineColumnLocation(u,h,r,t,x,b,c))}this.handleModes(I,q,N,u)}else{let t=f,e=x,r=b,n=!1===Y;for(;!1===n&&f<$;)for(i=this.chopInput(i,1),f++,a=0;a<T;a++){var O=E[a],K=O.pattern,Z=O.short;if(!1!==Z?g.charCodeAt(f)===Z&&(n=!0):n=!0===O.isCustom?null!==K.exec(g,f,y,w):(this.updateLastIndex(K,f),null!==K.exec(i)),!0===n)break}if(d=f-t,b=this.computeNewColumn(b,d),F=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(g,t,d,e,r),v.push({offset:t,line:e,column:r,length:d,message:F}),!1===Y)break}}return this.hasCustom||(y.length=m),{tokens:y,groups:w,errors:v}}handleModes(t,e,r,n){var i;!0===t.pop?(i=t.push,e(n),void 0!==i&&r.call(this,i)):void 0!==t.push&&r.call(this,t.push)}chopInput(t,e){return t.substring(e)}updateLastIndex(t,e){t.lastIndex=e}updateTokenEndLineColumnLocation(t,e,r,n,i,a,o){void 0!==e&&(r=(e=r===o-1)?-1:0,1===n&&1==e||(t.endLine=i+r,t.endColumn=a-1-r))}computeNewColumn(t,e){return t+e}createOffsetOnlyToken(t,e,r,n){return{image:t,startOffset:e,tokenTypeIdx:r,tokenType:n}}createStartOnlyToken(t,e,r,n,i,a){return{image:t,startOffset:e,startLine:i,startColumn:a,tokenTypeIdx:r,tokenType:n}}createFullToken(t,e,r,n,i,a,o){return{image:t,startOffset:e,endOffset:e+o-1,startLine:i,endLine:i,startColumn:a,endColumn:a+o-1,tokenTypeIdx:r,tokenType:n}}addTokenUsingPush(t,e,r){return t.push(r),e}addTokenUsingMemberAccess(t,e,r){return t[e]=r,++e}handlePayloadNoCustom(t,e){}handlePayloadWithCustom(t,e){null!==e&&(t.payload=e)}matchWithTest(t,e,r){return!0===t.test(e)?e.substring(r,t.lastIndex):null}matchWithExec(t,e){return null!==(t=t.exec(e))?t[0]:null}}).SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",ZJ.NA=/NOT_APPLICABLE/});function ett(t){return rtt(t)?t.LABEL:t.name}function rtt(t){return a$(t.LABEL)&&""!==t.LABEL}function ntt(t){return itt(t)}function itt(t){var e=t.pattern,r
See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return b(t,ltt)&&(r.CATEGORIES=t[ltt]),OJ([r]),b(t,ctt)&&(r.LABEL=t[ctt]),b(t,htt)&&(r.GROUP=t[htt]),b(t,dtt)&&(r.POP_MODE=t[dtt]),b(t,utt)&&(r.PUSH_MODE=t[utt]),b(t,ptt)&&(r.LONGER_ALT=t[ptt]),b(t,gtt)&&(r.LINE_BREAKS=t[gtt]),b(t,ftt)&&(r.START_CHARS_HINT=t[ftt]),r}function att(t,e,r,n,i,a,o,s){return{image:e,startOffset:r,endOffset:n,startLine:i,endLine:a,startColumn:o,endColumn:s,tokenTypeIdx:t.tokenTypeIdx,tokenType:t}}function ott(t,e){return RJ(t,e)}var stt,ltt,ctt,htt,utt,dtt,ptt,gtt,ftt,mtt,ytt,vtt,xtt,btt=t(()=>{XG(),ttt(),QJ(),Ae(ett,"tokenLabel"),Ae(rtt,"hasTokenLabel"),stt="parent",ltt="categories",ctt="label",htt="group",utt="push_mode",dtt="pop_mode",ptt="longer_alt",gtt="line_breaks",ftt="start_chars_hint",Ae(ntt,"createToken"),Ae(itt,"createTokenInternal"),OJ([mtt=ntt({name:"EOF",pattern:ZJ.NA})]),Ae(att,"createTokenInstance"),Ae(ott,"tokenMatcher")}),wtt=t(()=>{btt(),XG(),vQ(),ytt={buildMismatchTokenMessage({expected:t,actual:e}){return`Expecting ${rtt(t)?`--> ${ett(t)} <--`:`token of type --> ${t.name} <--`} but found --> '${e.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:t}){return"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage({expectedPathsPerAlt:t,actual:e,customUserDescription:r}){var n="Expecting: ",e=`
but found: '`+SF(e).image+"'";return r?n+r+e:(r=sG(t,(t,e)=>t.concat(e),[]),t=x(r,t=>`[${x(t,t=>ett(t)).join(", ")}]`),n+`one of these possible Token sequences:
`+x(t,(t,e)=>` ${e+1}. `+t).join(`
`)+e)},buildEarlyExitMessage({expectedIterationPaths:t,actual:e,customUserDescription:r}){var n="Expecting: ",e=`
but found: '`+SF(e).image+"'";return r?n+r+e:n+`expecting at least one iteration which starts with one of these possible Token sequences::
<${x(t,t=>`[${x(t,t=>ett(t)).join(",")}]`).join(" ,")}>`+e}},Object.freeze(ytt),vtt={buildRuleNotFoundError(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<-
inside top level rule: ->`+t.name+"<-"}},xtt={buildDuplicateFoundError(t,e){function r(t){return t instanceof cQ?t.terminalType.name:t instanceof tQ?t.nonTerminalName:""}Ae(r,"getExtraProductionArgument");let n=t.name,i=SF(e),a=i.idx,o=mQ(i),s=r(i),l=0<a,c=`->${o}${l?a:""}<- ${s?`with argument: ->${s}<-`:""}
appears more than once (${e.length} times) in the top level rule: ->${n}<-.
For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES
`;return c=(c=c.replace(/[ \t]+/g," ")).replace(/\s\s+/g,`
`)},buildNamespaceConflictError(t){return`Namespace conflict found in grammar.
The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${t.name}>.
To resolve this make sure each Terminal and Non-Terminal names are unique
This is easy to accomplish by using the convention that Terminal names start with an uppercase letter
and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(t){var e=x(t.prefixPath,t=>ett(t)).join(", "),r=0===t.alternation.idx?"":t.alternation.idx;return`Ambiguous alternatives: <${t.ambiguityIndices.join(" ,")}> due to common lookahead prefix
in <OR${r}> inside <${t.topLevelRule.name}> Rule,
<${e}> may appears as a prefix path in all these alternatives.
See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX
For Further details.`},buildAlternationAmbiguityError(t){var e=x(t.prefixPath,t=>ett(t)).join(", "),r=0===t.alternation.idx?"":t.alternation.idx;return`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(" ,")}> in <OR${r}> inside <${t.topLevelRule.name}> Rule,
<${e}> may appears as a prefix path in all these alternatives.
`+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
For Further details.`},buildEmptyRepetitionError(t){let e=mQ(t.repetition);return 0!==t.repetition.idx&&(e+=t.repetition.idx),`The repetition <${e}> within Rule <${t.topLevelRule.name}> can never consume any tokens.
This could lead to an infinite loop.`},buildTokenNameError(t){return"deprecated"},buildEmptyAlternationError(t){return`Ambiguous empty alternative: <${t.emptyChoiceIdx+1}> in <OR${t.alternation.idx}> inside <${t.topLevelRule.name}> Rule.
Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(t){return`An Alternation cannot have more than 256 alternatives:
<OR${t.alternation.idx}> inside <${t.topLevelRule.name}> Rule.
has ${t.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(t){var e=t.topLevelRule.name;return`Left Recursion found in grammar.
rule: <${e}> can be invoked from itself (directly or indirectly)
without consuming any Tokens. The grammar path that causes this is:
${e+" --\x3e "+x(t.leftRecursionPath,t=>t.name).concat([e]).join(" --\x3e ")}
To fix this refactor your grammar to remove the left recursion.
see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(t){return"deprecated"},buildDuplicateRuleNameError(t){return`Duplicate definition, rule: ->${t.topLevelRule instanceof eQ?t.topLevelRule.name:t.topLevelRule}<- is already defined in the grammar: ->${t.grammarName}<-`}}});function ktt(t,e){return(t=new Ttt(t,e)).resolveRefs(),t.errors}var Ttt,Ett=t(()=>{qrt(),XG(),vQ(),Ae(ktt,"resolveGrammar"),Ttt=class extends hQ{static{Ae(this,"GastRefResolverVisitor")}constructor(t,e){super(),this.nameToTopRule=t,this.errMsgProvider=e,this.errors=[]}resolveRefs(){v(u$(this.nameToTopRule),t=>{(this.currTopLevel=t).accept(this)})}visitNonTerminal(t){var e=this.nameToTopRule[t.nonTerminalName];e?t.referencedRule=e:(e=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t),this.errors.push({message:e,type:zrt.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName}))}}});function _tt(e,r,n=[]){n=wO(n);let i=[],a=0;function o(t){return t.concat(YB(e,a+1))}function s(t){return t=_tt(o(t),r,n),i.concat(t)}for(Ae(o,"remainingPathWith"),Ae(s,"getAlternativesForProd");n.length<r&&a<e.length;){var t=e[a];if(t instanceof rQ)return s(t.definition);if(t instanceof tQ)return s(t.definition);if(t instanceof nQ)i=s(t.definition);else{if(t instanceof iQ)return s(t.definition.concat([new oQ({definition:t.definition})]));if(t instanceof aQ)return s([new rQ({definition:t.definition}),new oQ({definition:[new cQ({terminalType:t.separator})].concat(t.definition)})]);if(t instanceof sQ){var l=t.definition.concat([new oQ({definition:[new cQ({terminalType:t.separator})].concat(t.definition)})]);i=s(l)}else if(t instanceof oQ)l=t.definition.concat([new oQ({definition:t.definition})]),i=s(l);else{if(t instanceof lQ)return v(t.definition,t=>{!1===E$(t.definition)&&(i=s(t.definition))}),i;if(!(t instanceof cQ))throw Error("non exhaustive match");n.push(t.terminalType)}}a++}return i.push({partialPath:n,suffixDef:YB(e,a)}),i}function Ctt(t,e,r,n){let i="EXIT_NONE_TERMINAL",a=[i],o="EXIT_ALTERNATIVE",s=!1,l=e.length,c=l-n-1,h=[],u=[];for(u.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!E$(u);)if((v=u.pop())===o)s&&GB(u).idx<=c&&u.pop();else{var d=v.def,p=v.idx,g=v.ruleStack,f=v.occurrenceStack;if(!E$(d)){var m=d[0];if(m===i)v={idx:p,def:YB(d),ruleStack:WB(g),occurrenceStack:WB(f)},u.push(v);else if(m instanceof cQ)if(p<l-1)r(e[v=p+1],m.terminalType)&&(v={idx:v,def:YB(d),ruleStack:g,occurrenceStack:f},u.push(v));else{if(p!==l-1)throw Error("non exhaustive match");h.push({nextTokenType:m.terminalType,nextTokenOccurrence:m.idx,ruleStack:g,occurrenceStack:f}),s=!0}else if(m instanceof tQ){(v=wO(g)).push(m.nonTerminalName);var y=wO(f),v=(y.push(m.idx),{idx:p,def:m.definition.concat(a,YB(d)),ruleStack:v,occurrenceStack:y});u.push(v)}else if(m instanceof nQ)y={idx:p,def:YB(d),ruleStack:g,occurrenceStack:f},u.push(y),u.push(o),v={idx:p,def:m.definition.concat(YB(d)),ruleStack:g,occurrenceStack:f},u.push(v);else if(m instanceof iQ)v=new oQ({definition:m.definition,idx:m.idx}),v=m.definition.concat([v],YB(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof aQ)v=new cQ({terminalType:m.separator}),v=new oQ({definition:[v].concat(m.definition),idx:m.idx}),v=m.definition.concat([v],YB(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof sQ)v={idx:p,def:YB(d),ruleStack:g,occurrenceStack:f},u.push(v),u.push(o),v=new cQ({terminalType:m.separator}),v=new oQ({definition:[v].concat(m.definition),idx:m.idx}),v=m.definition.concat([v],YB(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof oQ)v={idx:p,def:YB(d),ruleStack:g,occurrenceStack:f},u.push(v),u.push(o),v=new oQ({definition:m.definition,idx:m.idx}),v=m.definition.concat([v],YB(d)),u.push({idx:p,def:v,ruleStack:g,occurrenceStack:f});else if(m instanceof lQ)for(let t=m.definition.length-1;0<=t;t--){var x={idx:p,def:m.definition[t].definition.concat(YB(d)),ruleStack:g,occurrenceStack:f};u.push(x),u.push(o)}else if(m instanceof rQ)u.push({idx:p,def:m.definition.concat(YB(d)),ru
`+t.join(`
`).replace(/\n/g,`
`))},"validateVisitor")});return r.prototype=t,(r.prototype.constructor=r)._RULE_NAMES=e,r}function irt(t,e,r){var n=Ae(function(){},"derivedConstructor");Jet(n,t+"BaseSemanticsWithDefaults");let i=Object.create(r.prototype);return v(e,t=>{i[t]=rrt}),n.prototype=i,n.prototype.constructor=n}function art(t,e){return ort(t,e)}function ort(e,t){return t=gF(t,t=>!1===C5(e[t])),t=x(t,t=>({msg:`Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,type:srt.MISSING_METHOD,methodName:t})),SO(t)}var srt,lrt,crt,hrt,urt,drt,prt,grt=t(()=>{var t;XG(),ert(),Ae(rrt,"defaultVisit"),Ae(nrt,"createBaseSemanticVisitorConstructor"),Ae(irt,"createBaseVisitorConstructorWithDefaults"),(t=srt=srt||{})[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD",Ae(art,"validateVisitor"),Ae(ort,"validateMissingCstMethods")}),frt=t(()=>{Qet(),XG(),grt(),qrt(),lrt=class{static{Ae(this,"TreeBuilder")}initTreeBuilder(t){if(this.CST_STACK=[],this.outputCst=t.outputCst,this.nodeLocationTracking=(b(t,"nodeLocationTracking")?t:Frt).nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Xet,this.setNodeLocationFromNode=Xet,this.cstPostRule=WI,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=WI,this.setNodeLocationFromNode=WI,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Vet,this.setNodeLocationFromNode=Vet,this.cstPostRule=WI,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=WI,this.setNodeLocationFromNode=WI,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid <nodeLocationTracking> config option: "${t.nodeLocationTracking}"`);this.setNodeLocationFromToken=WI,this.setNodeLocationFromNode=WI,this.cstPostRule=WI,this.setInitialNodeLocation=WI}else this.cstInvocationStateUpdate=WI,this.cstFinallyStateUpdate=WI,this.cstPostTerminal=WI,this.cstPostNonTerminal=WI,this.cstPostRule=WI}setInitialNodeLocationOnlyOffsetRecovery(t){t.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(t){t.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(t){t.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(t){var e=this.LA(1);t.location={startOffset:e.startOffset,startLine:e.startLine,startColumn:e.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(t){t={name:t,children:Object.create(null)},this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(t){var e=this.LA(0);(t=t.location).startOffset<=e.startOffset?(t.endOffset=e.endOffset,t.endLine=e.endLine,t.endColumn=e.endColumn):(t.startOffset=NaN,t.startLine=NaN,t.startColumn=NaN)}cstPostRuleOnlyOffset(t){var e=this.LA(0);(t=t.location).startOffset<=e.startOffset?t.endOffset=e.endOffset:t.startOffset=NaN}cstPostTerminal(t,e){var r=this.CST_STACK[this.CST_STACK.length-1];Ket(r,e,t),this.setNodeLocationFromToken(r.location,e)}cstPostNonTerminal(t,e){var r=this.CST_STACK[this.CST_STACK.length-1];Zet(r,e,t),this.setNodeLocationFromNode(r.location,t.location)}getBaseCstVisitorConstructor(){var t;return R$(this.baseCstVisitorConstructor)?(t=nrt(this.className,kM(this.gastProductionsCache)),this.baseCstVisitorConstructor=t):this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){var t;return R$(this.baseCstVisitorWithDefaultsConstructor)?(t=irt(this.className,kM(this.gastProductionsCache),this.getBaseCstVisitorConstructor()),this.baseCstVisitorWithDefaultsConstructor=t):this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){var t=this.RULE_STACK;return t
See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0
For Further details.`);if(Zk(t)){if(E$(t))throw Error(`A Token Vocabulary cannot be empty.
Note that the first argument for the parser constructor
is no longer a Token vector (since v4.0).`);if("number"==typeof t[0].startOffset)throw Error(`The Parser constructor no longer accepts a token vector as the first argument.
See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0
For Further details.`)}if(Zk(t))this.tokensMap=sG(t,(t,e)=>(t[e.name]=e,t),{});else if(b(t,"modes")&&lF(pR(u$(t.modes)),jJ))e=pR(u$(t.modes)),e=DG(e),this.tokensMap=sG(e,(t,e)=>(t[e.name]=e,t),{});else{if(!T5(t))throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=wO(t)}this.tokensMap.EOF=mtt,e=b(t,"modes")?pR(u$(t.modes)):u$(t),t=lF(e,t=>E$(t.categoryMatches)),this.tokenMatcher=t?DJ:RJ,OJ(u$(this.tokensMap))}defineRule(r,n,t){if(this.selfAnalysisDone)throw Error(`Grammar rule <${r}> may not be defined after the 'performSelfAnalysis' method has been called'
Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let i=(b(t,"resyncEnabled")?t:$rt).resyncEnabled,a=(b(t,"recoveryValueFunc")?t:$rt).recoveryValueFunc,o=this.ruleShortNameIdx<<12;return this.ruleShortNameIdx++,this.shortRuleNameToFull[o]=r,this.fullRuleNameToShort[r]=o,t=!0===this.outputCst?Ae(function(...t){try{this.ruleInvocationStateUpdate(o,r,this.subruleIdx),n.apply(this,t);var e=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(e),e}catch(t){return this.invokeRuleCatch(t,i,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTry"):Ae(function(...t){try{return this.ruleInvocationStateUpdate(o,r,this.subruleIdx),n.apply(this,t)}catch(t){return this.invokeRuleCatch(t,i,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTryCst"),Object.assign(t,{ruleName:r,originalGrammarAction:n})}invokeRuleCatch(t,e,r){var n=1===this.RULE_STACK.length,e=e&&!this.isBackTracking()&&this.recoveryEnabled;if(Eet(t)){var i=t;if(e){if(e=this.findReSyncTokenType(),this.isInCurrentRuleReSyncSet(e))return i.resyncedTokens=this.reSyncTo(e),this.outputCst?((e=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,e):r(t);this.outputCst&&((e=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,i.partialCstResult=e)}else if(n)return this.moveToTerminatedState(),r(t);throw i}throw t}optionInternal(t,e){var r=this.getKeyForAutomaticLookahead(512,e);return this.optionInternalLogic(t,e,r)}optionInternalLogic(t,e,r){let n=this.getLaFuncFromCache(r),i;if("function"!=typeof t){i=t.DEF;let e=t.GATE;if(void 0!==e){let t=n;n=Ae(()=>e.call(this)&&t.call(this),"lookAheadFunc")}}else i=t;if(!0===n.call(this))return i.call(this)}atLeastOneInternal(t,e){var r=this.getKeyForAutomaticLookahead(1024,t);return this.atLeastOneInternalLogic(t,e,r)}atLeastOneInternalLogic(t,r,e){let n=this.getLaFuncFromCache(e),i;if("function"!=typeof r){i=r.DEF;let e=r.GATE;if(void 0!==e){let t=n;n=Ae(()=>e.call(this)&&t.call(this),"lookAheadFunc")}}else i=r;if(!0!==n.call(this))throw this.raiseEarlyExitException(t,Ktt.REPETITION_MANDATORY,r.ERR_MSG);{let t=this.doSingleRepetition(i);for(;!0===n.call(this)&&!0===t;)t=this.doSingleRepetition(i)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[t,r],n,1024,t,Mtt)}atLeastOneSepFirstInternal(t,e){var r=this.getKeyForAutomaticLookahead(1536,t);this.atLeastOneSepFirstInternalLogic(t,e,r)}atLeastOneSepFirstInternalLogic(t,e,r){let n=e.DEF,i=e.SEP;if(!0!==this.getLaFuncFromCache(r).call(this))throw this.raiseEarlyExitException(t,Ktt.REPETITION_MANDATORY_WITH_SEPARATOR,e.ERR_MSG);for(n.call(this),r=Ae(()=>this.tokenMatcher(this.LA(1),i),"separatorLookAheadFunc");!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,i,r,n,Rtt],r,1536,t,Rtt)}manyInternal(t,e){var r=this.getKeyForAutomaticLookahead(768,t);return this.manyInternalLogic(t,e,r)}manyInternalLogic(t,r,e){let n=this.getLaFuncFromCache(e),i;if("function"!=typeof r){i=r.DEF;let e=r.GATE;if(void 0!==e){let t=n;n=Ae(()=>e.call(this)&&t.call(this),"lookaheadFunction")}}else i=r;let a=!0;for(;!0===n.call(this)&&!0===a;)a=this.doSingleRepetition(i);this.attemptInRepetitionRecovery(this.manyInternal,[t,r],n,768,t,Ntt,a)}manySepFirstInternal(t,e){var r=this.getKeyForAutomaticLookahead(1280,t);this.manySepFirstInternalLogic(t,e,r)}manySepFirstInternalLogic(t,e,r){let n=e.DEF,i=e.SEP;if(!0===this.getLaFuncFromCache(r).call(this)){for(n.call(this),e=Ae(()=>this.tokenMatcher(this.LA(1),i),"separatorLookAheadFunc");!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,i,e,n,Itt],e,1280,t,Itt)}}repetitionSepSecondInternal(t,e,r,n,i){for(;r();)this.CONSUME(e),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,e,r,n,i],r,1536,t,i)}doSingleRepetition(t){var e=this.getLexerPosition();return t.call(this),this.getLexerPosition()>e}orInternal(t,e){var r=this.getKeyForAutomaticLookahead(256,e),n=Zk(t)?t:t.DEF;if(void 0!==(r=this.
Idx value must be a none negative value smaller than `+(Crt+1))).KNOWN_RECORDER_ERROR=!0,t}var _rt,Crt,Srt,Art,Lrt,Nrt,Irt,Mrt=t(()=>{XG(),vQ(),ttt(),QJ(),btt(),qrt(),Get(),_rt={description:"This Object indicates the Parser is during Recording Phase"},Object.freeze(_rt),Crt=Math.pow(2,8)-1,OJ([Srt=ntt({name:"RECORDING_PHASE_TOKEN",pattern:ZJ.NA})]),Art=att(Srt,`This IToken indicates the Parser is in Recording Phase
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1),Object.freeze(Art),Lrt={name:`This CSTNode indicates the Parser is in Recording Phase
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},Nrt=class{static{Ae(this,"GastRecorder")}initGastRecorder(t){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let r=0;r<10;r++){var t=0<r?r:"";this["CONSUME"+t]=function(t,e){return this.consumeInternalRecord(t,r,e)},this["SUBRULE"+t]=function(t,e){return this.subruleInternalRecord(t,r,e)},this["OPTION"+t]=function(t){return this.optionInternalRecord(t,r)},this["OR"+t]=function(t){return this.orInternalRecord(t,r)},this["MANY"+t]=function(t){this.manyInternalRecord(r,t)},this["MANY_SEP"+t]=function(t){this.manySepFirstInternalRecord(r,t)},this["AT_LEAST_ONE"+t]=function(t){this.atLeastOneInternalRecord(r,t)},this["AT_LEAST_ONE_SEP"+t]=function(t){this.atLeastOneSepFirstInternalRecord(r,t)}}this.consume=function(t,e,r){return this.consumeInternalRecord(e,t,r)},this.subrule=function(t,e,r){return this.subruleInternalRecord(e,t,r)},this.option=function(t,e){return this.optionInternalRecord(e,t)},this.or=function(t,e){return this.orInternalRecord(e,t)},this.many=function(t,e){this.manyInternalRecord(t,e)},this.atLeastOne=function(t,e){this.atLeastOneInternalRecord(t,e)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{var e=this;for(let t=0;t<10;t++){var r=0<t?t:"";delete e["CONSUME"+r],delete e["SUBRULE"+r],delete e["OPTION"+r],delete e["OR"+r],delete e["MANY"+r],delete e["MANY_SEP"+r],delete e["AT_LEAST_ONE"+r],delete e["AT_LEAST_ONE_SEP"+r]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(t){}BACKTRACK_RECORD(t,e){return()=>!0}LA_RECORD(t){return Brt}topLevelRuleRecord(t,e){try{var r=new eQ({definition:[],name:t});return r.name=t,this.recordingProdStack.push(r),e.call(this),this.recordingProdStack.pop(),r}catch(t){if(!0!==t.KNOWN_RECORDER_ERROR)try{t.message=t.message+`
This error was thrown during the "grammar recording phase" For more info see:
https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{}throw t}}optionInternalRecord(t,e){return wrt.call(this,nQ,t,e)}atLeastOneInternalRecord(t,e){wrt.call(this,iQ,e,t)}atLeastOneSepFirstInternalRecord(t,e){wrt.call(this,aQ,e,t,!0)}manyInternalRecord(t,e){wrt.call(this,oQ,e,t)}manySepFirstInternalRecord(t,e){wrt.call(this,sQ,e,t,!0)}orInternalRecord(t,e){return krt.call(this,t,e)}subruleInternalRecord(t,e,r){var n,i;if(Ert(e),t&&!1!==b(t,"ruleName"))return n=GB(this.recordingProdStack),i=t.ruleName,i=new tQ({idx:e,nonTerminalName:i,label:r?.LABEL,referencedRule:void 0}),n.definition.push(i),this.outputCst?Lrt:_rt;throw(r=new Error(`<SUBRULE${Trt(e)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(t)}>
inside top level rule: <${this.recordingProdStack[0].name}>`)).KNOWN_RECORDER_ERROR=!0,r}consumeInternalRecord(t,e,r){var n;if(Ert(e),GJ(t))return n=GB(this.recordingProdStack),r=new cQ({idx:e,terminalType:t,label:r?.LABEL}),n.definition.push(r),Art;throw(n=new Error(`<CONSUME${Trt(e)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(t)}>
inside top level rule: <${this.recordingProdStack[0].name}>`)).KNOWN_RECORDER_ERROR=!0,n}},Ae(wrt,"recordProd"),Ae(krt,"recordOrProd"),Ae(Trt,"getIdxSuffix"),Ae(Ert,"assertMethodIdxIsValid")}),Rrt=t(()=>{XG(),VZ(),qrt(),Irt=class{static{Ae(this,"PerformanceTracer")}initPerformanceTracer(t){var e;b(t,"traceInitPerf")?(t=t.traceInitPerf,this.traceInitMaxIdent=(e="number"==typeof t)?t:1/0,this.traceInitPerf=e?0<t:t):(this.traceInitMaxIdent=0,this.traceInitPerf=Frt.traceInitPerf),this.traceInitIndent=-1}TRACE_INIT(t,e){var r,n,i,a;return!0===this.traceInitPerf?(this.traceInitIndent++,r=new Array(this.traceInitIndent+1).join("\t"),{time:n,value:i}=(this.traceInitIndent<this.traceInitMaxIdent&&console.log(r+`--> <${t}>`),YZ(e)),a=10<n?console.warn:console.log,this.traceInitIndent<this.traceInitMaxIdent&&a(r+`<-- <${t}> time: ${n}ms`),this.traceInitIndent--,i):e()}}});function Drt(i,t){t.forEach(r=>{let n=r.prototype;Object.getOwnPropertyNames(n).forEach(t=>{var e;"constructor"!==t&&((e=Object.getOwnPropertyDescriptor(n,t))&&(e.get||e.set)?Object.defineProperty(i.prototype,t,e):i.prototype[t]=r.prototype[t])})})}var Ort=t(()=>{Ae(Drt,"applyMixins")});function Prt(t=void 0){return function(){return t}}var Brt,Frt,$rt,zrt,Grt,Urt,qrt=t(()=>{var t;XG(),VZ(),MQ(),btt(),wtt(),Tet(),Fet(),Wet(),frt(),mrt(),yrt(),vrt(),xrt(),brt(),Mrt(),Rrt(),Ort(),bet(),Brt=att(mtt,"",NaN,NaN,NaN,NaN,NaN,NaN),Object.freeze(Brt),Frt=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:ytt,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),$rt=Object.freeze({recoveryValueFunc:Ae(()=>{},"recoveryValueFunc"),resyncEnabled:!0}),(t=zrt=zrt||{})[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",t[t.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION",Ae(Prt,"EMPTY_ALT"),(Grt=class e{static{Ae(this,"Parser")}static performSelfAnalysis(t){throw Error("The **static** `performSelfAnalysis` method has been deprecated.\t\nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{var t;this.selfAnalysisDone=!0;let r=this.className,n=(this.TRACE_INIT("toFastProps",()=>{HZ(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),v(this.definedRulesNames,t=>{let e=this[t].originalGrammarAction,r;this.TRACE_INIT(t+" Rule",()=>{r=this.topLevelRuleRecord(t,e)}),this.gastProductionsCache[t]=r})}finally{this.disableRecording()}}),[]);if(this.TRACE_INIT("Grammar Resolving",()=>{n=wet({rules:u$(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{var t,e;E$(n)&&!1===this.skipValidations&&(t=ket({rules:u$(this.gastProductionsCache),tokenTypes:u$(this.tokensMap),errMsgProvider:xtt,grammarName:r}),e=tet({lookaheadStrategy:this.lookaheadStrategy,rules:u$(this.gastProductionsCache),tokenTypes:u$(this.tokensMap),grammarName:r}),this.definitionErrors=this.definitionErrors.concat(t,e))}),E$(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{var t=LQ(u$(this.gastProductionsCache));this.resyncFollows=t}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var t,e;null!=(e=(t=this.lookaheadStrategy).initialize)&&e.call(t,{rules:u$(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(u$(this.gastProductionsCache))})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!E$(this.definitionErrors))throw t=x(this.definitionErrors,t=>t.
`+t.join(`
-------------------------------
`))})}constructor(t,e){if(this.definitionErrors=[],this.selfAnalysisDone=!1,this.initErrorHandler(e),this.initLexerAdapter(),this.initLooksAhead(e),this.initRecognizerEngine(t,e),this.initRecoverable(e),this.initTreeBuilder(e),this.initContentAssist(),this.initGastRecorder(e),this.initPerformanceTracer(e),b(e,"ignoredIssues"))throw new Error(`The <ignoredIssues> IParserConfig property has been deprecated.
Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
For further details.`);this.skipValidations=(b(e,"skipValidations")?e:Frt).skipValidations}}).DEFER_DEFINITION_ERRORS_HANDLING=!1,Drt(Grt,[Bet,Yet,lrt,crt,urt,hrt,drt,prt,Nrt,Irt]),Urt=class extends Grt{static{Ae(this,"EmbeddedActionsParser")}constructor(t,e=Frt){(e=wO(e)).outputCst=!1,super(t,e)}}}),Yrt=t(()=>{vQ()}),jrt=t(()=>{}),Hrt=t(()=>{Yrt(),jrt()}),Wrt=t(()=>{zZ()}),Vrt=t(()=>{zZ(),qrt(),ttt(),btt(),Jtt(),Uet(),wtt(),Met(),JJ(),vQ(),vQ(),Hrt(),Wrt()});function Xrt(t,e,r){return t.name+`_${e}_`+r}function Krt(e){var r={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]},n=(Zrt(r,e),e.length);for(let t=0;t<n;t++){var i=e[t],a=ont(r,i,i);void 0!==a&&mnt(r,i,a)}return r}function Zrt(e,r){var n=r.length;for(let t=0;t<n;t++){var i=r[t],a=vnt(e,i,void 0,{type:knt}),o=vnt(e,i,void 0,{type:_nt});a.stop=o,e.ruleToStartState.set(i,a),e.ruleToStopState.set(i,o)}}function Qrt(t,e,r){return r instanceof cQ?gnt(t,e,r.terminalType,r):(r instanceof tQ?fnt:r instanceof lQ?nnt:r instanceof nQ?ant:r instanceof oQ?Jrt:r instanceof sQ?tnt:r instanceof iQ?ent:r instanceof aQ?rnt:ont)(t,e,r)}function Jrt(t,e,r){var n=vnt(t,e,r,{type:Ent});return hnt(t,n),lnt(t,e,r,unt(t,e,n,r,ont(t,e,r)))}function tnt(t,e,r){var n=vnt(t,e,r,{type:Ent});return hnt(t,n),lnt(t,e,r,unt(t,e,n,r,ont(t,e,r)),gnt(t,e,r.separator,r))}function ent(t,e,r){var n=vnt(t,e,r,{type:Tnt});return hnt(t,n),snt(t,e,r,unt(t,e,n,r,ont(t,e,r)))}function rnt(t,e,r){var n=vnt(t,e,r,{type:Tnt});return hnt(t,n),snt(t,e,r,unt(t,e,n,r,ont(t,e,r)),gnt(t,e,r.separator,r))}function nnt(e,r,t){var n=vnt(e,r,t,{type:wnt}),i=(hnt(e,n),x(t.definition,t=>Qrt(e,r,t)));return unt(e,r,n,t,...i)}function ant(t,e,r){var n=vnt(t,e,r,{type:wnt});return hnt(t,n),cnt(t,e,r,unt(t,e,n,r,ont(t,e,r)))}function ont(e,r,t){return 1===(t=gF(x(t.definition,t=>Qrt(e,r,t)),t=>void 0!==t)).length?t[0]:0===t.length?void 0:pnt(e,t)}function snt(t,e,r,n,i){var a=n.left,n=n.right,o=vnt(t,e,r,{type:Lnt}),s=(hnt(t,o),vnt(t,e,r,{type:Nnt}));return a.loopback=o,s.loopback=o,ynt(n,t.decisionMap[Xrt(e,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=o),void 0===i?(ynt(o,a),ynt(o,s)):(ynt(o,s),ynt(o,i.left),ynt(i.right,a)),{left:a,right:s}}function lnt(t,e,r,n,i){var a=n.left,n=n.right,o=vnt(t,e,r,{type:Ant}),s=(hnt(t,o),vnt(t,e,r,{type:Nnt})),l=vnt(t,e,r,{type:Snt});return o.loopback=l,s.loopback=l,ynt(o,a),ynt(o,s),ynt(n,l),void 0!==i?(ynt(l,s),ynt(l,i.left),ynt(i.right,a)):ynt(l,o),{left:t.decisionMap[Xrt(e,i?"RepetitionWithSeparator":"Repetition",r.idx)]=o,right:s}}function cnt(t,e,r,n){var i=n.left;return ynt(i,n.right),t.decisionMap[Xrt(e,"Option",r.idx)]=i,n}function hnt(t,e){return t.decisionStates.push(e),e.decision=t.decisionStates.length-1,e.decision}function unt(t,e,r,n,...i){var a,o=vnt(t,e,n,{type:Cnt,start:r});r.end=o;for(a of i)void 0!==a?(ynt(r,a.left),ynt(a.right,o)):ynt(r,o);return i={left:r,right:o},t.decisionMap[Xrt(e,dnt(n),n.idx)]=r,i}function dnt(t){if(t instanceof lQ)return"Alternation";if(t instanceof nQ)return"Option";if(t instanceof oQ)return"Repetition";if(t instanceof sQ)return"RepetitionWithSeparator";if(t instanceof iQ)return"RepetitionMandatory";if(t instanceof aQ)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function pnt(e,r){var n=r.length;for(let t=0;t<n-1;t++){var i,a=r[t],o=(i=1===a.left.transitions.length?a.left.transitions[0]:void 0)instanceof Dnt,s=i,l=r[t+1].left;a.left.type===wnt&&a.right.type===wnt&&void 0!==i&&(o&&s.followState===a.right||i.target===a.right)?(o?s.followState=l:i.target=l,bnt(e,a.right)):ynt(a.right,l)}var t=r[0],c=r[n-1];return{left:t.left,right:c.right}}function gnt(t,e,r,n){var i=vnt(t,e,n,{type:wnt}),t=vnt(t,e,n,{type:wnt});return xnt(i,new Mnt(t,r)),{left:i,right:t}}function fnt(t,e,r){var n=r.referencedRule,i=t.ruleToStartState.get(n),a=vnt(t,e,r,{type:wnt}),t=vnt(t,e,r,{type:wnt});return xnt(a,new Dnt(i,n,t)),{left:a,right:t}}function mnt(t,e,r){var n=t.ruleToStartState.get(e),t=(ynt(n,r.left),t.ruleToStopState.get(e));return ynt(r.right,t),{le
<${e}> may appears as a prefix path in all these alternatives.
`+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
For Further details.`}function Vnt(t){if(t instanceof tQ)return"SUBRULE";if(t instanceof nQ)return"OPTION";if(t instanceof lQ)return"OR";if(t instanceof iQ)return"AT_LEAST_ONE";if(t instanceof aQ)return"AT_LEAST_ONE_SEP";if(t instanceof sQ)return"MANY_SEP";if(t instanceof oQ)return"MANY";if(t instanceof cQ)return"CONSUME";throw Error("non exhaustive match")}function Xnt(t,e,r){return e=PF(e.configs.elements,t=>t.state.transitions),{actualToken:r,possibleTokenTypes:BG(e.filter(t=>t instanceof Mnt).map(t=>t.tokenType),t=>t.tokenTypeIdx),tokenPath:t}}function Knt(t,e){return t.edges[e.tokenTypeIdx]}function Znt(t,e,r){var n,i=new Fnt,a=[];for(n of t.elements)if(!1!==r.is(n.alt))if(n.state.type===_nt)a.push(n);else{var o=n.state.transitions.length;for(let t=0;t<o;t++){var s=Qnt(n.state.transitions[t],e);void 0!==s&&i.add({state:s,alt:n.alt,stack:n.stack})}}let l;if(void 0===(l=0===a.length&&1===i.size?i:l)){l=new Fnt;for(var c of i.elements)iit(c,l)}if(0<a.length&&!oit(l))for(var h of a)l.add(h);return l}function Qnt(t,e){if(t instanceof Mnt&&ott(e,t.tokenType))return t.target}function Jnt(t,e){let r;for(var n of t.elements)if(!0===e.is(n.alt))if(void 0===r)r=n.alt;else if(r!==n.alt)return;return r}function tit(t){return{configs:t,edges:{},isAcceptState:!1,prediction:-1}}function eit(t,e,r,n){return n=rit(t,n),e.edges[r.tokenTypeIdx]=n}function rit(t,e){var r,n;return e===Bnt?e:(r=e.configs.key,void 0!==(n=t.states[r])?n:(e.configs.finalize(),t.states[r]=e))}function nit(e){var r=new Fnt,n=e.transitions.length;for(let t=0;t<n;t++)iit({state:e.transitions[t].target,alt:t,stack:[]},r);return r}function iit(e,r){var t,n=e.state;if(n.type===_nt)0<e.stack.length?iit({state:(t=[...e.stack]).pop(),alt:e.alt,stack:t},r):r.add(e);else{n.epsilonOnlyTransitions||r.add(e);var i=n.transitions.length;for(let t=0;t<i;t++){var a=ait(e,n.transitions[t]);void 0!==a&&iit(a,r)}}}function ait(t,e){var r;return e instanceof Rnt?{state:e.target,alt:t.alt,stack:t.stack}:e instanceof Dnt?(r=[...t.stack,e.followState],{state:e.target,alt:t.alt,stack:r}):void 0}function oit(t){for(var e of t.elements)if(e.state.type===_nt)return!0;return!1}function sit(t){for(var e of t.elements)if(e.state.type!==_nt)return!1;return!0}function lit(t){return!!sit(t)||hit(t=cit(t.elements))&&!uit(t)}function cit(t){var r,n=new Map;for(r of t){let t=Pnt(r,!1),e=n.get(t);void 0===e&&(e={},n.set(t,e)),e[r.alt]=!0}return n}function hit(t){for(var e of Array.from(t.values()))if(1<Object.keys(e).length)return!0;return!1}function uit(t){for(var e of Array.from(t.values()))if(1===Object.keys(e).length)return!0;return!1}var dit,pit,git,fit,mit,yit,vit,xit,bit,wit,kit,Tit,Eit,_it,Cit,Sit,Ait,Lit,Nit,Iit,Mit,Rit,Dit,Oit,Pit,Bit,Fit,$it,zit,Git,Uit,qit,Yit,jit,Hit,Wit,Vit,Xit,Kit,Zit,Qit,Jit,tat,eat,rat,nat,iat,aat,oat,sat,lat,cat,hat,uat,dat,pat,gat,fat,mat,yat,vat,xat,bat,wat,kat,Tat,Eat,_at,Cat,Sat,Aat,Lat,Nat,Iat,Mat,Rat,Dat,Oat,Pat,Bat,Fat,me,$at,zat,Gat,Uat,qat,Yat,jat=t(()=>{Vrt(),Ont(),$nt(),X$(),BF(),FG(),DF(),gR(),JB(),_$(),lG(),Ae(znt,"createDFACache"),dit=class{static{Ae(this,"PredicateSet")}constructor(){this.predicates=[]}is(t){return t>=this.predicates.length||this.predicates[t]}set(t,e){this.predicates[t]=e}toString(){let e="",r=this.predicates.length;for(let t=0;t<r;t++)e+=!0===this.predicates[t]?"1":"0";return e}},pit=new dit,git=class extends zet{static{Ae(this,"LLStarLookaheadStrategy")}constructor(t){super(),this.logging=null!=(t=t?.logging)?t:t=>console.log(t)}initialize(t){this.atn=Krt(t.rules),this.dfas=Unt(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(t){let{prodOccurrence:e,rule:r,hasPredicates:n,dynamicTokensEnabled:i}=t,a=this.dfas,o=this.logging,s=Xrt(r,"Alternation",e),l=this.atn.decisionMap[s].decision,c=x(Ptt({maxLookahead:1,occurrence:e,prodType:"Alternation",rule:r}),t=>x(t,t=>t[0]));if(!Gnt(c,!1)||i)return n?function(e){var r=new dit,n=void 0===e?0:e.length;for(let t=0;t<n;t++){var i=e?.[t].GATE;r.set(t,void 0===i||i.call(this))}var t=qnt.call(this,a,l,r,o);return
`,"\r"===i&&t+1<r.length&&r.charAt(t+1)===`
`&&t++}n&&0<r.length&&e.push(r.length),this._lineOffsets=e}return this._lineOffsets}positionAt(t){t=Math.max(Math.min(t,this._content.length),0);let e=this.getLineOffsets(),r=0,n=e.length;if(0===n)return xit.create(0,t);for(;r<n;){var i=Math.floor((r+n)/2);e[i]>t?n=i:r=i+1}var a=r-1;return xit.create(a,t-e[a])}offsetAt(t){var e,r=this.getLineOffsets();return t.line>=r.length?this._content.length:t.line<0?0:(e=r[t.line],r=t.line+1<r.length?r[t.line+1]:this._content.length,Math.max(Math.min(e+t.character,r),e))}get lineCount(){return this.getLineOffsets().length}};{var O=me=me||{};let n=Object.prototype.toString;function ae(t){return typeof t<"u"}function oe(t){return"u"<typeof t}function se(t){return!0===t||!1===t}function le(t){return"[object String]"===n.call(t)}function ce(t){return"[object Number]"===n.call(t)}function he(t,e,r){return"[object Number]"===n.call(t)&&e<=t&&t<=r}function ue(t){return"[object Number]"===n.call(t)&&-2147483648<=t&&t<=2147483647}function de(t){return"[object Number]"===n.call(t)&&0<=t&&t<=2147483647}function pe(t){return"[object Function]"===n.call(t)}function ge(t){return null!==t&&"object"==typeof t}function fe(t,e){return Array.isArray(t)&&t.every(e)}Ae(ae,"defined"),O.defined=ae,Ae(oe,"undefined"),O.undefined=oe,Ae(se,"boolean"),O.boolean=se,Ae(le,"string"),O.string=le,Ae(ce,"number"),O.number=ce,Ae(he,"numberRange"),O.numberRange=he,Ae(ue,"integer"),O.integer=ue,Ae(de,"uinteger"),O.uinteger=de,Ae(pe,"func"),O.func=pe,Ae(ge,"objectLiteral"),O.objectLiteral=ge,Ae(fe,"typedArray"),O.typedArray=fe}}),Vat=t(()=>{Wat(),MW(),hV(),$at=class{static{Ae(this,"CstNodeBuilder")}constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]}buildRootNode(t){return this.rootNode=new Yat(t),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(t){var e=new Uat;return e.grammarSource=t,e.root=this.rootNode,this.current.content.push(e),this.nodeStack.push(e),e}buildLeafNode(t,e){return(t=new Gat(t.startOffset,t.image.length,HW(t),t.tokenType,!1)).grammarSource=e,t.root=this.rootNode,this.current.content.push(t),t}removeNode(t){var e=t.container;e&&0<=(t=e.content.indexOf(t))&&e.content.splice(t,1)}construct(t){var e=this.current;"string"==typeof t.$type&&(this.current.astNode=t),t.$cstNode=e,0===(t=this.nodeStack.pop())?.content.length&&this.removeNode(t)}addHiddenTokens(t){for(var e of t)(e=new Gat(e.startOffset,e.image.length,HW(e),e.tokenType,!0)).root=this.rootNode,this.addHiddenToken(this.rootNode,e)}addHiddenToken(e,r){var{offset:n,end:i}=r;for(let t=0;t<e.content.length;t++){var a=e.content[t],{offset:o,end:s}=a;if(AW(a)&&o<n&&i<s)return void this.addHiddenToken(a,r);if(i<=o)return void e.content.splice(t,0,r)}e.content.push(r)}},zat=class{static{Ae(this,"AbstractCstNode")}get parent(){return this.container}get feature(){return this.grammarSource}get hidden(){return!1}get astNode(){var t="string"==typeof(null==(t=this._astNode)?void 0:t.$type)?this._astNode:null==(t=this.container)?void 0:t.astNode;if(t)return t;throw new Error("This node has no associated AST element")}set astNode(t){this._astNode=t}get element(){return this.astNode}get text(){return this.root.fullText.substring(this.offset,this.end)}},Gat=class extends zat{static{Ae(this,"LeafCstNodeImpl")}get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(t,e,r,n,i=!1){super(),this._hidden=i,this._offset=t,this._tokenType=n,this._length=e,this._range=r}},Uat=class extends zat{static{Ae(this,"CompositeCstNodeImpl")}constructor(){super(...arguments),this.content=new qat(this)}get children(){return this.content}get offset(){var t;return null!=(t=null==(t=this.firstNonHiddenNode)?void 0:t.offset)?t:0}get length(){return this.end-this.offset}get end(){var t;return null!=(t=null==(t=this.lastNonHiddenNode)?void 0:t.end)?t:0}get range(){var t=this.firstNonHiddenNode,e=this.lastNonHiddenNode;return t&&e?(void
`;case"r":return"\r";case"t":return"\t";case"v":return"\v";case"0":return"\0";default:return t}}function e(t){return"^"===t.charAt(0)?t.substring(1):t}function r(t){return parseInt(t)}function n(t){return BigInt(t)}function i(t){return new Date(t)}function o(t){return Number(t)}function s(t){return"true"===t.toLowerCase()}var l;iK(),BZ(),Lot=class{static{Ae(this,"DefaultValueConverter")}convert(t,e){var r=e.grammarSource;if(rX(r=KV(r)?iZ(r):r)){if(r=r.rule.ref)return this.runConverter(r,t,e);throw new Error("This cst node was not parsed by a rule.")}return t}runConverter(t,e,r){switch(t.name.toUpperCase()){case"INT":return Not.convertInt(e);case"STRING":return Not.convertString(e);case"ID":return Not.convertID(e)}switch(null==(t=CZ(t))?void 0:t.toLowerCase()){case"number":return Not.convertNumber(e);case"boolean":return Not.convertBoolean(e);case"bigint":return Not.convertBigint(e);case"date":return Not.convertDate(e);default:return e}}},l=Not=Not||{},Ae(t,"convertString"),l.convertString=t,Ae(a,"convertEscapeCharacter"),Ae(e,"convertID"),l.convertID=e,Ae(r,"convertInt"),l.convertInt=r,Ae(n,"convertBigint"),l.convertBigint=n,Ae(i,"convertDate"),l.convertDate=i,Ae(o,"convertNumber"),l.convertNumber=o,Ae(s,"convertBoolean"),l.convertBoolean=s}),Dot=jMt(t=>{var e,r;function n(){if(void 0===e)throw new Error("No runtime abstraction layer installed");return e}function i(t){if(void 0===t)throw new Error("No runtime abstraction layer provided");e=t}Object.defineProperty(t,"__esModule",{value:!0}),Ae(n,"RAL"),r=n,Ae(i,"install"),r.install=i,t.default=n}),Oot=jMt(t=>{function e(t){return!0===t||!1===t}function r(t){return"string"==typeof t||t instanceof String}function n(t){return"number"==typeof t||t instanceof Number}function i(t){return t instanceof Error}function a(t){return"function"==typeof t}function o(t){return Array.isArray(t)}function s(t){return o(t)&&t.every(t=>r(t))}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,Ae(e,"boolean"),t.boolean=e,Ae(r,"string"),t.string=r,Ae(n,"number"),t.number=n,Ae(i,"error"),t.error=i,Ae(a,"func"),t.func=a,Ae(o,"array"),t.array=o,Ae(s,"stringArray"),t.stringArray=s}),Pot=jMt(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=e.Event=void 0;var o=Dot();{var r=e.Event={};let t={dispose(){}};r.None=function(){return t}}var i=class{static{Ae(this,"CallbackList")}add(t,e=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(e),Array.isArray(r)&&r.push({dispose:Ae(()=>this.remove(t,e),"dispose")})}remove(n,i=null){if(this._callbacks){let r=!1;for(let t=0,e=this._callbacks.length;t<e;t++)if(this._callbacks[t]===n){if(this._contexts[t]===i)return this._callbacks.splice(t,1),void this._contexts.splice(t,1);r=!0}if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}}invoke(...r){if(!this._callbacks)return[];var n=[],i=this._callbacks.slice(0),a=this._contexts.slice(0);for(let t=0,e=i.length;t<e;t++)try{n.push(i[t].apply(a[t],r))}catch(t){(0,o.default)().console.error(t)}return n}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}},r=class a{static{Ae(this,"Emitter")}constructor(t){this._options=t}get event(){return this._event||(this._event=(t,e,r)=>{this._callbacks||(this._callbacks=new i),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,e);let n={dispose:Ae(()=>{this._callbacks&&(this._callbacks.remove(t,e),n.dispose=a._noop,this._options)&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this)},"dispose")};return Array.isArray(r)&&r.push(n),n}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};(e.Emitter=r)._noop=function(){}}),Bot=jMt(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Cance
`)?`
`:`
`}var Blt,Flt,$lt,zlt,Glt,Ult,qlt,Ylt,jlt,Hlt,Wlt,Vlt,Xlt,Klt,Zlt,Qlt=t(()=>{Wat(),QK(),dst(),Ae(vlt,"parseJSDoc"),Ae(xlt,"isJSDoc"),Ae(blt,"getLines"),Blt=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,Flt=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu,Ae(wlt,"tokenize"),Ae(klt,"buildInlineTokens"),$lt=/\S/,zlt=/\s*$/,Ae(Tlt,"skipWhitespace"),Ae(Elt,"lastCharacter"),Ae(_lt,"parseJSDocComment"),Ae(Clt,"parseJSDocElement"),Ae(Slt,"appendEmptyLine"),Ae(Alt,"parseJSDocText"),Ae(Llt,"parseJSDocInline"),Ae(Nlt,"parseJSDocTag"),Ae(Ilt,"parseJSDocLine"),Ae(Mlt,"normalizeOptions"),Ae(Rlt,"normalizeOption"),Glt=class{static{Ae(this,"JSDocCommentImpl")}constructor(t,e){this.elements=t,this.range=e}getTag(e){return this.getAllTags().find(t=>t.name===e)}getTags(e){return this.getAllTags().filter(t=>t.name===e)}getAllTags(){return this.elements.filter(t=>"name"in t)}toString(){let t="";for(var e of this.elements)0===t.length?t=e.toString():(e=e.toString(),t+=Plt(t)+e);return t.trim()}toMarkdown(t){let e="";for(var r of this.elements)0===e.length?e=r.toMarkdown(t):(r=r.toMarkdown(t),e+=Plt(e)+r);return e.trim()}},Ult=class{static{Ae(this,"JSDocTagImpl")}constructor(t,e,r,n){this.name=t,this.content=e,this.inline=r,this.range=n}toString(){let t="@"+this.name,e=this.content.toString();return 1===this.content.inlines.length?t=t+" "+e:1<this.content.inlines.length&&(t=t+`
`+e),this.inline?`{${t}}`:t}toMarkdown(t){var e;return null!=(e=null==(e=t?.renderTag)?void 0:e.call(t,this))?e:this.toMarkdownDefault(t)}toMarkdownDefault(t){var e=this.content.toMarkdown(t);if(this.inline){var r=Dlt(this.name,e,t??{});if("string"==typeof r)return r}let n="",i=("italic"===t?.tag||void 0===t?.tag?n="*":"bold"===t?.tag?n="**":"bold-italic"===t?.tag&&(n="***"),n+"@"+this.name+n);return 1===this.content.inlines.length?i=i+" — "+e:1<this.content.inlines.length&&(i=i+`
`+e),this.inline?`{${i}}`:i}},Ae(Dlt,"renderInlineTag"),Ae(Olt,"renderLinkDefault"),qlt=class{static{Ae(this,"JSDocTextImpl")}constructor(t,e){this.inlines=t,this.range=e}toString(){let e="";for(let t=0;t<this.inlines.length;t++){var r=this.inlines[t],n=this.inlines[t+1];e+=r.toString(),n&&n.range.start.line>r.range.start.line&&(e+=`
`)}return e}toMarkdown(e){let r="";for(let t=0;t<this.inlines.length;t++){var n=this.inlines[t],i=this.inlines[t+1];r+=n.toMarkdown(e),i&&i.range.start.line>n.range.start.line&&(r+=`
`)}return r}},Ylt=class{static{Ae(this,"JSDocLineImpl")}constructor(t,e){this.text=t,this.range=e}toString(){return this.text}toMarkdown(){return this.text}},Ae(Plt,"fillNewlines")}),Jlt=t(()=>{bK(),Qlt(),jlt=class{static{Ae(this,"JSDocDocumentationProvider")}constructor(t){this.indexManager=t.shared.workspace.IndexManager,this.commentProvider=t.documentation.CommentProvider}getDocumentation(r){var t=this.commentProvider.getComment(r);if(t&&xlt(t))return vlt(t).toMarkdown({renderLink:Ae((t,e)=>this.documentationLinkRenderer(r,t,e),"renderLink"),renderTag:Ae(t=>this.documentationTagRenderer(r,t),"renderTag")})}documentationLinkRenderer(t,e,r){var n=null!=(n=this.findNameInPrecomputedScopes(t,e))?n:this.findNameInGlobalScope(t,e);return n&&n.nameSegment?(t=n.nameSegment.range.start.line+1,e=n.nameSegment.range.start.character+1,`[${r}](${n.documentUri.with({fragment:`L${t},`+e}).toString()})`):void 0}documentationTagRenderer(t,e){}findNameInPrecomputedScopes(e,r){var n=cK(e).precomputedScopes;if(n){let t=e;do{var i=n.get(t).find(t=>t.name===r);if(i)return i}while(t=t.$container)}}findNameInGlobalScope(t,e){return this.indexManager.allElements().find(t=>t.name===e)}}}),tct=t(()=>{Gst(),hV(),Hlt=class{static{Ae(this,"DefaultCommentProvider")}constructor(t){this.grammarConfig=()=>t.parser.GrammarConfig}getComment(t){return Bst(t)?t.$comment:null==(t=ZW(t.$cstNode,this.grammarConfig().multilineCommentRules))?void 0:t.text}}}),ect={},rct=t(()=>{et(ect,rt(Pot(),1))}),nct=t(()=>{Xot(),rct(),Wlt=class{static{Ae(this,"DefaultAsyncParser")}constructor(t){this.syncParser=t.parser.LangiumParser}parse(t){return Promise.resolve(this.syncParser.parse(t))}},Vlt=class{static{Ae(this,"AbstractThreadedAsyncParser")}constructor(t){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=t.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length<this.threadCount;){let e=this.createWorker();e.onReady(()=>{var t;0<this.queue.length&&(t=this.queue.shift())&&(e.lock(),t.resolve(e))}),this.workerPool.push(e)}}async parse(t,e){let r=await this.acquireParserWorker(e),n=new Vot,i,a=e.onCancellationRequested(()=>{i=setTimeout(()=>{this.terminateWorker(r)},this.terminationDelay)});return r.parse(t).then(t=>{t=this.hydrator.hydrate(t),n.resolve(t)}).catch(t=>{n.reject(t)}).finally(()=>{a.dispose(),clearTimeout(i)}),n.promise}terminateWorker(t){t.terminate(),0<=(t=this.workerPool.indexOf(t))&&this.workerPool.splice(t,1)}async acquireParserWorker(t){this.initializeWorkers();for(var e of this.workerPool)if(e.ready)return e.lock(),e;let r=new Vot;return t.onCancellationRequested(()=>{var t=this.queue.indexOf(r);0<=t&&this.queue.splice(t,1),r.reject(Wot)}),this.queue.push(r),r.promise}},Xlt=class{static{Ae(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(t,e,r,n){this.onReadyEmitter=new ect.Emitter,this.deferred=new Vot,this._ready=!0,this._parsing=!1,this.sendMessage=t,this._terminate=n,e(t=>{this.deferred.resolve(t),this.unlock()}),r(t=>{this.deferred.reject(t),this.unlock()})}terminate(){this.deferred.reject(Wot),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(t){if(this._parsing)throw new Error("Parser worker is busy");return this._parsing=!0,this.deferred=new Vot,this.sendMessage(t),this.deferred.promise}}}),ict=t(()=>{$ot(),Xot(),Klt=class{static{Ae(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new Fot.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(t){this.cancelWrite();var e=new Fot.CancellationTokenSource;return this.previousTokenSource=e,this.enqueue(this.writeQueue,t,e.token)}read(t){return this.enqueue(this.readQueue,t)}enqueue(t,e,r){var n=new Vot,e={action:e,deferred:n,cancellationToken:r??Fot.CancellationToken.None};return t.push(e),this.performNextOperation(),n.promise}async performNextOperation(){if(this.done){var t=[];if(0<this.writeQueue.length)t.push(this.writeQueue.shift());else{if(!(0<this.readQueue.length))retur
`):void 0:void 0}},Eht=class extends Tht{static{Ae(this,"CommonValueConverter")}static{Qct(this,"CommonValueConverter")}runCustomConverter(t,e,r){}},class extends(_ht=class extends Aot{static{Ae(this,"AbstractMermaidTokenBuilder")}static{Qct(this,"AbstractMermaidTokenBuilder")}constructor(t){super(),this.keywords=new Set(t)}buildKeywordTokens(t,e,r){return(t=super.buildKeywordTokens(t,e,r)).forEach(t=>{this.keywords.has(t.name)&&void 0!==t.PATTERN&&(t.PATTERN=new RegExp(t.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),t}}){static{Ae(this,"CommonTokenBuilder")}static{Qct(this,"CommonTokenBuilder")}}});function Sht(t=vct){var t=cct(sct(t),mht),e=cct(oct({shared:t}),wht,Lht);return t.ServiceRegistry.register(e),{shared:t,GitGraph:e}}var Aht,Lht,Nht=t(()=>{Cht(),$ct(),Aht=class extends _ht{static{Ae(this,"GitGraphTokenBuilder")}static{Qct(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},Lht={parser:{TokenBuilder:Qct(()=>new Aht,"TokenBuilder"),ValueConverter:Qct(()=>new Eht,"ValueConverter")}},Ae(Sht,"createGitGraphServices"),Qct(Sht,"createGitGraphServices")});function Iht(t=vct){var t=cct(sct(t),mht),e=cct(oct({shared:t}),yht,Rht);return t.ServiceRegistry.register(e),{shared:t,Info:e}}var Mht,Rht,Dht=t(()=>{Cht(),$ct(),Mht=class extends _ht{static{Ae(this,"InfoTokenBuilder")}static{Qct(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},Rht={parser:{TokenBuilder:Qct(()=>new Mht,"TokenBuilder"),ValueConverter:Qct(()=>new Eht,"ValueConverter")}},Ae(Iht,"createInfoServices"),Qct(Iht,"createInfoServices")});function Oht(t=vct){var t=cct(sct(t),mht),e=cct(oct({shared:t}),vht,Bht);return t.ServiceRegistry.register(e),{shared:t,Packet:e}}var Pht,Bht,Fht=t(()=>{Cht(),$ct(),Pht=class extends _ht{static{Ae(this,"PacketTokenBuilder")}static{Qct(this,"PacketTokenBuilder")}constructor(){super(["packet-beta"])}},Bht={parser:{TokenBuilder:Qct(()=>new Pht,"TokenBuilder"),ValueConverter:Qct(()=>new Eht,"ValueConverter")}},Ae(Oht,"createPacketServices"),Qct(Oht,"createPacketServices")});function $ht(t=vct){var t=cct(sct(t),mht),e=cct(oct({shared:t}),xht,Uht);return t.ServiceRegistry.register(e),{shared:t,Pie:e}}var zht,Ght,Uht,qht=t(()=>{Cht(),$ct(),zht=class extends _ht{static{Ae(this,"PieTokenBuilder")}static{Qct(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},Ght=class extends Tht{static{Ae(this,"PieValueConverter")}static{Qct(this,"PieValueConverter")}runCustomConverter(t,e,r){if("PIE_SECTION_LABEL"===t.name)return e.replace(/"/g,"").trim()}},Uht={parser:{TokenBuilder:Qct(()=>new zht,"TokenBuilder"),ValueConverter:Qct(()=>new Ght,"ValueConverter")}},Ae($ht,"createPieServices"),Qct($ht,"createPieServices")});function Yht(t=vct){var t=cct(sct(t),mht),e=cct(oct({shared:t}),bht,Wht);return t.ServiceRegistry.register(e),{shared:t,Architecture:e}}var jht,Hht,Wht,Vht=t(()=>{Cht(),$ct(),jht=class extends _ht{static{Ae(this,"ArchitectureTokenBuilder")}static{Qct(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},Hht=class extends Tht{static{Ae(this,"ArchitectureValueConverter")}static{Qct(this,"ArchitectureValueConverter")}runCustomConverter(t,e,r){return"ARCH_ICON"===t.name?e.replace(/[()]/g,"").trim():"ARCH_TEXT_ICON"===t.name?e.replace(/["()]/g,""):"ARCH_TITLE"===t.name?e.replace(/[[\]]/g,"").trim():void 0}},Wht={parser:{TokenBuilder:Qct(()=>new jht,"TokenBuilder"),ValueConverter:Qct(()=>new Hht,"ValueConverter")}},Ae(Yht,"createArchitectureServices"),Qct(Yht,"createArchitectureServices")}),Xht={},Kht=(J(Xht,{InfoModule:()=>Rht,createInfoServices:()=>Iht}),t(()=>{Dht(),Cht()})),Zht={},Qht=(J(Zht,{PacketModule:()=>Bht,createPacketServices:()=>Oht}),t(()=>{Fht(),Cht()})),Jht={},tut=(J(Jht,{PieModule:()=>Uht,createPieServices:()=>$ht}),t(()=>{qht(),Cht()})),eut={},rut=(J(eut,{ArchitectureModule:()=>Wht,createArchitectureServices:()=>Yht}),t(()=>{Vht(),Cht()})),nut={},iut=(J(nut,{GitGraphModule:()=>Lht,createGitGraphServices:()=>Sht}),t(()=>{Nht(),Cht()}));async function aut(t,e){var r=sut[t];if(!r)throw new Error("Unknown diagram type: "+t);if(out[t]||await r(),0<(r=out[t].par
`)} `+t.parserErrors.map(t=>t.message).join(`
`)),this.result=t}static{Qct(this,"MermaidParseError")}}});function hut(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}var uut,dut,put=t(()=>{Ae(hut,"populateCommonDb")}),gut=t(()=>{uut={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4}}),fut=t(()=>{dut=class{constructor(t){this.init=t,this.records=this.init()}static{Ae(this,"ImperativeState")}reset(){this.records=this.init()}}});function mut(){return O8({length:7})}function yut(t,n){let i=Object.create(null);return t.reduce((t,e)=>{var r=n(e);return i[r]||(i[r]=!0,t.push(e)),t},[])}function vut(t,e,r){-1===(e=t.indexOf(e))?t.push(r):t.splice(e,1,r)}function xut(t){let e=t.reduce((t,e)=>t.seq>e.seq?t:e,t[0]),r="";t.forEach(function(t){t===e?r+="\t*":r+="\t|"});var n,i=[r,e.id,e.seq];for(n in w.records.branches)w.records.branches.get(n)===e.id&&i.push(n);if(R.debug(i.join(" ")),e.parents&&2==e.parents.length&&e.parents[0]&&e.parents[1]){var a=w.records.commits.get(e.parents[0]);vut(t,e,a),e.parents[1]&&t.push(w.records.commits.get(e.parents[1]))}else{if(0==e.parents.length)return;e.parents[0]&&(a=w.records.commits.get(e.parents[0]),vut(t,e,a))}xut(t=yut(t,t=>t.id))}var but,wut,w,kut,Tut,Eut,_ut,Cut,Sut,Aut,Lut,Nut,Iut,Mut,Rut,Dut,Out,Put,But,Fut,$ut,zut,Gut,Uut,qut,Yut,jut,Hut,Wut,Vut,Xut,Kut,Zut,Qut,Jut,tdt,edt,rdt,ndt,idt,adt,odt,sdt,ldt,cdt,hdt,udt,ddt,pdt,gdt,fdt,mdt,ydt,vdt,xdt,bdt,wdt,kdt,Tdt,Edt,_dt,Cdt,Sdt=t(()=>{e(),K8(),Mn(),tc(),fh(),gut(),fut(),Nn(),but=xr.gitGraph,wut=Ae(()=>b8({...but,...Rr().gitGraph}),"getConfig"),w=new dut(()=>{var t=(e=wut()).mainBranchName,e=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:e}]]),branches:new Map([[t,null]]),currBranch:t,direction:"LR",seq:0,options:{}}}),Ae(mut,"getID"),Ae(yut,"uniqBy"),kut=Ae(function(t){w.records.direction=t},"setDirection"),Tut=Ae(function(t){R.debug("options str",t),t=t?.trim()||"{}";try{w.records.options=JSON.parse(t)}catch(t){R.error("error while parsing gitGraph options",t.message)}},"setOptions"),Eut=Ae(function(){return w.records.options},"getOptions"),_ut=Ae(function(t){let e=t.msg,r=t.id,n=t.type,i=t.tags,a=(R.info("commit",e,r,n,i),R.debug("Entering commit:",e,r,n,i),wut());r=L.sanitizeText(r,a),e=L.sanitizeText(e,a),i=i?.map(t=>L.sanitizeText(t,a)),t={id:r||w.records.seq+"-"+mut(),message:e,seq:w.records.seq++,type:n??uut.NORMAL,tags:i??[],parents:null==w.records.head?[]:[w.records.head.id],branch:w.records.currBranch},w.records.head=t,R.info("main branch",a.mainBranchName),w.records.commits.set(t.id,t),w.records.branches.set(w.records.currBranch,t.id),R.debug("in pushCommit "+t.id)},"commit"),Cut=Ae(function(t){var e=t.name,t=t.order,e=L.sanitizeText(e,wut());if(w.records.branches.has(e))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${e}")`);w.records.branches.set(e,null!=w.records.head?w.records.head.id:null),w.records.branchConfig.set(e,{name:e,order:t}),Lut(e),R.debug("in createBranch")},"branch"),Sut=Ae(t=>{var e=t.branch,r=t.id,n=t.type,i=t.tags,a=wut(),e=L.sanitizeText(e,a),r=r&&L.sanitizeText(r,a),t=w.records.branches.get(w.records.currBranch),a=w.records.branches.get(e),t=t?w.records.commits.get(t):void 0,o=a?w.records.commits.get(a):void 0;if(t&&o&&t.branch===e)throw new Error(`Cannot merge branch '${e}' into itself.`);if(w.records.currBranch===e)throw(s=new Error('Incorrect usage of "merge". Cannot merge a branch to itself')).hash={text:"merge "+e,token:"merge "+e,expected:["branch abc"]},s;if(void 0===t||!t)throw(s=new Error(`Incorrect usage of "merge". Current branch (${w.records.currBranch})has no commits`)).hash={text:"merge "+e,token:"merge "+e,expected:["commit"]},s;if(!w.records.branches.has(e))throw(s=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") does not exist")).hash={text:"merge "+e,token:"merge "+e,expected:["branch "+e]},s;if(void 0===o||!o)throw(s=new Error('Incorrect usage of "merge". Branch to be merged ('+e+")
${s-e/2-2},${2+y}
${s-e/2-2},${y-2}
${o.posWithOffset-e/2-4},${y-m-2}
${o.posWithOffset+e/2+4},${y-m-2}
${o.posWithOffset+e/2+4},${y+m+2}
${o.posWithOffset-e/2-4},`+(y+m+2)),p.attr("cy",y).attr("cx",s-e/2+2).attr("r",1.5).attr("class","tag-hole"),"TB"!==tdt&&"BT"!==tdt||(y=s+f,g.attr("class","tag-label-bkg").attr("points",`
${o.x},${y+2}
${o.x},${y-2}
${o.x+10},${y-m-2}
${o.x+10+e+4},${y-m-2}
${o.x+10+e+4},${y+m+2}
${o.x+10},`+(y+m+2)).attr("transform","translate(12,12) rotate(45, "+o.x+","+s+")"),p.attr("cx",o.x+2).attr("cy",y).attr("transform","translate(12,12) rotate(45, "+o.x+","+s+")"),d.attr("x",o.x+5).attr("y",y+3).attr("transform","translate(14,14) rotate(45, "+o.x+","+s+")"))}}},"drawCommitTags"),pdt=Ae(t=>{switch(t.customType??t.type){case uut.NORMAL:return"commit-normal";case uut.REVERSE:return"commit-reverse";case uut.HIGHLIGHT:return"commit-highlight";case uut.MERGE:return"commit-merge";case uut.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),gdt=Ae((t,e,r,n)=>{var i,a={x:0,y:0};return 0<t.parents.length?(i=ndt(t.parents))?(i=n.get(i)??a,"TB"===e?i.y+40:"BT"===e?(n.get(t.id)??a).y-40:i.x+40):0:"TB"===e?30:"BT"===e?(n.get(t.id)??a).y-40:0},"calculatePosition"),fdt=Ae((t,e,r)=>{var r="BT"===tdt&&r?e:e+10,e="TB"===tdt||"BT"===tdt?r:Xut.get(t.branch)?.pos,n="TB"===tdt||"BT"===tdt?Xut.get(t.branch)?.pos:r;if(void 0===n||void 0===e)throw new Error("Position were undefined for commit "+t.id);return{x:n,y:e,posWithOffset:r}},"getCommitPosition"),mdt=Ae((t,a,o)=>{if(!Vut)throw new Error("GitGraph config not found");let s=t.append("g").attr("class","commit-bullets"),l=t.append("g").attr("class","commit-labels"),c="TB"===tdt||"BT"===tdt?30:0,e=[...a.keys()],h=Vut?.parallelCommits??!1,r=Ae((t,e)=>(t=a.get(t)?.seq,e=a.get(e)?.seq,void 0!==t&&void 0!==e?t-e:0),"sortKeys"),n=e.sort(r);"BT"===tdt&&(h&&adt(n,a,c),n=n.reverse()),n.forEach(t=>{var e=a.get(t);if(!e)throw new Error("Commit not found for key "+t);h&&(c=gdt(e,tdt,c,Kut));var r,n,i,t=fdt(e,c,h);o&&(r=pdt(e),n=e.customType??e.type,i=Xut.get(e.branch)?.index??0,hdt(s,e,t,r,i,n),udt(l,e,t,c),ddt(l,e,t,c)),"TB"===tdt||"BT"===tdt?Kut.set(e.id,{x:t.x,y:t.posWithOffset}):Kut.set(e.id,{x:t.posWithOffset,y:t.y}),(c="BT"===tdt&&h?c+40:c+40+10)>Jut&&(Jut=c)})},"drawCommits"),ydt=Ae((e,r,t,n,i)=>{let a=(("TB"===tdt||"BT"===tdt?t.x<n.x:t.y<n.y)?r:e).branch,o=Ae(t=>t.branch===a,"isOnBranchToGetCurve"),s=Ae(t=>t.seq>e.seq&&t.seq<r.seq,"isBetweenCommits");return[...i.values()].some(t=>s(t)&&o(t))},"shouldRerouteArrow"),vdt=Ae((t,e,r=0)=>{let n=t+Math.abs(t-e)/2;var i;return 5<r?n:Qut.every(t=>10<=Math.abs(t-n))?(Qut.push(n),n):(i=Math.abs(t-e),vdt(t,e-i/5,r+1))},"findLane"),xdt=Ae((t,e,r,n)=>{var i,a=Kut.get(e.id),o=Kut.get(r.id);if(void 0===a||void 0===o)throw new Error(`Commit positions not found for commits ${e.id} and `+r.id);let s=ydt(e,r,a,o,n),l="",c="",h=0,u=0,d=Xut.get(r.branch)?.index;r.type===uut.MERGE&&e.id!==r.parents[0]&&(d=Xut.get(e.branch)?.index);let p;if(s?(l="A 10 10, 0, 0, 0,",c="A 10 10, 0, 0, 1,",h=10,u=10,n=a.y<o.y?vdt(a.y,o.y):vdt(o.y,a.y),i=a.x<o.x?vdt(a.x,o.x):vdt(o.x,a.x),p="TB"===tdt?a.x<o.x?`M ${a.x} ${a.y} L ${i-h} ${a.y} ${c} ${i} ${a.y+u} L ${i} ${o.y-h} ${l} ${i+u} ${o.y} L ${o.x} `+o.y:(d=Xut.get(e.branch)?.index,`M ${a.x} ${a.y} L ${i+h} ${a.y} ${l} ${i} ${a.y+u} L ${i} ${o.y-h} ${c} ${i-u} ${o.y} L ${o.x} `+o.y):"BT"===tdt?a.x<o.x?`M ${a.x} ${a.y} L ${i-h} ${a.y} ${l} ${i} ${a.y-u} L ${i} ${o.y+h} ${c} ${i+u} ${o.y} L ${o.x} `+o.y:(d=Xut.get(e.branch)?.index,`M ${a.x} ${a.y} L ${i+h} ${a.y} ${c} ${i} ${a.y-u} L ${i} ${o.y+h} ${l} ${i-u} ${o.y} L ${o.x} `+o.y):a.y<o.y?`M ${a.x} ${a.y} L ${a.x} ${n-h} ${l} ${a.x+u} ${n} L ${o.x-h} ${n} ${c} ${o.x} ${n+u} L ${o.x} `+o.y:(d=Xut.get(e.branch)?.index,`M ${a.x} ${a.y} L ${a.x} ${n+h} ${c} ${a.x+u} ${n} L ${o.x-h} ${n} ${l} ${o.x} ${n-u} L ${o.x} `+o.y)):(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,"TB"===tdt?(a.x<o.x&&(p=r.type===uut.MERGE&&e.id!==r.parents[0]?`M ${a.x} ${a.y} L ${a.x} ${o.y-h} ${l} ${a.x+u} ${o.y} L ${o.x} `+o.y:`M ${a.x} ${a.y} L ${o.x-h} ${a.y} ${c} ${o.x} ${a.y+u} L ${o.x} `+o.y),a.x>o.x&&(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,p=r.type===uut.MERGE&&e.id!==r.parents[0]?`M ${a.x} ${a.y} L ${a.x} ${o.y-h} ${c} ${a.x-u} ${o.y} L ${o.x} `+o.y:`M ${a.x} ${a.y} L ${o.x+h} ${a.y} ${l} ${o.x} ${a.y+u} L ${o.x} `+o.y),a.x===o.x&&(p=`M ${a.x} ${a.y} L ${o.x} `+o.y)):"BT"===tdt?(a.x<o.x&&(p=r.type===uut.MERGE&&e.id!==r.parent
`,"id:",e,r),!Vut)throw new Error("GitGraph config not found");let o=Vut.rotateCommitLabel??!1,i=n.db,s=(Zut=i.getCommits(),t=i.getBranchesAsObjArray(),tdt=i.getDirection(),O(`[id="${e}"]`)),l=0;t.forEach((t,e)=>{var r=rdt(t.name),n=s.append("g"),i=n.insert("g").attr("class","branchLabel"),a=i.insert("g").attr("class","label branch-label"),r=(a.node()?.appendChild(r),r.getBBox());l=kdt(t.name,l,e,r,o),a.remove(),i.remove(),n.remove()}),mdt(s,Zut,!1),Vut.showBranches&&wdt(s,t),bdt(s,Zut),mdt(s,Zut,!0),H8.insertTitle(s,"gitTitleText",Vut.titleTopMargin??0,i.getDiagramTitle()),bc(void 0,s,Vut.diagramPadding,Vut.useMaxWidth)},"draw"),Edt={draw:Tdt}}),Ndt=t(()=>{_dt=Ae(e=>`
.commit-id,
.commit-msg,
.branch-label {
fill: lightgrey;
color: lightgrey;
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
}
${[0,1,2,3,4,5,6,7].map(t=>`
.branch-label${t} { fill: ${e["gitBranchLabel"+t]}; }
.commit${t} { stroke: ${e["git"+t]}; fill: ${e["git"+t]}; }
.commit-highlight${t} { stroke: ${e["gitInv"+t]}; fill: ${e["gitInv"+t]}; }
.label${t} { fill: ${e["git"+t]}; }
.arrow${t} { stroke: ${e["git"+t]}; }
`).join(`
`)}
.branch {
stroke-width: 1;
stroke: ${e.lineColor};
stroke-dasharray: 2;
}
.commit-label { font-size: ${e.commitLabelFontSize}; fill: ${e.commitLabelColor};}
.commit-label-bkg { font-size: ${e.commitLabelFontSize}; fill: ${e.commitLabelBackground}; opacity: 0.5; }
.tag-label { font-size: ${e.tagLabelFontSize}; fill: ${e.tagLabelColor};}
.tag-label-bkg { fill: ${e.tagLabelBackground}; stroke: ${e.tagLabelBorder}; }
.tag-hole { fill: ${e.textColor}; }
.commit-merge {
stroke: ${e.primaryColor};
fill: ${e.primaryColor};
}
.commit-reverse {
stroke: ${e.primaryColor};
fill: ${e.primaryColor};
stroke-width: 3;
}
.commit-highlight-outer {
}
.commit-highlight-inner {
stroke: ${e.primaryColor};
fill: ${e.primaryColor};
}
.arrow { stroke-width: 8; stroke-linecap: round; fill: none}
.gitTitleText {
text-anchor: middle;
font-size: 18px;
fill: ${e.textColor};
}
`,"getStyles"),Cdt=_dt}),Idt={};J(Idt,{diagram:()=>Mdt});var Mdt,Rdt,Ddt,Odt=t(()=>{Adt(),Sdt(),Ldt(),Ndt(),Mdt={parser:Wut,db:$ut,renderer:Edt,styles:Cdt}}),Pdt=t(()=>{function t(){this.yy={}}var e=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],i=[1,27],a=[1,28],o=[1,29],s=[1,30],l=[1,31],c=[1,32],h=[1,33],u=[1,34],d=[1,9],p=[1,10],g=[1,11],f=[1,12],m=[1,13],y=[1,14],v=[1,15],x=[1,16],b=[1,19],w=[1,20],k=[1,21],T=[1,22],E=[1,23],_=[1,25],C=[1,35],n={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:Ae(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:n.setWeekday("monday");break;case 9:n.setWeekday("tuesday");break;case 10:n.setWeekday("wednesday");break;case 11:n.setWeekday("thursday");break;case 12:n.setWeekday("friday");break;case 13:n.setWeekday("saturday");break;case 14:n.setWeekday("sunday");break;case 15:n.setWeekend("friday");break;case 16:n.setWeekend("saturday");break;case 17:n.setDateFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 18:n.enableInclusiveEndDates(),this.$=a[s].substr(18);break;case 19:n.TopAxis(),this.$=a[s].substr(8);break;case 20:n.setAxisFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 21:n.setTickInterval(a[s].substr(13)),this.$=a[s].substr(13);break;case 22:n.setExcludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 23:n.setIncludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 24:n.setTodayMarker(a[s].substr(12)),this.$=a[s].substr(12);break;case 27:n.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 28:this.$=a[s].trim(),n.setAccTitle(this.$);break;case 29:case 30:this.$=a[s].trim(),n.setAccDescription(this.$);break;case 31:n.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 33:n.addTask(a[s-1],a[s]),this.$="task";break;case 34:this.$=a[s-1],n.setClickEvent(a[s-1],a[s],null);break;case 35:this.$=a[s-2],n.setClickEvent(a[s-2],a[s-1],a[s]);break;case 36:this.$=a[s-2],n.setClickEvent(a[s-2],a[s-1],null),n.setLink(a[s-2],a[s]);break;case 37:this.$=a[s-3],n.setClickEvent(a[s-3],a[s-2],a[s-1]),n.setLink(a[s-3],a[s]);break;case 38:this.$=a[s-2],n.setClickEvent(a[s-2],a[s],null),n.setLink(a[s-2],a[s-1]);break;case 39:this.$=a[s-3],n.setClickEvent(a[s-3],a[s-1],a[s]),n.setLink(a[s-3],a[s-2]);break;case 40:this.$=a[s-1],n.setLink(a[s-1],a[s]);break;case 41
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),o.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],C.$=a[a.length-E],C._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(C._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),typeof(_=this.performAction.apply(C,[l,h,c,f.yy,k[1],a,o].concat(p)))<"u")return _;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(C.$),o.push(C._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},i={EOF:1,parseError:Ae(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:Ae(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},"setInput"),input:Ae(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:Ae(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),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:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:Ae(function(){return this._more=!0,this},"more"),reject:Ae(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:Ae(function(t){this.unput(this.match.slice(t))},"less"),pastInput:Ae(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:Ae(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:Ae(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+e+"^"},"showPosition"),test_match:Ae(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={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)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:Ae(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:Ae(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:Ae(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:Ae(function(t){this.begin(t)},"pushState"),stateStackSize:Ae(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:Ae(function(t,e,r,n){switch(r){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:case 9:case 10:break;case 11:return 10;case 12:case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};n.lexer=i,Ae(t,"Parser"),(Rdt=new((t.prototype=n).Parser=t)).parser=Rdt,Ddt=Rdt}),Bdt=jMt((t,e)=>{function r(){return function(t,e,i){var a=Ae(function(t){return t.add(4-t.isoWeekday(),"day")},"a"),o=((e=e.prototype).isoWeekYear=function(){return a(this).year()},e.isoWeek=function(t){var e,r,n;return this.$utils().u(t)?(r=a(this),n=this.isoWeekYear(),e=4-
.mermaid-main-font {
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
}
.exclude-range {
fill: ${t.excludeBkgColor};
}
.section {
stroke: none;
opacity: 0.2;
}
.section0 {
fill: ${t.sectionBkgColor};
}
.section2 {
fill: ${t.sectionBkgColor2};
}
.section1,
.section3 {
fill: ${t.altSectionBkgColor};
opacity: 0.2;
}
.sectionTitle0 {
fill: ${t.titleColor};
}
.sectionTitle1 {
fill: ${t.titleColor};
}
.sectionTitle2 {
fill: ${t.titleColor};
}
.sectionTitle3 {
fill: ${t.titleColor};
}
.sectionTitle {
text-anchor: start;
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
}
/* Grid and axis */
.grid .tick {
stroke: ${t.gridColor};
opacity: 0.8;
shape-rendering: crispEdges;
}
.grid .tick text {
font-family: ${t.fontFamily};
fill: ${t.textColor};
}
.grid path {
stroke-width: 0;
}
/* Today line */
.today {
fill: none;
stroke: ${t.todayLineColor};
stroke-width: 2px;
}
/* Task styling */
/* Default task */
.task {
stroke-width: 2;
}
.taskText {
text-anchor: middle;
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
}
.taskTextOutsideRight {
fill: ${t.taskTextDarkColor};
text-anchor: start;
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
}
.taskTextOutsideLeft {
fill: ${t.taskTextDarkColor};
text-anchor: end;
}
/* Special case clickable */
.task.clickable {
cursor: pointer;
}
.taskText.clickable {
cursor: pointer;
fill: ${t.taskTextClickableColor} !important;
font-weight: bold;
}
.taskTextOutsideLeft.clickable {
cursor: pointer;
fill: ${t.taskTextClickableColor} !important;
font-weight: bold;
}
.taskTextOutsideRight.clickable {
cursor: pointer;
fill: ${t.taskTextClickableColor} !important;
font-weight: bold;
}
/* Specific task settings for the sections*/
.taskText0,
.taskText1,
.taskText2,
.taskText3 {
fill: ${t.taskTextColor};
}
.task0,
.task1,
.task2,
.task3 {
fill: ${t.taskBkgColor};
stroke: ${t.taskBorderColor};
}
.taskTextOutside0,
.taskTextOutside2
{
fill: ${t.taskTextOutsideColor};
}
.taskTextOutside1,
.taskTextOutside3 {
fill: ${t.taskTextOutsideColor};
}
/* Active task */
.active0,
.active1,
.active2,
.active3 {
fill: ${t.activeTaskBkgColor};
stroke: ${t.activeTaskBorderColor};
}
.activeText0,
.activeText1,
.activeText2,
.activeText3 {
fill: ${t.taskTextDarkColor} !important;
}
/* Completed task */
.done0,
.done1,
.done2,
.done3 {
stroke: ${t.doneTaskBorderColor};
fill: ${t.doneTaskBkgColor};
stroke-width: 2;
}
.doneText0,
.doneText1,
.doneText2,
.doneText3 {
fill: ${t.taskTextDarkColor} !important;
}
/* Tasks on the critical line */
.crit0,
.crit1,
.crit2,
.crit3 {
stroke: ${t.critBorderColor};
fill: ${t.critBkgColor};
stroke-width: 2;
}
.activeCrit0,
.activeCrit1,
.activeCrit2,
.activeCrit3 {
stroke: ${t.critBorderColor};
fill: ${t.activeTaskBkgColor};
stroke-width: 2;
}
.doneCrit0,
.doneCrit1,
.doneCrit2,
.doneCrit3 {
stroke: ${t.critBorderColor};
fill: ${t.doneTaskBkgColor};
stroke-width: 2;
cursor: pointer;
shape-rendering: crispEdges;
}
.milestone {
transform: rotate(45deg) scale(0.8,0.8);
}
.milestoneText {
font-style: italic;
}
.doneCritText0,
.doneCritText1,
.doneCritText2,
.doneCritText3 {
fill: ${t.taskTextDarkColor} !important;
}
.activeCritText0,
.activeCritText1,
.activeCritText2,
.activeCritText3 {
fill: ${t.taskTextDarkColor} !important;
}
.titleText {
text-anchor: middle;
font-size: 18px;
fill: ${t.titleColor||t.textColor};
font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);
}
`,"getStyles"),ppt=dpt}),ypt={};J(ypt,{diagram:()=>vpt});var vpt,xpt,bpt,wpt,kpt,Tpt,Ept,_pt,Cpt,Spt=t(()=>{Pdt(),gpt(),fpt(),mpt(),vpt={parser:Ddt,db:ipt,renderer:upt,styles:ppt}}),Apt=t(()=>{cut(),e(),xpt={parse:Ae(async t=>{t=await aut("info",t),R.debug(t)},"parse")}}),Lpt=t(()=>{bpt="11.1.0"}),Npt=t(()=>{Lpt(),wpt={version:bpt},kpt=Ae(()=>wpt.version,"getVersion"),Tpt={getVersion:kpt}}),Ipt=t(()=>{Q3(),i(),Ept=Ae(t=>{let e=D().securityLevel,r=O("body");var n;return"sandbox"===e&&(n=O("#i"+t).node()?.contentDocument??document,r=O(n.body)),r.select("#"+t)},"selectSvgElement")}),Mpt=t(()=>{e(),Ipt(),ec(),_pt=Ae((t,e,r)=>{R.debug(`rendering info diagram
`+t),t=Ept(e),Vl(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text("v"+r)},"draw"),Cpt={draw:_pt}}),Rpt={};J(Rpt,{diagram:()=>Dpt});var Dpt,Opt,Ppt,Bpt,Fpt,$pt,zpt,Gpt,Upt,qpt,Ypt,jpt,Hpt,Wpt,Vpt,Xpt,Kpt,Zpt,Qpt,Jpt=t(()=>{Apt(),Npt(),Mpt(),Dpt={parser:xpt,db:Tpt,renderer:Cpt}}),t1t=t(()=>{e(),fh(),Nn(),$pt=xr.pie,Opt={sections:new Map,showData:!1,config:$pt},Ppt=Opt.sections,Bpt=Opt.showData,Fpt=structuredClone($pt),$pt=Ae(()=>structuredClone(Fpt),"getConfig"),zpt=Ae(()=>{Ppt=new Map,Bpt=Opt.showData,lc()},"clear"),Gpt=Ae(({label:t,value:e})=>{Ppt.has(t)||(Ppt.set(t,e),R.debug(`added new section: ${t}, with value: `+e))},"addSection"),Upt=Ae(()=>Ppt,"getSections"),qpt=Ae(t=>{Bpt=t},"setShowData"),Ypt=Ae(()=>Bpt,"getShowData"),jpt={getConfig:$pt,clear:zpt,setDiagramTitle:pc,getDiagramTitle:gc,setAccTitle:cc,getAccTitle:hc,setAccDescription:uc,getAccDescription:dc,addSection:Gpt,getSections:Upt,setShowData:qpt,getShowData:Ypt}}),e1t=t(()=>{cut(),e(),put(),t1t(),Hpt=Ae((t,e)=>{hut(t,e),e.setShowData(t.showData),t.sections.map(e.addSection)},"populateDb"),Wpt={parse:Ae(async t=>{t=await aut("pie",t),R.debug(t),Hpt(t,jpt)},"parse")}}),r1t=t(()=>{Vpt=Ae(t=>`
.pieCircle{
stroke: ${t.pieStrokeColor};
stroke-width : ${t.pieStrokeWidth};
opacity : ${t.pieOpacity};
}
.pieOuterCircle{
stroke: ${t.pieOuterStrokeColor};
stroke-width: ${t.pieOuterStrokeWidth};
fill: none;
}
.pieTitleText {
text-anchor: middle;
font-size: ${t.pieTitleTextSize};
fill: ${t.pieTitleTextColor};
font-family: ${t.fontFamily};
}
.slice {
font-family: ${t.fontFamily};
fill: ${t.pieSectionTextColor};
font-size:${t.pieSectionTextSize};
// fill: white;
}
.legend text {
fill: ${t.pieLegendTextColor};
font-family: ${t.fontFamily};
font-size: ${t.pieLegendTextSize};
}
`,"getStyles"),Xpt=Vpt}),n1t=t(()=>{Q3(),i(),e(),Ipt(),ec(),K8(),Kpt=Ae(t=>(t=[...t.entries()].map(t=>({label:t[0],value:t[1]})).sort((t,e)=>e.value-t.value),r4().value(t=>t.value)(t)),"createPieArcs"),Zpt=Ae((t,e,r,n)=>{R.debug(`rendering pie chart
`+t);let i=n.db,a=D(),o=b8(i.getConfig(),a.pie),s=Ept(e),l=s.append("g");l.attr("transform","translate(225,225)");var t=a.themeVariables,[n]=j8(t.pieOuterStrokeWidth);n??=2;let c=o.textPosition,h=Math.min(450,450)/2-40,u=zb().innerRadius(0).outerRadius(h),d=zb().innerRadius(h*c).outerRadius(h*c),p=(l.append("circle").attr("cx",0).attr("cy",0).attr("r",h+n/2).attr("class","pieOuterCircle"),i.getSections()),g=Kpt(p),f=[t.pie1,t.pie2,t.pie3,t.pie4,t.pie5,t.pie6,t.pie7,t.pie8,t.pie9,t.pie10,t.pie11,t.pie12],m=u2(f),y=(l.selectAll("mySlices").data(g).enter().append("path").attr("d",u).attr("fill",t=>m(t.data.label)).attr("class","pieCircle"),0);p.forEach(t=>{y+=t}),l.selectAll("mySlices").data(g).enter().append("text").text(t=>(t.data.value/y*100).toFixed(0)+"%").attr("transform",t=>"translate("+d.centroid(t)+")").style("text-anchor","middle").attr("class","slice"),l.append("text").text(i.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText"),(e=l.selectAll(".legend").data(m.domain()).enter().append("g").attr("class","legend").attr("transform",(t,e)=>"translate(216,"+(22*e-22*m.domain().length/2)+")")).append("rect").attr("width",18).attr("height",18).style("fill",m).style("stroke",m),e.data(g).append("text").attr("x",22).attr("y",14).text(t=>{var{label:t,value:e}=t.data;return i.getShowData()?t+` [${e}]`:t}),t=512+(n=Math.max(...e.selectAll("text").nodes().map(t=>t?.getBoundingClientRect().width??0))),s.attr("viewBox",`0 0 ${t} 450`),Vl(s,450,t,o.useMaxWidth)},"draw"),Qpt={draw:Zpt}}),i1t={};J(i1t,{diagram:()=>a1t});var a1t,o1t,s1t,l1t,c1t,h1t=t(()=>{e1t(),t1t(),r1t(),n1t(),a1t={parser:Wpt,db:jpt,renderer:Qpt,styles:Xpt}}),u1t=t(()=>{function t(){this.yy={}}var e=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,3],n=[1,4],i=[1,5],a=[1,6],o=[1,7],P=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],B=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],s=[55,56,57],F=[2,36],l=[1,37],c=[1,36],h=[1,38],u=[1,35],d=[1,43],p=[1,41],$=[1,14],z=[1,23],G=[1,18],U=[1,19],q=[1,20],Y=[1,21],j=[1,22],H=[1,24],W=[1,25],V=[1,26],X=[1,27],K=[1,28],Z=[1,29],g=[1,32],f=[1,33],m=[1,34],y=[1,39],v=[1,40],x=[1,42],b=[1,44],w=[1,62],k=[1,61],T=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],Q=[1,65],J=[1,66],tt=[1,67],et=[1,68],rt=[1,69],nt=[1,70],it=[1,71],at=[1,72],ot=[1,73],st=[1,74],lt=[1,75],ct=[1,76],E=[4,5,6,7,8,9,10,11,12,13,14,15,18],_=[1,90],C=[1,91],S=[1,92],A=[1,99],L=[1,93],N=[1,96],I=[1,94],M=[1,95],R=[1,97],D=[1,98],ht=[1,102],ut=[10,55,56,57],O=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],r={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"ST
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),o.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],C.$=a[a.length-E],C._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(C._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),typeof(_=this.performAction.apply(C,[l,h,c,f.yy,k[1],a,o].concat(p)))<"u")return _;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(C.$),o.push(C._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},n={EOF:1,parseError:Ae(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:Ae(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},"setInput"),input:Ae(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:Ae(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),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:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:Ae(function(){return this._more=!0,this},"more"),reject:Ae(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:Ae(function(t){this.unput(this.match.slice(t))},"less"),pastInput:Ae(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:Ae(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:Ae(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+e+"^"},"showPosition"),test_match:Ae(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={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)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:Ae(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:Ae(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:Ae(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:Ae(function(t){this.begin(t)},"pushState"),stateStackSize:Ae(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:Ae(function(t,e,r,n){switch(r){case 0:case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}};r.lexer=n,Ae(t,"Parser"),(o1t=new((t.prototype=r).Parser=t)).parser=o1t,s1t=o1t}),d1t=t(()=>{Q3(),Nn(),e(),_n(),l1t=cr(),c1t=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{Ae(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBo
`+t);let l=s.securityLevel,c;"sandbox"===l&&(c=O("#i"+e));var e=(t=O("sandbox"===l?c.nodes()[0].contentDocument.body:"body").select(`[id="${e}"]`)).append("g").attr("class","main"),h=s.quadrantChart?.chartWidth??500,u=s.quadrantChart?.chartHeight??500,s=(Vl(t,u,h,s.quadrantChart?.useMaxWidth??!0),t.attr("viewBox","0 0 "+h+" "+u),n.db.setHeight(u),n.db.setWidth(h),n.db.getQuadrantData()),t=e.append("g").attr("class","quadrants"),u=e.append("g").attr("class","border"),h=e.append("g").attr("class","data-points"),n=e.append("g").attr("class","labels"),e=e.append("g").attr("class","title");s.title&&e.append("text").attr("x",0).attr("y",0).attr("fill",s.title.fill).attr("font-size",s.title.fontSize).attr("dominant-baseline",i(s.title.horizontalPos)).attr("text-anchor",a(s.title.verticalPos)).attr("transform",o(s.title)).text(s.title.text),s.borderLines&&u.selectAll("line").data(s.borderLines).enter().append("line").attr("x1",t=>t.x1).attr("y1",t=>t.y1).attr("x2",t=>t.x2).attr("y2",t=>t.y2).style("stroke",t=>t.strokeFill).style("stroke-width",t=>t.strokeWidth),(e=t.selectAll("g.quadrant").data(s.quadrants).enter().append("g").attr("class","quadrant")).append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill),e.append("text").attr("x",0).attr("y",0).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>i(t.text.horizontalPos)).attr("text-anchor",t=>a(t.text.verticalPos)).attr("transform",t=>o(t.text)).text(t=>t.text.text),n.selectAll("g.label").data(s.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(t=>t.text).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>i(t.horizontalPos)).attr("text-anchor",t=>a(t.verticalPos)).attr("transform",t=>o(t)),(u=h.selectAll("g.data-point").data(s.points).enter().append("g").attr("class","data-point")).append("circle").attr("cx",t=>t.x).attr("cy",t=>t.y).attr("r",t=>t.radius).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeColor).attr("stroke-width",t=>t.strokeWidth),u.append("text").attr("x",0).attr("y",0).text(t=>t.text.text).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>i(t.text.horizontalPos)).attr("text-anchor",t=>a(t.text.verticalPos)).attr("transform",t=>o(t.text))},"draw"),F1t={draw:B1t}}),G1t={};J(G1t,{diagram:()=>U1t});var U1t,q1t,Y1t,j1t=t(()=>{u1t(),$1t(),z1t(),U1t={parser:s1t,db:P1t,renderer:F1t,styles:Ae(()=>"","styles")}}),H1t=t(()=>{function t(){this.yy={}}var e=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,10,12,14,16,18,19,21,23],n=[2,6],i=[1,3],a=[1,5],o=[1,6],s=[1,7],l=[1,5,10,12,14,16,18,19,21,23,34,35,36],c=[1,25],h=[1,26],u=[1,28],d=[1,29],p=[1,30],g=[1,31],f=[1,32],m=[1,33],y=[1,34],v=[1,35],x=[1,36],b=[1,37],w=[1,43],k=[1,42],T=[1,47],E=[1,50],_=[1,10,12,14,16,18,19,21,23,34,35,36],C=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],S=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],A=[1,64],n={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEW
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),o.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],C.$=a[a.length-E],C._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(C._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),typeof(_=this.performAction.apply(C,[l,h,c,f.yy,k[1],a,o].concat(p)))<"u")return _;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(C.$),o.push(C._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},i={EOF:1,parseError:Ae(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:Ae(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},"setInput"),input:Ae(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:Ae(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),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:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:Ae(function(){return this._more=!0,this},"more"),reject:Ae(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:Ae(function(t){this.unput(this.match.slice(t))},"less"),pastInput:Ae(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:Ae(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:Ae(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+e+"^"},"showPosition"),test_match:Ae(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={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)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:Ae(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:Ae(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:Ae(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:Ae(function(t){this.begin(t)},"pushState"),stateStackSize:Ae(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:Ae(function(t,e,r,n){switch(r){case 0:case 1:break;case 2:case 3:return this.popState(),34;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 8;case 16:return this.pushState("axis_data"),"X_AXIS";case 17:return this.pushState("axis_data"),"Y_AXIS";case 18:return this.pushState("axis_band_data"),24;case 19:return 31;case 20:return this.pushState("data"),16;case 21:return this.pushState("data"),18;case 22:return this.pushState("data_inner"),24;case 23:return 27;case 24:return this.popState(),26;case 25:this.popState();break;case 26:this.pushState("string");break;case 27:this.popState();break;case 28:return"STR";case 29:return 24;case 30:return 26;case 31:return 43;case 32:return"COLON";case 33:return 44;case 34:return 28;case 35:return 45;case 36:return 46;case 37:return 48;case 38:return 50;case 39:return 47;case 40:return 41;case 41:return 49;case 42:return 42;case 43:break;case 44:return 35;case 45:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}};n.lexer=i,Ae(t,"Parser"),(q1t=new((t.prototype=n).Parser=t)).parser=q1t,Y1t=q1t});function W1t(t){return"bar"===t.type}function V1t(t){return"band"===t.type}function X1t(t){return"linear"===t.type}
`+t);let h=Ept(e),u=h.append("g").attr("class","main"),d=u.append("rect").attr("width",o.width).attr("height",o.height).attr("class","background"),p=(Vl(h,o.height,o.width,!0),h.attr("viewBox",`0 0 ${o.width} `+o.height),d.attr("fill",a.backgroundColor),n.setTmpSVGG(h.append("g").attr("class","mermaid-tmp-group")),n.getDrawableElem()),g={};function f(e){let r=u,n="";for(var[i]of e.entries()){let t=u;0<i&&g[n]&&(t=g[n]),n+=e[i],r=(r=g[n])||(g[n]=t.append("g").attr("class",e[i]))}return r}Ae(f,"getGroup");for(i of p)if(0!==i.data.length){var m=f(i.groupTexts);switch(i.type){case"rect":m.selectAll("rect").data(i.data).enter().append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth);break;case"text":m.selectAll("text").data(i.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>s(t.verticalPos)).attr("text-anchor",t=>l(t.horizontalPos)).attr("transform",t=>c(t)).text(t=>t.text);break;case"path":m.selectAll("path").data(i.data).enter().append("path").attr("d",t=>t.path).attr("fill",t=>t.fill||"none").attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth)}}},"draw"),Zgt={draw:Kgt}}),tft={};J(tft,{diagram:()=>eft});var eft,rft,nft,ift,aft,oft,sft,lft,cft,hft,uft,dft,pft,gft,fft,mft,yft,vft,xft,bft,wft,kft,Tft,Eft,_ft,Cft,Sft,Aft,Lft,Nft,Ift,Mft,Rft,Dft,Oft,Pft,Bft,Fft,$ft,zft,Gft,Uft,qft,Yft,jft,Hft=t(()=>{H1t(),Qgt(),Jgt(),eft={parser:Y1t,db:Xgt,renderer:Zgt}}),Wft=t(()=>{function t(){this.yy={}}var e=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,3],n=[1,4],i=[1,5],a=[1,6],o=[5,6,8,9,11,13,31,32,33,34,35,36,44,62,63],s=[1,18],l=[2,7],c=[1,22],h=[1,23],u=[1,24],d=[1,25],p=[1,26],g=[1,27],f=[1,20],m=[1,28],y=[1,29],v=[62,63],x=[5,8,9,11,13,31,32,33,34,35,36,44,51,53,62,63],b=[1,47],w=[1,48],k=[1,49],T=[1,50],P=[1,51],B=[1,52],F=[1,53],E=[53,54],_=[1,64],C=[1,60],S=[1,61],A=[1,62],L=[1,63],N=[1,65],I=[1,69],M=[1,70],R=[1,67],D=[1,68],O=[5,8,9,11,13,31,32,33,34,35,36,44,62,63],r={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,requirementType:17,requirementName:18,STRUCT_START:19,requirementBody:20,ID:21,COLONSEP:22,id:23,TEXT:24,text:25,RISK:26,riskLevel:27,VERIFYMTHD:28,verifyType:29,STRUCT_STOP:30,REQUIREMENT:31,FUNCTIONAL_REQUIREMENT:32,INTERFACE_REQUIREMENT:33,PERFORMANCE_REQUIREMENT:34,PHYSICAL_REQUIREMENT:35,DESIGN_CONSTRAINT:36,LOW_RISK:37,MED_RISK:38,HIGH_RISK:39,VERIFY_ANALYSIS:40,VERIFY_DEMONSTRATION:41,VERIFY_INSPECTION:42,VERIFY_TEST:43,ELEMENT:44,elementName:45,elementBody:46,TYPE:47,type:48,DOCREF:49,ref:50,END_ARROW_L:51,relationship:52,LINE:53,END_ARROW_R:54,CONTAINS:55,COPIES:56,DERIVES:57,SATISFIES:58,VERIFIES:59,REFINES:60,TRACES:61,unqString:62,qString:63,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",19:"STRUCT_START",21:"ID",22:"COLONSEP",24:"TEXT",26:"RISK",28:"VERIFYMTHD",30:"STRUCT_STOP",31:"REQUIREMENT",32:"FUNCTIONAL_REQUIREMENT",33:"INTERFACE_REQUIREMENT",34:"PERFORMANCE_REQUIREMENT",35:"PHYSICAL_REQUIREMENT",36:"DESIGN_CONSTRAINT",37:"LOW_RISK",38:"MED_RISK",39:"HIGH_RISK",40:"VERIFY_ANALYSIS",41:"VERIFY_DEMONSTRATION",42:"VERIFY_INSPECTION",43:"VERIFY_TEST",44:"ELEMENT",47:"TYPE",49:"DOCREF",51:"END_ARROW_L",53:"LINE",54:"END_ARROW_R",55:"CONTAINS",56:"COPIES",57:"DERIVES",58:"SATISFIES",59:"VERIFIES",60:"REFINES",61:"TRACES",62:"unqString",63:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[14,5],[20,5],[20,5],[20,5],[20,5],[20,2],[20,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[27,1],[27,1],[27,1],[29,1],[29,1],[29,1],[29,1],[15,5],[46,5],[46,5],[46,2],[46,1],[16,5],[1
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),o.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],C.$=a[a.length-E],C._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(C._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),typeof(_=this.performAction.apply(C,[l,h,c,f.yy,k[1],a,o].concat(p)))<"u")return _;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(C.$),o.push(C._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},o={EOF:1,parseError:Ae(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:Ae(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},"setInput"),input:Ae(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:Ae(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),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:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:Ae(function(){return this._more=!0,this},"more"),reject:Ae(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:Ae(function(t){this.unput(this.match.slice(t))},"less"),pastInput:Ae(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:Ae(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:Ae(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+e+"^"},"showPosition"),test_match:Ae(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={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)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:Ae(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:Ae(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:Ae(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:Ae(function(t){this.begin(t)},"pushState"),stateStackSize:Ae(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:Ae(function(t,e,r,n){switch(r){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 5;case 9:case 10:case 11:break;case 12:return 8;case 13:return 6;case 14:return 19;case 15:return 30;case 16:return 22;case 17:return 21;case 18:return 24;case 19:return 26;case 20:return 28;case 21:return 31;case 22:return 32;case 23:return 33;case 24:return 34;case 25:return 35;case 26:return 36;case 27:return 37;case 28:return 38;case 29:return 39;case 30:return 40;case 31:return 41;case 32:return 42;case 33:return 43;case 34:return 44;case 35:return 55;case 36:return 56;case 37:return 57;case 38:return 58;case 39:return 59;case 40:return 60;case 41:return 61;case 42:return 47;case 43:return 49;case 44:return 51;case 45:return 54;case 46:return 53;case 47:this.begin("string");break;case 48:this.popState();break;case 49:return"qString";case 50:return e.yytext=e.yytext.trim(),62}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[48,49],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,50],inclusive:!0}}};r.lexer=o,Ae(t,"Parser"),(rft=new((t.prototype=r).Parser=t)).parser=rft,nft=rft}),Vft=t(()=>{i(),e(),fh(),ift=[],aft={},oft=new Map,sft={},lft=new Map,cft={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},hft={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},uft={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},dft={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},pft=Ae((t,
marker {
fill: ${t.relationColor};
stroke: ${t.relationColor};
}
marker.cross {
stroke: ${t.lineColor};
}
svg {
font-family: ${t.fontFamily};
font-size: ${t.fontSize};
}
.reqBox {
fill: ${t.requirementBackground};
fill-opacity: 1.0;
stroke: ${t.requirementBorderColor};
stroke-width: ${t.requirementBorderSize};
}
.reqTitle, .reqLabel{
fill: ${t.requirementTextColor};
}
.reqLabelBox {
fill: ${t.relationLabelBackground};
fill-opacity: 1.0;
}
.req-title-line {
stroke: ${t.requirementBorderColor};
stroke-width: ${t.requirementBorderSize};
}
.relationshipLine {
stroke: ${t.relationColor};
stroke-width: 1;
}
.relationshipLabel {
fill: ${t.relationLabelColor};
}
`,"getStyles"),Aft=Sft}),Kft=t(()=>{Lft={CONTAINS:"contains",ARROW:"arrow"},Nft=Ae((t,e)=>{var r=t.append("defs").append("marker").attr("id",Lft.CONTAINS+"_line_ending").attr("refX",0).attr("refY",e.line_height/2).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("g");r.append("circle").attr("cx",e.line_height/2).attr("cy",e.line_height/2).attr("r",e.line_height/2).attr("fill","none"),r.append("line").attr("x1",0).attr("x2",e.line_height).attr("y1",e.line_height/2).attr("y2",e.line_height/2).attr("stroke-width",1),r.append("line").attr("y1",0).attr("y2",e.line_height).attr("x1",e.line_height/2).attr("x2",e.line_height/2).attr("stroke-width",1),t.append("defs").append("marker").attr("id",Lft.ARROW+"_line_ending").attr("refX",e.line_height).attr("refY",.5*e.line_height).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("path").attr("d",`M0,0
L${e.line_height},${e.line_height/2}
M${e.line_height},${e.line_height/2}
L0,`+e.line_height).attr("stroke-width",1)},"insertLineEndings"),Ift={ReqMarkers:Lft,insertLineEndings:Nft}}),Zft=t(()=>{Q3(),yj(),iU(),i(),e(),ec(),tc(),Kft(),Mft={},Rft=0,Dft=Ae((t,e)=>t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",Mft.rect_min_width+"px").attr("height",Mft.rect_min_height+"px"),"newRectNode"),Oft=Ae((t,e,r)=>{let n=Mft.rect_min_width/2,i=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",n).attr("y",Mft.rect_padding).attr("dominant-baseline","hanging"),a=0;return r.forEach(t=>{(0==a?i.append("tspan").attr("text-anchor","middle").attr("x",Mft.rect_min_width/2).attr("dy",0):i.append("tspan").attr("text-anchor","middle").attr("x",Mft.rect_min_width/2).attr("dy",.75*Mft.line_height)).text(t),a++}),e=1.5*Mft.rect_padding+a*Mft.line_height*.75,t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",Mft.rect_min_width).attr("y1",e).attr("y2",e),{titleNode:i,y:e}},"newTitleNode"),Pft=Ae((t,e,r,n)=>{let i=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",Mft.rect_padding).attr("y",n).attr("dominant-baseline","hanging"),a=0,o=[];return r.forEach(t=>{let e=t.length;for(;30<e&&a<3;){var r=t.substring(0,30);t=t.substring(30,t.length),e=t.length,o[o.length]=r,a++}var n;3==a?(n=o[o.length-1],o[o.length-1]=n.substring(0,n.length-4)+"..."):o[o.length]=t,a=0}),o.forEach(t=>{i.append("tspan").attr("x",Mft.rect_padding).attr("dy",Mft.line_height).text(t)}),i},"newBodyNode"),Bft=Ae((t,e,r,n)=>{var i=e.node().getTotalLength(),e=e.node().getPointAtLength(.5*i),i="rel"+Rft,n=(Rft++,t.append("text").attr("class","req relationshipLabel").attr("id",i).attr("x",e.x).attr("y",e.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(n).node().getBBox());t.insert("rect","#"+i).attr("class","req reqLabelBox").attr("x",e.x-n.width/2).attr("y",e.y-n.height/2).attr("width",n.width).attr("height",n.height).attr("fill","white").attr("fill-opacity","85%")},"addEdgeLabel"),Fft=Ae(function(t,e,r,n,i){var r=r.edge(qft(e.src),qft(e.dst)),a=Kb().x(function(t){return t.x}).y(function(t){return t.y}),n=t.insert("path","#"+n).attr("class","er relationshipLine").attr("d",a(r.points)).attr("fill","none");e.type==i.db.Relationships.CONTAINS?n.attr("marker-start","url("+L.getUrl(Mft.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(n.attr("stroke-dasharray","10,7"),n.attr("marker-end","url("+L.getUrl(Mft.arrowMarkerAbsolute)+"#"+Ift.ReqMarkers.ARROW+"_line_ending)")),Bft(t,n,Mft,`<<${e.type}>>`)},"drawRelationshipFromLayout"),$ft=Ae((t,o,s)=>{t.forEach((t,e)=>{e=qft(e),R.info("Added new requirement: ",e);var r=s.append("g").attr("id",e),n=Dft(r,"req-"+e),i=[],a=Oft(r,e+"_title",[`<<${t.type}>>`,""+t.name]),r=(i.push(a.titleNode),Pft(r,e+"_body",["Id: "+t.id,"Text: "+t.text,"Risk: "+t.risk,"Verification: "+t.verifyMethod],a.y)),t=(i.push(r),n.node().getBBox());o.setNode(e,{width:t.width,height:t.height,shape:"rect",id:e})})},"drawReqs"),zft=Ae((t,s,l)=>{t.forEach((t,e)=>{var r=qft(e),n=l.append("g").attr("id",r),i=Dft(n,o="element-"+r),a=[],e=Oft(n,o+"_title",["<<Element>>",""+e]),n=(a.push(e.titleNode),Pft(n,o+"_body",["Type: "+(t.type||"Not Specified"),"Doc Ref: "+(t.docRef||"None")],e.y)),o=(a.push(n),i.node().getBBox());s.setNode(r,{width:o.width,height:o.height,shape:"rect",id:r})})},"drawElements"),Gft=Ae((t,n)=>(t.forEach(function(t){var e=qft(t.src),r=qft(t.dst);n.setEdge(e,r,{relationship:t})}),t),"addRelationships"),Uft=Ae(function(e,r){r.nodes().forEach(function(t){void 0!==t&&void 0!==r.node(t)&&(e.select("#"+t),e.select("#"+t).attr("transform","translate("+(r.node(t).x-r.node(t).width/2)+","+(r.node(t).y-r.node(t).height/2)+" )"))})},"adjustEntities"),qft=Ae(t=>t.replace(/\s/g,"").replace(/\./g,"_"),"elementString"),Yft=Ae((t,e,r,n)=>{let i=(Mft=D().requirement).securityLevel,a,o=("sandbox"===i&&(a=O("#i"+e)),O("sandbox"===i?a.nodes()[0].contentDocument.body:"body").select(`[id='${e}']`)),s=(Ift.insertLineEndings(o,Mft),new rU({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:Mft.layoutDirection,marginx:20,
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),o.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],C.$=a[a.length-E],C._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(C._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),typeof(_=this.performAction.apply(C,[l,h,c,f.yy,k[1],a,o].concat(p)))<"u")return _;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(C.$),o.push(C._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},B={EOF:1,parseError:Ae(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:Ae(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},"setInput"),input:Ae(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:Ae(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),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:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:Ae(function(){return this._more=!0,this},"more"),reject:Ae(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:Ae(function(t){this.unput(this.match.slice(t))},"less"),pastInput:Ae(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:Ae(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:Ae(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+e+"^"},"showPosition"),test_match:Ae(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={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)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:Ae(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:Ae(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:Ae(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:Ae(function(t){this.begin(t)},"pushState"),stateStackSize:Ae(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:Ae(function(t,e,r,n){switch(r){case 0:return 5;case 1:case 2:case 3:case 4:case 5:break;case 6:return 19;case 7:return this.begin("LINE"),14;case 8:return this.begin("ID"),50;case 9:return this.begin("ID"),52;case 10:return 13;case 11:return this.begin("ID"),53;case 12:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),70;case 13:return this.popState(),this.popState(),this.begin("LINE"),51;case 14:return this.popState(),this.popState(),5;case 15:return this.begin("LINE"),36;case 16:return this.begin("LINE"),37;case 17:return this.begin("LINE"),38;case 18:return this.begin("LINE"),39;case 19:return this.begin("LINE"),49;case 20:return this.begin("LINE"),41;case 21:return this.begin("LINE"),43;case 22:return this.begin("LINE"),48;case 23:return this.begin("LINE"),44;case 24:return this.begin("LINE"),47;case 25:return this.begin("LINE"),46;case 26:return this.popState(),15;case 27:return 16;case 28:return 65;case 29:return 66;case 30:return 59;case 31:return 60;case 32:return 61;case 33:return 62;case 34:return 57;case 35:return 54;case 36:return this.begin("ID"),21;case 37:return this.begin("ID"),23;case 38:return 29;case 39:return 30;case 40:return this.begin("acc_title"),31;case 41:return this.popState(),"acc_title_value";case 42:return this.begin("acc_descr"),33;case 43:return this.popState(),"acc_descr_value";case 44:this.begin("acc_descr_multiline");break;case 45:this.popState();break;case 46:return"acc_descr_multiline_value";case 47:return 6;case 48:return 18;case 49:return 20;case 50:return 64;case 51:return 5;case 52:return e.yytext=e.yytext.trim(),70;case 53:return 73;case 54:return 74;case 55:return 75;case 56:return 76;case 57:return 71;case 58:return 72;case 59:return 77;case 60:return 78;case 61:return 79;case 62:return 80;case 63:return 81;case 64:return 68;case 65:return 69;case 66:return 5;case 67:return"INVALID"}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^\<->\->:\n,;]+?([\-]*[^\<->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\<->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\<->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[45,46],inclusive:!1},acc_descr:{
stroke: ${t.actorBorder};
fill: ${t.actorBkg};
}
text.actor > tspan {
fill: ${t.actorTextColor};
stroke: none;
}
.actor-line {
stroke: ${t.actorLineColor};
}
.messageLine0 {
stroke-width: 1.5;
stroke-dasharray: none;
stroke: ${t.signalColor};
}
.messageLine1 {
stroke-width: 1.5;
stroke-dasharray: 2, 2;
stroke: ${t.signalColor};
}
#arrowhead path {
fill: ${t.signalColor};
stroke: ${t.signalColor};
}
.sequenceNumber {
fill: ${t.sequenceNumberColor};
}
#sequencenumber {
fill: ${t.signalColor};
}
#crosshead path {
fill: ${t.signalColor};
stroke: ${t.signalColor};
}
.messageText {
fill: ${t.signalTextColor};
stroke: none;
}
.labelBox {
stroke: ${t.labelBoxBorderColor};
fill: ${t.labelBoxBkgColor};
}
.labelText, .labelText > tspan {
fill: ${t.labelTextColor};
stroke: none;
}
.loopText, .loopText > tspan {
fill: ${t.loopTextColor};
stroke: none;
}
.loopLine {
stroke-width: 2px;
stroke-dasharray: 2, 2;
stroke: ${t.labelBoxBorderColor};
fill: ${t.labelBoxBorderColor};
}
.note {
//stroke: #decc93;
stroke: ${t.noteBorderColor};
fill: ${t.noteBkgColor};
}
.noteText, .noteText > tspan {
fill: ${t.noteTextColor};
stroke: none;
}
.activation0 {
fill: ${t.activationBkgColor};
stroke: ${t.activationBorderColor};
}
.activation1 {
fill: ${t.activationBkgColor};
stroke: ${t.activationBorderColor};
}
.activation2 {
fill: ${t.activationBkgColor};
stroke: ${t.activationBorderColor};
}
.actorPopupMenu {
position: absolute;
}
.actorPopupMenuPanel {
position: absolute;
fill: ${t.actorBkg};
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
}
.actor-man line {
stroke: ${t.actorBorder};
fill: ${t.actorBkg};
}
.actor-man circle, line {
stroke: ${t.actorBorder};
fill: ${t.actorBkg};
stroke-width: 2px;
}
`,"getStyles"),qmt=Umt}),Tyt=t(()=>{function e(t,e,r,n,i,a,o){g(e.append("text").attr("x",r).attr("y",n).style("text-anchor","start").text(t),o)}function l(t,e,r,n,i,a,o,s){var{actorFontSize:l,actorFontFamily:c,actorFontWeight:h}=s,u=t.split(L.lineBreakRegex);for(let t=0;t<u.length;t++){var d=t*l-l*(u.length-1)/2,p=e.append("text").attr("x",r).attr("y",n).style("text-anchor","start").style("font-size",l).style("font-weight",h).style("font-family",c);p.append("tspan").attr("x",r).attr("dy",d).text(u[t]),p.attr("y",n+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),g(p,o)}}function r(t,e,r,n,i,a,o,s){(i=(e=e.append("switch")).append("foreignObject").attr("x",r).attr("y",n).attr("width",i).attr("height",a).append("xhtml:div").style("display","table").style("height","100%").style("width","100%")).append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),l(t,e,r,n,0,a,o,s),g(i,o)}function g(t,e){for(var r in e)e.hasOwnProperty(r)&&t.attr(r,e[r])}function n(t,e,r,n,i,a,o){f(e.append("text").attr("x",r+i/2).attr("y",n+a/2+5).style("text-anchor","middle").text(t),o)}function c(t,e,r,n,i,a,o,s){var{actorFontSize:s,actorFontFamily:l,actorFontWeight:c}=s,[h,u]=j8(s),d=t.split(L.lineBreakRegex);for(let t=0;t<d.length;t++){var p=t*h-h*(d.length-1)/2,g=e.append("text").attr("x",r+i/2).attr("y",n).style("text-anchor","middle").style("font-size",u).style("font-weight",c).style("font-family",l);g.append("tspan").attr("x",r+i/2).attr("dy",p).text(d[t]),g.attr("y",n+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),f(g,o)}}function i(t,e,r,n,i,a,o,s){var l=(e=e.append("switch")).append("foreignObject").attr("x",r).attr("y",n).attr("width",i).attr("height",a).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");l.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),c(t,e,r,n,i,a,o,s),f(l,o)}async function a(t,e,r,n,i,a,o,s){var l=await Yl(t,Rr());(l=(e=e.append("switch")).append("foreignObject").attr("x",r+i/2-l.width/2).attr("y",n+a/2-l.height/2).attr("width",l.width).attr("height",l.height).append("xhtml:div").style("height","100%").style("width","100%")).append("div").style("text-align","center").style("vertical-align","middle").html(await jl(t,Rr())),c(t,e,r,n,i,a,o,s),f(l,o)}function f(t,e){for(var r in e)e.hasOwnProperty(r)&&t.attr(r,e[r])}tc(),e5(),K8(),Ymt=rt(t5(),1),Mn(),jmt=36,Hmt="actor-bottom",Wmt=Ae(function(t,e){return v3(t,e)},"drawRect"),Vmt=Ae(function(t,e,r,n,i){if(void 0===e.links||null===e.links||0===Object.keys(e.links).length)return{height:0,width:0};var a=e.links,o=e.actorCnt,s=e.rectData,e="none",l=(i&&(e="block !important"),t.append("g")),i=(l.attr("id","actor"+o+"_popup"),l.attr("class","actorPopupMenu"),l.attr("display",e),""),c=(void 0!==s.class&&(i=" "+s.class),s.width>r?s.width:r);if((t=l.append("rect")).attr("class","actorPopupMenuPanel"+i),t.attr("x",s.x),t.attr("y",s.height),t.attr("fill",s.fill),t.attr("stroke",s.stroke),t.attr("width",c),t.attr("height",s.height),t.attr("rx",s.rx),t.attr("ry",s.ry),null!=a){var h,u=20;for(h in a){var d=l.append("a"),p=(0,Ymt.sanitizeUrl)(a[h]);d.attr("xlink:href",p),d.attr("target","_blank"),xyt(n)(h,d,s.x+10,s.height+u,c,20,{class:"actor"},n),u+=30}}return t.attr("height",u),{height:s.height+u,width:c}},"drawPopup"),Xmt=Ae(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),Kmt=Ae(async function(n,i,a=null){var o=n.append("foreignObject"),s=await jl(i.text,Rr()),s=o.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(s).node().getBoundingClientRect();if(o.attr("height",Math.round(s.height)).attr("width",Math.round(s.width)),"noteText"===i.class)(n=n.node().firstChild).setAttribute("height",s.height+2*i.textMargin),n=n.getBBox(),o.attr("x",Math.round(n.x+n.width/2-s.width/2)).attr("y",Math.round(
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),o.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],C.$=a[a.length-E],C._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(C._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),typeof(_=this.performAction.apply(C,[l,h,c,f.yy,k[1],a,o].concat(p)))<"u")return _;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(C.$),o.push(C._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},r={EOF:1,parseError:Ae(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:Ae(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},"setInput"),input:Ae(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:Ae(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),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:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:Ae(function(){return this._more=!0,this},"more"),reject:Ae(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:Ae(function(t){this.unput(this.match.slice(t))},"less"),pastInput:Ae(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:Ae(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:Ae(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+e+"^"},"showPosition"),test_match:Ae(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={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)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:Ae(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:Ae(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:Ae(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:Ae(function(t){this.begin(t)},"pushState"),stateStackSize:Ae(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:Ae(function(t,e,r,n){switch(r){case 0:return 53;case 1:return 54;case 2:return 55;case 3:return 56;case 4:case 5:break;case 6:return this.begin("acc_title"),31;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),33;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 8;case 14:break;case 15:case 16:return 7;case 17:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 70;case 22:this.popState();break;case 23:return 71;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 73;case 28:return this.begin("namespace"),40;case 29:return this.popState(),8;case 30:break;case 31:return this.begin("namespace-body"),37;case 32:return this.popState(),39;case 33:return"EOF_IN_STRUCT";case 34:return 8;case 35:break;case 36:return"EDGE_STATE";case 37:return this.begin("class"),44;case 38:return this.popState(),8;case 39:break;case 40:return this.popState(),this.popState(),39;case 41:return this.begin("class-body"),37;case 42:return this.popState(),39;case 43:return"EOF_IN_STRUCT";case 44:return"EDGE_STATE";case 45:return"OPEN_IN_STRUCT";case 46:break;case 47:return"MEMBER";case 48:return 76;case 49:return 66;case 50:return 67;case 51:return 69;case 52:return 50;case 53:return 52;case 54:return 45;case 55:return 46;case 56:return 72;case 57:this.popState();break;case 58:return"GENERICTYPE";case 59:this.begin("generic");break;case 60:this.popState();break;case 61:return"BQUOTE_STR";case 62:this.begin("bqstring");break;case 63:case 64:case 65:case 66:return 68;case 67:case 68:return 60;case 69:case 70:return 62;case 71:return 61;case 72:return 59;case 73:return 63;case 74:return 64;case 75:return 65;case 76:return 21;case 77:return 42;case 78:return 95;case 79:return"DOT";case 80:return"PLUS";case 81:return 81;case 82:return 78;case 83:case 84:return 84;case 85:return 85;case 86:case 87:return"EQUALS";case 88:return 74;case 89:return 12;case 90:return 14;case 91:return"PUNCTUATION";case 92:return 80;case 93:return 97;case 94:case 95:return 83;case 96:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:
fill: ${t.nodeBorder||t.classText};
stroke: none;
font-family: ${t.fontFamily};
font-size: 10px;
.title {
font-weight: bolder;
}
}
.nodeLabel, .edgeLabel {
color: ${t.classText};
}
.edgeLabel .label rect {
fill: ${t.mainBkg};
}
.label text {
fill: ${t.classText};
}
.edgeLabel .label span {
background: ${t.mainBkg};
}
.classTitle {
font-weight: bolder;
}
.node rect,
.node circle,
.node ellipse,
.node polygon,
.node path {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
stroke-width: 1px;
}
.divider {
stroke: ${t.nodeBorder};
stroke-width: 1;
}
g.clickable {
cursor: pointer;
}
g.classGroup rect {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
}
g.classGroup line {
stroke: ${t.nodeBorder};
stroke-width: 1;
}
.classLabel .box {
stroke: none;
stroke-width: 0;
fill: ${t.mainBkg};
opacity: 0.5;
}
.classLabel .label {
fill: ${t.nodeBorder};
font-size: 10px;
}
.relation {
stroke: ${t.lineColor};
stroke-width: 1;
fill: none;
}
.dashed-line{
stroke-dasharray: 3;
}
.dotted-line{
stroke-dasharray: 1 2;
}
#compositionStart, .composition {
fill: ${t.lineColor} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#compositionEnd, .composition {
fill: ${t.lineColor} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#dependencyStart, .dependency {
fill: ${t.lineColor} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#dependencyStart, .dependency {
fill: ${t.lineColor} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#extensionStart, .extension {
fill: transparent !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#extensionEnd, .extension {
fill: transparent !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#aggregationStart, .aggregation {
fill: transparent !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#aggregationEnd, .aggregation {
fill: transparent !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#lollipopStart, .lollipop {
fill: ${t.mainBkg} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
#lollipopEnd, .lollipop {
fill: ${t.mainBkg} !important;
stroke: ${t.lineColor} !important;
stroke-width: 1;
}
.edgeTerminals {
font-size: 11px;
line-height: initial;
}
.classTitleText {
text-anchor: middle;
font-size: 18px;
fill: ${t.textColor};
}
`,"getStyles"),q2t=U2t}),svt=t(()=>{Q3(),K8(),e(),tc(),Y2t=0,j2t=Ae(function(t,e,r,n,i){var a=Ae(function(t){switch(t){case i.db.relationType.AGGREGATION:return"aggregation";case i.db.relationType.EXTENSION:return"extension";case i.db.relationType.COMPOSITION:return"composition";case i.db.relationType.DEPENDENCY:return"dependency";case i.db.relationType.LOLLIPOP:return"lollipop"}},"getRelationType");e.points=e.points.filter(t=>!Number.isNaN(t.y));let o=e.points,s=Kb().x(function(t){return t.x}).y(function(t){return t.y}).curve(d4),l=t.append("path").attr("d",s(o)).attr("id","edge"+Y2t).attr("class","relation"),c="";n.arrowMarkerAbsolute&&(c=(c=(c=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),1==r.relation.lineType&&l.attr("class","relation dashed-line"),10==r.relation.lineType&&l.attr("class","relation dotted-line"),"none"!==r.relation.type1&&l.attr("marker-start","url("+c+"#"+a(r.relation.type1)+"Start)"),"none"!==r.relation.type2&&l.attr("marker-end","url("+c+"#"+a(r.relation.type2)+"End)");var h,a=e.points.length,u=(d=H8.calcLabelPosition(e.points)).x,d=d.y;let p,g,f,m;a%2!=0&&1<a&&(h=H8.calcCardinalityPosition("none"!==r.relation.type1,e.points,e.points[0]),e=H8.calcCardinalityPosition("none"!==r.relation.type2,e.points,e.points[a-1]),R.debug("cardinality_1_point "+JSON.stringify(h)),R.debug("cardinality_2_point "+JSON.stringify(e)),p=h.x,g=h.y,f=e.x,m=e.y),void 0!==r.title&&(h=(a=t.append("g").attr("class","classLabel")).append("text").attr("class","label").attr("x",u).attr("y",d).attr("fill","red").attr("text-anchor","middle").text(r.title),e=(window.label=h).node().getBBox(),a.insert("rect",":first-child").attr("class","box").attr("x",e.x-n.padding/2).attr("y",e.y-n.padding/2).attr("width",e.width+n.padding).attr("height",e.height+n.padding)),R.info("Rendering relation "+JSON.stringify(r)),void 0!==r.relationTitle1&&"none"!==r.relationTitle1&&t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",p).attr("y",g).attr("fill","black").attr("font-size","6").text(r.relationTitle1),void 0!==r.relationTitle2&&"none"!==r.relationTitle2&&t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",f).attr("y",m).attr("fill","black").attr("font-size","6").text(r.relationTitle2),Y2t++},"drawEdge"),H2t=Ae(function(t,r,n,e){R.debug("Rendering class ",r,n);let i=r.id,a={id:i,label:r.id,width:0,height:0},o=t.append("g").attr("id",e.db.lookUpDomId(i)).attr("class","classGroup"),s,l=(s=(r.link?o.append("svg:a").attr("xlink:href",r.link).attr("target",r.linkTarget):o).append("text").attr("y",n.textHeight+n.padding).attr("x",0),!0),c=(r.annotations.forEach(function(t){t=s.append("tspan").text("«"+t+"»"),l||t.attr("dy",n.textHeight),l=!1}),t=W2t(r),e=s.append("tspan").text(t).attr("class","title"),l||e.attr("dy",n.textHeight),s.node().getBBox().height),h,u,d;if(0<r.members.length){h=o.append("line").attr("x1",0).attr("y1",n.padding+c+n.dividerMargin/2).attr("y2",n.padding+c+n.dividerMargin/2);let e=o.append("text").attr("x",n.padding).attr("y",c+n.dividerMargin+n.textHeight).attr("fill","white").attr("class","classText");l=!0,r.members.forEach(function(t){X2t(e,t,l,n),l=!1}),u=e.node().getBBox()}if(0<r.methods.length){d=o.append("line").attr("x1",0).attr("y1",n.padding+c+n.dividerMargin+u.height).attr("y2",n.padding+c+n.dividerMargin+u.height);let e=o.append("text").attr("x",n.padding).attr("y",c+2*n.dividerMargin+u.height+n.textHeight).attr("fill","white").attr("class","classText");l=!0,r.methods.forEach(function(t){X2t(e,t,l,n),l=!1})}t=o.node().getBBox(),e=" ",0<r.cssClasses.length&&(e+=r.cssClasses.join(" "));let p=o.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",t.width+2*n.padding).attr("height",t.height+n.padding+.5*n.dividerMargin).attr("class",e).node().getBBox().width;return s.node().childNodes.forEach(function(t){t.setAttribute("x",(p-t.getBBox().width)/2)}),r.tooltip&&s.insert("title").text(r.tooltip),h&&h.attr("x2",p),d&&d.attr("x2",p),a.width
`),c=(l.forEach(function(t){R.debug("Adding line: "+t),s.append("tspan").text(t).attr("class","title").attr("dy",r.textHeight)}),o.node().getBBox()),h=o.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",c.width+2*r.padding).attr("height",c.height+l.length*r.textHeight+r.padding+.5*r.dividerMargin).node().getBBox().width;return s.node().childNodes.forEach(function(t){t.setAttribute("x",(h-t.getBBox().width)/2)}),a.width=h,a.height=c.height+l.length*r.textHeight+r.padding+.5*r.dividerMargin,a},"drawNote"),X2t=Ae(function(t,e,r,n){var{displayText:i,cssStyle:a}=e.getDisplayDetails(),t=t.append("tspan").attr("x",n.padding).text(i);""!==a&&t.attr("style",e.cssStyle),r||t.attr("dy",n.textHeight)},"addTspan"),K2t={getClassTitleString:W2t,drawClass:H2t,drawEdge:j2t,drawNote:V2t}}),lvt=t(()=>{Q3(),yj(),iU(),e(),svt(),ec(),i(),Z2t={},Q2t=Ae(function(e){var t=Object.entries(Z2t).find(t=>t[1].label===e);if(t)return t[0]},"getGraphId"),J2t=Ae(function(t){t.append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),t.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),tvt=Ae(function(t,e,r,n){let i=D().class,a=(Z2t={},R.info("Rendering diagram "+t),D().securityLevel),o,s=("sandbox"===a&&(o=O("#i"+e)),O("sandbox"===a?o.nodes()[0].contentDocument.body:"body")),l=s.select(`[id='${e}']`),c=(J2t(l),new rU({multigraph:!0})),h=(c.setGraph({isMultiGraph:!0}),c.setDefaultEdgeLabel(function(){return{}}),n.db.getClasses()),u=[...h.keys()];for(var d of u)d=h.get(d),d=K2t.drawClass(l,d,i,n),Z2t[d.id]=d,c.setNode(d.id,d),R.info("Org height: "+d.height);n.db.getRelations().forEach(function(t){R.info("tjoho"+Q2t(t.id1)+Q2t(t.id2)+JSON.stringify(t)),c.setEdge(Q2t(t.id1),Q2t(t.id2),{relation:t},t.title||"DEFAULT")}),n.db.getNotes().forEach(function(t){R.debug("Adding note: "+JSON.stringify(t));var e=K2t.drawNote(l,t,i,n);Z2t[e.id]=e,c.setNode(e.id,e),t.class&&h.has(t.class)&&c.setEdge(t.id,Q2t(t.class),{relation:{id1:t.id,id2:t.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")}),YY(c),c.nodes().forEach(function(t){void 0!==t&&void 0!==c.node(t)&&(R.debug("Node "+t+": "+JSON.stringify(c.node(t))),s.select("#"+(n.db.lookUpDomId(t)||t)).attr("transform","translate("+(c.node(t).x-c.node(t).width/2)+","+(c.node(t).y-c.node(t).height/2)+" )"))}),c.edges().forEach(function(t){void 0!==t&&void 0!==c.edge(t)&&(R.debug("Edge "+t.v+" -> "+t.w+": "+J
outsidePoint: ${JSON.stringify(n)}
insidePoint : ${JSON.stringify(i)}
node : x:${t.x} y:${t.y} w:${t.width} h:`+t.height);let a=t.x,e=t.y,r=Math.abs(a-i.x),o=t.width/2,s=i.x<n.x?o-r:o+r,l=t.height/2,c=Math.abs(n.y-i.y),h=Math.abs(n.x-i.x);var u;if(Math.abs(e-n.y)*o>Math.abs(a-n.x)*l)return t=i.y<n.y?n.y-l-e:e-l-n.y,s=h*t/c,u={x:i.x<n.x?i.x+s:i.x-h+s,y:i.y<n.y?i.y+c-t:i.y-c+t},0===s&&(u.x=n.x,u.y=n.y),0===h&&(u.x=n.x),0===c&&(u.y=n.y),R.debug(`abc89 topp/bott calc, Q ${c}, q ${t}, R ${h}, r `+s,u),u;{let t=c*(s=i.x<n.x?n.x-o-a:a-o-n.x)/h,e=i.x<n.x?i.x+h-s:i.x-h+s,r=i.y<n.y?i.y+t:i.y-t;return R.debug(`sides calc abc89, Q ${c}, q ${t}, R ${h}, r `+s,{_x:e,_y:r}),0===s&&(e=n.x,r=n.y),0===h&&(e=n.x),0===c&&(r=n.y),{x:e,y:r}}},"intersection"),sxt=Ae((t,n)=>{R.debug("abc88 cutPathAtIntersect",t,n);let i=[],a=t[0],o=!1;return t.forEach(t=>{if(axt(n,t)||o)a=t,o||i.push(t);else{let e=oxt(n,a,t),r=!1;i.forEach(t=>{r=r||t.x===e.x&&t.y===e.y}),i.some(t=>t.x===e.x&&t.y===e.y)||i.push(e),o=!0}}),i},"cutPathAtIntersect"),lxt=Ae(function(t,e,r,n,i,a,o){let s=r.points,l=(R.debug("abc88 InsertEdge: edge=",r,"e=",e),!1),c=a.node(e.v),h=((a=a.node(e.w))?.intersect&&c?.intersect&&((s=s.slice(1,r.points.length-1)).unshift(c.intersect(s[0])),s.push(a.intersect(s[s.length-1]))),r.toCluster&&(R.debug("to cluster abc88",n[r.toCluster]),s=sxt(r.points,n[r.toCluster].node),l=!0),r.fromCluster&&(R.debug("from cluster abc88",n[r.fromCluster]),s=sxt(s.reverse(),n[r.fromCluster].node).reverse(),l=!0),s.filter(t=>!Number.isNaN(t.y))),u=d4,{x:d,y:p}=(!r.curve||"graph"!==i&&"flowchart"!==i||(u=r.curve),V9(r)),g=Kb().x(d).y(p).curve(u),f;switch(r.thickness){case"normal":f="edge-thickness-normal";break;case"thick":case"invisible":f="edge-thickness-thick";break;default:f=""}switch(r.pattern){case"solid":f+=" edge-pattern-solid";break;case"dotted":f+=" edge-pattern-dotted";break;case"dashed":f+=" edge-pattern-dashed"}let m=t.append("path").attr("d",g(h)).attr("id",r.id).attr("class"," "+f+(r.classes?" "+r.classes:"")).attr("style",r.style),y="";return(D().flowchart.arrowMarkerAbsolute||D().state.arrowMarkerAbsolute)&&(y=(y=(y=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),jvt(m,r,y,o,i),e={},l&&(e.updatedPath=s),e.originalPath=r.points,e},"insertEdge")}),dxt=t(()=>{yj(),Pj(),Xvt(),AS(),Kvt(),hA(),Zvt(),uxt(),e(),dA(),i(),cxt=Ae(async(t,i,a,o,s,l)=>{R.info("Graph in recursive render: XXX",vj(i),s);let c=i.graph().rankdir,r=(R.trace("Dir in recursive render - dir:",c),t=t.insert("g").attr("class","root"),i.nodes()?R.info("Recursive render XXX",i.nodes()):R.info("No nodes found for",i),0<i.edges().length&&R.trace("Recursive edges",i.edge(i.edges()[0])),t.insert("g").attr("class","clusters")),n=t.insert("g").attr("class","edgePaths"),h=t.insert("g").attr("class","edgeLabels"),u=t.insert("g").attr("class","nodes"),d=(await Promise.all(i.nodes().map(async function(t){var e,r,n=i.node(t);void 0!==s&&(e=JSON.parse(JSON.stringify(s.clusterData)),R.info("Setting data for cluster XXX (",t,") ",e,s),i.setNode(s.id,e),i.parent(t)||(R.trace("Setting parent",t,s.id),i.setParent(t,s.id,e))),R.info("(Insert) Node XXX"+t+": "+JSON.stringify(i.node(t))),n?.clusterNode?(R.info("Cluster identified",t,n.width,i.node(t)),{ranksep:e,nodesep:r}=i.graph(),n.graph.setGraph({...n.graph.graph(),ranksep:e,nodesep:r}),r=(e=await cxt(u,n.graph,a,o,i.node(t),l)).elem,_S(n,r),n.diff=e.diff||0,R.info("Node bounds (abc123)",t,n,n.width,n.x,n.y),aA(r,n),R.warn("Recursive render complete ",r,n)):0<i.children(t).length?(R.info("Cluster - the non recursive path XXX",t,n.id,n,i),R.info(Ivt(n.id,i)),Tvt[n.id]={id:Ivt(n.id,i),node:n}):(R.info("Node - the non recursive path",t,n.id,n),await iA(u,i.node(t),c))})),i.edges().forEach(async function(t){var e=i.edge(t.v,t.w,t.name);R.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),R.info("Edge "+t.v+" -> "+t.w+": ",t," ",JSON.stringify(i.edge(t))),R.info("Fix",Tvt,"ids:",t.v,t.w,"Translating: ",Tvt[t.v],Tvt[t.w]),await nxt(h,e)}),i.edges().forEach(function(t){R.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t))}),R.in
`),void 0===t.style&&(r.style=r.style||"stroke: #333; stroke-width: 1.5px;fill:none"),r.labelStyle=r.labelStyle.replace("color:","fill:"))),n.setEdge(t.id1,t.id2,r,a)})},"addRelations"),bxt=Ae(function(t){fxt={...fxt,...t}},"setConf"),wxt=Ae(async function(t,e,r,n){R.info("Drawing class - ",e);var i=D().flowchart??D().class,a=D().securityLevel,o=(R.info("config:",i),i?.nodeSpacing??50),s=i?.rankSpacing??50,o=new rU({multigraph:!0,compound:!0}).setGraph({rankdir:n.db.getDirection(),nodesep:o,ranksep:s,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),s=n.db.getNamespaces(),l=n.db.getClasses(),c=n.db.getRelations(),h=n.db.getNotes();R.info(c),mxt(s,o,e,n),yxt(l,o,e,n),xxt(c,o),vxt(h,o,c.length+1,l);let u;if("sandbox"===a&&(u=O("#i"+e)),h=(s=O("sandbox"===a?u.nodes()[0].contentDocument.body:"body")).select(`[id="${e}"]`),c=s.select("#"+e+" g"),await hxt(c,o,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",e),H8.insertTitle(h,"classTitleText",i?.titleTopMargin??5,n.db.getDiagramTitle()),Xl(o,h,i?.diagramPadding,i?.useMaxWidth),!i?.htmlLabels){var d,p="sandbox"===a?u.nodes()[0].contentDocument:document;for(d of p.querySelectorAll('[id="'+e+'"] .edgeLabel .label')){var g=d.getBBox(),f=p.createElementNS("http://www.w3.org/2000/svg","rect");f.setAttribute("rx",0),f.setAttribute("ry",0),f.setAttribute("width",g.width),f.setAttribute("height",g.height),d.insertBefore(f,d.firstChild)}}},"draw"),Ae(pxt,"getArrowMarker"),kxt={setConf:bxt,draw:wxt}}),Ext={};J(Ext,{diagram:()=>_xt});var _xt,Cxt,Sxt,Axt,Lxt,Nxt,Ixt,Mxt,Rxt,Dxt,Oxt,Pxt,Bxt,Fxt,$xt,zxt,Gxt,Uxt,qxt,Yxt,jxt,Hxt,Wxt,Vxt,Xxt,Kxt,Zxt,Qxt,Jxt,tbt,ebt,rbt,nbt,ibt,abt,obt,sbt,lbt,cbt=t(()=>{nvt(),avt(),ovt(),Txt(),_xt={parser:Kyt,db:G2t,renderer:kxt,styles:q2t,init:Ae(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,G2t.clear()},"init")}}),hbt=t(()=>{function t(){this.yy={}}var e=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,2],n=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],l=[1,16],c=[1,17],h=[1,18],u=[1,19],d=[1,32],p=[1,20],g=[1,21],f=[1,22],m=[1,23],y=[1,24],v=[1,26],x=[1,27],b=[1,28],w=[1,29],k=[1,30],T=[1,31],E=[1,34],_=[1,35],C=[1,36],S=[1,37],A=[1,33],L=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],N=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],I=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],r={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"--\x3e":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,classDef:38,CLASSDEF_ID:39,CLASSDEF_STYLEOPTS:40,DEFAULT:41,style:42,STYLE_IDS:43,STYLEDEF_STYLEOPTS:44,class:45,CLASSENTITY_IDS:46,STYLECLASS:47,direction_tb:48,direction_bt:49,direction_rl:50,direction_lr:51,eol:52,";":53,EDGE_STATE:54,STYLE_SEPARATOR:55,left_of:56,right_of:57,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"--\x3e",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"style",43:"STYLE_IDS",44:"STYLEDEF_STYLEOPTS",45:"class",46:"CLASSENTITY_IDS",47:"STYLECLASS",48:"direction_tb",49:"direction_bt",50:"direction_rl",51:"direction_lr",53:";",54:"EDGE_STATE",55:"STYLE_SEPARATOR",56:"left_of",57:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),o.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],C.$=a[a.length-E],C._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(C._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),typeof(_=this.performAction.apply(C,[l,h,c,f.yy,k[1],a,o].concat(p)))<"u")return _;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(C.$),o.push(C._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},n={EOF:1,parseError:Ae(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:Ae(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},"setInput"),input:Ae(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:Ae(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),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:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:Ae(function(){return this._more=!0,this},"more"),reject:Ae(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:Ae(function(t){this.unput(this.match.slice(t))},"less"),pastInput:Ae(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:Ae(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:Ae(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+e+"^"},"showPosition"),test_match:Ae(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={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)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:Ae(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:Ae(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:Ae(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:Ae(function(t){this.begin(t)},"pushState"),stateStackSize:Ae(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:Ae(function(t,e,r,n){switch(r){case 0:return 41;case 1:return 48;case 2:return 49;case 3:return 50;case 4:return 51;case 5:case 6:break;case 7:return 5;case 8:case 9:case 10:case 11:break;case 12:return this.pushState("SCALE"),17;case 13:return 18;case 14:this.popState();break;case 15:return this.begin("acc_title"),33;case 16:return this.popState(),"acc_title_value";case 17:return this.begin("acc_descr"),35;case 18:return this.popState(),"acc_descr_value";case 19:this.begin("acc_descr_multiline");break;case 20:this.popState();break;case 21:return"acc_descr_multiline_value";case 22:return this.pushState("CLASSDEF"),38;case 23:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 24:return this.popState(),this.pushState("CLASSDEFID"),39;case 25:return this.popState(),40;case 26:return this.pushState("CLASS"),45;case 27:return this.popState(),this.pushState("CLASS_STYLE"),46;case 28:return this.popState(),47;case 29:return this.pushState("STYLE"),42;case 30:return this.popState(),this.pushState("STYLEDEF_STYLES"),43;case 31:return this.popState(),44;case 32:return this.pushState("SCALE"),17;case 33:return 18;case 34:this.popState();break;case 35:this.pushState("STATE");break;case 36:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 37:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),26;case 38:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),27;case 39:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 40:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),26;case 41:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),27;case 42:return 48;case 43:return 49;case 44:return 50;case 45:return 51;case 46:this.pushState("STATE_STRING");break;case 47:return this.pushState("STATE_ID"),"AS";case 48:return this.popState(),"ID";case 49:this.popState();break;case 50:return"STATE_DESCR";case 51:return 19;case 52:this.popState();break;case 53:return this.popState(),this.pushState("struct"),20;case 54:break;case 55:return this.popState(),21;case 56:break;case 57:return this.begin("NOTE"),29;case 58:return this.popState(),this.pushState("NOTE_ID"),56;case 59:return this.popState(),this.pushState("NOTE_ID"),57;case 60:this.popState(),this.pushState("FLOATING_NOTE");break;case 61:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 62:break;case 63:return"NOTE_TEXT";case 64:return this.popState(),"ID";case 65:return this.popState(),this.pushState("NOTE_TEXT"),24;case 66:return this.popState(),e.yytext=e.yytext.substr(2).trim(),31;case 67:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),31;case 68:case 69:return 6;case 70:return 16;case 71:return 54;case 72:return 24;case 73:return e.yytext=e.yytext.trim(),14;case 74:return 15;case 75:return 28;case 76:return 55;case 77:return 5;case 78:return"INVALID"}},"anonymous"),rules:[/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:
defs #statediagram-barbEnd {
fill: ${t.transitionColor};
stroke: ${t.transitionColor};
}
g.stateGroup text {
fill: ${t.nodeBorder};
stroke: none;
font-size: 10px;
}
g.stateGroup text {
fill: ${t.textColor};
stroke: none;
font-size: 10px;
}
g.stateGroup .state-title {
font-weight: bolder;
fill: ${t.stateLabelColor};
}
g.stateGroup rect {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
}
g.stateGroup line {
stroke: ${t.lineColor};
stroke-width: 1;
}
.transition {
stroke: ${t.transitionColor};
stroke-width: 1;
fill: none;
}
.stateGroup .composit {
fill: ${t.background};
border-bottom: 1px
}
.stateGroup .alt-composit {
fill: #e0e0e0;
border-bottom: 1px
}
.state-note {
stroke: ${t.noteBorderColor};
fill: ${t.noteBkgColor};
text {
fill: ${t.noteTextColor};
stroke: none;
font-size: 10px;
}
}
.stateLabel .box {
stroke: none;
stroke-width: 0;
fill: ${t.mainBkg};
opacity: 0.5;
}
.edgeLabel .label rect {
fill: ${t.labelBackgroundColor};
opacity: 0.5;
}
.edgeLabel {
background-color: ${t.edgeLabelBackground};
p {
background-color: ${t.edgeLabelBackground};
}
rect {
opacity: 0.5;
background-color: ${t.edgeLabelBackground};
fill: ${t.edgeLabelBackground};
}
text-align: center;
}
.edgeLabel .label text {
fill: ${t.transitionLabelColor||t.tertiaryTextColor};
}
.label div .edgeLabel {
color: ${t.transitionLabelColor||t.tertiaryTextColor};
}
.stateLabel text {
fill: ${t.stateLabelColor};
font-size: 10px;
font-weight: bold;
}
.node circle.state-start {
fill: ${t.specialStateColor};
stroke: ${t.specialStateColor};
}
.node .fork-join {
fill: ${t.specialStateColor};
stroke: ${t.specialStateColor};
}
.node circle.state-end {
fill: ${t.innerEndBackground};
stroke: ${t.background};
stroke-width: 1.5
}
.end-state-inner {
fill: ${t.compositeBackground||t.background};
// stroke: ${t.background};
stroke-width: 1.5
}
.node rect {
fill: ${t.stateBkg||t.mainBkg};
stroke: ${t.stateBorder||t.nodeBorder};
stroke-width: 1px;
}
.node polygon {
fill: ${t.mainBkg};
stroke: ${t.stateBorder||t.nodeBorder};;
stroke-width: 1px;
}
#statediagram-barbEnd {
fill: ${t.lineColor};
}
.statediagram-cluster rect {
fill: ${t.compositeTitleBackground};
stroke: ${t.stateBorder||t.nodeBorder};
stroke-width: 1px;
}
.cluster-label, .nodeLabel {
color: ${t.stateLabelColor};
// line-height: 1;
}
.statediagram-cluster rect.outer {
rx: 5px;
ry: 5px;
}
.statediagram-state .divider {
stroke: ${t.stateBorder||t.nodeBorder};
}
.statediagram-state .title-state {
rx: 5px;
ry: 5px;
}
.statediagram-cluster.statediagram-cluster .inner {
fill: ${t.compositeBackground||t.background};
}
.statediagram-cluster.statediagram-cluster-alt .inner {
fill: ${t.altBackground||"#efefef"};
}
.statediagram-cluster .inner {
rx:0;
ry:0;
}
.statediagram-state rect.basic {
rx: 5px;
ry: 5px;
}
.statediagram-state rect.divider {
stroke-dasharray: 10,10;
fill: ${t.altBackground||"#efefef"};
}
.note-edge {
stroke-dasharray: 5;
}
.statediagram-note rect {
fill: ${t.noteBkgColor};
stroke: ${t.noteBorderColor};
stroke-width: 1px;
rx: 0;
ry: 0;
}
.statediagram-note rect {
fill: ${t.noteBkgColor};
stroke: ${t.noteBorderColor};
stroke-width: 1px;
rx: 0;
ry: 0;
}
.statediagram-note text {
fill: ${t.noteTextColor};
}
.statediagram-note .nodeLabel {
color: ${t.noteTextColor};
}
.statediagram .edgeLabel {
color: red; // ${t.noteTextColor};
}
#dependencyStart, #dependencyEnd {
fill: ${t.lineColor};
stroke: ${t.lineColor};
stroke-width: 1;
}
.statediagramTitleText {
text-anchor: middle;
font-size: 18px;
fill: ${t.textColor};
}
`,"getStyles"),x4t=v4t}),V4t=t(()=>{b4t={},w4t=Ae((t,e)=>{b4t[t]=e},"set"),k4t=Ae(t=>b4t[t],"get"),T4t=Ae(()=>Object.keys(b4t),"keys"),E4t=Ae(()=>T4t().length,"size"),_4t={get:k4t,set:w4t,keys:T4t,size:E4t}}),X4t=t(()=>{Q3(),V4t(),H4t(),K8(),tc(),i(),e(),C4t=Ae(t=>t.append("circle").attr("class","start-state").attr("r",D().state.sizeUnit).attr("cx",D().state.padding+D().state.sizeUnit).attr("cy",D().state.padding+D().state.sizeUnit),"drawStartState"),S4t=Ae(t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",D().state.textHeight).attr("class","divider").attr("x2",2*D().state.textHeight).attr("y1",0).attr("y2",0),"drawDivider"),A4t=Ae((t,e)=>{var r=(e=t.append("text").attr("x",2*D().state.padding).attr("y",D().state.textHeight+2*D().state.padding).attr("font-size",D().state.fontSize).attr("class","state-title").text(e.id)).node().getBBox();return t.insert("rect",":first-child").attr("x",D().state.padding).attr("y",D().state.padding).attr("width",r.width+2*D().state.padding).attr("height",r.height+2*D().state.padding).attr("rx",D().state.radius),e},"drawSimpleState"),L4t=Ae((t,e)=>{let r=Ae(function(t,e,r){t=t.append("tspan").attr("x",2*D().state.padding).text(e),r||t.attr("dy",D().state.textHeight)},"addTspan"),n=t.append("text").attr("x",2*D().state.padding).attr("y",D().state.textHeight+1.3*D().state.padding).attr("font-size",D().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),i=n.height,a=t.append("text").attr("x",D().state.padding).attr("y",i+.4*D().state.padding+D().state.dividerMargin+D().state.textHeight).attr("class","state-description"),o=!0,s=!0;e.descriptions.forEach(function(t){o||(r(a,t,s),s=!1),o=!1});var e=t.append("line").attr("x1",D().state.padding).attr("y1",D().state.padding+i+D().state.dividerMargin/2).attr("y2",D().state.padding+i+D().state.dividerMargin/2).attr("class","descr-divider"),l=a.node().getBBox(),c=Math.max(l.width,n.width);return e.attr("x2",c+3*D().state.padding),t.insert("rect",":first-child").attr("x",D().state.padding).attr("y",D().state.padding).attr("width",c+2*D().state.padding).attr("height",l.height+i+2*D().state.padding).attr("rx",D().state.radius),t},"drawDescrState"),N4t=Ae((t,e,r)=>{let n=D().state.padding,i=2*D().state.padding,a=t.node().getBBox(),o=a.width,s=a.x,l=t.append("text").attr("x",0).attr("y",D().state.titleShift).attr("font-size",D().state.fontSize).attr("class","state-title").text(e.id),c=l.node().getBBox().width+i,h=Math.max(c,o);h===o&&(h+=i);let u,d=t.node().getBBox();return e.doc,u=s-n,o<c&&(u=(o-h)/2+n),Math.abs(s-d.x)<n&&o<c&&(u=s-(c-o)/2),e=1-D().state.textHeight,t.insert("rect",":first-child").attr("x",u).attr("y",e).attr("class",r?"alt-composit":"composit").attr("width",h).attr("height",d.height+D().state.textHeight+D().state.titleShift+1).attr("rx","0"),l.attr("x",u+n),c<=o&&l.attr("x",s+(h-i)/2-c/2+n),t.insert("rect",":first-child").attr("x",u).attr("y",D().state.titleShift-D().state.textHeight-D().state.padding).attr("width",h).attr("height",3*D().state.textHeight).attr("rx",D().state.radius),t.insert("rect",":first-child").attr("x",u).attr("y",D().state.titleShift-D().state.textHeight-D().state.padding).attr("width",h).attr("height",d.height+3+2*D().state.textHeight).attr("rx",D().state.radius),t},"addTitleAndBox"),I4t=Ae(t=>(t.append("circle").attr("class","end-state-outer").attr("r",D().state.sizeUnit+D().state.miniPadding).attr("cx",D().state.padding+D().state.sizeUnit+D().state.miniPadding).attr("cy",D().state.padding+D().state.sizeUnit+D().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",D().state.sizeUnit).attr("cx",D().state.padding+D().state.sizeUnit+2).attr("cy",D().state.padding+D().state.sizeUnit+2)),"drawEndState"),M4t=Ae((t,e)=>{let r=D().state.forkWidth,n=D().state.forkHeight;return e.parentId&&(e=r,r=n,n=e),t.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",n).attr("x",D().state.padding).attr("y",D().state.padding)},"drawForkJoinState"),R4t=Ae((t,e,r,n)=>{let i=0,a=n.append("text"),o=(a.style("text
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),o.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],C.$=a[a.length-E],C._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(C._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),typeof(_=this.performAction.apply(C,[l,h,c,f.yy,k[1],a,o].concat(p)))<"u")return _;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(C.$),o.push(C._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},i={EOF:1,parseError:Ae(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:Ae(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},"setInput"),input:Ae(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:Ae(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),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:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:Ae(function(){return this._more=!0,this},"more"),reject:Ae(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:Ae(function(t){this.unput(this.match.slice(t))},"less"),pastInput:Ae(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:Ae(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:Ae(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+e+"^"},"showPosition"),test_match:Ae(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={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)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:Ae(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:Ae(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:Ae(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:Ae(function(t){this.begin(t)},"pushState"),stateStackSize:Ae(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:Ae(function(t,e,r,n){switch(r){case 0:case 1:break;case 2:return 10;case 3:case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};n.lexer=i,Ae(t,"Parser"),(r3t=new((t.prototype=n).Parser=t)).parser=r3t,n3t=r3t}),D3t=t(()=>{i(),fh(),i3t="",a3t=[],o3t=[],s3t=[],l3t=Ae(function(){a3t.length=0,o3t.length=0,i3t="",s3t.length=0,lc()},"clear"),c3t=Ae(function(t){i3t=t,a3t.push(t)},"addSection"),h3t=Ae(function(){return a3t},"getSections"),u3t=Ae(function(){let t=f3t(),e=0;for(;!t&&e<100;)t=f3t(),e++;return o3t.push(...s3t),o3t},"getTasks"),d3t=Ae(function(){let e=[];return o3t.forEach(t=>{t.people&&e.push(...t.people)}),[...new Set(e)].sort()},"updateActors"),p3t=Ae(function(t,e){let r=e.substr(1).split(":"),n=0;e=(1===r.length?(n=Number(r[0]),[]):(n=Number(r[0]),r[1].split(","))).map(t=>t.trim()),e={section:i3t,type:i3t,people:e,task:t,score:n},s3t.push(e)},"addTask"),g3t=Ae(function(t){t={section:i3t,type:i3t,description:t,task:t,classes:[]},o3t.push(t)},"addTaskOrg"),f3t=Ae(function(){let t=Ae(function(t){return s3t[t].processed},"compileTask"),e=!0;for(var[r,n]of s3t.entries())t(r),e=e&&n.processed;return e},"compileTasks"),m3t=Ae(function(){return d3t()},"getActors"),y3t={getConfig:Ae(()=>D().journey,"getConfig"),clear:l3t,setDiagramTitle:pc,getDiagramTitle:gc,setAccTitle:cc,getAccTitle:hc,setAccDescription:uc,getAccDescription:dc,addSection:c3t,getSections:h3t,getTasks:u3t,addTask:p3t,addTaskOrg:g3t,getActors:m3t}}),O3t=t(()=>{v3t=Ae(t=>`.label {
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
color: ${t.textColor};
}
.mouth {
stroke: #666;
}
line {
stroke: ${t.textColor}
}
.legend {
fill: ${t.textColor};
}
.label text {
fill: #333;
}
.label {
color: ${t.textColor}
}
.face {
${t.faceColor?"fill: "+t.faceColor:"fill: #FFF8DC"};
stroke: #999;
}
.node rect,
.node circle,
.node ellipse,
.node polygon,
.node path {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
stroke-width: 1px;
}
.node .label {
text-align: center;
}
.node.clickable {
cursor: pointer;
}
.arrowheadPath {
fill: ${t.arrowheadColor};
}
.edgePath .path {
stroke: ${t.lineColor};
stroke-width: 1.5px;
}
.flowchart-link {
stroke: ${t.lineColor};
fill: none;
}
.edgeLabel {
background-color: ${t.edgeLabelBackground};
rect {
opacity: 0.5;
}
text-align: center;
}
.cluster rect {
}
.cluster text {
fill: ${t.titleColor};
}
div.mermaidTooltip {
position: absolute;
text-align: center;
max-width: 200px;
padding: 2px;
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
font-size: 12px;
background: ${t.tertiaryColor};
border: 1px solid ${t.border2};
border-radius: 2px;
pointer-events: none;
z-index: 100;
}
.task-type-0, .section-type-0 {
${t.fillType0?"fill: "+t.fillType0:""};
}
.task-type-1, .section-type-1 {
${t.fillType0?"fill: "+t.fillType1:""};
}
.task-type-2, .section-type-2 {
${t.fillType0?"fill: "+t.fillType2:""};
}
.task-type-3, .section-type-3 {
${t.fillType0?"fill: "+t.fillType3:""};
}
.task-type-4, .section-type-4 {
${t.fillType0?"fill: "+t.fillType4:""};
}
.task-type-5, .section-type-5 {
${t.fillType0?"fill: "+t.fillType5:""};
}
.task-type-6, .section-type-6 {
${t.fillType0?"fill: "+t.fillType6:""};
}
.task-type-7, .section-type-7 {
${t.fillType0?"fill: "+t.fillType7:""};
}
.actor-0 {
${t.actor0?"fill: "+t.actor0:""};
}
.actor-1 {
${t.actor1?"fill: "+t.actor1:""};
}
.actor-2 {
${t.actor2?"fill: "+t.actor2:""};
}
.actor-3 {
${t.actor3?"fill: "+t.actor3:""};
}
.actor-4 {
${t.actor4?"fill: "+t.actor4:""};
}
.actor-5 {
${t.actor5?"fill: "+t.actor5:""};
}
`,"getStyles"),x3t=v3t}),P3t=t(()=>{function e(t,e,r,n,i,a,o,s){g(e.append("text").attr("x",r+i/2).attr("y",n+a/2+5).style("font-color",s).style("text-anchor","middle").text(t),o)}function c(t,e,r,n,i,a,o,s,l){var{taskFontSize:c,taskFontFamily:h}=s,u=t.split(/<br\s*\/?>/gi);for(let t=0;t<u.length;t++){var d=t*c-c*(u.length-1)/2,p=e.append("text").attr("x",r+i/2).attr("y",n).attr("fill",l).style("text-anchor","middle").style("font-size",c).style("font-family",h);p.append("tspan").attr("x",r+i/2).attr("dy",d).text(u[t]),p.attr("y",n+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),g(p,o)}}function r(t,e,r,n,i,a,o,s){var l=(e=e.append("switch")).append("foreignObject").attr("x",r).attr("y",n).attr("width",i).attr("height",a).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");l.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),c(t,e,r,n,i,a,o,s),g(l,o)}function g(t,e){for(var r in e)r in e&&t.attr(r,e[r])}Q3(),e5(),b3t=Ae(function(t,e){return v3(t,e)},"drawRect"),w3t=Ae(function(t,r){var e=t.append("circle").attr("cx",r.cx).attr("cy",r.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible");function n(t){var e=zb().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(6.8181818181818175);t.append("path").attr("class","mouth").attr("d",e).attr("transform","translate("+r.cx+","+(r.cy+2)+")")}function i(t){var e=zb().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(6.8181818181818175);t.append("path").attr("class","mouth").attr("d",e).attr("transform","translate("+r.cx+","+(r.cy+7)+")")}function a(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",r.cx-5).attr("y1",r.cy+7).attr("x2",r.cx+5).attr("y2",r.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return(t=t.append("g")).append("circle").attr("cx",r.cx-5).attr("cy",r.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),t.append("circle").attr("cx",r.cx+5).attr("cy",r.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),Ae(n,"smile"),Ae(i,"sad"),Ae(a,"ambivalent"),(3<r.score?n:r.score<3?i:a)(t),e},"drawFace"),k3t=Ae(function(t,e){return(t=t.append("circle")).attr("cx",e.cx),t.attr("cy",e.cy),t.attr("class","actor-"+e.pos),t.attr("fill",e.fill),t.attr("stroke",e.stroke),t.attr("r",e.r),void 0!==t.class&&t.attr("class",t.class),void 0!==e.title&&t.append("title").text(e.title),t},"drawCircle"),T3t=Ae(function(t,e){return b3(t,e)},"drawText"),E3t=Ae(function(t,e){function r(t,e,r,n,i){return t+","+e+" "+(t+r)+","+e+" "+(t+r)+","+(e+n-i)+" "+(t+r-1.2*i)+","+(e+n)+" "+t+","+(e+n)}Ae(r,"genPoints");var n=t.append("polygon");n.attr("points",r(e.x,e.y,50,20,7)),n.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,T3t(t,e)},"drawLabel"),_3t=Ae(function(t,e,r){var t=t.append("g"),n=T3();n.x=e.x,n.y=e.y,n.fill=e.fill,n.width=r.width*e.taskCount+r.diagramMarginX*(e.taskCount-1),n.height=r.height,n.class="journey-section section-type-"+e.num,n.rx=3,n.ry=3,b3t(t,n),L3t(r)(e.text,t,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),C3t=-1,S3t=Ae(function(t,r,e){let n=r.x+e.width/2,i=t.append("g"),a=(C3t++,i.append("line").attr("id","task"+C3t).attr("x1",n).attr("y1",r.y).attr("x2",n).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),w3t(i,{cx:n,cy:300+30*(5-r.score),score:r.score}),(t=T3()).x=r.x,t.y=r.y,t.fill=r.fill,t.width=e.width,t.height=e.height,t.class="task task-type-"+r.num,t.rx=3,t.ry=3,b3t(i,t),r.x+14);r.people.forEach(t=>{var e=r.actors[t].color,e={cx:a,cy:r.y,r:7,fill:e,stroke:"#000",title:t,pos:r.actors[t].position};k3t(i,e),a+=10}),L3t(e)(r.task,i,t.x,t.y,t.width,t.height,{class:"task"},e,r.colour)},"drawTask"),A3t=Ae(function(t,e){x3(t,e)},"drawBackgroundRect"),Ae(e,"byText"),A
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),o.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],C.$=a[a.length-E],C._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(C._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),typeof(_=this.performAction.apply(C,[l,h,c,f.yy,k[1],a,o].concat(p)))<"u")return _;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(C.$),o.push(C._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},i={EOF:1,parseError:Ae(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:Ae(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},"setInput"),input:Ae(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:Ae(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),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:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:Ae(function(){return this._more=!0,this},"more"),reject:Ae(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:Ae(function(t){this.unput(this.match.slice(t))},"less"),pastInput:Ae(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:Ae(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:Ae(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+e+"^"},"showPosition"),test_match:Ae(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={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)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:Ae(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:Ae(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:Ae(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:Ae(function(t){this.begin(t)},"pushState"),stateStackSize:Ae(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:Ae(function(t,e,r,n){switch(r){case 0:case 1:break;case 2:return 10;case 3:case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s[^:\n]+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};n.lexer=i,Ae(t,"Parser"),(Z3t=new((t.prototype=n).Parser=t)).parser=Z3t,Q3t=Z3t}),e5t={};J(e5t,{addEvent:()=>p5t,addSection:()=>c5t,addTask:()=>d5t,addTaskOrg:()=>g5t,clear:()=>l5t,default:()=>m5t,getCommonDb:()=>s5t,getSections:()=>h5t,getTasks:()=>u5t});var r5t,n5t,i5t,a5t,o5t,s5t,l5t,c5t,h5t,u5t,d5t,p5t,g5t,f5t,m5t,y5t=t(()=>{fh(),r5t="",n5t=0,i5t=[],a5t=[],o5t=[],s5t=Ae(()=>nc,"getCommonDb"),l5t=Ae(function(){i5t.length=0,a5t.length=0,r5t="",o5t.length=0,lc()},"clear"),c5t=Ae(function(t){r5t=t,i5t.push(t)},"addSection"),h5t=Ae(function(){return i5t},"getSections"),u5t=Ae(function(){let t=f5t(),e=0;for(;!t&&e<100;)t=f5t(),e++;return a5t.push(...o5t),a5t},"getTasks"),d5t=Ae(function(t,e,r){t={id:n5t++,section:r5t,type:r5t,task:t,score:e||0,events:r?[r]:[]},o5t.push(t)},"addTask"),p5t=Ae(function(t){o5t.find(t=>t.id===n5t-1).events.push(t)},"addEvent"),g5t=Ae(function(t){t={section:r5t,type:r5t,description:t,task:t,classes:[]},a5t.push(t)},"addTaskOrg"),f5t=Ae(function(){let t=Ae(function(t){return o5t[t].processed},"compileTask"),e=!0;for(var[r,n]of o5t.entries())t(r),e=e&&n.processed;return e},"compileTasks"),m5t={clear:l5t,getCommonDb:s5t,addSection:c5t,getSections:h5t,getTasks:u5t,addTask:d5t,addTaskOrg:g5t,addEvent:p5t}});function v5t(t,s){t.each(function(){var e,r=O(this),n=r.text().split(/(\s+|<br>)/).reverse(),i=[],a=r.attr("y"),t=parseFloat(r.attr("dy")),o=r.text(null).append("tspan").attr("x",0).attr("y",a).attr("dy",t+"em");for(let t=0;t<n.length;t++)e=n[n.length-1-t],i.push(e),o.text(i.join(" ").trim()),(o.node().getComputedTextLength()>s||"<br>"===e)&&(i.pop(),o.text(i.join(" ").trim()),i="<br>"===e?[""]:[e],o=r.append("tspan").attr("x",0).attr("y",a).attr("dy","1.1em").text(e))})}var x5t,b5t,w5t,k5t,T5t,E5t,_5t,C5t,S5t,A5t,L5t,N5t,I5t,M5t,R5t,D5t,O5t,P5t,B5t,F5t,$5t,z5t,G5t,U5t,q5t=t(()=>{function e(t,e,r,n,i,a,o,s){g(e.append("text").attr("x",r+i/2).attr("y",n+a/2+5).style("font-color",s).style("text-anchor","middle").text(t),o)}function c(t,e,r,n,i,a,o,s,l){var{taskFontSize:c,taskFontFamily:h}=s,u=t.split(/<br\s*\/?>/gi);for(let t=0;t<u.length;t++){var d=t*c-c*(u.length-1)/2,p=e.append("text").at
.section-${t-1} rect, .section-${t-1} path, .section-${t-1} circle, .section-${t-1} path {
fill: ${e["cScale"+t]};
}
.section-${t-1} text {
fill: ${e["cScaleLabel"+t]};
}
.node-icon-${t-1} {
font-size: 40px;
color: ${e["cScaleLabel"+t]};
}
.section-edge-${t-1}{
stroke: ${e["cScale"+t]};
}
.edge-depth-${t-1}{
stroke-width: ${n};
}
.section-${t-1} line {
stroke: ${e["cScaleInv"+t]} ;
stroke-width: 3;
}
.lineWrapper line{
stroke: ${e["cScaleLabel"+t]} ;
}
.disabled, .disabled circle, .disabled text {
fill: lightgray;
}
.disabled text {
fill: #efefef;
}
`}return r},"genSections"),G5t=Ae(t=>`
.edge {
stroke-width: 3;
}
${z5t(t)}
.section-root rect, .section-root path, .section-root circle {
fill: ${t.git0};
}
.section-root text {
fill: ${t.gitBranchLabel0};
}
.icon-container {
height:100%;
display: flex;
justify-content: center;
align-items: center;
}
.edge {
fill: none;
}
.eventWrapper {
filter: brightness(120%);
}
`,"getStyles"),U5t=G5t}),H5t={};J(H5t,{diagram:()=>W5t});var W5t,V5t,X5t,K5t,Z5t,Q5t,J5t,t6t,e6t,r6t,n6t,i6t,a6t,o6t,s6t,l6t,c6t,h6t,u6t=t(()=>{t5t(),y5t(),Y5t(),j5t(),W5t={db:e5t,renderer:$5t,parser:Q3t,styles:U5t}}),d6t=t(()=>{function t(){this.yy={}}var e=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,4],n=[1,13],i=[1,12],a=[1,15],o=[1,16],s=[1,20],l=[1,19],c=[6,7,8],h=[1,26],u=[1,24],d=[1,25],p=[6,7,11],g=[1,6,13,15,16,19,22],f=[1,33],m=[1,34],y=[1,6,7,11,13,15,16,19,22],r={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:Ae(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return n;case 8:n.getLogger().trace("Stop NL ");break;case 9:n.getLogger().trace("Stop EOF ");break;case 11:n.getLogger().trace("Stop NL2 ");break;case 12:n.getLogger().trace("Stop EOF2 ");break;case 15:n.getLogger().info("Node: ",a[s].id),n.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 16:n.getLogger().trace("Icon: ",a[s]),n.decorateNode({icon:a[s]});break;case 17:case 21:n.decorateNode({class:a[s]});break;case 18:n.getLogger().trace("SPACELIST");break;case 19:n.getLogger().trace("Node: ",a[s].id),n.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 20:n.decorateNode({icon:a[s]});break;case 25:n.getLogger().trace("node found ..",a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:n.getType(a[s-2],a[s])};break;case 26:this.$={id:a[s],descr:a[s],type:n.nodeType.DEFAULT};break;case 27:n.getLogger().trace("node found ..",a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:n.getType(a[s-2],a[s])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:r},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:r},{6:n,7:[1,10],9:9,12:11,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:l},e(c,[2,3]),{1:[2,2]},e(c,[2,4]),e(c,[2,5]),{1:[2,6],6:n,12:21,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:l},{6:n,9:22,12:11,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:l},{6:h,7:u,10:23,11:d},e(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:s,22:l}),e(p,[2,18]),e(p,[2,19]),e(p,[2,20]),e(p,[2,21]),e(p,[2,23]),e(p,[2,24]),e(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:h,7:u,10:32,11:d},{1:[2,7],6:n,12:21,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:l},e(g,[2,14],{7:f,11:m}),e(y,[2,8]),e(y,[2,9]),e(y,[2,10]),e(p,[2,15]),e(p,[2,16]),e(p,[2,17]),{20:[1,35]},{21:[1,36]},e(g,[2,13],{7:f,11:m}),e(y,[2,11]),e(y,[2,12]),{21:[1,37]},e(p,[2,25]),e(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:Ae(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:Ae(function(t){var e,r=this,n=[0],i=[],a=[null],o=[],s=this.table,l="",c=0,h=0,u=0,d=1,p=o.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(o.push(m),g.options&&g.options.ranges);function v(){var t=i.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,Ae(function(t){n.length=n.length-2*t,a.length=a.length-t,o.length=o.length-t},"popStack"),Ae(v,"lex");for(var x,b,w,k,T,E,_,C={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),s[w]&&s[w][x]))||!k.length||!k[0]){var S,A=[];for(T in s[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),o.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],C.$=a[a.length-E],C._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(C._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),typeof(_=this.performAction.apply(C,[l,h,c,f.yy,k[1],a,o].concat(p)))<"u")return _;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(C.$),o.push(C._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},c={EOF:1,parseError:Ae(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:Ae(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},"setInput"),input:Ae(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:Ae(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),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:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:Ae(function(){return this._more=!0,this},"more"),reject:Ae(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:Ae(function(t){this.unput(this.match.slice(t))},"less"),pastInput:Ae(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:Ae(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:Ae(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+e+"^"},"showPosition"),test_match:Ae(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={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)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:Ae(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:Ae(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:Ae(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:Ae(function(t){this.begin(t)},"pushState"),stateStackSize:Ae(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:Ae(function(t,e,r,n){switch(r){case 0:return t.getLogger().trace("Found comment",e.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return t.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:t.getLogger().trace("end icon"),this.popState();break;case 10:return t.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return t.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 30:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 33:case 34:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 35:case 36:return t.getLogger().trace("Long description:",e.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};r.lexer=c,Ae(t,"Parser"),(V5t=new((t.prototype=r).Parser=t)).parser=V5t,X5t=V5t}),p6t=t(()=>{i(),tc(),e(),Nn(),K5t=[],Z5t=0,Q5t={},J5t=Ae(()=>{K5t=[],Z5t=0,Q5t={}},"clear"),t6t=Ae(function(e){for(let t=K5t.length-1;0<=t;t--)if(K5t[t].level<e)return K5t[t];return null},"getParent"),e6t=Ae(()=>0<K5t.length?K5t[0]:null,"getMindmap"),r6t=Ae((t,e,r,n)=>{R.info("addNode",t,e,r,n);let i=D(),a=i.mindmap?.padding??xr.mindmap.padding;switch(n){case n6t.ROUNDED_RECT:case n6t.RECT:case n6t.HEXAGON:a*=2}if(e={id:Z5t++,nodeId:Sl(e,i),level:t,descr:Sl(r,i),type:n,children:[],width:i.mindmap?.maxNodeWidth??xr.mindmap.maxNodeWidth,padding:a},r=t6t(t))r.children.push(e);else if(0!==K5t.length)throw new Error('There can be only one root. No parent could be found for ("'+e.descr+'")'
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _6t(t,e){var r,n,i,a,o=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(o)return n=!(r=!0),{s:Ae(function(){o=o.call(t)},"s"),n:Ae(function(){var t=o.next();return r=t.done,t},"n"),e:Ae(function(t){n=!0,i=t},"e"),f:Ae(function(){try{r||null==o.return||o.return()}finally{if(n)throw i}},"f")};if(Array.isArray(t)||(o=k6t(t))||e&&t&&"number"==typeof t.length)return o&&(t=o),a=0,{s:e=Ae(function(){},"F"),n:Ae(function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},"n"),e:Ae(function(t){throw t},"e"),f:e};throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function C6t(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function S6t(t,e){return t(e={exports:{}},e.exports),e.exports}function A6t(t){for(var e=t.length;e--&&w7t.test(t.charAt(e)););return e}function L6t(t){return t&&t.slice(0,k7t(t)+1).replace(T7t,"")}function N6t(t){var e=_7t.call(t,S7t),r=t[S7t];try{var n=!(t[S7t]=void 0)}catch{}var i=C7t.call(t);return n&&(e?t[S7t]=r:delete t[S7t]),i}function I6t(t){return L7t.call(t)}function M6t(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":(I7t&&I7t in Object(t)?A7t:N7t)(t)}function R6t(t){return null!=t&&"object"==typeof t}function D6t(t){return"symbol"==typeof t||R7t(t)&&"[object Symbol]"==M7t(t)}function O6t(t){if("number"==typeof t)return t;if(D7t(t))return O7t;if(y7t(t)&&(e="function"==typeof t.valueOf?t.valueOf():t,t=y7t(e)?e+"":e),"string"!=typeof t)return 0===t?t:+t;t=E7t(t);var e=B7t.test(t);return e||F7t.test(t)?$7t(t.slice(2),e?2:8):P7t.test(t)?O7t:+t}function P6t(n,r,t){var i,a,o,s,l,c,h=0,e=!1,u=!1,d=!0;if("function"!=typeof n)throw new TypeError("Expected a function");function p(t){var e=i,r=a;return i=a=void 0,h=t,s=n.apply(r,e)}function g(t){return h=t,l=setTimeout(y,r),e?p(t):s}function f(t){var e=r-(t-c);return u?U7t(e,o-(t-h)):e}function m(t){var e=t-c;return void 0===c||r<=e||e<0||u&&o<=t-h}function y(){var t=b7t();if(m(t))return v(t);l=setTimeout(y,f(t))}function v(t){return l=void 0,d&&i?p(t):(i=a=void 0,s)}function x(){void 0!==l&&clearTimeout(l),i=c=a=l=void(h=0)}function b(){return void 0===l?s:v(b7t())}function w(){var t=b7t(),e=m(t);if(i=arguments,a=this,c=t,e){if(void 0===l)return g(c);if(u)return clearTimeout(l),l=setTimeout(y,r),p(c)}return void 0===l&&(l=setTimeout(y,r)),s}return r=z7t(r)||0,y7t(t)&&(e=!!t.leading,u="maxWait"in t,o=u?G7t(z7t(t.maxWait)||0,r):o,d="trailing"in t?!!t.trailing:d),Ae(p,"invokeFunc"),Ae(g,"leadingEdge"),Ae(f,"remainingWait"),Ae(m,"shouldInvoke"),Ae(y,"timerExpired"),Ae(v,"trailingEdge"),Ae(x,"cancel"),Ae(b,"flush"),Ae(w,"debounced"),w.cancel=x,w.flush=b,w}function B6t(t,e,r,n,i,a){var o=Bkt(t)?t:pEt[t]||pEt.euclidean;return 0===e&&Bkt(t)?o(i,a):o(e,r,n,i,a)}function F6t(t,e){var r;return!JEt(t)&&(!("number"!=(r=typeof t)&&"symbol"!=r&&"boolean"!=r&&null!=t&&!D7t(t))||e_t.test(t)||!t_t.test(t)||null!=e&&t in Object(e))}function $6t(t){return!!y7t(t)&&("[object Function]"==(t=M7t(t))||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t)}function z6t(t){return!!i_t&&i_t in t}function G6t(t){if(null!=t){try{return o_t.call(t)}catch{}try{return t+""}catch{}}return""}function U6t(t){return!(!y7t(t)||a_t(t))&&(n_t(t)?c_t:l_t).test(s_t(t))}function q6t(t,e){return t?.[e]}function Y6t(t,e){return t=u_t(t,e),h_t(t)?t:void 0}function j6t(){this.__data__=p_t?p_t(null):{},this.size=0}function H6t(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t}function W6t(t){var e,r=this.__data__;return p_t?"__lodash_hash_undefined__"===(e=r[t])?void 0:e:g_t.call(r,t)?r[t]:void 0}function V6t(t){var e=this.__data__;return p_t?void 0!==e[t]:f_t.call(e,t)}function X6t(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=p_t&&void 0===e?"__lodash_hash_undefined__":e,this}function K6t(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Z6t(){this.__data__=[],this.size=0}function Q6t(t,e){return t===e||t!=t&&e!=e}function J6t(t,e){for(var r=t.length;r--;)if(y_t(t[r][0],e))return r;return-1}function twt(t){var e=this.__data__;return!((t=v_t(e,t))<0||(t==e.length-1?e.pop():x_t.call(e,t,1),--this.size,0))}function ewt(t){var e=this.__data__;return(t=v_t(e,t))<0?void 0:e[t][1]}function rwt(t){return-1<v_t(this.__data__,t)}function nwt(t,e){var r=this.__data__,n=v_t(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function iwt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function awt(){this.size=0,this.__data__={hash:new m_t,map:new(w_t||b_t),string:new m_t}}function owt(t){va
`),l=t.pstyle("text-max-width").pfValue,c="anywhere"===t.pstyle("text-overflow-wrap").value,h=[],u=/[\s\u200b]+|$/g,d=0;d<s.length;d++){var p=s[d],g=this.calculateLabelDimensions(t,p).width;if(c&&(p=p.split("").join("")),l<g){var f,m="",y=0,v=_6t(p.matchAll(u));try{for(v.s();!(f=v.n()).done;){var x=f.value,b=x[0],w=p.substring(y,x.index),y=x.index+b.length,k=0===m.length?w:m+w+b;this.calculateLabelDimensions(t,k).width<=l?m+=w+b:(m&&h.push(m),m=w+b)}}catch(t){v.e(t)}finally{v.f()}m.match(/^[\s\u200b]+$/)||h.push(m)}else h.push(p)}a("labelWrapCachedLines",h),e=a("labelWrapCachedText",h.join(`
`)),a("labelWrapKey",o)}else if("ellipsis"===i){var T=t.pstyle("text-max-width").pfValue,E="",_=!1;if(this.calculateLabelDimensions(t,e).width<T)return e;for(var C=0;C<e.length&&!(T<this.calculateLabelDimensions(t,E+e[C]+"…").width);C++)E+=e[C],C===e.length-1&&(_=!0);return _||(E+="…"),E}return e},j.getLabelJustification=function(t){var e=t.pstyle("text-justification").strValue,r=t.pstyle("text-halign").strValue;if("auto"!==e)return e;if(!t.isNode())return"center";switch(r){case"left":return"right";case"right":return"left";default:return"center"}},j.calculateLabelDimensions=function(t,e){var r=this.cy.window().document,n=rTt(e,t._private.labelDimsKey),i=this.labelDimCache||(this.labelDimCache=[]);if(null!=(a=i[n]))return a;var a=t.pstyle("font-style").strValue,o=t.pstyle("font-size").pfValue,s=t.pstyle("font-family").strValue,t=t.pstyle("font-weight").strValue,l=this.labelCalcCanvas,c=this.labelCalcCanvasContext;l||(l=this.labelCalcCanvas=r.createElement("canvas"),c=this.labelCalcCanvasContext=l.getContext("2d"),(r=l.style).position="absolute",r.left="-9999px",r.top="-9999px",r.zIndex="-1",r.visibility="hidden",r.pointerEvents="none"),c.font="".concat(a," ").concat(t," ").concat(o,"px ").concat(s);for(var h=0,u=0,d=e.split(`
`),p=0;p<d.length;p++){var g=d[p],g=c.measureText(g),g=Math.ceil(g.width),f=o,h=Math.max(g,h);u+=f}return i[n]={width:h+=0,height:u+=0}},j.calculateLabelAngle=function(t,e){var r=t._private.rscratch,n=t.isEdge();return"none"===(e=(t=t.pstyle((e?e+"-":"")+"text-rotation")).strValue)?0:n&&"autorotate"===e?r.labelAutoAngle:"autorotate"===e?0:t.pfValue},j.calculateLabelAngles=function(t){var e=t.isEdge(),r=t._private.rscratch;r.labelAngle=this.calculateLabelAngle(t),e&&(r.sourceLabelAngle=this.calculateLabelAngle(t,"source"),r.targetLabelAngle=this.calculateLabelAngle(t,"target"))},cAt=!1,hAt={},[IAt,MAt,RAt,DAt,OAt,j,{getNodeShape:function(t){var e=t.pstyle("shape").value;return"cutrectangle"===e&&(t.width()<28||t.height()<28)?(cAt||(fTt("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),cAt=!0),"rectangle"):t.isParent()?"rectangle"===e||"roundrectangle"===e||"round-rectangle"===e||"cutrectangle"===e||"cut-rectangle"===e||"barrel"===e?e:"rectangle":"polygon"===e?(t=t.pstyle("shape-polygon-points").value,this.nodeShapes.makePolygon(t).name):e}},{registerCalculationListeners:function(){var o=this.cy,s=o.collection(),l=this,c=Ae(function(t){var e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];if(s.merge(t),e)for(var r=0;r<t.length;r++){var n=t[r]._private.rstyle;n.clean=!1,n.cleanConnected=!1}},"enqueue"),t=(l.binder(o).on("bounds.* dirty.*",Ae(function(t){t=t.target,c(t)},"onDirtyBounds")).on("style.* background.*",Ae(function(t){t=t.target,c(t,!1)},"onDirtyStyle")),Ae(function(t){if(t){var e=l.onUpdateEleCalcsFns;s.cleanStyle();for(var r=0;r<s.length;r++){var n=s[r],i=n._private.rstyle;n.isNode()&&!i.cleanConnected&&(c(n.connectedEdges()),i.cleanConnected=!0)}if(e)for(var a=0;a<e.length;a++)(0,e[a])(t,s);l.recalculateRenderedStyle(s),s=o.collection()}},"updateEleCalcs"));l.flushRenderedStyleQueue=function(){t(!0)},l.beforeRender(t,l.beforeRenderPriorities.eleCalcs)},onUpdateEleCalcs:function(t){(this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[]).push(t)},recalculateRenderedStyle:function(t,e){var r=Ae(function(t){return t._private.rstyle.cleanConnected},"isCleanConnected"),n=[],i=[];if(!this.destroyed){void 0===e&&(e=!0);for(var a=0;a<t.length;a++){var o=t[a],s=o._private,l=s.rstyle;!o.isEdge()||r(o.source())&&r(o.target())||(l.clean=!1),e&&l.clean||o.removed()||"none"===o.pstyle("display").value||(("nodes"===s.group?i:n).push(o),l.clean=!0)}for(var c=0;c<i.length;c++){var h=i[c],u=h._private.rstyle,d=h.position();this.recalculateNodeLabelProjection(h),u.nodeX=d.x,u.nodeY=d.y,u.nodeW=h.pstyle("width").pfValue,u.nodeH=h.pstyle("height").pfValue}this.recalculateEdgeProjections(n);for(var p=0;p<n.length;p++){var g=(f=n[p]._private).rstyle,f=f.rscratch;g.srcX=f.arrowStartX,g.srcY=f.arrowStartY,g.tgtX=f.arrowEndX,g.tgtY=f.arrowEndY,g.midX=f.midX,g.midY=f.midY,g.labelAngle=f.labelAngle,g.sourceLabelAngle=f.sourceLabelAngle,g.targetLabelAngle=f.targetLabelAngle}}}},{updateCachedGrabbedEles:function(){var t=this.cachedZSortedEles;if(t){t.drag=[],t.nondrag=[];for(var e=[],r=0;r<t.length;r++){var n=(i=t[r])._private.rscratch;(i.grabbed()&&!i.isParent()?e:n.inDragLayer?t.drag:t.nondrag).push(i)}for(r=0;r<e.length;r++){var i=e[r];t.drag.push(i)}}},invalidateCachedZSortedEles:function(){this.cachedZSortedEles=null},getCachedZSortedEles:function(t){var e;return t||!this.cachedZSortedEles?((e=this.cy.mutableElements().toArray()).sort(HCt),e.interactive=e.filter(function(t){return t.interactive()}),this.cachedZSortedEles=e,this.updateCachedGrabbedEles()):e=this.cachedZSortedEles,e}}].forEach(function(t){l7t(hAt,t)}),YAt={getCachedImage:function(t,e,r){var n,i=this.imageCache=this.imageCache||{},a=i[t];return a?(a.image.complete||a.image.addEventListener("load",r),a.image):((n=(a=i[t]=i[t]||{}).image=new Image).addEventListener("load",r),n.addEventListener("error",function(){n.error=!0}),"data:"!==t.substring(0,"data:".length).toLowerCase()&&(n.crossOrigin=e="null"===e?null:e),n.src=t,n)}},jAt={registerBinding:function(t,e,r,n){var i=Array.prototype.slice.apply(arguments,[1]),t=thi
a${s},${s} 1 0,1 ${.4*n},${-1*n*.1}
a${o},${o} 1 0,1 ${.35*n},${.2*+n}
a${a},${a} 1 0,1 ${.15*n},${.35*+i}
a${l},${l} 1 0,1 ${-1*n*.15},${.65*+i}
a${o},${a} 1 0,1 ${-1*n*.25},${.15*n}
a${s},${s} 1 0,1 ${-1*n*.5},0
a${a},${a} 1 0,1 ${-1*n*.25},${-1*n*.15}
a${a},${a} 1 0,1 ${-1*n*.1},${-1*i*.35}
a${l},${l} 1 0,1 ${.1*n},${-1*i*.65}
H0 V0 Z`)},"cloudBkg"),c9t=Ae(function(t,e,r){var n=r.width,i=r.height,a=.15*n;e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 0 a${a},${a} 1 0,0 ${.25*n},${-1*i*.1}
a${a},${a} 1 0,0 ${.25*n},0
a${a},${a} 1 0,0 ${.25*n},0
a${a},${a} 1 0,0 ${.25*n},${.1*+i}
a${a},${a} 1 0,0 ${.15*n},${.33*+i}
a${.8*a},${.8*a} 1 0,0 0,${.34*+i}
a${a},${a} 1 0,0 ${-1*n*.15},${.33*+i}
a${a},${a} 1 0,0 ${-1*n*.25},${.15*i}
a${a},${a} 1 0,0 ${-1*n*.25},0
a${a},${a} 1 0,0 ${-1*n*.25},0
a${a},${a} 1 0,0 ${-1*n*.25},${-1*i*.15}
a${a},${a} 1 0,0 ${-1*n*.1},${-1*i*.33}
a${.8*a},${.8*a} 1 0,0 0,${-1*i*.34}
a${a},${a} 1 0,0 ${.1*n},${-1*i*.33}
H0 V0 Z`)},"bangBkg"),h9t=Ae(function(t,e,r){e.append("circle").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("r",r.width/2)},"circleBkg"),Ae(a9t,"insertPolygonShape"),u9t=Ae(function(t,e,r){var n=r.height,i=n/4,a=r.width-r.padding+2*i;a9t(e,a,n,[{x:i,y:0},{x:a-i,y:0},{x:a,y:-n/2},{x:a-i,y:-n},{x:i,y:-n},{x:0,y:-n/2}],r)},"hexagonBkg"),d9t=Ae(function(t,e,r){e.append("rect").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("height",r.height).attr("rx",r.padding).attr("ry",r.padding).attr("width",r.width)},"roundedRectBkg"),p9t=Ae(async function(t,e,r,n,i){var a=i.htmlLabels,o=n%11,n=e.append("g");let s="section-"+(r.section=o);o<0&&(s+=" section-root"),n.attr("class",(r.class?r.class+" ":"")+"mindmap-node "+s);var l=n.append("g"),e=n.append("g"),c=r.descr.replace(/(<br\/*>)/g,`
`),c=(await XC(e,c,{useHtmlLabels:a,width:r.width,classes:"mindmap-node-label"},i),a||e.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),e.node().getBBox()),[i]=j8(i.fontSize);switch(r.height=c.height+1.1*i*.5+r.padding,r.width=c.width+2*r.padding,r.icon?r.type===t.nodeType.CIRCLE?(r.height+=50,r.width+=50,n.append("foreignObject").attr("height","50px").attr("width",r.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+o+" "+r.icon),e.attr("transform","translate("+r.width/2+", "+(r.height/2-1.5*r.padding)+")")):(r.width+=50,i=r.height,r.height=Math.max(i,60),i=Math.abs(r.height-i),n.append("foreignObject").attr("width","60px").attr("height",r.height).attr("style","text-align: center;margin-top:"+i/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+o+" "+r.icon),e.attr("transform","translate("+(25+r.width/2)+", "+(i/2+r.padding/2)+")")):a?(i=(r.width-c.width)/2,a=(r.height-c.height)/2,e.attr("transform","translate("+i+", "+a+")")):(c=r.width/2,i=r.padding/2,e.attr("transform","translate("+c+", "+i+")")),r.type){case t.nodeType.DEFAULT:o9t(t,l,r,o);break;case t.nodeType.ROUNDED_RECT:d9t(t,l,r,o);break;case t.nodeType.RECT:s9t(t,l,r,o);break;case t.nodeType.CIRCLE:l.attr("transform","translate("+r.width/2+", "+ +r.height/2+")"),h9t(t,l,r,o);break;case t.nodeType.CLOUD:l9t(t,l,r,o);break;case t.nodeType.BANG:c9t(t,l,r,o);break;case t.nodeType.HEXAGON:u9t(t,l,r,o)}return t.setElementForId(r.id,n),r.height},"drawNode"),g9t=Ae(function(t,e){var t=t.getElementById(e.id),r=e.x||0,e=e.y||0;t.attr("transform","translate("+r+","+e+")")},"positionNode")});async function m9t(r,n,t,i,a){await p9t(r,n,t,i,a),t.children&&await Promise.all(t.children.map((t,e)=>m9t(r,n,t,i<0?e:i,a)))}function y9t(n,t){t.edges().map((t,e)=>{var r=t.data();t[0]._private.bodyBounds&&(t=t[0]._private.rscratch,R.trace("Edge: ",e,r),n.insert("path").attr("d",`M ${t.startX},${t.startY} L ${t.midX},${t.midY} L${t.endX},${t.endY} `).attr("class","edge section-edge-"+r.section+" edge-depth-"+r.depth))})}function v9t(e,r,n,i){r.add({group:"nodes",data:{id:e.id.toString(),labelText:e.descr,height:e.height,width:e.width,level:i,nodeId:e.id,padding:e.padding,type:e.type},position:{x:e.x,y:e.y}}),e.children&&e.children.forEach(t=>{v9t(t,r,n,i+1),r.add({group:"edges",data:{id:e.id+"_"+t.id,source:e.id,target:t.id,depth:i,section:t.section}})})}function x9t(n,i){return new Promise(e=>{let t=O("body").append("div").attr("id","cy").attr("style","display:none"),r=t9t({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});t.remove(),v9t(n,r,i,0),r.nodes().forEach(function(e){e.layoutDimensions=()=>{var t=e.data();return{w:t.width,h:t.height}}}),r.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),r.ready(t=>{R.info("Ready",t),e(r)})})}function b9t(i,t){t.nodes().map((t,e)=>{var r=t.data(),n=(r.x=t.position().x,r.y=t.position().y,g9t(i,r),i.getElementById(r.nodeId));R.info("Id:",e,"Position: (",t.position().x,", ",t.position().y,")",r),n.attr("transform",`translate(${t.position().x-r.width/2}, ${t.position().y-r.height/2})`),n.attr("attr",`apa-${e})`)})}var w9t,k9t,T9t,E9t,_9t,C9t=t(()=>{e9t(),w9t=rt(i9t(),1),Q3(),i(),e(),Ipt(),ec(),f9t(),Nn(),t9t.use(w9t.default),Ae(m9t,"drawNodes"),Ae(y9t,"drawEdges"),Ae(v9t,"addNodes"),Ae(x9t,"layoutMindmap"),Ae(b9t,"positionNodes"),w9t=Ae(async(t,e,r,n)=>{var i,a,o;R.debug(`Rendering mindmap diagram
`+t),(n=(t=n.db).getMindmap())&&((i=D()).htmlLabels=!1,(a=(e=Ept(e)).append("g")).attr("class","mindmap-edges"),(o=e.append("g")).attr("class","mindmap-nodes"),await m9t(t,o,n,-1,i),y9t(a,o=await x9t(n,i)),b9t(t,o),Xl(void 0,e,i.mindmap?.padding??xr.mindmap.padding,i.mindmap?.useMaxWidth??xr.mindmap.useMaxWidth))},"draw"),k9t={draw:w9t}}),S9t=t(()=>{bn(),T9t=Ae(e=>{let r="";for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e["lineColor"+t]=e["lineColor"+t]||e["cScaleInv"+t],Ye(e["lineColor"+t])?e["lineColor"+t]=Ve(e["lineColor"+t],20):e["lineColor"+t]=Ke(e["lineColor"+t],20);for(let t=0;t<e.THEME_COLOR_LIMIT;t++){var n=""+(17-3*t);r+=`
.section-${t-1} rect, .section-${t-1} path, .section-${t-1} circle, .section-${t-1} polygon, .section-${t-1} path {
fill: ${e["cScale"+t]};
}
.section-${t-1} text {
fill: ${e["cScaleLabel"+t]};
}
.node-icon-${t-1} {
font-size: 40px;
color: ${e["cScaleLabel"+t]};
}
.section-edge-${t-1}{
stroke: ${e["cScale"+t]};
}
.edge-depth-${t-1}{
stroke-width: ${n};
}
.section-${t-1} line {
stroke: ${e["cScaleInv"+t]} ;
stroke-width: 3;
}
.disabled, .disabled circle, .disabled text {
fill: lightgray;
}
.disabled text {
fill: #efefef;
}
`}return r},"genSections"),E9t=Ae(t=>`
.edge {
stroke-width: 3;
}
${T9t(t)}
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
fill: ${t.git0};
}
.section-root text {
fill: ${t.gitBranchLabel0};
}
.icon-container {
height:100%;
display: flex;
justify-content: center;
align-items: center;
}
.edge {
fill: none;
}
.mindmap-node-label {
dy: 1em;
alignment-baseline: middle;
text-anchor: middle;
dominant-baseline: middle;
text-align: center;
}
`,"getStyles"),_9t=E9t}),A9t={};J(A9t,{diagram:()=>L9t});var L9t,N9t,I9t,M9t,R9t,D9t,O9t,P9t,B9t,F9t,$9t,z9t,G9t,U9t,q9t,Y9t=t(()=>{d6t(),p6t(),C9t(),S9t(),L9t={db:h6t,renderer:k9t,parser:X5t,styles:_9t}}),j9t=t(()=>{function t(){this.yy={}}var e=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,9],n=[1,10],i=[1,5,10,12],i={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:Ae(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 7:var l=n.findOrCreateNode(a[s-4].trim().replaceAll('""','"')),c=n.findOrCreateNode(a[s-2].trim().replaceAll('""','"')),h=parseFloat(a[s].trim());n.addLink(l,c,h);break;case 8:case 9:case 11:this.$=a[s];break;case 10:this.$=a[s-1]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:r,20:n},{1:[2,6],7:11,10:[1,12]},e(n,[2,4],{9:13,5:[1,14]}),{12:[1,15]},e(i,[2,8]),e(i,[2,9]),{19:[1,16]},e(i,[2,11]),{1:[2,1]},{1:[2,5]},e(n,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:r,20:n},{15:18,16:7,17:8,18:r,20:n},{18:[1,19]},e(n,[2,3]),{12:[1,20]},e(i,[2,10]),{15:21,16:7,17:8,18:r,20:n},e([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:Ae(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:Ae(function(t){var e,r=this,n=[0],i=[],a=[null],o=[],s=this.table,l="",c=0,h=0,u=0,d=1,p=o.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"<typeof g.yylloc&&(g.yylloc={});var m=g.yylloc,y=(o.push(m),g.options&&g.options.ranges);function v(){var t=i.pop()||g.lex()||d;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,Ae(function(t){n.length=n.length-2*t,a.length=a.length-t,o.length=o.length-t},"popStack"),Ae(v,"lex");for(var x,b,w,k,T,E,_,C={};;){if(w=n[n.length-1],"u"<typeof(k=this.defaultActions[w]||((null===x||"u"<typeof x)&&(x=v()),s[w]&&s[w][x]))||!k.length||!k[0]){var S,A=[];for(T in s[w])this.terminals_[T]&&2<T&&A.push("'"+this.terminals_[T]+"'");S=g.showPosition?"Parse error on line "+(c+1)+`:
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),o.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],C.$=a[a.length-E],C._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(C._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),typeof(_=this.performAction.apply(C,[l,h,c,f.yy,k[1],a,o].concat(p)))<"u")return _;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(C.$),o.push(C._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},r={EOF:1,parseError:Ae(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:Ae(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},"setInput"),input:Ae(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:Ae(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),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:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:Ae(function(){return this._more=!0,this},"more"),reject:Ae(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:Ae(function(t){this.unput(this.match.slice(t))},"less"),pastInput:Ae(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:Ae(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:Ae(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+e+"^"},"showPosition"),test_match:Ae(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={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)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:Ae(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:Ae(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:Ae(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:Ae(function(t){this.begin(t)},"pushState"),stateStackSize:Ae(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:Ae(function(t,e,r,n){switch(r){case 0:return this.pushState("csv"),4;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;case 5:return 20;case 6:return this.popState("escaped_text"),18;case 7:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};i.lexer=r,Ae(t,"Parser"),(N9t=new((t.prototype=i).Parser=t)).parser=N9t,I9t=N9t}),H9t=t(()=>{i(),tc(),fh(),M9t=[],R9t=[],D9t=new Map,O9t=Ae(()=>{M9t=[],R9t=[],D9t=new Map,lc()},"clear"),P9t=class{constructor(t,e,r=0){this.source=t,this.target=e,this.value=r}static{Ae(this,"SankeyLink")}},B9t=Ae((t,e,r)=>{M9t.push(new P9t(t,e,r))},"addLink"),F9t=class{constructor(t){this.ID=t}static{Ae(this,"SankeyNode")}},$9t=Ae(t=>{t=L.sanitizeText(t,D());let e=D9t.get(t);return void 0===e&&(e=new F9t(t),D9t.set(t,e),R9t.push(e)),e},"findOrCreateNode"),z9t=Ae(()=>R9t,"getNodes"),G9t=Ae(()=>M9t,"getLinks"),U9t=Ae(()=>({nodes:R9t.map(t=>({id:t.ID})),links:M9t.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),q9t={nodesMap:D9t,getConfig:Ae(()=>D().sankey,"getConfig"),getNodes:z9t,getLinks:G9t,getGraph:U9t,addLink:B9t,findOrCreateNode:$9t,getAccTitle:hc,setAccTitle:cc,getAccDescription:dc,setAccDescription:uc,getDiagramTitle:gc,setDiagramTitle:pc,clear:O9t}});function W9t(e,r){let n;if(void 0===r)for(var t of e)null!=t&&(n<t||void 0===n&&t<=t)&&(n=t);else{let t=-1;for(var i of e)null!=(i=r(i,++t,e))&&(n<i||void 0===n&&i<=i)&&(n=i)}return n}var V9t=t(()=>{Ae(W9t,"max")});function X9t(e,r){let n;if(void 0===r)for(var t of e)null!=t&&(n>t||void 0===n&&t<=t)&&(n=t);else{let t=-1;for(var i of e)null!=(i=r(i,++t,e))&&(n>i||void 0===n&&i<=i)&&(n=i)}return n}var K9t=t(()=>{Ae(X9t,"min")});function Z9t(e,r){let n=0;if(void 0===r)for(var t of e)(t=+t)&&(n+=t);else{let t=-1;for(var i of e)(i=+r(i,++t,e))&&(n+=i)}return n}var Q9t=t(()=>{Ae(Z9t,"sum")}),J9t=t(()=>{V9t(),K9t(),Q9t()});function tLt(t){return t.target.depth}function eLt(t){return t.depth}function rLt(t,e){return e-1-t.height}function nLt(t,e){return t.sourceLinks.length?t.depth:e-1}function iLt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?X9t(t.sourceLinks,tLt)-1:0}var aLt=t(()=>{J9t(),Ae(tLt,"targetDepth"),Ae(eLt,"left"),Ae(rLt,"right"),Ae(nLt,"justify"),Ae(iLt,"center")});function oLt(t){return function(){return t}}var sLt=t(()=>{Ae(oLt,"constant")});function lLt(t,e){return hLt(t.source,e.source)||t.index-e.index}function cLt(t,e){return hLt(t.target,e.target)||t.index-e.index}function hLt(t,e){return t.y0-e.y0}function uLt(t){return t.value}function dLt(t){return t.index}function pLt(t){return t.nodes}function gLt(t){return t.links}function fLt(t,e){if(t=t.get(e))return t;throw new Error("missing: "+e)}function mLt({nodes:t}){for(var r of t){let t=r.y0,e=t;for(var n of r.sourceLinks)n.y0=t+n.width/2,t+=n.width;for(var i of r.targ
`+g+Math.round(100*e)/100+f:t,"getText"),n=(c.append("g").attr("class","node-labels").attr("font-family","sans-serif").attr("font-size",14).selectAll("text").data(y.nodes).join("text").attr("x",t=>t.x0<h/2?t.x1+6:t.x0-6).attr("y",t=>(t.y1+t.y0)/2).attr("dy",`${m?"0":"0.35"}em`).attr("text-anchor",t=>t.x0<h/2?"start":"end").text(e),c.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(y.links).join("g").attr("class","link").style("mix-blend-mode","multiply")),b=a?.linkColor??"gradient";"gradient"===b&&((e=n.append("linearGradient").attr("id",t=>(t.uid=YLt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",t=>t.source.x1).attr("x2",t=>t.target.x0)).append("stop").attr("offset","0%").attr("stop-color",t=>x(t.source.id)),e.append("stop").attr("offset","100%").attr("stop-color",t=>x(t.target.id)));let w;switch(b){case"gradient":w=Ae(t=>t.uid,"coloring");break;case"source":w=Ae(t=>x(t.source.id),"coloring");break;case"target":w=Ae(t=>x(t.target.id),"coloring");break;default:w=b}n.append("path").attr("d",qLt()).attr("stroke",w).attr("stroke-width",t=>Math.max(1,t.width)),Xl(void 0,c,0,d)},"draw"),WLt={draw:HLt}}),JLt=t(()=>{VLt=Ae(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
`).trim(),"prepareTextForParsing")}),tNt={};J(tNt,{diagram:()=>rNt});var eNt,rNt,nNt,iNt,aNt,oNt,sNt,lNt,cNt,hNt,uNt,dNt,pNt,gNt,fNt,mNt,yNt,vNt,xNt=t(()=>{j9t(),H9t(),QLt(),JLt(),eNt=I9t.parse.bind(I9t),I9t.parse=t=>eNt(VLt(t)),rNt={parser:I9t,db:q9t,renderer:WLt}}),bNt=t(()=>{Mn(),Nn(),K8(),fh(),nNt={packet:[]},iNt=structuredClone(nNt),aNt=xr.packet,oNt=Ae(()=>{var t=b8({...aNt,...Rr().packet});return t.showBits&&(t.paddingY+=10),t},"getConfig"),sNt=Ae(()=>iNt.packet,"getPacket"),lNt=Ae(t=>{0<t.length&&iNt.packet.push(t)},"pushWord"),cNt=Ae(()=>{lc(),iNt=structuredClone(nNt)},"clear"),hNt={pushWord:lNt,getPacket:sNt,getConfig:oNt,clear:cNt,setAccTitle:cc,getAccTitle:hc,setDiagramTitle:pc,getDiagramTitle:gc,getAccDescription:dc,setAccDescription:uc}}),wNt=t(()=>{cut(),e(),put(),bNt(),uNt=Ae(t=>{hut(t,hNt);let e=-1,r=[],n=1,i=hNt.getConfig().bitsPerRow;for(var{start:a,end:o,label:s}of t.blocks){if(o&&o<a)throw new Error(`Packet block ${a} - ${o} is invalid. End must be greater than start.`);if(a!==e+1)throw new Error(`Packet block ${a} - ${o??a} is not contiguous. It should start from ${e+1}.`);for(e=o??a,R.debug(`Packet block ${a} - ${e} with label `+s);r.length<=i+1&&hNt.getPacket().length<1e4;){var[l,c]=dNt({start:a,end:o,label:s},n,i);if(r.push(l),l.end+1===n*i&&(hNt.pushWord(r),r=[],n++),!c)break;({start:a,end:o,label:s}=c)}}hNt.pushWord(r)},"populate"),dNt=Ae((t,e,r)=>{if(void 0===t.end&&(t.end=t.start),t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);return t.end+1<=e*r?[t,void 0]:[{start:t.start,end:e*r-1,label:t.label},{start:e*r,end:t.end,label:t.label}]},"getNextFittingBlock"),pNt={parse:Ae(async t=>{t=await aut("packet",t),R.debug(t),uNt(t)},"parse")}}),kNt=t(()=>{Ipt(),ec(),gNt=Ae((t,e,r,n)=>{var i,a,o=(n=n.db).getConfig(),{rowHeight:s,paddingY:l,bitWidth:c,bitsPerRow:h}=o,u=n.getPacket(),n=n.getDiagramTitle(),s=(l=s+l)*(u.length+1)-(n?0:s),c=c*h+2,d=Ept(e);d.attr("viewbox",`0 0 ${c} `+s),Vl(d,s,c,o.useMaxWidth);for([i,a]of u.entries())fNt(d,a,i,o);d.append("text").text(n).attr("x",c/2).attr("y",s-l/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),fNt=Ae((t,e,r,{rowHeight:n,paddingX:i,paddingY:a,bitWidth:o,bitsPerRow:s,showBits:l})=>{var c,h=t.append("g"),u=r*(n+a)+a;for(c of e){var d,p,g=c.start%s*o+1,f=(c.end-c.start+1)*o-i;h.append("rect").attr("x",g).attr("y",u).attr("width",f).attr("height",n).attr("class","packetBlock"),h.append("text").attr("x",g+f/2).attr("y",u+n/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(c.label),l&&(d=c.end===c.start,p=u-2,h.append("text").attr("x",g+(d?f/2:0)).attr("y",p).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",d?"middle":"start").text(c.start),d||h.append("text").attr("x",g+f).attr("y",p).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(c.end))}},"drawWord"),mNt={draw:gNt}}),TNt=t(()=>{K8(),yNt={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},vNt=Ae(({packet:t}={})=>`
.packetByte {
font-size: ${(t=b8(yNt,t)).byteFontSize};
}
.packetByte.start {
fill: ${t.startByteColor};
}
.packetByte.end {
fill: ${t.endByteColor};
}
.packetLabel {
fill: ${t.labelColor};
font-size: ${t.labelFontSize};
}
.packetTitle {
fill: ${t.titleColor};
font-size: ${t.titleFontSize};
}
.packetBlock {
stroke: ${t.blockStrokeColor};
stroke-width: ${t.blockStrokeWidth};
fill: ${t.blockFillColor};
}
`,"styles")}),ENt={};J(ENt,{diagram:()=>_Nt});var _Nt,CNt,SNt,ANt=t(()=>{bNt(),wNt(),kNt(),TNt(),_Nt={parser:pNt,db:hNt,renderer:mNt,styles:vNt}}),LNt=t(()=>{function t(){this.yy={}}var e=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,7],n=[1,13],i=[1,14],a=[1,15],o=[1,19],s=[1,16],l=[1,17],c=[1,18],h=[8,30],u=[8,21,28,29,30,31,32,40,44,47],d=[1,23],p=[1,24],g=[8,15,16,21,28,29,30,31,32,40,44,47],f=[8,15,16,21,27,28,29,30,31,32,40,44,47],m=[1,49],h={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:Ae(function(t,e,r,n,i,a,o){var s=a.length-1;switch(i){case 4:n.getLogger().debug("Rule: separator (NL) ");break;case 5:n.getLogger().debug("Rule: separator (Space) ");break;case 6:n.getLogger().debug("Rule: separator (EOF) ");break;case 7:n.getLogger().debug("Rule: hierarchy: ",a[s-1]),n.setHierarchy(a[s-1]);break;case 8:n.getLogger().debug("Stop NL ");break;case 9:n.getLogger().debug("Stop EOF ");break;case 10:n.getLogger().debug("Stop NL2 ");break;case 11:n.getLogger().debug("Stop EOF2 ");break;case 12:n.getLogger().debug("Rule: statement: ",a[s]),"number"==typeof a[s].length?this.$=a[s]:this.$=[a[s]];break;case 13:n.getLogger().debug("Rule: statement #2: ",a[s-1]),this.$=[a[s-1]].concat(a[s]);break;case 14:n.getLogger().debug("Rule: link: ",a[s],t),this.$={edgeTypeStr:a[s],label:""};break;case 15:n.getLogger().debug("Rule: LABEL link: ",a[s-3],a[s-1],a[s]),this.$={edgeTypeStr:a[s],label:a[s-1]};break;case 18:var l=parseInt(a[s]),c=n.generateId();this.$={id:c,type:"space",label:"",width:l,children:[]};break;case 23:n.getLogger().debug("Rule: (nodeStatement link node) ",a[s-2],a[s-1],a[s]," typestr: ",a[s-1].edgeTypeStr),c=n.edgeStrToEdgeData(a[s-1].edgeTypeStr),this.$=[{id:a[s-2].id,label:a[s-2].label,type:a[s-2].type,directions:a[s-2].directions},{id:a[s-2].id+"-"+a[s].id,start:a[s-2].id,end:a[s].id,label:a[s-1].label,type:"edge",directions:a[s].directions,arrowTypeEnd:c,arrowTypeStart:"arrow_open"},{id:a[s].id,label:a[s].label,type:n.typeStr2Type(a[s].typeStr),directions:a[s].directions}];break;case 24:n.getLogger().debug("Rule: nodeStatement (abc88 node size) ",a[s-1],a[s]),this.$={id:a[s-1].id,label:a[s-1].label,type:n.typeStr2Type(a[s-1].typeStr),directions:a[s-1].directions,widthInColumns:parseInt(a[s],10)};break;case 25:n.getLogger().debug("Rule: nodeStatement (node) ",a[s]),this.$={id:a[s].id,label:a[s].label,type:n.typeStr2Type(a[s].typeStr),directions:a[s].directions,widthInColumns:1};break;case 26:n.getLogger().debug("APA123",this||"na"),n.getLogger().debug("COLUMNS: ",a[s]),this.$={type:"column-setting",columns:"auto"===a[s]?-1:parseInt(a[s])};break;case 27:n.getLogger().debug("Rule
`+g.showPosition()+`
Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(S,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1<k.length)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),a.push(g.yytext),o.push(g.yylloc),n.push(k[1]),x=null,b?(x=b,b=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,m=g.yylloc,0<u&&u--);break;case 2:if(E=this.productions_[k[1]][1],C.$=a[a.length-E],C._$={first_line:o[o.length-(E||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(E||1)].first_column,last_column:o[o.length-1].last_column},y&&(C._$.range=[o[o.length-(E||1)].range[0],o[o.length-1].range[1]]),typeof(_=this.performAction.apply(C,[l,h,c,f.yy,k[1],a,o].concat(p)))<"u")return _;E&&(n=n.slice(0,-1*E*2),a=a.slice(0,-1*E),o=o.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),a.push(C.$),o.push(C._$),_=s[n[n.length-2]][n[n.length-1]],n.push(_);break;case 3:return!0}}return!0},"parse")},d={EOF:1,parseError:Ae(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:Ae(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},"setInput"),input:Ae(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:Ae(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),t=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,this.match.split(/(?:\r\n?|\n)/g)),n=(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),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:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:Ae(function(){return this._more=!0,this},"more"),reject:Ae(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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})},"reject"),less:Ae(function(t){this.unput(this.match.slice(t))},"less"),pastInput:Ae(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:Ae(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:Ae(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+`
`+e+"^"},"showPosition"),test_match:Ae(function(t,e){var r,n;if(this.options.backtrack_lexer&&(n={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)&&(n.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(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],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in n)this[i]=n[i];return!1},"test_match"),next:Ae(function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((r=this._input.match(this.rules[i[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:Ae(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:Ae(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:Ae(function(t){this.begin(t)},"pushState"),stateStackSize:Ae(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:Ae(function(t,e,r,n){switch(r){case 0:return 10;case 1:return t.getLogger().debug("Found space-block"),31;case 2:return t.getLogger().debug("Found nl-block"),31;case 3:return t.getLogger().debug("Found space-block"),29;case 4:t.getLogger().debug(".",e.yytext);break;case 5:t.getLogger().debug("_",e.yytext);break;case 6:return 5;case 7:return e.yytext=-1,28;case 8:return e.yytext=e.yytext.replace(/columns\s+/,""),t.getLogger().debug("COLUMNS (LEX)",e.yytext),28;case 9:this.pushState("md_string");break;case 10:return"MD_STR";case 11:this.popState();break;case 12:this.pushState("string");break;case 13:t.getLogger().debug("LEX: POPPING STR:",e.yytext),this.popState();break;case 14:return t.getLogger().debug("LEX: STR end:",e.yytext),"STR";case 15:return e.yytext=e.yytext.replace(/space\:/,""),t.getLogger().debug("SPACE NUM (LEX)",e.yytext),21;case 16:return e.yytext="1",t.getLogger().debug("COLUMNS (LEX)",e.yytext),21;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 22:return this.popState(),this.pushState("CLASSDEFID"),41;case 23:return this.popState(),42;case 24:return this.pushState("CLASS"),44;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;case 26:return this.popState(),46;case 27:return this.pushState("STYLE_STMNT"),47;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;case 29:return this.popState(),49;case 30:return this.pushState("acc_title"),"acc_title";case 31:return this.popState(),"acc_title_value";case 32:return this.pushState("acc_descr"),"acc_descr";case 33:return this.popState(),"acc_descr_value";case 34:this.pushState("acc_descr_multiline");break;case 35:this.popState();break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:case 39:return this.popState(),t.getLogger().debug("Lex: (("),"NODE_DEND";case 40:return this.popState(),t.getLogger().debug("Lex: ))"),"NODE_DEND";case 41:case 42:return this.popState(),t.getLogger().debug("Lex: (("),"NODE_DEND";case 43:return this.popState(),t.getLogger().debug("Lex: (-"),"NODE_DEND";case 44:return this.popState(),t.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),t.getLogger().debug("Lex: (("),"NODE_DEND";case 46:return this.popState(),t.getLogger().debug("Lex: ]]"),"NODE_DEND";case 47:return this.popState(),t.getLogger().debug("Lex: ("),"NODE_DEND";case 48:return this.popState(),t.getLogger().debug("Lex: ])"),"NODE_DEND";case 49:case 50:return this.popState(),t.getLogger().debug("Lex: /]"),"NODE_DEND";case 51:return this.popState(),t.getLogger().debug("Lex: )]"),"NODE_DEND";case 52:return this.popState(),t.getLogger().debug("Lex: )"),"NODE_DEND";case 53:return this.popState(),t.getLogger().debug("Lex: ]>"),"NODE_DEND";case 54:return this.popState(),t.getLogger().debug("Lex: ]"),"NODE_DEND";case 55:return t.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;case 56:return t.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;case 57:return t.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;case 58:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 59:return t.getLogger().debug("Lex: ((("),this.pus
font-family: ${t.fontFamily};
color: ${t.nodeTextColor||t.textColor};
}
.cluster-label text {
fill: ${t.titleColor};
}
.cluster-label span,p {
color: ${t.titleColor};
}
.label text,span,p {
fill: ${t.nodeTextColor||t.textColor};
color: ${t.nodeTextColor||t.textColor};
}
.node rect,
.node circle,
.node ellipse,
.node polygon,
.node path {
fill: ${t.mainBkg};
stroke: ${t.nodeBorder};
stroke-width: 1px;
}
.flowchart-label text {
text-anchor: middle;
}
// .flowchart-label .text-outer-tspan {
// text-anchor: middle;
// }
// .flowchart-label .text-inner-tspan {
// text-anchor: start;
// }
.node .label {
text-align: center;
}
.node.clickable {
cursor: pointer;
}
.arrowheadPath {
fill: ${t.arrowheadColor};
}
.edgePath .path {
stroke: ${t.lineColor};
stroke-width: 2.0px;
}
.flowchart-link {
stroke: ${t.lineColor};
fill: none;
}
.edgeLabel {
background-color: ${t.edgeLabelBackground};
rect {
opacity: 0.5;
background-color: ${t.edgeLabelBackground};
fill: ${t.edgeLabelBackground};
}
text-align: center;
}
/* For html labels only */
.labelBkg {
background-color: ${iIt(t.edgeLabelBackground,.5)};
// background-color:
}
.node .cluster {
// fill: ${iIt(t.mainBkg,.5)};
fill: ${iIt(t.clusterBkg,.5)};
stroke: ${iIt(t.clusterBorder,.2)};
box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
stroke-width: 1px;
}
.cluster text {
fill: ${t.titleColor};
}
.cluster span,p {
color: ${t.titleColor};
}
/* .cluster div {
color: ${t.titleColor};
} */
div.mermaidTooltip {
position: absolute;
text-align: center;
max-width: 200px;
padding: 2px;
font-family: ${t.fontFamily};
font-size: 12px;
background: ${t.tertiaryColor};
border: 1px solid ${t.border2};
border-radius: 2px;
pointer-events: none;
z-index: 100;
}
.flowchartTitleText {
text-anchor: middle;
font-size: 18px;
fill: ${t.textColor};
}
`,"getStyles"),oIt=aIt});function cIt(t,e){if(0===t||!Number.isInteger(t))throw new Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw new Error("Position must be a non-negative integer."+e);return t<0?{px:e,py:0}:1===t?{px:0,py:e}:{px:e%t,py:Math.floor(e/t)}}function hIt(o,s,l=0,c=0){if(R.debug("setBlockSizes abc95 (start)",o.id,o?.size?.x,"block width =",o?.size,"sieblingWidth",l),o?.size?.width||(o.size={width:l,height:c,x:0,y:0}),0<o.children?.length){for(var h of o.children)hIt(h,s);var u,d,p,g=fIt(o),f=g.width,m=g.height;R.debug("setBlockSizes abc95 maxWidth of",o.id,":s children is ",f,m);for(u of o.children)u.size&&(R.debug(`abc95 Setting size of children of ${o.id} id=${u.id} ${f} ${m} `+JSON.stringify(u.size)),u.size.width=f*(u.widthInColumns??1)+gIt*((u.widthInColumns??1)-1),u.size.height=m,u.size.x=0,u.size.y=0,R.debug(`abc95 updating size of ${o.id} children child:${u.id} maxWidth:${f} maxHeight:`+m));for(d of o.children)hIt(d,s,f,m);let t=o.columns??-1,e=0;for(p of o.children)e+=p.widthInColumns??1;let r=o.children.length,n=(0<t&&t<e&&(r=t),Math.ceil(e/r)),i=r*(f+gIt)+gIt,a=n*(m+gIt)+gIt;if(i<l){R.debug(`Detected to small siebling: abc95 ${o.id} sieblingWidth ${l} sieblingHeight ${c} width `+i),i=l,a=c;var y,v=(l-r*gIt-gIt)/r,x=(c-n*gIt-gIt)/n;R.debug("Size indata abc88",o.id,"childWidth",v,"maxWidth",f),R.debug("Size indata abc88",o.id,"childHeight",x,"maxHeight",m),R.debug("Size indata abc88 xSize",r,"padding",gIt);for(y of o.children)y.size&&(y.size.width=v,y.size.height=x,y.size.x=0,y.size.y=0)}if(R.debug(`abc95 (finale calc) ${o.id} xSize ${r} ySize ${n} columns ${t}${o.children.length} width=`+Math.max(i,o.size?.width||0)),i<(o?.size?.width||0)&&(i=o?.size?.width||0,0<(g=0<t?Math.min(o.children.length,t):o.children.length))){var b,w=(i-g*gIt-gIt)/g;R.debug("abc95 (growing to fit) width",o.id,i,o.size?.width,w);for(b of o.children)b.size&&(b.size.width=w)}o.size={width:i,height:a,x:0,y:0}}R.debug("setBlockSizes abc94 (done)",o.id,o?.size?.x,o?.size?.width,o?.size?.y,o?.size?.height)}function uIt(n,i){R.debug(`abc85 layout blocks (=>layoutBlocks) ${n.id} x: ${n?.size?.x} y: ${n?.size?.y} width: `+n?.size?.width);var a=n.columns??-1;if(R.debug("layoutBlocks columns abc95",n.id,"=>",a,n),n.children&&0<n.children.length){var o,s=n?.children[0]?.size?.width??0,s=n.children.length*s+(n.children.length-1)*gIt;R.debug("widthOfChildren 88",s,"posX");let t=0,e=(R.debug("abc91 block?.size?.x",n.id,n?.size?.x),n?.size?.x?n?.size?.x+(-n?.size?.width/2||0):-gIt),r=0;for(o of n.children){var l,c,h,u,d=n;o.size&&({width:l,height:c}=o.size,{px:u,py:h}=cIt(a,t),h!=r&&(r=h,e=n?.size?.x?n?.size?.x+(-n?.size?.width/2||0):-gIt,R.debug("New row in layout for block",n.id," and child ",o.id,r)),R.debug(`abc89 layout blocks (child) id: ${o.id} Pos: ${t} (px, py) ${u},${h} (${d?.size?.x},${d?.size?.y}) parent: ${d.id} width: `+l+gIt),d.size&&(u=l/2,o.size.x=e+gIt+u,R.debug(`abc91 layout blocks (calc) px, pyid:${o.id} startingPos=X${e} new startingPosX${o.size.x} ${u} padding=${gIt} width=${l} halfWidth=${u} => x:${o.size.x} y:${o.size.y} ${o.widthInColumns} (width * (child?.w || 1)) / 2 `+l*(o?.widthInColumns??1)/2),e=o.size.x+u,o.size.y=d.size.y-d.size.height/2+h*(c+gIt)+c/2+gIt,R.debug(`abc88 layout blocks (calc) px, pyid:${o.id}startingPosX${e}${gIt}${u}=>x:${o.size.x}y:${o.size.y}${o.widthInColumns}(width * (child?.w || 1)) / 2`+l*(o?.widthInColumns??1)/2)),o.children&&uIt(o,i),t+=o?.widthInColumns??1,R.debug("abc88 columnsPos",o,t))}}R.debug(`layout blocks (<==layoutBlocks) ${n.id} x: ${n?.size?.x} y: ${n?.size?.y} width: `+n?.size?.width)}function dIt(t,{minX:e,minY:r,maxX:n,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){var a,o,s,l;if(t.size&&"root"!==t.id&&({x:a,y:o,width:s,height:l}=t.size,a-s/2<e&&(e=a-s/2),o-l/2<r&&(r=o-l/2),n<a+s/2&&(n=a+s/2),i<o+l/2)&&(i=o+l/2),t.children)for(var c of t.children)({minX:e,minY:r,maxX:n,maxY:i}=dIt(c,{minX:e,minY:r,maxX:n,maxY:i}));return{minX:e,minY:r,maxX:n,maxY:i}}function pIt(t){var e,r,n=t.getBlock("root");if(n)return hIt(n,t,0,0),uIt(n,t),R.debug("getBlocks",
.edge {
stroke-width: ${t.archEdgeWidth};
stroke: ${t.archEdgeColor};
fill: none;
}
.arrow {
fill: ${t.archEdgeArrowColor};
}
.node-bkg {
fill: none;
stroke: ${t.archGroupBorderColor};
stroke-width: ${t.archGroupBorderWidth};
stroke-dasharray: 8;
}
.node-icon-text {
display: flex;
align-items: center;
}
.node-icon-text > div {
color: #fff;
margin: 1px;
height: fit-content;
text-align: center;
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
}
`,"getStyles"),yMt=mMt}),SMt=jMt((r,n)=>{Ae(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof r?r.layoutBase=e():t.layoutBase=e()},"webpackUniversalModuleDefinition")(r,function(){return r=[function(t,e,r){function n(){}Ae(n,"LayoutConstants"),n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_HALF_SIZE=(n.SIMPLE_NODE_SIZE=40)/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.INITIAL_WORLD_BOUNDARY=(n.WORLD_BOUNDARY=1e6)/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,t.exports=n},function(t,e,r){var n,i=r(2),a=r(8),o=r(9);function s(t,e,r){i.call(this,r),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=r,this.bendpoints=[],this.source=t,this.target=e}for(n in Ae(s,"LEdge"),s.prototype=Object.create(i.prototype),i)s[n]=i[n];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(t,e){for(var r=this.getOtherEnd(t),n=e.getGraphManager().getRoot();;){if(r.getOwner()==e)return r;if(r.getOwner()==n)break;r=r.getOwner().getParent()}return null},s.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=a.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,r){function n(t){this.vGraphObject=t}Ae(n,"LGraphObject"),t.exports=n},function(t,e,r){var n,i=r(2),a=r(10),o=r(13),s=r(0),l=r(16),c=r(5);function h(t,e,r,n){i.call(this,n=null==r&&null==n?e:n),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=a.MIN_VALUE,this.inclusionTreeDepth=a.MAX_VALUE,this.vGraphObject=n,this.edges=[],this.graphManager=t,this.rect=null!=r&&null!=e?new o(e.x,e.y,r.width,r.height):new o}for(n in Ae(h,"LNode"),h.prototype=Object.create(i.prototype),i)h[n]=i[n];h.prototype.getEdges=function(){return this.edges},h.prototype.getChild=function(){return this.child},h.prototype.getOwner=function(){return this.owner},h.prototype.getWidth=function(){return this.rect.width},h.prototype.setWidth=function(t){this.rect.width=t},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(t){this.rect.height=t},h.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},h.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},h.prototype.getCenter=function(){return new c(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},h.prototype.getLocation=function(){return new c(this.rect.x,this.rect.y)},h.prototype.getRect=function(){return this.rect},h.prototype.getDiagonal=function(){return Math.sqrt(t
translate(${d}, ${p-t.height/2})
translate(${y*x.width/2}, ${v*x.height/2})
rotate(${-1*y*v*45}, 0, ${t.height/2})
`)))}))},"drawEdges"),wMt=Ae(async function(l,t){let c=.75*KIt("padding"),h=KIt("fontSize"),u=KIt("iconSize")/2;await Promise.all(t.nodes().map(async n=>{var i=WIt(n);if("group"===i.type){var{h:n,w:a,x1:o,y1:s}=n.boundingBox();l.append("rect").attr("x",o+u).attr("y",s+u).attr("width",a).attr("height",n).attr("class","node-bkg");let t=l.append("g"),e=o,r=s;i.icon&&((n=t.append("g")).html(`<g>${await $t(i.icon,{height:c,width:c,fallbackPrefix:xMt.prefix})}</g>`),n.attr("transform","translate("+(e+u+1)+", "+(r+u+1)+")"),e+=c,r+=h/2-1-2),i.label&&(o=t.append("g"),await XC(o,i.label,{useHtmlLabels:!1,width:a,classes:"architecture-service-label"},D()),o.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),o.attr("transform","translate("+(e+u+4)+", "+(r+u+2)+")"))}}))},"drawGroups"),kMt=Ae(async function(t,e,r){for(var n of r){var i=e.append("g"),a=KIt("iconSize"),o=(n.title&&(o=i.append("g"),await XC(o,n.title,{useHtmlLabels:!1,width:1.5*a,classes:"architecture-service-label"},D()),o.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),o.attr("transform","translate("+a/2+", "+a+")")),i.append("g")),{width:s,height:l}=(n.icon?o.html(`<g>${await $t(n.icon,{height:a,width:a,fallbackPrefix:xMt.prefix})}</g>`):n.iconText?(o.html(`<g>${await $t("blank",{height:a,width:a,fallbackPrefix:xMt.prefix})}</g>`),s=o.append("g").append("foreignObject").attr("width",a).attr("height",a).append("div").attr("class","node-icon-text").attr("style",`height: ${a}px;`).append("div").html(n.iconText),l=parseInt(window.getComputedStyle(s.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16,s.attr("style",`-webkit-line-clamp: ${Math.floor((a-2)/l)};`)):o.append("path").attr("class","node-bkg").attr("id","node-"+n.id).attr("d",`M0 ${a} v${-a} q0,-5 5,-5 h${a} q5,0 5,5 v${a} H0 Z`),i.attr("class","architecture-service"),i._groups[0][0].getBBox());n.width=s,n.height=l,t.setElementForId(n.id,i)}return 0},"drawServices"),TMt=Ae(function(i,a,t){t.forEach(t=>{var e=a.append("g"),r=KIt("iconSize"),{width:r,height:n}=(e.append("g").append("rect").attr("id","node-"+t.id).attr("fill-opacity","0").attr("width",r).attr("height",r),e.attr("class","architecture-junction"),e._groups[0][0].getBBox());e.width=r,e.height=n,i.setElementForId(t.id,e)})},"drawJunctions")});function MMt(t,e){t.forEach(t=>{e.add({group:"nodes",data:{type:"service",id:t.id,icon:t.icon,label:t.title,parent:t.in,width:KIt("iconSize"),height:KIt("iconSize")},classes:"node-service"})})}function RMt(t,e){t.forEach(t=>{e.add({group:"nodes",data:{type:"junction",id:t.id,parent:t.in,width:KIt("iconSize"),height:KIt("iconSize")},classes:"node-junction"})})}function DMt(r,t){t.nodes().map(t=>{var e=WIt(t);"group"!==e.type&&(e.x=t.position().x,e.y=t.position().y,r.getElementById(e.id).attr("transform","translate("+(e.x||0)+","+(e.y||0)+")"))})}function OMt(t,e){t.forEach(t=>{e.add({group:"nodes",data:{type:"group",id:t.id,icon:t.icon,label:t.title,parent:t.in},classes:"node-group"})})}function PMt(t,h){t.forEach(t=>{var{lhsId:e,rhsId:r,lhsInto:n,lhsGroup:i,rhsInto:a,lhsDir:o,rhsDir:s,rhsGroup:l,title:c}=t,t=FIt(t.lhsDir,t.rhsDir)?"segments":"straight";h.add({group:"edges",data:{id:e+"-"+r,label:c,source:e,sourceDir:o,sourceArrow:n,sourceGroup:i,sourceEndpoint:"L"===o?"0 50%":"R"===o?"100% 50%":"T"===o?"50% 0":"50% 100%",target:r,targetDir:s,targetArrow:a,targetGroup:l,targetEndpoint:"L"===s?"0 50%":"R"===s?"100% 50%":"T"===s?"50% 0":"50% 100%"},classes:t})})}function BMt(t){var[t,e]=t.map(t=>{let n={},i={};return Object.entries(t).forEach(([t,[e,r]])=>{n[r]||(n[r]=[]),i[e]||(i[e]=[]),n[r].push(t),i[e].push(t)}),{horiz:Object.values(n).filter(t=>1<t.length),vert:Object.values(i).filter(t=>1<t.length)}}).reduce(([t,e],{horiz:r,vert:n})=>[[...t,...r],[...e,...n]],[[],[]]);return{horizontal:t,vertical:e}}function FMt(t){let l=[],c=Ae(t=>t[0]+","+t[1],"posToStr"),h=Ae(t=>t.split(",").map(t=>parseInt(t)),"strToPos");return t.forEach(t=>{let a=Object.fromEntrie
`);var n=(e=Ept(e)).append("g");e.attr("viewBox","0 0 2412 512"),Vl(e,100,512,!0),n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+r)},"draw")}),mRt={db:{},renderer:t,parser:{parse:Ae(()=>{},"parse")}},yRt="flowchart-elk",J=Ae((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(e.layout="elk",!0),"detector"),t=Ae(async()=>{var t=(await Promise.resolve().then(()=>(SH(),lH))).diagram;return{id:yRt,diagram:t}},"loader"),vRt={id:yRt,detector:J,loader:t},xRt={id:"timeline",detector:Ae(t=>/^\s*timeline/.test(t),"detector"),loader:Ae(async()=>({id:"timeline",diagram:(await Promise.resolve().then(()=>(u6t(),H5t))).diagram}),"loader")},bRt={id:"mindmap",detector:Ae(t=>/^\s*mindmap/.test(t),"detector"),loader:Ae(async()=>({id:"mindmap",diagram:(await Promise.resolve().then(()=>(Y9t(),A9t))).diagram}),"loader")},wRt={id:"sankey",detector:Ae(t=>/^\s*sankey-beta/.test(t),"detector"),loader:Ae(async()=>({id:"sankey",diagram:(await Promise.resolve().then(()=>(xNt(),tNt))).diagram}),"loader")},kRt={id:"packet",detector:Ae(t=>/^\s*packet-beta/.test(t),"detector"),loader:Ae(async()=>({id:"packet",diagram:(await Promise.resolve().then(()=>(ANt(),ENt))).diagram}),"loader")},TRt={id:"block",detector:Ae(t=>/^\s*block-beta/.test(t),"detector"),loader:Ae(async()=>({id:"block",diagram:(await Promise.resolve().then(()=>(VIt(),LIt))).diagram}),"loader")},ERt="architecture",J=Ae(t=>/^\s*architecture/.test(t),"detector"),t=Ae(async()=>{var t=(await Promise.resolve().then(()=>(HMt(),qMt))).diagram;return{id:ERt,diagram:t}},"loader"),_Rt={id:ERt,detector:J,loader:t},CRt=(Yr(),i(),!1),SRt=Ae(()=>{CRt||(CRt=!0,Tc("error",mRt,t=>"error"===t.toLowerCase().trim()),Tc("---",{db:{clear:Ae(()=>{},"clear")},styles:{},renderer:{draw:Ae(()=>{},"draw")},parser:{parse:Ae(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:Ae(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("--
`;try{Ec(n)}catch{if(!(i=ee(n)))throw new Kt(`Diagram ${n} not found.`);var{id:i,diagram:a}=await i();Tc(i,a)}var{db:i,parser:a,renderer:o,init:s}=Ec(n);return a.parser&&(a.parser.yy=i),i.clear?.(),s?.(r),e.title&&i.setDiagramTitle?.(e.title),await a.parse(t),new iFt(n,t,i,a,o)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},xDt=(tc(),[]),bDt=Ae(()=>{xDt.forEach(t=>{t()}),xDt=[]},"attachFunctions"),wDt=(e(),Ae(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments"));function kDt(t){return"u"<typeof t||null===t}function TDt(t){return"object"==typeof t&&null!==t}function EDt(t){return Array.isArray(t)?t:kDt(t)?[]:[t]}function _Dt(t,e){var r,n,i,a;if(e)for(r=0,n=(a=Object.keys(e)).length;r<n;r+=1)t[i=a[r]]=e[i];return t}function CDt(t,e){for(var r="",n=0;n<e;n+=1)r+=t;return r}function SDt(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t}Ur(),Ae(kDt,"isNothing"),Ae(TDt,"isObject"),Ae(EDt,"toArray"),Ae(_Dt,"extend"),Ae(CDt,"repeat"),Ae(SDt,"isNegativeZero");var ADt={isNothing:kDt,isObject:TDt,toArray:EDt,repeat:CDt,isNegativeZero:SDt,extend:_Dt};function LDt(t,e){var r="",n=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+=`
`+t.mark.snippet),n+" "+r):n}function NDt(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=LDt(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}Ae(LDt,"formatError"),Ae(NDt,"YAMLException$1"),((NDt.prototype=Object.create(Error.prototype)).constructor=NDt).prototype.toString=Ae(function(t){return this.name+": "+LDt(this,t)},"toString");var IDt=NDt;function MDt(t,e,r,n,i){var a="",o="";return(i=Math.floor(i/2)-1)<n-e&&(e=n-i+(a=" ... ").length),i<r-n&&(r=n+i-(o=" ...").length),{str:a+t.slice(e,r).replace(/\t/g,"→")+o,pos:n-e+a.length}}function RDt(t,e){return ADt.repeat(" ",e-t.length)+t}function DDt(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var r,n=/\r?\n|\r|\0/g,i=[0],a=[],o=-1;r=n.exec(t.buffer);)a.push(r.index),i.push(r.index+r[0].length),t.position<=r.index&&o<0&&(o=i.length-2);o<0&&(o=i.length-1);for(var s,l="",c=Math.min(t.line+e.linesAfter,a.length).toString().length,h=e.maxLength-(e.indent+c+3),u=1;u<=e.linesBefore&&!(o-u<0);u++)s=MDt(t.buffer,i[o-u],a[o-u],t.position-(i[o]-i[o-u]),h),l=ADt.repeat(" ",e.indent)+RDt((t.line-u+1).toString(),c)+" | "+s.str+`
`+l;for(s=MDt(t.buffer,i[o],a[o],t.position,h),l=(l+=ADt.repeat(" ",e.indent)+RDt((t.line+1).toString(),c)+" | "+s.str+`
`)+ADt.repeat("-",e.indent+c+3+s.pos)+`^
`,u=1;u<=e.linesAfter&&!(a.length<=o+u);u++)s=MDt(t.buffer,i[o+u],a[o+u],t.position-(i[o]-i[o+u]),h),l+=ADt.repeat(" ",e.indent)+RDt((t.line+u+1).toString(),c)+" | "+s.str+`
`;return l.replace(/\n$/,"")}Ae(MDt,"getLine"),Ae(RDt,"padStart"),Ae(DDt,"makeSnippet");var ODt=DDt,PDt=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],BDt=["scalar","sequence","mapping"];function FDt(t){var r={};return null!==t&&Object.keys(t).forEach(function(e){t[e].forEach(function(t){r[String(t)]=e})}),r}function $Dt(e,t){if(t=t||{},Object.keys(t).forEach(function(t){if(-1===PDt.indexOf(t))throw new IDt('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(t){return t},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=FDt(t.styleAliases||null),-1===BDt.indexOf(this.kind))throw new IDt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}Ae(FDt,"compileStyleAliases"),Ae($Dt,"Type$1");var zDt=$Dt;function GDt(t,e){var i=[];return t[e].forEach(function(r){var n=i.length;i.forEach(function(t,e){t.tag===r.tag&&t.kind===r.kind&&t.multi===r.multi&&(n=e)}),i[n]=r}),i}function UDt(){var t,e,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(t){t.multi?(r.multi[t.kind].push(t),r.multi.fallback.push(t)):r[t.kind][t.tag]=r.fallback[t.tag]=t}for(Ae(n,"collectType"),t=0,e=arguments.length;t<e;t+=1)arguments[t].forEach(n);return r}function qDt(t){return this.extend(t)}function YDt(t){var e;return null===t||1===(e=t.length)&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function jDt(){return null}function HDt(t){return null===t}function WDt(t){var e;return null!==t&&(4===(e=t.length)&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t))}function VDt(t){return"true"===t||"True"===t||"TRUE"===t}function XDt(t){return"[object Boolean]"===Object.prototype.toString.call(t)}Ae(GDt,"compileList"),Ae(UDt,"compileMap"),Ae(qDt,"Schema$1"),qDt.prototype.extend=Ae(function(t){var e=[],r=[];if(t instanceof zDt)r.push(t);else if(Array.isArray(t))r=r.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new IDt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit))}return e.forEach(function(t){if(!(t instanceof zDt))throw new IDt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new IDt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new IDt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(t){if(!(t instanceof zDt))throw new IDt("Specified list of YAML types (or a single Type object) contains a non-Type object.")}),(t=Object.create(qDt.prototype)).implicit=(this.implicit||[]).concat(e),t.explicit=(this.explicit||[]).concat(r),t.compiledImplicit=GDt(t,"implicit"),t.compiledExplicit=GDt(t,"explicit"),t.compiledTypeMap=UDt(t.compiledImplicit,t.compiledExplicit),t},"extend"),J=new qDt({explicit:[new zDt("tag:yaml.org,2002:str",{kind:"scalar",construct:Ae(function(t){return null!==t?t:""},"construct")}),new zDt("tag:yaml.org,2002:seq",{kind:"sequence",construct:Ae(function(t){return null!==t?t:[]},"construct")}),new zDt("tag:yaml.org,2002:map",{kind:"mapping",construct:Ae(function(t){return null!==t?t:{}},"construct")})]}),Ae(YDt,"resolveYamlNull"),Ae(jDt,"constructYamlNull"),Ae(HDt,"isNull"),t=new zDt("tag:yaml.org,2002:null",{kind:"scalar",resolve:YDt,construct:jDt,predicate:HDt,represent:{canonical:Ae(function(){return"~"},"canonical"),lowercase:Ae(function(){return"null"},"lowercase"),uppercase:Ae(function(){return"NULL"},"uppercase"),camelcase:Ae(func
\r`;function vOt(t){if(null===t)return!1;for(var e,r=0,n=t.length,i=yOt,a=0;a<n;a++)if(!(64<(e=i.indexOf(t.charAt(a))))){if(e<0)return!1;r+=6}return r%8==0}function xOt(t){for(var e=t.replace(/[\r\n=]/g,""),r=e.length,n=yOt,i=0,a=[],o=0;o<r;o++)o%4==0&&o&&(a.push(i>>16&255),a.push(i>>8&255),a.push(255&i)),i=i<<6|n.indexOf(e.charAt(o));return 0==(t=r%4*6)?(a.push(i>>16&255),a.push(i>>8&255),a.push(255&i)):18==t?(a.push(i>>10&255),a.push(i>>2&255)):12==t&&a.push(i>>4&255),new Uint8Array(a)}function bOt(t){for(var e,r="",n=0,i=t.length,a=yOt,o=0;o<i;o++)o%3==0&&o&&(r=(r=(r=(r+=a[n>>18&63])+a[n>>12&63])+a[n>>6&63])+a[63&n]),n=(n<<8)+t[o];return 0==(e=i%3)?r=(r=(r=(r+=a[n>>18&63])+a[n>>12&63])+a[n>>6&63])+a[63&n]:2==e?r=(r=(r=(r+=a[n>>10&63])+a[n>>4&63])+a[n<<2&63])+a[64]:1==e&&(r=(r=(r=(r+=a[n>>2&63])+a[n<<4&63])+a[64])+a[64]),r}function wOt(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}Ae(vOt,"resolveYamlBinary"),Ae(xOt,"constructYamlBinary"),Ae(bOt,"representYamlBinary"),Ae(wOt,"isBinary");var hOt=new zDt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:vOt,construct:xOt,predicate:wOt,represent:bOt}),kOt=Object.prototype.hasOwnProperty,TOt=Object.prototype.toString;function EOt(t){if(null!==t)for(var e,r,n,i=[],a=t,o=0,s=a.length;o<s;o+=1){if(e=a[o],n=!1,"[object Object]"!==TOt.call(e))return!1;for(r in e)if(kOt.call(e,r)){if(n)return!1;n=!0}if(!n)return!1;if(-1!==i.indexOf(r))return!1;i.push(r)}return!0}function _Ot(t){return null!==t?t:[]}Ae(EOt,"resolveYamlOmap"),Ae(_Ot,"constructYamlOmap");var COt=new zDt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:EOt,construct:_Ot}),SOt=Object.prototype.toString;function AOt(t){if(null!==t)for(var e,r,n=t,i=new Array(n.length),a=0,o=n.length;a<o;a+=1){if(e=n[a],"[object Object]"!==SOt.call(e)||1!==(r=Object.keys(e)).length)return!1;i[a]=[r[0],e[r[0]]]}return!0}function LOt(t){if(null===t)return[];for(var e,r,n=t,i=new Array(n.length),a=0,o=n.length;a<o;a+=1)e=n[a],r=Object.keys(e),i[a]=[r[0],e[r[0]]];return i}Ae(AOt,"resolveYamlPairs"),Ae(LOt,"constructYamlPairs");var NOt=new zDt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:AOt,construct:LOt}),IOt=Object.prototype.hasOwnProperty;function MOt(t){if(null!==t){var e,r=t;for(e in r)if(IOt.call(r,e)&&null!==r[e])return!1}return!0}function ROt(t){return null!==t?t:{}}Ae(MOt,"resolveYamlSet"),Ae(ROt,"constructYamlSet");var DOt=new zDt("tag:yaml.org,2002:set",{kind:"mapping",resolve:MOt,construct:ROt}),OOt=t.extend({implicit:[KDt,nOt],explicit:[hOt,COt,NOt,DOt]}),POt=Object.prototype.hasOwnProperty,BOt=1,FOt=2,$Ot=3,zOt=4,GOt=1,UOt=2,qOt=3,YOt=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,jOt=/[\x85\u2028\u2029]/,HOt=/[,\[\]\{\}]/,WOt=/^(?:!|!!|![a-z\-]+!)$/i,VOt=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function XOt(t){return Object.prototype.toString.call(t)}function KOt(t){return 10===t||13===t}function ZOt(t){return 9===t||32===t}function QOt(t){return 9===t||32===t||10===t||13===t}function JOt(t){return 44===t||91===t||93===t||123===t||125===t}function tPt(t){return 48<=t&&t<=57?t-48:97<=(t|=32)&&t<=102?t-97+10:-1}function ePt(t){return 120===t?2:117===t?4:85===t?8:0}function rPt(t){return 48<=t&&t<=57?t-48:-1}function nPt(t){return 48===t?"\0":97===t?"":98===t?"\b":116===t||9===t?"\t":110===t?`
`:118===t?"\v":102===t?"\f":114===t?"\r":101===t?"":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?"…":95===t?" ":76===t?"\u2028":80===t?"\u2029":""}function iPt(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}Ae(XOt,"_class"),Ae(KOt,"is_EOL"),Ae(ZOt,"is_WHITE_SPACE"),Ae(QOt,"is_WS_OR_EOL"),Ae(JOt,"is_FLOW_INDICATOR"),Ae(tPt,"fromHexCode"),Ae(ePt,"escapedHexLen"),Ae(rPt,"fromDecimalCode"),Ae(nPt,"simpleEscapeSequence"),Ae(iPt,"charFromCodepoint");for(var aPt=new Array(256),oPt=new Array(256),sPt=0;sPt<256;sPt++)aPt[sPt]=nPt(sPt)?1:0,oPt[sPt]=nPt(sPt);function lPt(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||OOt,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function cPt(t,e){return(t={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart}).snippet=ODt(t),new IDt(e,t)}function hPt(t,e){throw cPt(t,e)}function uPt(t,e){t.onWarning&&t.onWarning.call(null,cPt(t,e))}Ae(lPt,"State$1"),Ae(cPt,"generateError"),Ae(hPt,"throwError"),Ae(uPt,"throwWarning");var dPt={YAML:Ae(function(t,e,r){var n,i;null!==t.version&&hPt(t,"duplication of %YAML directive"),1!==r.length&&hPt(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&hPt(t,"ill-formed argument of the YAML directive"),n=parseInt(i[1],10),i=parseInt(i[2],10),1!==n&&hPt(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=i<2,1!==i&&2!==i&&uPt(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:Ae(function(t,e,r){var n;2!==r.length&&hPt(t,"TAG directive accepts exactly two arguments"),n=r[0],r=r[1],WOt.test(n)||hPt(t,"ill-formed tag handle (first argument) of the TAG directive"),POt.call(t.tagMap,n)&&hPt(t,'there is a previously declared suffix for "'+n+'" tag handle'),VOt.test(r)||hPt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{r=decodeURIComponent(r)}catch{hPt(t,"tag prefix is malformed: "+r)}t.tagMap[n]=r},"handleTagDirective")};function pPt(t,e,r,n){var i,a,o,s;if(e<r){if(s=t.input.slice(e,r),n)for(i=0,a=s.length;i<a;i+=1)9===(o=s.charCodeAt(i))||32<=o&&o<=1114111||hPt(t,"expected valid JSON character");else YOt.test(s)&&hPt(t,"the stream contains non-printable characters");t.result+=s}}function gPt(t,e,r,n){var i,a,o,s;for(ADt.isObject(r)||hPt(t,"cannot merge mappings; the provided source object is unacceptable"),o=0,s=(i=Object.keys(r)).length;o<s;o+=1)a=i[o],POt.call(e,a)||(e[a]=r[a],n[a]=!0)}function fPt(t,e,r,n,i,a,o,s,l){var c,h;if(Array.isArray(i))for(c=0,h=(i=Array.prototype.slice.call(i)).length;c<h;c+=1)Array.isArray(i[c])&&hPt(t,"nested arrays are not supported inside keys"),"object"==typeof i&&"[object Object]"===XOt(i[c])&&(i[c]="[object Object]");if("object"==typeof i&&"[object Object]"===XOt(i)&&(i="[object Object]"),i=String(i),null===e&&(e={}),"tag:yaml.org,2002:merge"===n)if(Array.isArray(a))for(c=0,h=a.length;c<h;c+=1)gPt(t,e,a[c],r);else gPt(t,e,a,r);else t.json||POt.call(r,i)||!POt.call(e,i)||(t.line=o||t.line,t.lineStart=s||t.lineStart,t.position=l||t.position,hPt(t,"duplicated mapping key")),"__proto__"===i?Object.defineProperty(e,i,{configurable:!0,enumerable:!0,writable:!0,value:a}):e[i]=a,delete r[i];return e}function mPt(t){var e=t.input.charCodeAt(t.position);10===e?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):hPt(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function yPt(t,e,r){for(var n=0,i=t.input.charCodeAt(t.position);0!==i;){for(;ZOt(i);)9===i&&-1===t.firstTabInLine&&(t.firstTabInLine=t.position),i=t.input.charCodeAt(++t.position);if(e&&35===i)for(;10!==(i=t.input.charCodeAt(++t.position))&&13!==i&&0!==i;);if(!KOt(i))break;for(mPt(t),i=t.in
`,e-1))}function bPt(t,e,r){var n,i,a,o,s,l,c,h=t.kind,u=t.result,d=t.input.charCodeAt(t.position);if(QOt(d)||JOt(d)||35===d||38===d||42===d||33===d||124===d||62===d||39===d||34===d||37===d||64===d||96===d||(63===d||45===d)&&(QOt(n=t.input.charCodeAt(t.position+1))||r&&JOt(n)))return!1;for(t.kind="scalar",t.result="",i=a=t.position,o=!1;0!==d;){if(58===d){if(QOt(n=t.input.charCodeAt(t.position+1))||r&&JOt(n))break}else if(35===d){if(QOt(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&vPt(t)||r&&JOt(d))break;if(KOt(d)){if(s=t.line,l=t.lineStart,c=t.lineIndent,yPt(t,!1,-1),t.lineIndent>=e){o=!0,d=t.input.charCodeAt(t.position);continue}t.position=a,t.line=s,t.lineStart=l,t.lineIndent=c;break}}o&&(pPt(t,i,a,!1),xPt(t,t.line-s),i=a=t.position,o=!1),ZOt(d)||(a=t.position+1),d=t.input.charCodeAt(++t.position)}return pPt(t,i,a,!1),!!t.result||(t.kind=h,t.result=u,!1)}function wPt(t,e){var r,n,i=t.input.charCodeAt(t.position);if(39!==i)return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;0!==(i=t.input.charCodeAt(t.position));)if(39===i){if(pPt(t,r,t.position,!0),39!==(i=t.input.charCodeAt(++t.position)))return!0;r=t.position,t.position++,n=t.position}else KOt(i)?(pPt(t,r,n,!0),xPt(t,yPt(t,!1,e)),r=n=t.position):t.position===t.lineStart&&vPt(t)?hPt(t,"unexpected end of the document within a single quoted scalar"):(t.position++,n=t.position);hPt(t,"unexpected end of the stream within a single quoted scalar")}function kPt(t,e){var r,n,i,a,o,s=t.input.charCodeAt(t.position);if(34!==s)return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;0!==(s=t.input.charCodeAt(t.position));){if(34===s)return pPt(t,r,t.position,!0),t.position++,!0;if(92===s){if(pPt(t,r,t.position,!0),KOt(s=t.input.charCodeAt(++t.position)))yPt(t,!1,e);else if(s<256&&aPt[s])t.result+=oPt[s],t.position++;else if(0<(o=ePt(s))){for(i=o,a=0;0<i;i--)0<=(o=tPt(s=t.input.charCodeAt(++t.position)))?a=(a<<4)+o:hPt(t,"expected hexadecimal character");t.result+=iPt(a),t.position++}else hPt(t,"unknown escape sequence");r=n=t.position}else KOt(s)?(pPt(t,r,n,!0),xPt(t,yPt(t,!1,e)),r=n=t.position):t.position===t.lineStart&&vPt(t)?hPt(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}hPt(t,"unexpected end of the stream within a double quoted scalar")}function TPt(t,e){var r,n,i,a,o,s,l,c,h,u,d,p=!0,g=t.tag,f=t.anchor,m=Object.create(null),y=t.input.charCodeAt(t.position);if(91===y)c=!(o=93),a=[];else{if(123!==y)return!1;o=125,c=!0,a={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),y=t.input.charCodeAt(++t.position);0!==y;){if(yPt(t,!0,e),(y=t.input.charCodeAt(t.position))===o)return t.position++,t.tag=g,t.anchor=f,t.kind=c?"mapping":"sequence",t.result=a,!0;p?44===y&&hPt(t,"expected the node content, but found ','"):hPt(t,"missed comma between flow collection entries"),d=null,s=l=!1,63===y&&QOt(t.input.charCodeAt(t.position+1))&&(s=l=!0,t.position++,yPt(t,!0,e)),r=t.line,n=t.lineStart,i=t.position,NPt(t,e,BOt,!1,!0),u=t.tag,h=t.result,yPt(t,!0,e),y=t.input.charCodeAt(t.position),!l&&t.line!==r||58!==y||(s=!0,y=t.input.charCodeAt(++t.position),yPt(t,!0,e),NPt(t,e,BOt,!1,!0),d=t.result),c?fPt(t,a,m,u,h,d,r,n,i):s?a.push(fPt(t,null,m,u,h,d,r,n,i)):a.push(h),yPt(t,!0,e),44===(y=t.input.charCodeAt(t.position))?(p=!0,y=t.input.charCodeAt(++t.position)):p=!1}hPt(t,"unexpected end of the stream within a flow collection")}function EPt(t,e){var r,n,i,a=GOt,o=!1,s=!1,l=e,c=0,h=!1,u=t.input.charCodeAt(t.position);if(124===u)n=!1;else{if(62!==u)return!1;n=!0}for(t.kind="scalar",t.result="";0!==u;)if(43===(u=t.input.charCodeAt(++t.position))||45===u)GOt===a?a=43===u?qOt:UOt:hPt(t,"repeat of a chomping mode identifier");else{if(!(0<=(i=rPt(u))))break;0===i?hPt(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?hPt(t,"repeat of an indentation width identifier"):(l=e+i-1,s=!0)}if(ZOt(u)){for(;ZOt(u=t.input.charCodeAt(++t.position)););if(35===u)for(;!KOt(u=t.input.charCodeAt(++t.position))&&0!==u;);}for(;0!==u;){for(mPt(t),t.lineIndent=0,u=t.input.charCodeAt(t.posi
`,o?1+c:c):a===GOt&&o&&(t.result+=`
`);break}for(n?ZOt(u)?(h=!0,t.result+=ADt.repeat(`
`,o?1+c:c)):h?(h=!1,t.result+=ADt.repeat(`
`,c+1)):0===c?o&&(t.result+=" "):t.result+=ADt.repeat(`
`,c):t.result+=ADt.repeat(`
`,o?1+c:c),s=o=!0,c=0,r=t.position;!KOt(u)&&0!==u;)u=t.input.charCodeAt(++t.position);pPt(t,r,t.position,!1)}}return!0}function _Pt(t,e){var r,n,i=t.tag,a=t.anchor,o=[],s=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=o),n=t.input.charCodeAt(t.position);0!==n&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,hPt(t,"tab characters must not be used in indentation")),45===n)&&QOt(t.input.charCodeAt(t.position+1));)if(s=!0,t.position++,yPt(t,!0,-1)&&t.lineIndent<=e)o.push(null),n=t.input.charCodeAt(t.position);else if(r=t.line,NPt(t,e,$Ot,!1,!0),o.push(t.result),yPt(t,!0,-1),n=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&0!==n)hPt(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break;return!!s&&(t.tag=i,t.anchor=a,t.kind="sequence",t.result=o,!0)}function CPt(t,e,r){var n,i,a,o,s,l,c,h=t.tag,u=t.anchor,d={},p=Object.create(null),g=null,f=null,m=null,y=!1,v=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=d),c=t.input.charCodeAt(t.position);0!==c;){if(y||-1===t.firstTabInLine||(t.position=t.firstTabInLine,hPt(t,"tab characters must not be used in indentation")),n=t.input.charCodeAt(t.position+1),a=t.line,63!==c&&58!==c||!QOt(n)){if(o=t.line,s=t.lineStart,l=t.position,!NPt(t,r,FOt,!1,!0))break;if(t.line===a){for(c=t.input.charCodeAt(t.position);ZOt(c);)c=t.input.charCodeAt(++t.position);if(58===c)QOt(c=t.input.charCodeAt(++t.position))||hPt(t,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(fPt(t,d,p,g,f,null,o,s,l),g=f=m=null),i=y=!(v=!0),g=t.tag,f=t.result;else{if(!v)return t.tag=h,t.anchor=u,!0;hPt(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!v)return t.tag=h,t.anchor=u,!0;hPt(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(y&&(fPt(t,d,p,g,f,null,o,s,l),g=f=m=null),i=y=v=!0):y?i=!(y=!1):hPt(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,c=n;if((t.line===a||t.lineIndent>e)&&(y&&(o=t.line,s=t.lineStart,l=t.position),NPt(t,e,zOt,!0,i)&&(y?f=t.result:m=t.result),y||(fPt(t,d,p,g,f,m,o,s,l),g=f=m=null),yPt(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&0!==c)hPt(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return y&&fPt(t,d,p,g,f,null,o,s,l),v&&(t.tag=h,t.anchor=u,t.kind="mapping",t.result=d),v}function SPt(t){var e,r,n,i=!1,a=!1,o=t.input.charCodeAt(t.position);if(33!==o)return!1;if(null!==t.tag&&hPt(t,"duplication of a tag property"),60===(o=t.input.charCodeAt(++t.position))?(i=!0,o=t.input.charCodeAt(++t.position)):33===o?(a=!0,r="!!",o=t.input.charCodeAt(++t.position)):r="!",e=t.position,i){for(;0!==(o=t.input.charCodeAt(++t.position))&&62!==o;);t.position<t.length?(n=t.input.slice(e,t.position),o=t.input.charCodeAt(++t.position)):hPt(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==o&&!QOt(o);)33===o&&(a?hPt(t,"tag suffix cannot contain exclamation marks"):(r=t.input.slice(e-1,t.position+1),WOt.test(r)||hPt(t,"named tag handle cannot contain such characters"),a=!0,e=t.position+1)),o=t.input.charCodeAt(++t.position);n=t.input.slice(e,t.position),HOt.test(n)&&hPt(t,"tag suffix cannot contain flow indicator characters")}n&&!VOt.test(n)&&hPt(t,"tag name cannot contain such characters: "+n);try{n=decodeURIComponent(n)}catch{hPt(t,"tag name is malformed: "+n)}return i?t.tag=n:POt.call(t.tagMap,r)?t.tag=t.tagMap[r]+n:"!"===r?t.tag="!"+n:"!!"===r?t.tag="tag:yaml.org,2002:"+n:hPt(t,'undeclared tag handle "'+r+'"'),!0}function APt(t){var e,r=t.input.charCodeAt(t.position);if(38!==r)return!1;for(null!==t.anchor&&hPt(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!QOt(r)&&!JOt(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&hPt(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function LPt(t){var e,r=t.input.charCodeAt(t.position);if(42!==r)return!1;for(r=t.input.
`),65279===t.charCodeAt(0))?t.slice(1):t,e);for(-1!==(e=t.indexOf("\0"))&&(r.position=e,hPt(r,"null byte is not allowed in input")),r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)IPt(r);return r.documents}function RPt(t,e,r){null!==e&&"object"==typeof e&&"u"<typeof r&&(r=e,e=null);var n=MPt(t,r);if("function"!=typeof e)return n;for(var i=0,a=n.length;i<a;i+=1)e(n[i])}function DPt(t,e){if(0!==(t=MPt(t,e)).length){if(1===t.length)return t[0];throw new IDt("expected a single document in the stream, but found more")}}Ae(pPt,"captureSegment"),Ae(gPt,"mergeMappings"),Ae(fPt,"storeMappingPair"),Ae(mPt,"readLineBreak"),Ae(yPt,"skipSeparationSpace"),Ae(vPt,"testDocumentSeparator"),Ae(xPt,"writeFoldedLines"),Ae(bPt,"readPlainScalar"),Ae(wPt,"readSingleQuotedScalar"),Ae(kPt,"readDoubleQuotedScalar"),Ae(TPt,"readFlowCollection"),Ae(EPt,"readBlockScalar"),Ae(_Pt,"readBlockSequence"),Ae(CPt,"readBlockMapping"),Ae(SPt,"readTagProperty"),Ae(APt,"readAnchorProperty"),Ae(LPt,"readAlias"),Ae(NPt,"composeNode"),Ae(IPt,"readDocument"),Ae(MPt,"loadDocuments"),Ae(RPt,"loadAll$1"),Ae(DPt,"load$1");var t={loadAll:RPt,load:DPt},OPt=Object.prototype.toString,PPt=Object.prototype.hasOwnProperty,BPt=65279,FPt=10,$Pt={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},zPt=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],GPt=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function UPt(t,e){var r,n,i,a,o,s,l;if(null===e)return{};for(r={},i=0,a=(n=Object.keys(e)).length;i<a;i+=1)o=n[i],s=String(e[o]),"!!"===o.slice(0,2)&&(o="tag:yaml.org,2002:"+o.slice(2)),(l=t.compiledTypeMap.fallback[o])&&PPt.call(l.styleAliases,s)&&(s=l.styleAliases[s]),r[o]=s;return r}function qPt(t){var e,r,n=t.toString(16).toUpperCase();if(t<=255)e="x",r=2;else if(t<=65535)e="u",r=4;else{if(!(t<=4294967295))throw new IDt("code point within a string may not be greater than 0xFFFFFFFF");e="U",r=8}return"\\"+e+ADt.repeat("0",r-n.length)+n}Ae(UPt,"compileStyleMap"),Ae(qPt,"encodeHex");var YPt=2;function jPt(t){this.schema=t.schema||OOt,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=ADt.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=UPt(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType='"'===t.quotingType?YPt:1,this.forceQuotes=t.forceQuotes||!1,this.replacer="function"==typeof t.replacer?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function HPt(t,e){for(var r,n,i=ADt.repeat(" ",e),a=0,o="",s=t.length;a<s;)a=-1===(r=t.indexOf(`
`,a))?(n=t.slice(a),s):(n=t.slice(a,r+1),r+1),n.length&&n!==`
`&&(o+=i),o+=n;return o}function WPt(t,e){return`
`+ADt.repeat(" ",t.indent*e)}function VPt(t,e){for(var r=0,n=t.implicitTypes.length;r<n;r+=1)if(t.implicitTypes[r].resolve(e))return!0;return!1}function XPt(t){return 32===t||9===t}function KPt(t){return 32<=t&&t<=126||161<=t&&t<=55295&&8232!==t&&8233!==t||57344<=t&&t<=65533&&t!==BPt||65536<=t&&t<=1114111}function ZPt(t){return KPt(t)&&t!==BPt&&13!==t&&t!==FPt}function QPt(t,e,r){var n=ZPt(t),i=n&&!XPt(t);return(r?n:n&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t)&&35!==t&&!(58===e&&!i)||ZPt(e)&&!XPt(e)&&35===t||58===e&&i}function JPt(t){return KPt(t)&&t!==BPt&&!XPt(t)&&45!==t&&63!==t&&58!==t&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t&&35!==t&&38!==t&&42!==t&&33!==t&&124!==t&&61!==t&&62!==t&&39!==t&&34!==t&&37!==t&&64!==t&&96!==t}function tBt(t){return!XPt(t)&&58!==t}function eBt(t,e){var r=t.charCodeAt(e);return 55296<=r&&r<=56319&&e+1<t.length&&56320<=(t=t.charCodeAt(e+1))&&t<=57343?1024*(r-55296)+t-56320+65536:r}function rBt(t){return/^\n* /.test(t)}Ae(jPt,"State"),Ae(HPt,"indentString"),Ae(WPt,"generateNextLine"),Ae(VPt,"testImplicitResolving"),Ae(XPt,"isWhitespace"),Ae(KPt,"isPrintable"),Ae(ZPt,"isNsCharOrWhitespace"),Ae(QPt,"isPlainSafe"),Ae(JPt,"isPlainSafeFirst"),Ae(tBt,"isPlainSafeLast"),Ae(eBt,"codePointAt"),Ae(rBt,"needIndentIndicator");var nBt=1,iBt=2,aBt=3,oBt=4,sBt=5;function lBt(t,e,r,n,i,a,o,s){var l,c=0,h=null,u=!1,d=!1,p=-1!==n,g=-1,f=JPt(eBt(t,0))&&tBt(eBt(t,t.length-1));if(e||o)for(l=0;l<t.length;65536<=c?l+=2:l++){if(!KPt(c=eBt(t,l)))return sBt;f=f&&QPt(c,h,s),h=c}else{for(l=0;l<t.length;65536<=c?l+=2:l++){if((c=eBt(t,l))===FPt)u=!0,p&&(d=d||n<l-g-1&&" "!==t[g+1],g=l);else if(!KPt(c))return sBt;f=f&&QPt(c,h,s),h=c}d=d||p&&n<l-g-1&&" "!==t[g+1]}return u||d?9<r&&rBt(t)?sBt:o?a===YPt?sBt:iBt:d?oBt:aBt:!f||o||i(t)?a===YPt?sBt:iBt:nBt}function cBt(i,a,o,s,l){i.dump=function(){if(0===a.length)return i.quotingType===YPt?'""':"''";if(!i.noCompatMode&&(-1!==zPt.indexOf(a)||GPt.test(a)))return i.quotingType===YPt?'"'+a+'"':"'"+a+"'";var t=i.indent*Math.max(1,o),e=-1===i.lineWidth?-1:Math.max(Math.min(i.lineWidth,40),i.lineWidth-t),r=s||-1<i.flowLevel&&o>=i.flowLevel;function n(t){return VPt(i,t)}switch(Ae(n,"testAmbiguity"),lBt(a,r,i.indent,e,n,i.quotingType,i.forceQuotes&&!s,l)){case nBt:return a;case iBt:return"'"+a.replace(/'/g,"''")+"'";case aBt:return"|"+hBt(a,i.indent)+uBt(HPt(a,t));case oBt:return">"+hBt(a,i.indent)+uBt(HPt(dBt(a,e),t));case sBt:return'"'+gBt(a)+'"';default:throw new IDt("impossible error: invalid scalar style")}}()}function hBt(t,e){var e=rBt(t)?String(e):"",r=t[t.length-1]===`
`;return e+(!r||t[t.length-2]!==`
`&&t!==`
`?r?"":"-":"+")+`
`}function uBt(t){return t[t.length-1]===`
`?t.slice(0,-1):t}function dBt(t,e){for(var r,n=/(\n+)([^\n]*)/g,i=(r=-1!==(r=t.indexOf(`
`))?r:t.length,n.lastIndex=r,pBt(t.slice(0,r),e)),a=t[0]===`
`||" "===t[0];s=n.exec(t);){var o=s[1],s=s[2],l=" "===s[0];i+=o+(a||l||""===s?"":`
`)+pBt(s,e),a=l}return i}function pBt(t,e){if(""===t||" "===t[0])return t;for(var r,n,i=/ [^ ]/g,a=0,o=0,s="";n=i.exec(t);)e<(n=n.index)-a&&(s+=`
`+t.slice(a,r=a<o?o:n),a=r+1),o=n;return s+=`
`,t.length-a>e&&a<o?s+=t.slice(a,o)+`
`+t.slice(o+1):s+=t.slice(a),s.slice(1)}function gBt(t){for(var e,r,n="",i=0;i<t.length;65536<=e?i+=2:i++)e=eBt(t,i),!(r=$Pt[e])&&KPt(e)?(n+=t[i],65536<=e&&(n+=t[i+1])):n+=r||qPt(e);return n}function fBt(t,e,r){for(var n,i="",a=t.tag,o=0,s=r.length;o<s;o+=1)n=r[o],t.replacer&&(n=t.replacer.call(r,String(o),n)),(bBt(t,e,n,!1,!1)||"u"<typeof n&&bBt(t,e,null,!1,!1))&&(""!==i&&(i+=","+(t.condenseFlow?"":" ")),i+=t.dump);t.tag=a,t.dump="["+i+"]"}function mBt(t,e,r,n){for(var i,a="",o=t.tag,s=0,l=r.length;s<l;s+=1)i=r[s],t.replacer&&(i=t.replacer.call(r,String(s),i)),(bBt(t,e+1,i,!0,!0,!1,!0)||"u"<typeof i&&bBt(t,e+1,null,!0,!0,!1,!0))&&(n&&""===a||(a+=WPt(t,e)),t.dump&&FPt===t.dump.charCodeAt(0)?a+="-":a+="- ",a+=t.dump);t.tag=o,t.dump=a||"[]"}function yBt(t,e,r){for(var n,i,a,o="",s=t.tag,l=Object.keys(r),c=0,h=l.length;c<h;c+=1)(a="")!==o&&(a+=", "),t.condenseFlow&&(a+='"'),i=r[n=l[c]],t.replacer&&(i=t.replacer.call(r,n,i)),bBt(t,e,n,!1,!1)&&(1024<t.dump.length&&(a+="? "),a+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),bBt(t,e,i,!1,!1))&&(o+=a+=t.dump);t.tag=s,t.dump="{"+o+"}"}function vBt(t,e,r,n){var i,a,o,s,l,c="",h=t.tag,u=Object.keys(r);if(!0===t.sortKeys)u.sort();else if("function"==typeof t.sortKeys)u.sort(t.sortKeys);else if(t.sortKeys)throw new IDt("sortKeys must be a boolean or a function");for(i=0,a=u.length;i<a;i+=1)l="",n&&""===c||(l+=WPt(t,e)),o=r[s=u[i]],t.replacer&&(o=t.replacer.call(r,s,o)),bBt(t,e+1,s,!0,!0,!0)&&((s=null!==t.tag&&"?"!==t.tag||t.dump&&1024<t.dump.length)&&(t.dump&&FPt===t.dump.charCodeAt(0)?l+="?":l+="? "),l+=t.dump,s&&(l+=WPt(t,e)),bBt(t,e+1,o,!0,s))&&(t.dump&&FPt===t.dump.charCodeAt(0)?l+=":":l+=": ",c+=l+=t.dump);t.tag=h,t.dump=c||"{}"}function xBt(t,e,r){for(var n,i,a,o=r?t.explicitTypes:t.implicitTypes,s=0,l=o.length;s<l;s+=1)if(((i=o[s]).instanceOf||i.predicate)&&(!i.instanceOf||"object"==typeof e&&e instanceof i.instanceOf)&&(!i.predicate||i.predicate(e))){if(r?i.multi&&i.representName?t.tag=i.representName(e):t.tag=i.tag:t.tag="?",i.represent){if(a=t.styleMap[i.tag]||i.defaultStyle,"[object Function]"===OPt.call(i.represent))n=i.represent(e,a);else{if(!PPt.call(i.represent,a))throw new IDt("!<"+i.tag+'> tag resolver accepts not "'+a+'" style');n=i.represent[a](e,a)}t.dump=n}return!0}return!1}function bBt(t,e,r,n,i,a,o){t.tag=null,t.dump=r,xBt(t,r,!1)||xBt(t,r,!0);var s,l,c=OPt.call(t.dump),h=n,u=(n=n&&(t.flowLevel<0||t.flowLevel>e),"[object Object]"===c||"[object Array]"===c);if(u&&(l=-1!==(s=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||l||2!==t.indent&&0<e)&&(i=!1),l&&t.usedDuplicates[s])t.dump="*ref_"+s;else{if(u&&l&&!t.usedDuplicates[s]&&(t.usedDuplicates[s]=!0),"[object Object]"===c)n&&0!==Object.keys(t.dump).length?(vBt(t,e,t.dump,i),l&&(t.dump="&ref_"+s+t.dump)):(yBt(t,e,t.dump),l&&(t.dump="&ref_"+s+" "+t.dump));else if("[object Array]"===c)n&&0!==t.dump.length?(t.noArrayIndent&&!o&&0<e?mBt(t,e-1,t.dump,i):mBt(t,e,t.dump,i),l&&(t.dump="&ref_"+s+t.dump)):(fBt(t,e,t.dump),l&&(t.dump="&ref_"+s+" "+t.dump));else{if("[object String]"!==c){if("[object Undefined]"===c)return!1;if(t.skipInvalid)return!1;throw new IDt("unacceptable kind of an object to dump "+c)}"?"!==t.tag&&cBt(t,t.dump,e,a,h)}null!==t.tag&&"?"!==t.tag&&(r=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),r="!"===t.tag[0]?"!"+r:"tag:yaml.org,2002:"===r.slice(0,18)?"!!"+r.slice(18):"!<"+r+">",t.dump=r+" "+t.dump)}return!0}function wBt(t,e){var r,n,i=[],a=[];for(kBt(t,i,a),r=0,n=a.length;r<n;r+=1)e.duplicates.push(i[a[r]]);e.usedDuplicates=new Array(n)}function kBt(t,e,r){var n,i,a;if(null!==t&&"object"==typeof t)if(-1!==(i=e.indexOf(t)))-1===r.indexOf(i)&&r.push(i);else if(e.push(t),Array.isArray(t))for(i=0,a=t.length;i<a;i+=1)kBt(t[i],e,r);else for(i=0,a=(n=Object.keys(t)).length;i<a;i+=1)kBt(t[n[i]],e,r)}function TBt(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}Ae(lBt,"chooseScalarStyle"),Ae(cBt,"writeScalar"),Ae(hBt,"blockHeader"),Ae(uBt,"dropEndingNewline"),Ae(dBt,"foldString"),A
`:""},"dump$1"),Ae(TBt,"renamed");var EBt=J,_Bt=t.load;function CBt(t){var e,r,n=t.match(Wt);return n?(r={},(e="object"!=typeof(e=_Bt(n[1],{schema:EBt})??{})||Array.isArray(e)?{}:e).displayMode&&(r.displayMode=e.displayMode.toString()),e.title&&(r.title=e.title.toString()),e.config&&(r.config=e.config),{text:t.slice(n[0].length),metadata:r}):{text:t,metadata:{}}}TBt("safeLoad","load"),TBt("safeLoadAll","loadAll"),TBt("safeDump","dump"),Ae(CBt,"extractFrontMatter"),K8();var SBt=Ae(t=>t.replace(/\r\n?/g,`
`).replace(/<(\w+)([^>]*)>/g,(t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),ABt=Ae(t=>{var{text:t,metadata:e}=CBt(t),{displayMode:e,title:r,config:n={}}=e;return e&&(n.gantt||(n.gantt={}),n.gantt.displayMode=e),{title:r,config:n,text:t}},"processFrontmatter"),LBt=Ae(t=>{var e=H8.detectInit(t)??{},r=H8.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:t})=>"wrap"===t):"wrap"===r?.type&&(e.wrap=!0),{text:S8(t),directive:e}},"processDirectives");function NBt(t){var e=SBt(t),e=ABt(e),r=LBt(e.text),n=b8(e.config,r.directive);return{code:t=wDt(r.text),title:e.title,config:n}}function IBt(t){return t=(new TextEncoder).encode(t),t=Array.from(t,t=>String.fromCodePoint(t)).join(""),btoa(t)}Ae(NBt,"preprocessDiagram"),rc(),An(),K8(),Ae(IBt,"toBase64");var MBt=["foreignobject"],RBt=["dominant-baseline"];function DBt(t){return t=NBt(t),Pr(),Or(t.config??{}),t}async function OBt(t,e){SRt();try{var r=DBt(t).code;return{diagramType:(await jBt(r)).type}}catch(t){if(e?.suppressErrors)return!1;throw t}}Ae(DBt,"processAndSetConfigs"),Ae(OBt,"parse");var PBt=Ae((t,e,r=[])=>`
.${t} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),BBt=Ae((e,r=new Map)=>{let n="";if(void 0!==e.themeCSS&&(n+=`
`+e.themeCSS),void 0!==e.fontFamily&&(n+=`
:root { --mermaid-font-family: ${e.fontFamily}}`),void 0!==e.altFontFamily&&(n+=`
:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),r instanceof Map){let t=e.htmlLabels??e.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];r.forEach(e=>{E$(e.styles)||t.forEach(t=>{n+=PBt(e.id,t,e.styles)}),E$(e.textStyles)||(n+=PBt(e.id,"tspan",(e?.textStyles||[]).map(t=>t.replace("color","fill"))))})}return n},"createCssStyles"),FBt=Ae((t,e,r,n)=>(r=BBt(t,r),pDt(lDt(n+`{${Jl(e,r,t.themeVariables)}}`),gDt)),"createUserStyles"),$Bt=Ae((t="",e,r)=>{let n=t;return r||e||(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=(n=V8(n)).replace(/<br>/g,"<br/>")},"cleanUpSvgCode"),zBt=Ae((t="",e)=>`<iframe style="width:100%;height:${e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${IBt(`<body style="margin:0">${t}</body>`)}" sandbox="allow-top-navigation-by-user-activation allow-popups">
The "iframe" tag is not supported by your browser.
</iframe>`,"putIntoIFrame"),GBt=Ae((t,e,r,n,i)=>{var a=t.append("div"),r=(a.attr("id",r),n&&a.attr("style",n),a.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg"));return i&&r.attr("xmlns:xlink",i),r.append("g"),t},"appendDivSvgG");function UBt(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}Ae(UBt,"sandboxedIframe");var qBt=Ae((t,e,r,n)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(n)?.remove()},"removeExistingElements"),KDt=Ae(async function(t,e,r){SRt();var n=DBt(e),i=(e=n.code,Rr());R.debug(i),e.length>(i?.maxTextSize??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");let a="#"+t,o="i"+t,s="#"+o,l="d"+t,c="#"+l,h=Ae(()=>{var t=O(d?s:c).node();t&&"remove"in t&&t.remove()},"removeTempElements"),u=O("body"),d="sandbox"===i.securityLevel,p="loose"===i.securityLevel,g=i.fontFamily;void 0!==r?(r&&(r.innerHTML=""),d?(y=UBt(O(r),o),(u=O(y.nodes()[0].contentDocument.body)).node().style.margin=0):u=O(r),GBt(u,t,l,"font-family: "+g,"http://www.w3.org/1999/xlink")):(qBt(document,t,l,o),d?(y=UBt(O("body"),o),(u=O(y.nodes()[0].contentDocument.body)).node().style.margin=0):u=O("body"),GBt(u,t,l));let f,m;try{f=await vDt.fromText(e,{title:n.title})}catch(r){if(i.suppressErrorRendering)throw h(),r;f=await vDt.fromText("error"),m=r}var r=u.select(c).node(),y=f.type,r=(n=r.firstChild).firstChild,v=f.renderer.getClasses?.(e,f),v=FBt(i,y,v,a),x=document.createElement("style");x.innerHTML=v,n.insertBefore(x,r);try{await f.renderer.draw(e,t,bpt,f)}catch(r){throw i.suppressErrorRendering?h():fRt.draw(e,t,bpt),r}HBt(y,u.select(c+" svg"),f.db.getAccTitle?.(),f.db.getAccDescription?.()),u.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let b=u.select(c).node().innerHTML;if(R.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),b=$Bt(b,d,Dl(i.arrowMarkerAbsolute)),d?(v=u.select(c+" svg").node(),b=zBt(b,v)):p||(b=fDt.default.sanitize(b,{ADD_TAGS:MBt,ADD_ATTR:RBt})),bDt(),m)throw m;return h(),{diagramType:y,svg:b,bindFunctions:f.db.bindFunctions}},"render");function YBt(t={}){(t=ae({},t))?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Lr(t),t?.theme&&t.theme in gr?t.themeVariables=gr[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=gr.default.getThemeVariables(t.themeVariables)),t="object"==typeof t?Ar(t):Ir(),k(t.logLevel),SRt()}Ae(YBt,"initialize");var jBt=Ae((t,e={})=>(t=NBt(t).code,vDt.fromText(t,e)),"getDiagramFromText");function HBt(t,e,r,n){mDt(e,t),yDt(e,r,n,e.attr("id"))}Ae(HBt,"addA11yInfo");var WBt=Object.freeze({render:KDt,parse:OBt,getDiagramFromText:jBt,initialize:YBt,getConfig:Rr,setConfig:Mr,getSiteConfig:Ir,updateSiteConfig:Nr,reset:Ae(()=>{Pr()},"reset"),globalReset:Ae(()=>{Pr(kr)},"globalReset"),defaultConfig:kr}),VBt=(k(Rr().logLevel),Pr(Rr()),nH(),K8(),Ae((t,e,r)=>{R.warn(t),x8(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError")),XBt=Ae(async function(e={querySelector:".mermaid"}){try{await KBt(e)}catch(t){if(x8(t)&&R.error(t.str),rFt.parseError&&rFt.parseError(t),!e.suppressErrors)throw R.error("Use the suppressErrors option to suppress these errors"),t}},"run"),KBt=Ae(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){var n=WBt.getConfig();R.debug(`${t?"":"No "}Callback function found`);let i;if(r)i=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");i=document.querySelectorAll(e)}R.debug(`Found ${i.length} diagrams`),void 0!==n?.startOnLoad&&(R.debug("Start On Load: "+n?.startOnLoad),WBt.updateSiteConfig({startOnLoad:n?.startOnLoad}));var a,o=new H8.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed),s=[];for(a of Array.from(i))if(R.info("Rendering diagram: "+a.id),!a.getAttribute("data-processed")){a.setAttribute("data-processed","t