var __esbuild_esm_mermaid_nm;(__esbuild_esm_mermaid_nm||={}).mermaid=(()=>{var x,T,w,k,_,S,C,A,N=Object.create,I=Object.defineProperty,D=Object.getOwnPropertyDescriptor,B=Object.getOwnPropertyNames,F=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty,mt=(e,t)=>I(e,"name",{value:t,configurable:!0}),q=(t,r,i,n)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let e of B(r))z.call(t,e)||e===i||I(t,e,{get:()=>r[e],enumerable:!(n=D(r,e))||n.enumerable});return t},U=(e,t,r)=>(q(e,t,"default"),r&&q(r,t,"default")),G=(e,t,r)=>(r=null!=e?N(F(e)):{},q(!t&&e&&e.__esModule?r:I(r,"default",{value:e,enumerable:!0}),e)),j=e=>q(I({},"__esModule",{value:!0}),e),W=(s=(e,t)=>()=>t=e?e(e=0):t)(()=>{x=Object.freeze({left:0,top:0,width:16,height:16}),T=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),w=Object.freeze({...x,...T}),k=Object.freeze({...w,body:"",hidden:!1})}),Y=s(()=>{W(),_=Object.freeze({width:null,height:null}),S=Object.freeze({..._,...T})}),ee=s(()=>{C=mt((e,t,r,i="")=>{var n,a=e.split(":");if("@"===e.slice(0,1)){if(a.length<2||3!!e&&!(!(t&&""===e.prefix||e.prefix)||!e.name),"validateIconName")});function te(e,t){var r={};return!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0),(e=((e.rotate||0)+(t.rotate||0))%4)&&(r.rotate=e),r}var re=s(()=>{mt(te,"mergeIconTransformations")});function ie(e,t){var r,i=te(e,t);for(r in k)r in T?r in e&&!(r in i)&&(i[r]=T[r]):r in t?i[r]=t[r]:r in e&&(i[r]=e[r]);return i}var ne=s(()=>{W(),re(),mt(ie,"mergeIconData")});function ae(e,t){let i=e.icons,n=e.aliases||Object.create(null),a=Object.create(null);function s(e){var t,r;return i[e]?a[e]=[]:(e in a||(a[e]=null,(r=(t=n[e]&&n[e].parent)&&s(t))&&(a[e]=[t].concat(r))),a[e])}return mt(s,"resolve"),(t||Object.keys(i).concat(Object.keys(n))).forEach(s),a}var se=s(()=>{mt(ae,"getIconsTree")});function oe(e,t,r){let i=e.icons,n=e.aliases||Object.create(null),a={};function s(e){a=ie(i[e]||n[e],a)}return mt(s,"parse"),s(t),r.forEach(s),ie(e,a)}function le(e,t){var r;return e.icons[t]?oe(e,t,[]):(r=ae(e,[t])[t])?oe(e,t,r):null}var ce=s(()=>{ne(),se(),mt(oe,"internalGetIconData"),mt(le,"getIconData")});function ue(e,t,r){if(1===t)return e;if(r=r||100,"number"==typeof e)return Math.ceil(e*t*r)/r;if("string"!=typeof e)return e;var i,n=e.split(de);if(null===n||!n.length)return e;let a=[],s=n.shift(),o=pe.test(s);for(;;){if(!o||(i=parseFloat(s),isNaN(i))?a.push(s):a.push(Math.ceil(i*t*r)/r),void 0===(s=n.shift()))return a.join("");o=!o}}var de,pe,ge=s(()=>{de=/(-?[0-9.]*[0-9]+[0-9.]*)/g,pe=/^-?[0-9.]*[0-9]+[0-9.]*$/g,mt(ue,"calculateSize")});function fe(e,t="defs"){let r="",i=e.indexOf("<"+t);for(;0<=i;){var n=e.indexOf(">",i),a=e.indexOf("",a);if(-1===s)break;r+=e.slice(n+1,a).trim(),e=e.slice(0,i).trim()+e.slice(s+1)}return{defs:r,content:e}}function me(e,t){return e?""+e+""+t:t}function ye(e,t,r){return me((e=fe(e)).defs,t+e.content+r)}var ve=s(()=>{mt(fe,"splitSVGDefs"),mt(me,"mergeDefsAndContent"),mt(ye,"wrapSVGContent")});function be(e,t){let r={...w,...e},i={...S,...t},s={left:r.left,top:r.top,width:r.width,height:r.height},o=r.body,n=([r,i].forEach(e=>{let t=[],r=e.hFlip,i=e.vFlip,n=e.rotate;r?i?n+=2:(t.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),t.push("scale(-1 1)"),s.top=s.left=0):i&&(t.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),t.push("scale(1 -1)"),s.top=s.left=0);let a;switch(n<0&&(n-=4*Math.floor(n/4)),n%=4){case 1:a=s.height/2+s.top,t.unshift("rotate(90 "+a.toString()+" "+a.toString()+")");break;case 2:t.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:a=s.width/2+s.left,t.unshift("rotate(-90 "+a.toString()+" "+a.toString()+")")}n%2==1&&(s.left!==s.top&&(a=s.left,s.left=s.top,s.top=a),s.width!==s.height)&&(a=s.width,s.width=s.height,s.height=a),t.length&&(o=ye(o,'',""))}),i.width),a=i.height,l=s.width,c=s.height,h,u,d=(null===n?(u=null===a?"1em":"auto"===a?c:a,h=ue(u,l/c)):(h="auto"===n?l:n,u=null===a?ue(h,c/l):"auto"===a?c:a),{}),p=mt((e,t)=>{xe(t)||(d[e]=t.toString())},"setAttr");return p("width",h),p("height",u),e=[s.left,s.top,l,c],d.viewBox=e.join(" "),{attributes:d,viewBox:e,body:o}}var xe,Te=s(()=>{W(),Y(),ge(),ve(),xe=mt(e=>"unset"===e||"undefined"===e||"none"===e,"isUnsetKeyword"),mt(be,"iconToSVG")});function we(i,n=Ee){for(var e,t=[];e=ke.exec(i);)t.push(e[1]);if(t.length){let r="suffix"+(16777216*Math.random()|Date.now()).toString(16);t.forEach(e=>{var t="function"==typeof n?n(e):n+(_e++).toString(),e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");i=i.replace(new RegExp('([#;"])('+e+')([")]|\\.[a-z])',"g"),"$1"+t+r+"$3")}),i=i.replace(new RegExp(r,"g"),"")}return i}var ke,Ee,_e,Se=s(()=>{ke=/\sid="(\S+)"/g,Ee="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),_e=0,mt(we,"replaceIDs")});function Ce(e,t){let r=-1===e.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(var i in t)r+=" "+i+'="'+t[i]+'"';return'"+e+""}var Ae,Re,Le,Ne,M,Ie,De,Me,Oe,Pe,$e,Be,Fe,ze,qe,Ue,Ge,je,We,Ye,Ve,He,Xe,Ke,Ze,Qe,Je,et,tt,rt,it,nt,at,st,ot,lt,ct,ht,ut,dt,pt,gt,ft,vt,bt,xt,Tt,R,wt,kt,Et,_t,St,r,Ct,At,Rt,i,Lt,Nt,It,Dt,Mt,Ot,Pt,$t,Bt,Ft,zt,qt,Ut,Gt,jt,Wt,Yt,Vt,Ht,Xt,Kt,Zt,Qt,Jt,er,tr,rr,ir,nr,ar,sr,or,lr,cr,hr,ur,dr,pr,gr,fr,mr,yr,vr,br=s(()=>{mt(Ce,"iconToHTML")}),xr=s(()=>{ee(),ce(),Te(),Se(),br()}),Tr=s(()=>{Ae=mt((t,r,{depth:i=2,clobber:n=!1}={})=>{let a={depth:i,clobber:n};return Array.isArray(r)&&!Array.isArray(t)?(r.forEach(e=>Ae(t,e,a)),t):Array.isArray(r)&&Array.isArray(t)?(r.forEach(e=>{t.includes(e)||t.push(e)}),t):void 0===t||i<=0?null!=t&&"object"==typeof t&&"object"==typeof r?Object.assign(t,r):r:(void 0!==r&&"object"==typeof t&&"object"==typeof r&&Object.keys(r).forEach(e=>{"object"!=typeof r[e]||null===r[e]||void 0!==t[e]&&"object"!=typeof t[e]?(n||"object"!=typeof t[e]&&"object"!=typeof r[e])&&(t[e]=r[e]):(void 0===t[e]&&(t[e]=Array.isArray(r[e])?[]:{}),t[e]=Ae(t[e],r[e],{depth:i-1,clobber:n}))}),t)},"assignWithDepth"),Re=Ae}),wr=(NGe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports))((e,t)=>{function r(){var n="millisecond",u="second",d="minute",p="hour",g="day",f="week",m="month",y="year",v="date",t="Invalid Date",s=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|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,e={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:mt(function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"},"ordinal")},i=mt(function(e,t,r){var i=String(e);return!i||i.length>=t?e:""+Array(t+1-i.length).join(r)+e},"m"),r={s:i,z:mt(function(e){var e=-e.utcOffset(),t=Math.abs(e),r=Math.floor(t/60),t=t%60;return(e<=0?"+":"-")+i(r,2,"0")+":"+i(t,2,"0")},"z"),m:mt(function e(t,r){var i,n,a;return t.date(){var e=a.date,t=a.utc;if(null===e)return new Date(NaN);if(T.u(e))return new Date;if(!(e instanceof Date||"string"!=typeof e||/Z$/i.test(e))){var r,i,n=e.match(s);if(n)return r=n[2]-1||0,i=(n[7]||"0").substring(0,3),t?new Date(Date.UTC(n[1],r,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)):new Date(n[1],r,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)}return new Date(e)})(),this.init()},e.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},e.$utils=function(){return T},e.isValid=function(){return this.$d.toString()!==t},e.isSame=function(e,t){return e=x(e),this.startOf(t)<=e&&e<=this.endOf(t)},e.isAfter=function(e,t){return x(e){switch(e){case"YY":return String(d.$y).slice(-2);case"YYYY":return T.s(d.$y,4,"0");case"M":return s+1;case"MM":return T.s(s+1,2,"0");case"MMM":return c(p.monthsShort,s,l,3);case"MMMM":return c(l,s);case"D":return d.$D;case"DD":return T.s(d.$D,2,"0");case"d":return String(d.$W);case"dd":return c(p.weekdaysMin,d.$W,o,2);case"ddd":return c(p.weekdaysShort,d.$W,o,3);case"dddd":return o[d.$W];case"H":return String(i);case"HH":return T.s(i,2,"0");case"h":return h(1);case"hh":return h(2);case"a":return u(i,a,!0);case"A":return u(i,a,!1);case"m":return String(a);case"mm":return T.s(a,2,"0");case"s":return String(d.$s);case"ss":return T.s(d.$s,2,"0");case"SSS":return T.s(d.$ms,3,"0");case"Z":return r}return null})()||r.replace(":","")})):p.invalidDate||t},e.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},e.diff=function(e,t,r){var i,n=this,t=T.p(t),a=x(e),s=6e4*(a.utcOffset()-this.utcOffset()),o=this-a,l=mt(function(){return T.m(n,a)},"D");switch(t){case y:i=l()/12;break;case m:i=l();break;case"quarter":i=l()/3;break;case f:i=(o-s)/6048e5;break;case g:i=(o-s)/864e5;break;case p:i=o/36e5;break;case d:i=o/6e4;break;case u:i=o/1e3;break;default:i=o}return r?i:T.a(i)},e.daysInMonth=function(){return this.endOf(m).$D},e.$locale=function(){return l[this.$L]},e.locale=function(e,t){var r;return e?(r=this.clone(),(e=h(e,t,!0))&&(r.$L=e),r):this.$L},e.clone=function(){return T.w(this.$d,this)},e.toDate=function(){return new Date(this.valueOf())},e.toJSON=function(){return this.isValid()?this.toISOString():null},e.toISOString=function(){return this.$d.toISOString()},e.toString=function(){return this.$d.toUTCString()},E),k=w.prototype;function E(e){this.$L=h(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[a]=!0}return x.prototype=k,[["$ms",n],["$s",u],["$m",d],["$H",p],["$W",g],["$M",m],["$y",y],["$D",v]].forEach(function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])}}),x.extend=function(e,t){return e.$i||(e(t,w,x),e.$i=!0),x},x.locale=h,x.isDayjs=c,x.unix=function(e){return x(1e3*e)},x.en=l[o],x.Ls=l,x.p={},x}"object"==typeof e&&typeof t<"u"?t.exports=r():"function"==typeof define&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=r()}),e=s(()=>{Le=G(wr(),1),Ne={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},M={trace:mt(()=>{},"trace"),debug:mt(()=>{},"debug"),info:mt(()=>{},"info"),warn:mt(()=>{},"warn"),error:mt(()=>{},"error"),fatal:mt(()=>{},"fatal")},Ie=mt(function(e="fatal"){let t=Ne.fatal;"string"==typeof e?e.toLowerCase()in Ne&&(t=Ne[e]):"number"==typeof e&&(t=e),M.trace=()=>{},M.debug=()=>{},M.info=()=>{},M.warn=()=>{},M.error=()=>{},M.fatal=()=>{},t<=Ne.fatal&&(M.fatal=console.error?console.error.bind(console,De("FATAL"),"color: orange"):console.log.bind(console,"",De("FATAL"))),t<=Ne.error&&(M.error=console.error?console.error.bind(console,De("ERROR"),"color: orange"):console.log.bind(console,"",De("ERROR"))),t<=Ne.warn&&(M.warn=console.warn?console.warn.bind(console,De("WARN"),"color: orange"):console.log.bind(console,"",De("WARN"))),t<=Ne.info&&(M.info=console.info?console.info.bind(console,De("INFO"),"color: lightblue"):console.log.bind(console,"",De("INFO"))),t<=Ne.debug&&(M.debug=console.debug?console.debug.bind(console,De("DEBUG"),"color: lightgreen"):console.log.bind(console,"",De("DEBUG"))),t<=Ne.trace&&(M.trace=console.debug?console.debug.bind(console,De("TRACE"),"color: lightgreen"):console.log.bind(console,"",De("TRACE")))},"setLogLevel"),De=mt(e=>`%c${(0,Le.default)().format("ss.SSS")} : ${e} : `,"format")}),kr=s(()=>{Me={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:mt(e=>255<=e?255:e<0?0:e,"r"),g:mt(e=>255<=e?255:e<0?0:e,"g"),b:mt(e=>255<=e?255:e<0?0:e,"b"),h:mt(e=>e%360,"h"),s:mt(e=>100<=e?100:e<0?0:e,"s"),l:mt(e=>100<=e?100:e<0?0:e,"l"),a:mt(e=>1<=e?1:e<0?0:e,"a")},toLinear:mt(e=>{var t=e/255;return.03928(r<0&&(r+=1),1{if(!t)return 2.55*r;e/=360,t/=100;var n=(r/=100)<.5?r*(1+t):r+t-r*t,a=2*r-n;switch(i){case"r":return 255*Me.hue2rgb(a,n,e+.3333333333333333);case"g":return 255*Me.hue2rgb(a,n,e);case"b":return 255*Me.hue2rgb(a,n,e-.3333333333333333)}},"hsl2rgb"),rgb2hsl:mt(({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;var n=Math.max(e,t,r),a=Math.min(e,t,r),s=(n+a)/2;if("l"===i)return 100*s;if(n===a)return 0;var o=n-a;if("s"===i)return 100*(.5{Pe={clamp:mt((e,t,r)=>rMath.round(1e10*e)/1e10,"round")},$e=Pe}),_r=s(()=>{Be={dec2hex:mt(e=>1<(e=Math.round(e).toString(16)).length?e:"0"+e,"dec2hex")},Fe=Be}),Sr=s(()=>{kr(),Er(),_r(),ze={channel:Oe,lang:$e,unit:Fe}}),Cr=s(()=>{Sr(),qe={};for(let e=0;e<=255;e++)qe[e]=ze.unit.dec2hex(e);Ue={ALL:0,RGB:1,HSL:2}}),Ar=s(()=>{Cr(),Ge=class{static{mt(this,"Type")}constructor(){this.type=Ue.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=Ue.ALL}is(e){return this.type===e}},je=Ge}),Rr=s(()=>{Sr(),Ar(),Cr(),We=class{static{mt(this,"Channels")}constructor(e,t){this.color=t,this.changed=!1,this.data=e,this.type=new je}set(e,t){return this.color=t,this.changed=!1,this.data=e,this.type.type=Ue.ALL,this}_ensureHSL(){var e=this.data,{h:t,s:r,l:i}=e;void 0===t&&(e.h=ze.channel.rgb2hsl(e,"h")),void 0===r&&(e.s=ze.channel.rgb2hsl(e,"s")),void 0===i&&(e.l=ze.channel.rgb2hsl(e,"l"))}_ensureRGB(){var e=this.data,{r:t,g:r,b:i}=e;void 0===t&&(e.r=ze.channel.hsl2rgb(e,"r")),void 0===r&&(e.g=ze.channel.hsl2rgb(e,"g")),void 0===i&&(e.b=ze.channel.hsl2rgb(e,"b"))}get r(){var e=this.data,t=e.r;return this.type.is(Ue.HSL)||void 0===t?(this._ensureHSL(),ze.channel.hsl2rgb(e,"r")):t}get g(){var e=this.data,t=e.g;return this.type.is(Ue.HSL)||void 0===t?(this._ensureHSL(),ze.channel.hsl2rgb(e,"g")):t}get b(){var e=this.data,t=e.b;return this.type.is(Ue.HSL)||void 0===t?(this._ensureHSL(),ze.channel.hsl2rgb(e,"b")):t}get h(){var e=this.data,t=e.h;return this.type.is(Ue.RGB)||void 0===t?(this._ensureRGB(),ze.channel.rgb2hsl(e,"h")):t}get s(){var e=this.data,t=e.s;return this.type.is(Ue.RGB)||void 0===t?(this._ensureRGB(),ze.channel.rgb2hsl(e,"s")):t}get l(){var e=this.data,t=e.l;return this.type.is(Ue.RGB)||void 0===t?(this._ensureRGB(),ze.channel.rgb2hsl(e,"l")):t}get a(){return this.data.a}set r(e){this.type.set(Ue.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(Ue.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(Ue.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(Ue.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(Ue.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(Ue.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}},Ye=We}),Lr=s(()=>{Rr(),Ve=new Ye({r:0,g:0,b:0,a:0},"transparent"),He=Ve}),Nr=s(()=>{Lr(),Cr(),Xe={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:mt(e=>{if(35===e.charCodeAt(0)){var t,r,i,n,a,s=e.match(Xe.re);if(s)return s=s[1],t=parseInt(s,16),s=s.length,He.set({r:(t>>(i=(r=4>i*(2+n)&a)*r,b:(t>>i*(1+n)&a)*r,a:s?(t&a)*r/255:1},e)}},"parse"),stringify:mt(e=>{var{r:e,g:t,b:r,a:i}=e;return i<1?"#"+qe[Math.round(e)]+qe[Math.round(t)]+qe[Math.round(r)]+qe[Math.round(255*i)]:"#"+qe[Math.round(e)]+qe[Math.round(t)]+qe[Math.round(r)]},"stringify")},Ke=Xe}),Ir=s(()=>{Sr(),Lr(),Ze={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:mt(e=>{if(r=e.match(Ze.hueRe)){var[,t,r]=r;switch(r){case"grad":return ze.channel.clamp.h(.9*parseFloat(t));case"rad":return ze.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return ze.channel.clamp.h(360*parseFloat(t))}}return ze.channel.clamp.h(parseFloat(e))},"_hue2deg"),parse:mt(e=>{var t,r,i,n,a=e.charCodeAt(0);if((104===a||72===a)&&(a=e.match(Ze.re)))return[,a,t,r,i,n]=a,He.set({h:Ze._hue2deg(a),s:ze.channel.clamp.s(parseFloat(t)),l:ze.channel.clamp.l(parseFloat(r)),a:i?ze.channel.clamp.a(n?parseFloat(i)/100:parseFloat(i)):1},e)},"parse"),stringify:mt(e=>{var{h:e,s:t,l:r,a:i}=e;return i<1?`hsla(${ze.lang.round(e)}, ${ze.lang.round(t)}%, ${ze.lang.round(r)}%, ${i})`:`hsl(${ze.lang.round(e)}, ${ze.lang.round(t)}%, ${ze.lang.round(r)}%)`},"stringify")},Qe=Ze}),Dr=s(()=>{Nr(),Je={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:mt(e=>{if(e=e.toLowerCase(),e=Je.colors[e])return Ke.parse(e)},"parse"),stringify:mt(e=>{var t,r=Ke.stringify(e);for(t in Je.colors)if(Je.colors[t]===r)return t},"stringify")},et=Je}),Mr=s(()=>{Sr(),Lr(),tt={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:mt(e=>{var t,r,i,n,a,s,o,l=e.charCodeAt(0);if((114===l||82===l)&&(l=e.match(tt.re)))return[,l,t,r,i,n,a,s,o]=l,He.set({r:ze.channel.clamp.r(t?2.55*parseFloat(l):parseFloat(l)),g:ze.channel.clamp.g(i?2.55*parseFloat(r):parseFloat(r)),b:ze.channel.clamp.b(a?2.55*parseFloat(n):parseFloat(n)),a:s?ze.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},e)},"parse"),stringify:mt(e=>{var{r:e,g:t,b:r,a:i}=e;return i<1?`rgba(${ze.lang.round(e)}, ${ze.lang.round(t)}, ${ze.lang.round(r)}, ${ze.lang.round(i)})`:`rgb(${ze.lang.round(e)}, ${ze.lang.round(t)}, ${ze.lang.round(r)})`},"stringify")},rt=tt}),Or=s(()=>{Nr(),Ir(),Dr(),Mr(),Cr(),it={format:{keyword:et,hex:Ke,rgb:rt,rgba:rt,hsl:Qe,hsla:Qe},parse:mt(e=>{if("string"!=typeof e)return e;var t=Ke.parse(e)||rt.parse(e)||Qe.parse(e)||et.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},"parse"),stringify:mt(e=>!e.changed&&e.color?e.color:(e.type.is(Ue.HSL)||void 0===e.data.r?Qe:e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?rt:Ke).stringify(e),"stringify")},nt=it}),Pr=s(()=>{Sr(),Or(),at=mt((e,t)=>{var r,i=nt.parse(e);for(r in t)i[r]=ze.channel.clamp[r](t[r]);return nt.stringify(i)},"change"),st=at}),$r=s(()=>{Sr(),Lr(),Or(),Pr(),ot=mt((e,t,r=0,i=1)=>"number"!=typeof e?st(e,{a:t}):(e=He.set({r:ze.channel.clamp.r(e),g:ze.channel.clamp.g(t),b:ze.channel.clamp.b(r),a:ze.channel.clamp.a(i)}),nt.stringify(e)),"rgba"),lt=ot}),Br=s(()=>{Sr(),Or(),ct=mt((e,t)=>ze.lang.round(nt.parse(e)[t]),"channel"),ht=ct}),Fr=s(()=>{Sr(),Or(),ut=mt(e=>{var{r:e,g:t,b:r}=nt.parse(e),e=.2126*ze.channel.toLinear(e)+.7152*ze.channel.toLinear(t)+.0722*ze.channel.toLinear(r);return ze.lang.round(e)},"luminance"),dt=ut}),zr=s(()=>{Fr(),pt=mt(e=>.5<=dt(e),"isLight"),gt=pt}),qr=s(()=>{zr(),ft=mt(e=>!gt(e),"isDark"),vt=ft}),Ur=s(()=>{Sr(),Or(),bt=mt((e,t,r)=>{var i=(e=nt.parse(e))[t];return i!==(r=ze.channel.clamp[t](i+r))&&(e[t]=r),nt.stringify(e)},"adjustChannel"),xt=bt}),Gr=s(()=>{Ur(),Tt=mt((e,t)=>xt(e,"l",t),"lighten"),R=Tt}),jr=s(()=>{Ur(),wt=mt((e,t)=>xt(e,"l",-t),"darken"),kt=wt}),Wr=s(()=>{Ur(),Et=mt((e,t)=>xt(e,"a",-t),"transparentize"),_t=Et}),Yr=s(()=>{Or(),Pr(),St=mt((e,t)=>{var r,i=nt.parse(e),n={};for(r in t)t[r]&&(n[r]=i[r]+t[r]);return st(e,n)},"adjust"),r=St}),Vr=s(()=>{Or(),$r(),Ct=mt((e,t,r=50)=>{var{r:e,g:i,b:n,a}=nt.parse(e),{r:t,g:s,b:o,a:l}=nt.parse(t),c=2*(r/=100)-1,h=a-l;return lt(e*(c=(1+(c*h==-1?c:(c+h)/(1+c*h)))/2)+t*(h=1-c),i*c+s*h,n*c+o*h,a*r+l*(1-r))},"mix"),At=Ct}),Hr=s(()=>{Or(),Vr(),Rt=mt((e,t=100)=>{var r=nt.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,At(r,e,t)},"invert"),i=Rt}),Xr=s(()=>{$r(),Br(),qr(),Gr(),jr(),Wr(),Yr(),Hr()}),Kr=s(()=>{Xr()}),Zr=s(()=>{Lt="#ffffff",Nt="#f2f2f2"}),Qr=s(()=>{Kr(),It=mt((e,t)=>r(e,t?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder")}),Jr=s(()=>{Kr(),Zr(),Qr(),Dt=class{static{mt(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||r(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||r(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||It(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||It(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||It(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||i(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||i(this.tertiaryColor),this.lineColor=this.lineColor||i(this.background),this.arrowheadColor=this.arrowheadColor||i(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?kt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||kt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||i(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||R(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||kt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||kt(this.mainBkg,10)):(this.rowOdd=this.rowOdd||R(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||R(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||r(this.primaryColor,{h:30}),this.cScale4=this.cScale4||r(this.primaryColor,{h:60}),this.cScale5=this.cScale5||r(this.primaryColor,{h:90}),this.cScale6=this.cScale6||r(this.primaryColor,{h:120}),this.cScale7=this.cScale7||r(this.primaryColor,{h:150}),this.cScale8=this.cScale8||r(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||r(this.primaryColor,{h:270}),this.cScale10=this.cScale10||r(this.primaryColor,{h:300}),this.cScale11=this.cScale11||r(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},Mt=mt(e=>{var t=new Dt;return t.calculate(e),t},"getThemeVariables")}),ei=s(()=>{Kr(),Qr(),Ot=class{static{mt(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=R(this.primaryColor,16),this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=i(this.background),this.secondaryBorderColor=It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=It(this.tertiaryColor,this.darkMode),this.primaryTextColor=i(this.primaryColor),this.secondaryTextColor=i(this.secondaryColor),this.tertiaryTextColor=i(this.tertiaryColor),this.lineColor=i(this.background),this.textColor=i(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=R(i("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=lt(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=kt("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=kt(this.sectionBkgColor,10),this.taskBorderColor=lt(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=lt(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||R(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||kt(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=R(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=R(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=R(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=i(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=r(this.primaryColor,{h:64}),this.fillType3=r(this.secondaryColor,{h:64}),this.fillType4=r(this.primaryColor,{h:-64}),this.fillType5=r(this.secondaryColor,{h:-64}),this.fillType6=r(this.primaryColor,{h:128}),this.fillType7=r(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||r(this.primaryColor,{h:30}),this.cScale4=this.cScale4||r(this.primaryColor,{h:60}),this.cScale5=this.cScale5||r(this.primaryColor,{h:90}),this.cScale6=this.cScale6||r(this.primaryColor,{h:120}),this.cScale7=this.cScale7||r(this.primaryColor,{h:150}),this.cScale8=this.cScale8||r(this.primaryColor,{h:210}),this.cScale9=this.cScale9||r(this.primaryColor,{h:270}),this.cScale10=this.cScale10||r(this.primaryColor,{h:300}),this.cScale11=this.cScale11||r(this.primaryColor,{h:330});for(let e=0;e{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},Pt=mt(e=>{var t=new Ot;return t.calculate(e),t},"getThemeVariables")}),ti=s(()=>{Kr(),Qr(),Zr(),$t=class{static{mt(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=r(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=It(this.primaryColor,this.darkMode),this.secondaryBorderColor=It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=It(this.tertiaryColor,this.darkMode),this.primaryTextColor=i(this.primaryColor),this.secondaryTextColor=i(this.secondaryColor),this.tertiaryTextColor=i(this.tertiaryColor),this.lineColor=i(this.background),this.textColor=i(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=lt(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||r(this.primaryColor,{h:30}),this.cScale4=this.cScale4||r(this.primaryColor,{h:60}),this.cScale5=this.cScale5||r(this.primaryColor,{h:90}),this.cScale6=this.cScale6||r(this.primaryColor,{h:120}),this.cScale7=this.cScale7||r(this.primaryColor,{h:150}),this.cScale8=this.cScale8||r(this.primaryColor,{h:210}),this.cScale9=this.cScale9||r(this.primaryColor,{h:270}),this.cScale10=this.cScale10||r(this.primaryColor,{h:300}),this.cScale11=this.cScale11||r(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||kt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||kt(this.tertiaryColor,40);for(let e=0;e{"calculated"===this[e]&&(this[e]=void 0)}),"object"!=typeof t?this.updateColors():((e=Object.keys(t)).forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},Bt=mt(e=>{var t=new $t;return t.calculate(e),t},"getThemeVariables")}),ri=s(()=>{Kr(),Zr(),Qr(),Ft=class{static{mt(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=R("#cde498",10),this.primaryBorderColor=It(this.primaryColor,this.darkMode),this.secondaryBorderColor=It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=It(this.tertiaryColor,this.darkMode),this.primaryTextColor=i(this.primaryColor),this.secondaryTextColor=i(this.secondaryColor),this.tertiaryTextColor=i(this.primaryColor),this.lineColor=i(this.background),this.textColor=i(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=kt(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||r(this.primaryColor,{h:30}),this.cScale4=this.cScale4||r(this.primaryColor,{h:60}),this.cScale5=this.cScale5||r(this.primaryColor,{h:90}),this.cScale6=this.cScale6||r(this.primaryColor,{h:120}),this.cScale7=this.cScale7||r(this.primaryColor,{h:150}),this.cScale8=this.cScale8||r(this.primaryColor,{h:210}),this.cScale9=this.cScale9||r(this.primaryColor,{h:270}),this.cScale10=this.cScale10||r(this.primaryColor,{h:300}),this.cScale11=this.cScale11||r(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||kt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||kt(this.tertiaryColor,40);for(let e=0;e{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},zt=mt(e=>{var t=new Ft;return t.calculate(e),t},"getThemeVariables")}),ii=s(()=>{Kr(),Qr(),Zr(),qt=class{static{mt(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=R(this.contrast,55),this.background="#ffffff",this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=It(this.primaryColor,this.darkMode),this.secondaryBorderColor=It(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=It(this.tertiaryColor,this.darkMode),this.primaryTextColor=i(this.primaryColor),this.secondaryTextColor=i(this.secondaryColor),this.tertiaryTextColor=i(this.tertiaryColor),this.lineColor=i(this.background),this.textColor=i(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||R(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=R(this.contrast,55),this.border2=this.contrast,this.actorBorder=R(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},Ut=mt(e=>{var t=new qt;return t.calculate(e),t},"getThemeVariables")}),ni=s(()=>{Jr(),ei(),ti(),ri(),ii(),Gt={base:{getThemeVariables:Mt},dark:{getThemeVariables:Pt},default:{getThemeVariables:Bt},forest:{getThemeVariables:zt},neutral:{getThemeVariables:Ut}}}),ai=s(()=>{jt={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1}}),si=s(()=>{ni(),ai(),Wt={...jt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Gt.default.getThemeVariables(),sequence:{...jt.sequence,messageFont:mt(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:mt(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:mt(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...jt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...jt.c4,useWidth:void 0,personFont:mt(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...jt.flowchart,inheritDir:!1},external_personFont:mt(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:mt(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:mt(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:mt(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:mt(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:mt(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:mt(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:mt(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:mt(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:mt(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:mt(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:mt(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:mt(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:mt(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:mt(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:mt(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:mt(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:mt(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:mt(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:mt(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:mt(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...jt.pie,useWidth:984},xyChart:{...jt.xyChart,useWidth:void 0},requirement:{...jt.requirement,useWidth:void 0},packet:{...jt.packet},radar:{...jt.radar},ishikawa:{...jt.ishikawa},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...jt.venn}},Yt=mt((r,i="")=>Object.keys(r).reduce((e,t)=>Array.isArray(r[t])?e:"object"==typeof r[t]&&null!==r[t]?[...e,i+t,...Yt(r[t],"")]:[...e,i+t],[]),"keyify"),Vt=new Set(Yt(Wt,"")),Ht=Wt}),oi=s(()=>{si(),e(),Xt=mt(e=>{if(M.debug("sanitizeDirective called with",e),"object"==typeof e&&null!=e)if(Array.isArray(e))e.forEach(e=>Xt(e));else{for(var t of Object.keys(e)){var r;if(M.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Vt.has(t)||null==e[t])M.debug("sanitize deleting key: ",t),delete e[t];else if("object"==typeof e[t])M.debug("sanitizing object",t),Xt(e[t]);else for(r of["themeCSS","fontFamily","altFontFamily"])t.includes(r)&&(M.debug("sanitizing css option",t),e[t]=Kt(e[t]))}if(e.themeVariables)for(var i of Object.keys(e.themeVariables)){var n=e.themeVariables[i];n?.match&&!n.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[i]="")}M.debug("After sanitization",e)}},"sanitizeDirective"),Kt=mt(e=>{let t=0,r=0;for(var i of e){if(t{Tr(),e(),ni(),si(),oi(),Zt=Object.freeze(Ht),Qt=mt(e=>!(!1===e||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Jt=Re({},Zt),tr=[],rr=Re({},Zt),ir=mt((e,t)=>{let r=Re({},e),i={};for(var n of t)hr(n),i=Re(i,n);return r=Re(r,i),i.theme&&i.theme in Gt&&(e=Re({},er),t=Re(e.themeVariables||{},i.themeVariables),r.theme)&&r.theme in Gt&&(r.themeVariables=Gt[r.theme].getThemeVariables(t)),mr(rr=r),rr},"updateCurrentConfig"),nr=mt(e=>(Jt=Re({},Zt),Jt=Re(Jt,e),e.theme&&Gt[e.theme]&&(Jt.themeVariables=Gt[e.theme].getThemeVariables(e.themeVariables)),ir(Jt,tr),Jt),"setSiteConfig"),ar=mt(e=>{er=Re({},e)},"saveConfigFromInitialize"),sr=mt(e=>(Jt=Re(Jt,e),ir(Jt,tr),Jt),"updateSiteConfig"),or=mt(()=>Re({},Jt),"getSiteConfig"),lr=mt(e=>(mr(e),Re(rr,e),cr()),"setConfig"),cr=mt(()=>Re({},rr),"getConfig"),hr=mt(t=>{t&&(["secure",...Jt.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(M.debug("Denied attempt to modify a secure key "+e,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&hr(t[e])}))},"sanitize"),ur=mt(e=>{Xt(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),tr.push(e),ir(Jt,tr)},"addDirective"),dr=mt((e=Jt)=>{ir(e,tr=[])},"reset"),pr={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},gr={},fr=mt(e=>{gr[e]||(M.warn(pr[e]),gr[e]=!0)},"issueWarning"),mr=mt(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&fr("LAZY_LOAD_DEPRECATED")},"checkConfig"),yr=mt(()=>{let e={};er&&(e=Re(e,er));for(var t of tr)e=Re(e,t);return e},"getUserDefinedConfig"),vr=mt(e=>(null!=e.flowchart?.htmlLabels&&fr("FLOWCHART_HTML_LABELS_DEPRECATED"),Qt(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels")});function ci(n){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,r=new Array(1fi(e),"DOMPurify");if(d.version="3.3.1",d.removed=[],!e||!e.document||e.document.nodeType!==ln.document||!e.Element)return d.isSupported=!1,d;let n=e.document,P=n,$=P.currentScript,{DocumentFragment:B,HTMLTemplateElement:F,Node:z,Element:q,NodeFilter:t,NamedNodeMap:U=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:G,DOMParser:j,trustedTypes:p}=e,r=q.prototype,W=gi(r,"cloneNode"),Y=gi(r,"remove"),V=gi(r,"nextSibling"),H=gi(r,"childNodes"),s=gi(r,"parentNode");var X;"function"==typeof F&&(X=n.createElement("template")).content&&X.content.ownerDocument&&(n=X.content.ownerDocument);let g,c="",{implementation:K,createNodeIterator:Z,createDocumentFragment:Q,getElementsByTagName:J}=n,ee=P.importNode,f=un(),{MUSTACHE_EXPR:te,ERB_EXPR:re,TMPLIT_EXPR:ie,DATA_ATTR:ne,ARIA_ATTR:ae,IS_SCRIPT_OR_DATA:se,ATTR_WHITESPACE:oe,CUSTOM_ELEMENT:le}=(d.isSupported="function"==typeof mi&&"function"==typeof s&&K&&void 0!==K.createHTMLDocument,on),ce=on.IS_ALLOWED_URI,h=null,he=ui({},[...Fi,...zi,...qi,...Gi,...Wi]),m=null,ue=ui({},[...Yi,...Vi,...Hi,...Xi]),o=Object.seal(wi(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),u=null,de=null,l=Object.seal(wi(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),pe=!0,ge=!0,fe=!1,me=!0,y=!1,v=!0,b=!1,ye=!1,ve=!1,x=!1,T=!1,w=!1,be=!0,xe=!1,Te=!0,k=!1,i,E=null,we=ui({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),ke=null,Ee=ui({},["audio","video","img","source","image","track"]),_e=null,Se=ui({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),a="http://www.w3.org/1998/Math/MathML",_="http://www.w3.org/2000/svg",S="http://www.w3.org/1999/xhtml",C=S,Ce=!1,Ae=null,Re=ui({},[a,_,S],Ni),A=ui({},["mi","mo","mn","ms","mtext"]),R=ui({},["annotation-xml"]),Le=ui({},["title","style","font","a","script"]),L=null,Ne=["application/xhtml+xml","text/html"],N=null,I=null,Ie=n.createElement("form"),De=mt(function(e){return e instanceof RegExp||e instanceof Function},"isRegexOrFunction"),Me=mt(function(){var e=0"+e:(i=Ii(e,/^[\r\n\t ]+/),r=i&&i[0]),"application/xhtml+xml"===L&&C===S&&(e=''+e+"");var i=g?g.createHTML(e):e;if(C===S)try{t=(new j).parseFromString(i,L)}catch{}if(!t||!t.documentElement){t=K.createDocument(C,"template",null);try{t.documentElement.innerHTML=Ce?c:i}catch{}}return i=t.body||t.documentElement,e&&r&&i.insertBefore(n.createTextNode(r),i.childNodes[0]||null),C===S?J.call(t,b?"html":"body")[0]:b?t.documentElement:i},"_initDocument"),Fe=mt(function(e){return Z.call(e.ownerDocument||e,e,t.SHOW_ELEMENT|t.SHOW_COMMENT|t.SHOW_TEXT|t.SHOW_PROCESSING_INSTRUCTION|t.SHOW_CDATA_SECTION,null)},"_createNodeIterator"),ze=mt(function(e){return e instanceof G&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof U)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},"_isClobbered"),qe=mt(function(e){return"function"==typeof z&&e instanceof z},"_isNode");function O(e,t,r){_i(e,e=>{e.call(d,t,r,I)})}mt(O,"_executeHooks");let Ue=mt(function(t){let r=null;if(O(f.beforeSanitizeElements,t,null),!ze(t)){var e=N(t.nodeName);if(O(f.uponSanitizeElement,t,{tagName:e,allowedTags:h}),!(v&&t.hasChildNodes()&&!qe(t.firstElementChild)&&$i(/<[/\w!]/g,t.innerHTML)&&$i(/<[/\w!]/g,t.textContent)||t.nodeType===ln.progressingInstruction||v&&t.nodeType===ln.comment&&$i(/<[/\w]/g,t.data))){if(l.tagCheck instanceof Function&&l.tagCheck(e)||h[e]&&!u[e])return t instanceof q&&!$e(t)||("noscript"===e||"noembed"===e||"noframes"===e)&&$i(/<\/no(script|embed|frames)/i,t.innerHTML)?(D(t),!0):(y&&t.nodeType===ln.text&&(r=t.textContent,_i([te,re,ie],e=>{r=Di(r,e," ")}),t.textContent!==r)&&(Ai(d.removed,{element:t.cloneNode()}),t.textContent=r),O(f.afterSanitizeElements,t,null),!1);if(!u[e]&&je(e)&&(o.tagNameCheck instanceof RegExp&&$i(o.tagNameCheck,e)||o.tagNameCheck instanceof Function&&o.tagNameCheck(e)))return!1;if(Te&&!E[e]){var i=s(t)||t.parentNode,n=H(t)||t.childNodes;if(n&&i)for(let e=n.length-1;0<=e;--e){var a=W(n[e],!0);a.__removalCount=(t.__removalCount||0)+1,i.insertBefore(a,V(t))}}}}return D(t),!0},"_sanitizeElements"),Ge=mt(function(e,t,r){if(be&&("id"===t||"name"===t)&&(r in n||r in Ie))return!1;if((!ge||de[t]||!$i(ne,t))&&!(pe&&$i(ae,t)||l.attributeCheck instanceof Function&&l.attributeCheck(t,e)))if(!m[t]||de[t]){if(!(je(e)&&(o.tagNameCheck instanceof RegExp&&$i(o.tagNameCheck,e)||o.tagNameCheck instanceof Function&&o.tagNameCheck(e))&&(o.attributeNameCheck instanceof RegExp&&$i(o.attributeNameCheck,t)||o.attributeNameCheck instanceof Function&&o.attributeNameCheck(t,e))||"is"===t&&o.allowCustomizedBuiltInElements&&(o.tagNameCheck instanceof RegExp&&$i(o.tagNameCheck,r)||o.tagNameCheck instanceof Function&&o.tagNameCheck(r))))return!1}else if(!_e[t]&&!$i(ce,Di(r,oe,""))&&("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Mi(r,"data:")||!ke[e])&&(!fe||$i(se,Di(r,oe,"")))&&r)return!1;return!0},"_isValidAttribute"),je=mt(function(e){return"annotation-xml"!==e&&Ii(e,le)},"_isBasicCustomElement"),We=mt(function(c){O(f.beforeSanitizeAttributes,c,null);var h=c.attributes;if(h&&!ze(c)){let o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:m,forceKeepAttr:void 0},l=h.length;for(;l--;){let e=h[l],{name:t,namespaceURI:r,value:i}=e,n=N(t),a=i,s="value"===t?a:Oi(a);if(o.attrName=n,o.attrValue=s,o.keepAttr=!0,o.forceKeepAttr=void 0,O(f.uponSanitizeAttribute,c,o),s=o.attrValue,!xe||"id"!==n&&"name"!==n||(M(t,c),s="user-content-"+s),v&&$i(/((--!?|])>)|<\/(style|title|textarea)/i,s))M(t,c);else if("attributename"===n&&Ii(s,"href"))M(t,c);else if(!o.forceKeepAttr)if(o.keepAttr)if(!me&&$i(/\/>/i,s))M(t,c);else{y&&_i([te,re,ie],e=>{s=Di(s,e," ")});var u=N(c.nodeName);if(Ge(u,n,s)){if(g&&"object"==typeof p&&"function"==typeof p.getAttributeType&&!r)switch(p.getAttributeType(u,n)){case"TrustedHTML":s=g.createHTML(s);break;case"TrustedScriptURL":s=g.createScriptURL(s)}if(s!==a)try{r?c.setAttributeNS(r,t,s):c.setAttribute(t,s),ze(c)?D(c):Ci(d.removed)}catch{M(t,c)}}else M(t,c)}else M(t,c)}O(f.afterSanitizeAttributes,c,null)}},"_sanitizeAttributes"),Ye=mt(function e(t){var r,i=Fe(t);for(O(f.beforeSanitizeShadowDOM,t,null);r=i.nextNode();)O(f.uponSanitizeShadowNode,r,null),Ue(r),We(r),r.content instanceof B&&e(r.content);O(f.afterSanitizeShadowDOM,t,null)},"_sanitizeShadowDOM");return d.sanitize=function(e){let t=1 `+l),y&&_i([te,re,ie],e=>{l=Di(l,e," ")}),g&&w?g.createHTML(l):l},d.setConfig=function(){var e=0{({entries:mi,setPrototypeOf:yi,isFrozen:vi,getPrototypeOf:bi,getOwnPropertyDescriptor:xi}=Object),{freeze:Ti,seal:sn,create:wi}=Object,{apply:ki,construct:Ei}=typeof Reflect<"u"&&Reflect,Ti=Ti||mt(function(e){return e},"freeze"),sn=sn||mt(function(e){return e},"seal"),ki=ki||mt(function(e,t){for(var r=arguments.length,i=new Array(2/gm),Qi=sn(/\$\{[\w\W]*/gm),Ji=sn(/^data-[\-\w.\u00B7-\uFFFF]+$/),en=sn(/^aria-[\-\w]+$/),tn=sn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),rn=sn(/^(?:\w+script|data):/i),nn=sn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),an=sn(/^html$/i),sn=sn(/^[a-z][.\w]*(-[.\w]+)+$/i),on=Object.freeze({__proto__:null,ARIA_ATTR:en,ATTR_WHITESPACE:nn,CUSTOM_ELEMENT:sn,DATA_ATTR:Ji,DOCTYPE_NAME:an,ERB_EXPR:Zi,IS_ALLOWED_URI:tn,IS_SCRIPT_OR_DATA:rn,MUSTACHE_EXPR:Ki,TMPLIT_EXPR:Qi}),ln={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},cn=mt(function(){return"u"Hn[e])}function mn(e){if(e.default)return e.default;if(e=e.type,"string"!=typeof(e=Array.isArray(e)?e[0]:e))return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}function yn(e){for(var t=0;t=n[0]&&e<=n[1])return r.name}return null}function vn(e){for(var t=0;t but got "+String(e)+".")}function t(e,t,r,i,n,a){Ka[e][n]={font:t,group:r,replace:i},a&&i&&(Ka[e][i]=Ka[e][n])}function o(e){for(var{type:e,names:t,props:r,handler:i,htmlBuilder:n,mathmlBuilder:a}=e,s={type:e,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:i},o=0;oAV".indexOf(c)))throw new X('Expected one of "<>AV=|." after @',s[l]);for(var u=0;u<2;u++){for(var d=!0,p=l+1;p{for(var r in t)I(e,r,{get:t[r],enumerable:!0})})(gn,{ParseError:()=>X,SETTINGS_SCHEMA:()=>Jn,__defineFunction:()=>o,__defineMacro:()=>l,__defineSymbol:()=>t,__domTree:()=>ac,__parse:()=>ec,__renderToDomTree:()=>rc,__renderToHTMLTree:()=>ic,__setFontMetrics:()=>bn,default:()=>sc,render:()=>Ql,renderToString:()=>Jl,version:()=>nc});var Wn,Yn,X,Vn,Hn,Xn,Kn,Zn,Qn,Jn,ea,ta,ra,ia,na,aa,sa,oa,la,ca,ha,ua,da,pa,ga,fa,ma,ya,va,ba,xa,Ta,wa,ka,Ea,_a,Sa,Ca,Aa,Ra,La,Na,Ia,Da,Ma,K,Oa,Pa,$a,Ba,Fa,za,qa,Ua,Ga,ja,Wa,Ya,Va,Ha,Xa,Ka,h,u,d,Za,p,Qa,Ja,es,ts,rs,is,ns,as,ss,os,ls,cs,hs,us,ds,ps,gs,fs,ms,ys,vs,bs,xs,Ts,ws,ks,Es,_s,Ss,Cs,As,Rs,Ls,Z,Ns,Is,Ds,Ms,Os,Ps,$s,Bs,Fs,zs,qs,Us,Gs,js,Ws,Ys,Vs,Hs,Xs,Ks,Zs,E,Qs,Js,eo,to,ro,io,no,ao,so,oo,lo,co,ho,uo,po,go,fo,mo,yo,vo,bo,xo,To,wo,ko,Eo,_o,So,Co,Ao,Ro,Lo,No,Io,Do,Mo,Oo,Po,$o,Bo,Fo,zo,qo,Uo,Go,jo,Wo,Yo,Vo,Ho,Xo,Ko,Zo,Qo,Jo,el,tl,rl,g,il,nl,al,sl,ol,ll,cl,f,hl,ul,dl,pl,gl,fl,ml,yl,vl,bl,xl,Tl,wl,kl,El,_l,Sl,Cl,Al,Rl,Ll,Nl,Il,Dl,m,Ml,Ol,Pl,$l,Bl,Fl,zl,ql,Ul,Gl,jl,Wl,Yl,Vl,Hl,Xl,Kl,Zl,Ql,Jl,ec,tc,rc,ic,nc,ac,sc,oc=s(()=>{for(Wn=class r{static{mt(this,"SourceLocation")}constructor(e,t,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=r}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new r(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}},Yn=class i{static{mt(this,"Token")}constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new i(t,Wn.range(this,e))}},(X=class s{static{mt(this,"ParseError")}constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r,i,n,a="KaTeX parse error: "+e;return(t=t&&t.loc)&&t.start<=t.end&&(r=t.lexer.input,i=t.start,n=t.end,i===r.length?a+=" at end of input: ":a+=" at position "+(i+1)+": ",t=r.slice(i,n).replace(/[^]/g,"$&̲"),a+=(15":">","<":"<",'"':""","'":"'"},Xn=/[&><"']/g,mt(fn,"escape"),Kn=mt(function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},"getBaseElem"),Gl=mt(function(e){return"mathord"===(e=Kn(e)).type||"textord"===e.type||"atom"===e.type},"isCharacterBox"),Zn=mt(function(e){if(e)return e;throw new Error("Expected non-null, but got "+String(e))},"assert"),g=mt(function(e){return(e=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e))?":"===e[2]&&/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?e[1].toLowerCase():null:"_relative"},"protocolFromUrl"),Qn={deflt:fl,escape:fn,hyphenate:f,getBaseElem:Kn,isCharacterBox:Gl,protocolFromUrl:g},Jn={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:mt(e=>"#"+e,"cliProcessor")},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:mt((e,t)=>(t.push(e),t),"cliProcessor")},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:mt(e=>Math.max(0,e),"processor"),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:mt(e=>Math.max(0,e),"processor"),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:mt(e=>Math.max(0,e),"processor"),cli:"-e, --max-expand ",cliProcessor:mt(e=>"Infinity"===e?1/0:parseInt(e),"cliProcessor")},globalGroup:{type:"boolean",cli:!1}},mt(mn,"getDefaultValue"),ea=class{static{mt(this,"Settings")}constructor(e){for(var t in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},Jn){var r;Jn.hasOwnProperty(t)&&(r=Jn[t],this[t]=void 0!==e[t]?r.processor?r.processor(e[t]):e[t]:mn(r))}}reportNonstrict(e,t,r){var i=this.strict;if((i="function"==typeof i?i(e,t,r):i)&&"ignore"!==i){if(!0===i||"error"===i)throw new X("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",r);"warn"===i?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+i+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,r){var i=this.strict;if("function"==typeof i)try{i=i(e,t,r)}catch{i="error"}return!(!i||"ignore"===i||!0!==i&&"error"!==i&&("warn"===i?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+i+"': "+t+" ["+e+"]"),1))}isTrusted(e){if(e.url&&!e.protocol){var t=Qn.protocolFromUrl(e.url);if(null==t)return!1;e.protocol=t}return!!("function"==typeof this.trust?this.trust(e):this.trust)}},fl=class{static{mt(this,"Style")}constructor(e,t,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=r}sup(){return ta[ra[this.id]]}sub(){return ta[ia[this.id]]}fracNum(){return ta[na[this.id]]}fracDen(){return ta[aa[this.id]]}cramp(){return ta[sa[this.id]]}text(){return ta[oa[this.id]]}isTight(){return 2<=this.size}},ta=[new fl(0,0,!1),new fl(1,0,!0),new fl(2,1,!1),new fl(3,1,!0),new fl(4,2,!1),new fl(5,2,!0),new fl(6,3,!1),new fl(7,3,!0)],ra=[4,5,4,5,6,7,6,7],ia=[5,5,5,5,7,7,7,7],na=[2,3,4,5,6,7,6,7],aa=[3,3,5,5,7,7,7,7],sa=[1,1,3,3,5,5,7,7],oa=[0,1,2,3,2,3,2,3],la={DISPLAY:ta[0],TEXT:ta[2],SCRIPT:ta[4],SCRIPTSCRIPT:ta[6]},ca=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}],mt(yn,"scriptFromCodepoint"),ha=[],ca.forEach(e=>e.blocks.forEach(e=>ha.push(...e))),mt(vn,"supportedCodepoint"),ua=mt(function(e,t){return"M95,"+(622+e+t)+` 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`+e/2.075+" -"+e+` c5.3,-9.3,12,-14,20,-14 H400000v`+(40+e)+`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+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},"sqrtMain"),da=mt(function(e,t){return"M263,"+(601+e+t)+`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`+e/2.084+" -"+e+` c4.7,-7.3,11,-11,19,-11 H40000v`+(40+e)+`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+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},"sqrtSize1"),pa=mt(function(e,t){return"M983 "+(10+e+t)+` l`+e/3.13+" -"+e+` c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+` 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+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},"sqrtSize2"),ga=mt(function(e,t){return"M424,"+(2398+e+t)+` 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`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000 v`+(40+e)+`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+e)+" "+t+` h400000v`+(40+e)+"h-400000z"},"sqrtSize3"),fa=mt(function(e,t){return"M473,"+(2713+e+t)+` c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+` c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`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+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"},"sqrtSize4"),ma=mt(function(e){return"M400000 "+e+" H0 L"+e/2+" 0 l65 45 L145 "+(e-80)+" H400000z"},"phasePath"),ya=mt(function(e,t,r){return"M702 "+(e+t)+"H400000"+(40+e)+` H742v`+(r-54-t-e)+`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 `+t+"H400000v"+(40+e)+"H742z"},"sqrtTall"),va=mt(function(e,t,r){t*=1e3;var i="";switch(e){case"sqrtMain":i=ua(t,80);break;case"sqrtSize1":i=da(t,80);break;case"sqrtSize2":i=pa(t,80);break;case"sqrtSize3":i=ga(t,80);break;case"sqrtSize4":i=fa(t,80);break;case"sqrtTall":i=ya(t,80,r)}return i},"sqrtPath"),ba=mt(function(e,t){switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"∣":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}},"innerPath"),xa={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`},Ta=mt(function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v1759 h347 v-84 H403z M403 1759 V0 H319 V1759 v`+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v1759 H0 v84 H347z M347 1759 V0 H263 V1759 v`+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+` v1715 h263 v84 H319z MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+` v1799 H0 v-84 H319z MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v602 h84z M403 1759 V0 H319 V1759 v`+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v602 h84z M347 1759 V0 h-84 V1759 v`+t+" 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,`+(t+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,-`+(t+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,`+(t+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,-`+(t+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"),wa=class{static{mt(this,"DocumentFragment")}constructor(e){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=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;te.toText(),"toText");return this.children.map(e).join("")}},ka={"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,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Ea={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},_a={"Å":"A","Ð":"D","Þ":"o","å":"a","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"},mt(bn,"setFontMetrics"),mt(xn,"getCharacterMetrics"),Sa={},mt(Tn,"getGlobalMetrics"),Ca=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Aa=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Ra=mt(function(e,t){return t.size<2?e:Ca[e-1][t.size-1]},"sizeAtStyle"),(La=class n{static{mt(this,"Options")}constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||n.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=Aa[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t,r={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return new n(r)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Ra(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:Aa[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=Ra(n.BASESIZE,e);return this.size===t&&this.textSize===n.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==n.BASESIZE?["sizing","reset-size"+this.size,"size"+n.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Tn(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}).BASESIZE=6,Na={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},Ia={ex:!0,em:!0,mu:!0},Da=mt(function(e){return(e="string"!=typeof e?e.unit:e)in Na||e in Ia||"ex"===e},"validUnit"),Ma=mt(function(e,t){var r;if(e.unit in Na)r=Na[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)r=t.fontMetrics().cssEmPerMu;else{var i=t.style.isTight()?t.havingStyle(t.style.text()):t;if("ex"===e.unit)r=i.fontMetrics().xHeight;else{if("em"!==e.unit)throw new X("Invalid unit: '"+e.unit+"'");r=i.fontMetrics().quad}i!==t&&(r*=i.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*r,t.maxSize)},"calculateSize"),K=mt(function(e){return+e.toFixed(4)+"em"},"makeEm"),Oa=mt(function(e){return e.filter(e=>e).join(" ")},"createClass"),Pa=mt(function(e,t,r){this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t&&(t.style.isTight()&&this.classes.push("mtight"),e=t.getColor())&&(this.style.color=e)},"initNode"),$a=mt(function(e){var t,r,i=document.createElement(e);for(t in i.className=Oa(this.classes),this.style)this.style.hasOwnProperty(t)&&(i.style[t]=this.style[t]);for(r in this.attributes)this.attributes.hasOwnProperty(r)&&i.setAttribute(r,this.attributes[r]);for(var n=0;n/=\x00-\x1f]/,Fa=mt(function(e){var t,r,i="<"+e,n=(this.classes.length&&(i+=' class="'+Qn.escape(Oa(this.classes))+'"'),"");for(t in this.style)this.style.hasOwnProperty(t)&&(n+=Qn.hyphenate(t)+":"+this.style[t]+";");for(r in n&&(i+=' style="'+Qn.escape(n)+'"'),this.attributes)if(this.attributes.hasOwnProperty(r)){if(Ba.test(r))throw new X("Invalid attribute name '"+r+"'");i+=" "+r+'="'+Qn.escape(this.attributes[r])+'"'}i+=">";for(var a=0;a"},"toMarkup"),za=class{static{mt(this,"Span")}constructor(e,t,r,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,Pa.call(this,e,r,i),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return $a.call(this,"span")}toMarkup(){return Fa.call(this,"span")}},qa=class{static{mt(this,"Anchor")}constructor(e,t,r,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,Pa.call(this,t,i),this.children=r||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return $a.call(this,"a")}toMarkup(){return Fa.call(this,"a")}},Ua=class{static{mt(this,"Img")}constructor(e,t,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=r}hasClass(e){return this.classes.includes(e)}toNode(){var e,t=document.createElement("img");for(e in t.src=this.src,t.alt=this.alt,t.className="mord",this.style)this.style.hasOwnProperty(e)&&(t.style[e]=this.style[e]);return t}toMarkup(){var e,t=''+Qn.escape(this.alt)+'"}},Ga={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"},ja=class{static{mt(this,"SymbolNode")}constructor(e,t,r,i,n,a,s,o){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=r||0,this.italic=i||0,this.skew=n||0,this.width=a||0,this.classes=s||[],this.style=o||{},this.maxFontSize=0,(e=yn(this.text.charCodeAt(0)))&&this.classes.push(e+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=Ga[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e,t=document.createTextNode(this.text),r=null;for(e in 0":n}},Wa=class{static{mt(this,"SvgNode")}constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e,t=document.createElementNS("http://www.w3.org/2000/svg","svg");for(e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);for(var r=0;r"}},Ya=class{static{mt(this,"PathNode")}constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",xa[this.pathName]),e}toMarkup(){return this.alternate?'':''}},Va=class{static{mt(this,"LineNode")}constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e,t=document.createElementNS("http://www.w3.org/2000/svg","line");for(e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);return t}toMarkup(){var e,t=""}},mt(wn,"assertSymbolDomNode"),mt(kn,"assertSpan"),Ha={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Xa={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Ka={math:{},text:{}},mt(t,"defineSymbol"),u="text",f="ams",Gl="accent-token",g="bin",fl="close",Tl="inner",Za="mathord",Ul="op-token",sl="open",bl="punct",al="spacing",p="textord",t(h="math",d="main",m="rel","≡","\\equiv",!0),t(h,d,m,"≺","\\prec",!0),t(h,d,m,"≻","\\succ",!0),t(h,d,m,"∼","\\sim",!0),t(h,d,m,"⊥","\\perp"),t(h,d,m,"⪯","\\preceq",!0),t(h,d,m,"⪰","\\succeq",!0),t(h,d,m,"≃","\\simeq",!0),t(h,d,m,"∣","\\mid",!0),t(h,d,m,"≪","\\ll",!0),t(h,d,m,"≫","\\gg",!0),t(h,d,m,"≍","\\asymp",!0),t(h,d,m,"∥","\\parallel"),t(h,d,m,"⋈","\\bowtie",!0),t(h,d,m,"⌣","\\smile",!0),t(h,d,m,"⊑","\\sqsubseteq",!0),t(h,d,m,"⊒","\\sqsupseteq",!0),t(h,d,m,"≐","\\doteq",!0),t(h,d,m,"⌢","\\frown",!0),t(h,d,m,"∋","\\ni",!0),t(h,d,m,"∝","\\propto",!0),t(h,d,m,"⊢","\\vdash",!0),t(h,d,m,"⊣","\\dashv",!0),t(h,d,m,"∋","\\owns"),t(h,d,bl,".","\\ldotp"),t(h,d,bl,"⋅","\\cdotp"),t(h,d,p,"#","\\#"),t(u,d,p,"#","\\#"),t(h,d,p,"&","\\&"),t(u,d,p,"&","\\&"),t(h,d,p,"ℵ","\\aleph",!0),t(h,d,p,"∀","\\forall",!0),t(h,d,p,"ℏ","\\hbar",!0),t(h,d,p,"∃","\\exists",!0),t(h,d,p,"∇","\\nabla",!0),t(h,d,p,"♭","\\flat",!0),t(h,d,p,"ℓ","\\ell",!0),t(h,d,p,"♮","\\natural",!0),t(h,d,p,"♣","\\clubsuit",!0),t(h,d,p,"℘","\\wp",!0),t(h,d,p,"♯","\\sharp",!0),t(h,d,p,"♢","\\diamondsuit",!0),t(h,d,p,"ℜ","\\Re",!0),t(h,d,p,"♡","\\heartsuit",!0),t(h,d,p,"ℑ","\\Im",!0),t(h,d,p,"♠","\\spadesuit",!0),t(h,d,p,"§","\\S",!0),t(u,d,p,"§","\\S"),t(h,d,p,"¶","\\P",!0),t(u,d,p,"¶","\\P"),t(h,d,p,"†","\\dag"),t(u,d,p,"†","\\dag"),t(u,d,p,"†","\\textdagger"),t(h,d,p,"‡","\\ddag"),t(u,d,p,"‡","\\ddag"),t(u,d,p,"‡","\\textdaggerdbl"),t(h,d,fl,"⎱","\\rmoustache",!0),t(h,d,sl,"⎰","\\lmoustache",!0),t(h,d,fl,"⟯","\\rgroup",!0),t(h,d,sl,"⟮","\\lgroup",!0),t(h,d,g,"∓","\\mp",!0),t(h,d,g,"⊖","\\ominus",!0),t(h,d,g,"⊎","\\uplus",!0),t(h,d,g,"⊓","\\sqcap",!0),t(h,d,g,"∗","\\ast"),t(h,d,g,"⊔","\\sqcup",!0),t(h,d,g,"◯","\\bigcirc",!0),t(h,d,g,"∙","\\bullet",!0),t(h,d,g,"‡","\\ddagger"),t(h,d,g,"≀","\\wr",!0),t(h,d,g,"⨿","\\amalg"),t(h,d,g,"&","\\And"),t(h,d,m,"⟵","\\longleftarrow",!0),t(h,d,m,"⇐","\\Leftarrow",!0),t(h,d,m,"⟸","\\Longleftarrow",!0),t(h,d,m,"⟶","\\longrightarrow",!0),t(h,d,m,"⇒","\\Rightarrow",!0),t(h,d,m,"⟹","\\Longrightarrow",!0),t(h,d,m,"↔","\\leftrightarrow",!0),t(h,d,m,"⟷","\\longleftrightarrow",!0),t(h,d,m,"⇔","\\Leftrightarrow",!0),t(h,d,m,"⟺","\\Longleftrightarrow",!0),t(h,d,m,"↦","\\mapsto",!0),t(h,d,m,"⟼","\\longmapsto",!0),t(h,d,m,"↗","\\nearrow",!0),t(h,d,m,"↩","\\hookleftarrow",!0),t(h,d,m,"↪","\\hookrightarrow",!0),t(h,d,m,"↘","\\searrow",!0),t(h,d,m,"↼","\\leftharpoonup",!0),t(h,d,m,"⇀","\\rightharpoonup",!0),t(h,d,m,"↙","\\swarrow",!0),t(h,d,m,"↽","\\leftharpoondown",!0),t(h,d,m,"⇁","\\rightharpoondown",!0),t(h,d,m,"↖","\\nwarrow",!0),t(h,d,m,"⇌","\\rightleftharpoons",!0),t(h,f,m,"≮","\\nless",!0),t(h,f,m,"","\\@nleqslant"),t(h,f,m,"","\\@nleqq"),t(h,f,m,"⪇","\\lneq",!0),t(h,f,m,"≨","\\lneqq",!0),t(h,f,m,"","\\@lvertneqq"),t(h,f,m,"⋦","\\lnsim",!0),t(h,f,m,"⪉","\\lnapprox",!0),t(h,f,m,"⊀","\\nprec",!0),t(h,f,m,"⋠","\\npreceq",!0),t(h,f,m,"⋨","\\precnsim",!0),t(h,f,m,"⪹","\\precnapprox",!0),t(h,f,m,"≁","\\nsim",!0),t(h,f,m,"","\\@nshortmid"),t(h,f,m,"∤","\\nmid",!0),t(h,f,m,"⊬","\\nvdash",!0),t(h,f,m,"⊭","\\nvDash",!0),t(h,f,m,"⋪","\\ntriangleleft"),t(h,f,m,"⋬","\\ntrianglelefteq",!0),t(h,f,m,"⊊","\\subsetneq",!0),t(h,f,m,"","\\@varsubsetneq"),t(h,f,m,"⫋","\\subsetneqq",!0),t(h,f,m,"","\\@varsubsetneqq"),t(h,f,m,"≯","\\ngtr",!0),t(h,f,m,"","\\@ngeqslant"),t(h,f,m,"","\\@ngeqq"),t(h,f,m,"⪈","\\gneq",!0),t(h,f,m,"≩","\\gneqq",!0),t(h,f,m,"","\\@gvertneqq"),t(h,f,m,"⋧","\\gnsim",!0),t(h,f,m,"⪊","\\gnapprox",!0),t(h,f,m,"⊁","\\nsucc",!0),t(h,f,m,"⋡","\\nsucceq",!0),t(h,f,m,"⋩","\\succnsim",!0),t(h,f,m,"⪺","\\succnapprox",!0),t(h,f,m,"≆","\\ncong",!0),t(h,f,m,"","\\@nshortparallel"),t(h,f,m,"∦","\\nparallel",!0),t(h,f,m,"⊯","\\nVDash",!0),t(h,f,m,"⋫","\\ntriangleright"),t(h,f,m,"⋭","\\ntrianglerighteq",!0),t(h,f,m,"","\\@nsupseteqq"),t(h,f,m,"⊋","\\supsetneq",!0),t(h,f,m,"","\\@varsupsetneq"),t(h,f,m,"⫌","\\supsetneqq",!0),t(h,f,m,"","\\@varsupsetneqq"),t(h,f,m,"⊮","\\nVdash",!0),t(h,f,m,"⪵","\\precneqq",!0),t(h,f,m,"⪶","\\succneqq",!0),t(h,f,m,"","\\@nsubseteqq"),t(h,f,g,"⊴","\\unlhd"),t(h,f,g,"⊵","\\unrhd"),t(h,f,m,"↚","\\nleftarrow",!0),t(h,f,m,"↛","\\nrightarrow",!0),t(h,f,m,"⇍","\\nLeftarrow",!0),t(h,f,m,"⇏","\\nRightarrow",!0),t(h,f,m,"↮","\\nleftrightarrow",!0),t(h,f,m,"⇎","\\nLeftrightarrow",!0),t(h,f,m,"△","\\vartriangle"),t(h,f,p,"ℏ","\\hslash"),t(h,f,p,"▽","\\triangledown"),t(h,f,p,"◊","\\lozenge"),t(h,f,p,"Ⓢ","\\circledS"),t(h,f,p,"®","\\circledR"),t(u,f,p,"®","\\circledR"),t(h,f,p,"∡","\\measuredangle",!0),t(h,f,p,"∄","\\nexists"),t(h,f,p,"℧","\\mho"),t(h,f,p,"Ⅎ","\\Finv",!0),t(h,f,p,"⅁","\\Game",!0),t(h,f,p,"‵","\\backprime"),t(h,f,p,"▲","\\blacktriangle"),t(h,f,p,"▼","\\blacktriangledown"),t(h,f,p,"■","\\blacksquare"),t(h,f,p,"⧫","\\blacklozenge"),t(h,f,p,"★","\\bigstar"),t(h,f,p,"∢","\\sphericalangle",!0),t(h,f,p,"∁","\\complement",!0),t(h,f,p,"ð","\\eth",!0),t(u,d,p,"ð","ð"),t(h,f,p,"╱","\\diagup"),t(h,f,p,"╲","\\diagdown"),t(h,f,p,"□","\\square"),t(h,f,p,"□","\\Box"),t(h,f,p,"◊","\\Diamond"),t(h,f,p,"¥","\\yen",!0),t(u,f,p,"¥","\\yen",!0),t(h,f,p,"✓","\\checkmark",!0),t(u,f,p,"✓","\\checkmark"),t(h,f,p,"ℶ","\\beth",!0),t(h,f,p,"ℸ","\\daleth",!0),t(h,f,p,"ℷ","\\gimel",!0),t(h,f,p,"ϝ","\\digamma",!0),t(h,f,p,"ϰ","\\varkappa"),t(h,f,sl,"┌","\\@ulcorner",!0),t(h,f,fl,"┐","\\@urcorner",!0),t(h,f,sl,"└","\\@llcorner",!0),t(h,f,fl,"┘","\\@lrcorner",!0),t(h,f,m,"≦","\\leqq",!0),t(h,f,m,"⩽","\\leqslant",!0),t(h,f,m,"⪕","\\eqslantless",!0),t(h,f,m,"≲","\\lesssim",!0),t(h,f,m,"⪅","\\lessapprox",!0),t(h,f,m,"≊","\\approxeq",!0),t(h,f,g,"⋖","\\lessdot"),t(h,f,m,"⋘","\\lll",!0),t(h,f,m,"≶","\\lessgtr",!0),t(h,f,m,"⋚","\\lesseqgtr",!0),t(h,f,m,"⪋","\\lesseqqgtr",!0),t(h,f,m,"≑","\\doteqdot"),t(h,f,m,"≓","\\risingdotseq",!0),t(h,f,m,"≒","\\fallingdotseq",!0),t(h,f,m,"∽","\\backsim",!0),t(h,f,m,"⋍","\\backsimeq",!0),t(h,f,m,"⫅","\\subseteqq",!0),t(h,f,m,"⋐","\\Subset",!0),t(h,f,m,"⊏","\\sqsubset",!0),t(h,f,m,"≼","\\preccurlyeq",!0),t(h,f,m,"⋞","\\curlyeqprec",!0),t(h,f,m,"≾","\\precsim",!0),t(h,f,m,"⪷","\\precapprox",!0),t(h,f,m,"⊲","\\vartriangleleft"),t(h,f,m,"⊴","\\trianglelefteq"),t(h,f,m,"⊨","\\vDash",!0),t(h,f,m,"⊪","\\Vvdash",!0),t(h,f,m,"⌣","\\smallsmile"),t(h,f,m,"⌢","\\smallfrown"),t(h,f,m,"≏","\\bumpeq",!0),t(h,f,m,"≎","\\Bumpeq",!0),t(h,f,m,"≧","\\geqq",!0),t(h,f,m,"⩾","\\geqslant",!0),t(h,f,m,"⪖","\\eqslantgtr",!0),t(h,f,m,"≳","\\gtrsim",!0),t(h,f,m,"⪆","\\gtrapprox",!0),t(h,f,g,"⋗","\\gtrdot"),t(h,f,m,"⋙","\\ggg",!0),t(h,f,m,"≷","\\gtrless",!0),t(h,f,m,"⋛","\\gtreqless",!0),t(h,f,m,"⪌","\\gtreqqless",!0),t(h,f,m,"≖","\\eqcirc",!0),t(h,f,m,"≗","\\circeq",!0),t(h,f,m,"≜","\\triangleq",!0),t(h,f,m,"∼","\\thicksim"),t(h,f,m,"≈","\\thickapprox"),t(h,f,m,"⫆","\\supseteqq",!0),t(h,f,m,"⋑","\\Supset",!0),t(h,f,m,"⊐","\\sqsupset",!0),t(h,f,m,"≽","\\succcurlyeq",!0),t(h,f,m,"⋟","\\curlyeqsucc",!0),t(h,f,m,"≿","\\succsim",!0),t(h,f,m,"⪸","\\succapprox",!0),t(h,f,m,"⊳","\\vartriangleright"),t(h,f,m,"⊵","\\trianglerighteq"),t(h,f,m,"⊩","\\Vdash",!0),t(h,f,m,"∣","\\shortmid"),t(h,f,m,"∥","\\shortparallel"),t(h,f,m,"≬","\\between",!0),t(h,f,m,"⋔","\\pitchfork",!0),t(h,f,m,"∝","\\varpropto"),t(h,f,m,"◀","\\blacktriangleleft"),t(h,f,m,"∴","\\therefore",!0),t(h,f,m,"∍","\\backepsilon"),t(h,f,m,"▶","\\blacktriangleright"),t(h,f,m,"∵","\\because",!0),t(h,f,m,"⋘","\\llless"),t(h,f,m,"⋙","\\gggtr"),t(h,f,g,"⊲","\\lhd"),t(h,f,g,"⊳","\\rhd"),t(h,f,m,"≂","\\eqsim",!0),t(h,d,m,"⋈","\\Join"),t(h,f,m,"≑","\\Doteq",!0),t(h,f,g,"∔","\\dotplus",!0),t(h,f,g,"∖","\\smallsetminus"),t(h,f,g,"⋒","\\Cap",!0),t(h,f,g,"⋓","\\Cup",!0),t(h,f,g,"⩞","\\doublebarwedge",!0),t(h,f,g,"⊟","\\boxminus",!0),t(h,f,g,"⊞","\\boxplus",!0),t(h,f,g,"⋇","\\divideontimes",!0),t(h,f,g,"⋉","\\ltimes",!0),t(h,f,g,"⋊","\\rtimes",!0),t(h,f,g,"⋋","\\leftthreetimes",!0),t(h,f,g,"⋌","\\rightthreetimes",!0),t(h,f,g,"⋏","\\curlywedge",!0),t(h,f,g,"⋎","\\curlyvee",!0),t(h,f,g,"⊝","\\circleddash",!0),t(h,f,g,"⊛","\\circledast",!0),t(h,f,g,"⋅","\\centerdot"),t(h,f,g,"⊺","\\intercal",!0),t(h,f,g,"⋒","\\doublecap"),t(h,f,g,"⋓","\\doublecup"),t(h,f,g,"⊠","\\boxtimes",!0),t(h,f,m,"⇢","\\dashrightarrow",!0),t(h,f,m,"⇠","\\dashleftarrow",!0),t(h,f,m,"⇇","\\leftleftarrows",!0),t(h,f,m,"⇆","\\leftrightarrows",!0),t(h,f,m,"⇚","\\Lleftarrow",!0),t(h,f,m,"↞","\\twoheadleftarrow",!0),t(h,f,m,"↢","\\leftarrowtail",!0),t(h,f,m,"↫","\\looparrowleft",!0),t(h,f,m,"⇋","\\leftrightharpoons",!0),t(h,f,m,"↶","\\curvearrowleft",!0),t(h,f,m,"↺","\\circlearrowleft",!0),t(h,f,m,"↰","\\Lsh",!0),t(h,f,m,"⇈","\\upuparrows",!0),t(h,f,m,"↿","\\upharpoonleft",!0),t(h,f,m,"⇃","\\downharpoonleft",!0),t(h,d,m,"⊶","\\origof",!0),t(h,d,m,"⊷","\\imageof",!0),t(h,f,m,"⊸","\\multimap",!0),t(h,f,m,"↭","\\leftrightsquigarrow",!0),t(h,f,m,"⇉","\\rightrightarrows",!0),t(h,f,m,"⇄","\\rightleftarrows",!0),t(h,f,m,"↠","\\twoheadrightarrow",!0),t(h,f,m,"↣","\\rightarrowtail",!0),t(h,f,m,"↬","\\looparrowright",!0),t(h,f,m,"↷","\\curvearrowright",!0),t(h,f,m,"↻","\\circlearrowright",!0),t(h,f,m,"↱","\\Rsh",!0),t(h,f,m,"⇊","\\downdownarrows",!0),t(h,f,m,"↾","\\upharpoonright",!0),t(h,f,m,"⇂","\\downharpoonright",!0),t(h,f,m,"⇝","\\rightsquigarrow",!0),t(h,f,m,"⇝","\\leadsto"),t(h,f,m,"⇛","\\Rrightarrow",!0),t(h,f,m,"↾","\\restriction"),t(h,d,p,"‘","`"),t(h,d,p,"$","\\$"),t(u,d,p,"$","\\$"),t(u,d,p,"$","\\textdollar"),t(h,d,p,"%","\\%"),t(u,d,p,"%","\\%"),t(h,d,p,"_","\\_"),t(u,d,p,"_","\\_"),t(u,d,p,"_","\\textunderscore"),t(h,d,p,"∠","\\angle",!0),t(h,d,p,"∞","\\infty",!0),t(h,d,p,"′","\\prime"),t(h,d,p,"△","\\triangle"),t(h,d,p,"Γ","\\Gamma",!0),t(h,d,p,"Δ","\\Delta",!0),t(h,d,p,"Θ","\\Theta",!0),t(h,d,p,"Λ","\\Lambda",!0),t(h,d,p,"Ξ","\\Xi",!0),t(h,d,p,"Π","\\Pi",!0),t(h,d,p,"Σ","\\Sigma",!0),t(h,d,p,"Υ","\\Upsilon",!0),t(h,d,p,"Φ","\\Phi",!0),t(h,d,p,"Ψ","\\Psi",!0),t(h,d,p,"Ω","\\Omega",!0),t(h,d,p,"A","Α"),t(h,d,p,"B","Β"),t(h,d,p,"E","Ε"),t(h,d,p,"Z","Ζ"),t(h,d,p,"H","Η"),t(h,d,p,"I","Ι"),t(h,d,p,"K","Κ"),t(h,d,p,"M","Μ"),t(h,d,p,"N","Ν"),t(h,d,p,"O","Ο"),t(h,d,p,"P","Ρ"),t(h,d,p,"T","Τ"),t(h,d,p,"X","Χ"),t(h,d,p,"¬","\\neg",!0),t(h,d,p,"¬","\\lnot"),t(h,d,p,"⊤","\\top"),t(h,d,p,"⊥","\\bot"),t(h,d,p,"∅","\\emptyset"),t(h,f,p,"∅","\\varnothing"),t(h,d,Za,"α","\\alpha",!0),t(h,d,Za,"β","\\beta",!0),t(h,d,Za,"γ","\\gamma",!0),t(h,d,Za,"δ","\\delta",!0),t(h,d,Za,"ϵ","\\epsilon",!0),t(h,d,Za,"ζ","\\zeta",!0),t(h,d,Za,"η","\\eta",!0),t(h,d,Za,"θ","\\theta",!0),t(h,d,Za,"ι","\\iota",!0),t(h,d,Za,"κ","\\kappa",!0),t(h,d,Za,"λ","\\lambda",!0),t(h,d,Za,"μ","\\mu",!0),t(h,d,Za,"ν","\\nu",!0),t(h,d,Za,"ξ","\\xi",!0),t(h,d,Za,"ο","\\omicron",!0),t(h,d,Za,"π","\\pi",!0),t(h,d,Za,"ρ","\\rho",!0),t(h,d,Za,"σ","\\sigma",!0),t(h,d,Za,"τ","\\tau",!0),t(h,d,Za,"υ","\\upsilon",!0),t(h,d,Za,"ϕ","\\phi",!0),t(h,d,Za,"χ","\\chi",!0),t(h,d,Za,"ψ","\\psi",!0),t(h,d,Za,"ω","\\omega",!0),t(h,d,Za,"ε","\\varepsilon",!0),t(h,d,Za,"ϑ","\\vartheta",!0),t(h,d,Za,"ϖ","\\varpi",!0),t(h,d,Za,"ϱ","\\varrho",!0),t(h,d,Za,"ς","\\varsigma",!0),t(h,d,Za,"φ","\\varphi",!0),t(h,d,g,"∗","*",!0),t(h,d,g,"+","+"),t(h,d,g,"−","-",!0),t(h,d,g,"⋅","\\cdot",!0),t(h,d,g,"∘","\\circ",!0),t(h,d,g,"÷","\\div",!0),t(h,d,g,"±","\\pm",!0),t(h,d,g,"×","\\times",!0),t(h,d,g,"∩","\\cap",!0),t(h,d,g,"∪","\\cup",!0),t(h,d,g,"∖","\\setminus",!0),t(h,d,g,"∧","\\land"),t(h,d,g,"∨","\\lor"),t(h,d,g,"∧","\\wedge",!0),t(h,d,g,"∨","\\vee",!0),t(h,d,p,"√","\\surd"),t(h,d,sl,"⟨","\\langle",!0),t(h,d,sl,"∣","\\lvert"),t(h,d,sl,"∥","\\lVert"),t(h,d,fl,"?","?"),t(h,d,fl,"!","!"),t(h,d,fl,"⟩","\\rangle",!0),t(h,d,fl,"∣","\\rvert"),t(h,d,fl,"∥","\\rVert"),t(h,d,m,"=","="),t(h,d,m,":",":"),t(h,d,m,"≈","\\approx",!0),t(h,d,m,"≅","\\cong",!0),t(h,d,m,"≥","\\ge"),t(h,d,m,"≥","\\geq",!0),t(h,d,m,"←","\\gets"),t(h,d,m,">","\\gt",!0),t(h,d,m,"∈","\\in",!0),t(h,d,m,"","\\@not"),t(h,d,m,"⊂","\\subset",!0),t(h,d,m,"⊃","\\supset",!0),t(h,d,m,"⊆","\\subseteq",!0),t(h,d,m,"⊇","\\supseteq",!0),t(h,f,m,"⊈","\\nsubseteq",!0),t(h,f,m,"⊉","\\nsupseteq",!0),t(h,d,m,"⊨","\\models"),t(h,d,m,"←","\\leftarrow",!0),t(h,d,m,"≤","\\le"),t(h,d,m,"≤","\\leq",!0),t(h,d,m,"<","\\lt",!0),t(h,d,m,"→","\\rightarrow",!0),t(h,d,m,"→","\\to"),t(h,f,m,"≱","\\ngeq",!0),t(h,f,m,"≰","\\nleq",!0),t(h,d,al," ","\\ "),t(h,d,al," ","\\space"),t(h,d,al," ","\\nobreakspace"),t(u,d,al," ","\\ "),t(u,d,al," "," "),t(u,d,al," ","\\space"),t(u,d,al," ","\\nobreakspace"),t(h,d,al,null,"\\nobreak"),t(h,d,al,null,"\\allowbreak"),t(h,d,bl,",",","),t(h,d,bl,";",";"),t(h,f,g,"⊼","\\barwedge",!0),t(h,f,g,"⊻","\\veebar",!0),t(h,d,g,"⊙","\\odot",!0),t(h,d,g,"⊕","\\oplus",!0),t(h,d,g,"⊗","\\otimes",!0),t(h,d,p,"∂","\\partial",!0),t(h,d,g,"⊘","\\oslash",!0),t(h,f,g,"⊚","\\circledcirc",!0),t(h,f,g,"⊡","\\boxdot",!0),t(h,d,g,"△","\\bigtriangleup"),t(h,d,g,"▽","\\bigtriangledown"),t(h,d,g,"†","\\dagger"),t(h,d,g,"⋄","\\diamond"),t(h,d,g,"⋆","\\star"),t(h,d,g,"◃","\\triangleleft"),t(h,d,g,"▹","\\triangleright"),t(h,d,sl,"{","\\{"),t(u,d,p,"{","\\{"),t(u,d,p,"{","\\textbraceleft"),t(h,d,fl,"}","\\}"),t(u,d,p,"}","\\}"),t(u,d,p,"}","\\textbraceright"),t(h,d,sl,"{","\\lbrace"),t(h,d,fl,"}","\\rbrace"),t(h,d,sl,"[","\\lbrack",!0),t(u,d,p,"[","\\lbrack",!0),t(h,d,fl,"]","\\rbrack",!0),t(u,d,p,"]","\\rbrack",!0),t(h,d,sl,"(","\\lparen",!0),t(h,d,fl,")","\\rparen",!0),t(u,d,p,"<","\\textless",!0),t(u,d,p,">","\\textgreater",!0),t(h,d,sl,"⌊","\\lfloor",!0),t(h,d,fl,"⌋","\\rfloor",!0),t(h,d,sl,"⌈","\\lceil",!0),t(h,d,fl,"⌉","\\rceil",!0),t(h,d,p,"\\","\\backslash"),t(h,d,p,"∣","|"),t(h,d,p,"∣","\\vert"),t(u,d,p,"|","\\textbar",!0),t(h,d,p,"∥","\\|"),t(h,d,p,"∥","\\Vert"),t(u,d,p,"∥","\\textbardbl"),t(u,d,p,"~","\\textasciitilde"),t(u,d,p,"\\","\\textbackslash"),t(u,d,p,"^","\\textasciicircum"),t(h,d,m,"↑","\\uparrow",!0),t(h,d,m,"⇑","\\Uparrow",!0),t(h,d,m,"↓","\\downarrow",!0),t(h,d,m,"⇓","\\Downarrow",!0),t(h,d,m,"↕","\\updownarrow",!0),t(h,d,m,"⇕","\\Updownarrow",!0),t(h,d,Ul,"∐","\\coprod"),t(h,d,Ul,"⋁","\\bigvee"),t(h,d,Ul,"⋀","\\bigwedge"),t(h,d,Ul,"⨄","\\biguplus"),t(h,d,Ul,"⋂","\\bigcap"),t(h,d,Ul,"⋃","\\bigcup"),t(h,d,Ul,"∫","\\int"),t(h,d,Ul,"∫","\\intop"),t(h,d,Ul,"∬","\\iint"),t(h,d,Ul,"∭","\\iiint"),t(h,d,Ul,"∏","\\prod"),t(h,d,Ul,"∑","\\sum"),t(h,d,Ul,"⨂","\\bigotimes"),t(h,d,Ul,"⨁","\\bigoplus"),t(h,d,Ul,"⨀","\\bigodot"),t(h,d,Ul,"∮","\\oint"),t(h,d,Ul,"∯","\\oiint"),t(h,d,Ul,"∰","\\oiiint"),t(h,d,Ul,"⨆","\\bigsqcup"),t(h,d,Ul,"∫","\\smallint"),t(u,d,Tl,"…","\\textellipsis"),t(h,d,Tl,"…","\\mathellipsis"),t(u,d,Tl,"…","\\ldots",!0),t(h,d,Tl,"…","\\ldots",!0),t(h,d,Tl,"⋯","\\@cdots",!0),t(h,d,Tl,"⋱","\\ddots",!0),t(h,d,p,"⋮","\\varvdots"),t(u,d,p,"⋮","\\varvdots"),t(h,d,Gl,"ˊ","\\acute"),t(h,d,Gl,"ˋ","\\grave"),t(h,d,Gl,"¨","\\ddot"),t(h,d,Gl,"~","\\tilde"),t(h,d,Gl,"ˉ","\\bar"),t(h,d,Gl,"˘","\\breve"),t(h,d,Gl,"ˇ","\\check"),t(h,d,Gl,"^","\\hat"),t(h,d,Gl,"⃗","\\vec"),t(h,d,Gl,"˙","\\dot"),t(h,d,Gl,"˚","\\mathring"),t(h,d,Za,"","\\@imath"),t(h,d,Za,"","\\@jmath"),t(h,d,p,"ı","ı"),t(h,d,p,"ȷ","ȷ"),t(u,d,p,"ı","\\i",!0),t(u,d,p,"ȷ","\\j",!0),t(u,d,p,"ß","\\ss",!0),t(u,d,p,"æ","\\ae",!0),t(u,d,p,"œ","\\oe",!0),t(u,d,p,"ø","\\o",!0),t(u,d,p,"Æ","\\AE",!0),t(u,d,p,"Œ","\\OE",!0),t(u,d,p,"Ø","\\O",!0),t(u,d,Gl,"ˊ","\\'"),t(u,d,Gl,"ˋ","\\`"),t(u,d,Gl,"ˆ","\\^"),t(u,d,Gl,"˜","\\~"),t(u,d,Gl,"ˉ","\\="),t(u,d,Gl,"˘","\\u"),t(u,d,Gl,"˙","\\."),t(u,d,Gl,"¸","\\c"),t(u,d,Gl,"˚","\\r"),t(u,d,Gl,"ˇ","\\v"),t(u,d,Gl,"¨",'\\"'),t(u,d,Gl,"˝","\\H"),t(u,d,Gl,"◯","\\textcircled"),Qa={"--":!0,"---":!0,"``":!0,"''":!0},t(u,d,p,"–","--",!0),t(u,d,p,"–","\\textendash"),t(u,d,p,"—","---",!0),t(u,d,p,"—","\\textemdash"),t(u,d,p,"‘","`",!0),t(u,d,p,"‘","\\textquoteleft"),t(u,d,p,"’","'",!0),t(u,d,p,"’","\\textquoteright"),t(u,d,p,"“","``",!0),t(u,d,p,"“","\\textquotedblleft"),t(u,d,p,"”","''",!0),t(u,d,p,"”","\\textquotedblright"),t(h,d,p,"°","\\degree",!0),t(u,d,p,"°","\\degree"),t(u,d,p,"°","\\textdegree",!0),t(h,d,p,"£","\\pounds"),t(h,d,p,"£","\\mathsterling",!0),t(u,d,p,"£","\\pounds"),t(u,d,p,"£","\\textsterling",!0),t(h,f,p,"✠","\\maltese"),t(u,f,p,"✠","\\maltese"),Ja='0123456789/@."',ts=0;ts{if(Oa(e.classes)!==Oa(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){var r=e.classes[0];if("mbin"===r||"mord"===r)return!1}for(var i in e.style)if(e.style.hasOwnProperty(i)&&e.style[i]!==t.style[i])return!1;for(var n in t.style)if(t.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;return!0},"canCombine"),g=mt(e=>{for(var t=0;tt&&(t=a.height),rnew za(e,t,r,i),"makeSvgSpan"),sl=mt(function(e,t,r){return(e=Es([e],[],t)).height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),e.style.borderBottomWidth=K(e.height),e.maxFontSize=1,e},"makeLineSpan"),fl=mt(function(e,t,r,i){return e=new qa(e,t,r,i),ks(e),e},"makeAnchor"),Ss=mt(function(e){return e=new wa(e),ks(e),e},"makeFragment"),m=mt(function(e,t){return e instanceof wa?Es([],[e],t):e},"wrapFragment"),Cs=mt(function(e){if("individualShift"===e.positionType){for(var t=e.children,r=[t[0]],i=-t[0].shift-t[0].elem.depth,n=i,a=1;a{var r=Es(["mspace"],[],t),e=Ma(e,t);return r.style.marginRight=K(e),r},"makeGlue"),As=mt(function(e,t,r){var i="";switch(e){case"amsrm":i="AMS";break;case"textrm":i="Main";break;case"textsf":i="SansSerif";break;case"texttt":i="Typewriter";break;default:i=e}return i+"-"+("textbf"===t&&"textit"===r?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},"retrieveTextFontName"),Rs={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Ls={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Gl=mt(function(e,t){var[e,r,i]=Ls[e],e=new Ya(e),e=new Wa([e],{width:K(r),height:K(i),style:"width:"+K(r),viewBox:"0 0 "+1e3*r+" "+1e3*i,preserveAspectRatio:"xMinYMin"});return(e=_s(["overlay"],[e],t)).height=i,e.style.height=K(i),e.style.width=K(r),e},"staticSvg"),Z={fontMap:Rs,makeSymbol:xs,mathsym:al,makeSpan:Es,makeSvgSpan:_s,makeLineSpan:sl,makeAnchor:fl,makeFragment:Ss,wrapFragment:m,makeVList:Ul,makeOrd:bl,makeGlue:Tl,staticSvg:Gl,svgData:Ls,tryCombineChars:g},Ns={mord:{mop:f={number:3,unit:"mu"},mbin:al={number:4,unit:"mu"},mrel:sl={number:5,unit:"mu"},minner:f},mop:{mord:f,mop:f,mrel:sl,minner:f},mbin:{mord:al,mop:al,mopen:al,minner:al},mrel:{mord:sl,mop:sl,mopen:sl,minner:sl},mopen:{},mclose:{mop:f,mbin:al,mrel:sl,minner:f},mpunct:{mord:f,mop:f,mrel:sl,mopen:f,mclose:f,mpunct:f,minner:f},minner:{mord:f,mop:f,mbin:al,mrel:sl,mopen:f,mpunct:f,minner:f}},Is={mord:{mop:f},mop:{mord:f,mop:f},mbin:{},mrel:{},mopen:{},mclose:{mop:f},mpunct:{},minner:{mop:f}},Ds={},Ms={},Os={},mt(o,"defineFunction"),mt(En,"defineFunctionBuilders"),Ps=mt(function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},"normalizeArgument"),$s=mt(function(e){return"ordgroup"===e.type?e.body:[e]},"ordargument"),Bs=Z.makeSpan,Fs=["leftmost","mbin","mopen","mrel","mop","mpunct"],zs=["rightmost","mrel","mclose","mpunct"],qs={display:la.DISPLAY,text:la.TEXT,script:la.SCRIPT,scriptscript:la.SCRIPTSCRIPT},Us={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},Gs=mt(function(e,t,r,i){void 0===i&&(i=[null,null]);for(var n,a,s=[],o=0;o{var r=t.classes[0],i=e.classes[0];"mbin"===r&&zs.includes(i)?t.classes[0]="mord":"mbin"===i&&Fs.includes(r)&&(e.classes[0]="mord")},{node:a},i,r="root"===r),js(s,(e,t)=>{var t=Vs(t),r=Vs(e);if(e=t&&r?(e.hasClass("mtight")?Is:Ns)[t][r]:null)return Z.makeGlue(e,n)},{node:a},i,r)),s},"buildExpression"),js=mt(function e(r,t,i,n,a){n&&r.push(n);for(var s=0;se=>{r.splice(t+1,0,e),s++})(s))}n&&r.pop()},"traverseNonSpaceNodes"),Ws=mt(function(e){return e instanceof wa||e instanceof qa||e instanceof za&&e.hasClass("enclosing")?e:null},"checkPartialGroup"),Ys=mt(function e(t,r){var i=Ws(t);if(i&&(i=i.children).length){if("right"===r)return e(i[i.length-1],"right");if("left"===r)return e(i[0],"left")}return t},"getOutermostNode"),Vs=mt(function(e,t){return e&&(t&&(e=Ys(e,t)),Us[e.classes[0]])||null},"getTypeOfDomTree"),Hs=mt(function(e,t){return e=["nulldelimiter"].concat(e.baseSizingClasses()),Bs(t.concat(e))},"makeNullDelimiter"),Xs=mt(function(e,t,r){if(!e)return Bs();var i;if(Ms[e.type])return i=Ms[e.type](e,t),r&&t.size!==r.size&&(i=Bs(t.sizingClasses(r),[i],t),t=t.sizeMultiplier/r.sizeMultiplier,i.height*=t,i.depth*=t),i;throw new X("Got group of unknown type: '"+e.type+"'")},"buildGroup"),mt(_n,"buildHTMLUnbreakable"),mt(Sn,"buildHTML"),mt(Cn,"newDocumentFragment"),Ks=class{static{mt(this,"MathNode")}constructor(e,t,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=r||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e,t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);0"}toText(){return this.children.map(e=>e.toText()).join("")}},Zs=class{static{mt(this,"TextNode")}constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Qn.escape(this.toText())}toText(){return this.text}},fl=class{static{mt(this,"SpaceNode")}constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=.05555<=e&&e<=.05556?" ":.1666<=e&&e<=.1667?" ":.2222<=e&&e<=.2223?" ":.2777<=e&&e<=.2778?"  ":-.05556<=e&&e<=-.05555?" ⁣":-.1667<=e&&e<=-.1666?" ⁣":-.2223<=e&&e<=-.2222?" ⁣":-.2778<=e&&e<=-.2777?" ⁣":null}toNode(){var e;return this.character?document.createTextNode(this.character):((e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace")).setAttribute("width",K(this.width)),e)}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character||" "}},E={MathNode:Ks,TextNode:Zs,SpaceNode:fl,newDocumentFragment:Cn},Qs=mt(function(e,t,r){return!Ka[t][e]||!Ka[t][e].replace||55349===e.charCodeAt(0)||Qa.hasOwnProperty(e)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(e=Ka[t][e].replace),new E.TextNode(e)},"makeText"),Js=mt(function(e){return 1===e.length?e[0]:new E.MathNode("mrow",e)},"makeRow"),eo=mt(function(e,t){var r;return"texttt"===t.fontFamily?"monospace":"textsf"===t.fontFamily?"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif":"textit"===t.fontShape&&"textbf"===t.fontWeight?"bold-italic":"textit"===t.fontShape?"italic":"textbf"===t.fontWeight?"bold":(t=t.font)&&"mathnormal"!==t?(r=e.mode,"mathit"===t?"italic":"boldsymbol"===t?"textord"===e.type?"bold":"bold-italic":"mathbf"===t?"bold":"mathbb"===t?"double-struck":"mathsfit"===t?"sans-serif-italic":"mathfrak"===t?"fraktur":"mathscr"===t||"mathcal"===t?"script":"mathsf"===t?"sans-serif":"mathtt"===t?"monospace":!["\\imath","\\jmath"].includes(e=e.text)&&xn(e=Ka[r][e]&&Ka[r][e].replace?Ka[r][e].replace:e,Z.fontMap[t].fontName,r)?Z.fontMap[t].variant:null):null},"getVariant"),mt(An,"isNumberPunctuation"),to=mt(function(e,t,r){var i;if(1===e.length)return i=io(e[0],t),r&&i instanceof Ks&&"mo"===i.type&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i];for(var n,a=[],s=0;s{e&&"supsub"===e.type?(o=(r=Ln(e.base,"accent")).base,e.base=o,i=kn(Xs(e,t)),e.base=r):o=(r=Ln(e,"accent")).base;var r,i,n,a,e=Xs(o,t.havingCrampedStyle()),s=0,o=(r.isShifty&&Qn.isCharacterBox(o)&&(o=Qn.getBaseElem(o),s=wn(Xs(o,t.havingCrampedStyle())).skew),"\\c"===r.label),l=o?e.height+e.depth:Math.min(e.height,t.fontMetrics().xHeight),c=r.isStretchy?(c=uo.svgSpan(r,t),Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"elem",elem:c,wrapperClasses:["svg-align"],wrapperStyle:0{var r=e.isStretchy?uo.mathMLnode(e.label):new E.MathNode("mo",[Qs(e.label,e.mode)]);return(e=new E.MathNode("mover",[io(e.base,t),r])).setAttribute("accent","true"),e},"mathmlBuilder$9"),go=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|")),o({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:mt((e,t)=>{var t=Ps(t[0]),r=!go.test(e.funcName),i=!r||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:t}},"handler"),htmlBuilder:po,mathmlBuilder:Tl}),o({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:mt((e,t)=>{var t=t[0],r=e.parser.mode;return"math"===r&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:t}},"handler"),htmlBuilder:po,mathmlBuilder:Tl}),o({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:mt((e,t)=>{var{parser:e,funcName:r}=e,t=t[0];return{type:"accentUnder",mode:e.mode,label:r,base:t}},"handler"),htmlBuilder:mt((e,t)=>{var r=Xs(e.base,t),i=uo.svgSpan(e,t),e="\\utilde"===e.label?.12:0,i=Z.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:i,wrapperClasses:["svg-align"]},{type:"kern",size:e},{type:"elem",elem:r}]},t);return Z.makeSpan(["mord","accentunder"],[i],t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>{var r=uo.mathMLnode(e.label);return(e=new E.MathNode("munder",[io(e.base,t),r])).setAttribute("accentunder","true"),e},"mathmlBuilder")}),fo=mt(e=>((e=new E.MathNode("mpadded",e?[e]:[])).setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e),"paddedNode"),o({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:e,funcName:i}=e;return{type:"xArrow",mode:e.mode,label:i,body:t[0],below:r[0]}},htmlBuilder(e,t){var r,i=t.style,n=t.havingStyle(i.sup()),a=Z.wrapFragment(Xs(e.body,n,t),t),s="\\x"===e.label.slice(0,2)?"x":"cd",i=(a.classes.push(s+"-arrow-pad"),e.below&&(n=t.havingStyle(i.sub()),(r=Z.wrapFragment(Xs(e.below,n,t),t)).classes.push(s+"-arrow-pad")),uo.svgSpan(e,t)),n=-t.fontMetrics().axisHeight+.5*i.height,s=-t.fontMetrics().axisHeight-.5*i.height-.111;return(.25"atom"!==(e="ordgroup"===e.type&&e.body.length?e.body[0]:e).type||"bin"!==e.family&&"rel"!==e.family?"mord":"m"+e.family,"binrelClass"),o({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){return{type:"mclass",mode:(e=e.parser).mode,mclass:yo(t[0]),body:$s(t[1]),isCharacterBox:Qn.isCharacterBox(t[1])}}}),o({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:e,funcName:r}=e,i=t[1],t=t[0],n="\\stackrel"!==r?yo(i):"mrel",i={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==r,body:$s(i)},i={type:"supsub",mode:t.mode,base:i,sup:"\\underset"===r?null:t,sub:"\\underset"===r?t:null};return{type:"mclass",mode:e.mode,mclass:n,body:[i],isCharacterBox:Qn.isCharacterBox(i)}},htmlBuilder:Dn,mathmlBuilder:Mn}),o({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){return{type:"pmb",mode:(e=e.parser).mode,mclass:yo(t[0]),body:$s(t[0])}},htmlBuilder(e,t){var r=Gs(e.body,t,!0);return(e=Z.makeSpan([e.mclass],r,t)).style.textShadow="0.02em 0.01em 0.04px",e},mathmlBuilder(e,t){return e=to(e.body,t),(t=new E.MathNode("mstyle",e)).setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),t}}),vo={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},bo=mt(()=>({type:"styling",body:[],mode:"math",style:"display"}),"newCell"),xo=mt(e=>"textord"===e.type&&"@"===e.text,"isStartOfArrow"),To=mt((e,t)=>("mathord"===e.type||"atom"===e.type)&&e.text===t,"isLabelEnd"),mt(On,"cdArrow"),mt(Pn,"parseCD"),o({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:e,funcName:r}=e;return{type:"cdlabel",mode:e.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var r=t.havingStyle(t.style.sup());return(r=Z.wrapFragment(Xs(e.label,r,t),t)).classes.push("cd-label-"+e.side),r.style.bottom=K(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){return t=new E.MathNode("mrow",[io(e.label,t)]),(t=new E.MathNode("mpadded",[t])).setAttribute("width","0"),"left"===e.side&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),(t=new E.MathNode("mstyle",[t])).setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}}),o({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){return{type:"cdlabelparent",mode:(e=e.parser).mode,fragment:t[0]}},htmlBuilder(e,t){return(e=Z.wrapFragment(Xs(e.fragment,t),t)).classes.push("cd-vert-arrow"),e},mathmlBuilder(e,t){return new E.MathNode("mrow",[io(e.fragment,t)])}}),o({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var e=e.parser,r=Ln(t[0],"ordgroup").body,i="",n=0;n>10),56320+(1023&t))),{type:"textord",mode:e.mode,text:t}}}),Gl=mt((e,t)=>(t=Gs(e.body,t.withColor(e.color),!1),Z.makeFragment(t)),"htmlBuilder$8"),g=mt((e,t)=>(t=to(e.body,t.withColor(e.color)),(t=new E.MathNode("mstyle",t)).setAttribute("mathcolor",e.color),t),"mathmlBuilder$7"),o({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var e=e.parser,r=Ln(t[0],"color-token").color;return{type:"color",mode:e.mode,color:r,body:$s(t[1])}},htmlBuilder:Gl,mathmlBuilder:g}),o({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:e,breakOnTokenText:r}=e,t=Ln(t[0],"color-token").color,r=(e.gullet.macros.set("\\current@color",t),e.parseExpression(!0,r));return{type:"color",mode:e.mode,color:t,body:r}},htmlBuilder:Gl,mathmlBuilder:g}),o({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var i="["===(e=e.parser).gullet.future().text?e.parseSizeGroup(!0):null,n=!e.settings.displayMode||!e.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:e.mode,newLine:n,size:i&&Ln(i,"size").value}},htmlBuilder(e,t){var r=Z.makeSpan(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size)&&(r.style.marginTop=K(Ma(e.size,t))),r},mathmlBuilder(e,t){var r=new E.MathNode("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size)&&r.setAttribute("height",K(Ma(e.size,t))),r}}),wo={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},ko=mt(e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new X("Expected a control sequence",e);return t},"checkControlSequence"),Eo=mt(e=>{var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text?e.gullet.popToken():t},"getRHS"),_o=mt((e,t,r,i)=>{var n=e.gullet.macros.get(r.text);null==n&&(r.noexpand=!0,n={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,n,i)},"letCommand"),o({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:e,funcName:t}=e,r=(e.consumeSpaces(),e.fetch());if(wo[r.text])return"\\global"!==t&&"\\\\globallong"!==t||(r.text=wo[r.text]),Ln(e.parseFunction(),"internal");throw new X("Invalid token after macro prefix",r)}}),o({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:e}=e,r=t.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new X("Expected a control sequence",r);for(var n,a=0,s=[[]];"{"!==t.gullet.future().text;)if("#"===(r=t.gullet.popToken()).text){if("{"===t.gullet.future().text){n=t.gullet.future(),s[a].push("{");break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new X('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==a+1)throw new X('Argument number "'+r.text+'" out of order');a++,s.push([])}else{if("EOF"===r.text)throw new X("Expected a macro definition");s[a].push(r.text)}var o=t.gullet.consumeArg().tokens;return n&&o.unshift(n),"\\edef"!==e&&"\\xdef"!==e||(o=t.gullet.expandTokens(o)).reverse(),t.gullet.macros.set(i,{tokens:o,numArgs:a,delimiters:s},e===wo[e]),{type:"internal",mode:t.mode}}}),o({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:e,funcName:t}=e,r=ko(e.gullet.popToken()),i=(e.gullet.consumeSpaces(),Eo(e));return _o(e,r,i,"\\\\globallet"===t),{type:"internal",mode:e.mode}}}),o({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:e,funcName:t}=e,r=ko(e.gullet.popToken()),i=e.gullet.popToken(),n=e.gullet.popToken();return _o(e,r,n,"\\\\globalfuture"===t),e.gullet.pushToken(n),e.gullet.pushToken(i),{type:"internal",mode:e.mode}}}),So=mt(function(e,t,r){if(r=xn(Ka.math[e]&&Ka.math[e].replace||e,t,r))return r;throw new Error("Unsupported symbol "+e+" and font size "+t+".")},"getMetrics"),Co=mt(function(e,t,r,i){return t=r.havingBaseStyle(t),i=Z.makeSpan(i.concat(t.sizingClasses(r)),[e],r),e=t.sizeMultiplier/r.sizeMultiplier,i.height*=e,i.depth*=e,i.maxFontSize=t.sizeMultiplier,i},"styleWrap"),Ao=mt(function(e,t,r){r=t.havingBaseStyle(r),r=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight,e.classes.push("delimcenter"),e.style.top=K(r),e.height-=r,e.depth+=r},"centerSpan"),Ro=mt(function(e,t,r,i,n,a){return e=Z.makeSymbol(e,"Main-Regular",n,i),n=Co(e,t,i,a),r&&Ao(n,i,t),n},"makeSmallDelim"),Lo=mt(function(e,t,r,i){return Z.makeSymbol(e,"Size"+t+"-Regular",r,i)},"mathrmSize"),No=mt(function(e,t,r,i,n,a){return e=Lo(e,t,n,i),n=Co(Z.makeSpan(["delimsizing","size"+t],[e],i),la.TEXT,i,a),r&&Ao(n,i,la.TEXT),n},"makeLargeDelim"),Io=mt(function(e,t,r){return{type:"elem",elem:Z.makeSpan(["delimsizinginner","Size1-Regular"===t?"delim-size1":"delim-size4"],[Z.makeSpan([],[Z.makeSymbol(e,t,r)])])}},"makeGlyphSpan"),Do=mt(function(e,t,r){var i=(ka["Size4-Regular"][e.charCodeAt(0)]?ka["Size4-Regular"]:ka["Size1-Regular"])[e.charCodeAt(0)][4],e=new Ya("inner",ba(e,Math.round(1e3*t))),e=new Wa([e],{width:K(i),height:K(t),style:"width:"+K(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"});return(e=Z.makeSvgSpan([],[e],r)).height=t,e.style.height=K(t),e.style.width=K(i),{type:"elem",elem:e}},"makeInner"),Mo={type:"kern",size:-.008},Oo=["|","\\lvert","\\rvert","\\vert"],Po=["\\|","\\lVert","\\rVert","\\Vert"],$o=mt(function(e,t,r,i,n,a){var s,o,l,c="",h=0,u=s=o=e,d=null,p="Size1-Regular",e=("\\uparrow"===e?s=o="⏐":"\\Uparrow"===e?s=o="‖":"\\downarrow"===e?u=s="⏐":"\\Downarrow"===e?u=s="‖":"\\updownarrow"===e?(u="\\uparrow",s="⏐",o="\\downarrow"):"\\Updownarrow"===e?(u="\\Uparrow",s="‖",o="\\Downarrow"):Oo.includes(e)?(s="∣",c="vert",h=333):Po.includes(e)?(s="∥",c="doublevert",h=556):"["===e||"\\lbrack"===e?(u="⎡",s="⎢",o="⎣",p="Size4-Regular",c="lbrack",h=667):"]"===e||"\\rbrack"===e?(u="⎤",s="⎥",o="⎦",p="Size4-Regular",c="rbrack",h=667):"\\lfloor"===e||"⌊"===e?(s=u="⎢",o="⎣",p="Size4-Regular",c="lfloor",h=667):"\\lceil"===e||"⌈"===e?(u="⎡",s=o="⎢",p="Size4-Regular",c="lceil",h=667):"\\rfloor"===e||"⌋"===e?(s=u="⎥",o="⎦",p="Size4-Regular",c="rfloor",h=667):"\\rceil"===e||"⌉"===e?(u="⎤",s=o="⎥",p="Size4-Regular",c="rceil",h=667):"("===e||"\\lparen"===e?(u="⎛",s="⎜",o="⎝",p="Size4-Regular",c="lparen",h=875):")"===e||"\\rparen"===e?(u="⎞",s="⎟",o="⎠",p="Size4-Regular",c="rparen",h=875):"\\{"===e||"\\lbrace"===e?(u="⎧",d="⎨",o="⎩",s="⎪",p="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(u="⎫",d="⎬",o="⎭",s="⎪",p="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(u="⎧",o="⎩",s="⎪",p="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(u="⎫",o="⎭",s="⎪",p="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(u="⎧",o="⎭",s="⎪",p="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(u="⎫",o="⎩",s="⎪",p="Size4-Regular"),(e=So(u,p,n)).height+e.depth),g=(g=So(s,p,n)).height+g.depth,f=(f=So(o,p,n)).height+f.depth,m=0,y=1,t=(null!==d&&(m=(v=So(d,p,n)).height+v.depth,y=2),(v=e+f+m)+Math.max(0,Math.ceil((t-v)/(y*g)))*y*g),v=i.fontMetrics().axisHeight,y=(r&&(v*=i.sizeMultiplier),t/2-v),g=[],v=(0","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Uo=[0,1.2,1.8,2.4,3],sl=mt(function(e,t,r,i,n){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),Fo.includes(e)||qo.includes(e))return No(e,t,!1,r,i,n);if(zo.includes(e))return $o(e,Uo[t],!1,r,i,n);throw new X("Illegal delimiter: '"+e+"'")},"makeSizedDelim"),Go=[{type:"small",style:la.SCRIPTSCRIPT},{type:"small",style:la.SCRIPT},{type:"small",style:la.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],jo=[{type:"small",style:la.SCRIPTSCRIPT},{type:"small",style:la.SCRIPT},{type:"small",style:la.TEXT},{type:"stack"}],Wo=[{type:"small",style:la.SCRIPTSCRIPT},{type:"small",style:la.SCRIPT},{type:"small",style:la.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Yo=mt(function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},"delimTypeToFont"),Vo=mt(function(e,t,r,i){for(var n=Math.min(2,3-i.style.size);n"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle");var s=qo.includes(e)?Go:Fo.includes(e)?Wo:jo;return"small"===(s=Vo(e,t,s,i)).type?Ro(e,s.style,r,i,n,a):"large"===s.type?No(e,s.size,r,i,n,a):$o(e,t,r,i,n,a)},"makeCustomSizedDelim"),f=mt(function(e,t,r,i,n,a){var s=i.fontMetrics().axisHeight*i.sizeMultiplier,o=5/i.fontMetrics().ptPerEm,t=Math.max(t-s,r+s),r=Math.max(t/500*901,2*t-o);return Ho(e,r,!0,i,n,a)},"makeLeftRightDelim"),Xo={sqrtImage:al,sizedDelim:sl,sizeToMaxHeight:Uo,customSizedDelim:Ho,leftRightDelim:f},Ko={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Zo=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."],mt($n,"checkDelimiter"),o({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:mt((e,t)=>(t=$n(t[0],e),{type:"delimsizing",mode:e.parser.mode,size:Ko[e.funcName].size,mclass:Ko[e.funcName].mclass,delim:t.text}),"handler"),htmlBuilder:mt((e,t)=>"."===e.delim?Z.makeSpan([e.mclass]):Xo.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),"htmlBuilder"),mathmlBuilder:mt(e=>{var t=[],t=("."!==e.delim&&t.push(Qs(e.delim,e.mode)),new E.MathNode("mo",t)),e=("mopen"===e.mclass||"mclose"===e.mclass?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true"),K(Xo.sizeToMaxHeight[e.size]));return t.setAttribute("minsize",e),t.setAttribute("maxsize",e),t},"mathmlBuilder")}),mt(Bn,"assertParsed"),o({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:mt((e,t)=>{var r=e.parser.gullet.macros.get("\\current@color");if(r&&"string"!=typeof r)throw new X("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:$n(t[0],e).text,color:r}},"handler")}),o({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:mt((e,t)=>{var t=$n(t[0],e),r=(++(e=e.parser).leftrightDepth,e.parseExpression(!1)),i=(--e.leftrightDepth,e.expect("\\right",!1),Ln(e.parseFunction(),"leftright-right"));return{type:"leftright",mode:e.mode,body:r,left:t.text,right:i.delim,rightColor:i.color}},"handler"),htmlBuilder:mt((e,t)=>{Bn(e);for(var r,i=Gs(e.body,t,!0,["mopen","mclose"]),n=0,a=0,s=!1,o=0;o{Bn(e);var r,t=to(e.body,t);return"."!==e.left&&((r=new E.MathNode("mo",[Qs(e.left,e.mode)])).setAttribute("fence","true"),t.unshift(r)),"."!==e.right&&((r=new E.MathNode("mo",[Qs(e.right,e.mode)])).setAttribute("fence","true"),e.rightColor&&r.setAttribute("mathcolor",e.rightColor),t.push(r)),Js(t)},"mathmlBuilder")}),o({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:mt((e,t)=>{if(t=$n(t[0],e),e.parser.leftrightDepth)return{type:"middle",mode:e.parser.mode,delim:t.text};throw new X("\\middle without preceding \\left",t)},"handler"),htmlBuilder:mt((e,t)=>{var r;return"."===e.delim?r=Hs(t,[]):(r=Xo.sizedDelim(e.delim,1,t,e.mode,[]),e={delim:e.delim,options:t},r.isMiddle=e),r},"htmlBuilder"),mathmlBuilder:mt((e,t)=>(e="\\vert"===e.delim||"|"===e.delim?Qs("|","text"):Qs(e.delim,e.mode),(e=new E.MathNode("mo",[e])).setAttribute("fence","true"),e.setAttribute("lspace","0.05em"),e.setAttribute("rspace","0.05em"),e),"mathmlBuilder")}),fl=mt((e,t)=>{var r,i,n,a,s,o=Z.wrapFragment(Xs(e.body,t),t),l=e.label.slice(1),c=t.sizeMultiplier,h=0,u=Qn.isCharacterBox(e.body);return"sout"===l?((r=Z.makeSpan(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/c,h=-.5*t.fontMetrics().xHeight):"phase"===l?(a=Ma({number:.6,unit:"pt"},t),s=Ma({number:.35,unit:"ex"},t),c/=t.havingBaseSizing().sizeMultiplier,i=o.height+o.depth+a+s,o.style.paddingLeft=K(i/2+a),c=Math.floor(1e3*i*c),n=ma(c),n=new Wa([new Ya("phase",n)],{width:"400em",height:K(c/1e3),viewBox:"0 0 400000 "+c,preserveAspectRatio:"xMinYMin slice"}),(r=Z.makeSvgSpan(["hide-tail"],[n],t)).style.height=K(i),h=o.depth+a+s):(/cancel/.test(l)?u||o.classes.push("cancel-pad"):"angl"===l?o.classes.push("anglpad"):o.classes.push("boxpad"),i=n=c=0,n=/box/.test(l)?(i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),c=t.fontMetrics().fboxsep+("colorbox"===l?0:i)):"angl"===l?(c=4*(i=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),Math.max(0,.25-o.depth)):c=u?.2:0,r=uo.encloseSpan(o,l,c,n,t),/fbox|boxed|fcolorbox/.test(l)?(r.style.borderStyle="solid",r.style.borderWidth=K(i)):"angl"===l&&.049!==i&&(r.style.borderTopWidth=K(i),r.style.borderRightWidth=K(i)),h=o.depth+n,e.backgroundColor&&(r.style.backgroundColor=e.backgroundColor,e.borderColor)&&(r.style.borderColor=e.borderColor)),s=e.backgroundColor?Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:h},{type:"elem",elem:o,shift:0}]},t):(a=/cancel|phase/.test(l)?["svg-align"]:[],Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:r,shift:h,wrapperClasses:a}]},t)),/cancel/.test(l)&&(s.height=o.height,s.depth=o.depth),/cancel/.test(l)&&!u?Z.makeSpan(["mord","cancel-lap"],[s],t):Z.makeSpan(["mord"],[s],t)},"htmlBuilder$7"),bl=mt((e,t)=>{var r=new E.MathNode(-1{if(!e.parser.settings.displayMode)throw new X("{"+e.envName+"} can be used only in display mode.")},"validateAmsEnvironmentContext"),mt(qn,"getAutoTag"),mt(Un,"parseArray"),mt(Gn,"dCellStyle"),m=mt(function(e,t){var r=e.body.length,P=e.hLinesBeforeRow,i=0,n=new Array(r),a=[],s=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),o=1/t.fontMetrics().ptPerEm,l=5*o,c=(e.colSeparationType&&"small"===e.colSeparationType&&(l=t.havingStyle(la.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778),"CD"===e.colSeparationType?Ma({number:3,unit:"ex"},t):12*o),$=3*o,B=.7*(o=e.arraystretch*c),F=.3*o,h=0;function u(e){for(var t=0;te))for(D=0;De.length)),n.cols=new Array(i).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[n],left:t[0],right:t[1],rightColor:void 0}:n},htmlBuilder:m,mathmlBuilder:Ul}),Fn({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){return(e=Un(e.parser,{arraystretch:.5},"script")).colSeparationType="small",e},htmlBuilder:m,mathmlBuilder:Ul}),Fn({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){if(1<(t=(In(t[0])?[t[0]]:Ln(t[0],"ordgroup").body).map(function(e){var t=Nn(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new X("Unknown column alignment: "+t,e)})).length)throw new X("{subarray} can contain only one column");if(0<(e=Un(e.parser,{cols:t,hskipBeforeAndAfter:!1,arraystretch:.5},"script")).body.length&&1{var r=e.font,t=t.withFont(r);return Xs(e.body,t)},"htmlBuilder$5"),g=mt((e,t)=>{var r=e.font,t=t.withFont(r);return io(e.body,t)},"mathmlBuilder$4"),il={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"},o({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:mt((e,t)=>{var{parser:e,funcName:r}=e,t=Ps(t[0]);return{type:"font",mode:e.mode,font:(r=r in il?il[r]:r).slice(1),body:t}},"handler"),htmlBuilder:Gl,mathmlBuilder:g}),o({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:mt((e,t)=>{var e=e.parser,t=t[0],r=Qn.isCharacterBox(t);return{type:"mclass",mode:e.mode,mclass:yo(t),body:[{type:"font",mode:e.mode,font:"boldsymbol",body:t}],isCharacterBox:r}},"handler")}),o({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:mt((e,t)=>{var{parser:e,funcName:r,breakOnTokenText:i}=e,n=e.mode,i=e.parseExpression(!0,i);return{type:"font",mode:n,font:"math"+r.slice(1),body:{type:"ordgroup",mode:e.mode,body:i}}},"handler"),htmlBuilder:Gl,mathmlBuilder:g}),nl=mt((e,t)=>("display"===e?t=t.id>=la.SCRIPT.id?t.text():la.DISPLAY:"text"===e&&t.size===la.DISPLAY.size?t=la.TEXT:"script"===e?t=la.SCRIPT:"scriptscript"===e&&(t=la.SCRIPTSCRIPT),t),"adjustStyle"),al=mt((e,t)=>{var r,i,n,a,s=nl(e.size,t.style),o=s.fracNum(),l=s.fracDen(),o=t.havingStyle(o),c=Xs(e.numer,o,t),h=(e.continued&&(h=8.5/t.fontMetrics().ptPerEm,u=3.5/t.fontMetrics().ptPerEm,c.height=c.height{var r=new E.MathNode("mfrac",[io(e.numer,t),io(e.denom,t)]),i=(e.hasBarLine?e.barSize&&(i=Ma(e.barSize,t),r.setAttribute("linethickness",K(i))):r.setAttribute("linethickness","0px"),nl(e.size,t.style));return i.size!==t.style.size&&(r=new E.MathNode("mstyle",[r]),t=i.size===la.DISPLAY.size?"true":"false",r.setAttribute("displaystyle",t),r.setAttribute("scriptlevel","0")),null!=e.leftDelim||null!=e.rightDelim?(i=[],null!=e.leftDelim&&((t=new E.MathNode("mo",[new E.TextNode(e.leftDelim.replace("\\",""))])).setAttribute("fence","true"),i.push(t)),i.push(r),null!=e.rightDelim&&((t=new E.MathNode("mo",[new E.TextNode(e.rightDelim.replace("\\",""))])).setAttribute("fence","true"),i.push(t)),Js(i)):r},"mathmlBuilder$3"),o({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:mt((e,t)=>{var r,{parser:e,funcName:i}=e,n=t[0],t=t[1],a=null,s=null,o="auto";switch(i){case"\\dfrac":case"\\frac":case"\\tfrac":r=!0;break;case"\\\\atopfrac":r=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":r=!1,a="(",s=")";break;case"\\\\bracefrac":r=!1,a="\\{",s="\\}";break;case"\\\\brackfrac":r=!1,a="[",s="]";break;default:throw new Error("Unrecognized genfrac command")}switch(i){case"\\dfrac":case"\\dbinom":o="display";break;case"\\tfrac":case"\\tbinom":o="text"}return{type:"genfrac",mode:e.mode,continued:!1,numer:n,denom:t,hasBarLine:r,leftDelim:a,rightDelim:s,size:o,barSize:null}},"handler"),htmlBuilder:al,mathmlBuilder:sl}),o({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:mt((e,t)=>{var e=e.parser,r=t[0];return{type:"genfrac",mode:e.mode,continued:!0,numer:r,denom:t[1],hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}},"handler")}),o({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var t,{parser:e,funcName:r,token:i}=e;switch(r){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:t,token:i}}}),ol=["display","text","script","scriptscript"],ll=mt(function(e){var t=null;return 0{var e=e.parser,r=t[0],i=Zn(Ln(t[1],"infix").size),t=t[2],n=0{var r,i,n=t.style,n="supsub"===e.type?(r=e.sup?Xs(e.sup,t.havingStyle(n.sup()),t):Xs(e.sub,t.havingStyle(n.sub()),t),Ln(e.base,"horizBrace")):Ln(e,"horizBrace"),e=Xs(n.base,t.havingBaseStyle(la.DISPLAY)),a=uo.svgSpan(n,t);return(n.isOver?(i=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:.1},{type:"elem",elem:a}]},t)).children[0].children[0].children[1]:(i=Z.makeVList({positionType:"bottom",positionData:e.depth+.1+a.height,children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:e}]},t)).children[0].children[0].children[0]).classes.push("svg-align"),r&&(a=Z.makeSpan(["mord",n.isOver?"mover":"munder"],[i],t),i=n.isOver?Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.2},{type:"elem",elem:r}]},t):Z.makeVList({positionType:"bottom",positionData:a.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:a}]},t)),Z.makeSpan(["mord",n.isOver?"mover":"munder"],[i],t)},"htmlBuilder$3"),f=mt((e,t)=>{var r=uo.mathMLnode(e.label);return new E.MathNode(e.isOver?"mover":"munder",[io(e.base,t),r])},"mathmlBuilder$2"),o({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:e,funcName:r}=e;return{type:"horizBrace",mode:e.mode,label:r,isOver:/^\\over/.test(r),base:t[0]}},htmlBuilder:cl,mathmlBuilder:f}),o({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:mt((e,t)=>{var e=e.parser,r=t[1],t=Ln(t[0],"url").url;return e.settings.isTrusted({command:"\\href",url:t})?{type:"href",mode:e.mode,href:t,body:$s(r)}:e.formatUnsupportedCmd("\\href")},"handler"),htmlBuilder:mt((e,t)=>{var r=Gs(e.body,t,!1);return Z.makeAnchor(e.href,[],r,t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>((t=(t=ro(e.body,t))instanceof Ks?t:new Ks("mrow",[t])).setAttribute("href",e.href),t),"mathmlBuilder")}),o({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:mt((e,t)=>{var e=e.parser,r=Ln(t[0],"url").url;if(!e.settings.isTrusted({command:"\\url",url:r}))return e.formatUnsupportedCmd("\\url");for(var i=[],n=0;n{var{parser:e,funcName:r}=e,i=Ln(t[0],"raw").string,t=t[1];e.settings.strict&&e.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var n,a={};switch(r){case"\\htmlClass":n={command:"\\htmlClass",class:a.class=i};break;case"\\htmlId":n={command:"\\htmlId",id:a.id=i};break;case"\\htmlStyle":n={command:"\\htmlStyle",style:a.style=i};break;case"\\htmlData":for(var s=i.split(","),o=0;o{var r,i=Gs(e.body,t,!1),n=["enclosing"],a=(e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/)),Z.makeSpan(n,i,t));for(r in e.attributes)"class"!==r&&e.attributes.hasOwnProperty(r)&&a.setAttribute(r,e.attributes[r]);return a},"htmlBuilder"),mathmlBuilder:mt((e,t)=>ro(e.body,t),"mathmlBuilder")}),o({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:mt((e,t)=>({type:"htmlmathml",mode:(e=e.parser).mode,html:$s(t[0]),mathml:$s(t[1])}),"handler"),htmlBuilder:mt((e,t)=>(e=Gs(e.html,t,!1),Z.makeFragment(e)),"htmlBuilder"),mathmlBuilder:mt((e,t)=>ro(e.mathml,t),"mathmlBuilder")}),hl=mt(function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new X("Invalid size: '"+e+"' in \\includegraphics");if(e={number:+(t[1]+t[2]),unit:t[3]},Da(e))return e;throw new X("Invalid unit: '"+e.unit+"' in \\includegraphics.")},"sizeData"),o({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:mt((e,t,r)=>{var e=e.parser,i={number:0,unit:"em"},n={number:.9,unit:"em"},a={number:0,unit:"em"},s="";if(r[0])for(var o=Ln(r[0],"raw").string.split(","),l=0;l{var r=Ma(e.height,t),i=0,n=(0{var r=new E.MathNode("mglyph",[]),i=(r.setAttribute("alt",e.alt),Ma(e.height,t)),n=0;return 0{var{parser:e,funcName:r}=e,t=t[0];return{type:"lap",mode:e.mode,alignment:r.slice(5),body:t}},"handler"),htmlBuilder:mt((e,t)=>{var r="clap"===e.alignment?(r=Z.makeSpan([],[Xs(e.body,t)]),Z.makeSpan(["inner"],[r],t)):Z.makeSpan(["inner"],[Xs(e.body,t)]),i=Z.makeSpan(["fix"],[]),e=Z.makeSpan([e.alignment],[r,i],t);return(r=Z.makeSpan(["strut"])).style.height=K(e.height+e.depth),e.depth&&(r.style.verticalAlign=K(-e.depth)),e.children.unshift(r),e=Z.makeSpan(["thinbox"],[e],t),Z.makeSpan(["mord","vbox"],[e],t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>(t=new E.MathNode("mpadded",[io(e.body,t)]),"rlap"!==e.alignment&&(e="llap"===e.alignment?"-1":"-0.5",t.setAttribute("lspace",e+"width")),t.setAttribute("width","0px"),t),"mathmlBuilder")}),o({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:e,parser:r}=e,i=r.mode,e=(r.switchMode("math"),"\\("===e?"\\)":"$"),n=r.parseExpression(!1,e);return r.expect(e),r.switchMode(i),{type:"styling",mode:r.mode,style:"text",body:n}}}),o({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new X("Mismatched "+e.funcName)}}),ul=mt((e,t)=>{switch(t.style.size){case la.DISPLAY.size:return e.display;case la.TEXT.size:return e.text;case la.SCRIPT.size:return e.script;case la.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}},"chooseMathStyle"),o({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:mt((e,t)=>({type:"mathchoice",mode:(e=e.parser).mode,display:$s(t[0]),text:$s(t[1]),script:$s(t[2]),scriptscript:$s(t[3])}),"handler"),htmlBuilder:mt((e,t)=>(e=ul(e,t),e=Gs(e,t,!1),Z.makeFragment(e)),"htmlBuilder"),mathmlBuilder:mt((e,t)=>(e=ul(e,t),ro(e,t)),"mathmlBuilder")}),dl=mt((e,t,r,i,n,a,s)=>{e=Z.makeSpan([],[e]);var o,l,c=r&&Qn.isCharacterBox(r);if(t&&(o={elem:t=Xs(t,i.havingStyle(n.sup()),i),kern:Math.max(i.fontMetrics().bigOpSpacing1,i.fontMetrics().bigOpSpacing3-t.depth)}),r&&(l={elem:t=Xs(r,i.havingStyle(n.sub()),i),kern:Math.max(i.fontMetrics().bigOpSpacing2,i.fontMetrics().bigOpSpacing4-t.height)}),o&&l)var r=i.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+s,h=Z.makeVList({positionType:"bottom",positionData:r,children:[{type:"kern",size:i.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:K(-a)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:o.kern},{type:"elem",elem:o.elem,marginLeft:K(a)},{type:"kern",size:i.fontMetrics().bigOpSpacing5}]},i);else if(l)n=e.height-s,h=Z.makeVList({positionType:"top",positionData:n,children:[{type:"kern",size:i.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:K(-a)},{type:"kern",size:l.kern},{type:"elem",elem:e}]},i);else{if(!o)return e;t=e.depth+s,h=Z.makeVList({positionType:"bottom",positionData:t,children:[{type:"elem",elem:e},{type:"kern",size:o.kern},{type:"elem",elem:o.elem,marginLeft:K(a)},{type:"kern",size:i.fontMetrics().bigOpSpacing5}]},i)}return r=[h],l&&0!==a&&!c&&((n=Z.makeSpan(["mspace"],[],i)).style.marginRight=K(a),r.unshift(n)),Z.makeSpan(["mop","op-limits"],r,i)},"assembleSupSub"),pl=["\\smallint"],gl=mt((e,t)=>{var r,i,n,a=!1,s=("supsub"===e.type?(r=e.sup,i=e.sub,n=Ln(e.base,"op"),a=!0):n=Ln(e,"op"),!1);if((e=t.style).size===la.DISPLAY.size&&n.symbol&&!pl.includes(n.name)&&(s=!0),n.symbol){var o,l=s?"Size2-Regular":"Size1-Regular",c="";"\\oiint"!==n.name&&"\\oiiint"!==n.name||(c=n.name.slice(1),n.name="oiint"===c?"\\iint":"\\iiint"),l=Z.makeSymbol(n.name,l,"math",t,["mop","op-symbol",s?"large-op":"small-op"]),0{var r;return e.symbol?(r=new Ks("mo",[Qs(e.name,e.mode)]),pl.includes(e.name)&&r.setAttribute("largeop","false")):r=e.body?new Ks("mo",to(e.body,t)):(r=new Ks("mi",[new Zs(e.name.slice(1))]),t=new Ks("mo",[Qs("⁡","text")]),e.parentIsSupSub?new Ks("mrow",[r,t]):Cn([r,t])),r},"mathmlBuilder$1"),ml={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"},o({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:mt((e,t)=>{var{parser:e,funcName:r}=e;return 1===r.length&&(r=ml[r]),{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},"handler"),htmlBuilder:gl,mathmlBuilder:fl}),o({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:mt((e,t)=>(e=e.parser,t=t[0],{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:$s(t)}),"handler"),htmlBuilder:gl,mathmlBuilder:fl}),yl={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"},o({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:e,funcName:t}=e;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:gl,mathmlBuilder:fl}),o({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:e,funcName:t}=e;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:gl,mathmlBuilder:fl}),o({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){var{parser:e,funcName:t}=e;return 1===t.length&&(t=yl[t]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:t}},htmlBuilder:gl,mathmlBuilder:fl}),vl=mt((e,t)=>{var r,i,n,a,s=!1;if("supsub"===e.type?(r=e.sup,i=e.sub,n=Ln(e.base,"operatorname"),s=!0):n=Ln(e,"operatorname"),0{var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e}),o=Gs(e,t.withFont("mathrm"),!0),l=0;l{for(var r=to(e.body,t.withFont("mathrm")),i=!0,n=0;ne.toText()).join(""),r=[new E.TextNode(t)]),(t=new E.MathNode("mi",r)).setAttribute("mathvariant","normal");var o=new E.MathNode("mo",[Qs("⁡","text")]);return e.parentIsSupSub?new E.MathNode("mrow",[t,o]):E.newDocumentFragment([t,o])},"mathmlBuilder"),o({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:mt((e,t)=>{var{parser:e,funcName:r}=e,t=t[0];return{type:"operatorname",mode:e.mode,body:$s(t),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},"handler"),htmlBuilder:vl,mathmlBuilder:bl}),l("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),En({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?Z.makeFragment(Gs(e.body,t,!1)):Z.makeSpan(["mord"],Gs(e.body,t,!0),t)},mathmlBuilder(e,t){return ro(e.body,t,!0)}}),o({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){return e=e.parser,t=t[0],{type:"overline",mode:e.mode,body:t}},htmlBuilder(e,t){var e=Xs(e.body,t.havingCrampedStyle()),r=Z.makeLineSpan("overline-line",t),i=t.fontMetrics().defaultRuleThickness,e=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:3*i},{type:"elem",elem:r},{type:"kern",size:i}]},t);return Z.makeSpan(["mord","overline"],[e],t)},mathmlBuilder(e,t){var r=new E.MathNode("mo",[new E.TextNode("‾")]);return r.setAttribute("stretchy","true"),(e=new E.MathNode("mover",[io(e.body,t),r])).setAttribute("accent","true"),e}}),o({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:mt((e,t)=>(e=e.parser,t=t[0],{type:"phantom",mode:e.mode,body:$s(t)}),"handler"),htmlBuilder:mt((e,t)=>(e=Gs(e.body,t.withPhantom(),!1),Z.makeFragment(e)),"htmlBuilder"),mathmlBuilder:mt((e,t)=>(e=to(e.body,t),new E.MathNode("mphantom",e)),"mathmlBuilder")}),o({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:mt((e,t)=>(e=e.parser,t=t[0],{type:"hphantom",mode:e.mode,body:t}),"handler"),htmlBuilder:mt((e,t)=>{var r=Z.makeSpan([],[Xs(e.body,t.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var i=0;i(e=to($s(e.body),t),t=new E.MathNode("mphantom",e),(e=new E.MathNode("mpadded",[t])).setAttribute("height","0px"),e.setAttribute("depth","0px"),e),"mathmlBuilder")}),o({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:mt((e,t)=>(e=e.parser,t=t[0],{type:"vphantom",mode:e.mode,body:t}),"handler"),htmlBuilder:mt((e,t)=>{var e=Z.makeSpan(["inner"],[Xs(e.body,t.withPhantom())]),r=Z.makeSpan(["fix"],[]);return Z.makeSpan(["mord","rlap"],[e,r],t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>(e=to($s(e.body),t),t=new E.MathNode("mphantom",e),(e=new E.MathNode("mpadded",[t])).setAttribute("width","0px"),e),"mathmlBuilder")}),o({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var e=e.parser,r=Ln(t[0],"size").value;return{type:"raisebox",mode:e.mode,dy:r,body:t[1]}},htmlBuilder(e,t){var r=Xs(e.body,t),e=Ma(e.dy,t);return Z.makeVList({positionType:"shift",positionData:-e,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){return t=new E.MathNode("mpadded",[io(e.body,t)]),e=e.dy.number+e.dy.unit,t.setAttribute("voffset",e),t}}),o({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){return{type:"internal",mode:(e=e.parser).mode}}}),o({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,r){var e=e.parser,r=r[0],i=Ln(t[0],"size"),t=Ln(t[1],"size");return{type:"rule",mode:e.mode,shift:r&&Ln(r,"size").value,width:i.value,height:t.value}},htmlBuilder(e,t){var r=Z.makeSpan(["mord","rule"],[],t),i=Ma(e.width,t),n=Ma(e.height,t),e=e.shift?Ma(e.shift,t):0;return r.style.borderRightWidth=K(i),r.style.borderTopWidth=K(n),r.style.bottom=K(e),r.width=i,r.height=n+e,r.depth=-e,r.maxFontSize=1.125*n*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=Ma(e.width,t),i=Ma(e.height,t),e=e.shift?Ma(e.shift,t):0,t=t.color&&t.getColor()||"black",n=new E.MathNode("mspace"),t=(n.setAttribute("mathbackground",t),n.setAttribute("width",K(r)),n.setAttribute("height",K(i)),new E.MathNode("mpadded",[n]));return 0<=e?t.setAttribute("height",K(e)):(t.setAttribute("height",K(e)),t.setAttribute("depth",K(-e))),t.setAttribute("voffset",K(e)),t}}),mt(jn,"sizingGroup"),xl=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Tl=mt((e,t)=>{var r=t.havingSize(e.size);return jn(e.body,r,t)},"htmlBuilder"),o({type:"sizing",names:xl,props:{numArgs:0,allowedInText:!0},handler:mt((e,t)=>{var{breakOnTokenText:e,funcName:r,parser:i}=e,e=i.parseExpression(!1,e);return{type:"sizing",mode:i.mode,size:xl.indexOf(r)+1,body:e}},"handler"),htmlBuilder:Tl,mathmlBuilder:mt((e,t)=>(t=t.havingSize(e.size),e=to(e.body,t),(e=new E.MathNode("mstyle",e)).setAttribute("mathsize",K(t.sizeMultiplier)),e),"mathmlBuilder")}),o({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:mt((e,t,r)=>{var e=e.parser,i=!1,n=!1,a=r[0]&&Ln(r[0],"ordgroup");if(a)for(var s,o=0;o{var r=Z.makeSpan([],[Xs(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0,r.children))for(var i=0;i(t=new E.MathNode("mpadded",[io(e.body,t)]),e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t),"mathmlBuilder")}),o({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){return e=e.parser,r=r[0],t=t[0],{type:"sqrt",mode:e.mode,body:t,index:r}},htmlBuilder(e,t){0===(r=Xs(e.body,t.havingCrampedStyle())).height&&(r.height=t.fontMetrics().xHeight);var r=Z.wrapFragment(r,t),i=n=t.fontMetrics().defaultRuleThickness,i=n+(t.style.idr.height+r.depth+i&&(i=(i+o-r.height-r.depth)/2),n.height-r.height-i-a),i=(r.style.paddingLeft=K(s),Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+o)},{type:"elem",elem:n},{type:"kern",size:a}]},t));return e.index?(s=t.havingStyle(la.SCRIPTSCRIPT),r=Xs(e.index,s,t),o=.6*(i.height-i.depth),n=Z.makeVList({positionType:"shift",positionData:-o,children:[{type:"elem",elem:r}]},t),a=Z.makeSpan(["root"],[n]),Z.makeSpan(["mord","sqrt"],[a,i],t)):Z.makeSpan(["mord","sqrt"],[i],t)},mathmlBuilder(e,t){var{body:e,index:r}=e;return r?new E.MathNode("mroot",[io(e,t),io(r,t)]):new E.MathNode("msqrt",[io(e,t)])}}),wl={display:la.DISPLAY,text:la.TEXT,script:la.SCRIPT,scriptscript:la.SCRIPTSCRIPT},o({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:e,funcName:r,parser:i}=e,e=i.parseExpression(!0,e),r=r.slice(1,r.length-5);return{type:"styling",mode:i.mode,style:r,body:e}},htmlBuilder(e,t){var r=wl[e.style],r=t.havingStyle(r).withFont("");return jn(e.body,r,t)},mathmlBuilder(e,t){var r=wl[e.style],t=t.havingStyle(r),r=to(e.body,t),t=new E.MathNode("mstyle",r),r={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return t.setAttribute("scriptlevel",r[0]),t.setAttribute("displaystyle",r[1]),t}}),kl=mt(function(e,t){var r=e.base;return r?"op"===r.type?r.limits&&(t.style.size===la.DISPLAY.size||r.alwaysHandleSupSub)?gl:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(t.style.size===la.DISPLAY.size||r.limits)?vl:null:"accent"===r.type?Qn.isCharacterBox(r.base)?po:null:"horizBrace"===r.type&&!e.sub===r.isOver?cl:null:null},"htmlBuilderDelegate"),En({type:"supsub",htmlBuilder(e,t){if(a=kl(e,t))return a(e,t);var r,i,n,{base:a,sup:s,sub:o}=e,l=Xs(a,t),c=t.fontMetrics(),h=0,u=0,a=a&&Qn.isCharacterBox(a),o=(s&&(n=t.havingStyle(t.style.sup()),r=Xs(s,n,t),a||(h=l.height-n.fontMetrics().supDrop*n.sizeMultiplier/t.sizeMultiplier)),o&&(s=t.havingStyle(t.style.sub()),i=Xs(o,s,t),a||(u=l.depth+s.fontMetrics().subDrop*s.sizeMultiplier/t.sizeMultiplier)),n=t.style===la.DISPLAY?c.sup1:t.style.cramped?c.sup3:c.sup2,t.sizeMultiplier),a=K(.5/c.ptPerEm/o),s=null;if(i&&(o=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name),l instanceof ja||o)&&(s=K(-l.italic)),r&&i){h=Math.max(h,n,r.depth+.25*c.xHeight),u=Math.max(u,c.sub2),e=4*c.defaultRuleThickness,h-r.depth-(i.height-u){var e=new E.MathNode("mtd",[]);return e.setAttribute("width","50%"),e},"pad"),En({type:"tag",mathmlBuilder(e,t){return(e=new E.MathNode("mtable",[new E.MathNode("mtr",[Cl(),new E.MathNode("mtd",[ro(e.body,t)]),Cl(),new E.MathNode("mtd",[ro(e.tag,t)])])])).setAttribute("width","100%"),e}}),Al={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Rl={"\\textbf":"textbf","\\textmd":"textmd"},Ll={"\\textit":"textit","\\textup":"textup"},Nl=mt((e,t)=>(e=e.font)?Al[e]?t.withTextFontFamily(Al[e]):Rl[e]?t.withTextFontWeight(Rl[e]):"\\emph"===e?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(Ll[e]):t,"optionsWithFont"),o({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:e,funcName:r}=e,t=t[0];return{type:"text",mode:e.mode,body:$s(t),font:r}},htmlBuilder(e,t){return t=Nl(e,t),e=Gs(e.body,t,!0),Z.makeSpan(["mord","text"],e,t)},mathmlBuilder(e,t){return t=Nl(e,t),ro(e.body,t)}}),o({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){return{type:"underline",mode:(e=e.parser).mode,body:t[0]}},htmlBuilder(e,t){var e=Xs(e.body,t),r=Z.makeLineSpan("underline-line",t),i=t.fontMetrics().defaultRuleThickness,r=Z.makeVList({positionType:"top",positionData:e.height,children:[{type:"kern",size:i},{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:e}]},t);return Z.makeSpan(["mord","underline"],[r],t)},mathmlBuilder(e,t){var r=new E.MathNode("mo",[new E.TextNode("‾")]);return r.setAttribute("stretchy","true"),(e=new E.MathNode("munder",[io(e.body,t),r])).setAttribute("accentunder","true"),e}}),o({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){return{type:"vcenter",mode:(e=e.parser).mode,body:t[0]}},htmlBuilder(e,t){var e=Xs(e.body,t),r=t.fontMetrics().axisHeight,r=.5*(e.height-r-(e.depth+r));return Z.makeVList({positionType:"shift",positionData:r,children:[{type:"elem",elem:e}]},t)},mathmlBuilder(e,t){return new E.MathNode("mpadded",[io(e.body,t)],["vcenter"])}}),o({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new X("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var r=Il(e),i=[],n=t.havingStyle(t.style.text()),a=0;ae.body.replace(/ /g,e.star?"␣":" "),"makeVerb"),Dl=Ds,Ml=new RegExp("[̀-ͯ]+$"),Ol=class{static{mt(this,"Lexer")}constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp("([ \r\n\t]+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧‪-퟿豈-￿][̀-ͯ]*|[\ud800-\udbff][\udc00-\udfff][̀-ͯ]*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|(\\\\[a-zA-Z@]+)[ \r\n\t]*|\\\\[^\ud800-\udfff])","g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new Yn("EOF",new Wn(this,t,t));if(null===(i=this.tokenRegex.exec(e))||i.index!==t)throw new X("Unexpected character: '"+e[t]+"'",new Yn(e[t],new Wn(this,t,t+1)));var r,i=i[6]||i[3]||(i[2]?"\\ ":" ");return 14===this.catcodes[i]?(-1===(r=e.indexOf(` `,this.tokenRegex.lastIndex))?(this.tokenRegex.lastIndex=e.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 Yn(i,new Wn(this,t,this.tokenRegex.lastIndex))}},Pl=class{static{mt(this,"Namespace")}constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,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 e,t=this.undefStack.pop();for(e in t)t.hasOwnProperty(e)&&(null==t[e]?delete this.current[e]:this.current[e]=t[e])}endGroups(){for(;0{var n=e.consumeArg().tokens;if(1!==n.length)throw new X("\\newcommand's first argument must be a macro name");var a=n[0].text,s=e.isDefined(a);if(s&&!t)throw new X("\\newcommand{"+a+"} attempting to redefine "+a+"; use \\renewcommand");if(!s&&!r)throw new X("\\renewcommand{"+a+"} when command "+a+" does not yet exist; use \\newcommand");if(t=0,1===(n=e.consumeArg().tokens).length&&"["===n[0].text){for(var o="",l=e.expandNextToken();"]"!==l.text&&"EOF"!==l.text;)o+=l.text,l=e.expandNextToken();if(!o.match(/^\s*[0-9]+\s*$/))throw new X("Invalid number of arguments: "+o);t=parseInt(o),n=e.consumeArg().tokens}return s&&i||e.macros.set(a,{tokens:n,numArgs:t}),""},"newcommand"),l("\\newcommand",e=>Fl(e,!1,!0,!1)),l("\\renewcommand",e=>Fl(e,!0,!1,!1)),l("\\providecommand",e=>Fl(e,!0,!0,!0)),l("\\message",e=>(e=e.consumeArgs(1)[0],console.log(e.reverse().map(e=>e.text).join("")),"")),l("\\errmessage",e=>(e=e.consumeArgs(1)[0],console.error(e.reverse().map(e=>e.text).join("")),"")),l("\\show",e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),Dl[r],Ka.math[r],Ka.text[r]),""}),l("\\bgroup","{"),l("\\egroup","}"),l("~","\\nobreakspace"),l("\\lq","`"),l("\\rq","'"),l("\\aa","\\r a"),l("\\AA","\\r A"),l("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),l("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),l("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),l("ℬ","\\mathscr{B}"),l("ℰ","\\mathscr{E}"),l("ℱ","\\mathscr{F}"),l("ℋ","\\mathscr{H}"),l("ℐ","\\mathscr{I}"),l("ℒ","\\mathscr{L}"),l("ℳ","\\mathscr{M}"),l("ℛ","\\mathscr{R}"),l("ℭ","\\mathfrak{C}"),l("ℌ","\\mathfrak{H}"),l("ℨ","\\mathfrak{Z}"),l("\\Bbbk","\\Bbb{k}"),l("·","\\cdotp"),l("\\llap","\\mathllap{\\textrm{#1}}"),l("\\rlap","\\mathrlap{\\textrm{#1}}"),l("\\clap","\\mathclap{\\textrm{#1}}"),l("\\mathstrut","\\vphantom{(}"),l("\\underbar","\\underline{\\text{#1}}"),l("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),l("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),l("\\ne","\\neq"),l("≠","\\neq"),l("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),l("∉","\\notin"),l("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),l("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),l("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),l("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),l("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),l("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),l("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),l("⟂","\\perp"),l("‼","\\mathclose{!\\mkern-0.8mu!}"),l("∌","\\notni"),l("⌜","\\ulcorner"),l("⌝","\\urcorner"),l("⌞","\\llcorner"),l("⌟","\\lrcorner"),l("©","\\copyright"),l("®","\\textregistered"),l("️","\\textregistered"),l("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),l("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),l("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),l("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),l("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),l("⋮","\\vdots"),l("\\varGamma","\\mathit{\\Gamma}"),l("\\varDelta","\\mathit{\\Delta}"),l("\\varTheta","\\mathit{\\Theta}"),l("\\varLambda","\\mathit{\\Lambda}"),l("\\varXi","\\mathit{\\Xi}"),l("\\varPi","\\mathit{\\Pi}"),l("\\varSigma","\\mathit{\\Sigma}"),l("\\varUpsilon","\\mathit{\\Upsilon}"),l("\\varPhi","\\mathit{\\Phi}"),l("\\varPsi","\\mathit{\\Psi}"),l("\\varOmega","\\mathit{\\Omega}"),l("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),l("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),l("\\boxed","\\fbox{$\\displaystyle{#1}$}"),l("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),l("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),l("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),l("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),l("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}"),zl={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},l("\\dots",function(e){var t="\\dotso";return(e=e.expandAfterFuture().text)in zl?t=zl[e]:("\\not"===e.slice(0,4)||e in Ka.math&&["bin","rel"].includes(Ka.math[e].group))&&(t="\\dotsb"),t}),ql={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0},l("\\dotso",function(e){return e.future().text in ql?"\\ldots\\,":"\\ldots"}),l("\\dotsc",function(e){return(e=e.future().text)in ql&&","!==e?"\\ldots\\,":"\\ldots"}),l("\\cdots",function(e){return e.future().text in ql?"\\@cdots\\,":"\\@cdots"}),l("\\dotsb","\\cdots"),l("\\dotsm","\\cdots"),l("\\dotsi","\\!\\cdots"),l("\\dotsx","\\ldots\\,"),l("\\DOTSI","\\relax"),l("\\DOTSB","\\relax"),l("\\DOTSX","\\relax"),l("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),l("\\,","\\tmspace+{3mu}{.1667em}"),l("\\thinspace","\\,"),l("\\>","\\mskip{4mu}"),l("\\:","\\tmspace+{4mu}{.2222em}"),l("\\medspace","\\:"),l("\\;","\\tmspace+{5mu}{.2777em}"),l("\\thickspace","\\;"),l("\\!","\\tmspace-{3mu}{.1667em}"),l("\\negthinspace","\\!"),l("\\negmedspace","\\tmspace-{4mu}{.2222em}"),l("\\negthickspace","\\tmspace-{5mu}{.277em}"),l("\\enspace","\\kern.5em "),l("\\enskip","\\hskip.5em\\relax"),l("\\quad","\\hskip1em\\relax"),l("\\qquad","\\hskip2em\\relax"),l("\\tag","\\@ifstar\\tag@literal\\tag@paren"),l("\\tag@paren","\\tag@literal{({#1})}"),l("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new X("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),l("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),l("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),l("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),l("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),l("\\newline","\\\\\\relax"),l("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}"),l("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+(Ul=K(ka["Main-Regular"][84][1]-.7*ka["Main-Regular"][65][1]))+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),l("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+Ul+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),l("\\hspace","\\@ifstar\\@hspacer\\@hspace"),l("\\@hspace","\\hskip #1\\relax"),l("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),l("\\ordinarycolon",":"),l("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),l("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),l("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),l("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),l("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),l("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),l("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),l("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),l("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),l("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),l("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),l("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),l("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),l("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),l("∷","\\dblcolon"),l("∹","\\eqcolon"),l("≔","\\coloneqq"),l("≕","\\eqqcolon"),l("⩴","\\Coloneqq"),l("\\ratio","\\vcentcolon"),l("\\coloncolon","\\dblcolon"),l("\\colonequals","\\coloneqq"),l("\\coloncolonequals","\\Coloneqq"),l("\\equalscolon","\\eqqcolon"),l("\\equalscoloncolon","\\Eqqcolon"),l("\\colonminus","\\coloneq"),l("\\coloncolonminus","\\Coloneq"),l("\\minuscolon","\\eqcolon"),l("\\minuscoloncolon","\\Eqcolon"),l("\\coloncolonapprox","\\Colonapprox"),l("\\coloncolonsim","\\Colonsim"),l("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),l("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),l("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),l("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),l("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),l("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),l("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),l("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),l("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),l("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),l("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),l("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),l("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),l("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),l("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),l("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),l("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),l("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),l("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),l("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),l("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),l("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),l("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),l("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),l("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),l("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),l("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),l("\\imath","\\html@mathml{\\@imath}{ı}"),l("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),l("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),l("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),l("⟦","\\llbracket"),l("⟧","\\rrbracket"),l("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),l("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),l("⦃","\\lBrace"),l("⦄","\\rBrace"),l("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),l("⦵","\\minuso"),l("\\darr","\\downarrow"),l("\\dArr","\\Downarrow"),l("\\Darr","\\Downarrow"),l("\\lang","\\langle"),l("\\rang","\\rangle"),l("\\uarr","\\uparrow"),l("\\uArr","\\Uparrow"),l("\\Uarr","\\Uparrow"),l("\\N","\\mathbb{N}"),l("\\R","\\mathbb{R}"),l("\\Z","\\mathbb{Z}"),l("\\alef","\\aleph"),l("\\alefsym","\\aleph"),l("\\Alpha","\\mathrm{A}"),l("\\Beta","\\mathrm{B}"),l("\\bull","\\bullet"),l("\\Chi","\\mathrm{X}"),l("\\clubs","\\clubsuit"),l("\\cnums","\\mathbb{C}"),l("\\Complex","\\mathbb{C}"),l("\\Dagger","\\ddagger"),l("\\diamonds","\\diamondsuit"),l("\\empty","\\emptyset"),l("\\Epsilon","\\mathrm{E}"),l("\\Eta","\\mathrm{H}"),l("\\exist","\\exists"),l("\\harr","\\leftrightarrow"),l("\\hArr","\\Leftrightarrow"),l("\\Harr","\\Leftrightarrow"),l("\\hearts","\\heartsuit"),l("\\image","\\Im"),l("\\infin","\\infty"),l("\\Iota","\\mathrm{I}"),l("\\isin","\\in"),l("\\Kappa","\\mathrm{K}"),l("\\larr","\\leftarrow"),l("\\lArr","\\Leftarrow"),l("\\Larr","\\Leftarrow"),l("\\lrarr","\\leftrightarrow"),l("\\lrArr","\\Leftrightarrow"),l("\\Lrarr","\\Leftrightarrow"),l("\\Mu","\\mathrm{M}"),l("\\natnums","\\mathbb{N}"),l("\\Nu","\\mathrm{N}"),l("\\Omicron","\\mathrm{O}"),l("\\plusmn","\\pm"),l("\\rarr","\\rightarrow"),l("\\rArr","\\Rightarrow"),l("\\Rarr","\\Rightarrow"),l("\\real","\\Re"),l("\\reals","\\mathbb{R}"),l("\\Reals","\\mathbb{R}"),l("\\Rho","\\mathrm{P}"),l("\\sdot","\\cdot"),l("\\sect","\\S"),l("\\spades","\\spadesuit"),l("\\sub","\\subset"),l("\\sube","\\subseteq"),l("\\supe","\\supseteq"),l("\\Tau","\\mathrm{T}"),l("\\thetasym","\\vartheta"),l("\\weierp","\\wp"),l("\\Zeta","\\mathrm{Z}"),l("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),l("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),l("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),l("\\bra","\\mathinner{\\langle{#1}|}"),l("\\ket","\\mathinner{|{#1}\\rangle}"),l("\\braket","\\mathinner{\\langle{#1}\\rangle}"),l("\\Bra","\\left\\langle#1\\right|"),l("\\Ket","\\left|#1\\right\\rangle"),l("\\bra@ket",(Gl=mt(l=>e=>{var t=e.consumeArg().tokens,i=e.consumeArg().tokens,n=e.consumeArg().tokens,r=e.consumeArg().tokens,a=e.macros.get("|"),s=e.macros.get("\\|"),o=(e.macros.beginGroup(),mt(r=>e=>{l&&(e.macros.set("|",a),n.length)&&e.macros.set("\\|",s);var t=r;return!r&&n.length&&"|"===e.future().text&&(e.popToken(),t=!0),{tokens:t?n:i,numArgs:0}},"midMacro")),o=(e.macros.set("|",o(!1)),n.length&&e.macros.set("\\|",o(!0)),e.consumeArg().tokens),r=e.expandTokens([...r,...o,...t]);return e.macros.endGroup(),{tokens:r.reverse(),numArgs:0}},"braketHelper"))(!1)),l("\\bra@set",Gl(!0)),l("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),l("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),l("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),l("\\angln","{\\angl n}"),l("\\blue","\\textcolor{##6495ed}{#1}"),l("\\orange","\\textcolor{##ffa500}{#1}"),l("\\pink","\\textcolor{##ff00af}{#1}"),l("\\red","\\textcolor{##df0030}{#1}"),l("\\green","\\textcolor{##28ae7b}{#1}"),l("\\gray","\\textcolor{gray}{#1}"),l("\\purple","\\textcolor{##9d38bd}{#1}"),l("\\blueA","\\textcolor{##ccfaff}{#1}"),l("\\blueB","\\textcolor{##80f6ff}{#1}"),l("\\blueC","\\textcolor{##63d9ea}{#1}"),l("\\blueD","\\textcolor{##11accd}{#1}"),l("\\blueE","\\textcolor{##0c7f99}{#1}"),l("\\tealA","\\textcolor{##94fff5}{#1}"),l("\\tealB","\\textcolor{##26edd5}{#1}"),l("\\tealC","\\textcolor{##01d1c1}{#1}"),l("\\tealD","\\textcolor{##01a995}{#1}"),l("\\tealE","\\textcolor{##208170}{#1}"),l("\\greenA","\\textcolor{##b6ffb0}{#1}"),l("\\greenB","\\textcolor{##8af281}{#1}"),l("\\greenC","\\textcolor{##74cf70}{#1}"),l("\\greenD","\\textcolor{##1fab54}{#1}"),l("\\greenE","\\textcolor{##0d923f}{#1}"),l("\\goldA","\\textcolor{##ffd0a9}{#1}"),l("\\goldB","\\textcolor{##ffbb71}{#1}"),l("\\goldC","\\textcolor{##ff9c39}{#1}"),l("\\goldD","\\textcolor{##e07d10}{#1}"),l("\\goldE","\\textcolor{##a75a05}{#1}"),l("\\redA","\\textcolor{##fca9a9}{#1}"),l("\\redB","\\textcolor{##ff8482}{#1}"),l("\\redC","\\textcolor{##f9685d}{#1}"),l("\\redD","\\textcolor{##e84d39}{#1}"),l("\\redE","\\textcolor{##bc2612}{#1}"),l("\\maroonA","\\textcolor{##ffbde0}{#1}"),l("\\maroonB","\\textcolor{##ff92c6}{#1}"),l("\\maroonC","\\textcolor{##ed5fa6}{#1}"),l("\\maroonD","\\textcolor{##ca337c}{#1}"),l("\\maroonE","\\textcolor{##9e034e}{#1}"),l("\\purpleA","\\textcolor{##ddd7ff}{#1}"),l("\\purpleB","\\textcolor{##c6b9fc}{#1}"),l("\\purpleC","\\textcolor{##aa87ff}{#1}"),l("\\purpleD","\\textcolor{##7854ab}{#1}"),l("\\purpleE","\\textcolor{##543b78}{#1}"),l("\\mintA","\\textcolor{##f5f9e8}{#1}"),l("\\mintB","\\textcolor{##edf2df}{#1}"),l("\\mintC","\\textcolor{##e0e5cc}{#1}"),l("\\grayA","\\textcolor{##f6f7f7}{#1}"),l("\\grayB","\\textcolor{##f0f1f2}{#1}"),l("\\grayC","\\textcolor{##e3e5e6}{#1}"),l("\\grayD","\\textcolor{##d6d8da}{#1}"),l("\\grayE","\\textcolor{##babec2}{#1}"),l("\\grayF","\\textcolor{##888d93}{#1}"),l("\\grayG","\\textcolor{##626569}{#1}"),l("\\grayH","\\textcolor{##3b3e40}{#1}"),l("\\grayI","\\textcolor{##21242c}{#1}"),l("\\kaBlue","\\textcolor{##314453}{#1}"),l("\\kaGreen","\\textcolor{##71B307}{#1}"),jl={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},Wl=class{static{mt(this,"MacroExpander")}constructor(e,t,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Pl($l,t.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new Ol(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,r,i;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),{tokens:i,end:r}=this.consumeArg(["]"])}else({tokens:i,start:t,end:r}=this.consumeArg());return this.pushToken(new Yn("EOF",r.loc)),this.pushTokens(i),new Yn("",Wn.range(t,r))}consumeSpaces(){for(;" "===this.future().text;)this.stack.pop()}consumeArg(e){var t,r=[],i=e&&0this.settings.maxExpand)throw new X("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),r=t.text,i=t.noexpand?null:this._getExpansion(r);if(null==i||e&&i.unexpandable){if(e&&null==i&&"\\"===r[0]&&!this.isDefined(r))throw new X("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);var n=i.tokens,a=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs)for(var s=(n=n.slice()).length-1;0<=s;--s){var o=n[s];if("#"===o.text){if(0===s)throw new X("Incomplete placeholder at end of macro body",o);if("#"===(o=n[--s]).text)n.splice(s+1,1);else{if(!/^[1-9]$/.test(o.text))throw new X("Not a valid argument number",o);n.splice(s,2,...a[+o.text-1])}}}return this.pushTokens(n),n.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;){var e;if(!1===this.expandOnce())return(e=this.stack.pop()).treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new Yn(e)]):void 0}expandTokens(e){var t,r=[],i=this.stack.length;for(this.pushTokens(e);this.stack.length>i;)!1===this.expandOnce(!0)&&((t=this.stack.pop()).treatAsRelax&&(t.noexpand=!1,t.treatAsRelax=!1),r.push(t));return this.countExpansion(r.length),r}expandMacroAsText(e){return(e=this.expandMacro(e))&&e.map(e=>e.text).join("")}_getExpansion(e){var t=this.macros.get(e);if(null==t)return t;if(1!==e.length||null==(e=this.lexer.catcodes[e])||13===e){if("string"!=typeof(e="function"==typeof t?t(this):t))return e;var r=0;if(-1!==e.indexOf("#"))for(var i=e.replace(/##/g,"");-1!==i.indexOf("#"+(r+1));)++r;for(var n=new Ol(e,this.settings),a=[],s=n.lex();"EOF"!==s.text;)a.push(s),s=n.lex();return a.reverse(),{tokens:a,numArgs:r}}}isDefined(e){return this.macros.has(e)||Dl.hasOwnProperty(e)||Ka.math.hasOwnProperty(e)||Ka.text.hasOwnProperty(e)||jl.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:Dl.hasOwnProperty(e)&&!Dl[e].primitive}},Yl=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Vl=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g","ʰ":"h","ⁱ":"i","ʲ":"j","ᵏ":"k","ˡ":"l","ᵐ":"m","ⁿ":"n","ᵒ":"o","ᵖ":"p","ʳ":"r","ˢ":"s","ᵗ":"t","ᵘ":"u","ᵛ":"v","ʷ":"w","ˣ":"x","ʸ":"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Hl={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},Xl={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"},(Kl=class a{static{mt(this,"Parser")}constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Wl(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new X("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken,e=(this.consume(),this.gullet.pushToken(new Yn("}")),this.gullet.pushTokens(e),this.parseExpression(!1));return this.expect("}"),this.nextToken=t,e}parseExpression(e,t){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var i=this.fetch();if(-1!==a.endOfExpression.indexOf(i.text)||t&&i.text===t||e&&Dl[i.text]&&Dl[i.text].infix)break;if(!(i=this.parseAtom(t)))break;"internal"!==i.type&&r.push(i)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t,r,i,n=-1,a=0;a{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),dn.addHook("afterSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target"))&&e.setAttribute("rel","noopener")})}var cc,hc,uc,dc,pc,gc,fc,mc,yc,vc,bc,xc,Tc,wc,kc,Ec,_c,Sc,Cc,Ac,Rc,Lc,Nc,Ic,L,Dc,Mc,Oc,Pc,$c,Bc,Fc,zc=s(()=>{pn(),li(),cc=//gi,hc=mt(e=>e?bc(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),uc=(()=>{let e=!1;return()=>{e||(lc(),e=!0)}})(),mt(lc,"setupDompurifyHooks"),dc=mt(e=>(uc(),dn.sanitize(e)),"removeScript"),pc=mt((e,t)=>(vr(t)&&("antiscript"===(t=t.securityLevel)||"strict"===t||"sandbox"===t?e=dc(e):"loose"!==t&&(e=(e=(e=bc(e)).replace(//g,">")).replace(/=/g,"="),e=vc(e))),e),"sanitizeMore"),gc=mt((e,t)=>e&&(t.dompurifyConfig?dn.sanitize(pc(e,t),t.dompurifyConfig):dn.sanitize(pc(e,t),{FORBID_TAGS:["style"]})).toString(),"sanitizeText"),fc=mt((e,t)=>"string"==typeof e?gc(e,t):e.flat().map(e=>gc(e,t)),"sanitizeTextOrArray"),mc=mt(e=>cc.test(e),"hasBreaks"),yc=mt(e=>e.split(cc),"splitBreaks"),vc=mt(e=>e.replace(/#br#/g,"
"),"placeholderToBreak"),bc=mt(e=>e.replace(cc,"#br#"),"breakToPlaceholder"),xc=mt(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),Tc=mt(function(...e){return e=e.filter(e=>!isNaN(e)),Math.max(...e)},"getMax"),wc=mt(function(...e){return e=e.filter(e=>!isNaN(e)),Math.min(...e)},"getMin"),kc=mt(function(e){var r,i,n=e.split(/(,)/),a=[];for(let t=0;tMath.max(0,e.split(t).length-1),"countOccurrence"),_c=mt((e,t)=>(e=Ec(e,"~"),t=Ec(t,"~"),1===e&&1===t),"shouldCombineSets"),Sc=mt(e=>{let t=Ec(e,"~"),r=!1;if(t<=1)return e;t%2!=0&&e.startsWith("~")&&(e=e.substring(1),r=!0);let i=[...e],n=i.indexOf("~"),a=i.lastIndexOf("~");for(;-1!==n&&-1!==a&&n!==a;)i[n]="<",i[a]=">",n=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Cc=mt(()=>void 0!==window.MathMLElement,"isMathMLSupported"),Ac=/\$\$(.*)\$\$/g,Rc=mt(e=>0<(e.match(Ac)?.length??0),"hasKatex"),Lc=mt(async(e,t)=>{var r=document.createElement("div"),e=(r.innerHTML=await Ic(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r),{width:r.clientWidth,height:r.clientHeight});return r.remove(),e},"calculateMathMLDimensions"),Nc=mt(async(e,t)=>{if(!Rc(e))return e;if(!(Cc()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Ac,"MathML is unsupported in this environment.");{let r=(await Promise.resolve().then(()=>(oc(),gn))).default,i=t.forceLegacyMathML||!Cc()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(cc).map(e=>Rc(e)?`
${e}
`:`
${e}
`).join("").replace(Ac,(e,t)=>r.renderToString(t,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(//g,""))}},"renderKatexUnsanitized"),Ic=mt(async(e,t)=>gc(await Nc(e,t),t),"renderKatexSanitized"),L={getRows:hc,sanitizeText:gc,sanitizeTextOrArray:fc,hasBreaks:mc,splitBreaks:yc,lineBreakRegex:cc,removeScript:dc,getUrl:xc,evaluate:Qt,getMax:Tc,getMin:wc}}),qc=s(()=>{xr(),li(),zc(),e(),Dc={body:'?',height:80,width:80},Mc=new Map,Oc=new Map,Pc=mt(e=>{for(var t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(M.debug("Registering icon pack:",t.name),"loader"in t)Oc.set(t.name,t.loader);else{if(!("icons"in t))throw M.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');Mc.set(t.name,t.icons)}}},"registerIconPacks"),$c=mt(async(e,t)=>{var r=C(e,!0,void 0!==t);if(!r)throw new Error("Invalid icon name: "+e);if(!(t=r.prefix||t))throw new Error("Icon name must contain a prefix: "+e);let i=Mc.get(t);if(!i){var n=Oc.get(t);if(!n)throw new Error("Icon set not found: "+r.prefix);try{i={...await n(),prefix:t},Mc.set(t,i)}catch(e){throw M.error(e),new Error("Failed to load icon set: "+r.prefix)}}if(n=le(i,r.name))return n;throw new Error("Icon not found: "+e)},"getRegisteredIconData"),Bc=mt(async e=>{try{return await $c(e),!0}catch{return!1}},"isIconAvailable"),Fc=mt(async(e,t,r)=>{let i;try{i=await $c(e,t?.fallbackPrefix)}catch(e){M.error(e),i=Dc}return t=Ce(we((e=be(i,t)).body),{...e.attributes,...r}),gc(t,cr())},"getIconSVG")});function Uc(e){for(var t=[],r=1;r{mt(Uc,"dedent")}),ch=s(()=>{Gc=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,jc=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Wc=/\s*%%.*\n/gm}),hh=s(()=>{Yc=class extends Error{static{mt(this,"UnknownDiagramError")}constructor(e){super(e),this.name="UnknownDiagramError"}}}),uh=s(()=>{e(),ch(),hh(),Vc={},Hc=mt(function(e,t){e=e.replace(Gc,"").replace(jc,"").replace(Wc,` `);for(var[r,{detector:i}]of Object.entries(Vc))if(i(e,t))return r;throw new Yc("No diagram type detected matching given configuration for text: "+e)},"detectType"),Xc=mt((...e)=>{for(var{id:t,detector:r,loader:i}of e)Kc(t,r,i)},"registerLazyLoadedDiagrams"),Kc=mt((e,t,r)=>{Vc[e]&&M.warn(`Detector with key ${e} already exists. Overwriting.`),Vc[e]={detector:t,loader:r},M.debug(`Detector with key ${e} added`+(r?" with loader":""))},"addDetector"),Zc=mt(e=>Vc[e].loader,"getDiagramLoader")}),dh=s(()=>{function $(){this.yy={}}var e=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),t=[1,24],r=[1,25],B=[1,26],F=[1,27],z=[1,28],i=[1,63],n=[1,64],a=[1,65],s=[1,66],o=[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],b=[1,37],x=[1,38],T=[1,39],w=[1,40],k=[1,41],E=[1,42],_=[1,43],S=[1,44],C=[1,45],A=[1,46],R=[1,47],L=[1,48],N=[1,50],q=[1,51],U=[1,52],G=[1,53],j=[1,54],W=[1,55],Y=[1,56],V=[1,57],H=[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],I=[1,82],D=[1,83],M=[1,84],O=[1,85],P=[12,14,42],ee=[12,14,33,42],te=[12,14,33,42,76,77,79,80],re=[12,33],ie=[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],t={trace:mt(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],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 3:i.setDirection("TB");break;case 4:i.setDirection("BT");break;case 5:i.setDirection("RL");break;case 6:i.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:i.setC4Type(a[o-3]);break;case 19:i.setTitle(a[o].substring(6)),this.$=a[o].substring(6);break;case 20:i.setAccDescription(a[o].substring(15)),this.$=a[o].substring(15);break;case 21:this.$=a[o].trim(),i.setTitle(this.$);break;case 22:case 23:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 28:a[o].splice(2,0,"ENTERPRISE"),i.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 29:a[o].splice(2,0,"SYSTEM"),i.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 30:i.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 31:a[o].splice(2,0,"CONTAINER"),i.addContainerBoundary(...a[o]),this.$=a[o];break;case 32:i.addDeploymentNode("node",...a[o]),this.$=a[o];break;case 33:i.addDeploymentNode("nodeL",...a[o]),this.$=a[o];break;case 34:i.addDeploymentNode("nodeR",...a[o]),this.$=a[o];break;case 35:i.popBoundaryParseStack();break;case 39:i.addPersonOrSystem("person",...a[o]),this.$=a[o];break;case 40:i.addPersonOrSystem("external_person",...a[o]),this.$=a[o];break;case 41:i.addPersonOrSystem("system",...a[o]),this.$=a[o];break;case 42:i.addPersonOrSystem("system_db",...a[o]),this.$=a[o];break;case 43:i.addPersonOrSystem("system_queue",...a[o]),this.$=a[o];break;case 44:i.addPersonOrSystem("external_system",...a[o]),this.$=a[o];break;case 45:i.addPersonOrSystem("external_system_db",...a[o]),this.$=a[o];break;case 46:i.addPersonOrSystem("external_system_queue",...a[o]),this.$=a[o];break;case 47:i.addContainer("container",...a[o]),this.$=a[o];break;case 48:i.addContainer("container_db",...a[o]),this.$=a[o];break;case 49:i.addContainer("container_queue",...a[o]),this.$=a[o];break;case 50:i.addContainer("external_container",...a[o]),this.$=a[o];break;case 51:i.addContainer("external_container_db",...a[o]),this.$=a[o];break;case 52:i.addContainer("external_container_queue",...a[o]),this.$=a[o];break;case 53:i.addComponent("component",...a[o]),this.$=a[o];break;case 54:i.addComponent("component_db",...a[o]),this.$=a[o];break;case 55:i.addComponent("component_queue",...a[o]),this.$=a[o];break;case 56:i.addComponent("external_component",...a[o]),this.$=a[o];break;case 57:i.addComponent("external_component_db",...a[o]),this.$=a[o];break;case 58:i.addComponent("external_component_queue",...a[o]),this.$=a[o];break;case 60:i.addRel("rel",...a[o]),this.$=a[o];break;case 61:i.addRel("birel",...a[o]),this.$=a[o];break;case 62:i.addRel("rel_u",...a[o]),this.$=a[o];break;case 63:i.addRel("rel_d",...a[o]),this.$=a[o];break;case 64:i.addRel("rel_l",...a[o]),this.$=a[o];break;case 65:i.addRel("rel_r",...a[o]),this.$=a[o];break;case 66:i.addRel("rel_b",...a[o]),this.$=a[o];break;case 67:a[o].splice(0,1),i.addRel("rel",...a[o]),this.$=a[o];break;case 68:i.updateElStyle("update_el_style",...a[o]),this.$=a[o];break;case 69:i.updateRelStyle("update_rel_style",...a[o]),this.$=a[o];break;case 70:i.updateLayoutConfig("update_layout_config",...a[o]),this.$=a[o];break;case 71:this.$=[a[o]];break;case 72:a[o].unshift(a[o-1]),this.$=a[o];break;case 73:case 75:this.$=a[o].trim();break;case 74:var l={};l[a[o-1].trim()]=a[o].trim(),this.$=l;break;case 76:this.$=""}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:r,24:B,26:F,28:z,29:49,30:61,32:62,34:i,36:n,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:b,53:x,54:T,55:w,56:k,57:E,58:_,59:S,60:C,61:A,62:R,63:L,64:N,65:q,66:U,67:G,68:j,69:W,70:Y,71:V,72:H,73:X,74:K},{13:70,19:20,20:21,21:22,22:t,23:r,24:B,26:F,28:z,29:49,30:61,32:62,34:i,36:n,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:b,53:x,54:T,55:w,56:k,57:E,58:_,59:S,60:C,61:A,62:R,63:L,64:N,65:q,66:U,67:G,68:j,69:W,70:Y,71:V,72:H,73:X,74:K},{13:71,19:20,20:21,21:22,22:t,23:r,24:B,26:F,28:z,29:49,30:61,32:62,34:i,36:n,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:b,53:x,54:T,55:w,56:k,57:E,58:_,59:S,60:C,61:A,62:R,63:L,64:N,65:q,66:U,67:G,68:j,69:W,70:Y,71:V,72:H,73:X,74:K},{13:72,19:20,20:21,21:22,22:t,23:r,24:B,26:F,28:z,29:49,30:61,32:62,34:i,36:n,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:b,53:x,54:T,55:w,56:k,57:E,58:_,59:S,60:C,61:A,62:R,63:L,64:N,65:q,66:U,67:G,68:j,69:W,70:Y,71:V,72:H,73:X,74:K},{13:73,19:20,20:21,21:22,22:t,23:r,24:B,26:F,28:z,29:49,30:61,32:62,34:i,36:n,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:b,53:x,54:T,55:w,56:k,57:E,58:_,59:S,60:C,61:A,62:R,63:L,64:N,65:q,66:U,67:G,68:j,69:W,70:Y,71:V,72:H,73:X,74:K},{14:[1,74]},e(Z,[2,13],{43:23,29:49,30:61,32:62,20:75,34:i,36:n,37:a,38:s,39:o,40:l,41:h,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:b,53:x,54:T,55:w,56:k,57:E,58:_,59:S,60:C,61:A,62:R,63:L,64:N,65:q,66:U,67:G,68:j,69:W,70:Y,71:V,72:H,73:X,74:K}),e(Z,[2,14]),e(Q,[2,16],{12:[1,76]}),e(Z,[2,36],{12:[1,77]}),e(J,[2,19]),e(J,[2,20]),{25:[1,78]},{27:[1,79]},e(J,[2,23]),{35:80,75:81,76:I,77:D,79:M,80:O},{35:86,75:81,76:I,77:D,79:M,80:O},{35:87,75:81,76:I,77:D,79:M,80:O},{35:88,75:81,76:I,77:D,79:M,80:O},{35:89,75:81,76:I,77:D,79:M,80:O},{35:90,75:81,76:I,77:D,79:M,80:O},{35:91,75:81,76:I,77:D,79:M,80:O},{35:92,75:81,76:I,77:D,79:M,80:O},{35:93,75:81,76:I,77:D,79:M,80:O},{35:94,75:81,76:I,77:D,79:M,80:O},{35:95,75:81,76:I,77:D,79:M,80:O},{35:96,75:81,76:I,77:D,79:M,80:O},{35:97,75:81,76:I,77:D,79:M,80:O},{35:98,75:81,76:I,77:D,79:M,80:O},{35:99,75:81,76:I,77:D,79:M,80:O},{35:100,75:81,76:I,77:D,79:M,80:O},{35:101,75:81,76:I,77:D,79:M,80:O},{35:102,75:81,76:I,77:D,79:M,80:O},{35:103,75:81,76:I,77:D,79:M,80:O},{35:104,75:81,76:I,77:D,79:M,80:O},e(P,[2,59]),{35:105,75:81,76:I,77:D,79:M,80:O},{35:106,75:81,76:I,77:D,79:M,80:O},{35:107,75:81,76:I,77:D,79:M,80:O},{35:108,75:81,76:I,77:D,79:M,80:O},{35:109,75:81,76:I,77:D,79:M,80:O},{35:110,75:81,76:I,77:D,79:M,80:O},{35:111,75:81,76:I,77:D,79:M,80:O},{35:112,75:81,76:I,77:D,79:M,80:O},{35:113,75:81,76:I,77:D,79:M,80:O},{35:114,75:81,76:I,77:D,79:M,80:O},{35:115,75:81,76:I,77:D,79:M,80:O},{20:116,29:49,30:61,32:62,34:i,36:n,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:b,53:x,54:T,55:w,56:k,57:E,58:_,59:S,60:C,61:A,62:R,63:L,64:N,65:q,66:U,67:G,68:j,69:W,70:Y,71:V,72:H,73:X,74:K},{12:[1,118],33:[1,117]},{35:119,75:81,76:I,77:D,79:M,80:O},{35:120,75:81,76:I,77:D,79:M,80:O},{35:121,75:81,76:I,77:D,79:M,80:O},{35:122,75:81,76:I,77:D,79:M,80:O},{35:123,75:81,76:I,77:D,79:M,80:O},{35:124,75:81,76:I,77:D,79:M,80:O},{35:125,75:81,76:I,77:D,79:M,80:O},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Z,[2,15]),e(Q,[2,17],{21:22,19:130,22:t,23:r,24:B,26:F,28:z}),e(Z,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:r,24:B,26:F,28:z,34:i,36:n,37:a,38:s,39:o,40:l,41:h,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:b,53:x,54:T,55:w,56:k,57:E,58:_,59:S,60:C,61:A,62:R,63:L,64:N,65:q,66:U,67:G,68:j,69:W,70:Y,71:V,72:H,73:X,74:K}),e(J,[2,21]),e(J,[2,22]),e(P,[2,39]),e(ee,[2,71],{75:81,35:132,76:I,77:D,79:M,80:O}),e(te,[2,73]),{78:[1,133]},e(te,[2,75]),e(te,[2,76]),e(P,[2,40]),e(P,[2,41]),e(P,[2,42]),e(P,[2,43]),e(P,[2,44]),e(P,[2,45]),e(P,[2,46]),e(P,[2,47]),e(P,[2,48]),e(P,[2,49]),e(P,[2,50]),e(P,[2,51]),e(P,[2,52]),e(P,[2,53]),e(P,[2,54]),e(P,[2,55]),e(P,[2,56]),e(P,[2,57]),e(P,[2,58]),e(P,[2,60]),e(P,[2,61]),e(P,[2,62]),e(P,[2,63]),e(P,[2,64]),e(P,[2,65]),e(P,[2,66]),e(P,[2,67]),e(P,[2,68]),e(P,[2,69]),e(P,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(re,[2,28]),e(re,[2,29]),e(re,[2,30]),e(re,[2,31]),e(re,[2,32]),e(re,[2,33]),e(re,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Q,[2,18]),e(Z,[2,38]),e(ee,[2,72]),e(te,[2,74]),e(P,[2,24]),e(P,[2,35]),e(ie,[2,25]),e(ie,[2,26],{12:[1,138]}),e(ie,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0{e(),eh=mt(function(e,t){for(var r of t)e.attr(r[0],r[1])},"d3Attrs"),th=mt(function(e,t,r){var i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),rh=mt(function(e,t,r,i){t=th(t,r,i),eh(e,t)},"configureSvgSize"),ih=mt(function(e,t,r,i){var n=t.node().getBBox(),a=n.width,s=(M.info(`SVG bounds: ${a}x`+(s=n.height),n),M.info("Graph bounds: 0x0",e),M.info(`Calculated bounds: ${e=a+2*r}x`+(a=s+2*r)),rh(t,a,e,i),`${n.x-r} ${n.y-r} ${n.width+2*r} `+(n.height+2*r));t.attr("viewBox",s)},"setupGraphViewbox")}),gh=s(()=>{e(),nh={},ah=mt((e,t,r)=>{let i="";return e in nh&&nh[e]?i=nh[e](r):M.warn("No theme found for "+e),` & { font-family: ${r.fontFamily}; font-size: ${r.fontSize}; fill: ${r.textColor} } @keyframes edge-animation-frame { from { stroke-dashoffset: 0; } } @keyframes dash { to { stroke-dashoffset: 0; } } & .edge-animation-slow { stroke-dasharray: 9,5 !important; stroke-dashoffset: 900; animation: dash 50s linear infinite; stroke-linecap: round; } & .edge-animation-fast { stroke-dasharray: 9,5 !important; stroke-dashoffset: 900; animation: dash 20s linear infinite; stroke-linecap: round; } /* 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 } ${i} ${t} `},"getStyles"),sh=mt((e,t)=>{void 0!==t&&(nh[e]=t)},"addStylesForDiagram"),oh=ah}),fh={};PGe(fh,{clear:()=>xh,getAccDescription:()=>Eh,getAccTitle:()=>wh,getDiagramTitle:()=>Sh,setAccDescription:()=>kh,setAccTitle:()=>Th,setDiagramTitle:()=>_h});var mh,yh,vh,bh,xh,Th,wh,kh,Eh,_h,Sh,Ch,Ah,O,Rh,Lh,Nh,Ih,Dh,Mh,Oh,Ph,$h,Bh,Fh,zh,qh,Uh,Gh,jh,Wh,Yh,Vh,Hh,Xh,Kh,Zh,Qh,Jh,eu,tu,ru,iu,nu,au,su,ou,lu,cu,hu,uu,du,pu,gu,fu,mu,yu,vu,bu,xu,Tu,wu,ku,Eu,_u,Su,Cu=s(()=>{zc(),li(),vh=yh=mh="",bh=mt(e=>gc(e,cr()),"sanitizeText"),xh=mt(()=>{yh=vh=mh=""},"clear"),Th=mt(e=>{mh=bh(e).replace(/^\s+/g,"")},"setAccTitle"),wh=mt(()=>mh,"getAccTitle"),kh=mt(e=>{vh=bh(e).replace(/\n\s+/g,` `)},"setAccDescription"),Eh=mt(()=>vh,"getAccDescription"),_h=mt(e=>{yh=bh(e)},"setDiagramTitle"),Sh=mt(()=>yh,"getDiagramTitle")}),Au=s(()=>{uh(),e(),li(),zc(),ph(),gh(),Cu(),Ch=M,Ah=Ie,O=cr,Rh=lr,Lh=Zt,Nh=mt(e=>gc(e,O()),"sanitizeText"),Ih=ih,Dh=mt(()=>fh,"getCommonDb"),Mh={},Oh=mt((e,t,r)=>{Mh[e]&&Ch.warn(`Diagram with id ${e} already registered. Overwriting.`),Mh[e]=t,r&&Kc(e,r),sh(e,t.styles),t.injectUtils?.(Ch,Ah,O,Nh,Ih,Dh(),()=>{})},"registerDiagram"),Ph=mt(e=>{if(e in Mh)return Mh[e];throw new $h(e)},"getDiagram"),$h=class extends Error{static{mt(this,"DiagramNotFoundError")}constructor(e){super(`Diagram ${e} not found.`)}}}),Ru=s(()=>{Au(),zc(),Cu(),Bh=[],Fh=[""],Uh=[{alias:zh="global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:qh=""}],jh="",Wh=!(Gh=[]),Yh=4,Vh=2,Xh=mt(function(){return Hh},"getC4Type"),Kh=mt(function(e){Hh=gc(e,O())},"setC4Type"),Zh=mt(function(r,i,n,a,s,o,l,c,h){if(null!=r&&null!=i&&null!=n&&null!=a){let e={},t=Gh.find(e=>e.from===i&&e.to===n);t?e=t:Gh.push(e),e.type=r,e.from=i,e.to=n,e.label={text:a},null==s?e.techn={text:""}:"object"==typeof s?([r,a]=Object.entries(s)[0],e[r]={text:a}):e.techn={text:s},null==o?e.descr={text:""}:"object"==typeof o?([r,a]=Object.entries(o)[0],e[r]={text:a}):e.descr={text:o},"object"==typeof l?([s,r]=Object.entries(l)[0],e[s]=r):e.sprite=l,"object"==typeof c?([a,o]=Object.entries(c)[0],e[a]=o):e.tags=c,"object"==typeof h?([s,r]=Object.entries(h)[0],e[s]=r):e.link=h,e.wrap=xu()}},"addRel"),Qh=mt(function(r,i,n,a,s,o,l){if(null!==i&&null!==n){let e={},t=Bh.find(e=>e.alias===i);var c;t&&i===t.alias?e=t:(e.alias=i,Bh.push(e)),e.label=null==n?{text:""}:{text:n},null==a?e.descr={text:""}:"object"==typeof a?([n,c]=Object.entries(a)[0],e[n]={text:c}):e.descr={text:a},"object"==typeof s?([n,c]=Object.entries(s)[0],e[n]=c):e.sprite=s,"object"==typeof o?([a,n]=Object.entries(o)[0],e[a]=n):e.tags=o,"object"==typeof l?([c,s]=Object.entries(l)[0],e[c]=s):e.link=l,e.typeC4Shape={text:r},e.parentBoundary=zh,e.wrap=xu()}},"addPersonOrSystem"),Jh=mt(function(r,i,n,a,s,o,l,c){if(null!==i&&null!==n){let e={},t=Bh.find(e=>e.alias===i);var h;t&&i===t.alias?e=t:(e.alias=i,Bh.push(e)),e.label=null==n?{text:""}:{text:n},null==a?e.techn={text:""}:"object"==typeof a?([n,h]=Object.entries(a)[0],e[n]={text:h}):e.techn={text:a},null==s?e.descr={text:""}:"object"==typeof s?([n,h]=Object.entries(s)[0],e[n]={text:h}):e.descr={text:s},"object"==typeof o?([a,n]=Object.entries(o)[0],e[a]=n):e.sprite=o,"object"==typeof l?([h,s]=Object.entries(l)[0],e[h]=s):e.tags=l,"object"==typeof c?([a,n]=Object.entries(c)[0],e[a]=n):e.link=c,e.wrap=xu(),e.typeC4Shape={text:r},e.parentBoundary=zh}},"addContainer"),eu=mt(function(r,i,n,a,s,o,l,c){if(null!==i&&null!==n){let e={},t=Bh.find(e=>e.alias===i);var h;t&&i===t.alias?e=t:(e.alias=i,Bh.push(e)),e.label=null==n?{text:""}:{text:n},null==a?e.techn={text:""}:"object"==typeof a?([n,h]=Object.entries(a)[0],e[n]={text:h}):e.techn={text:a},null==s?e.descr={text:""}:"object"==typeof s?([n,h]=Object.entries(s)[0],e[n]={text:h}):e.descr={text:s},"object"==typeof o?([a,n]=Object.entries(o)[0],e[a]=n):e.sprite=o,"object"==typeof l?([h,s]=Object.entries(l)[0],e[h]=s):e.tags=l,"object"==typeof c?([a,n]=Object.entries(c)[0],e[a]=n):e.link=c,e.wrap=xu(),e.typeC4Shape={text:r},e.parentBoundary=zh}},"addComponent"),tu=mt(function(r,i,n,a,s){if(null!==r&&null!==i){let e={},t=Uh.find(e=>e.alias===r);var o;t&&r===t.alias?e=t:(e.alias=r,Uh.push(e)),e.label=null==i?{text:""}:{text:i},null==n?e.type={text:"system"}:"object"==typeof n?([i,o]=Object.entries(n)[0],e[i]={text:o}):e.type={text:n},"object"==typeof a?([i,o]=Object.entries(a)[0],e[i]=o):e.tags=a,"object"==typeof s?([n,i]=Object.entries(s)[0],e[n]=i):e.link=s,e.parentBoundary=zh,e.wrap=xu(),qh=zh,zh=r,Fh.push(qh)}},"addPersonOrSystemBoundary"),ru=mt(function(r,i,n,a,s){if(null!==r&&null!==i){let e={},t=Uh.find(e=>e.alias===r);var o;t&&r===t.alias?e=t:(e.alias=r,Uh.push(e)),e.label=null==i?{text:""}:{text:i},null==n?e.type={text:"container"}:"object"==typeof n?([i,o]=Object.entries(n)[0],e[i]={text:o}):e.type={text:n},"object"==typeof a?([i,o]=Object.entries(a)[0],e[i]=o):e.tags=a,"object"==typeof s?([n,i]=Object.entries(s)[0],e[n]=i):e.link=s,e.parentBoundary=zh,e.wrap=xu(),qh=zh,zh=r,Fh.push(qh)}},"addContainerBoundary"),iu=mt(function(r,i,n,a,s,e,o,l){if(null!==i&&null!==n){let e={},t=Uh.find(e=>e.alias===i);var c;t&&i===t.alias?e=t:(e.alias=i,Uh.push(e)),e.label=null==n?{text:""}:{text:n},null==a?e.type={text:"node"}:"object"==typeof a?([n,c]=Object.entries(a)[0],e[n]={text:c}):e.type={text:a},null==s?e.descr={text:""}:"object"==typeof s?([n,c]=Object.entries(s)[0],e[n]={text:c}):e.descr={text:s},"object"==typeof o?([a,n]=Object.entries(o)[0],e[a]=n):e.tags=o,"object"==typeof l?([c,s]=Object.entries(l)[0],e[c]=s):e.link=l,e.nodeType=r,e.parentBoundary=zh,e.wrap=xu(),qh=zh,zh=i,Fh.push(qh)}},"addDeploymentNode"),nu=mt(function(){zh=qh,Fh.pop(),qh=Fh.pop(),Fh.push(qh)},"popBoundaryParseStack"),au=mt(function(e,t,r,i,n,a,s,o,l,c,h){let u=Bh.find(e=>e.alias===t);var d,p;void 0===u&&void 0===(u=Uh.find(e=>e.alias===t))||(null!=r&&("object"==typeof r?([p,d]=Object.entries(r)[0],u[p]=d):u.bgColor=r),null!=i&&("object"==typeof i?([p,d]=Object.entries(i)[0],u[p]=d):u.fontColor=i),null!=n&&("object"==typeof n?([r,p]=Object.entries(n)[0],u[r]=p):u.borderColor=n),null!=a&&("object"==typeof a?([d,i]=Object.entries(a)[0],u[d]=i):u.shadowing=a),null!=s&&("object"==typeof s?([r,p]=Object.entries(s)[0],u[r]=p):u.shape=s),null!=o&&("object"==typeof o?([n,d]=Object.entries(o)[0],u[n]=d):u.sprite=o),null!=l&&("object"==typeof l?([i,a]=Object.entries(l)[0],u[i]=a):u.techn=l),null!=c&&("object"==typeof c?([r,p]=Object.entries(c)[0],u[r]=p):u.legendText=c),null!=h&&("object"==typeof h?([s,n]=Object.entries(h)[0],u[s]=n):u.legendSprite=h))},"updateElStyle"),su=mt(function(e,t,r,i,n,a,s){var o,l,c=Gh.find(e=>e.from===t&&e.to===r);void 0!==c&&(null!=i&&("object"==typeof i?([o,l]=Object.entries(i)[0],c[o]=l):c.textColor=i),null!=n&&("object"==typeof n?([o,l]=Object.entries(n)[0],c[o]=l):c.lineColor=n),null!=a&&("object"==typeof a?([i,o]=Object.entries(a)[0],c[i]=parseInt(o)):c.offsetX=parseInt(a)),null!=s)&&("object"==typeof s?([l,n]=Object.entries(s)[0],c[l]=parseInt(n)):c.offsetY=parseInt(s))},"updateRelStyle"),ou=mt(function(e,t,r){var t="object"==typeof t?(i=Object.values(t)[0],parseInt(i)):parseInt(t),i="object"==typeof r?(i=Object.values(r)[0],parseInt(i)):parseInt(r);1<=t&&(Yh=t),1<=i&&(Vh=i)},"updateLayoutConfig"),lu=mt(function(){return Yh},"getC4ShapeInRow"),cu=mt(function(){return Vh},"getC4BoundaryInRow"),hu=mt(function(){return zh},"getCurrentBoundaryParse"),uu=mt(function(){return qh},"getParentBoundaryParse"),du=mt(function(t){return null==t?Bh:Bh.filter(e=>e.parentBoundary===t)},"getC4ShapeArray"),pu=mt(function(t){return Bh.find(e=>e.alias===t)},"getC4Shape"),gu=mt(function(e){return Object.keys(du(e))},"getC4ShapeKeys"),fu=mt(function(t){return null==t?Uh:Uh.filter(e=>e.parentBoundary===t)},"getBoundaries"),mu=fu,yu=mt(function(){return Gh},"getRels"),vu=mt(function(){return jh},"getTitle"),bu=mt(function(e){Wh=e},"setWrap"),xu=mt(function(){return Wh},"autoWrap"),Tu=mt(function(){Bh=[],Uh=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],zh="global",Fh=[qh=""],Fh=[jh=""],Wh=!(Gh=[]),Yh=4,Vh=2},"clear"),wu={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},ku={FILLED:0,OPEN:1},Eu={LEFTOF:0,RIGHTOF:1,OVER:2},_u=mt(function(e){jh=gc(e,O())},"setTitle"),Su={addPersonOrSystem:Qh,addPersonOrSystemBoundary:tu,addContainer:Jh,addContainerBoundary:ru,addComponent:eu,addDeploymentNode:iu,popBoundaryParseStack:nu,addRel:Zh,updateElStyle:au,updateRelStyle:su,updateLayoutConfig:ou,autoWrap:xu,setWrap:bu,getC4ShapeArray:du,getC4Shape:pu,getC4ShapeKeys:gu,getBoundaries:fu,getBoundarys:mu,getCurrentBoundaryParse:hu,getParentBoundaryParse:uu,getRels:yu,getTitle:vu,getC4Type:Xh,getC4ShapeInRow:lu,getC4BoundaryInRow:cu,setAccTitle:Th,getAccTitle:wh,getAccDescription:Eh,setAccDescription:kh,getConfig:mt(()=>O().c4,"getConfig"),clear:Tu,LINETYPE:wu,ARROWTYPE:ku,PLACEMENT:Eu,setTitle:_u,setC4Type:Kh}});function Lu(e,t){return null==e||null==t?NaN:e{mt(Lu,"ascending")});function Iu(e,t){return null==e||null==t?NaN:t{mt(Iu,"descending")});function Mu(r){let a,s,n;function o(e,t,r=0,i=e.length){if(r>>1}while(s(e[n],t)<0?r=1+n:i=n,r>>1}while(s(e[n],t)<=0?r=1+n:i=n,r-n(e[i],t)?i-1:i}return n=2!==r.length?(a=Lu,s=mt((e,t)=>Lu(r(e),t),"compare2"),mt((e,t)=>r(e)-t,"delta")):(a=r===Lu||r===Iu?r:Ou,s=r),mt(o,"left"),mt(e,"right"),mt(t,"center"),{left:o,center:t,right:e}}function Ou(){return 0}var Pu=s(()=>{Nu(),Du(),mt(Mu,"bisector"),mt(Ou,"zero")});function $u(e){return null===e?NaN:+e}var Bu,Fu,zu=s(()=>{mt($u,"number")}),qu=s(()=>{Nu(),Pu(),zu(),Bu=Mu(Lu).right,Mu($u).center,Fu=Bu});function Uu({_intern:e,_key:t},r){return t=t(r),e.has(t)?e.get(t):r}function Gu({_intern:e,_key:t},r){return t=t(r),e.has(t)?e.get(t):(e.set(t,r),r)}function ju({_intern:e,_key:t},r){return t=t(r),e.has(t)&&(r=e.get(t),e.delete(t)),r}function Wu(e){return null!==e&&"object"==typeof e?e.valueOf():e}var Yu,Vu=s(()=>{Yu=class extends Map{static{mt(this,"InternMap")}constructor(e,t=Wu){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(var[r,i]of e)this.set(r,i)}get(e){return super.get(Uu(this,e))}has(e){return super.has(Uu(this,e))}set(e,t){return super.set(Gu(this,e),t)}delete(e){return super.delete(ju(this,e))}},mt(Uu,"intern_get"),mt(Gu,"intern_set"),mt(ju,"intern_delete"),mt(Wu,"keyof")});function Hu(e,t,r){let i=(t-e)/Math.max(0,r),n=Math.floor(Math.log10(i)),a=i/Math.pow(10,n),s=Qu<=a?10:Ju<=a?5:ed<=a?2:1,o,l,c;return n<0?(c=Math.pow(10,-n)/s,o=Math.round(e*c),l=Math.round(t*c),o/ct&&--l,c=-c):(c=Math.pow(10,n)*s,o=Math.round(e/c),l=Math.round(t/c),o*ct&&--l),l{Qu=Math.sqrt(50),Ju=Math.sqrt(10),ed=Math.sqrt(2),mt(Hu,"tickSpec"),mt(Xu,"ticks"),mt(Ku,"tickIncrement"),mt(Zu,"tickStep")});function rd(t,r){let i;if(void 0===r)for(var e of t)null!=e&&(i{mt(rd,"max")});function nd(t,r){let i;if(void 0===r)for(var e of t)null!=e&&(i>e||void 0===i&&e<=e)&&(i=e);else{let e=-1;for(var n of t)null!=(n=r(n,++e,t))&&(i>n||void 0===i&&n<=n)&&(i=n)}return i}var ad=s(()=>{mt(nd,"min")});function sd(e,t,r){e=+e,t=+t,r=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+r;for(var i=-1,n=0|Math.max(0,Math.ceil((t-e)/r)),a=new Array(n);++i{mt(sd,"range")}),ld=s(()=>{qu(),Pu(),id(),ad(),od(),td(),Vu()});function cd(e){return e}var hd=s(()=>{mt(cd,"default")});function ud(e){return"translate("+e+",0)"}function dd(e){return"translate(0,"+e+")"}function pd(t){return e=>+t(e)}function gd(t,r){return r=Math.max(0,t.bandwidth()-2*r)/2,t.round()&&(r=Math.round(r)),e=>+t(e)+r}function fd(){return!this.__axis}function md(p,g){var f=[],m=null,y=null,v=6,b=6,x=3,T=typeof window<"u"&&1{hd(),bd=1,xd=3,mt(ud,"translateX"),mt(dd,"translateY"),mt(pd,"number"),mt(gd,"center"),mt(fd,"entering"),mt(md,"axis"),mt(yd,"axisTop"),mt(vd,"axisBottom")}),wd=s(()=>{Td()});function kd(){for(var e,t=0,r=arguments.length,i={};t{Ad={value:mt(()=>{},"value")},mt(kd,"dispatch"),mt(Ed,"Dispatch"),mt(_d,"parseTypenames"),Ed.prototype=kd.prototype={constructor:Ed,on:mt(function(e,t){var r,i=this._,n=_d(e+"",i),a=-1,s=n.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++a{Id()}),Md=s(()=>{Nd={svg:"http://www.w3.org/2000/svg",xhtml:Ld="http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function Od(e){var t=e+="",r=t.indexOf(":");return 0<=r&&"xmlns"!==(t=e.slice(0,r))&&(e=e.slice(r+1)),Nd.hasOwnProperty(t)?{space:Nd[t],local:e}:e}var Pd=s(()=>{Md(),mt(Od,"default")});function $d(r){return function(){var e=this.ownerDocument,t=this.namespaceURI;return t===Ld&&e.documentElement.namespaceURI===Ld?e.createElement(r):e.createElementNS(t,r)}}function Bd(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Fd(e){return((e=Od(e)).local?Bd:$d)(e)}var zd=s(()=>{Pd(),Md(),mt($d,"creatorInherit"),mt(Bd,"creatorFixed"),mt(Fd,"default")});function qd(){}function Ud(e){return null==e?qd:function(){return this.querySelector(e)}}var Gd=s(()=>{mt(qd,"none"),mt(Ud,"default")});function jd(e){"function"!=typeof e&&(e=Ud(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n{wg(),Gd(),mt(jd,"default")});function Yd(e){return null==e?[]:Array.isArray(e)?e:Array.from(e)}var Vd=s(()=>{mt(Yd,"array")});function Hd(){return[]}function Xd(e){return null==e?Hd:function(){return this.querySelectorAll(e)}}var Kd=s(()=>{mt(Hd,"empty"),mt(Xd,"default")});function Zd(e){return function(){return Yd(e.apply(this,arguments))}}function Qd(e){e=("function"==typeof e?Zd:Xd)(e);for(var t=this._groups,r=t.length,i=[],n=[],a=0;a{wg(),Vd(),Kd(),mt(Zd,"arrayAll"),mt(Qd,"default")});function ep(e){return function(){return this.matches(e)}}function tp(t){return function(e){return e.matches(t)}}var rp=s(()=>{mt(ep,"default"),mt(tp,"childMatcher")});function ip(e){return function(){return sp.call(this.children,e)}}function np(){return this.firstElementChild}function ap(e){return this.select(null==e?np:ip("function"==typeof e?e:tp(e)))}var sp,op=s(()=>{rp(),sp=Array.prototype.find,mt(ip,"childFind"),mt(np,"childFirst"),mt(ap,"default")});function lp(){return Array.from(this.children)}function cp(e){return function(){return up.call(this.children,e)}}function hp(e){return this.selectAll(null==e?lp:cp("function"==typeof e?e:tp(e)))}var up,dp=s(()=>{rp(),up=Array.prototype.filter,mt(lp,"children"),mt(cp,"childrenFilter"),mt(hp,"default")});function pp(e){"function"!=typeof e&&(e=ep(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n{wg(),rp(),mt(pp,"default")});function fp(e){return new Array(e.length)}var mp=s(()=>{mt(fp,"default")});function yp(){return new yg(this._enter||this._groups.map(fp),this._parents)}function vp(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}var bp=s(()=>{mp(),wg(),mt(yp,"default"),mt(vp,"EnterNode"),vp.prototype={constructor:vp,appendChild:mt(function(e){return this._parent.insertBefore(e,this._next)},"appendChild"),insertBefore:mt(function(e,t){return this._parent.insertBefore(e,t)},"insertBefore"),querySelector:mt(function(e){return this._parent.querySelector(e)},"querySelector"),querySelectorAll:mt(function(e){return this._parent.querySelectorAll(e)},"querySelectorAll")}});function xp(e){return function(){return e}}var Tp=s(()=>{mt(xp,"default")});function wp(e,t,r,i,n,a){for(var s,o=0,l=t.length,c=a.length;o{wg(),bp(),Tp(),mt(wp,"bindIndex"),mt(kp,"bindKey"),mt(Ep,"datum"),mt(_p,"default"),mt(Sp,"arraylike")});function Ap(){return new yg(this._exit||this._groups.map(fp),this._parents)}var Rp=s(()=>{mp(),wg(),mt(Ap,"default")});function Lp(e,t,r){var i=this.enter(),n=this,a=this.exit(),i="function"==typeof e?(i=e(i))&&i.selection():i.append(e+"");return null!=t&&(n=(n=t(n))&&n.selection()),null==r?a.remove():r(a),i&&n?i.merge(n).order():n}var Np=s(()=>{mt(Lp,"default")});function Ip(e){for(var e=e.selection?e.selection():e,t=this._groups,r=e._groups,i=t.length,e=r.length,n=Math.min(i,e),a=new Array(i),s=0;s{wg(),mt(Ip,"default")});function Mp(){for(var e=this._groups,t=-1,r=e.length;++t{mt(Mp,"default")});function Pp(r){function e(e,t){return e&&t?r(e.__data__,t.__data__):!e-!t}r=r||$p,mt(e,"compareNode");for(var t=this._groups,i=t.length,n=new Array(i),a=0;a{wg(),mt(Pp,"default"),mt($p,"ascending")});function Fp(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}var zp=s(()=>{mt(Fp,"default")});function qp(){return Array.from(this)}var Up=s(()=>{mt(qp,"default")});function Gp(){for(var e=this._groups,t=0,r=e.length;t{mt(Gp,"default")});function Wp(){let e=0;for(var t of this)++e;return e}var Yp=s(()=>{mt(Wp,"default")});function Vp(){return!this.node()}var Hp=s(()=>{mt(Vp,"default")});function Xp(e){for(var t=this._groups,r=0,i=t.length;r{mt(Xp,"default")});function Zp(e){return function(){this.removeAttribute(e)}}function Qp(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Jp(e,t){return function(){this.setAttribute(e,t)}}function e0(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function t0(t,r){return function(){var e=r.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function r0(t,r){return function(){var e=r.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function i0(e,t){var r,e=Od(e);return arguments.length<2?(r=this.node(),e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)):this.each((null==t?e.local?Qp:Zp:"function"==typeof t?e.local?r0:t0:e.local?e0:Jp)(e,t))}var n0=s(()=>{Pd(),mt(Zp,"attrRemove"),mt(Qp,"attrRemoveNS"),mt(Jp,"attrConstant"),mt(e0,"attrConstantNS"),mt(t0,"attrFunction"),mt(r0,"attrFunctionNS"),mt(i0,"default")});function a0(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}var s0=s(()=>{mt(a0,"default")});function o0(e){return function(){this.style.removeProperty(e)}}function l0(e,t,r){return function(){this.style.setProperty(e,t,r)}}function c0(t,r,i){return function(){var e=r.apply(this,arguments);null==e?this.style.removeProperty(t):this.style.setProperty(t,e,i)}}function h0(e,t,r){return 1{s0(),mt(o0,"styleRemove"),mt(l0,"styleConstant"),mt(c0,"styleFunction"),mt(h0,"default"),mt(u0,"styleValue")});function p0(e){return function(){delete this[e]}}function g0(e,t){return function(){this[e]=t}}function f0(t,r){return function(){var e=r.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function m0(e,t){return 1{mt(p0,"propertyRemove"),mt(g0,"propertyConstant"),mt(f0,"propertyFunction"),mt(m0,"default")});function v0(e){return e.trim().split(/^|\s+/)}function b0(e){return e.classList||new x0(e)}function x0(e){this._node=e,this._names=v0(e.getAttribute("class")||"")}function T0(e,t){for(var r=b0(e),i=-1,n=t.length;++i{mt(v0,"classArray"),mt(b0,"classList"),mt(x0,"ClassList"),x0.prototype={add:mt(function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},"add"),remove:mt(function(e){0<=(e=this._names.indexOf(e))&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},"remove"),contains:mt(function(e){return 0<=this._names.indexOf(e)},"contains")},mt(T0,"classedAdd"),mt(w0,"classedRemove"),mt(k0,"classedTrue"),mt(E0,"classedFalse"),mt(_0,"classedFunction"),mt(S0,"default")});function A0(){this.textContent=""}function R0(e){return function(){this.textContent=e}}function L0(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function N0(e){return arguments.length?this.each(null==e?A0:("function"==typeof e?L0:R0)(e)):this.node().textContent}var I0=s(()=>{mt(A0,"textRemove"),mt(R0,"textConstant"),mt(L0,"textFunction"),mt(N0,"default")});function D0(){this.innerHTML=""}function M0(e){return function(){this.innerHTML=e}}function O0(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function P0(e){return arguments.length?this.each(null==e?D0:("function"==typeof e?O0:M0)(e)):this.node().innerHTML}var $0=s(()=>{mt(D0,"htmlRemove"),mt(M0,"htmlConstant"),mt(O0,"htmlFunction"),mt(P0,"default")});function B0(){this.nextSibling&&this.parentNode.appendChild(this)}function F0(){return this.each(B0)}var z0=s(()=>{mt(B0,"raise"),mt(F0,"default")});function q0(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function U0(){return this.each(q0)}var G0=s(()=>{mt(q0,"lower"),mt(U0,"default")});function j0(e){var t="function"==typeof e?e:Fd(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}var W0=s(()=>{zd(),mt(j0,"default")});function Y0(){return null}function V0(e,t){var r="function"==typeof e?e:Fd(e),i=null==t?Y0:"function"==typeof t?t:Ud(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}var H0=s(()=>{zd(),Gd(),mt(Y0,"constantNull"),mt(V0,"default")});function X0(){var e=this.parentNode;e&&e.removeChild(this)}function K0(){return this.each(X0)}var Z0=s(()=>{mt(X0,"remove"),mt(K0,"default")});function Q0(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function J0(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function eg(e){return this.select(e?J0:Q0)}var tg=s(()=>{mt(Q0,"selection_cloneShallow"),mt(J0,"selection_cloneDeep"),mt(eg,"default")});function rg(e){return arguments.length?this.property("__data__",e):this.node().__data__}var ig=s(()=>{mt(rg,"default")});function ng(t){return function(e){t.call(this,e,this.__data__)}}function ag(e){return e.trim().split(/^|\s+/).map(function(e){var t="",r=e.indexOf(".");return 0<=r&&(t=e.slice(r+1),e=e.slice(0,r)),{type:e,name:t}})}function sg(a){return function(){var e=this.__on;if(e){for(var t,r=0,i=-1,n=e.length;r{mt(ng,"contextListener"),mt(ag,"parseTypenames"),mt(sg,"onRemove"),mt(og,"onAdd"),mt(lg,"default")});function hg(e,t,r){var i=a0(e),n=i.CustomEvent;"function"==typeof n?n=new n(t,r):(n=i.document.createEvent("Event"),r?(n.initEvent(t,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(t,!1,!1)),e.dispatchEvent(n)}function ug(e,t){return function(){return hg(this,e,t)}}function dg(e,t){return function(){return hg(this,e,t.apply(this,arguments))}}function pg(e,t){return this.each(("function"==typeof t?dg:ug)(e,t))}var gg=s(()=>{s0(),mt(hg,"dispatchEvent"),mt(ug,"dispatchConstant"),mt(dg,"dispatchFunction"),mt(pg,"default")});function*fg(){for(var e=this._groups,t=0,r=e.length;t{mt(fg,"default")});function yg(e,t){this._groups=e,this._parents=t}function vg(){return new yg([[document.documentElement]],xg)}function bg(){return this}var xg,Tg,wg=s(()=>{Wd(),Jd(),op(),dp(),gp(),Cp(),bp(),Rp(),Np(),Dp(),Op(),Bp(),zp(),Up(),jp(),Yp(),Hp(),Kp(),n0(),d0(),y0(),C0(),I0(),$0(),z0(),G0(),W0(),H0(),Z0(),tg(),ig(),cg(),gg(),mg(),xg=[null],mt(yg,"Selection"),mt(vg,"selection"),mt(bg,"selection_selection"),yg.prototype=vg.prototype={constructor:yg,select:jd,selectAll:Qd,selectChild:ap,selectChildren:hp,filter:pp,data:_p,enter:yp,exit:Ap,join:Lp,merge:Ip,selection:bg,order:Mp,sort:Pp,call:Fp,nodes:qp,node:Gp,size:Wp,empty:Vp,each:Xp,attr:i0,style:h0,property:m0,classed:S0,text:N0,html:P0,raise:F0,lower:U0,append:j0,insert:V0,remove:K0,clone:eg,datum:rg,on:lg,dispatch:pg,[Symbol.iterator]:fg},Tg=vg});function V(e){return"string"==typeof e?new yg([[document.querySelector(e)]],[document.documentElement]):new yg([[e]],xg)}var kg=s(()=>{wg(),mt(V,"default")}),Eg=s(()=>{rp(),Pd(),kg(),wg(),Gd(),Kd(),d0()}),_g=s(()=>{});function Sg(e,t,r){(e.prototype=t.prototype=r).constructor=e}function Cg(e,t){var r,i=Object.create(e.prototype);for(r in t)i[r]=t[r];return i}var Ag=s(()=>{mt(Sg,"default"),mt(Cg,"extend")});function Rg(){}function Lg(){return this.rgb().formatHex()}function Ng(){return this.rgb().formatHex8()}function Ig(){return Vg(this).formatHsl()}function Dg(){return this.rgb().formatRgb()}function Mg(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=r1.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?Og(t):3===r?new Fg(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?Pg(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?Pg(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=i1.exec(e))?new Fg(t[1],t[2],t[3],1):(t=n1.exec(e))?new Fg(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=a1.exec(e))?Pg(t[1],t[2],t[3],t[4]):(t=s1.exec(e))?Pg(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=o1.exec(e))?Yg(t[1],t[2]/100,t[3]/100,1):(t=l1.exec(e))?Yg(t[1],t[2]/100,t[3]/100,t[4]):c1.hasOwnProperty(e)?Og(c1[e]):"transparent"===e?new Fg(NaN,NaN,NaN,0):null}function Og(e){return new Fg(e>>16&255,e>>8&255,255&e,1)}function Pg(e,t,r,i){return new Fg(e=i<=0?t=r=NaN:e,t,r,i)}function $g(e){return(e=e instanceof Rg?e:Mg(e))?new Fg((e=e.rgb()).r,e.g,e.b,e.opacity):new Fg}function Bg(e,t,r,i){return 1===arguments.length?$g(e):new Fg(e,t,r,i??1)}function Fg(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}function zg(){return"#"+Wg(this.r)+Wg(this.g)+Wg(this.b)}function qg(){return"#"+Wg(this.r)+Wg(this.g)+Wg(this.b)+Wg(255*(isNaN(this.opacity)?1:this.opacity))}function Ug(){var e=Gg(this.opacity);return(1===e?"rgb(":"rgba(")+jg(this.r)+`, ${jg(this.g)}, `+jg(this.b)+(1===e?")":`, ${e})`)}function Gg(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function jg(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Wg(e){return((e=jg(e))<16?"0":"")+e.toString(16)}function Yg(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||1<=r?e=t=NaN:t<=0&&(e=NaN),new Xg(e,t,r,i)}function Vg(e){var t,r,i,n,a,s,o,l;return e instanceof Xg?new Xg(e.h,e.s,e.l,e.opacity):(e=e instanceof Rg?e:Mg(e))?e instanceof Xg?e:(t=(e=e.rgb()).r/255,r=e.g/255,i=e.b/255,n=Math.min(t,r,i),s=NaN,l=((a=Math.max(t,r,i))+n)/2,(o=a-n)?(s=t===a?(r-i)/o+6*(r{Ag(),mt(Rg,"Color"),Jg="\\s*([+-]?\\d+)\\s*",e1="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",t1="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",r1=/^#([0-9a-f]{3,8})$/,i1=new RegExp(`^rgb\\(${Jg},${Jg},${Jg}\\)$`),n1=new RegExp(`^rgb\\(${t1},${t1},${t1}\\)$`),a1=new RegExp(`^rgba\\(${Jg},${Jg},${Jg},${e1}\\)$`),s1=new RegExp(`^rgba\\(${t1},${t1},${t1},${e1}\\)$`),o1=new RegExp(`^hsl\\(${e1},${t1},${t1}\\)$`),l1=new RegExp(`^hsla\\(${e1},${t1},${t1},${e1}\\)$`),c1={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Sg(Rg,Mg,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Lg,formatHex:Lg,formatHex8:Ng,formatHsl:Ig,formatRgb:Dg,toString:Dg}),mt(Lg,"color_formatHex"),mt(Ng,"color_formatHex8"),mt(Ig,"color_formatHsl"),mt(Dg,"color_formatRgb"),mt(Mg,"color"),mt(Og,"rgbn"),mt(Pg,"rgba"),mt($g,"rgbConvert"),mt(Bg,"rgb"),mt(Fg,"Rgb"),Sg(Fg,Bg,Cg(Rg,{brighter(e){return e=null==e?1/.7:Math.pow(1/.7,e),new Fg(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new Fg(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Fg(jg(this.r),jg(this.g),jg(this.b),Gg(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:zg,formatHex:zg,formatHex8:qg,formatRgb:Ug,toString:Ug})),mt(zg,"rgb_formatHex"),mt(qg,"rgb_formatHex8"),mt(Ug,"rgb_formatRgb"),mt(Gg,"clampa"),mt(jg,"clampi"),mt(Wg,"hex"),mt(Yg,"hsla"),mt(Vg,"hslConvert"),mt(Hg,"hsl"),mt(Xg,"Hsl"),Sg(Xg,Hg,Cg(Rg,{brighter(e){return e=null==e?1/.7:Math.pow(1/.7,e),new Xg(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new Xg(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l;return new Fg(Qg(240<=e?e-240:120+e,r=2*r-(t=r+(r<.5?r:1-r)*t),t),Qg(e,r,t),Qg(e<120?240+e:e-120,r,t),this.opacity)},clamp(){return new Xg(Kg(this.h),Zg(this.s),Zg(this.l),Gg(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){var e=Gg(this.opacity);return(1===e?"hsl(":"hsla(")+Kg(this.h)+`, ${100*Zg(this.s)}%, ${100*Zg(this.l)}%`+(1===e?")":`, ${e})`)}})),mt(Kg,"clamph"),mt(Zg,"clampt"),mt(Qg,"hsl2rgb")}),p1=s(()=>{h1=Math.PI/180,u1=180/Math.PI});function g1(e){var t,r,i,n,a,s;return e instanceof m1?new m1(e.l,e.a,e.b,e.opacity):e instanceof k1?E1(e):(n=y1(.2225045*(t=x1((e=e instanceof Fg?e:$g(e)).r))+.7168786*(r=x1(e.g))+.0606169*(i=x1(e.b))),t===r&&r===i?a=s=n:(a=y1((.4360747*t+.3850649*r+.1430804*i)/.96422),s=y1((.0139322*t+.0971045*r+.7141733*i)/.82521)),new m1(116*n-16,500*(a-n),200*(n-s),e.opacity))}function f1(e,t,r,i){return 1===arguments.length?g1(e):new m1(e,t,r,i??1)}function m1(e,t,r,i){this.l=+e,this.a=+t,this.b=+r,this.opacity=+i}function y1(e){return A1{Ag(),d1(),p1(),_1=4/29,C1=3*(S1=6/29)*S1,A1=S1*S1*S1,mt(g1,"labConvert"),mt(f1,"lab"),mt(m1,"Lab"),Sg(m1,f1,Cg(Rg,{brighter(e){return new m1(this.l+18*(e??1),this.a,this.b,this.opacity)},darker(e){return new m1(this.l-18*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return new Fg(b1(3.1338561*(t=.96422*v1(t))-1.6168667*(e=+v1(e))-.4906146*(r=.82521*v1(r))),b1(-.9787684*t+1.9161415*e+.033454*r),b1(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),mt(y1,"xyz2lab"),mt(v1,"lab2xyz"),mt(b1,"lrgb2rgb"),mt(x1,"rgb2lrgb"),mt(T1,"hclConvert"),mt(w1,"hcl"),mt(k1,"Hcl"),mt(E1,"hcl2lab"),Sg(k1,w1,Cg(Rg,{brighter(e){return new k1(this.h,this.c,this.l+18*(e??1),this.opacity)},darker(e){return new k1(this.h,this.c,this.l-18*(e??1),this.opacity)},rgb(){return E1(this).rgb()}}))}),L1=s(()=>{d1(),R1()});function N1(e,t,r,i,n){var a=e*e,s=a*e;return((1-3*e+3*a-s)*t+(4-6*a+3*s)*r+(1+3*e+3*a-3*s)*i+s*n)/6}function I1(s){var o=s.length-1;return function(e){var t=e<=0?e=0:1<=e?o-(e=1):Math.floor(e*o),r=s[t],i=s[t+1],n=0{mt(N1,"basis"),mt(I1,"default")});function M1(i){var n=i.length;return function(e){var t=Math.floor(((e%=1)<0?++e:e)*n),r=i[(t+n-1)%n];return N1((e-t/n)*n,r,i[t%n],i[(t+1)%n],i[(t+2)%n])}}var O1,P1=s(()=>{D1(),mt(M1,"default")}),$1=s(()=>{O1=mt(e=>()=>e,"default")});function B1(t,r){return function(e){return t+e*r}}function F1(t,r,i){return t=Math.pow(t,i),r=Math.pow(r,i)-t,i=1/i,function(e){return Math.pow(t+e*r,i)}}function z1(e,t){var r=t-e;return r?B1(e,180{$1(),mt(B1,"linear"),mt(F1,"exponential"),mt(z1,"hue"),mt(q1,"gamma"),mt(U1,"nogamma")});function j1(o){return function(e){for(var t,r=e.length,i=new Array(r),n=new Array(r),a=new Array(r),s=0;s{L1(),D1(),P1(),G1(),W1=mt(function e(t){var s=q1(t);function r(t,e){var r=s((t=Bg(t)).r,(e=Bg(e)).r),i=s(t.g,e.g),n=s(t.b,e.b),a=U1(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=n(e),t.opacity=a(e),t+""}}return mt(r,"rgb"),r.gamma=e,r},"rgbGamma")(1),mt(j1,"rgbSpline"),j1(I1),j1(M1)});function V1(t,r){r=r||[];var i,n=t?Math.min(r.length,t.length):0,a=r.slice();return function(e){for(i=0;i{mt(V1,"default"),mt(H1,"isNumberArray")});function K1(e,t){for(var r=t?t.length:0,i=e?Math.min(r,e.length):0,n=new Array(i),a=new Array(r),s=0;s{df(),mt(K1,"genericArray")});function Q1(t,r){var i=new Date;return t=+t,r=+r,function(e){return i.setTime(t*(1-e)+r*e),i}}var J1=s(()=>{mt(Q1,"default")});function ef(t,r){return t=+t,r=+r,function(e){return t*(1-e)+r*e}}var tf=s(()=>{mt(ef,"default")});function rf(e,t){var r,i={},n={};for(r in null!==e&&"object"==typeof e||(e={}),t=null!==t&&"object"==typeof t?t:{})r in e?i[r]=uf(e[r],t[r]):n[r]=t[r];return function(e){for(r in i)n[r]=i[r](e);return n}}var nf=s(()=>{df(),mt(rf,"default")});function af(e){return function(){return e}}function sf(t){return function(e){return t(e)+""}}function of(e,i){var t,r,n,a=lf.lastIndex=cf.lastIndex=0,s=-1,o=[],l=[];for(e+="",i+="";(t=lf.exec(e))&&(r=cf.exec(i));)(n=r.index)>a&&(n=i.slice(a,n),o[s]?o[s]+=n:o[++s]=n),(t=t[0])===(r=r[0])?o[s]?o[s]+=r:o[++s]=r:(o[++s]=null,l.push({i:s,x:ef(t,r)})),a=cf.lastIndex;return a{tf(),lf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,cf=new RegExp(lf.source,"g"),mt(af,"zero"),mt(sf,"one"),mt(of,"default")});function uf(e,t){var r=typeof t;return null==t||"boolean"==r?O1(t):("number"==r?ef:"string"==r?(r=Mg(t))?(t=r,W1):of:t instanceof Mg?W1:t instanceof Date?Q1:H1(t)?V1:Array.isArray(t)?K1:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?rf:ef)(e,t)}var df=s(()=>{L1(),Y1(),Z1(),J1(),tf(),nf(),hf(),$1(),X1(),mt(uf,"default")});function pf(t,r){return t=+t,r=+r,function(e){return Math.round(t*(1-e)+r*e)}}var gf=s(()=>{mt(pf,"default")});function ff(e,t,r,i,n,a){var s,o,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(o=Math.sqrt(r*r+i*i))&&(r/=o,i/=o,l/=o),e*i{mf=180/Math.PI,yf={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},mt(ff,"default")});function bf(e){return(e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"")).isIdentity?yf:ff(e.a,e.b,e.c,e.d,e.e,e.f)}function xf(e){return null!=e&&((Tf=Tf||document.createElementNS("http://www.w3.org/2000/svg","g")).setAttribute("transform",e),e=Tf.transform.baseVal.consolidate())?ff((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):yf}var Tf,wf=s(()=>{vf(),mt(bf,"parseCss"),mt(xf,"parseSvg")});function kf(r,o,l,n){function c(e){return e.length?e.pop()+" ":""}function i(e,t,r,i,n,a){var s;e!==r||t!==i?(s=n.push("translate(",null,o,null,l),a.push({i:s-4,x:ef(e,r)},{i:s-2,x:ef(t,i)})):(r||i)&&n.push("translate("+r+o+i+l)}function s(e,t,r,i){e!==t?(180{tf(),wf(),mt(kf,"interpolateTransform"),Ef=kf(bf,"px, ","px)","deg)"),_f=kf(xf,", ",")",")")});function Cf(s){return function(t,e){var r=s((t=w1(t)).h,(e=w1(e)).h),i=U1(t.c,e.c),n=U1(t.l,e.l),a=U1(t.opacity,e.opacity);return function(e){return t.h=r(e),t.c=i(e),t.l=n(e),t.opacity=a(e),t+""}}}var Af,Rf=s(()=>{L1(),G1(),mt(Cf,"hcl"),Af=Cf(z1),Cf(U1)}),Lf=s(()=>{df(),tf(),gf(),hf(),Sf(),Y1(),Rf()});function Nf(){return Vf||(Kf(If),Vf=Xf.now()+Hf)}function If(){Vf=0}function Df(){this._call=this._time=this._next=null}function Mf(e,t,r){var i=new Df;return i.restart(e,t,r),i}function Of(){Nf(),++zf;for(var e,t=jf;t;)0<=(e=Vf-t._time)&&t._call.call(void 0,e),t=t._next;--zf}function Pf(){Vf=(Yf=Xf.now())+Hf,zf=qf=0;try{Of()}finally{zf=0,Bf(),Vf=0}}function $f(){var e=Xf.now(),t=e-Yf;Gfr._time&&(i=r._time),(e=r)._next):(t=r._next,r._next=null,e?e._next=t:jf=t);Wf=e,Ff(i)}function Ff(e){zf||(qf=qf&&clearTimeout(qf),24{Gf=1e3,Hf=Vf=Yf=Uf=qf=zf=0,Xf="object"==typeof performance&&performance.now?performance:Date,Kf="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)},mt(Nf,"now"),mt(If,"clearNow"),mt(Df,"Timer"),Df.prototype=Mf.prototype={constructor:Df,restart:mt(function(e,t,r){if("function"!=typeof e)throw new TypeError("callback is not a function");r=(null==r?Nf():+r)+(null==t?0:+t),this._next||Wf===this||(Wf?Wf._next=this:jf=this,Wf=this),this._call=e,this._time=r,Ff()},"restart"),stop:mt(function(){this._call&&(this._call=null,this._time=1/0,Ff())},"stop")},mt(Mf,"timer"),mt(Of,"timerFlush"),mt(Pf,"wake"),mt($f,"poke"),mt(Bf,"nap"),mt(Ff,"sleep")});function Qf(t,r,e){var i=new Df;return r=null==r?0:+r,i.restart(e=>{i.stop(),t(e+r)},r,e),i}var Jf=s(()=>{Zf(),mt(Qf,"default")}),em=s(()=>{Zf(),Jf()});function tm(e,t,r,i,n,a){var s=e.__transition;if(s){if(r in s)return}else e.__transition={};am(e,r,{name:t,index:i,group:n,on:sm,tween:om,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:lm})}function rm(e,t){if((e=nm(e,t)).state>lm)throw new Error("too late; already scheduled");return e}function im(e,t){if((e=nm(e,t)).state>um)throw new Error("too late; already running");return e}function nm(e,t){if(e=(e=e.__transition)&&e[t])return e;throw new Error("transition not found")}function am(a,s,o){var l,c=a.__transition;function e(e){o.state=cm,o.timer.restart(h,o.delay,o.time),o.delay<=e&&h(e-o.delay)}function h(e){var t,r,i,n;if(o.state!==cm)return d();for(t in c)if(n=c[t],n.name===o.name){if(n.state===um)return Qf(h);n.state===dm?(n.state=gm,n.timer.stop(),n.on.call("interrupt",a,a.__data__,n.index,n.group),delete c[t]):+t{Dd(),em(),sm=Rd("start","end","cancel","interrupt"),om=[],lm=0,cm=1,hm=2,um=3,dm=4,pm=5,gm=6,mt(tm,"default"),mt(rm,"init"),mt(im,"set"),mt(nm,"get"),mt(am,"create")});function mm(e,t){var r,i,n,a=e.__transition,s=!0;if(a){for(n in t=null==t?null:t+"",a)(r=a[n]).name!==t?s=!1:(i=hm{fm(),mt(mm,"default")});function vm(e){return this.each(function(){mm(this,e)})}var bm=s(()=>{ym(),mt(vm,"default")});function xm(n,a){var s,o;return function(){var e=im(this,n),t=e.tween;if(t!==s)for(var r=0,i=(o=s=t).length;r{fm(),mt(xm,"tweenRemove"),mt(Tm,"tweenFunction"),mt(wm,"default"),mt(km,"tweenValue")});function _m(e,t){var r;return("number"==typeof t?ef:t instanceof Mg?W1:(r=Mg(t))?(t=r,W1):of)(e,t)}var Sm=s(()=>{L1(),Lf(),mt(_m,"default")});function Cm(e){return function(){this.removeAttribute(e)}}function Am(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Rm(t,r,i){var n,a,s=i+"";return function(){var e=this.getAttribute(t);return e===s?null:e===n?a:a=r(n=e,i)}}function Lm(t,r,i){var n,a,s=i+"";return function(){var e=this.getAttributeNS(t.space,t.local);return e===s?null:e===n?a:a=r(n=e,i)}}function Nm(i,n,a){var s,o,l;return function(){var e,t,r=a(this);return null==r?void this.removeAttribute(i):(e=this.getAttribute(i))===(t=r+"")?null:e===s&&t===o?l:(o=t,l=n(s=e,r))}}function Im(i,n,a){var s,o,l;return function(){var e,t,r=a(this);return null==r?void this.removeAttributeNS(i.space,i.local):(e=this.getAttributeNS(i.space,i.local))===(t=r+"")?null:e===s&&t===o?l:(o=t,l=n(s=e,r))}}function Dm(e,t){var r=Od(e),i="transform"===r?_f:_m;return this.attrTween(e,"function"==typeof t?(r.local?Im:Nm)(r,i,km(this,"attr."+e,t)):null==t?(r.local?Am:Cm)(r):(r.local?Lm:Rm)(r,i,t))}var Mm=s(()=>{Lf(),Eg(),Em(),Sm(),mt(Cm,"attrRemove"),mt(Am,"attrRemoveNS"),mt(Rm,"attrConstant"),mt(Lm,"attrConstantNS"),mt(Nm,"attrFunction"),mt(Im,"attrFunctionNS"),mt(Dm,"default")});function Om(t,r){return function(e){this.setAttribute(t,r.call(this,e))}}function Pm(t,r){return function(e){this.setAttributeNS(t.space,t.local,r.call(this,e))}}function $m(t,r){var i,n;function e(){var e=r.apply(this,arguments);return i=e!==n?(n=e)&&Pm(t,e):i}return mt(e,"tween"),e._value=r,e}function Bm(t,r){var i,n;function e(){var e=r.apply(this,arguments);return i=e!==n?(n=e)&&Om(t,e):i}return mt(e,"tween"),e._value=r,e}function Fm(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!=typeof t)throw new Error;return e=Od(e),this.tween(r,(e.local?$m:Bm)(e,t))}var zm=s(()=>{Eg(),mt(Om,"attrInterpolate"),mt(Pm,"attrInterpolateNS"),mt($m,"attrTweenNS"),mt(Bm,"attrTween"),mt(Fm,"default")});function qm(e,t){return function(){rm(this,e).delay=+t.apply(this,arguments)}}function Um(e,t){return t=+t,function(){rm(this,e).delay=t}}function Gm(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?qm:Um)(t,e)):nm(this.node(),t).delay}var jm=s(()=>{fm(),mt(qm,"delayFunction"),mt(Um,"delayConstant"),mt(Gm,"default")});function Wm(e,t){return function(){im(this,e).duration=+t.apply(this,arguments)}}function Ym(e,t){return t=+t,function(){im(this,e).duration=t}}function Vm(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?Wm:Ym)(t,e)):nm(this.node(),t).duration}var Hm=s(()=>{fm(),mt(Wm,"durationFunction"),mt(Ym,"durationConstant"),mt(Vm,"default")});function Xm(e,t){if("function"!=typeof t)throw new Error;return function(){im(this,e).ease=t}}function Km(e){var t=this._id;return arguments.length?this.each(Xm(t,e)):nm(this.node(),t).ease}var Zm=s(()=>{fm(),mt(Xm,"easeConstant"),mt(Km,"default")});function Qm(t,r){return function(){var e=r.apply(this,arguments);if("function"!=typeof e)throw new Error;im(this,t).ease=e}}function Jm(e){if("function"!=typeof e)throw new Error;return this.each(Qm(this._id,e))}var ey=s(()=>{fm(),mt(Qm,"easeVarying"),mt(Jm,"default")});function ty(e){"function"!=typeof e&&(e=ep(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n{Eg(),Vy(),mt(ty,"default")});function iy(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,e=r.length,n=Math.min(i,e),a=new Array(i),s=0;s{Vy(),mt(iy,"default")});function ay(e){return(e+"").trim().split(/^|\s+/).every(function(e){var t=e.indexOf(".");return!(e=0<=t?e.slice(0,t):e)||"start"===e})}function sy(r,i,n){var a,s,o=ay(i)?rm:im;return function(){var e=o(this,r),t=e.on;t!==a&&(s=(a=t).copy()).on(i,n),e.on=s}}function oy(e,t){var r=this._id;return arguments.length<2?nm(this.node(),r).on.on(e):this.each(sy(r,e,t))}var ly=s(()=>{fm(),mt(ay,"start"),mt(sy,"onFunction"),mt(oy,"default")});function cy(r){return function(){var e,t=this.parentNode;for(e in this.__transition)if(+e!==r)return;t&&t.removeChild(this)}}function hy(){return this.on("end.remove",cy(this._id))}var uy=s(()=>{mt(cy,"removeFunction"),mt(hy,"default")});function dy(e){var t=this._name,r=this._id;"function"!=typeof e&&(e=Ud(e));for(var i=this._groups,n=i.length,a=new Array(n),s=0;s{Eg(),Vy(),fm(),mt(dy,"default")});function gy(e){var t=this._name,r=this._id;"function"!=typeof e&&(e=Xd(e));for(var i=this._groups,n=i.length,a=[],s=[],o=0;o{Eg(),Vy(),fm(),mt(gy,"default")});function my(){return new yy(this._groups,this._parents)}var yy,vy=s(()=>{Eg(),yy=Tg.prototype.constructor,mt(my,"default")});function by(r,i){var n,a,s;return function(){var e=u0(this,r),t=(this.style.removeProperty(r),u0(this,r));return e===t?null:e===n&&t===a?s:s=i(n=e,a=t)}}function xy(e){return function(){this.style.removeProperty(e)}}function Ty(t,r,i){var n,a,s=i+"";return function(){var e=u0(this,t);return e===s?null:e===n?a:a=r(n=e,i)}}function wy(i,n,a){var s,o,l;return function(){var e=u0(this,i),t=a(this),r=t+"";return null==t&&(this.style.removeProperty(i),r=t=u0(this,i)),e===r?null:e===s&&r===o?l:(o=r,l=n(s=e,t))}}function ky(i,n){var a,s,o,l,c="style."+n,h="end."+c;return function(){var e=im(this,i),t=e.on,r=null==e.value[c]?l=l||xy(n):void 0;t===a&&o===r||(s=(a=t).copy()).on(h,o=r),e.on=s}}function Ey(e,t,r){var i="transform"==(e+="")?Ef:_m;return null==t?this.styleTween(e,by(e,i)).on("end.style."+e,xy(e)):"function"==typeof t?this.styleTween(e,wy(e,i,km(this,"style."+e,t))).each(ky(this._id,e)):this.styleTween(e,Ty(e,i,t),r).on("end.style."+e,null)}var _y=s(()=>{Lf(),Eg(),fm(),Em(),Sm(),mt(by,"styleNull"),mt(xy,"styleRemove"),mt(Ty,"styleConstant"),mt(wy,"styleFunction"),mt(ky,"styleMaybeRemove"),mt(Ey,"default")});function Sy(t,r,i){return function(e){this.style.setProperty(t,r.call(this,e),i)}}function Cy(t,r,i){var n,a;function e(){var e=r.apply(this,arguments);return n=e!==a?(a=e)&&Sy(t,e,i):n}return mt(e,"tween"),e._value=r,e}function Ay(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==t)return this.tween(i,null);if("function"!=typeof t)throw new Error;return this.tween(i,Cy(e,t,r??""))}var Ry=s(()=>{mt(Sy,"styleInterpolate"),mt(Cy,"styleTween"),mt(Ay,"default")});function Ly(e){return function(){this.textContent=e}}function Ny(t){return function(){var e=t(this);this.textContent=e??""}}function Iy(e){return this.tween("text","function"==typeof e?Ny(km(this,"text",e)):Ly(null==e?"":e+""))}var Dy=s(()=>{Em(),mt(Ly,"textConstant"),mt(Ny,"textFunction"),mt(Iy,"default")});function My(t){return function(e){this.textContent=t.call(this,e)}}function Oy(t){var r,i;function e(){var e=t.apply(this,arguments);return r=e!==i?(i=e)&&My(e):r}return mt(e,"tween"),e._value=t,e}function Py(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw new Error;return this.tween(t,Oy(e))}var $y=s(()=>{mt(My,"textInterpolate"),mt(Oy,"textTween"),mt(Py,"default")});function By(){for(var e=this._name,t=this._id,r=++Wy,i=this._groups,n=i.length,a=0;a{Vy(),fm(),mt(By,"default")});function zy(){var n,a,s=this,o=s._id,l=s.size();return new Promise(function(e,t){var r={value:t},i={value:mt(function(){0==--l&&e()},"value")};s.each(function(){var e=im(this,o),t=e.on;t!==n&&((a=(n=t).copy())._.cancel.push(r),a._.interrupt.push(r),a._.end.push(i)),e.on=a}),0===l&&e()})}var qy=s(()=>{fm(),mt(zy,"default")});function Uy(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function Gy(e){return Tg().transition(e)}function jy(){return++Wy}var Wy,Yy,Vy=s(()=>{Eg(),Mm(),zm(),jm(),Hm(),Zm(),ey(),ry(),ny(),ly(),uy(),py(),fy(),vy(),_y(),Ry(),Dy(),$y(),Fy(),Em(),qy(),Wy=0,mt(Uy,"Transition"),mt(Gy,"transition"),mt(jy,"newId"),Yy=Tg.prototype,Uy.prototype=Gy.prototype={constructor:Uy,select:dy,selectAll:gy,selectChild:Yy.selectChild,selectChildren:Yy.selectChildren,filter:ty,merge:iy,selection:my,transition:By,call:Yy.call,nodes:Yy.nodes,node:Yy.node,size:Yy.size,empty:Yy.empty,each:Yy.each,on:oy,attr:Dm,attrTween:Fm,style:Ey,styleTween:Ay,text:Iy,textTween:Py,remove:hy,tween:wm,delay:Gm,duration:Vm,ease:Km,easeVarying:Jm,end:zy,[Symbol.iterator]:Yy[Symbol.iterator]}});function Hy(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Xy=s(()=>{mt(Hy,"cubicInOut")}),Ky=s(()=>{Xy()});function Zy(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function Qy(e){var t,r;e=e instanceof Uy?(t=e._id,e._name):(t=++Wy,(r=Jy).time=Nf(),null==e?null:e+"");for(var i=this._groups,n=i.length,a=0;a{Vy(),fm(),Ky(),em(),Jy={time:null,delay:0,duration:250,ease:Hy},mt(Zy,"inherit"),mt(Qy,"default")}),t2=s(()=>{Eg(),bm(),e2(),Tg.prototype.interrupt=vm,Tg.prototype.transition=Qy}),r2=s(()=>{t2()}),i2=s(()=>{}),n2=s(()=>{}),a2=s(()=>{});function s2(e){return[+e[0],+e[1]]}function o2(e){return[s2(e[0]),s2(e[1])]}function l2(e){return{type:e}}var c2,h2,u2,d2=s(()=>{r2(),i2(),n2(),a2(),{abs:c2,max:h2,min:u2}=Math,mt(s2,"number1"),mt(o2,"number2"),["w","e"].map(l2),mt(function(e,t){return null==e?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},"input"),mt(function(e){return e&&[e[0][0],e[1][0]]},"output"),["n","s"].map(l2),mt(function(e,t){return null==e?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},"input"),mt(function(e){return e&&[e[0][1],e[1][1]]},"output"),["n","w","e","s","nw","ne","sw","se"].map(l2),mt(function(e){return null==e?null:o2(e)},"input"),mt(function(e){return e},"output"),mt(l2,"type")}),p2=s(()=>{d2()});function g2(r){this._+=r[0];for(let e=1,t=r.length;e{y2=Math.PI,x2=(v2=2*y2)-(b2=1e-6),mt(g2,"append"),mt(f2,"appendRound"),T2=class{static{mt(this,"Path")}constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?g2:f2(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,r,i){this._append`Q${+e},${+t},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(e,t,r,i,n,a){this._append`C${+e},${+t},${+r},${+i},${this._x1=+n},${this._y1=+a}`}arcTo(e,t,r,i,n){if(e=+e,t=+t,r=+r,i=+i,(n=+n)<0)throw new Error("negative radius: "+n);var a,s,o=this._x1,l=this._y1,c=r-e,h=i-t,u=o-e,d=l-t,p=u*u+d*d;null===this._x1?this._append`M${this._x1=e},${this._y1=t}`:b2b2&&n?(s=c*c+h*h,i=(r-=o)*r+(o=i-l)*o,l=Math.sqrt(s),a=Math.sqrt(p),p=(s=n*Math.tan((y2-Math.acos((s+p-i)/(2*l*a)))/2))/a,i=s/l,Math.abs(p-1)>b2&&this._append`L${e+p*u},${t+p*d}`,this._append`A${n},${n},0,0,${+(u*ob2||Math.abs(this._y1-c)>b2)&&this._append`L${l},${c}`,r&&((a=a<0?a%v2+v2:a)>x2?this._append`A${r},${r},0,1,${h},${e-s},${t-o}A${r},${r},0,1,${h},${this._x1=l},${this._y1=c}`:b2{w2()}),E2=s(()=>{}),_2=s(()=>{}),S2=s(()=>{}),C2=s(()=>{}),A2=s(()=>{}),R2=s(()=>{}),L2=s(()=>{});function N2(e){return 1e21<=Math.abs(e=Math.round(e))?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function I2(e,t){var r;return(t=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0?null:[1<(r=e.slice(0,t)).length?r[0]+r.slice(2):r,+e.slice(t+1)]}var D2=s(()=>{mt(N2,"default"),mt(I2,"formatDecimalParts")});function M2(e){return(e=I2(Math.abs(e)))?e[1]:NaN}var O2=s(()=>{D2(),mt(M2,"default")});function P2(o,l){return function(e,t){for(var r=e.length,i=[],n=0,a=o[0],s=0;0t));)a=o[n=(n+1)%o.length];return i.reverse().join(l)}}var $2=s(()=>{mt(P2,"default")});function B2(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}var F2=s(()=>{mt(B2,"default")});function z2(e){var t;if(t=U2.exec(e))return new q2({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]});throw new Error("invalid format: "+e)}function q2(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}var U2,G2=s(()=>{U2=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i,mt(z2,"formatSpecifier"),z2.prototype=q2.prototype,mt(q2,"FormatSpecifier"),q2.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type}});function j2(e){e:for(var t,r=e.length,i=1,n=-1;i{mt(j2,"default")});function Y2(e,t){var r,i,n=I2(e,t);return n?(r=n[0],(n=(n=n[1])-(V2=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1)===(i=r.length)?r:i{D2(),mt(Y2,"default")});function X2(e,t){var r;return(t=I2(e,t))?(r=t[0],(t=t[1])<0?"0."+new Array(-t).join("0")+r:r.length>t+1?r.slice(0,t+1)+"."+r.slice(t+1):r+new Array(t-r.length+2).join("0")):e+""}var K2,Z2=s(()=>{D2(),mt(X2,"default")}),Q2=s(()=>{D2(),H2(),Z2(),K2={"%":mt((e,t)=>(100*e).toFixed(t),"%"),b:mt(e=>Math.round(e).toString(2),"b"),c:mt(e=>e+"","c"),d:N2,e:mt((e,t)=>e.toExponential(t),"e"),f:mt((e,t)=>e.toFixed(t),"f"),g:mt((e,t)=>e.toPrecision(t),"g"),o:mt(e=>Math.round(e).toString(8),"o"),p:mt((e,t)=>X2(100*e,t),"p"),r:X2,s:Y2,X:mt(e=>Math.round(e).toString(16).toUpperCase(),"X"),x:mt(e=>Math.round(e).toString(16),"x")}});function J2(e){return e}var ev=s(()=>{mt(J2,"default")});function tv(e){var w=void 0===e.grouping||void 0===e.thousands?J2:P2(rv.call(e.grouping,Number),e.thousands+""),i=void 0===e.currency?"":e.currency[0]+"",n=void 0===e.currency?"":e.currency[1]+"",k=void 0===e.decimal?".":e.decimal+"",E=void 0===e.numerals?J2:B2(rv.call(e.numerals,String)),a=void 0===e.percent?"%":e.percent+"",_=void 0===e.minus?"−":e.minus+"",S=void 0===e.nan?"NaN":e.nan+"";function s(e){var c=(e=z2(e)).fill,h=e.align,u=e.sign,t=e.symbol,d=e.zero,p=e.width,g=e.comma,f=e.precision,m=e.trim,y=e.type,v=("n"===y?(g=!0,y="g"):K2[y]||(void 0===f&&(f=12),m=!0,y="g"),(d||"0"===c&&"="===h)&&(d=!0,c="0",h="="),"$"===t?i:"#"===t&&/[boxX]/.test(y)?"0"+y.toLowerCase():""),b="$"===t?n:/[%p]/.test(y)?a:"",x=K2[y],T=/[defgprs%]/.test(y);function r(e){var t,r,i,n=v,a=b;if("c"===y)a=x(e)+a,e="";else{var s=(e=+e)<0||1/e<0;if(e=isNaN(e)?S:x(Math.abs(e),f),m&&(e=j2(e)),n=((s=(!s||0!=+e||"+"===u)&&s)?"("===u?u:_:"-"===u||"("===u?"":u)+n,a=("s"===y?iv[8+V2/3]:"")+a+(s&&"("===u?")":""),T)for(t=-1,r=e.length;++t>1)+n+e+a+l.slice(o);break;default:e=l+n+e+a}return E(e)}return f=void 0===f?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),mt(r,"format"),r.toString=function(){return e+""},r}function t(e,t){var r=s(((e=z2(e)).type="f",e)),e=3*Math.max(-8,Math.min(8,Math.floor(M2(t)/3))),i=Math.pow(10,-e),n=iv[8+e/3];return function(e){return r(i*e)+n}}return mt(s,"newFormat"),mt(t,"formatPrefix"),{format:s,formatPrefix:t}}var rv,iv,nv=s(()=>{O2(),$2(),F2(),G2(),W2(),Q2(),H2(),ev(),rv=Array.prototype.map,iv=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],mt(tv,"default")});function av(e){return sv=tv(e),ov=sv.format,lv=sv.formatPrefix,sv}var sv,ov,lv,cv=s(()=>{nv(),av({thousands:",",grouping:[3],currency:["$",""]}),mt(av,"defaultLocale")});function hv(e){return Math.max(0,-M2(Math.abs(e)))}var uv=s(()=>{O2(),mt(hv,"default")});function dv(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(M2(t)/3)))-M2(Math.abs(e)))}var pv=s(()=>{O2(),mt(dv,"default")});function gv(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,M2(t)-M2(e))+1}var fv=s(()=>{O2(),mt(gv,"default")}),mv=s(()=>{cv(),G2(),uv(),pv(),fv()}),yv=s(()=>{});function vv(e){var t=0,r=e.children,i=r&&r.length;if(i)for(;0<=--i;)t+=r[i].value;else t=1;e.value=t}function bv(){return this.eachAfter(vv)}var xv=s(()=>{mt(vv,"count"),mt(bv,"default")});function Tv(e,t){let r=-1;for(var i of this)e.call(t,i,++r,this);return this}var wv=s(()=>{mt(Tv,"default")});function kv(e,t){for(var r,i,n,a=[this],s=-1;r=a.pop();)if(e.call(t,r,++s,this),i=r.children)for(n=i.length-1;0<=n;--n)a.push(i[n]);return this}var Ev=s(()=>{mt(kv,"default")});function _v(e,t){for(var r,i,n,a=this,s=[a],o=[],l=-1;a=s.pop();)if(o.push(a),r=a.children)for(i=0,n=r.length;i{mt(_v,"default")});function Cv(e,t){let r=-1;for(var i of this)if(e.call(t,i,++r,this))return i}var Av=s(()=>{mt(Cv,"default")});function Rv(n){return this.eachAfter(function(e){for(var t=+n(e.data)||0,r=e.children,i=r&&r.length;0<=--i;)t+=r[i].value;e.value=t})}var Lv=s(()=>{mt(Rv,"default")});function Nv(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}var Iv=s(()=>{mt(Nv,"default")});function Dv(e){for(var t=this,r=Mv(t,e),i=[t];t!==r;)t=t.parent,i.push(t);for(var n=i.length;e!==r;)i.splice(n,0,e),e=e.parent;return i}function Mv(e,t){if(e===t)return e;var r=e.ancestors(),i=t.ancestors(),n=null;for(e=r.pop(),t=i.pop();e===t;)n=e,e=r.pop(),t=i.pop();return n}var Ov=s(()=>{mt(Dv,"default"),mt(Mv,"leastCommonAncestor")});function Pv(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}var $v=s(()=>{mt(Pv,"default")});function Bv(){return Array.from(this)}var Fv=s(()=>{mt(Bv,"default")});function zv(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}var qv=s(()=>{mt(zv,"default")});function Uv(){var t=this,r=[];return t.each(function(e){e!==t&&r.push({source:e.parent,target:e})}),r}var Gv=s(()=>{mt(Uv,"default")});function*jv(){var e,t,r,i,n,a=[this];do{for(t=a.reverse(),a=[];e=t.pop();)if(yield e,r=e.children)for(i=0,n=r.length;i{mt(jv,"default")});function Yv(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Xv)):void 0===t&&(t=Hv);for(var r,i,n,a,s,o=[e=new Qv(e)];r=o.pop();)if((n=t(r.data))&&(s=(n=Array.from(n)).length))for(r.children=n,a=s-1;0<=a;--a)o.push(i=n[a]=new Qv(n[a])),i.parent=r,i.depth=r.depth+1;return e.eachBefore(Zv)}function Vv(){return Yv(this).eachBefore(Kv)}function Hv(e){return e.children}function Xv(e){return Array.isArray(e)?e[1]:null}function Kv(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function Zv(e){for(var t=0;e.height=t,(e=e.parent)&&e.height<++t;);}function Qv(e){this.data=e,this.depth=this.height=0,this.parent=null}var Jv=s(()=>{xv(),wv(),Ev(),Sv(),Av(),Lv(),Iv(),Ov(),$v(),Fv(),qv(),Gv(),Wv(),mt(Yv,"hierarchy"),mt(Vv,"node_copy"),mt(Hv,"objectChildren"),mt(Xv,"mapChildren"),mt(Kv,"copyData"),mt(Zv,"computeHeight"),mt(Qv,"Node"),Qv.prototype=Yv.prototype={constructor:Qv,count:bv,each:Tv,eachAfter:_v,eachBefore:kv,find:Cv,sum:Rv,sort:Nv,path:Dv,ancestors:Pv,descendants:Bv,leaves:zv,links:Uv,copy:Vv,[Symbol.iterator]:jv}});function eb(e){if("function"!=typeof e)throw new Error;return e}var tb=s(()=>{mt(eb,"required")});function rb(){return 0}function ib(e){return function(){return e}}var nb=s(()=>{mt(rb,"constantZero"),mt(ib,"default")});function ab(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}var sb=s(()=>{mt(ab,"default")});function ob(e,t,r,i,n){for(var a,s=e.children,o=-1,l=s.length,c=e.value&&(i-t)/e.value;++o{mt(ob,"default")});function cb(e,t,r,i,n){for(var a,s=e.children,o=-1,l=s.length,c=e.value&&(n-r)/e.value;++o{mt(cb,"default")});function ub(e,t,r,i,n,a){for(var s,o,l,c,h,u,d,p,g,f,m,y=[],v=t.children,b=0,x=0,T=v.length,w=t.value;b{lb(),hb(),db=(1+Math.sqrt(5))/2,mt(ub,"squarifyRatio"),pb=mt(function t(a){function e(e,t,r,i,n){ub(a,e,t,r,i,n)}return mt(e,"squarify"),e.ratio=function(e){return t(1<(e=+e)?e:1)},e},"custom")(db)});function fb(){var s=pb,t=!1,r=1,i=1,o=[0],l=rb,c=rb,h=rb,u=rb,d=rb;function n(e){return e.x0=e.y0=0,e.x1=r,e.y1=i,e.eachBefore(a),o=[0],t&&e.eachBefore(ab),e}function a(e){var t=o[e.depth],r=e.x0+t,i=e.y0+t,n=e.x1-t,a=e.y1-t;n{sb(),gb(),tb(),nb(),mt(fb,"default")}),yb=s(()=>{Jv(),mb()}),vb=s(()=>{}),bb=s(()=>{});function xb(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var Tb=s(()=>{mt(xb,"initRange")});function wb(){var r=new Yu,i=[],n=[],a=kb;function s(e){let t=r.get(e);if(void 0===t){if(a!==kb)return a;r.set(e,t=i.push(e)-1)}return n[t%n.length]}return mt(s,"scale"),s.domain=function(e){if(!arguments.length)return i.slice();i=[],r=new Yu;for(var t of e)r.has(t)||r.set(t,i.push(t)-1);return s},s.range=function(e){return arguments.length?(n=Array.from(e),s):n.slice()},s.unknown=function(e){return arguments.length?(a=e,s):a},s.copy=function(){return wb(i,n).unknown(a)},xb.apply(s,arguments),s}var kb,Eb=s(()=>{ld(),Tb(),kb=Symbol("implicit"),mt(wb,"ordinal")});function _b(){var n,a,e=wb().unknown(void 0),s=e.domain,o=e.range,l=0,c=1,h=!1,u=0,d=0,p=.5;function t(){var e=s().length,t=c{ld(),Tb(),Eb(),mt(_b,"band")});function Cb(e){return function(){return e}}var Ab=s(()=>{mt(Cb,"constants")});function Rb(e){return+e}var Lb=s(()=>{mt(Rb,"number")});function Nb(e){return e}function Ib(t,r){return(r-=t=+t)?function(e){return(e-t)/r}:Cb(isNaN(r)?NaN:.5)}function Db(t,r){var e;return r{ld(),Lf(),Ab(),Lb(),Fb=[0,1],mt(Nb,"identity"),mt(Ib,"normalize"),mt(Db,"clamper"),mt(Mb,"bimap"),mt(Ob,"polymap"),mt(Pb,"copy"),mt($b,"transformer"),mt(Bb,"continuous")});function qb(e,t,r,i){var n,a=Zu(e,t,r);switch((i=z2(i??",f")).type){case"s":var s=Math.max(Math.abs(e),Math.abs(t));return null!=i.precision||isNaN(n=dv(a,s))||(i.precision=n),lv(i,s);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(n=gv(a,Math.max(Math.abs(e),Math.abs(t))))||(i.precision=n-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(n=hv(a))||(i.precision=n-2*("%"===i.type))}return ov(i)}var Ub=s(()=>{ld(),mv(),mt(qb,"tickFormat")});function Gb(c){var h=c.domain;return c.ticks=function(e){var t=h();return Xu(t[0],t[t.length-1],e??10)},c.tickFormat=function(e,t){var r=h();return qb(r[0],r[r.length-1],e??10,t)},c.nice=function(e){null==e&&(e=10);var t,r,i=h(),n=0,a=i.length-1,s=i[n],o=i[a],l=10;for(o{ld(),zb(),Tb(),Ub(),mt(Gb,"linearish"),mt(jb,"linear")});function Yb(e,t){var r,i=0,n=(e=e.slice()).length-1,a=e[i],s=e[n];return s{mt(Yb,"nice")});function Hb(a,s,r,i){function o(e){return a(e=0===arguments.length?new Date:new Date(+e)),e}return mt(o,"interval"),o.floor=e=>(a(e=new Date(+e)),e),o.ceil=e=>(a(e=new Date(e-1)),s(e,1),a(e),e),o.round=e=>{var t=o(e),r=o.ceil(e);return e-t(s(e=new Date(+e),null==t?1:Math.floor(t)),e),o.range=(e,t,r)=>{var i,n=[];if(e=o.ceil(e),r=null==r?1:Math.floor(r),eHb(e=>{if(e<=e)for(;a(e),!r(e);)e.setTime(e-1)},(e,t)=>{if(e<=e)if(t<0)for(;++t<=0;)for(;s(e,-1),!r(e););else for(;0<=--t;)for(;s(e,1),!r(e););}),r&&(o.count=(e,t)=>(Xb.setTime(+e),Kb.setTime(+t),a(Xb),a(Kb),Math.floor(r(Xb,Kb))),o.every=t=>(t=Math.floor(t),isFinite(t)&&0i(e)%t==0:e=>o.count(0,e)%t==0):o:null)),o}var Xb,Kb,Zb,Qb,Jb,ex,tx,rx,ix,nx,ax,sx=s(()=>{Xb=new Date,Kb=new Date,mt(Hb,"timeInterval")}),ox=s(()=>{sx(),(Zb=Hb(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e)).every=r=>(r=Math.floor(r),isFinite(r)&&0{e.setTime(Math.floor(e/r)*r)},(e,t)=>{e.setTime(+e+t*r)},(e,t)=>(t-e)/r):Zb:null)}),lx=s(()=>{sx(),(Qb=Hb(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+1e3*t)},(e,t)=>(t-e)/1e3,e=>e.getUTCSeconds())).range}),cx=s(()=>{sx(),(Jb=Hb(e=>{e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds())},(e,t)=>{e.setTime(+e+6e4*t)},(e,t)=>(t-e)/6e4,e=>e.getMinutes())).range,(ex=Hb(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+6e4*t)},(e,t)=>(t-e)/6e4,e=>e.getUTCMinutes())).range}),hx=s(()=>{sx(),(tx=Hb(e=>{e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds()-6e4*e.getMinutes())},(e,t)=>{e.setTime(+e+36e5*t)},(e,t)=>(t-e)/36e5,e=>e.getHours())).range,(rx=Hb(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+36e5*t)},(e,t)=>(t-e)/36e5,e=>e.getUTCHours())).range}),ux=s(()=>{sx(),(ix=Hb(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5,e=>e.getDate()-1)).range,(nx=Hb(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>e.getUTCDate()-1)).range,(ax=Hb(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>Math.floor(e/864e5))).range});function dx(t){return Hb(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/6048e5)}function px(t){return Hb(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/6048e5)}var gx,fx,mx,yx,vx,bx,xx,Tx,wx,kx,Ex,_x,Sx,Cx,Ax,Rx,Lx,Nx,Ix=s(()=>{sx(),mt(dx,"timeWeekday"),gx=dx(0),fx=dx(1),mx=dx(2),yx=dx(3),vx=dx(4),bx=dx(5),xx=dx(6),gx.range,fx.range,mx.range,yx.range,vx.range,bx.range,xx.range,mt(px,"utcWeekday"),Tx=px(0),wx=px(1),kx=px(2),Ex=px(3),_x=px(4),Sx=px(5),Cx=px(6),Tx.range,wx.range,kx.range,Ex.range,_x.range,Sx.range,Cx.range}),Dx=s(()=>{sx(),(Ax=Hb(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear()),e=>e.getMonth())).range,(Rx=Hb(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear()),e=>e.getUTCMonth())).range}),Mx=s(()=>{sx(),(Lx=Hb(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear())).every=r=>isFinite(r=Math.floor(r))&&0{e.setFullYear(Math.floor(e.getFullYear()/r)*r),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t*r)}):null,(Nx=Hb(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear())).every=r=>isFinite(r=Math.floor(r))&&0{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/r)*r),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t*r)}):null});function Ox(a,e,t,r,i,n){let s=[[Qb,1,1e3],[Qb,5,5e3],[Qb,15,15e3],[Qb,30,3e4],[n,1,6e4],[n,5,3e5],[n,15,9e5],[n,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[t,1,6048e5],[e,1,2592e6],[e,3,7776e6],[a,1,31536e6]];function o(e,t,r){var i=te).right(s,i);return n===s.length?a.every(Zu(e/31536e6,t/31536e6,r)):0===n?Zb.every(Math.max(Zu(e,t,r),1)):([e,t]=s[i/s[n-1][2]{ld(),ox(),lx(),cx(),hx(),ux(),Ix(),Dx(),Mx(),mt(Ox,"ticker"),[Px,$x]=Ox(Nx,Rx,Tx,ax,rx,ex),[Bx,Fx]=Ox(Lx,Ax,gx,ix,tx,Jb)}),qx=s(()=>{ox(),lx(),cx(),hx(),ux(),Ix(),Dx(),Mx(),zx()});function Ux(e){var t;return 0<=e.y&&e.y<100?((t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L)).setFullYear(e.y),t):new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Gx(e){var t;return 0<=e.y&&e.y<100?((t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L))).setUTCFullYear(e.y),t):new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function jx(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function Wx(e){var i=e.dateTime,n=e.date,a=e.time,t=e.periods,r=e.days,s=e.shortDays,o=e.months,l=e.shortMonths,c=Hx(t),h=Xx(t),P=Hx(r),$=Xx(r),B=Hx(s),F=Xx(s),z=Hx(o),q=Xx(o),U=Hx(l),G=Xx(l),u={a:E,A:_,b:S,B:C,c:null,d:m4,e:m4,f:T4,g:I4,G:M4,H:y4,I:v4,j:b4,L:x4,m:w4,M:k4,p:A,q:R,Q:i5,s:n5,S:E4,u:_4,U:S4,V:A4,w:R4,W:L4,x:null,X:null,y:N4,Y:D4,Z:O4,"%":r5},d={a:L,A:N,b:I,B:D,c:null,d:P4,e:P4,f:q4,g:Q4,G:e5,H:$4,I:B4,j:F4,L:z4,m:U4,M:G4,p:M,q:O,Q:i5,s:n5,S:j4,u:W4,U:Y4,V:H4,w:X4,W:K4,x:null,X:null,y:Z4,Y:J4,Z:t5,"%":r5},j={a:y,A:v,b:b,B:x,c:T,d:s4,e:s4,f:d4,g:r4,G:t4,H:l4,I:l4,j:o4,L:u4,m:a4,M:c4,p:m,q:n4,Q:g4,s:f4,S:h4,u:Zx,U:Qx,V:Jx,w:Kx,W:e4,x:w,X:k,y:r4,Y:t4,Z:i4,"%":p4};function p(l,c){return function(e){var t,r,i,n=[],a=-1,s=0,o=l.length;for(e instanceof Date||(e=new Date(+e));++a[e.toLowerCase(),t]))}function Kx(e,t,r){return(t=s5.exec(t.slice(r,r+1)))?(e.w=+t[0],r+t[0].length):-1}function Zx(e,t,r){return(t=s5.exec(t.slice(r,r+1)))?(e.u=+t[0],r+t[0].length):-1}function Qx(e,t,r){return(t=s5.exec(t.slice(r,r+2)))?(e.U=+t[0],r+t[0].length):-1}function Jx(e,t,r){return(t=s5.exec(t.slice(r,r+2)))?(e.V=+t[0],r+t[0].length):-1}function e4(e,t,r){return(t=s5.exec(t.slice(r,r+2)))?(e.W=+t[0],r+t[0].length):-1}function t4(e,t,r){return(t=s5.exec(t.slice(r,r+4)))?(e.y=+t[0],r+t[0].length):-1}function r4(e,t,r){return(t=s5.exec(t.slice(r,r+2)))?(e.y=+t[0]+(68<+t[0]?1900:2e3),r+t[0].length):-1}function i4(e,t,r){return(t=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6)))?(e.Z=t[1]?0:-(t[2]+(t[3]||"00")),r+t[0].length):-1}function n4(e,t,r){return(t=s5.exec(t.slice(r,r+1)))?(e.q=3*t[0]-3,r+t[0].length):-1}function a4(e,t,r){return(t=s5.exec(t.slice(r,r+2)))?(e.m=t[0]-1,r+t[0].length):-1}function s4(e,t,r){return(t=s5.exec(t.slice(r,r+2)))?(e.d=+t[0],r+t[0].length):-1}function o4(e,t,r){return(t=s5.exec(t.slice(r,r+3)))?(e.m=0,e.d=+t[0],r+t[0].length):-1}function l4(e,t,r){return(t=s5.exec(t.slice(r,r+2)))?(e.H=+t[0],r+t[0].length):-1}function c4(e,t,r){return(t=s5.exec(t.slice(r,r+2)))?(e.M=+t[0],r+t[0].length):-1}function h4(e,t,r){return(t=s5.exec(t.slice(r,r+2)))?(e.S=+t[0],r+t[0].length):-1}function u4(e,t,r){return(t=s5.exec(t.slice(r,r+3)))?(e.L=+t[0],r+t[0].length):-1}function d4(e,t,r){return(t=s5.exec(t.slice(r,r+6)))?(e.L=Math.floor(t[0]/1e3),r+t[0].length):-1}function p4(e,t,r){return(t=o5.exec(t.slice(r,r+1)))?r+t[0].length:-1}function g4(e,t,r){return(t=s5.exec(t.slice(r)))?(e.Q=+t[0],r+t[0].length):-1}function f4(e,t,r){return(t=s5.exec(t.slice(r)))?(e.s=+t[0],r+t[0].length):-1}function m4(e,t){return Yx(e.getDate(),t,2)}function y4(e,t){return Yx(e.getHours(),t,2)}function v4(e,t){return Yx(e.getHours()%12||12,t,2)}function b4(e,t){return Yx(1+ix.count(Lx(e),e),t,3)}function x4(e,t){return Yx(e.getMilliseconds(),t,3)}function T4(e,t){return x4(e,t)+"000"}function w4(e,t){return Yx(e.getMonth()+1,t,2)}function k4(e,t){return Yx(e.getMinutes(),t,2)}function E4(e,t){return Yx(e.getSeconds(),t,2)}function _4(e){return 0===(e=e.getDay())?7:e}function S4(e,t){return Yx(gx.count(Lx(e)-1,e),t,2)}function C4(e){var t=e.getDay();return 4<=t||0===t?vx(e):vx.ceil(e)}function A4(e,t){return e=C4(e),Yx(vx.count(Lx(e),e)+(4===Lx(e).getDay()),t,2)}function R4(e){return e.getDay()}function L4(e,t){return Yx(fx.count(Lx(e)-1,e),t,2)}function N4(e,t){return Yx(e.getFullYear()%100,t,2)}function I4(e,t){return Yx((e=C4(e)).getFullYear()%100,t,2)}function D4(e,t){return Yx(e.getFullYear()%1e4,t,4)}function M4(e,t){var r=e.getDay();return Yx((e=4<=r||0===r?vx(e):vx.ceil(e)).getFullYear()%1e4,t,4)}function O4(e){return(0<(e=e.getTimezoneOffset())?"-":(e*=-1,"+"))+Yx(e/60|0,"0",2)+Yx(e%60,"0",2)}function P4(e,t){return Yx(e.getUTCDate(),t,2)}function $4(e,t){return Yx(e.getUTCHours(),t,2)}function B4(e,t){return Yx(e.getUTCHours()%12||12,t,2)}function F4(e,t){return Yx(1+nx.count(Nx(e),e),t,3)}function z4(e,t){return Yx(e.getUTCMilliseconds(),t,3)}function q4(e,t){return z4(e,t)+"000"}function U4(e,t){return Yx(e.getUTCMonth()+1,t,2)}function G4(e,t){return Yx(e.getUTCMinutes(),t,2)}function j4(e,t){return Yx(e.getUTCSeconds(),t,2)}function W4(e){return 0===(e=e.getUTCDay())?7:e}function Y4(e,t){return Yx(Tx.count(Nx(e)-1,e),t,2)}function V4(e){var t=e.getUTCDay();return 4<=t||0===t?_x(e):_x.ceil(e)}function H4(e,t){return e=V4(e),Yx(_x.count(Nx(e),e)+(4===Nx(e).getUTCDay()),t,2)}function X4(e){return e.getUTCDay()}function K4(e,t){return Yx(wx.count(Nx(e)-1,e),t,2)}function Z4(e,t){return Yx(e.getUTCFullYear()%100,t,2)}function Q4(e,t){return Yx((e=V4(e)).getUTCFullYear()%100,t,2)}function J4(e,t){return Yx(e.getUTCFullYear()%1e4,t,4)}function e5(e,t){var r=e.getUTCDay();return Yx((e=4<=r||0===r?_x(e):_x.ceil(e)).getUTCFullYear()%1e4,t,4)}function t5(){return"+0000"}function r5(){return"%"}function i5(e){return+e}function n5(e){return Math.floor(+e/1e3)}var a5,s5,o5,l5,c5=s(()=>{qx(),mt(Ux,"localDate"),mt(Gx,"utcDate"),mt(jx,"newDate"),mt(Wx,"formatLocale"),a5={"-":"",_:" ",0:"0"},s5=/^\s*\d+/,o5=/^%/,l5=/[\\^$*+?|[\]().{}]/g,mt(Yx,"pad"),mt(Vx,"requote"),mt(Hx,"formatRe"),mt(Xx,"formatLookup"),mt(Kx,"parseWeekdayNumberSunday"),mt(Zx,"parseWeekdayNumberMonday"),mt(Qx,"parseWeekNumberSunday"),mt(Jx,"parseWeekNumberISO"),mt(e4,"parseWeekNumberMonday"),mt(t4,"parseFullYear"),mt(r4,"parseYear"),mt(i4,"parseZone"),mt(n4,"parseQuarter"),mt(a4,"parseMonthNumber"),mt(s4,"parseDayOfMonth"),mt(o4,"parseDayOfYear"),mt(l4,"parseHour24"),mt(c4,"parseMinutes"),mt(h4,"parseSeconds"),mt(u4,"parseMilliseconds"),mt(d4,"parseMicroseconds"),mt(p4,"parseLiteralPercent"),mt(g4,"parseUnixTimestamp"),mt(f4,"parseUnixTimestampSeconds"),mt(m4,"formatDayOfMonth"),mt(y4,"formatHour24"),mt(v4,"formatHour12"),mt(b4,"formatDayOfYear"),mt(x4,"formatMilliseconds"),mt(T4,"formatMicroseconds"),mt(w4,"formatMonthNumber"),mt(k4,"formatMinutes"),mt(E4,"formatSeconds"),mt(_4,"formatWeekdayNumberMonday"),mt(S4,"formatWeekNumberSunday"),mt(C4,"dISO"),mt(A4,"formatWeekNumberISO"),mt(R4,"formatWeekdayNumberSunday"),mt(L4,"formatWeekNumberMonday"),mt(N4,"formatYear"),mt(I4,"formatYearISO"),mt(D4,"formatFullYear"),mt(M4,"formatFullYearISO"),mt(O4,"formatZone"),mt(P4,"formatUTCDayOfMonth"),mt($4,"formatUTCHour24"),mt(B4,"formatUTCHour12"),mt(F4,"formatUTCDayOfYear"),mt(z4,"formatUTCMilliseconds"),mt(q4,"formatUTCMicroseconds"),mt(U4,"formatUTCMonthNumber"),mt(G4,"formatUTCMinutes"),mt(j4,"formatUTCSeconds"),mt(W4,"formatUTCWeekdayNumberMonday"),mt(Y4,"formatUTCWeekNumberSunday"),mt(V4,"UTCdISO"),mt(H4,"formatUTCWeekNumberISO"),mt(X4,"formatUTCWeekdayNumberSunday"),mt(K4,"formatUTCWeekNumberMonday"),mt(Z4,"formatUTCYear"),mt(Q4,"formatUTCYearISO"),mt(J4,"formatUTCFullYear"),mt(e5,"formatUTCFullYearISO"),mt(t5,"formatUTCZone"),mt(r5,"formatLiteralPercent"),mt(i5,"formatUnixTimestamp"),mt(n5,"formatUnixTimestampSeconds")});function h5(e){return u5=Wx(e),d5=u5.format,u5}var u5,d5,p5=s(()=>{c5(),h5({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),mt(h5,"defaultLocale")}),g5=s(()=>{p5()});function f5(e){return new Date(e)}function m5(e){return e instanceof Date?+e:+new Date(+e)}function y5(r,i,t,n,a,s,o,l,c,h){var u=Bb(),d=u.invert,p=u.domain,g=h(".%L"),f=h(":%S"),m=h("%I:%M"),y=h("%I %p"),v=h("%a %d"),b=h("%b %d"),x=h("%B"),T=h("%Y");function w(e){return(c(e){qx(),g5(),zb(),Tb(),Vb(),mt(f5,"date"),mt(m5,"number"),mt(y5,"calendar"),mt(v5,"time")}),x5=s(()=>{Sb(),Wb(),Eb(),b5()});function T5(e){for(var t=e.length/6|0,r=new Array(t),i=0;i{mt(T5,"default")}),E5=s(()=>{k5(),w5=T5("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")}),_5=s(()=>{E5()});function S5(e){return mt(function(){return e},"constant")}var C5=s(()=>{mt(S5,"default")});function A5(e){return 1{L5=Math.abs,N5=Math.atan2,I5=Math.cos,D5=Math.max,M5=Math.min,O5=Math.sin,P5=Math.sqrt,$5=1e-12,F5=(B5=Math.PI)/2,z5=2*B5,mt(A5,"acos"),mt(R5,"asin")});function U5(r){let i=3;return r.digits=function(e){if(!arguments.length)return i;if(null==e)i=null;else{var t=Math.floor(e);if(!(0<=t))throw new RangeError("invalid digits: "+e);i=t}return r},()=>new T2(i)}var G5=s(()=>{k2(),mt(U5,"withPath")});function j5(e){return e.innerRadius}function W5(e){return e.outerRadius}function Y5(e){return e.startAngle}function V5(e){return e.endAngle}function H5(e){return e&&e.padAngle}function X5(e,t,r,i,n,a,s,o){var l=(o-=a)*(r-=e)-(s-=n)*(i-=t);if(!(l*l<$5))return[e+(l=(s*(t-a)-o*(e-n))/l)*r,t+l*i]}function K5(e,t,r,i,n,a,s){var o=(s=(s?a:-a)/P5((l=e-r)*l+(o=t-i)*o))*o,s=-s*l,l=e+o,e=t+s,t=r+o,r=i+s,i=(l+t)/2,c=(e+r)/2,h=t-l,u=r-e,d=h*h+u*u,t=((l=l*r-t*e)*u-h*(r=(u<0?-1:1)*P5(D5(0,(a=n-a)*a*d-l*l))))/d,e=(-l*h-u*r)/d,p=(l*u+h*r)/d,l=(-l*h+u*r)/d;return(r=p-i)*r+(d=l-c)*d<(h=t-i)*h+(u=e-c)*u&&(t=p,e=l),{cx:t,cy:e,x01:-o,y01:-s,x11:t*(n/a-1),y11:e*(n/a-1)}}function Z5(){var A=j5,R=W5,L=S5(0),N=null,I=Y5,D=V5,M=H5,O=null,P=U5(t);function t(){var e,t,r,i,n,a,s,o,l,c,h,u,d,p,g,f,m,y,v,b,x,T,w=+A.apply(this,arguments),k=+R.apply(this,arguments),E=I.apply(this,arguments)-F5,_=D.apply(this,arguments)-F5,S=L5(_-E),C=E<_;if(O=O||(e=P()),k$5?(i+=u*=C?1:-1,n-=u):(a=0,i=n=(E+_)/2),(s-=2*d)>$5?(t+=d*=C?1:-1,r-=d):(s=0,t=r=(E+_)/2)),h=k*I5(t),u=k*O5(t),d=w*I5(n),E=w*O5(n),$5{C5(),q5(),G5(),mt(j5,"arcInnerRadius"),mt(W5,"arcOuterRadius"),mt(Y5,"arcStartAngle"),mt(V5,"arcEndAngle"),mt(H5,"arcPadAngle"),mt(X5,"intersect"),mt(K5,"cornerTangents"),mt(Z5,"default")});function J5(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}var e3=s(()=>{Array.prototype.slice,mt(J5,"default")});function t3(e){this._context=e}function r3(e){return new t3(e)}var i3=s(()=>{mt(t3,"Linear"),t3.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(function(){this._point=0},"lineStart"),lineEnd:mt(function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:mt(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}},"point")},mt(r3,"default")});function n3(e){return e[0]}function a3(e){return e[1]}var s3=s(()=>{mt(n3,"x"),mt(a3,"y")});function o3(s,o){var l=S5(!0),c=null,h=r3,u=null,d=U5(t);function t(e){var t,r,i,n=(e=J5(e)).length,a=!1;for(null==c&&(u=h(i=d())),t=0;t<=n;++t)!(t{e3(),C5(),i3(),G5(),s3(),mt(o3,"default")});function c3(e,t){return t{mt(c3,"default")});function u3(e){return e}var d3=s(()=>{mt(u3,"default")});function p3(){var p=u3,g=c3,f=null,m=S5(0),y=S5(z5),v=S5(0);function t(r){for(var e,t,i,n=(r=J5(r)).length,a=0,s=new Array(n),o=new Array(n),l=+m.apply(this,arguments),c=Math.min(z5,Math.max(-z5,y.apply(this,arguments)-l)),h=Math.min(Math.abs(c)/n,v.apply(this,arguments)),u=h*(c<0?-1:1),d=0;d{e3(),C5(),h3(),d3(),q5(),mt(p3,"default")});function f3(e){return new y3(e,!0)}function m3(e){return new y3(e,!1)}var y3,v3=s(()=>{y3=class{static{mt(this,"Bump")}constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}},mt(f3,"bumpX"),mt(m3,"bumpY")});function b3(){}var x3=s(()=>{mt(b3,"default")});function T3(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function w3(e){this._context=e}function k3(e){return new w3(e)}var E3=s(()=>{mt(T3,"point"),mt(w3,"Basis"),w3.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:mt(function(){switch(this._point){case 3:T3(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:mt(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:T3(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")},mt(k3,"default")});function _3(e){this._context=e}function S3(e){return new _3(e)}var C3=s(()=>{x3(),E3(),mt(_3,"BasisClosed"),_3.prototype={areaStart:b3,areaEnd:b3,lineStart:mt(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},"lineStart"),lineEnd:mt(function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},"lineEnd"),point:mt(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:T3(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")},mt(S3,"default")});function A3(e){this._context=e}function R3(e){return new A3(e)}var L3=s(()=>{E3(),mt(A3,"BasisOpen"),A3.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:mt(function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:mt(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:T3(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")},mt(R3,"default")});function N3(e,t){this._basis=new w3(e),this._beta=t}var I3,D3=s(()=>{E3(),mt(N3,"Bundle"),N3.prototype={lineStart:mt(function(){this._x=[],this._y=[],this._basis.lineStart()},"lineStart"),lineEnd:mt(function(){var e=this._x,t=this._y,r=e.length-1;if(0{mt(M3,"point"),mt(O3,"Cardinal"),O3.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:mt(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:M3(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:mt(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:M3(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")},P3=mt(function t(r){function e(e){return new O3(e,r)}return mt(e,"cardinal"),e.tension=function(e){return t(+e)},e},"custom")(0)});function B3(e,t){this._context=e,this._k=(1-t)/6}var F3,z3=s(()=>{x3(),$3(),mt(B3,"CardinalClosed"),B3.prototype={areaStart:b3,areaEnd:b3,lineStart:mt(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},"lineStart"),lineEnd:mt(function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},"lineEnd"),point:mt(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:M3(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")},F3=mt(function t(r){function e(e){return new B3(e,r)}return mt(e,"cardinal"),e.tension=function(e){return t(+e)},e},"custom")(0)});function q3(e,t){this._context=e,this._k=(1-t)/6}var U3,G3=s(()=>{$3(),mt(q3,"CardinalOpen"),q3.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:mt(function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:mt(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:M3(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")},U3=mt(function t(r){function e(e){return new q3(e,r)}return mt(e,"cardinal"),e.tension=function(e){return t(+e)},e},"custom")(0)});function j3(e,t,r){var i,n,a=e._x1,s=e._y1,o=e._x2,l=e._y2;$5{q5(),$3(),mt(j3,"point"),mt(W3,"CatmullRom"),W3.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},"lineStart"),lineEnd:mt(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:mt(function(e,t){var r,i;switch(e=+e,t=+t,this._point&&(r=this._x2-e,i=this._y2-t,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))),this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:j3(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")},Y3=mt(function t(r){function e(e){return r?new W3(e,r):new O3(e,0)}return mt(e,"catmullRom"),e.alpha=function(e){return t(+e)},e},"custom")(.5)});function H3(e,t){this._context=e,this._alpha=t}var X3,K3=s(()=>{z3(),x3(),V3(),mt(H3,"CatmullRomClosed"),H3.prototype={areaStart:b3,areaEnd:b3,lineStart:mt(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},"lineStart"),lineEnd:mt(function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},"lineEnd"),point:mt(function(e,t){var r,i;switch(e=+e,t=+t,this._point&&(r=this._x2-e,i=this._y2-t,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))),this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:j3(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")},X3=mt(function t(r){function e(e){return r?new H3(e,r):new B3(e,0)}return mt(e,"catmullRom"),e.alpha=function(e){return t(+e)},e},"custom")(.5)});function Z3(e,t){this._context=e,this._alpha=t}var Q3,J3=s(()=>{G3(),V3(),mt(Z3,"CatmullRomOpen"),Z3.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},"lineStart"),lineEnd:mt(function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:mt(function(e,t){var r,i;switch(e=+e,t=+t,this._point&&(r=this._x2-e,i=this._y2-t,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))),this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:j3(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t},"point")},Q3=mt(function t(r){function e(e){return r?new Z3(e,r):new q3(e,0)}return mt(e,"catmullRom"),e.alpha=function(e){return t(+e)},e},"custom")(.5)});function eT(e){this._context=e}function tT(e){return new eT(e)}var rT=s(()=>{x3(),mt(eT,"LinearClosed"),eT.prototype={areaStart:b3,areaEnd:b3,lineStart:mt(function(){this._point=0},"lineStart"),lineEnd:mt(function(){this._point&&this._context.closePath()},"lineEnd"),point:mt(function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))},"point")},mt(tT,"default")});function iT(e){return e<0?-1:1}function nT(e,t,r){var i=e._x1-e._x0,t=t-e._x1,n=(e._y1-e._y0)/(i||t<0&&-0),e=(n*t+(r=(r-e._y1)/(t||i<0&&-0))*i)/(i+t);return(iT(n)+iT(r))*Math.min(Math.abs(n),Math.abs(r),.5*Math.abs(e))||0}function aT(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function sT(e,t,r){var i=e._x0,n=e._x1,a=e._y1,s=(n-i)/3;e._context.bezierCurveTo(i+s,e._y0+s*t,n-s,a-s*r,n,a)}function oT(e){this._context=e}function lT(e){this._context=new cT(e)}function cT(e){this._context=e}function hT(e){return new oT(e)}function uT(e){return new lT(e)}var dT=s(()=>{mt(iT,"sign"),mt(nT,"slope3"),mt(aT,"slope2"),mt(sT,"point"),mt(oT,"MonotoneX"),oT.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},"lineStart"),lineEnd:mt(function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:sT(this,this._t0,aT(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:mt(function(e,t){var r=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,sT(this,aT(this,r=nT(this,e,t)),r);break;default:sT(this,this._t0,r=nT(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}},"point")},mt(lT,"MonotoneY"),(lT.prototype=Object.create(oT.prototype)).point=function(e,t){oT.prototype.point.call(this,t,e)},mt(cT,"ReflectContext"),cT.prototype={moveTo:mt(function(e,t){this._context.moveTo(t,e)},"moveTo"),closePath:mt(function(){this._context.closePath()},"closePath"),lineTo:mt(function(e,t){this._context.lineTo(t,e)},"lineTo"),bezierCurveTo:mt(function(e,t,r,i,n,a){this._context.bezierCurveTo(t,e,i,r,a,n)},"bezierCurveTo")},mt(hT,"monotoneX"),mt(uT,"monotoneY")});function pT(e){this._context=e}function gT(e){var t,r,i=e.length-1,n=new Array(i),a=new Array(i),s=new Array(i);for(a[n[0]=0]=2,s[0]=e[0]+2*e[1],t=1;t{mt(pT,"Natural"),pT.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(function(){this._x=[],this._y=[]},"lineStart"),lineEnd:mt(function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===r)this._context.lineTo(e[1],t[1]);else for(var i=gT(e),n=gT(t),a=0,s=1;s{mt(yT,"Step"),yT.prototype={areaStart:mt(function(){this._line=0},"areaStart"),areaEnd:mt(function(){this._line=NaN},"areaEnd"),lineStart:mt(function(){this._x=this._y=NaN,this._point=0},"lineStart"),lineEnd:mt(function(){0{Q5(),l3(),g3(),C3(),L3(),E3(),v3(),D3(),z3(),G3(),$3(),K3(),J3(),V3(),rT(),i3(),dT(),mT(),TT()}),kT=s(()=>{}),ET=s(()=>{});function _T(e,t,r){this.k=e,this.x=t,this.y=r}function ST(e){for(;!e.__zoom;)if(!(e=e.parentNode))return CT;return e.__zoom}var CT,AT,RT,LT,NT,IT,DT,MT,OT,PT,$T,BT,FT,zT,qT,UT,GT,jT,WT,YT,VT,HT,XT,KT,ZT,QT,JT,ew,tw,rw,iw,nw,aw,sw=s(()=>{mt(_T,"Transform"),_T.prototype={constructor:_T,scale:mt(function(e){return 1===e?this:new _T(this.k*e,this.x,this.y)},"scale"),translate:mt(function(e,t){return 0===e&0===t?this:new _T(this.k,this.x+this.k*e,this.y+this.k*t)},"translate"),apply:mt(function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},"apply"),applyX:mt(function(e){return e*this.k+this.x},"applyX"),applyY:mt(function(e){return e*this.k+this.y},"applyY"),invert:mt(function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},"invert"),invertX:mt(function(e){return(e-this.x)/this.k},"invertX"),invertY:mt(function(e){return(e-this.y)/this.k},"invertY"),rescaleX:mt(function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},"rescaleX"),rescaleY:mt(function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},"rescaleY"),toString:mt(function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"},"toString")},CT=new _T(1,0,0),ST.prototype=_T.prototype,mt(ST,"transform")}),ow=s(()=>{}),lw=s(()=>{r2(),kT(),ET(),sw(),ow()}),cw=s(()=>{lw(),sw()}),hw=s(()=>{ld(),wd(),p2(),E2(),L1(),_2(),S2(),Dd(),_g(),C2(),Ky(),A2(),L2(),mv(),yv(),yb(),Lf(),k2(),vb(),R2(),bb(),x5(),_5(),Eg(),wT(),qx(),g5(),em(),r2(),cw()}),uw=NGe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|:)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[".","/"],e.BLANK_URL="about:blank"}),dw=NGe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeUrl=void 0;var a=uw();function s(e){return-1{AT=G(dw(),1),hw(),zc(),RT=mt((e,t)=>{var r=e.append("rect");if(r.attr("x",t.x),r.attr("y",t.y),r.attr("fill",t.fill),r.attr("stroke",t.stroke),r.attr("width",t.width),r.attr("height",t.height),t.name&&r.attr("name",t.name),t.rx&&r.attr("rx",t.rx),t.ry&&r.attr("ry",t.ry),void 0!==t.attrs)for(var i in t.attrs)r.attr(i,t.attrs[i]);return t.class&&r.attr("class",t.class),r},"drawRect"),LT=mt((e,t)=>{t={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"},RT(e,t).lower()},"drawBackgroundRect"),NT=mt((e,t)=>{var r=t.text.replace(cc," "),i=((e=e.append("text")).attr("x",t.x),e.attr("y",t.y),e.attr("class","legend"),e.style("text-anchor",t.anchor),t.class&&e.attr("class",t.class),e.append("tspan"));return i.attr("x",t.x+2*t.textMargin),i.text(r),e},"drawText"),IT=mt((e,t,r,i)=>{(e=e.append("image")).attr("x",t),e.attr("y",r),t=(0,AT.sanitizeUrl)(i),e.attr("xlink:href",t)},"drawImage"),DT=mt((e,t,r,i)=>{(e=e.append("use")).attr("x",t),e.attr("y",r),t=(0,AT.sanitizeUrl)(i),e.attr("xlink:href","#"+t)},"drawEmbeddedImage"),MT=mt(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),OT=mt(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),PT=mt(()=>{let e=V(".mermaidTooltip");return e=e.empty()?V("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100"):e},"createTooltip")}),gw=s(()=>{function t(e,t,r,i,n,a,s){g(t.append("text").attr("x",r+n/2).attr("y",i+a/2+5).style("text-anchor","middle").text(e),s)}function l(e,t,r,i,n,a,s,o){var{fontSize:l,fontFamily:c,fontWeight:h}=o,u=e.split(L.lineBreakRegex);for(let e=0;e{let i=e.append("g"),n=0;for(var a of t){var s,o=a.textColor||"#444444",l=a.lineColor||"#444444",c=a.offsetX?parseInt(a.offsetX):0,h=a.offsetY?parseInt(a.offsetY):0,l=(0===n?((s=i.append("line")).attr("x1",a.startPoint.x),s.attr("y1",a.startPoint.y),s.attr("x2",a.endPoint.x),s.attr("y2",a.endPoint.y),s.attr("stroke-width","1"),s.attr("stroke",l),s.style("fill","none"),"rel_b"!==a.type&&s.attr("marker-end","url(#arrowhead)"),"birel"!==a.type&&"rel_b"!==a.type||s.attr("marker-start","url(#arrowend)"),n=-1):((s=i.append("path")).attr("fill","none").attr("stroke-width","1").attr("stroke",l).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",a.startPoint.x).replaceAll("starty",a.startPoint.y).replaceAll("controlx",a.startPoint.x+(a.endPoint.x-a.startPoint.x)/2-(a.endPoint.x-a.startPoint.x)/4).replaceAll("controly",a.startPoint.y+(a.endPoint.y-a.startPoint.y)/2).replaceAll("stopx",a.endPoint.x).replaceAll("stopy",a.endPoint.y)),"rel_b"!==a.type&&s.attr("marker-end","url(#arrowhead)"),"birel"!==a.type&&"rel_b"!==a.type||s.attr("marker-start","url(#arrowend)")),r.messageFont());QT(r)(a.label.text,i,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+c,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+h,a.label.width,a.label.height,{fill:o},l),a.techn&&""!==a.techn.text&&(l=r.messageFont(),QT(r)("["+a.techn.text+"]",i,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+c,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+r.messageFontSize+5+h,Math.max(a.label.width,a.techn.width),a.techn.height,{fill:o,"font-style":"italic"},l))}},"drawRels"),qT=mt(function(e,t,r){let i=e.append("g"),n=t.bgColor||"none",a=t.borderColor||"#444444",s=t.fontColor||"black",o=t.nodeType?{"stroke-width":1}:{"stroke-width":1,"stroke-dasharray":"7.0,7.0"},l=(BT(i,e={x:t.x,y:t.y,fill:n,stroke:a,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:o}),r.boundaryFont());l.fontWeight="bold",l.fontSize=l.fontSize+2,l.fontColor=s,QT(r)(t.label.text,i,t.x,t.y+t.label.Y,t.width,t.height,{fill:"#444444"},l),t.type&&""!==t.type.text&&((l=r.boundaryFont()).fontColor=s,QT(r)(t.type.text,i,t.x,t.y+t.type.Y,t.width,t.height,{fill:"#444444"},l)),t.descr&&""!==t.descr.text&&((l=r.boundaryFont()).fontSize=l.fontSize-2,l.fontColor=s,QT(r)(t.descr.text,i,t.x,t.y+t.descr.Y,t.width,t.height,{fill:"#444444"},l))},"drawBoundary"),UT=mt(function(e,t,r){let i=t.bgColor||r[t.typeC4Shape.text+"_bg_color"],n=t.borderColor||r[t.typeC4Shape.text+"_border_color"],a=t.fontColor||"#FFFFFF",s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(t.typeC4Shape.text){case"person":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="}var o=e.append("g"),l=(o.attr("class","person-man"),MT());switch(t.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":l.x=t.x,l.y=t.y,l.fill=i,l.width=t.width,l.height=t.height,l.stroke=n,l.rx=2.5,l.ry=2.5,l.attrs={"stroke-width":.5},BT(o,l);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":o.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",n).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2).replaceAll("height",t.height)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",n).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":o.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",n).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("width",t.width).replaceAll("half",t.height/2)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",n).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",t.x+t.width).replaceAll("starty",t.y).replaceAll("half",t.height/2))}switch(e=ZT(r,t.typeC4Shape.text),o.append("text").attr("fill",a).attr("font-family",e.fontFamily).attr("font-size",e.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",t.typeC4Shape.width).attr("x",t.x+t.width/2-t.typeC4Shape.width/2).attr("y",t.y+t.typeC4Shape.Y).text("<<"+t.typeC4Shape.text+">>"),t.typeC4Shape.text){case"person":case"external_person":FT(o,48,48,t.x+t.width/2-24,t.y+t.image.Y,s)}let c=r[t.typeC4Shape.text+"Font"]();return c.fontWeight="bold",c.fontSize=c.fontSize+2,c.fontColor=a,QT(r)(t.label.text,o,t.x,t.y+t.label.Y,t.width,t.height,{fill:a},c),(c=r[t.typeC4Shape.text+"Font"]()).fontColor=a,t.techn&&""!==t.techn?.text?QT(r)(t.techn.text,o,t.x,t.y+t.techn.Y,t.width,t.height,{fill:a,"font-style":"italic"},c):t.type&&""!==t.type.text&&QT(r)(t.type.text,o,t.x,t.y+t.type.Y,t.width,t.height,{fill:a,"font-style":"italic"},c),t.descr&&""!==t.descr.text&&((c=r.personFont()).fontColor=a,QT(r)(t.descr.text,o,t.x,t.y+t.descr.Y,t.width,t.height,{fill:a},c)),t.height},"drawC4Shape"),GT=mt(function(e){e.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),jT=mt(function(e){e.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),WT=mt(function(e){e.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),YT=mt(function(e){e.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),VT=mt(function(e){e.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),HT=mt(function(e){e.append("defs").append("marker").attr("id","filled-head").attr("refX",18).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")},"insertArrowFilledHead"),XT=mt(function(e){e.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertDynamicNumber"),KT=mt(function(e){(e=e.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4)).append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),e.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),ZT=mt((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"getC4ShapeFont"),mt(t,"byText"),mt(l,"byTspan"),mt(r,"byFo"),mt(g,"_setTextAttrs"),QT=function(e){return"fo"===e.textPlacement?r:"old"===e.textPlacement?t:l},JT={drawRect:BT,drawBoundary:qT,drawC4Shape:UT,drawRels:zT,drawImage:FT,insertArrowHead:YT,insertArrowEnd:VT,insertArrowFilledHead:HT,insertDynamicNumber:XT,insertArrowCrossHead:KT,insertDatabaseIcon:GT,insertComputerIcon:jT,insertClockIcon:WT}}),fw=s(()=>{ew="object"==typeof global&&global&&global.Object===Object&&global,tw=ew}),mw=s(()=>{fw(),rw="object"==typeof self&&self&&self.Object===Object&&self,rw=tw||rw||Function("return this")(),iw=rw}),yw=s(()=>{mw(),nw=iw.Symbol,aw=nw});function vw(e){var t=xw.call(e,ww),r=e[ww];try{var i=!(e[ww]=void 0)}catch{}var n=Tw.call(e);return i&&(t?e[ww]=r:delete e[ww]),n}var bw,xw,Tw,ww,kw,Ew=s(()=>{yw(),bw=Object.prototype,xw=bw.hasOwnProperty,Tw=bw.toString,ww=aw?aw.toStringTag:void 0,mt(vw,"getRawTag"),kw=vw});function _w(e){return Cw.call(e)}var Sw,Cw,Aw,Rw=s(()=>{Sw=Object.prototype,Cw=Sw.toString,mt(_w,"objectToString"),Aw=_w});function Lw(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":(Nw&&Nw in Object(e)?kw:Aw)(e)}var Nw,Iw,Dw=s(()=>{yw(),Ew(),Rw(),Nw=aw?aw.toStringTag:void 0,mt(Lw,"baseGetTag"),Iw=Lw});function Mw(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var Ow,Pw=s(()=>{mt(Mw,"isObject"),Ow=Mw});function $w(e){return!!Ow(e)&&("[object Function]"==(e=Iw(e))||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e)}var Bw,Fw,zw,qw=s(()=>{Dw(),Pw(),mt($w,"isFunction"),Bw=$w}),Uw=s(()=>{mw(),Fw=iw["__core-js_shared__"],zw=Fw});function Gw(e){return!!jw&&jw in e}var jw,Ww,Yw=s(()=>{var e;Uw(),e=/[^.]+$/.exec(zw&&zw.keys&&zw.keys.IE_PROTO||""),jw=e?"Symbol(src)_1."+e:"",mt(Gw,"isMasked"),Ww=Gw});function Vw(e){if(null!=e){try{return Xw.call(e)}catch{}try{return e+""}catch{}}return""}var Hw,Xw,Kw,Zw=s(()=>{Hw=Function.prototype,Xw=Hw.toString,mt(Vw,"toSource"),Kw=Vw});function Qw(e){return!(!Ow(e)||Ww(e))&&(Bw(e)?ik:ek).test(Kw(e))}var Jw,ek,tk,rk,ik,nk,ak=s(()=>{qw(),Yw(),Pw(),Zw(),Jw=/[\\^$.*+?()[\]{}|]/g,ek=/^\[object .+?Constructor\]$/,tk=Function.prototype,rk=Object.prototype,tk=tk.toString,rk=rk.hasOwnProperty,ik=RegExp("^"+tk.call(rk).replace(Jw,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),mt(Qw,"baseIsNative"),nk=Qw});function sk(e,t){return e?.[t]}var ok,lk=s(()=>{mt(sk,"getValue"),ok=sk});function ck(e,t){return e=ok(e,t),nk(e)?e:void 0}var hk,uk,dk,pk=s(()=>{ak(),lk(),mt(ck,"getNative"),hk=ck}),gk=s(()=>{pk(),uk=hk(Object,"create"),dk=uk});function fk(){this.__data__=dk?dk(null):{},this.size=0}var mk,yk=s(()=>{gk(),mt(fk,"hashClear"),mk=fk});function vk(e){return e=this.has(e)&&delete this.__data__[e],this.size-=e?1:0,e}var bk,xk=s(()=>{mt(vk,"hashDelete"),bk=vk});function Tk(e){var t,r=this.__data__;return dk?"__lodash_hash_undefined__"===(t=r[e])?void 0:t:kk.call(r,e)?r[e]:void 0}var wk,kk,Ek,_k=s(()=>{gk(),wk=Object.prototype,kk=wk.hasOwnProperty,mt(Tk,"hashGet"),Ek=Tk});function Sk(e){var t=this.__data__;return dk?void 0!==t[e]:Ak.call(t,e)}var Ck,Ak,Rk,Lk=s(()=>{gk(),Ck=Object.prototype,Ak=Ck.hasOwnProperty,mt(Sk,"hashHas"),Rk=Sk});function Nk(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=dk&&void 0===t?"__lodash_hash_undefined__":t,this}var Ik,Dk=s(()=>{gk(),mt(Nk,"hashSet"),Ik=Nk});function Mk(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{yk(),xk(),_k(),Lk(),Dk(),mt(Mk,"Hash"),Mk.prototype.clear=mk,Mk.prototype.delete=bk,Mk.prototype.get=Ek,Mk.prototype.has=Rk,Mk.prototype.set=Ik,Ok=Mk});function $k(){this.__data__=[],this.size=0}var Bk,Fk=s(()=>{mt($k,"listCacheClear"),Bk=$k});function zk(e,t){return e===t||e!=e&&t!=t}var qk,Uk=s(()=>{mt(zk,"eq"),qk=zk});function Gk(e,t){for(var r=e.length;r--;)if(qk(e[r][0],t))return r;return-1}var jk,Wk=s(()=>{Uk(),mt(Gk,"assocIndexOf"),jk=Gk});function Yk(e){var t=this.__data__;return!((e=jk(t,e))<0||(e==t.length-1?t.pop():Hk.call(t,e,1),--this.size,0))}var Vk,Hk,Xk,Kk=s(()=>{Wk(),Vk=Array.prototype,Hk=Vk.splice,mt(Yk,"listCacheDelete"),Xk=Yk});function Zk(e){var t=this.__data__;return(e=jk(t,e))<0?void 0:t[e][1]}var Qk,Jk=s(()=>{Wk(),mt(Zk,"listCacheGet"),Qk=Zk});function e6(e){return-1{Wk(),mt(e6,"listCacheHas"),t6=e6});function i6(e,t){var r=this.__data__,i=jk(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}var n6,a6=s(()=>{Wk(),mt(i6,"listCacheSet"),n6=i6});function s6(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{Fk(),Kk(),Jk(),r6(),a6(),mt(s6,"ListCache"),s6.prototype.clear=Bk,s6.prototype.delete=Xk,s6.prototype.get=Qk,s6.prototype.has=t6,s6.prototype.set=n6,o6=s6}),u6=s(()=>{pk(),mw(),l6=hk(iw,"Map"),c6=l6});function d6(){this.size=0,this.__data__={hash:new Ok,map:new(c6||o6),string:new Ok}}var p6,g6=s(()=>{Pk(),h6(),u6(),mt(d6,"mapCacheClear"),p6=d6});function f6(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}var m6,y6=s(()=>{mt(f6,"isKeyable"),m6=f6});function v6(e,t){return e=e.__data__,m6(t)?e["string"==typeof t?"string":"hash"]:e.map}var b6,x6=s(()=>{y6(),mt(v6,"getMapData"),b6=v6});function T6(e){return e=b6(this,e).delete(e),this.size-=e?1:0,e}var w6,k6=s(()=>{x6(),mt(T6,"mapCacheDelete"),w6=T6});function E6(e){return b6(this,e).get(e)}var _6,S6=s(()=>{x6(),mt(E6,"mapCacheGet"),_6=E6});function C6(e){return b6(this,e).has(e)}var A6,R6=s(()=>{x6(),mt(C6,"mapCacheHas"),A6=C6});function L6(e,t){var r=b6(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}var N6,I6=s(()=>{x6(),mt(L6,"mapCacheSet"),N6=L6});function D6(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{g6(),k6(),S6(),R6(),I6(),mt(D6,"MapCache"),D6.prototype.clear=p6,D6.prototype.delete=w6,D6.prototype.get=_6,D6.prototype.has=A6,D6.prototype.set=N6,M6=D6});function P6(i,n){if("function"!=typeof i||null!=n&&"function"!=typeof n)throw new TypeError($6);var a=mt(function(){var e=arguments,t=n?n.apply(this,e):e[0],r=a.cache;return r.has(t)?r.get(t):(e=i.apply(this,e),a.cache=r.set(t,e)||r,e)},"memoized");return a.cache=new(P6.Cache||M6),a}var $6,B6,F6=s(()=>{O6(),$6="Expected a function",mt(P6,"memoize"),P6.Cache=M6,B6=P6});function z6(){this.__data__=new o6,this.size=0}var q6,U6=s(()=>{h6(),mt(z6,"stackClear"),q6=z6});function G6(e){var t=this.__data__,e=t.delete(e);return this.size=t.size,e}var j6,W6=s(()=>{mt(G6,"stackDelete"),j6=G6});function Y6(e){return this.__data__.get(e)}var V6,H6=s(()=>{mt(Y6,"stackGet"),V6=Y6});function X6(e){return this.__data__.has(e)}var K6,Z6=s(()=>{mt(X6,"stackHas"),K6=X6});function Q6(e,t){var r=this.__data__;if(r instanceof o6){var i=r.__data__;if(!c6||i.length<199)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new M6(i)}return r.set(e,t),this.size=r.size,this}var J6,eE=s(()=>{h6(),u6(),O6(),mt(Q6,"stackSet"),J6=Q6});function tE(e){e=this.__data__=new o6(e),this.size=e.size}var rE,iE,nE,aE=s(()=>{h6(),U6(),W6(),H6(),Z6(),eE(),mt(tE,"Stack"),tE.prototype.clear=q6,tE.prototype.delete=j6,tE.prototype.get=V6,tE.prototype.has=K6,tE.prototype.set=J6,rE=tE}),sE=s(()=>{pk(),iE=(()=>{try{var e=hk(Object,"defineProperty");return e({},"",{}),e}catch{}})(),nE=iE});function oE(e,t,r){"__proto__"==t&&nE?nE(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var lE,cE=s(()=>{sE(),mt(oE,"baseAssignValue"),lE=oE});function hE(e,t,r){(void 0===r||qk(e[t],r))&&(void 0!==r||t in e)||lE(e,t,r)}var uE,dE=s(()=>{cE(),Uk(),mt(hE,"assignMergeValue"),uE=hE});function pE(l){return function(e,t,r){for(var i=-1,n=Object(e),a=r(e),s=a.length;s--;){var o=a[l?s:++i];if(!1===t(n[o],o,n))break}return e}}var gE,fE,mE,yE=s(()=>{mt(pE,"createBaseFor"),gE=pE}),vE=s(()=>{yE(),fE=gE(),mE=fE});function bE(e,t){return t?e.slice():(t=e.length,t=wE?wE(t):new e.constructor(t),e.copy(t),t)}var xE,TE,wE,kE,EE,_E,SE=s(()=>{mw(),xE="object"==typeof exports&&exports&&!exports.nodeType&&exports,TE=(TE=xE&&"object"==typeof module&&module&&!module.nodeType&&module)&&TE.exports===xE?iw.Buffer:void 0,wE=TE?TE.allocUnsafe:void 0,mt(bE,"cloneBuffer"),kE=bE}),CE=s(()=>{mw(),EE=iw.Uint8Array,_E=EE});function AE(e){var t=new e.constructor(e.byteLength);return new _E(t).set(new _E(e)),t}var RE,LE=s(()=>{CE(),mt(AE,"cloneArrayBuffer"),RE=AE});function NE(e,t){return t=t?RE(e.buffer):e.buffer,new e.constructor(t,e.byteOffset,e.length)}var IE,DE=s(()=>{LE(),mt(NE,"cloneTypedArray"),IE=NE});function ME(e,t){var r=-1,i=e.length;for(t=t||Array(i);++r{mt(ME,"copyArray"),OE=ME}),FE=s(()=>{function t(){}Pw(),PE=Object.create,mt(t,"object"),$E=function(e){return Ow(e)?PE?PE(e):(t.prototype=e,e=new t,t.prototype=void 0,e):{}}});function zE(t,r){return function(e){return t(r(e))}}var qE,UE,GE,jE=s(()=>{mt(zE,"overArg"),qE=zE}),WE=s(()=>{jE(),UE=qE(Object.getPrototypeOf,Object),GE=UE});function YE(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||VE)}var VE,HE,XE=s(()=>{VE=Object.prototype,mt(YE,"isPrototype"),HE=YE});function KE(e){return"function"!=typeof e.constructor||HE(e)?{}:$E(GE(e))}var ZE,QE=s(()=>{FE(),WE(),XE(),mt(KE,"initCloneObject"),ZE=KE});function JE(e){return null!=e&&"object"==typeof e}var e_,t_=s(()=>{mt(JE,"isObjectLike"),e_=JE});function r_(e){return e_(e)&&"[object Arguments]"==Iw(e)}var i_,n_,a_,s_,o_,l_,c_,h_=s(()=>{Dw(),t_(),mt(r_,"baseIsArguments"),i_=r_}),u_=s(()=>{h_(),t_(),s_=Object.prototype,n_=s_.hasOwnProperty,a_=s_.propertyIsEnumerable,s_=i_(function(){return arguments}())?i_:function(e){return e_(e)&&n_.call(e,"callee")&&!a_.call(e,"callee")},o_=s_}),d_=s(()=>{l_=Array.isArray,c_=l_});function p_(e){return"number"==typeof e&&-1{mt(p_,"isLength"),g_=p_});function m_(e){return null!=e&&g_(e.length)&&!Bw(e)}var y_,v_=s(()=>{qw(),f_(),mt(m_,"isArrayLike"),y_=m_});function b_(e){return e_(e)&&y_(e)}var x_,T_=s(()=>{v_(),t_(),mt(b_,"isArrayLikeObject"),x_=b_});function w_(){return!1}var k_,E_,__,S_,C_=s(()=>{mt(w_,"stubFalse"),k_=w_}),A_=s(()=>{mw(),C_(),__="object"==typeof exports&&exports&&!exports.nodeType&&exports,E_=(E_=__&&"object"==typeof module&&module&&!module.nodeType&&module)&&E_.exports===__?iw.Buffer:void 0,__=E_?E_.isBuffer:void 0,S_=__||k_});function R_(e){return!(!e_(e)||"[object Object]"!=Iw(e))&&(null===(e=GE(e))||"function"==typeof(e=D_.call(e,"constructor")&&e.constructor)&&e instanceof e&&I_.call(e)==M_)}var L_,N_,I_,D_,M_,O_,P_=s(()=>{Dw(),WE(),t_(),L_=Function.prototype,N_=Object.prototype,I_=L_.toString,D_=N_.hasOwnProperty,M_=I_.call(Object),mt(R_,"isPlainObject"),O_=R_});function $_(e){return e_(e)&&g_(e.length)&&!!B_[Iw(e)]}var B_,F_,z_=s(()=>{Dw(),f_(),t_(),(B_={})["[object Float32Array]"]=B_["[object Float64Array]"]=B_["[object Int8Array]"]=B_["[object Int16Array]"]=B_["[object Int32Array]"]=B_["[object Uint8Array]"]=B_["[object Uint8ClampedArray]"]=B_["[object Uint16Array]"]=B_["[object Uint32Array]"]=!0,B_["[object Arguments]"]=B_["[object Array]"]=B_["[object ArrayBuffer]"]=B_["[object Boolean]"]=B_["[object DataView]"]=B_["[object Date]"]=B_["[object Error]"]=B_["[object Function]"]=B_["[object Map]"]=B_["[object Number]"]=B_["[object Object]"]=B_["[object RegExp]"]=B_["[object Set]"]=B_["[object String]"]=B_["[object WeakMap]"]=!1,mt($_,"baseIsTypedArray"),F_=$_});function q_(t){return function(e){return t(e)}}var U_,G_,j_,W_,Y_,V_,H_,X_=s(()=>{mt(q_,"baseUnary"),U_=q_}),K_=s(()=>{fw(),W_="object"==typeof exports&&exports&&!exports.nodeType&&exports,G_=W_&&"object"==typeof module&&module&&!module.nodeType&&module,W_=G_&&G_.exports===W_,j_=W_&&tw.process,W_=(()=>{try{return G_&&G_.require&&G_.require("util").types||j_&&j_.binding&&j_.binding("util")}catch{}})(),Y_=W_}),Z_=s(()=>{z_(),X_(),K_(),V_=(V_=Y_&&Y_.isTypedArray)?U_(V_):F_,H_=V_});function Q_(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var J_,eS=s(()=>{mt(Q_,"safeGet"),J_=Q_});function tS(e,t,r){var i=e[t];iS.call(e,t)&&qk(i,r)&&(void 0!==r||t in e)||lE(e,t,r)}var rS,iS,nS,aS=s(()=>{cE(),Uk(),rS=Object.prototype,iS=rS.hasOwnProperty,mt(tS,"assignValue"),nS=tS});function sS(e,t,r,i){var n=!r;r=r||{};for(var a=-1,s=t.length;++a{aS(),cE(),mt(sS,"copyObject"),oS=sS});function cS(e,t){for(var r=-1,i=Array(e);++r{mt(cS,"baseTimes"),hS=cS});function dS(e,t){var r=typeof e;return!!(t=t??9007199254740991)&&("number"==r||"symbol"!=r&&pS.test(e))&&-1{pS=/^(?:0|[1-9]\d*)$/,mt(dS,"isIndex"),gS=dS});function mS(e,t){var r,i=c_(e),n=!i&&o_(e),a=!i&&!n&&S_(e),s=!i&&!n&&!a&&H_(e),o=i||n||a||s,l=o?hS(e.length,String):[],c=l.length;for(r in e)!t&&!vS.call(e,r)||o&&("length"==r||a&&("offset"==r||"parent"==r)||s&&("buffer"==r||"byteLength"==r||"byteOffset"==r)||gS(r,c))||l.push(r);return l}var yS,vS,bS,xS=s(()=>{uS(),u_(),d_(),A_(),fS(),Z_(),yS=Object.prototype,vS=yS.hasOwnProperty,mt(mS,"arrayLikeKeys"),bS=mS});function TS(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}var wS,kS=s(()=>{mt(TS,"nativeKeysIn"),wS=TS});function ES(e){if(!Ow(e))return wS(e);var t,r=HE(e),i=[];for(t in e)("constructor"!=t||!r&&SS.call(e,t))&&i.push(t);return i}var _S,SS,CS,AS=s(()=>{Pw(),XE(),kS(),_S=Object.prototype,SS=_S.hasOwnProperty,mt(ES,"baseKeysIn"),CS=ES});function RS(e){return y_(e)?bS(e,!0):CS(e)}var LS,NS=s(()=>{xS(),AS(),v_(),mt(RS,"keysIn"),LS=RS});function IS(e){return oS(e,LS(e))}var DS,MS=s(()=>{lS(),NS(),mt(IS,"toPlainObject"),DS=IS});function OS(e,t,r,i,n,a,s){var o,l,c,h=J_(e,r),u=J_(t,r),d=s.get(u);d||((t=void 0===(d=a?a(h,u,r+"",e,t,s):void 0))&&(l=!(o=c_(u))&&S_(u),c=!o&&!l&&H_(u),d=u,o||l||c?d=c_(h)?h:x_(h)?OE(h):l?kE(u,!(t=!1)):c?IE(u,!(t=!1)):[]:O_(u)||o_(u)?o_(d=h)?d=DS(h):Ow(h)&&!Bw(h)||(d=ZE(u)):t=!1),t&&(s.set(u,d),n(d,u,i,a,s),s.delete(u))),uE(e,r,d)}var PS,$S=s(()=>{dE(),SE(),DE(),BE(),QE(),u_(),d_(),T_(),A_(),qw(),Pw(),P_(),Z_(),eS(),MS(),mt(OS,"baseMergeDeep"),PS=OS});function BS(i,n,a,s,o){i!==n&&mE(n,function(e,t){var r;o=o||new rE,Ow(e)?PS(i,n,t,a,BS,s,o):(r=s?s(J_(i,t),e,t+"",i,n,o):void 0,uE(i,t,void 0===r?e:r))},LS)}var FS,zS=s(()=>{aE(),dE(),vE(),$S(),Pw(),NS(),eS(),mt(BS,"baseMerge"),FS=BS});function qS(e){return e}var US,GS=s(()=>{mt(qS,"identity"),US=qS});function jS(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var WS,YS=s(()=>{mt(jS,"apply"),WS=jS});function VS(a,s,o){return s=HS(void 0===s?a.length-1:s,0),function(){for(var e=arguments,t=-1,r=HS(e.length-s,0),i=Array(r);++t{YS(),HS=Math.max,mt(VS,"overRest"),XS=VS});function ZS(e){return function(){return e}}var QS,JS,e7=s(()=>{mt(ZS,"constant"),QS=ZS}),t7=s(()=>{e7(),sE(),GS(),JS=nE?function(e,t){return nE(e,"toString",{configurable:!0,enumerable:!1,value:QS(t),writable:!0})}:US});function r7(r){var i=0,n=0;return function(){var e=i7(),t=16-(e-n);if(n=e,0{i7=Date.now,mt(r7,"shortOut"),n7=r7}),l7=s(()=>{t7(),o7(),a7=n7(JS),s7=a7});function c7(e,t){return s7(XS(e,t,US),e+"")}var h7,u7=s(()=>{GS(),KS(),l7(),mt(c7,"baseRest"),h7=c7});function d7(e,t,r){var i;return!!Ow(r)&&!!("number"==(i=typeof t)?y_(r)&&gS(t,r.length):"string"==i&&t in r)&&qk(r[t],e)}var p7,g7=s(()=>{Uk(),v_(),fS(),Pw(),mt(d7,"isIterateeCall"),p7=d7});function f7(o){return h7(function(e,t){var r=-1,i=t.length,n=1{u7(),g7(),mt(f7,"createAssigner"),m7=f7}),x7=s(()=>{zS(),b7(),y7=m7(function(e,t,r){FS(e,t,r)}),v7=y7});function T7(e,t){return e?(e="curve"+(e.charAt(0).toUpperCase()+e.slice(1)),$7[e]??t):t}function w7(e,t){if(e=e.trim())return"loose"!==t.securityLevel?(0,O7.sanitizeUrl)(e):e}function k7(e,t){return e&&t?Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0}function E7(e){let t,r=0;e.forEach(e=>{r+=k7(e,t),t=e});var i=r/2;return W7(e,i)}function _7(e){return 1===e.length?e[0]:E7(e)}function S7(e,t,r){var r=structuredClone(r),i=(M.info("our points",r),"start_left"!==t&&"start_right"!==t&&r.reverse(),25+e),i=W7(r,i),e=10+.5*e,n=Math.atan2(r[0].y-i.y,r[0].x-i.x),a={x:0,y:0};return"start_left"===t?(a.x=Math.sin(n+Math.PI)*e+(r[0].x+i.x)/2,a.y=-Math.cos(n+Math.PI)*e+(r[0].y+i.y)/2):"end_right"===t?(a.x=Math.sin(n-Math.PI)*e+(r[0].x+i.x)/2-5,a.y=-Math.cos(n-Math.PI)*e+(r[0].y+i.y)/2-5):"end_left"===t?(a.x=Math.sin(n)*e+(r[0].x+i.x)/2-5,a.y=-Math.cos(n)*e+(r[0].y+i.y)/2-5):(a.x=Math.sin(n)*e+(r[0].x+i.x)/2,a.y=-Math.cos(n)*e+(r[0].y+i.y)/2),a}function C7(e){let t="",r="";for(var i of e)void 0!==i&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}function A7(t){let r="",i="0123456789abcdef",n=i.length;for(let e=0;eMath.round(parseFloat(e)).toString())).includes(r.toString())||t.includes(e.toString())}var O7,P7,$7,B7,F7,z7,q7,U7,G7,j7,W7,Y7,V7,H7,X7,K7,Z7,Q7,J7,eC,tC,rC,iC,nC,aC,sC,oC,lC,cC,hC=s(()=>{O7=G(dw(),1),hw(),zc(),oi(),e(),uh(),Tr(),F6(),x7(),ch(),P7="​",$7={curveBasis:k3,curveBasisClosed:S3,curveBasisOpen:R3,curveBumpX:f3,curveBumpY:m3,curveBundle:I3,curveCardinalClosed:F3,curveCardinalOpen:U3,curveCardinal:P3,curveCatmullRomClosed:X3,curveCatmullRomOpen:Q3,curveCatmullRom:Y3,curveLinear:r3,curveLinearClosed:tT,curveMonotoneX:hT,curveMonotoneY:uT,curveNatural:fT,curveStep:vT,curveStepAfter:xT,curveStepBefore:bT},B7=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,F7=mt(function(e,t){var r,i=z7(e,/(?:init\b)|(?:initialize\b)/),n={};if(n=Array.isArray(i)?(r=i.map(e=>e.args),Xt(r),Re(n,[...r])):i.args)return r=Hc(e,t),void 0!==n[i="config"]&&(n[r="flowchart-v2"===r?"flowchart":r]=n[i],delete n[i]),n},"detectInit"),z7=mt(function(e,t=null){try{var r=new RegExp(`[%]{2}(?![{]${B7.source})(?=[}][%]{2}).* `,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),M.debug(`Detecting diagram directive${null!==t?" type:"+t:""} based on the text:`+e);for(var i,n,a,s=[];null!==(i=jc.exec(e));)i.index===jc.lastIndex&&jc.lastIndex++,(i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t))&&(n=i[1]||i[2],a=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null,s.push({type:n,args:a}));return 0===s.length?{type:e,args:null}:1===s.length?s[0]:s}catch(r){return M.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),q7=mt(function(e){return e.replace(jc,"")},"removeDirectives"),U7=mt(function(e,t){for(var[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray"),mt(T7,"interpolateToCurve"),mt(w7,"formatUrl"),G7=mt((t,...e)=>{let r=t.split("."),i=r.length-1,n=r[i],a=window;for(let e=0;e(t=Math.pow(10,t),Math.round(e*t)/t),"roundNumber"),W7=mt((e,t)=>{let r,i=t;for(var n of e){if(r){var a=k7(n,r);if(0===a)return r;if(a{M.info("our points "+JSON.stringify(t)),t[0]!==r&&(t=t.reverse());var r=W7(t,25),e=e?10:5,i=Math.atan2(t[0].y-r.y,t[0].x-r.x),n={x:0,y:0};return n.x=Math.sin(i)*e+(t[0].x+r.x)/2,n.y=-Math.cos(i)*e+(t[0].y+r.y)/2,n},"calcCardinalityPosition"),mt(S7,"calcTerminalLabelPosition"),mt(C7,"getStylesFromArray"),V7=0,H7=mt(()=>(V7++,"id-"+Math.random().toString(36).substr(2,12)+"-"+V7),"generateId"),mt(A7,"makeRandomHex"),X7=mt(e=>A7(e.length),"random"),K7=mt(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"),Z7=mt(function(e,t){var r=t.text.replace(L.lineBreakRegex," "),[,i]=aC(t.fontSize);return(e=e.append("text")).attr("x",t.x),e.attr("y",t.y),e.style("text-anchor",t.anchor),e.style("font-family",t.fontFamily),e.style("font-size",i),e.style("font-weight",t.fontWeight),e.attr("fill",t.fill),void 0!==t.class&&e.attr("class",t.class),(i=e.append("tspan")).attr("x",t.x+2*t.textMargin),i.attr("fill",t.fill),i.text(r),e},"drawSimpleText"),Q7=B6((e,s,o)=>{if(!e||(o=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},o),L.lineBreakRegex.test(e)))return e;let l=e.split(" ").filter(Boolean),c=[],h="";return l.forEach((e,t)=>{var r,i,n=L7(e+" ",o),a=L7(h,o);h=s""!==e).join(o.joinWith)},(e,t,r)=>""+e+t+r.fontSize+r.fontWeight+r.fontFamily+r.joinWith),J7=B6((e,i,n="-",a)=>{a=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},a);let s=[...e],o=[],l="";return s.forEach((e,t)=>{var r,e=""+l+e;l=L7(e,a)>=i?(t+=1,t=s.length===t,r=e+n,o.push(t?e:r),""):e}),{hyphenatedStrings:o,remainingWord:l}},(e,t,r="-",i)=>""+e+t+r+i.fontSize+i.fontWeight+i.fontFamily),mt(R7,"calculateTextHeight"),mt(L7,"calculateTextWidth"),eC=B6((e,t)=>{var{fontSize:t=12,fontFamily:r="Arial",fontWeight:i=400}=t;if(!e)return{width:0,height:0};var[,n]=aC(t),t=["sans-serif",r],a=e.split(L.lineBreakRegex),s=[];if(!(r=V("body")).remove)return{width:0,height:0,lineHeight:0};var o,l=r.append("svg");for(o of t){var c,h={width:0,height:0,lineHeight:0};for(c of a){var u=K7();if(u.text=c||P7,0===(u=((u=Z7(l,u).style("font-size",n).style("font-weight",i).style("font-family",o))._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))}s.push(h)}return l.remove(),s[isNaN(s[1].height)||isNaN(s[1].width)||isNaN(s[1].lineHeight)||s[0].height>s[1].height&&s[0].width>s[1].width&&s[0].lineHeight>s[1].lineHeight?0:1]},(e,t)=>""+e+t.fontSize+t.fontWeight+t.fontFamily),tC=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{mt(this,"InitIDGenerator")}},iC=mt(function(e){return rC=rC||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),rC.innerHTML=e,unescape(rC.textContent)},"entityDecode"),mt(N7,"isDetailedError"),nC=mt((e,t,r,i)=>{var n;i&&(n=e.node()?.getBBox())&&e.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",t)},"insertTitle"),aC=mt(e=>{var t;return"number"==typeof e?[e,e+"px"]:(t=parseInt(e??"",10),Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e])},"parseFontSize"),mt(I7,"cleanAndMerge"),sC={assignWithDepth:Re,wrapLabel:Q7,calculateTextHeight:R7,calculateTextWidth:L7,calculateTextDimensions:eC,cleanAndMerge:I7,detectInit:F7,detectDirective:z7,isSubstringInArray:U7,interpolateToCurve:T7,calcLabelPosition:_7,calcCardinalityPosition:Y7,calcTerminalLabelPosition:S7,formatUrl:w7,getStylesFromArray:C7,generateId:H7,random:X7,runFunc:G7,entityDecode:iC,insertTitle:nC,isLabelCoordinateInPath:M7,parseFontSize:aC,InitIDGenerator:tC},oC=mt(function(e){let t=e;return t=(t=(t=t.replace(/style.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)})).replace(/classDef.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)})).replace(/#\w+;/g,function(e){return e=e.substring(1,e.length-1),/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"})},"encodeEntities"),lC=mt(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),cC=mt((e,t,{counter:r=0,prefix:i,suffix:n},a)=>a||(i?i+"_":"")+e+`_${t}_`+r+(n?"_"+n:""),"getEdgeId"),mt(D7,"handleUndefinedAttr"),mt(M7,"isLabelCoordinateInPath")});function uC(e,t,r,i,n){if(!t[e].width)if(r)t[e].text=Q7(t[e].text,n,i),t[e].textLines=t[e].text.split(L.lineBreakRegex).length,t[e].width=n,t[e].height=R7(t[e].text,i);else{var a,s,r=t[e].text.split(L.lineBreakRegex);t[e].textLines=r.length,t[e].height=0,t[e].width=0;for(s of r)t[e].width=Math.max(L7(s,i),t[e].width),a=R7(s,i),t[e].height=t[e].height+a}}function dC(t,r,i,e,n){var a,s,o=new vC(n);o.data.widthLimit=i.data.widthLimit/Math.min(mC,e.length);for([a,s]of e.entries()){let e=0;s.image={width:0,height:0,Y:0},s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=e,e=s.image.Y+s.image.height);var l=s.wrap&&yC.wrap,c=TC(yC),l=(c.fontSize=c.fontSize+2,c.fontWeight="bold",uC("label",s,l,c,o.data.widthLimit),s.label.Y=e+8,e=s.label.Y+s.label.height,s.type&&""!==s.type.text&&(s.type.text="["+s.type.text+"]",uC("type",s,l,c=TC(yC),o.data.widthLimit),s.type.Y=e+5,e=s.type.Y+s.type.height),s.descr&&""!==s.descr.text&&((c=TC(yC)).fontSize=c.fontSize-2,uC("descr",s,l,c,o.data.widthLimit),s.descr.Y=e+20,e=s.descr.Y+s.descr.height),c=0==a||a%mC==0?(l=i.data.startx+yC.diagramMarginX,i.data.stopy+yC.diagramMarginY+e):(l=o.data.stopx!==o.data.startx?o.data.stopx+yC.diagramMarginX:o.data.startx,o.data.starty),o.setData(l,l,c,c),o.name=s.alias,n.db.getC4ShapeArray(s.alias));0<(c=n.db.getC4ShapeKeys(s.alias)).length&&EC(o,t,l,c),r=s.alias,0<(l=n.db.getBoundaries(r)).length&&dC(t,0,o,l,n),"global"!==s.alias&&kC(t,s,o),i.data.stopy=Math.max(o.data.stopy+yC.c4ShapeMargin,i.data.stopy),i.data.stopx=Math.max(o.data.stopx+yC.c4ShapeMargin,i.data.stopx),pC=Math.max(pC,i.data.stopx),gC=Math.max(gC,i.data.stopy)}}var pC,gC,fC,mC,yC,vC,bC,xC,TC,wC,kC,EC,_C,SC,CC,AC,RC,LC,NC,IC,DC=s(()=>{hw(),gw(),e(),dh(),zc(),Ru(),Au(),Tr(),hC(),ph(),gC=pC=0,fC=4,mC=2,Qc.yy=Su,yC={},vC=class{static{mt(this,"Bounds")}constructor(e){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,bC(e.db.getConfig())}setData(e,t,r,i){this.nextData.startx=this.data.startx=e,this.nextData.stopx=this.data.stopx=t,this.nextData.starty=this.data.starty=r,this.nextData.stopy=this.data.stopy=i}updateVal(e,t,r,i){void 0===e[t]?e[t]=r:e[t]=i(r,e[t])}insert(e){this.nextData.cnt=this.nextData.cnt+1;let t=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+e.margin:this.nextData.stopx+2*e.margin,r=t+e.width,i=this.nextData.starty+2*e.margin,n=i+e.height;(t>=this.data.widthLimit||r>=this.data.widthLimit||this.nextData.cnt>fC)&&(t=this.nextData.startx+e.margin+yC.nextLinePaddingX,i=this.nextData.stopy+2*e.margin,this.nextData.stopx=r=t+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=n=i+e.height,this.nextData.cnt=1),e.x=t,e.y=i,this.updateVal(this.data,"startx",t,Math.min),this.updateVal(this.data,"starty",i,Math.min),this.updateVal(this.data,"stopx",r,Math.max),this.updateVal(this.data,"stopy",n,Math.max),this.updateVal(this.nextData,"startx",t,Math.min),this.updateVal(this.nextData,"starty",i,Math.min),this.updateVal(this.nextData,"stopx",r,Math.max),this.updateVal(this.nextData,"stopy",n,Math.max)}init(e){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},bC(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}},bC=mt(function(e){Re(yC,e),e.fontFamily&&(yC.personFontFamily=yC.systemFontFamily=yC.messageFontFamily=e.fontFamily),e.fontSize&&(yC.personFontSize=yC.systemFontSize=yC.messageFontSize=e.fontSize),e.fontWeight&&(yC.personFontWeight=yC.systemFontWeight=yC.messageFontWeight=e.fontWeight)},"setConf"),xC=mt((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"c4ShapeFont"),TC=mt(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),"boundaryFont"),wC=mt(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),mt(uC,"calcC4ShapeTextWH"),kC=mt(function(e,t,r){t.x=r.data.startx,t.y=r.data.starty,t.width=r.data.stopx-r.data.startx,t.height=r.data.stopy-r.data.starty,t.label.y=yC.c4ShapeMargin-35;var r=t.wrap&&yC.wrap,i=TC(yC),n=(i.fontSize=i.fontSize+2,i.fontWeight="bold",L7(t.label.text,i));uC("label",t,r,i,n),JT.drawBoundary(e,t,yC)},"drawBoundary"),EC=mt(function(r,i,n,e){let a=0;for(var s of e){a=0;var o=n[s];switch((s=xC(yC,o.typeC4Shape.text)).fontSize=s.fontSize-2,o.typeC4Shape.width=L7("«"+o.typeC4Shape.text+"»",s),o.typeC4Shape.height=s.fontSize+2,o.typeC4Shape.Y=yC.c4ShapePadding,a=o.typeC4Shape.Y+o.typeC4Shape.height-4,o.image={width:0,height:0,Y:0},o.typeC4Shape.text){case"person":case"external_person":o.image.width=48,o.image.height=48,o.image.Y=a,a=o.image.Y+o.image.height}o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=a,a=o.image.Y+o.image.height);var s=o.wrap&&yC.wrap,l=yC.width-2*yC.c4ShapePadding,c=xC(yC,o.typeC4Shape.text);c.fontSize=c.fontSize+2,c.fontWeight="bold",uC("label",o,s,c,l),o.label.Y=a+8,a=o.label.Y+o.label.height,o.type&&""!==o.type.text?(o.type.text="["+o.type.text+"]",uC("type",o,s,xC(yC,o.typeC4Shape.text),l),o.type.Y=a+5,a=o.type.Y+o.type.height):o.techn&&""!==o.techn.text&&(o.techn.text="["+o.techn.text+"]",uC("techn",o,s,xC(yC,o.techn.text),l),o.techn.Y=a+5,a=o.techn.Y+o.techn.height);let e=a,t=o.label.width;o.descr&&""!==o.descr.text&&(uC("descr",o,s,xC(yC,o.typeC4Shape.text),l),o.descr.Y=a+20,a=o.descr.Y+o.descr.height,t=Math.max(o.label.width,o.descr.width),e=a-5*o.descr.textLines),t+=yC.c4ShapePadding,o.width=Math.max(o.width||yC.width,t,yC.width),o.height=Math.max(o.height||yC.height,e,yC.height),o.margin=o.margin||yC.c4ShapeMargin,r.insert(o),JT.drawC4Shape(i,o,yC)}r.bumpLastMargin(yC.c4ShapeMargin)},"drawC4ShapeArray"),_C=class{static{mt(this,"Point")}constructor(e,t){this.x=e,this.y=t}},SC=mt(function(e,t){let r=e.x,i=e.y,n=t.x,a=t.y,s=r+e.width/2,o=i+e.height/2,l=Math.abs(r-n),c=Math.abs(i-a),h=c/l,u=e.height/e.width,d=null;return i==a&&r{NC=mt(e=>`.person { stroke: ${e.personBorder}; fill: ${e.personBkg}; } `,"getStyles"),IC=NC}),OC={};PGe(OC,{diagram:()=>PC});var PC,$C=s(()=>{dh(),Ru(),DC(),MC(),PC={parser:Jc,db:Su,renderer:LC,styles:IC,init:mt(({c4:e,wrap:t})=>{LC.setConf(e),Su.setWrap(t)},"init")}});function BC(e){return"u">16&255),a.push(n>>8&255),a.push(255&n)),n=n<<6|i.indexOf(t.charAt(s));return 0==(e=r%4*6)?(a.push(n>>16&255),a.push(n>>8&255),a.push(255&n)):18==e?(a.push(n>>10&255),a.push(n>>2&255)):12==e&&a.push(n>>4&255),new Uint8Array(a)}function w8(e){for(var t,r="",i=0,n=e.length,a=i9,s=0;s>18&63])+a[i>>12&63])+a[i>>6&63])+a[63&i]),i=(i<<8)+e[s];return 0==(t=n%3)?r=(r=(r=(r+=a[i>>18&63])+a[i>>12&63])+a[i>>6&63])+a[63&i]:2==t?r=(r=(r=(r+=a[i>>10&63])+a[i>>4&63])+a[i<<2&63])+a[64]:1==t&&(r=(r=(r=(r+=a[i>>2&63])+a[i<<4&63])+a[64])+a[64]),r}function k8(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)}function E8(e){if(null!==e)for(var t,r,i,n=[],a=e,s=0,o=a.length;s>10),56320+(e-65536&1023))}function z8(e,t,r){"__proto__"===t?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}function q8(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||d9,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function U8(e,t){return(e={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart}).snippet=YA(e),new WA(t,e)}function G8(e,t){throw U8(e,t)}function j8(e,t){e.onWarning&&e.onWarning.call(null,U8(e,t))}function W8(e,t,r,i){var n,a,s,o;if(tl&&(l=e.lineIndent),N8(u))c++;else{if(e.lineIndentt)&&0!==i)G8(e,"bad indentation of a sequence entry");else if(e.lineIndentt)&&(y&&(s=e.line,o=e.lineStart,l=e.position),lA(e,t,y9,!0,n)&&(y?f=e.result:m=e.result),y||(V8(e,d,p,g,f,m,s,o,l),g=f=m=null),X8(e,!0,-1),c=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&0!==c)G8(e,"bad indentation of a mapping entry");else if(e.lineIndentt?d=1:e.lineIndent===t?d=0:e.lineIndentt?d=1:e.lineIndent===t?d=0:e.lineIndent tag; it should be "scalar", not "'+e.kind+'"'),l=0,c=e.implicitTypes.length;l"),null!==e.result&&u.kind!==e.kind&&G8(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+u.kind+'", not "'+e.kind+'"'),u.resolve(e.result,e.tag)?(e.result=u.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):G8(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||g}function cA(e){var t,r,i,n,a=e.position,s=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(n=e.input.charCodeAt(e.position))&&(X8(e,!0,-1),n=e.input.charCodeAt(e.position),!(0{if(0===a.length)return n.quotingType===B9?'""':"''";if(!n.noCompatMode&&(-1!==P9.indexOf(a)||$9.test(a)))return n.quotingType===B9?'"'+a+'"':"'"+a+"'";var e=n.indent*Math.max(1,s),t=-1===n.lineWidth?-1:Math.max(Math.min(n.lineWidth,40),n.lineWidth-e),r=o||-1=n.flowLevel;function i(e){return vA(n,e)}switch(mt(i,"testAmbiguity"),CA(a,r,n.indent,t,i,n.quotingType,n.forceQuotes&&!o,l)){case F9:return a;case z9:return"'"+a.replace(/'/g,"''")+"'";case q9:return"|"+RA(a,n.indent)+LA(mA(a,e));case U9:return">"+RA(a,n.indent)+LA(mA(NA(a,t),e));case G9:return'"'+DA(a)+'"';default:throw new WA("impossible error: invalid scalar style")}})()}function RA(e,t){var t=SA(e)?String(t):"",r=e[e.length-1]===` `;return t+(!r||e[e.length-2]!==` `&&e!==` `?r?"":"-":"+")+` `}function LA(e){return e[e.length-1]===` `?e.slice(0,-1):e}function NA(e,t){for(var r,i=/(\n+)([^\n]*)/g,n=(r=-1!==(r=e.indexOf(` `))?r:e.length,i.lastIndex=r,IA(e.slice(0,r),t)),a=e[0]===` `||" "===e[0];o=i.exec(e);){var s=o[1],o=o[2],l=" "===o[0];n+=s+(a||l||""===o?"":` `)+IA(o,t),a=l}return n}function IA(e,t){if(""===e||" "===e[0])return e;for(var r,i,n=/ [^ ]/g,a=0,s=0,o="";i=n.exec(e);)t<(i=i.index)-a&&(o+=` `+e.slice(a,r=at&&a tag resolver accepts not "'+a+'" style');i=n.represent[a](t,a)}e.dump=i}return!0}return!1}function FA(e,t,r,i,n,a,s){e.tag=null,e.dump=r,BA(e,r,!1)||BA(e,r,!0);var o,l,c=N9.call(e.dump),h=i,u=(i=i&&(e.flowLevel<0||e.flowLevel>t),"[object Object]"===c||"[object Array]"===c);if(u&&(l=-1!==(o=e.duplicates.indexOf(r))),(null!==e.tag&&"?"!==e.tag||l||2!==e.indent&&0",e.dump=r+" "+e.dump)}return!0}function zA(e,t){var r,i,n=[],a=[];for(qA(e,n,a),r=0,i=a.length;r{for(mt(BC,"isNothing"),mt(FC,"isObject"),mt(zC,"toArray"),mt(qC,"extend"),mt(UC,"repeat"),mt(GC,"isNegativeZero"),jA={isNothing:BC,isObject:FC,toArray:zC,repeat:UC,isNegativeZero:GC,extend:qC},mt(jC,"formatError"),mt(WC,"YAMLException$1"),((WC.prototype=Object.create(Error.prototype)).constructor=WC).prototype.toString=mt(function(e){return this.name+": "+jC(this,e)},"toString"),WA=WC,mt(YC,"getLine"),mt(VC,"padStart"),mt(HC,"makeSnippet"),YA=HC,VA=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],HA=["scalar","sequence","mapping"],mt(XC,"compileStyleAliases"),mt(KC,"Type$1"),XA=KC,mt(ZC,"compileList"),mt(QC,"compileMap"),mt(JC,"Schema$1"),JC.prototype.extend=mt(function(e){var t=[],r=[];if(e instanceof XA)r.push(e);else if(Array.isArray(e))r=r.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new WA("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(r=r.concat(e.explicit))}return t.forEach(function(e){if(!(e instanceof XA))throw new WA("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new WA("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new WA("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(e){if(!(e instanceof XA))throw new WA("Specified list of YAML types (or a single Type object) contains a non-Type object.")}),(e=Object.create(JC.prototype)).implicit=(this.implicit||[]).concat(t),e.explicit=(this.explicit||[]).concat(r),e.compiledImplicit=ZC(e,"implicit"),e.compiledExplicit=ZC(e,"explicit"),e.compiledTypeMap=QC(e.compiledImplicit,e.compiledExplicit),e},"extend"),QA=JC,L9=new XA("tag:yaml.org,2002:str",{kind:"scalar",construct:mt(function(e){return null!==e?e:""},"construct")}),t9=new XA("tag:yaml.org,2002:seq",{kind:"sequence",construct:mt(function(e){return null!==e?e:[]},"construct")}),r9=new XA("tag:yaml.org,2002:map",{kind:"mapping",construct:mt(function(e){return null!==e?e:{}},"construct")}),QA=new QA({explicit:[L9,t9,r9]}),mt(e8,"resolveYamlNull"),mt(t8,"constructYamlNull"),mt(r8,"isNull"),L9=new XA("tag:yaml.org,2002:null",{kind:"scalar",resolve:e8,construct:t8,predicate:r8,represent:{canonical:mt(function(){return"~"},"canonical"),lowercase:mt(function(){return"null"},"lowercase"),uppercase:mt(function(){return"NULL"},"uppercase"),camelcase:mt(function(){return"Null"},"camelcase"),empty:mt(function(){return""},"empty")},defaultStyle:"lowercase"}),mt(i8,"resolveYamlBoolean"),mt(n8,"constructYamlBoolean"),mt(a8,"isBoolean"),t9=new XA("tag:yaml.org,2002:bool",{kind:"scalar",resolve:i8,construct:n8,predicate:a8,represent:{lowercase:mt(function(e){return e?"true":"false"},"lowercase"),uppercase:mt(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:mt(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),mt(s8,"isHexCode"),mt(o8,"isOctCode"),mt(l8,"isDecCode"),mt(c8,"resolveYamlInteger"),mt(h8,"constructYamlInteger"),mt(u8,"isInteger"),r9=new XA("tag:yaml.org,2002:int",{kind:"scalar",resolve:c8,construct:h8,predicate:u8,represent:{binary:mt(function(e){return 0<=e?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:mt(function(e){return 0<=e?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:mt(function(e){return e.toString(10)},"decimal"),hexadecimal:mt(function(e){return 0<=e?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),KA=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),mt(d8,"resolveYamlFloat"),mt(p8,"constructYamlFloat"),ZA=/^[-+]?[0-9]+e/,mt(g8,"representYamlFloat"),mt(f8,"isFloat"),n9=new XA("tag:yaml.org,2002:float",{kind:"scalar",resolve:d8,construct:p8,predicate:f8,represent:g8,defaultStyle:"lowercase"}),QA=QA.extend({implicit:[L9,t9,r9,n9]}),L9=QA,JA=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),e9=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"),mt(m8,"resolveYamlTimestamp"),mt(y8,"constructYamlTimestamp"),mt(v8,"representYamlTimestamp"),t9=new XA("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:m8,construct:y8,instanceOf:Date,represent:v8}),mt(b8,"resolveYamlMerge"),r9=new XA("tag:yaml.org,2002:merge",{kind:"scalar",resolve:b8}),i9=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= \r`,mt(x8,"resolveYamlBinary"),mt(T8,"constructYamlBinary"),mt(w8,"representYamlBinary"),mt(k8,"isBinary"),n9=new XA("tag:yaml.org,2002:binary",{kind:"scalar",resolve:x8,construct:T8,predicate:k8,represent:w8}),a9=Object.prototype.hasOwnProperty,s9=Object.prototype.toString,mt(E8,"resolveYamlOmap"),mt(_8,"constructYamlOmap"),o9=new XA("tag:yaml.org,2002:omap",{kind:"sequence",resolve:E8,construct:_8}),l9=Object.prototype.toString,mt(S8,"resolveYamlPairs"),mt(C8,"constructYamlPairs"),c9=new XA("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:S8,construct:C8}),h9=Object.prototype.hasOwnProperty,mt(A8,"resolveYamlSet"),mt(R8,"constructYamlSet"),u9=new XA("tag:yaml.org,2002:set",{kind:"mapping",resolve:A8,construct:R8}),d9=L9.extend({implicit:[t9,r9],explicit:[n9,o9,c9,u9]}),p9=Object.prototype.hasOwnProperty,y9=4,v9=g9=1,b9=f9=2,x9=m9=3,T9=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,w9=/[\x85\u2028\u2029]/,k9=/[,\[\]\{\}]/,E9=/^(?:!|!!|![a-z\-]+!)$/i,_9=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,mt(L8,"_class"),mt(N8,"is_EOL"),mt(I8,"is_WHITE_SPACE"),mt(D8,"is_WS_OR_EOL"),mt(M8,"is_FLOW_INDICATOR"),mt(O8,"fromHexCode"),mt(P8,"escapedHexLen"),mt($8,"fromDecimalCode"),mt(B8,"simpleEscapeSequence"),mt(F8,"charFromCodepoint"),mt(z8,"setProperty"),S9=new Array(256),C9=new Array(256),A9=0;A9<256;A9++)S9[A9]=B8(A9)?1:0,C9[A9]=B8(A9);mt(q8,"State$1"),mt(U8,"generateError"),mt(G8,"throwError"),mt(j8,"throwWarning"),R9={YAML:mt(function(e,t,r){var i,n;null!==e.version&&G8(e,"duplication of %YAML directive"),1!==r.length&&G8(e,"YAML directive accepts exactly one argument"),null===(n=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&G8(e,"ill-formed argument of the YAML directive"),i=parseInt(n[1],10),n=parseInt(n[2],10),1!==i&&G8(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=n<2,1!==n&&2!==n&&j8(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:mt(function(e,t,r){var i;2!==r.length&&G8(e,"TAG directive accepts exactly two arguments"),i=r[1],E9.test(r=r[0])||G8(e,"ill-formed tag handle (first argument) of the TAG directive"),p9.call(e.tagMap,r)&&G8(e,'there is a previously declared suffix for "'+r+'" tag handle'),_9.test(i)||G8(e,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch{G8(e,"tag prefix is malformed: "+i)}e.tagMap[r]=i},"handleTagDirective")},mt(W8,"captureSegment"),mt(Y8,"mergeMappings"),mt(V8,"storeMappingPair"),mt(H8,"readLineBreak"),mt(X8,"skipSeparationSpace"),mt(K8,"testDocumentSeparator"),mt(Z8,"writeFoldedLines"),mt(Q8,"readPlainScalar"),mt(J8,"readSingleQuotedScalar"),mt(eA,"readDoubleQuotedScalar"),mt(tA,"readFlowCollection"),mt(rA,"readBlockScalar"),mt(iA,"readBlockSequence"),mt(nA,"readBlockMapping"),mt(aA,"readTagProperty"),mt(sA,"readAnchorProperty"),mt(oA,"readAlias"),mt(lA,"composeNode"),mt(cA,"readDocument"),mt(hA,"loadDocuments"),mt(uA,"loadAll$1"),mt(dA,"load$1"),L9={loadAll:uA,load:dA},N9=Object.prototype.toString,I9=Object.prototype.hasOwnProperty,D9=65279,M9=10,O9={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"},P9=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],$9=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/,mt(pA,"compileStyleMap"),mt(gA,"encodeHex"),B9=2,mt(fA,"State"),mt(mA,"indentString"),mt(yA,"generateNextLine"),mt(vA,"testImplicitResolving"),mt(bA,"isWhitespace"),mt(xA,"isPrintable"),mt(TA,"isNsCharOrWhitespace"),mt(wA,"isPlainSafe"),mt(kA,"isPlainSafeFirst"),mt(EA,"isPlainSafeLast"),mt(_A,"codePointAt"),mt(SA,"needIndentIndicator"),F9=1,z9=2,q9=3,U9=4,G9=5,mt(CA,"chooseScalarStyle"),mt(AA,"writeScalar"),mt(RA,"blockHeader"),mt(LA,"dropEndingNewline"),mt(NA,"foldString"),mt(IA,"foldLine"),mt(DA,"escapeString"),mt(MA,"writeFlowSequence"),mt(OA,"writeBlockSequence"),mt(PA,"writeFlowMapping"),mt($A,"writeBlockMapping"),mt(BA,"detectType"),mt(FA,"writeNode"),mt(zA,"getDuplicateReferences"),mt(qA,"inspectNode"),mt(UA,"dump$1"),mt(GA,"renamed"),j9=QA,W9=L9.load,GA("safeLoad","load"),GA("safeLoadAll","loadAll"),GA("safeDump","dump")});function V9(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function H9(e){nR=e}function X9(e,t=""){let i="string"==typeof e?e:e.source,n={replace:mt((e,t)=>{let r="string"==typeof t?t:t.source;return r=r.replace(sR.caret,"$1"),i=i.replace(e,r),n},"replace"),getRegex:mt(()=>new RegExp(i,t),"getRegex")};return n}function K9(e,t){if(t){if(sR.escapeTest.test(e))return e.replace(sR.escapeReplace,NR)}else if(sR.escapeTestNoEncode.test(e))return e.replace(sR.escapeReplaceNoEncode,NR);return e}function Z9(e){try{e=encodeURI(e).replace(sR.percentDecode,"%")}catch{return null}return e}function Q9(e,t){let r=e.replace(sR.findPipe,(e,t,r)=>{let i=!1,n=t;for(;0<=--n&&"\\"===r[n];)i=!i;return i?"|":" |"}),i=r.split(sR.splitPipe),n=0;if(i[0].trim()||i.shift(),0t)i.splice(t);else for(;i.length{var t=e.match(r.other.beginningSpace);return null!==t&&([t]=t,t.length>=i.length)?e.slice(i.length):e}).join(` `)}function iR(e,t){return FR.parse(e,t)}var nR,aR,sR,oR,lR,cR,hR,uR,dR,pR,gR,fR,mR,yR,vR,bR,xR,TR,wR,kR,ER,_R,SR,CR,AR,RR,LR,NR,IR,DR,MR,OR,PR,$R,BR,FR,zR=s(()=>{mt(V9,"L"),nR=V9(),mt(H9,"G"),aR={exec:mt(()=>null,"exec")},mt(X9,"h"),sR={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:mt(e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),"listItemRegex"),nextBulletRegex:mt(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),"nextBulletRegex"),hrRegex:mt(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),"hrRegex"),fencesBeginRegex:mt(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),"fencesBeginRegex"),headingBeginRegex:mt(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),"headingBeginRegex"),htmlBeginRegex:mt(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),"htmlBeginRegex")},dR=/^(?:[ \t]*(?:\n|$))+/,pR=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,cR=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,yR=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,hR=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,uR=/(?:[*+-]|\d{1,9}[.)])/,SR=X9(TR=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,uR).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),TR=X9(TR).replace(/bull/g,uR).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ER=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,vR=/^[^\n]+/,wR=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,lR=X9(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",wR).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),uR=X9(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,uR).getRegex(),_R="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",xR=/|$))/,CR=X9("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",xR).replace("tag",_R).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),bR=X9(ER).replace("hr",yR).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",_R).getRegex(),oR={blockquote:X9(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",bR).getRegex(),code:pR,def:lR,fences:cR,heading:hR,hr:yR,html:CR,lheading:SR,list:uR,newline:dR,paragraph:bR,table:aR,text:vR},pR=X9("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",yR).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",_R).getRegex(),lR={...oR,lheading:TR,table:pR,paragraph:X9(ER).replace("hr",yR).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",pR).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",_R).getRegex()},cR={...oR,html:X9(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",xR).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:aR,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:X9(ER).replace("hr",yR).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",SR).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},hR=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,CR=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,uR=/^( {2,}|\\)\n(?!\s*$)/,dR=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,BR=X9(gR=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,"u").replace(/punct/g,bR).getRegex(),gR=X9(gR,"u").replace(/punct/g,_R).getRegex(),fR=X9(mR="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,TR).replace(/punctSpace/g,vR).replace(/punct/g,bR).getRegex(),mR=X9(mR,"gu").replace(/notPunctSpace/g,yR).replace(/punctSpace/g,ER).replace(/punct/g,_R).getRegex(),yR=X9("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,TR).replace(/punctSpace/g,vR).replace(/punct/g,bR).getRegex(),ER=X9(/\\(punct)/,"gu").replace(/punct/g,bR).getRegex(),_R=X9(/^<(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(),TR=X9(xR).replace("(?:--\x3e|$)","--\x3e").getRegex(),vR=X9("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",TR).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),bR=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,xR=X9(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",bR).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),TR=X9(/^!?\[(label)\]\[(ref)\]/).replace("label",bR).replace("ref",wR).getRegex(),wR=X9(/^!?\[(ref)\](?:\[\])?/).replace("ref",wR).getRegex(),kR=X9("reflink|nolink(?!\\()","g").replace("reflink",TR).replace("nolink",wR).getRegex(),_R={...ER={_backpedal:aR,anyPunctuation:ER,autolink:_R,blockSkip:SR,br:uR,code:CR,del:aR,emStrongLDelim:BR,emStrongRDelimAst:fR,emStrongRDelimUnd:yR,escape:hR,link:xR,nolink:wR,punctuation:pR,reflink:TR,reflinkSearch:kR,tag:vR,text:dR,url:aR},link:X9(/^!?\[(label)\]\((.*?)\)/).replace("label",bR).getRegex(),reflink:X9(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",bR).getRegex()},SR={...ER,emStrongRDelimAst:mR,emStrongLDelim:gR,url:X9(/^((?: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\S]|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},NR=mt(e=>LR[e],"ke"),mt(K9,"w"),mt(Z9,"J"),mt(Q9,"V"),mt(J9,"z"),mt(eR,"ge"),mt(tR,"fe"),mt(rR,"Je"),IR=class{static{mt(this,"y")}options;rules;lexer;constructor(e){this.options=e||nR}space(e){if((e=this.rules.block.newline.exec(e))&&0" ".repeat(3*e.length)),n=d.split(` `,1)[0],a=!i.trim(),s=0;if(this.options.pedantic?(s=2,r=i.trimStart()):a?s=p[1].length+1:(s=4<(s=p[2].search(this.rules.other.nonSpaceChar))?1:s,r=i.slice(s),s+=p[1].length),a&&this.rules.other.blankLine.test(n)&&(t+=n+` `,d=d.substring(n.length+1),e=!0),!e)for(var g=this.rules.other.nextBulletRegex(s),f=this.rules.other.hrRegex(s),m=this.rules.other.fencesBeginRegex(s),y=this.rules.other.headingBeginRegex(s),v=this.rules.other.htmlBeginRegex(s);d;){var b,x=d.split(` `,1)[0];if(n=x,b=this.options.pedantic?n=n.replace(this.rules.other.listReplaceNesting," "):n.replace(this.rules.other.tabCharGlobal," "),m.test(n)||y.test(n)||v.test(n)||g.test(n)||f.test(n))break;if(b.search(this.rules.other.nonSpaceChar)>=s||!n.trim())r+=` `+b.slice(s);else{if(a||4<=i.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)||m.test(i)||y.test(i)||f.test(i))break;r+=` `+n}a||n.trim()||(a=!0),t+=x+` `,d=d.substring(x.length+1),i=b.slice(s)}c.loose||(u?c.loose=!0:this.rules.other.doubleBlankLine.test(t)&&(u=!0));let o=null,l;this.options.gfm&&(o=this.rules.other.listIsTask.exec(r))&&(l="[ ] "!==o[0],r=r.replace(this.rules.other.listReplaceTask,"")),c.items.push({type:"list_item",raw:t,task:!!o,checked:l,loose:!1,text:r,tokens:[]}),c.raw+=t}var r,i=c.items.at(-1);if(i){i.raw=i.raw.trimEnd(),i.text=i.text.trimEnd(),c.raw=c.raw.trimEnd();for(let e=0;e"space"===e.type)).length&&r.some(e=>this.rules.other.anyLine.test(e.raw)),c.loose=r);if(c.loose)for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:i.align[t]})));return i}}}lheading(e){if(e=this.rules.block.lheading.exec(e))return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(e){var t;if(e=this.rules.block.paragraph.exec(e))return t=e[1].charAt(e[1].length-1)===` `?e[1].slice(0,-1):e[1],{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}text(e){if(e=this.rules.block.text.exec(e))return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(e){if(e=this.rules.inline.escape.exec(e))return{type:"escape",raw:e[0],text:e[1]}}tag(e){if(e=this.rules.inline.tag.exec(e))return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){if(r=this.rules.inline.link.exec(r)){var i,n=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;var a=J9(n.slice(0,-1),"\\");if((n.length-a.length)%2==0)return}else{if(-2===(a=eR(r[2],"()")))return;-1!!(t=e.call({lexer:this},n,r))&&(n=n.substring(t.raw.length),r.push(t),!0)))if(t=this.tokenizer.space(n)){n=n.substring(t.raw.length);var e=r.at(-1);1===t.raw.length&&void 0!==e?e.raw+=` `:r.push(t)}else if(t=this.tokenizer.code(n))n=n.substring(t.raw.length),"paragraph"===(e=r.at(-1))?.type||"text"===e?.type?(e.raw+=(e.raw.endsWith(` `)?"":` `)+t.raw,e.text+=` `+t.text,this.inlineQueue.at(-1).src=e.text):r.push(t);else if(t=this.tokenizer.fences(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.heading(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.hr(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.blockquote(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.list(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.html(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.def(n)){n=n.substring(t.raw.length);var a=r.at(-1);"paragraph"===a?.type||"text"===a?.type?(a.raw+=(a.raw.endsWith(` `)?"":` `)+t.raw,a.text+=` `+t.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[t.tag]||(this.tokens.links[t.tag]={href:t.href,title:t.title},r.push(t))}else if(t=this.tokenizer.table(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.lheading(n))n=n.substring(t.raw.length),r.push(t);else{let e=n;if(this.options.extensions?.startBlock){let t=1/0,r=n.slice(1),i;this.options.extensions.startBlock.forEach(e=>{"number"==typeof(i=e.call({lexer:this},r))&&0<=i&&(t=Math.min(t,i))}),t<1/0&&0<=t&&(e=n.substring(0,t+1))}if(this.state.top&&(t=this.tokenizer.paragraph(e)))a=r.at(-1),i&&"paragraph"===a?.type?(a.raw+=(a.raw.endsWith(` `)?"":` `)+t.raw,a.text+=` `+t.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(t),i=e.length!==n.length,n=n.substring(t.raw.length);else if(t=this.tokenizer.text(n)){n=n.substring(t.raw.length);var s=r.at(-1);"text"===s?.type?(s.raw+=(s.raw.endsWith(` `)?"":` `)+t.raw,s.text+=` `+t.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(t)}else if(n){if(s="Infinite loop on byte: "+n.charCodeAt(0),this.options.silent){console.error(s);break}throw new Error(s)}}}return this.state.top=!0,r}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(n,r=[]){let e=n,t=null;if(this.tokens.links){var i=Object.keys(this.tokens.links);if(0!!(t=e.call({lexer:this},n,r))&&(n=n.substring(t.raw.length),r.push(t),!0)))if(t=this.tokenizer.escape(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.tag(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.link(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.reflink(n,this.tokens.links)){n=n.substring(t.raw.length);var o=r.at(-1);"text"===t.type&&"text"===o?.type?(o.raw+=t.raw,o.text+=t.text):r.push(t)}else if(t=this.tokenizer.emStrong(n,e,s))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.codespan(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.br(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.del(n))n=n.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.autolink(n))n=n.substring(t.raw.length),r.push(t);else if(!this.state.inLink&&(t=this.tokenizer.url(n)))n=n.substring(t.raw.length),r.push(t);else{let e=n;if(this.options.extensions?.startInline){let t=1/0,r=n.slice(1),i;this.options.extensions.startInline.forEach(e=>{"number"==typeof(i=e.call({lexer:this},r))&&0<=i&&(t=Math.min(t,i))}),t<1/0&&0<=t&&(e=n.substring(0,t+1))}if(t=this.tokenizer.inlineText(e))n=n.substring(t.raw.length),"_"!==t.raw.slice(-1)&&(s=t.raw.slice(-1)),a=!0,"text"===(o=r.at(-1))?.type?(o.raw+=t.raw,o.text+=t.text):r.push(t);else if(n){var l="Infinite loop on byte: "+n.charCodeAt(0);if(this.options.silent){console.error(l);break}throw new Error(l)}}}return r}},MR=class{static{mt(this,"P")}options;parser;constructor(e){this.options=e||nR}space(e){return""}code({text:e,lang:t,escaped:r}){return t=(t||"").match(sR.notSpaceStart)?.[0],e=e.replace(sR.endingNewline,"")+` `,t?'
'+(r?e:K9(e,!0))+`
`:"
"+(r?e:K9(e,!0))+`
`}blockquote({tokens:e}){return`
${this.parser.parse(e)}
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)} `}hr(e){return`
`}list(t){let e=t.ordered,r=t.start,i="";for(let e=0;e `+i+" `}listitem(e){let t="",r;return e.task&&(r=this.checkbox({checked:!!e.checked}),e.loose?"paragraph"===e.tokens[0]?.type?(e.tokens[0].text=r+" "+e.tokens[0].text,e.tokens[0].tokens&&0${t+=this.parser.parse(e.tokens,!!e.loose)} `}checkbox({checked:e}){return"'}paragraph({tokens:e}){return`

${this.parser.parseInline(e)}

`}table(t){let e="",r="";for(let e=0;e `+e+` `+(i=i&&`${i}`)+` `}tablerow({text:e}){return` ${e} `}tablecell(e){var t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+` `}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${K9(e,!0)}`}br(e){return"
"}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:r}){var r=this.parser.parseInline(r),i=Z9(e);if(null===i)return r;let n='
"}image({href:e,title:t,text:r,tokens:i}){if(i&&(r=this.parser.parseInline(i,this.parser.textRenderer)),null===(i=Z9(e)))return K9(r);let n=`${r}{e=t[e].flat(1/0),i=i.concat(this.walkTokens(e,r))}):t.tokens&&(i=i.concat(this.walkTokens(t.tokens,r)))}}return i}use(...e){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(a=>{var e={...a};if(e.async=this.defaults.async||e.async||!1,a.extensions&&(a.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let r=n.renderers[i.name];r?n.renderers[i.name]=function(...e){var t=i.renderer.apply(this,e);return!1===t?r.apply(this,e):t}:n.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||"block"!==i.level&&"inline"!==i.level)throw new Error("extension level must be 'block' or 'inline'");var e=n[i.level];e?e.unshift(i.tokenizer):n[i.level]=[i.tokenizer],i.start&&("block"===i.level?n.startBlock?n.startBlock.push(i.start):n.startBlock=[i.start]:"inline"===i.level&&(n.startInline?n.startInline.push(i.start):n.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(n.childTokens[i.name]=i.childTokens)}),e.extensions=n),a.renderer){let n=this.defaults.renderer||new MR(this.defaults);for(var t in a.renderer){if(!(t in n))throw new Error(`renderer '${t}' does not exist`);if(!["options","parser"].includes(t)){let e=t,r=a.renderer[e],i=n[e];n[e]=(...e)=>{var t=r.apply(n,e);return(!1===t?i.apply(n,e):t)||""}}}e.renderer=n}if(a.tokenizer){let n=this.defaults.tokenizer||new IR(this.defaults);for(var s in a.tokenizer){if(!(s in n))throw new Error(`tokenizer '${s}' does not exist`);if(!["options","rules","lexer"].includes(s)){let e=s,r=a.tokenizer[e],i=n[e];n[e]=(...e)=>{var t=r.apply(n,e);return!1===t?i.apply(n,e):t}}}e.tokenizer=n}if(a.hooks){let n=this.defaults.hooks||new $R;for(let t in a.hooks){if(!(t in n))throw new Error(`hook '${t}' does not exist`);if(!["options","block"].includes(t)){let e=t,r=a.hooks[e],i=n[e];$R.passThroughHooks.has(t)?n[e]=e=>this.defaults.async&&$R.passThroughHooksRespectAsync.has(t)?Promise.resolve(r.call(n,e)).then(e=>i.call(n,e)):(e=r.call(n,e),i.call(n,e)):n[e]=(...e)=>{var t=r.apply(n,e);return!1===t?i.apply(n,e):t}}}e.hooks=n}if(a.walkTokens){let r=this.defaults.walkTokens,i=a.walkTokens;e.walkTokens=function(e){let t=[];return t.push(i.call(this,e)),t=r?t.concat(r.call(this,e)):t}}this.defaults={...this.defaults,...e}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return DR.lex(e,t??this.defaults)}parser(e,t){return PR.parse(e,t??this.defaults)}parseMarkdown(o){return(r,e)=>{let t={...e},i={...this.defaults,...t},n=this.onError(!!i.silent,!!i.async);if(!0===this.defaults.async&&!1===t.async)return n(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if("u"a(e,i)).then(e=>i.hooks?i.hooks.processAllTokens(e):e).then(e=>i.walkTokens?Promise.all(this.walkTokens(e,i.walkTokens)).then(()=>e):e).then(e=>s(e,i)).then(e=>i.hooks?i.hooks.postprocess(e):e).catch(n);try{i.hooks&&(r=i.hooks.preprocess(r));let e=a(r,i),t=(i.hooks&&(e=i.hooks.processAllTokens(e)),i.walkTokens&&this.walkTokens(e,i.walkTokens),s(e,i));return i.hooks?i.hooks.postprocess(t):t}catch(e){return n(e)}}}onError(r,i){return e=>{var t;if(e.message+=` Please report this to https://github.com/markedjs/marked.`,r)return t="

An error occurred:

"+K9(e.message+"",!0)+"
",i?Promise.resolve(t):t;if(i)return Promise.reject(e);throw e}}},FR=new BR,mt(iR,"d"),iR.options=iR.setOptions=function(e){return FR.setOptions(e),H9(iR.defaults=FR.defaults),iR},iR.getDefaults=V9,iR.defaults=nR,iR.use=function(...e){return FR.use(...e),H9(iR.defaults=FR.defaults),iR},iR.walkTokens=function(e,t){return FR.walkTokens(e,t)},iR.parseInline=FR.parseInline,iR.Parser=PR,iR.parser=PR.parse,iR.Renderer=MR,iR.TextRenderer=OR,iR.Lexer=DR,iR.lexer=DR.lex,iR.Tokenizer=IR,iR.Hooks=$R,iR.parse=iR,DR.lex});function qR(e,{}){return Uc(e.replace(//g,` `).replace(/\n{2,}/g,` `))}function UR(e){return e.split(/\\n|\n|/gi).map(e=>e.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(e=>({content:e,type:"normal"}))??[])}function GR(e,t={}){let r=qR(e,t),i=iR.lexer(r),n=[[]],a=0;function s(t,r="normal"){"text"===t.type?t.text.split(` `).forEach((e,t)=>{0!==t&&(a++,n.push([])),e.split(" ").forEach(e=>{(e=e.replace(/'/g,"'"))&&n[a].push({content:e,type:r})})}):"strong"===t.type||"em"===t.type?t.tokens.forEach(e=>{s(e,t.type)}):"html"===t.type&&n[a].push({content:t.text,type:"normal"})}return mt(s,"processNode"),i.forEach(e=>{"paragraph"===e.type?e.tokens?.forEach(e=>{s(e)}):"html"===e.type?n[a].push({content:e.text,type:"normal"}):n[a].push({content:e.raw,type:"normal"})}),n}function jR(e){return e?`

${e.replace(/\\n|\n/g,"
")}

`:""}function WR(e,{markdownAutoWrap:t}={}){function r(e){return"text"===e.type?!1===t?e.text.replace(/\n */g,"
").replace(/ /g," "):e.text.replace(/\n */g,"
"):"strong"===e.type?`${e.tokens?.map(r).join("")}`:"em"===e.type?`${e.tokens?.map(r).join("")}`:"paragraph"===e.type?`

${e.tokens?.map(r).join("")}

`:"space"===e.type?"":"html"===e.type?""+e.text:"escape"===e.type?e.text:(M.warn("Unsupported markdown: "+e.type),e.raw)}return e=iR.lexer(e),mt(r,"output"),e.map(r).join("")}var YR=s(()=>{zR(),lh(),e(),mt(qR,"preprocessMarkdown"),mt(UR,"nonMarkdownToLines"),mt(GR,"markdownToLines"),mt(jR,"nonMarkdownToHTML"),mt(WR,"markdownToHTML")});function VR(e){return Intl.Segmenter?[...(new Intl.Segmenter).segment(e)].map(e=>e.segment):[...e]}function HR(e,t){return XR(e,[],VR(t.content),t.type)}function XR(e,t,r,i){var n,a,s;return 0===r.length?[{content:t.join(""),type:i},{content:"",type:i}]:([n,...a]=r,e([{content:(s=[...t,n]).join(""),type:i}])?XR(e,s,a,i):(0===t.length&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}]))}function KR(e,t){if(e.some(({content:e})=>e.includes(` `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return ZR(e,t)}function ZR(e,t,r=[],i=[]){if(0===e.length)return 0{mt(VR,"splitTextToChars"),mt(HR,"splitWordToFitWidth"),mt(XR,"splitWordToFitWidthRecursion"),mt(KR,"splitLineToFitWidth"),mt(ZR,"splitLineToFitWidthRecursion")});function JR(e,t){t&&e.attr("style",t)}async function eL(e,t,r,i,n=!1,a=cr()){(e=e.append("foreignObject")).attr("width",Math.min(10*r,16384)+"px"),e.attr("height",Math.min(10*r,16384)+"px");var s=e.append("xhtml:div"),a=Rc(t.label)?await Ic(t.label.replace(L.lineBreakRegex,` `),a):gc(t.label,a),o=t.isNode?"nodeLabel":"edgeLabel",l=s.append("span");return l.html(a),JR(l,t.labelStyle),l.attr("class",o+" "+i),JR(s,t.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(s.style("max-width",r+"px"),s.style("text-align","center")),s.attr("xmlns","http://www.w3.org/1999/xhtml"),n&&s.attr("class","labelBkg"),(a=s.node().getBoundingClientRect()).width===r&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",r+"px"),a=s.node().getBoundingClientRect()),e.node()}function tL(e,t,r,i=!1){return e=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em"),i&&e.attr("text-anchor","middle"),e}function rL(e,t,r){return aL(t=tL(e=e.append("text"),1,t),r),r=t.node().getComputedTextLength(),e.remove(),r}function iL(e,t,r){return aL(t=tL(e=e.append("text"),1,t),[{content:r,type:"normal"}]),(r=t.node()?.getBoundingClientRect())&&e.remove(),r}function nL(t,e,r,i=!1,n=!1){let a=e.append("g"),s=a.insert("rect").attr("class","background").attr("style","stroke: none"),o=a.append("text").attr("y","-10.1"),l=(n&&o.attr("text-anchor","middle"),0);for(var c of r){var h,u=mt(e=>rL(a,1.1,e)<=t,"checkWidth");for(h of u(c)?[c]:KR(c,u))aL(tL(o,l,1.1,n),h),l++}return(i?(e=o.node().getBBox(),s.attr("x",e.x-2).attr("y",e.y-2).attr("width",e.width+4).attr("height",e.height+4),a):o).node()}function aL(i,e){i.text(""),e.forEach((e,t)=>{var r=i.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===t?r.text(e.content):r.text(" "+e.content)})}async function sL(e,n={}){let a=[],t=(e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(t,r,i)=>(a.push((async()=>{var e=r+":"+i;return await Bc(e)?await Fc(e,void 0,{class:"label-icon"}):``})()),t)),await Promise.all(a));return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>t.shift()??"")}var oL,lL=s(()=>{hw(),zc(),e(),YR(),hC(),qc(),QR(),li(),mt(JR,"applyStyle"),mt(eL,"addHtmlSpan"),mt(tL,"createTspan"),mt(rL,"computeWidthOfText"),mt(iL,"computeDimensionOfText"),mt(nL,"createFormattedText"),mt(aL,"updateTextContentAndStyles"),mt(sL,"replaceIconSubstring"),oL=mt(async(e,t="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:a=!0,markdown:s=!0,isNode:o=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{var u;return M.debug("XYZ createText",t,r,i,n,a,o,"addSvgBackground: ",c),a?(a=s?WR(t,h):jR(t),a=await sL(lC(a),h),u=t.replace(/\\\\/g,"\\"),eL(e,{isNode:o,label:Rc(t)?u:a,labelStyle:r.replace("fill:","color:")},l,n,c,h)):(u=t.replace(//g,"
"),a=nL(l,e,s?GR(u.replace("
","
"),h):UR(u),!!t&&c,!o),o?(n=(r=/stroke:/.exec(r)?r.replace("stroke:","lineColor:"):r).replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:"),V(a).attr("style",n)):(l=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:"),V(a).select("rect").attr("style",l.replace(/background:/g,"fill:")),e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:"),V(a).select("text").attr("style",e)),i?V(a).selectAll("tspan.text-outer-tspan").classed("title-row",!0):V(a).selectAll("tspan.text-outer-tspan").classed("row",!0),a)},"createText")});async function cL(e,t){if((e=e.getElementsByTagName("img"))&&0!==e.length){let i=""===t.replace(/]*>/g,"").trim();await Promise.all([...e].map(r=>new Promise(t=>{function e(){var e;r.style.display="flex",r.style.flexDirection="column",i?(e=(O().fontSize?O():window.getComputedStyle(document.body)).fontSize,[e=Ht.fontSize]=aC(e),r.style.minWidth=e=5*e+"px",r.style.maxWidth=e):r.style.width="100%",t(r)}mt(e,"setupImage"),setTimeout(()=>{r.complete&&e()}),r.addEventListener("error",e),r.addEventListener("load",e)})))}}var hL=s(()=>{Au(),si(),hC(),mt(cL,"configureLabelImages")});function uL(e){return(e=e.map((e,t)=>(0===t?"M":"L")+e.x+","+e.y)).push("Z"),e.join(" ")}function dL(t,e,r,i,n,a){var s=[],o=r-t,l=2*Math.PI/(o/a),c=e+(i-e)/2;for(let e=0;e<=50;e++){var h=t+e/50*o,u=c+n*Math.sin(l*(h-t));s.push({x:h,y:u})}return s}function pL(t,r,i,n,e,a){var s=[],o=e*Math.PI/180,l=(a*Math.PI/180-o)/(n-1);for(let e=0;e{lL(),Au(),li(),hw(),zc(),hC(),hL(),gL=mt(async(e,t,r)=>{let i,n=t.useHtmlLabels||Qt(O()?.htmlLabels),a=(i=r||"node default",e.insert("g").attr("class",i).attr("id",t.domId||t.id)),s=a.insert("g").attr("class","label").attr("style",D7(t.labelStyle)),o,l=(o=void 0===t.label?"":"string"==typeof t.label?t.label:t.label[0],!!t.icon||!!t.img),c="markdown"===t.labelType,h=await oL(s,gc(lC(o),O()),{useHtmlLabels:n,width:t.width||O().flowchart?.wrappingWidth,cssClasses:c?"markdown-node-label":void 0,style:t.labelStyle,addSvgBackground:l,markdown:c},O()),u=h.getBBox(),d=(t?.padding??0)/2;return n&&(r=h.children[0],e=V(h),await cL(r,o),u=r.getBoundingClientRect(),e.attr("width",u.width),e.attr("height",u.height)),n?s.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):s.attr("transform","translate(0, "+-u.height/2+")"),t.centerLabel&&s.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:u,halfPadding:d,label:s}},"labelHelper"),fL=mt(async(e,t,r)=>{let i=r.useHtmlLabels??vr(O()),n=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await oL(n,gc(lC(t),O()),{useHtmlLabels:i,width:r.width||O()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),s=a.getBBox(),o=r.padding/2,l;return vr(O())&&(t=a.children[0],l=V(a),s=t.getBoundingClientRect(),l.attr("width",s.width),l.attr("height",s.height)),i?n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):n.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:e,bbox:s,halfPadding:o,label:n}},"insertLabel"),mL=mt((e,t)=>{t=t.node().getBBox(),e.width=t.width,e.height=t.height},"updateNodeBounds"),yL=mt((e,t)=>("handDrawn"===e.look?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses"),mt(uL,"createPathFromPoints"),mt(dL,"generateFullSineWavePoints"),mt(pL,"generateCirclePoints")});function vL(e,t){return e.intersect(t)}var bL,xL=s(()=>{mt(vL,"intersectNode"),bL=vL});function TL(e,t,r,i){var n=e.x,e=e.y,a=n-i.x,s=e-i.y,o=Math.sqrt(t*t*s*s+r*r*a*a),a=Math.abs(t*r*a/o),t=(i.x{mt(TL,"intersectEllipse"),wL=TL});function EL(e,t,r){return wL(e,t,t,r)}var _L,SL=s(()=>{kL(),mt(EL,"intersectCircle"),_L=EL});function CL(e,t,r,i){var n=t.y-e.y,a=e.x-t.x,s=t.x*e.y-e.x*t.y,o=n*r.x+a*r.y+s,l=n*i.x+a*i.y+s;if(!(0!=o&&0!=l&&0{mt(CL,"intersectLine"),mt(AL,"sameSign"),RL=CL});function NL(t,r,i){let e=t.x,n=t.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof r.forEach?r.forEach(function(e){s=Math.min(s,e.x),o=Math.min(o,e.y)}):(s=Math.min(s,r.x),o=Math.min(o,r.y));var l=e-t.width/2-s,c=n-t.height/2-o;for(let e=0;e{LL(),mt(NL,"intersectPolygon"),IL=NL}),UL=s(()=>{DL=mt((e,t)=>{var r,i=e.x,n=e.y,a=t.x-i,t=t.y-n,s=e.width/2,e=e.height/2,e=Math.abs(t)*s>Math.abs(a)*e?(t<0&&(e=-e),r=0==t?0:e*a/t,e):(r=s=a<0?-s:s,0==a?0:s*t/a);return{x:i+r,y:n+e}},"intersectRect"),ML=DL}),GL=s(()=>{xL(),SL(),kL(),qL(),UL(),H={node:bL,circle:_L,ellipse:wL,polygon:IL,rect:ML}}),jL=s(()=>{Au(),OL=mt(e=>({fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:O().handDrawnSeed}),"solidStateFill"),PL=mt(e=>({stylesMap:e=$L([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]),stylesArray:[...e]}),"compileStyles"),$L=mt(e=>{let r=new Map;return e.forEach(e=>{var[e,t]=e.split(":");r.set(e.trim(),t?.trim())}),r},"styles2Map"),BL=mt(e=>"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,"isLabelStyle"),Q=mt(e=>{let t=PL(e).stylesArray,r=[],i=[],n=[],a=[];return t.forEach(e=>{var t=e[0];BL(t)?r.push(e.join(":")+" !important"):(i.push(e.join(":")+" !important"),t.includes("stroke")&&n.push(e.join(":")+" !important"),"fill"===t&&a.push(e.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:n,backgroundStyles:a}},"styles2String"),FL=mt((e,t)=>{var{themeVariables:r,handDrawnSeed:i}=O(),{nodeBorder:r,mainBkg:n}=r,e=PL(e).stylesMap;return Object.assign({roughness:.7,fill:e.get("fill")||n,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:e.get("stroke")||r,seed:i,strokeWidth:e.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:zL(e.get("stroke-dasharray"))},t)},"userNodeOverrides"),zL=mt(e=>{var t;return e?1===(e=e.trim().split(/\s+/).map(Number)).length?[t=isNaN(e[0])?0:e[0],t]:[isNaN(e[0])?0:e[0],isNaN(e[1])?0:e[1]]:[0,0]},"getStrokeDashArray")});function WL(e,t,r){if(e&&e.length){var i,[n,a]=t,t=Math.PI/180*r,s=Math.cos(t),o=Math.sin(t);for(i of e){var[l,c]=i;i[0]=(l-n)*s-(c-a)*o+n,i[1]=(l-n)*o+(c-a)*s+a}}}function YL(e,t){return e[0]===t[0]&&e[1]===t[1]}function VL(e,r,i,t=1){var n=i,i=Math.max(r,.1),p=e[0]&&e[0][0]&&"number"==typeof e[0][0]?[e]:e,a=[0,0];if(n)for(var s of p)WL(s,a,n);if(r=((t,n)=>{var e,r=[];for(e of p){var i=[...e];YL(i[0],i[i.length-1])||i.push([i[0][0],i[0][1]]),2e.ymint.ymin?1:e.xt.x?1:e.ymax===t.ymax?0:(e.ymax-t.ymax)/Math.abs(e.ymax-t.ymax)),o.length){let r=[],i=o[0].ymin,e=0;for(;r.length||o.length;){if(o.length){let t=-1;for(let e=0;ei);e++)t=e;o.splice(0,t+1).forEach(e=>{r.push({s:i,edge:e})})}if((r=r.filter(e=>!(e.edge.ymax<=i))).sort((e,t)=>e.edge.x===t.edge.x?0:(e.edge.x-t.edge.x)/Math.abs(e.edge.x-t.edge.x)),(1!==n||e%t==0)&&1=r.length);e+=2){var u=r[e].edge,d=r[d].edge;s.push([[Math.round(u.x),i],[Math.round(d.x),i]])}i+=n,r.forEach(e=>{e.edge.x=e.edge.x+n*e.edge.islope}),e++}}return s})(i,t),n){for(var o of p)WL(o,a,-n);{e=a,i=-n;let t=[];r.forEach(e=>t.push(...e)),WL(t,e,i)}}return r}function HL(e,t){let r,i=t.hachureAngle+90,n=t.hachureGap,a=(n<0&&(n=4*t.strokeWidth),n=Math.round(Math.max(n,.1)),1);return 1<=t.roughness&&.7<((null==(r=t.randomizer)?void 0:r.next())||Math.random())&&(a=n),VL(e,n,i,a||1)}function XL(e){var t=e[0],e=e[1];return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function KL(e,t){return e.type===t}function ZL(e){let i=[],n=(e=>{for(var t=new Array;""!==e;){if(!e.match(/^([ \t\r\n,]+)/))if(e.match(/^([aAcChHlLmMqQsStTvVzZ])/))t[t.length]={type:zN,text:RegExp.$1};else{if(!e.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];t[t.length]={type:qN,text:""+parseFloat(RegExp.$1)}}e=e.substr(RegExp.$1.length)}return t[t.length]={type:UN,text:""},t})(e),a="BOD",s=0,o=n[s];for(;!KL(o,UN);){let t=0,r=[];if("BOD"===a){if("M"!==o.text&&"m"!==o.text)return ZL("M0,0"+e);s++,t=GN[o.text],a=o.text}else KL(o,qN)?t=GN[a]:(s++,t=GN[o.text],a=o.text);if(!(s+tt%2?e+i:e+r);a.push({key:"C",data:l}),r=l[4],i=l[5];break;case"Q":a.push({key:"Q",data:[...o]}),r=o[2],i=o[3];break;case"q":l=o.map((e,t)=>t%2?e+i:e+r),a.push({key:"Q",data:l}),r=l[2],i=l[3];break;case"A":a.push({key:"A",data:[...o]}),r=o[5],i=o[6];break;case"a":r+=o[5],i+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],r,i]});break;case"H":a.push({key:"H",data:[...o]}),r=o[0];break;case"h":r+=o[0],a.push({key:"H",data:[r]});break;case"V":a.push({key:"V",data:[...o]}),i=o[0];break;case"v":i+=o[0],a.push({key:"V",data:[i]});break;case"S":a.push({key:"S",data:[...o]}),r=o[2],i=o[3];break;case"s":var c=o.map((e,t)=>t%2?e+i:e+r);a.push({key:"S",data:c}),r=c[2],i=c[3];break;case"T":a.push({key:"T",data:[...o]}),r=o[0],i=o[1];break;case"t":r+=o[0],i+=o[1],a.push({key:"T",data:[r,i]});break;case"Z":case"z":a.push({key:"Z",data:[]}),r=t,i=n}return a}function JL(e){let n=[],a="",s=0,o=0,t=0,r=0,l=0,c=0;for(var{key:i,data:h}of e){switch(i){case"M":n.push({key:"M",data:[...h]}),[s,o]=h,[t,r]=h;break;case"C":n.push({key:"C",data:[...h]}),s=h[4],o=h[5],l=h[2],c=h[3];break;case"L":n.push({key:"L",data:[...h]}),[s,o]=h;break;case"H":s=h[0],n.push({key:"L",data:[s,o]});break;case"V":o=h[0],n.push({key:"L",data:[s,o]});break;case"S":{let e=0,t;t="C"===a||"S"===a?(e=s+(s-l),o+(o-c)):(e=s,o),n.push({key:"C",data:[e,t,...h]}),l=h[0],c=h[1],s=h[2],o=h[3];break}case"T":{let[e,t]=h,r=0,i;i="Q"===a||"T"===a?(r=s+(s-l),o+(o-c)):(r=s,o);var u=s+2*(r-s)/3,d=o+2*(i-o)/3,p=e+2*(r-e)/3,g=t+2*(i-t)/3;n.push({key:"C",data:[u,d,p,g,e,t]}),l=r,c=i,s=e,o=t;break}case"Q":var[u,d,p,g]=h,f=s+2*(u-s)/3,m=o+2*(d-o)/3;n.push({key:"C",data:[f,m,p+2*(u-p)/3,g+2*(d-g)/3,p,g]}),l=u,c=d,s=p,o=g;break;case"A":var f=Math.abs(h[0]),m=Math.abs(h[1]),y=h[2],v=h[3],b=h[4],x=h[5],T=h[6];0===f||0===m?(n.push({key:"C",data:[s,o,x,T,x,T]}),s=x,o=T):s===x&&o===T||(tN(s,o,x,T,f,m,y,v,b).forEach(function(e){n.push({key:"C",data:e})}),s=x,o=T);break;case"Z":n.push({key:"Z",data:[]}),s=t,o=r}a=i}return n}function eN(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function tN(e,t,r,i,n,a,s,o,l,c){let h=Math.PI*s/180,u=[],d=0,p=0,g=0,f=0;c?[d,p,g,f]=c:([e,t]=eN(e,t,-h),[r,i]=eN(r,i,-h),1<(m=(y=(e-r)/2)*y/(n*n)+(v=(t-i)/2)*v/(a*a))&&(n*=m=Math.sqrt(m),a*=m),m=n*n,b=a*a,o=(o===l?-1:1)*Math.sqrt(Math.abs((m*b-m*v*v-b*y*y)/(m*v*v+b*y*y))),g=o*n*v/a+(e+r)/2,f=o*-a*y/n+(t+i)/2,d=Math.asin(parseFloat(((t-f)/a).toFixed(9))),p=Math.asin(parseFloat(((i-f)/a).toFixed(9))),ep&&(d-=2*Math.PI),!l&&p>d&&(p-=2*Math.PI));var m=p-d,y=(Math.abs(m)>120*Math.PI/180&&(b=p,v=r,o=i,p=l&&p>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,u=tN(r=g+n*Math.cos(p),i=f+a*Math.sin(p),v,o,n,a,s,0,l,[p,b,g,f])),m=p-d,Math.cos(d)),v=Math.sin(d),o=Math.cos(p),s=Math.sin(p),b=4/3*n*(l=Math.tan(m/4)),n=[e,t],a=[e+b*v,t-(m=4/3*a*l)*y],l=[r+b*s,i-m*o],e=[r,i];if(a[0]=2*n[0]-a[0],a[1]=2*n[1]-a[1],c)return[a,l,e].concat(u);u=[a,l,e].concat(u);var x=[];for(let e=0;e2*Math.PI&&(c=0,h=2*Math.PI),n=2*Math.PI/l.curveStepCount,n=TN(a=Math.min(n/2,(h-c)/2),e,t,r,i,c,h,1,l),l.disableMultiStroke||(a=TN(a,e,t,r,i,c,h,1.5,l),n.push(...a)),s&&(o?n.push(...mN(e,t,e+r*Math.cos(c),t+i*Math.sin(c),l),...mN(e,t,e+r*Math.cos(h),t+i*Math.sin(h),l)):n.push({op:"lineTo",data:[e,t]},{op:"lineTo",data:[e+r*Math.cos(c),t+i*Math.sin(c)]})),{type:"path",ops:n}}function cN(e,t){let r=JL(QL(ZL(e))),i=[],n=[0,0],a=[0,0];for(var{key:s,data:o}of r)switch(s){case"M":a=[o[0],o[1]],n=[o[0],o[1]];break;case"L":i.push(...mN(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case"C":var[l,c,h,u,d,p]=o;i.push(...wN(l,c,h,u,d,p,a,t)),a=[d,p];break;case"Z":i.push(...mN(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]]}return{type:"path",ops:i}}function hN(e,t){var r,i=[];for(r of e)if(r.length){var n=t.maxRandomnessOffset||0,a=r.length;if(2{let t=r.fillStyle||"hachure";if(!BN[t])switch(t){case"zigzag":BN[t]||(BN[t]=new DN(e));break;case"cross-hatch":BN[t]||(BN[t]=new MN(e));break;case"dots":BN[t]||(BN[t]=new ON(e));break;case"dashed":BN[t]||(BN[t]=new PN(e));break;case"zigzag-line":BN[t]||(BN[t]=new $N(e));break;default:t="hachure",BN[t]||(BN[t]=new IN(e))}return BN[t]})(jN).fillPolygons(e,r)}function dN(e){var t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function pN(e){return e.randomizer||(e.randomizer=new FN(e.seed||0)),e.randomizer.next()}function gN(e,t,r,i=1){return r.roughness*i*(pN(r)*(t-e)+e)}function fN(e,t,r=1){return gN(-e,e,t,r)}function mN(e,t,r,i,n,a=!1){var a=a?n.disableMultiStrokeFill:n.disableMultiStroke,s=yN(e,t,r,i,n,!0,!1);return a?s:(a=yN(e,t,r,i,n,!0,!0),s.concat(a))}function yN(e,t,r,i,n,a,s){let o=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(o),c,h=(c=l<200?1:500o?l/10:h)/2,d=.2+.2*pN(n),p=n.bowing*n.maxRandomnessOffset*(i-t)/200,g=n.bowing*n.maxRandomnessOffset*(e-r)/200;p=fN(p,n,c),g=fN(g,n,c);var f=[],m=mt(()=>fN(u,n,c),"M"),y=mt(()=>fN(h,n,c),"k"),v=n.preserveVertices;return a&&f.push(s?{op:"move",data:[e+(v?0:m()),t+(v?0:m())]}:{op:"move",data:[e+(v?0:fN(h,n,c)),t+(v?0:fN(h,n,c))]}),f.push(s?{op:"bcurveTo",data:[p+e+(r-e)*d+m(),g+t+(i-t)*d+m(),p+e+2*(r-e)*d+m(),g+t+2*(i-t)*d+m(),r+(v?0:m()),i+(v?0:m())]}:{op:"bcurveTo",data:[p+e+(r-e)*d+y(),g+t+(i-t)*d+y(),p+e+2*(r-e)*d+y(),g+t+2*(i-t)*d+y(),r+(v?0:y()),i+(v?0:y())]}),f}function vN(t,r,i){if(!t.length)return[];var n=[];n.push([t[0][0]+fN(r,i),t[0][1]+fN(r,i)]),n.push([t[0][0]+fN(r,i),t[0][1]+fN(r,i)]);for(let e=1;e{let e=l[c+0],t=l[c+1],r=l[c+2],i=l[c+3],n=3*t[0]-2*e[0]-i[0],a=(n*=n,3*t[1]-2*e[1]-i[1]);a*=a;var s=3*r[0]-2*i[0]-e[0],o=(s*=s,3*r[1]-2*i[1]-e[1]);return o*=o,nl&&(l=h,c=e)}return Math.sqrt(l)>e?(LN(t,r,c+1,e,a),LN(t,c,i,e,a)):(a.length||a.push(s),a.push(o)),a}function NN(t,r=.15,e){var i=[],n=(t.length-1)/3;for(let e=0;e{mt(WL,"t"),mt(YL,"e"),mt(VL,"s"),mt(HL,"n"),IN=class{static{mt(this,"o")}constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){return e=HL(e,t),{type:"fillSketch",ops:this.renderLines(e,t)}}renderLines(e,t){var r,i=[];for(r of e)i.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],t));return i}},mt(XL,"a"),DN=class extends IN{static{mt(this,"h")}fillPolygons(e,t){let r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.max(r,.1);var i,n,e=HL(e,Object.assign({},t,{hachureGap:r})),a=Math.PI/180*t.hachureAngle,s=[],o=.5*r*Math.cos(a),l=.5*r*Math.sin(a);for([i,n]of e)XL([i,n])&&s.push([[i[0]-o,i[1]+l],[...n]],[[i[0]+o,i[1]-l],[...n]]);return{type:"fillSketch",ops:this.renderLines(s,t)}}},MN=class extends IN{static{mt(this,"r")}fillPolygons(e,t){var r=this._fillPolygons(e,t),t=Object.assign({},t,{hachureAngle:t.hachureAngle+90}),e=this._fillPolygons(e,t);return r.ops=r.ops.concat(e.ops),r}},ON=class{static{mt(this,"i")}constructor(e){this.helper=e}fillPolygons(e,t){return e=HL(e,t=Object.assign({},t,{hachureAngle:0})),this.dotsOnLines(e,t)}dotsOnLines(e,t){let r=[],i=t.hachureGap,n=(i<0&&(i=4*t.strokeWidth),i=Math.max(i,.1),t.fillWeight);n<0&&(n=t.strokeWidth/2);var a,s=i/4;for(a of e){var o=XL(a),l=o/i,c=Math.ceil(l)-1,h=o-c*i,u=(a[0][0]+a[1][0])/2-i/4,d=Math.min(a[0][1],a[1][1]);for(let e=0;e{let t=XL(e),r=Math.floor(t/(h+u)),i=(t+u-r*(h+u))/2,n=e[0],a=e[1];n[0]>a[0]&&(n=e[1],a=e[0]);var s=Math.atan((a[1]-n[1])/(a[0]-n[0]));for(let e=0;e{let t=XL(e),r=Math.round(t/(2*c)),i=e[0],n=e[1];i[0]>n[0]&&(i=e[1],n=e[0]);var a=Math.atan((n[1]-i[1])/(n[0]-i[0]));for(let e=0;e{var n=d,a=p,s=Math.abs(g/2),o=Math.abs(e/2);s+=fN(.01*s,i),o+=fN(.01*o,i);let l=t,c=r;for(;l<0;)l+=2*Math.PI,c+=2*Math.PI;c-l>2*Math.PI&&(l=0,c=2*Math.PI);var h=(c-l)/i.curveStepCount,u=[];for(let e=l;e<=c;e+=h)u.push([n+s*Math.cos(e),a+o*Math.sin(e)]);return u.push([n+s*Math.cos(c),a+o*Math.sin(c)]),u.push([n,a]),uN([u],i)})(e,t,r,n))),n.stroke!==WN&&a.push(s),this._d("arc",a,n)}curve(e,t){var r=this._o(t),t=[],i=aN(e,r);if(r.fill&&r.fill!==WN)if("solid"===r.fillStyle){var n=aN(e,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));t.push({type:"fillPath",ops:this._mergedShape(n.ops)})}else{var a,s=[];if((n=e).length)for(a of"number"==typeof n[0][0]?[n]:n)a.length<3?s.push(...a):3===a.length?s.push(...NN(EN([a[0],a[0],a[1],a[2]]),10,(1+r.roughness)/2)):s.push(...NN(EN(a),10,(1+r.roughness)/2));s.length&&t.push(uN([s],r))}return r.stroke!==WN&&t.push(i),this._d("curve",t,r)}polygon(e,t){var r=[],i=iN(e,!0,t=this._o(t));return t.fill&&("solid"===t.fillStyle?r.push(hN([e],t)):r.push(uN([e],t))),t.stroke!==WN&&r.push(i),this._d("polygon",r,t)}path(e,t){let r=this._o(t),i=[];var n,a,s,o;return e&&(e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," "),t=r.fill&&"transparent"!==r.fill&&r.fill!==WN,n=r.stroke!==WN,s=((e,t)=>{let r=JL(QL(ZL(e))),i=[],n=[],a=[0,0],s=[],o=mt(()=>{4<=s.length&&n.push(...NN(s,1)),s=[]},"i"),l=mt(()=>{o(),n.length&&(i.push(n),n=[])},"c");for(var{key:c,data:h}of r)switch(c){case"M":l(),a=[h[0],h[1]],n.push(a);break;case"L":o(),n.push([h[0],h[1]]);break;case"C":var u;s.length||(u=n.length?n[n.length-1]:a,s.push([u[0],u[1]])),s.push([h[0],h[1]]),s.push([h[2],h[3]]),s.push([h[4],h[5]]);break;case"Z":o(),n.push([a[0],a[1]])}if(l(),!t)return i;var d,p=[];for(d of i){var g=RN(d,t);g.length&&p.push(g)}return p})(e,(a=!!(r.simplification&&r.simplification<1))?4-4*(r.simplification||1):(1+r.roughness)/2),o=cN(e,r),t&&("solid"===r.fillStyle?1===s.length?(t=cN(e,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0})),i.push({type:"fillPath",ops:this._mergedShape(t.ops)})):i.push(hN(s,r)):i.push(uN(s,r))),n)&&(a?s.forEach(e=>{i.push(iN(e,!1,r))}):i.push(o)),this._d("path",i,r)}opsToPath(e,t){let r="";for(var i of e.ops){var n="number"==typeof t&&0<=t?i.data.map(e=>+e.toFixed(t)):i.data;switch(i.op){case"move":r+=`M${n[0]} ${n[1]} `;break;case"bcurveTo":r+=`C${n[0]} ${n[1]}, ${n[2]} ${n[3]}, ${n[4]} ${n[5]} `;break;case"lineTo":r+=`L${n[0]} ${n[1]} `}}return r.trim()}toPaths(e){var t,r=e.sets||[],i=e.options||this.defaultOptions,n=[];for(t of r){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:WN};break;case"fillPath":e={d:this.opsToPath(t),stroke:WN,strokeWidth:0,fill:i.fill||WN};break;case"fillSketch":e=this.fillSketch(t,i)}e&&n.push(e)}return n}fillSketch(e,t){let r=t.fillWeight;return r<0&&(r=t.strokeWidth/2),{d:this.opsToPath(e),stroke:t.fill||WN,strokeWidth:r,fill:WN}}_mergedShape(e){return e.filter((e,t)=>0===t||"move"!==e.op)}},VN=class{static{mt(this,"st")}constructor(e,t){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new YN(t)}draw(e){var t,r=e.sets||[],i=e.options||this.getDefaultOptions(),n=this.ctx,a=e.options.fixedDecimalPlaceDigits;for(t of r)switch(t.type){case"path":n.save(),n.strokeStyle="none"===i.stroke?"transparent":i.stroke,n.lineWidth=i.strokeWidth,i.strokeLineDash&&n.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(n.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(n,t,a),n.restore();break;case"fillPath":n.save(),n.fillStyle=i.fill||"";var s="curve"===e.shape||"polygon"===e.shape||"path"===e.shape?"evenodd":"nonzero";this._drawToContext(n,t,a,s),n.restore();break;case"fillSketch":this.fillSketch(n,t,i)}}fillSketch(e,t,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2),e.save(),r.fillLineDash&&e.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(e.lineDashOffset=r.fillLineDashOffset),e.strokeStyle=r.fill||"",e.lineWidth=i,this._drawToContext(e,t,r.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,t,r,i="nonzero"){e.beginPath();for(var n of t.ops){var a="number"==typeof r&&0<=r?n.data.map(e=>+e.toFixed(r)):n.data;switch(n.op){case"move":e.moveTo(a[0],a[1]);break;case"bcurveTo":e.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":e.lineTo(a[0],a[1])}}"fillPath"===t.type?e.fill(i):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,t,r,i,n){return e=this.gen.line(e,t,r,i,n),this.draw(e),e}rectangle(e,t,r,i,n){return e=this.gen.rectangle(e,t,r,i,n),this.draw(e),e}ellipse(e,t,r,i,n){return e=this.gen.ellipse(e,t,r,i,n),this.draw(e),e}circle(e,t,r,i){return e=this.gen.circle(e,t,r,i),this.draw(e),e}linearPath(e,t){return e=this.gen.linearPath(e,t),this.draw(e),e}polygon(e,t){return e=this.gen.polygon(e,t),this.draw(e),e}arc(e,t,r,i,n,a,s=!1,o){return e=this.gen.arc(e,t,r,i,n,a,s,o),this.draw(e),e}curve(e,t){return e=this.gen.curve(e,t),this.draw(e),e}path(e,t){return e=this.gen.path(e,t),this.draw(e),e}},HN="http://www.w3.org/2000/svg",XN=class{static{mt(this,"ot")}constructor(e,t){this.svg=e,this.gen=new YN(t)}draw(t){var r,e=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,a=n.createElementNS(HN,"g"),s=t.options.fixedDecimalPlaceDigits;for(r of e){let e=null;switch(r.type){case"path":(e=n.createElementNS(HN,"path")).setAttribute("d",this.opsToPath(r,s)),e.setAttribute("stroke",i.stroke),e.setAttribute("stroke-width",i.strokeWidth+""),e.setAttribute("fill","none"),i.strokeLineDash&&e.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",""+i.strokeLineDashOffset);break;case"fillPath":(e=n.createElementNS(HN,"path")).setAttribute("d",this.opsToPath(r,s)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",i.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(n,r,i)}e&&a.appendChild(e)}return a}fillSketch(e,t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),(e=e.createElementNS(HN,"path")).setAttribute("d",this.opsToPath(t,r.fixedDecimalPlaceDigits)),e.setAttribute("stroke",r.fill||""),e.setAttribute("stroke-width",i+""),e.setAttribute("fill","none"),r.fillLineDash&&e.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&e.setAttribute("stroke-dashoffset",""+r.fillLineDashOffset),e}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,t){return this.gen.opsToPath(e,t)}line(e,t,r,i,n){return e=this.gen.line(e,t,r,i,n),this.draw(e)}rectangle(e,t,r,i,n){return e=this.gen.rectangle(e,t,r,i,n),this.draw(e)}ellipse(e,t,r,i,n){return e=this.gen.ellipse(e,t,r,i,n),this.draw(e)}circle(e,t,r,i){return e=this.gen.circle(e,t,r,i),this.draw(e)}linearPath(e,t){return e=this.gen.linearPath(e,t),this.draw(e)}polygon(e,t){return e=this.gen.polygon(e,t),this.draw(e)}arc(e,t,r,i,n,a,s=!1,o){return e=this.gen.arc(e,t,r,i,n,a,s,o),this.draw(e)}curve(e,t){return e=this.gen.curve(e,t),this.draw(e)}path(e,t){return e=this.gen.path(e,t),this.draw(e)}},KN={canvas:mt((e,t)=>new VN(e,t),"canvas"),svg:mt((e,t)=>new XN(e,t),"svg"),generator:mt(e=>new YN(e),"generator"),newSeed:mt(()=>YN.newSeed(),"newSeed")}});function QN(e,t){var r=Q(t).labelStyles;t.labelStyle=r;let i=yL(t),n=i,a=(i||(n="anchor"),e.insert("g").attr("class",n).attr("id",t.domId||t.id)),s=t.cssStyles,o=KN.svg(a),l=FL(t,{fill:"black",stroke:"none",fillStyle:"solid"}),c=("handDrawn"!==t.look&&(l.roughness=0),o.circle(0,0,2,l)),h=a.insert(()=>c,":first-child");return h.attr("class","anchor").attr("style",D7(s)),mL(t,h),t.intersect=function(e){return M.info("Circle intersect",t,1,e),H.circle(t,1,e)},a}var JN=s(()=>{e(),n(),GL(),jL(),ZN(),hC(),mt(QN,"anchor")});function eI(e,t,r,i,n,a,s){var o=(e+r)/2,l=(t+i)/2,c=Math.atan2(i-t,r-e),h=Math.sqrt(((r-e)/2/n)**2+((i-t)/2/a)**2);if(1f,":first-child");return m.attr("class","basic label-container"),h&&"handDrawn"!==t.look&&m.selectAll("path").attr("style",h),i&&"handDrawn"!==t.look&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(${c/2}, 0)`),mL(t,m),t.intersect=function(e){return H.polygon(t,u,e)},n}var rI=s(()=>{n(),GL(),jL(),ZN(),mt(eI,"generateArcPoints"),mt(tI,"bowTieRect")});function iI(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(e){return e.x+","+e.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}var nI=s(()=>{mt(iI,"insertPolygonShape")});async function aI(e,n){var{labelStyles:t,nodeStyles:r}=Q(n);n.labelStyle=t;let{shapeSvg:a,bbox:i}=await gL(e,n,yL(n)),s=i.height+n.padding,o=i.width+n.padding+12,l=o,c=-s,h=[{x:12,y:c},{x:l,y:c},{x:l,y:0},{x:0,y:0},{x:0,y:12+c},{x:12,y:c}],u,d=n.cssStyles;if("handDrawn"===n.look){let e=KN.svg(a),t=FL(n,{}),r=uL(h),i=e.path(r,t);u=a.insert(()=>i,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),d&&u.attr("style",d)}else u=iI(a,o,s,h);return r&&u.attr("style",r),mL(n,u),n.intersect=function(e){return H.polygon(n,h,e)},a}var sI=s(()=>{n(),GL(),jL(),ZN(),nI(),n(),mt(aI,"card")});function oI(e,t){var r=Q(t).nodeStyles;t.label="";let i=e.insert("g").attr("class",yL(t)).attr("id",t.domId??t.id),n=t.cssStyles,a=Math.max(28,t.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],o=KN.svg(i),l=FL(t,{}),c=("handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid"),uL(s)),h=o.path(c,l),u=i.insert(()=>h,":first-child");return n&&"handDrawn"!==t.look&&u.selectAll("path").attr("style",n),r&&"handDrawn"!==t.look&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(e){return H.polygon(t,s,e)},i}var lI=s(()=>{GL(),ZN(),jL(),n(),mt(oI,"choice")});async function cI(e,i,t){var{labelStyles:r,nodeStyles:n}=Q(i);i.labelStyle=r;let{shapeSvg:a,bbox:s,halfPadding:o}=await gL(e,i,yL(i)),l=t?.padding??o,c=s.width/2+l,h,u=i.cssStyles;if("handDrawn"===i.look){let e=KN.svg(a),t=FL(i,{}),r=e.circle(0,0,2*c,t);(h=a.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",D7(u))}else h=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",c).attr("cx",0).attr("cy",0);return mL(i,h),i.calcIntersect=function(e,t){var r=e.width/2;return H.circle(e,r,t)},i.intersect=function(e){return M.info("Circle intersect",i,c,e),H.circle(i,c,e)},a}var hI=s(()=>{ZN(),e(),hC(),GL(),jL(),n(),mt(cI,"circle")});function uI(e){var t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4);return`M ${-(e*=2)/2*t},${e/2*r} L ${e/2*t},${-e/2*r} M ${e/2*t},${e/2*r} L ${-e/2*t},`+-e/2*r}function dI(e,t){var{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r,t.label="";let n=e.insert("g").attr("class",yL(t)).attr("id",t.domId??t.id),a=Math.max(30,t?.width??0),s=t.cssStyles,o=KN.svg(n),l=FL(t,{}),c=("handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid"),o.circle(0,0,2*a,l)),h=uI(a),u=o.path(h,l),d=n.insert(()=>c,":first-child");return d.insert(()=>u),s&&"handDrawn"!==t.look&&d.selectAll("path").attr("style",s),i&&"handDrawn"!==t.look&&d.selectAll("path").attr("style",i),mL(t,d),t.intersect=function(e){return M.info("crossedCircle intersect",t,{radius:a,point:e}),H.circle(t,a,e)},n}var pI=s(()=>{e(),n(),jL(),ZN(),GL(),mt(uI,"createLine"),mt(dI,"crossedCircle")});function gI(t,r,i,n=100,e=0,a=180){var s=[],o=e*Math.PI/180,l=(a*Math.PI/180-o)/(n-1);for(let e=0;ev,":first-child").attr("stroke-opacity",0),b.insert(()=>m,":first-child"),b.attr("class","text"),h&&"handDrawn"!==t.look&&b.selectAll("path").attr("style",h),i&&"handDrawn"!==t.look&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${c}, 0)`),s.attr("transform",`translate(${-o/2+c-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),mL(t,b),t.intersect=function(e){return H.polygon(t,d,e)},n}var mI=s(()=>{n(),GL(),jL(),ZN(),mt(gI,"generateCirclePoints"),mt(fI,"curlyBraceLeft")});function yI(t,r,i,n=100,e=0,a=180){var s=[],o=e*Math.PI/180,l=(a*Math.PI/180-o)/(n-1);for(let e=0;ev,":first-child").attr("stroke-opacity",0),b.insert(()=>m,":first-child"),b.attr("class","text"),h&&"handDrawn"!==t.look&&b.selectAll("path").attr("style",h),i&&"handDrawn"!==t.look&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-c}, 0)`),s.attr("transform",`translate(${-o/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),mL(t,b),t.intersect=function(e){return H.polygon(t,d,e)},n}var bI=s(()=>{n(),GL(),jL(),ZN(),mt(yI,"generateCirclePoints"),mt(vI,"curlyBraceRight")});function xI(t,r,i,n=100,e=0,a=180){var s=[],o=e*Math.PI/180,l=(a*Math.PI/180-o)/(n-1);for(let e=0;eT,":first-child").attr("stroke-opacity",0),w.insert(()=>y,":first-child"),w.insert(()=>b,":first-child"),w.attr("class","text"),h&&"handDrawn"!==t.look&&w.selectAll("path").attr("style",h),i&&"handDrawn"!==t.look&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${c-c/4}, 0)`),s.attr("transform",`translate(${-o/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),mL(t,w),t.intersect=function(e){return H.polygon(t,p,e)},n}var wI=s(()=>{n(),GL(),jL(),ZN(),mt(xI,"generateCirclePoints"),mt(TI,"curlyBraces")});async function kI(e,t){var{labelStyles:r,nodeStyles:i}=Q(t),{shapeSvg:r,bbox:e}=(t.labelStyle=r,await gL(e,t,yL(t))),n=Math.max(80,1.25*(e.width+2*(t.padding??0)),t?.width??0),a=(e=Math.max(20,e.height+2*(t.padding??0),t?.height??0))/2,s=t.cssStyles,o=KN.svg(r),l=FL(t,{});"handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid");let c=n,h=e,u=c-a,d=h/4,p=[{x:u,y:0},{x:d,y:0},{x:0,y:h/2},{x:d,y:h},{x:u,y:h},...pL(-u,-h/2,a,50,270,90)],g=uL(p),f=o.path(g,l),m=r.insert(()=>f,":first-child");return m.attr("class","basic label-container"),s&&"handDrawn"!==t.look&&m.selectChildren("path").attr("style",s),i&&"handDrawn"!==t.look&&m.selectChildren("path").attr("style",i),m.attr("transform",`translate(${-n/2}, ${-e/2})`),mL(t,m),t.intersect=function(e){return H.polygon(t,p,e)},r}var EI=s(()=>{n(),GL(),jL(),ZN(),mt(kI,"curvedTrapezoid")});async function _I(e,a){var{labelStyles:t,nodeStyles:r}=Q(a);a.labelStyle=t;let{shapeSvg:s,bbox:i,label:n}=await gL(e,a,yL(a)),o=Math.max(i.width+a.padding,a.width??0),l=o/2,c=l/(2.5+o/50),h=Math.max(i.height+c+a.padding,a.height??0),u,d=a.cssStyles;if("handDrawn"===a.look){let e=KN.svg(s),t=CI(0,0,o,h,l,c),r=AI(0,c,o,h,l,c),i=e.path(t,FL(a,{})),n=e.path(r,FL(a,{fill:"none"}));u=s.insert(()=>n,":first-child"),(u=s.insert(()=>i,":first-child")).attr("class","basic label-container"),d&&u.attr("style",d)}else t=SI(0,0,o,h,l,c),u=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",D7(d)).attr("style",r);return u.attr("label-offset-y",c),u.attr("transform",`translate(${-o/2}, ${-(h/2+c)})`),mL(a,u),n.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-i.height/2+(a.padding??0)/1.5-(i.y-(i.top??0))})`),a.intersect=function(t){var r=H.rect(a,t),i=r.x-(a.x??0);if(0!=l&&(Math.abs(i)<(a.width??0)/2||Math.abs(i)==(a.width??0)/2&&Math.abs(r.y-(a.y??0))>(a.height??0)/2-c)){let e=c*c*(1-i*i/(l*l));0{n(),GL(),jL(),ZN(),hC(),SI=mt((e,t,r,i,n,a)=>[`M${e},`+(t+a),`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,"l0,"+i,`a${n},${a} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createCylinderPathD"),CI=mt((e,t,r,i,n,a)=>[`M${e},`+(t+a),`M${e+r},`+(t+a),`a${n},${a} 0,0,0 ${-r},0`,"l0,"+i,`a${n},${a} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createOuterCylinderPathD"),AI=mt((e,t,r,i,n,a)=>[`M${e-r/2},`+-i/2,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),mt(_I,"cylinder")});async function LI(e,t){var{labelStyles:r,nodeStyles:i}=Q(t),{shapeSvg:r,bbox:e,label:n}=(t.labelStyle=r,await gL(e,t,yL(t))),a=e.width+t.padding,s=.2*(o=e.height+t.padding),a=-a/2,o=-o/2-s/2,l=t.cssStyles,c=KN.svg(r),h=FL(t,{});"handDrawn"!==t.look&&(h.roughness=0,h.fillStyle="solid");let u=[{x:a,y:o+s},{x:-a,y:o+s},{x:-a,y:-o},{x:a,y:-o},{x:a,y:o},{x:-a,y:o},{x:-a,y:o+s}],d=c.polygon(u.map(e=>[e.x,e.y]),h),p=r.insert(()=>d,":first-child");return p.attr("class","basic label-container"),l&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",l),i&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",i),n.attr("transform",`translate(${a+(t.padding??0)/2-(e.x-(e.left??0))}, ${o+s+(t.padding??0)/2-(e.y-(e.top??0))})`),mL(t,p),t.intersect=function(e){return H.rect(t,e)},r}var NI=s(()=>{n(),GL(),jL(),ZN(),mt(LI,"dividedRectangle")});async function II(e,t){var r,{labelStyles:i,nodeStyles:n}=Q(t);t.labelStyle=i;let{shapeSvg:a,bbox:s,halfPadding:o}=await gL(e,t,yL(t)),l=s.width/2+o+5,c=s.width/2+o,h,u=t.cssStyles;return"handDrawn"===t.look?(i=KN.svg(a),e=FL(t,{roughness:.2,strokeWidth:2.5}),r=FL(t,{roughness:.2,strokeWidth:1.5}),e=i.circle(0,0,2*l,e),i=i.circle(0,0,2*c,r),(h=a.insert("g",":first-child")).attr("class",D7(t.cssClasses)).attr("style",D7(u)),h.node()?.appendChild(e),h.node()?.appendChild(i)):(r=(h=a.insert("g",":first-child")).insert("circle",":first-child"),e=h.insert("circle"),h.attr("class","basic label-container").attr("style",n),r.attr("class","outer-circle").attr("style",n).attr("r",l).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",n).attr("r",c).attr("cx",0).attr("cy",0)),mL(t,h),t.intersect=function(e){return M.info("DoubleCircle intersect",t,l,e),H.circle(t,l,e)},a}var DI=s(()=>{e(),n(),GL(),jL(),ZN(),hC(),mt(II,"doublecircle")});function MI(e,t,{config:{themeVariables:r}}){var{labelStyles:i,nodeStyles:n}=Q(t);t.label="",t.labelStyle=i;let a=e.insert("g").attr("class",yL(t)).attr("id",t.domId??t.id),s=t.cssStyles,o=KN.svg(a),l=r.nodeBorder,c=FL(t,{fillStyle:"solid"}),h=("handDrawn"!==t.look&&(c.roughness=0),o.circle(0,0,14,c)),u=a.insert(()=>h,":first-child");return u.selectAll("path").attr("style",`fill: ${l} !important;`),s&&0{ZN(),e(),GL(),jL(),n(),mt(MI,"filledCircle")});async function PI(e,t){var{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await gL(e,t,yL(t)),o=a.width+(t.padding??0),l=o+a.height,c=o+a.height,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],u=t.cssStyles,d=KN.svg(n),p=FL(t,{}),g=("handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid"),uL(h)),f=d.path(g,p),m=n.insert(()=>f,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&"handDrawn"!==t.look&&m.selectChildren("path").attr("style",u),i&&"handDrawn"!==t.look&&m.selectChildren("path").attr("style",i),t.width=o,t.height=l,mL(t,m),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-l/2+(t.padding??0)/2+(a.y-(a.top??0))})`),t.intersect=function(e){return M.info("Triangle intersect",t,h,e),H.polygon(t,h,e)},n}var $I=s(()=>{e(),n(),GL(),jL(),ZN(),n(),mt(PI,"flippedTriangle")});function BI(e,t,{dir:r,config:{state:i,themeVariables:n}}){var a=Q(t).nodeStyles;t.label="";let s=e.insert("g").attr("class",yL(t)).attr("id",t.domId??t.id),o=t.cssStyles,l=Math.max(70,t?.width??0),c=Math.max(10,t?.height??0);"LR"===r&&(l=Math.max(10,t?.width??0),c=Math.max(70,t?.height??0));var e=-1*l/2,r=-1*c/2,h=KN.svg(s),n=FL(t,{stroke:n.lineColor,fill:n.lineColor});"handDrawn"!==t.look&&(n.roughness=0,n.fillStyle="solid");let u=h.rectangle(e,r,l,c,n),d=s.insert(()=>u,":first-child");return o&&"handDrawn"!==t.look&&d.selectAll("path").attr("style",o),a&&"handDrawn"!==t.look&&d.selectAll("path").attr("style",a),mL(t,d),h=i?.padding??0,t.width&&t.height&&(t.width+=h/2||0,t.height+=h/2||0),t.intersect=function(e){return H.rect(t,e)},s}var FI=s(()=>{ZN(),GL(),jL(),n(),mt(BI,"forkJoin")});async function zI(e,t){var{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;let{shapeSvg:n,bbox:a}=await gL(e,t,yL(t)),s=Math.max(80,a.width+2*(t.padding??0),t?.width??0),o=Math.max(50,a.height+2*(t.padding??0),t?.height??0),l=o/2,c=t.cssStyles,h=KN.svg(n),u=FL(t,{}),d=("handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid"),[{x:-s/2,y:-o/2},{x:s/2-l,y:-o/2},...pL(-s/2+l,0,l,50,90,270),{x:s/2-l,y:o/2},{x:-s/2,y:o/2}]),p=uL(d),g=h.path(p,u),f=n.insert(()=>g,":first-child");return f.attr("class","basic label-container"),c&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",c),i&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",i),mL(t,f),t.intersect=function(e){return M.info("Pill intersect",t,{radius:l,point:e}),H.polygon(t,d,e)},n}var qI=s(()=>{e(),n(),GL(),jL(),ZN(),mt(zI,"halfRoundedRectangle")});async function UI(e,n){var{labelStyles:t,nodeStyles:r}=Q(n);n.labelStyle=t;let{shapeSvg:a,bbox:i}=await gL(e,n,yL(n)),s=i.height+n.padding,o=s/4,l=i.width+2*o+n.padding,c=[{x:o,y:0},{x:l-o,y:0},{x:l,y:-s/2},{x:l-o,y:-s},{x:o,y:-s},{x:0,y:-s/2}],h,u=n.cssStyles;if("handDrawn"===n.look){let e=KN.svg(a),t=FL(n,{}),r=GI(0,0,l,s,o),i=e.path(r,t);h=a.insert(()=>i,":first-child").attr("transform",`translate(${-l/2}, ${s/2})`),u&&h.attr("style",u)}else h=iI(a,l,s,c);return r&&h.attr("style",r),n.width=l,n.height=s,mL(n,h),n.intersect=function(e){return H.polygon(n,c,e)},a}var GI,jI=s(()=>{n(),GL(),jL(),ZN(),nI(),GI=mt((e,t,r,i,n)=>[`M${e+n},`+t,`L${e+r-n},`+t,`L${e+r},`+(t-i/2),`L${e+r-n},`+(t-i),`L${e+n},`+(t-i),`L${e},`+(t-i/2),"Z"].join(" "),"createHexagonPathD"),mt(UI,"hexagon")});async function WI(e,t){var{labelStyles:r,nodeStyles:i}=Q(t),r=(t.label="",t.labelStyle=r,(await gL(e,t,yL(t))).shapeSvg),e=Math.max(30,t?.width??0),n=Math.max(30,t?.height??0),a=t.cssStyles,s=KN.svg(r),o=FL(t,{});"handDrawn"!==t.look&&(o.roughness=0,o.fillStyle="solid");let l=[{x:0,y:0},{x:e,y:0},{x:0,y:n},{x:e,y:n}],c=uL(l),h=s.path(c,o),u=r.insert(()=>h,":first-child");return u.attr("class","basic label-container"),a&&"handDrawn"!==t.look&&u.selectChildren("path").attr("style",a),i&&"handDrawn"!==t.look&&u.selectChildren("path").attr("style",i),u.attr("transform",`translate(${-e/2}, ${-n/2})`),mL(t,u),t.intersect=function(e){return M.info("Pill intersect",t,{points:l}),H.polygon(t,l,e)},r}var YI=s(()=>{e(),n(),GL(),jL(),ZN(),mt(WI,"hourglass")});async function VI(e,n,{config:{themeVariables:t,flowchart:r}}){var i,a=Q(n).labelStyles,a=(n.labelStyle=a,n.assetHeight??48),a=Math.max(a,n.assetWidth??48),r=r?.wrappingWidth;n.width=Math.max(a,r??0);let{shapeSvg:s,bbox:o,label:l}=await gL(e,n,"icon-shape default"),c="t"===n.pos,h=a,u=a,d=t.nodeBorder,p=PL(n).stylesMap,g=-u/2,f=-h/2,m=n.label?8:0,y=KN.svg(s),v=FL(n,{stroke:"none",fill:"none"}),b=("handDrawn"!==n.look&&(v.roughness=0,v.fillStyle="solid"),y.rectangle(g,f,u,h,v)),x=Math.max(u,o.width),T=h+o.height+m,w=y.rectangle(-x/2,-T/2,x,T,{...v,fill:"transparent",stroke:"none"}),k=s.insert(()=>b,":first-child"),E=s.insert(()=>w);return n.icon&&((r=s.append("g")).html(`${await Fc(n.icon,{height:a,width:a,fallbackPrefix:""})}`),t=(e=r.node().getBBox()).width,a=e.height,i=e.y,r.attr("transform",`translate(${-t/2-e.x},${c?o.height/2+m/2-a/2-i:-o.height/2-m/2-a/2-i})`),r.attr("style",`color: ${p.get("stroke")??d};`)),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))},${c?-T/2:T/2-o.height})`),k.attr("transform",`translate(0,${c?o.height/2+m/2:-o.height/2-m/2})`),mL(n,E),n.intersect=function(e){var t,r,i;return M.info("iconSquare intersect",n,e),n.label?(i=n.x??0,t=n.y??0,r=n.height??0,i=c?[{x:i-o.width/2,y:t-r/2},{x:i+o.width/2,y:t-r/2},{x:i+o.width/2,y:t-r/2+o.height+m},{x:i+u/2,y:t-r/2+o.height+m},{x:i+u/2,y:t+r/2},{x:i-u/2,y:t+r/2},{x:i-u/2,y:t-r/2+o.height+m},{x:i-o.width/2,y:t-r/2+o.height+m}]:[{x:i-u/2,y:t-r/2},{x:i+u/2,y:t-r/2},{x:i+u/2,y:t-r/2+h},{x:i+o.width/2,y:t-r/2+h},{x:i+o.width/2/2,y:t+r/2},{x:i-o.width/2,y:t+r/2},{x:i-o.width/2,y:t-r/2+h},{x:i-u/2,y:t-r/2+h}],H.polygon(n,i,e)):H.rect(n,e)},s}var HI=s(()=>{ZN(),e(),qc(),GL(),jL(),n(),mt(VI,"icon")});async function XI(e,t,{config:{themeVariables:r,flowchart:i}}){var n=Q(t).labelStyles,n=(t.labelStyle=n,t.assetHeight??48),n=Math.max(n,t.assetWidth??48),i=i?.wrappingWidth,{shapeSvg:i,bbox:e,label:a}=(t.width=Math.max(n,i??0),await gL(e,t,"icon-shape default")),s=t.label?8:0,o="t"===t.pos,{nodeBorder:r,mainBkg:l}=r,c=PL(t).stylesMap,h=KN.svg(i),u=FL(t,{}),d=("handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid"),c.get("fill")),d=(u.stroke=d??l,i.append("g"));t.icon&&d.html(`${await Fc(t.icon,{height:n,width:n,fallbackPrefix:""})}`);let p=d.node().getBBox(),g=p.width,f=p.height,m=p.x,y=p.y,v=Math.max(g,f)*Math.SQRT2+40,b=h.circle(0,0,v,u),x=Math.max(v,e.width),T=v+e.height+s,w=h.rectangle(-x/2,-T/2,x,T,{...u,fill:"transparent",stroke:"none"}),k=i.insert(()=>b,":first-child"),E=i.insert(()=>w);return d.attr("transform",`translate(${-g/2-m},${o?e.height/2+s/2-f/2-y:-e.height/2-s/2-f/2-y})`),d.attr("style",`color: ${c.get("stroke")??r};`),a.attr("transform",`translate(${-e.width/2-(e.x-(e.left??0))},${o?-T/2:T/2-e.height})`),k.attr("transform",`translate(0,${o?e.height/2+s/2:-e.height/2-s/2})`),mL(t,E),t.intersect=function(e){return M.info("iconSquare intersect",t,e),H.rect(t,e)},i}var KI,ZI=s(()=>{ZN(),e(),qc(),GL(),jL(),n(),mt(XI,"iconCircle")}),QI=s(()=>{KI=mt((e,t,r,i,n)=>["M",e+n,t,"H",e+r-n,"A",n,n,0,0,1,e+r,t+n,"V",t+i-n,"A",n,n,0,0,1,e+r-n,t+i,"H",e+n,"A",n,n,0,0,1,e,t+i-n,"V",t+n,"A",n,n,0,0,1,e+n,t,"Z"].join(" "),"createRoundedRectPathD")});async function JI(e,n,{config:{themeVariables:t,flowchart:r}}){var i=Q(n).labelStyles,i=(n.labelStyle=i,n.assetHeight??48),i=Math.max(i,n.assetWidth??48),r=r?.wrappingWidth;n.width=Math.max(i,r??0);let{shapeSvg:a,bbox:s,halfPadding:o,label:l}=await gL(e,n,"icon-shape default"),c="t"===n.pos,h=i+2*o,u=i+2*o,{nodeBorder:d,mainBkg:p}=t,g=PL(n).stylesMap,f=-u/2,m=-h/2,y=n.label?8:0,v=KN.svg(a),b=FL(n,{});"handDrawn"!==n.look&&(b.roughness=0,b.fillStyle="solid");var x,r=g.get("fill");b.stroke=r??p;let T=v.path(KI(f,m,u,h,5),b),w=Math.max(u,s.width),k=h+s.height+y,E=v.rectangle(-w/2,-k/2,w,k,{...b,fill:"transparent",stroke:"none"}),_=a.insert(()=>T,":first-child").attr("class","icon-shape2"),S=a.insert(()=>E);return n.icon&&((e=a.append("g")).html(`${await Fc(n.icon,{height:i,width:i,fallbackPrefix:""})}`),r=(t=e.node().getBBox()).width,i=t.height,x=t.y,e.attr("transform",`translate(${-r/2-t.x},${c?s.height/2+y/2-i/2-x:-s.height/2-y/2-i/2-x})`),e.attr("style",`color: ${g.get("stroke")??d};`)),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${c?-k/2:k/2-s.height})`),_.attr("transform",`translate(0,${c?s.height/2+y/2:-s.height/2-y/2})`),mL(n,S),n.intersect=function(e){var t,r,i;return M.info("iconSquare intersect",n,e),n.label?(i=n.x??0,t=n.y??0,r=n.height??0,i=c?[{x:i-s.width/2,y:t-r/2},{x:i+s.width/2,y:t-r/2},{x:i+s.width/2,y:t-r/2+s.height+y},{x:i+u/2,y:t-r/2+s.height+y},{x:i+u/2,y:t+r/2},{x:i-u/2,y:t+r/2},{x:i-u/2,y:t-r/2+s.height+y},{x:i-s.width/2,y:t-r/2+s.height+y}]:[{x:i-u/2,y:t-r/2},{x:i+u/2,y:t-r/2},{x:i+u/2,y:t-r/2+h},{x:i+s.width/2,y:t-r/2+h},{x:i+s.width/2/2,y:t+r/2},{x:i-s.width/2,y:t+r/2},{x:i-s.width/2,y:t-r/2+h},{x:i-u/2,y:t-r/2+h}],H.polygon(n,i,e)):H.rect(n,e)},a}var eD=s(()=>{ZN(),e(),qc(),GL(),jL(),QI(),n(),mt(JI,"iconRounded")});async function tD(e,n,{config:{themeVariables:t,flowchart:r}}){var i=Q(n).labelStyles,i=(n.labelStyle=i,n.assetHeight??48),i=Math.max(i,n.assetWidth??48),r=r?.wrappingWidth;n.width=Math.max(i,r??0);let{shapeSvg:a,bbox:s,halfPadding:o,label:l}=await gL(e,n,"icon-shape default"),c="t"===n.pos,h=i+2*o,u=i+2*o,{nodeBorder:d,mainBkg:p}=t,g=PL(n).stylesMap,f=-u/2,m=-h/2,y=n.label?8:0,v=KN.svg(a),b=FL(n,{});"handDrawn"!==n.look&&(b.roughness=0,b.fillStyle="solid");var x,r=g.get("fill");b.stroke=r??p;let T=v.path(KI(f,m,u,h,.1),b),w=Math.max(u,s.width),k=h+s.height+y,E=v.rectangle(-w/2,-k/2,w,k,{...b,fill:"transparent",stroke:"none"}),_=a.insert(()=>T,":first-child"),S=a.insert(()=>E);return n.icon&&((e=a.append("g")).html(`${await Fc(n.icon,{height:i,width:i,fallbackPrefix:""})}`),r=(t=e.node().getBBox()).width,i=t.height,x=t.y,e.attr("transform",`translate(${-r/2-t.x},${c?s.height/2+y/2-i/2-x:-s.height/2-y/2-i/2-x})`),e.attr("style",`color: ${g.get("stroke")??d};`)),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${c?-k/2:k/2-s.height})`),_.attr("transform",`translate(0,${c?s.height/2+y/2:-s.height/2-y/2})`),mL(n,S),n.intersect=function(e){var t,r,i;return M.info("iconSquare intersect",n,e),n.label?(i=n.x??0,t=n.y??0,r=n.height??0,i=c?[{x:i-s.width/2,y:t-r/2},{x:i+s.width/2,y:t-r/2},{x:i+s.width/2,y:t-r/2+s.height+y},{x:i+u/2,y:t-r/2+s.height+y},{x:i+u/2,y:t+r/2},{x:i-u/2,y:t+r/2},{x:i-u/2,y:t-r/2+s.height+y},{x:i-s.width/2,y:t-r/2+s.height+y}]:[{x:i-u/2,y:t-r/2},{x:i+u/2,y:t-r/2},{x:i+u/2,y:t-r/2+h},{x:i+s.width/2,y:t-r/2+h},{x:i+s.width/2/2,y:t+r/2},{x:i-s.width/2,y:t+r/2},{x:i-s.width/2,y:t-r/2+h},{x:i-u/2,y:t-r/2+h}],H.polygon(n,i,e)):H.rect(n,e)},a}var rD=s(()=>{ZN(),e(),qc(),GL(),QI(),jL(),n(),mt(tD,"iconSquare")});async function iD(e,n,{config:{flowchart:t}}){(i=new Image).src=n?.img??"",await i.decode();var r=Number(i.naturalWidth.toString().replace("px","")),i=Number(i.naturalHeight.toString().replace("px","")),a=(n.imageAspectRatio=r/i,Q(n).labelStyles),a=(n.labelStyle=a,t?.wrappingWidth);n.defaultWidth=t?.wrappingWidth;let s=Math.max(n.label?a??0:0,n?.assetWidth??r),o="on"===n.constraint&&n?.assetHeight?n.assetHeight*n.imageAspectRatio:s,l="on"===n.constraint?o/n.imageAspectRatio:n?.assetHeight??i,{shapeSvg:c,bbox:h,label:u}=(n.width=Math.max(o,a??0),await gL(e,n,"image-shape default")),d="t"===n.pos,p=-o/2,g=-l/2,f=n.label?8:0,m=KN.svg(c),y=FL(n,{}),v=("handDrawn"!==n.look&&(y.roughness=0,y.fillStyle="solid"),m.rectangle(p,g,o,l,y)),b=Math.max(o,h.width),x=l+h.height+f,T=m.rectangle(-b/2,-x/2,b,x,{...y,fill:"none",stroke:"none"}),w=c.insert(()=>v,":first-child"),k=c.insert(()=>T);return n.img&&((t=c.append("image")).attr("href",n.img),t.attr("width",o),t.attr("height",l),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-o/2},${d?x/2-l:-x/2})`)),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-l/2-h.height/2-f/2:l/2-h.height/2+f/2})`),w.attr("transform",`translate(0,${d?h.height/2+f/2:-h.height/2-f/2})`),mL(n,k),n.intersect=function(e){var t,r,i;return M.info("iconSquare intersect",n,e),n.label?(i=n.x??0,t=n.y??0,r=n.height??0,i=d?[{x:i-h.width/2,y:t-r/2},{x:i+h.width/2,y:t-r/2},{x:i+h.width/2,y:t-r/2+h.height+f},{x:i+o/2,y:t-r/2+h.height+f},{x:i+o/2,y:t+r/2},{x:i-o/2,y:t+r/2},{x:i-o/2,y:t-r/2+h.height+f},{x:i-h.width/2,y:t-r/2+h.height+f}]:[{x:i-o/2,y:t-r/2},{x:i+o/2,y:t-r/2},{x:i+o/2,y:t-r/2+l},{x:i+h.width/2,y:t-r/2+l},{x:i+h.width/2/2,y:t+r/2},{x:i-h.width/2,y:t+r/2},{x:i-h.width/2,y:t-r/2+l},{x:i-o/2,y:t-r/2+l}],H.polygon(n,i,e)):H.rect(n,e)},c}var nD=s(()=>{ZN(),e(),GL(),jL(),n(),mt(iD,"imageSquare")});async function aD(e,n){var{labelStyles:t,nodeStyles:r}=Q(n);n.labelStyle=t;let{shapeSvg:a,bbox:i}=await gL(e,n,yL(n)),s=Math.max(i.width+2*(n.padding??0),n?.width??0),o=Math.max(i.height+2*(n.padding??0),n?.height??0),l=[{x:0,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:-3*o/6,y:-o}],c,h=n.cssStyles;if("handDrawn"===n.look){let e=KN.svg(a),t=FL(n,{}),r=uL(l),i=e.path(r,t);c=a.insert(()=>i,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=iI(a,s,o,l);return r&&c.attr("style",r),n.width=s,n.height=o,mL(n,c),n.intersect=function(e){return H.polygon(n,l,e)},a}var sD=s(()=>{n(),GL(),jL(),ZN(),nI(),mt(aD,"inv_trapezoid")});async function oD(e,i,t){var{labelStyles:r,nodeStyles:n}=Q(i);i.labelStyle=r;let{shapeSvg:a,bbox:s}=await gL(e,i,yL(i)),o=Math.max(s.width+2*t.labelPaddingX,i?.width||0),l=Math.max(s.height+2*t.labelPaddingY,i?.height||0),c=-o/2,h=-l/2,u,{rx:d,ry:p}=i,g=i.cssStyles;if(t?.rx&&t.ry&&(d=t.rx,p=t.ry),"handDrawn"===i.look){let e=KN.svg(a),t=FL(i,{}),r=d||p?e.path(KI(c,h,o,l,d||0),t):e.rectangle(c,h,o,l,t);(u=a.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",D7(g))}else(u=a.insert("rect",":first-child")).attr("class","basic label-container").attr("style",n).attr("rx",D7(d)).attr("ry",D7(p)).attr("x",c).attr("y",h).attr("width",o).attr("height",l);return mL(i,u),i.calcIntersect=function(e,t){return H.rect(e,t)},i.intersect=function(e){return H.rect(i,e)},a}var lD=s(()=>{n(),GL(),QI(),jL(),ZN(),hC(),mt(oD,"drawRect")});async function cD(e,t){var{shapeSvg:e,bbox:r,label:i}=await gL(e,t,"label"),n=e.insert("rect",":first-child");return n.attr("width",.1).attr("height",.1),e.attr("class","label edgeLabel"),i.attr("transform",`translate(${-r.width/2-(r.x-(r.left??0))}, ${-r.height/2-(r.y-(r.top??0))})`),mL(t,n),t.intersect=function(e){return H.rect(t,e)},e}var hD=s(()=>{lD(),n(),GL(),mt(cD,"labelRect")});async function uD(e,n){var{labelStyles:t,nodeStyles:r}=Q(n);n.labelStyle=t;let{shapeSvg:a,bbox:i}=await gL(e,n,yL(n)),s=Math.max(i.width+(n.padding??0),n?.width??0),o=Math.max(i.height+(n.padding??0),n?.height??0),l=[{x:0,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:-3*o/6,y:-o}],c,h=n.cssStyles;if("handDrawn"===n.look){let e=KN.svg(a),t=FL(n,{}),r=uL(l),i=e.path(r,t);c=a.insert(()=>i,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=iI(a,s,o,l);return r&&c.attr("style",r),n.width=s,n.height=o,mL(n,c),n.intersect=function(e){return H.polygon(n,l,e)},a}var dD=s(()=>{n(),GL(),jL(),ZN(),nI(),mt(uD,"lean_left")});async function pD(e,n){var{labelStyles:t,nodeStyles:r}=Q(n);n.labelStyle=t;let{shapeSvg:a,bbox:i}=await gL(e,n,yL(n)),s=Math.max(i.width+(n.padding??0),n?.width??0),o=Math.max(i.height+(n.padding??0),n?.height??0),l=[{x:-3*o/6,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:0,y:-o}],c,h=n.cssStyles;if("handDrawn"===n.look){let e=KN.svg(a),t=FL(n,{}),r=uL(l),i=e.path(r,t);c=a.insert(()=>i,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=iI(a,s,o,l);return r&&c.attr("style",r),n.width=s,n.height=o,mL(n,c),n.intersect=function(e){return H.polygon(n,l,e)},a}var gD=s(()=>{n(),GL(),jL(),ZN(),nI(),mt(pD,"lean_right")});function fD(e,t){var{labelStyles:r,nodeStyles:i}=Q(t);t.label="",t.labelStyle=r;let n=e.insert("g").attr("class",yL(t)).attr("id",t.domId??t.id),a=t.cssStyles,s=Math.max(35,t?.width??0),o=Math.max(35,t?.height??0),l=[{x:s,y:0},{x:0,y:o+3.5},{x:s-14,y:o+3.5},{x:0,y:2*o},{x:s,y:o-3.5},{x:14,y:o-3.5}],c=KN.svg(n),h=FL(t,{}),u=("handDrawn"!==t.look&&(h.roughness=0,h.fillStyle="solid"),uL(l)),d=c.path(u,h),p=n.insert(()=>d,":first-child");return a&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",a),i&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",i),p.attr("transform",`translate(-${s/2},${-o})`),mL(t,p),t.intersect=function(e){return M.info("lightningBolt intersect",t,e),H.polygon(t,l,e)},n}var mD=s(()=>{e(),n(),jL(),ZN(),GL(),n(),mt(fD,"lightningBolt")});async function yD(e,s){var{labelStyles:t,nodeStyles:r}=Q(s);s.labelStyle=t;let{shapeSvg:o,bbox:i,label:n}=await gL(e,s,yL(s)),l=Math.max(i.width+(s.padding??0),s.width??0),c=l/2,h=c/(2.5+l/50),u=Math.max(i.height+h+(s.padding??0),s.height??0),d=.1*u,p,g=s.cssStyles;if("handDrawn"===s.look){let e=KN.svg(o),t=bD(0,0,l,u,c,h,d),r=xD(0,h,l,u,c,h),i=FL(s,{}),n=e.path(t,i),a=e.path(r,i);o.insert(()=>a,":first-child").attr("class","line"),(p=o.insert(()=>n,":first-child")).attr("class","basic label-container"),g&&p.attr("style",g)}else t=vD(0,0,l,u,c,h,d),p=o.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",D7(g)).attr("style",r);return p.attr("label-offset-y",h),p.attr("transform",`translate(${-l/2}, ${-(u/2+h)})`),mL(s,p),n.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-i.height/2+h-(i.y-(i.top??0))})`),s.intersect=function(t){var r=H.rect(s,t),i=r.x-(s.x??0);if(0!=c&&(Math.abs(i)<(s.width??0)/2||Math.abs(i)==(s.width??0)/2&&Math.abs(r.y-(s.y??0))>(s.height??0)/2-h)){let e=h*h*(1-i*i/(c*c));0{n(),GL(),jL(),ZN(),hC(),vD=mt((e,t,r,i,n,a,s)=>[`M${e},`+(t+a),`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,"l0,"+i,`a${n},${a} 0,0,0 ${r},0`,"l0,"+-i,`M${e},`+(t+a+s),`a${n},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),bD=mt((e,t,r,i,n,a,s)=>[`M${e},`+(t+a),`M${e+r},`+(t+a),`a${n},${a} 0,0,0 ${-r},0`,"l0,"+i,`a${n},${a} 0,0,0 ${r},0`,"l0,"+-i,`M${e},`+(t+a+s),`a${n},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),xD=mt((e,t,r,i,n,a)=>[`M${e-r/2},`+-i/2,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),mt(yD,"linedCylinder")});async function wD(e,t){var{labelStyles:r,nodeStyles:i}=Q(t),{shapeSvg:r,bbox:e,label:n}=(t.labelStyle=r,await gL(e,t,yL(t))),a=Math.max(e.width+2*(t.padding??0),t?.width??0),s=Math.max(e.height+2*(t.padding??0),t?.height??0),o=s/4,l=s+o,c=t.cssStyles,h=KN.svg(r),u=FL(t,{});"handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid");let d=[{x:-a/2-a/2*.1,y:-l/2},{x:-a/2-a/2*.1,y:l/2},...dL(-a/2-a/2*.1,l/2,a/2+a/2*.1,l/2,o,.8),{x:a/2+a/2*.1,y:-l/2},{x:-a/2-a/2*.1,y:-l/2},{x:-a/2,y:-l/2},{x:-a/2,y:l/2*1.1},{x:-a/2,y:-l/2}],p=h.polygon(d.map(e=>[e.x,e.y]),u),g=r.insert(()=>p,":first-child");return g.attr("class","basic label-container"),c&&"handDrawn"!==t.look&&g.selectAll("path").attr("style",c),i&&"handDrawn"!==t.look&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(0,${-o/2})`),n.attr("transform",`translate(${-a/2+(t.padding??0)+a/2*.1/2-(e.x-(e.left??0))},${-s/2+(t.padding??0)-o/2-(e.y-(e.top??0))})`),mL(t,g),t.intersect=function(e){return H.polygon(t,d,e)},r}var kD=s(()=>{n(),GL(),ZN(),jL(),mt(wD,"linedWaveEdgedRect")});async function ED(e,t){var{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await gL(e,t,yL(t)),o=Math.max(a.width+2*(t.padding??0),t?.width??0),l=Math.max(a.height+2*(t.padding??0),t?.height??0),c=-o/2,h=-l/2,u=t.cssStyles,d=KN.svg(n),p=FL(t,{}),g=[{x:c-5,y:5+h},{x:c-5,y:h+l+5},{x:c+o-5,y:h+l+5},{x:c+o-5,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h+l-5},{x:c+o+5,y:h+l-5},{x:c+o+5,y:h-5},{x:5+c,y:h-5},{x:5+c,y:h},{x:c,y:h},{x:c,y:5+h}],f=[{x:c,y:5+h},{x:c+o-5,y:5+h},{x:c+o-5,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h},{x:c,y:h}],m=("handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid"),uL(g)),y=d.path(m,p),v=uL(f),b=d.path(v,{...p,fill:"none"}),x=n.insert(()=>b,":first-child");return x.insert(()=>y,":first-child"),x.attr("class","basic label-container"),u&&"handDrawn"!==t.look&&x.selectAll("path").attr("style",u),i&&"handDrawn"!==t.look&&x.selectAll("path").attr("style",i),s.attr("transform",`translate(${-a.width/2-5-(a.x-(a.left??0))}, ${-a.height/2+5-(a.y-(a.top??0))})`),mL(t,x),t.intersect=function(e){return H.polygon(t,g,e)},n}var _D=s(()=>{n(),jL(),ZN(),GL(),mt(ED,"multiRect")});async function SD(e,t){var{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await gL(e,t,yL(t)),o=Math.max(a.width+2*(t.padding??0),t?.width??0),l=Math.max(a.height+2*(t.padding??0),t?.height??0),c=l/4,h=l+c,u=-o/2,d=-h/2,p=t.cssStyles,g=dL(u-5,d+h+5,u+o-5,d+h+5,c,.8),f=g?.[g.length-1],m=[{x:u-5,y:5+d},{x:u-5,y:d+h+5},...g,{x:u+o-5,y:f.y-5},{x:u+o,y:f.y-5},{x:u+o,y:f.y-10},{x:u+o+5,y:f.y-10},{x:u+o+5,y:d-5},{x:5+u,y:d-5},{x:5+u,y:d},{x:u,y:d},{x:u,y:5+d}],y=[{x:u,y:5+d},{x:u+o-5,y:5+d},{x:u+o-5,y:f.y-5},{x:u+o,y:f.y-5},{x:u+o,y:d},{x:u,y:d}],v=KN.svg(n),b=FL(t,{}),x=("handDrawn"!==t.look&&(b.roughness=0,b.fillStyle="solid"),uL(m)),T=v.path(x,b),w=uL(y),k=v.path(w,b),E=n.insert(()=>T,":first-child");return E.insert(()=>k),E.attr("class","basic label-container"),p&&"handDrawn"!==t.look&&E.selectAll("path").attr("style",p),i&&"handDrawn"!==t.look&&E.selectAll("path").attr("style",i),E.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-a.width/2-5-(a.x-(a.left??0))}, ${-a.height/2+5-c/2-(a.y-(a.top??0))})`),mL(t,E),t.intersect=function(e){return H.polygon(t,m,e)},n}var CD=s(()=>{n(),GL(),ZN(),jL(),mt(SD,"multiWaveEdgedRectangle")});async function AD(e,t,{config:{themeVariables:r}}){var{labelStyles:i,nodeStyles:n}=Q(t),{shapeSvg:i,bbox:e,label:a}=(t.labelStyle=i,t.useHtmlLabels||vr(cr())||(t.centerLabel=!0),await gL(e,t,yL(t))),s=Math.max(e.width+2*(t.padding??0),t?.width??0),o=Math.max(e.height+2*(t.padding??0),t?.height??0),l=-s/2,c=-o/2,h=t.cssStyles,u=KN.svg(i),r=FL(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==t.look&&(r.roughness=0,r.fillStyle="solid");let d=u.rectangle(l,c,s,o,r),p=i.insert(()=>d,":first-child");return p.attr("class","basic label-container"),h&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",h),n&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",n),a.attr("transform",`translate(${-e.width/2-(e.x-(e.left??0))}, ${-e.height/2-(e.y-(e.top??0))})`),mL(t,p),t.intersect=function(e){return H.rect(t,e)},i}var RD=s(()=>{ZN(),GL(),jL(),n(),li(),li(),mt(AD,"note")});async function LD(e,n){var{labelStyles:t,nodeStyles:r}=Q(n);n.labelStyle=t;let{shapeSvg:a,bbox:i}=await gL(e,n,yL(n)),s=i.width+n.padding,o=i.height+n.padding,l=s+o,c=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}],h,u=n.cssStyles;if("handDrawn"===n.look){let e=KN.svg(a),t=FL(n,{}),r=ND(0,0,l),i=e.path(r,t);h=a.insert(()=>i,":first-child").attr("transform",`translate(${-l/2+.5}, ${l/2})`),u&&h.attr("style",u)}else(h=iI(a,l,l,c)).attr("transform",`translate(${-l/2+.5}, ${l/2})`);return r&&h.attr("style",r),mL(n,h),n.calcIntersect=function(e,t){var r=e.width;return{x:(e=H.polygon(e,[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],t)).x-.5,y:e.y-.5}},n.intersect=function(e){return this.calcIntersect(n,e)},a}var ND,ID=s(()=>{n(),GL(),jL(),ZN(),nI(),ND=mt((e,t,r)=>[`M${e+r/2},`+t,`L${e+r},`+(t-r/2),`L${e+r/2},`+(t-r),`L${e},`+(t-r/2),"Z"].join(" "),"createDecisionBoxPathD"),mt(LD,"question")});async function DD(e,t){var{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await gL(e,t,yL(t)),o=Math.max(a.width+(t.padding??0),t?.width??0),l=Math.max(a.height+(t.padding??0),t?.height??0),c=-o/2,h=-l/2,u=h/2,d=[{x:c+u,y:h},{x:c,y:0},{x:c+u,y:-h},{x:-c,y:-h},{x:-c,y:h}],p=t.cssStyles,g=KN.svg(n),f=FL(t,{}),m=("handDrawn"!==t.look&&(f.roughness=0,f.fillStyle="solid"),uL(d)),y=g.path(m,f),v=n.insert(()=>y,":first-child");return v.attr("class","basic label-container"),p&&"handDrawn"!==t.look&&v.selectAll("path").attr("style",p),i&&"handDrawn"!==t.look&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${-u/2},0)`),s.attr("transform",`translate(${-u/2-a.width/2-(a.x-(a.left??0))}, ${-a.height/2-(a.y-(a.top??0))})`),mL(t,v),t.intersect=function(e){return H.polygon(t,d,e)},n}var MD,OD,PD=s(()=>{n(),GL(),jL(),ZN(),mt(DD,"rect_left_inv_arrow")}),$D=s(()=>{li(),Au(),lL(),MD=mt(async(e,t,r,i=!1,n=!1)=>{let a=t||"";"object"==typeof a&&(a=a[0]);var t=O(),s=vr(t);return oL(e,a,{style:r,isTitle:i,useHtmlLabels:s,markdown:!1,isNode:n,width:Number.POSITIVE_INFINITY},t)},"createLabel"),OD=MD});async function BD(n,a){var{labelStyles:e,nodeStyles:t}=Q(a);a.labelStyle=e;let r,s=(r=a.cssClasses?"node "+a.cssClasses:"node default",n.insert("g").attr("class",r).attr("id",a.domId||a.id)),i=s.insert("g"),o=s.insert("g").attr("class","label").attr("style",t),l=a.description,c=a.label,h=await OD(o,c,a.labelStyle,!0,!0),u={width:0,height:0};vr(O())&&(e=h.children[0],n=V(h),u=e.getBoundingClientRect(),n.attr("width",u.width),n.attr("height",u.height)),M.info("Text 2",l);var e=l||[],n=h.getBBox(),d=(e=await OD(o,Array.isArray(e)?e.join("
"):e,a.labelStyle,!0,!0)).children[0],p=V(e),d=(u=d.getBoundingClientRect(),p.attr("width",u.width),p.attr("height",u.height),(a.padding||0)/2);V(e).attr("transform","translate( "+(u.width>n.width?0:(n.width-u.width)/2)+", "+(n.height+d+5)+")"),V(h).attr("transform","translate( "+(u.width(M.debug("Rough node insert CXC",r),i),":first-child"),v=s.insert(()=>(M.debug("Rough node insert CXC",r),r),":first-child")}else v=i.insert("rect",":first-child"),b=i.insert("line"),v.attr("class","outer title-state").attr("style",t).attr("x",-u.width/2-d).attr("y",-u.height/2-d).attr("width",u.width+(a.padding||0)).attr("height",u.height+(a.padding||0)),b.attr("class","divider").attr("x1",-u.width/2-d).attr("x2",u.width/2+d).attr("y1",-u.height/2-d+n.height+d).attr("y2",-u.height/2-d+n.height+d);return mL(a,v),a.intersect=function(e){return H.rect(a,e)},s}var FD=s(()=>{hw(),n(),$D(),GL(),jL(),ZN(),Au(),QI(),e(),li(),mt(BD,"rectWithTitle")});async function zD(e,t){return oD(e,t,{rx:5,ry:5,classes:"",labelPaddingX:+(t?.padding||0),labelPaddingY:+(t?.padding||0)})}var qD=s(()=>{lD(),mt(zD,"roundedRect")});async function UD(e,t){var{labelStyles:r,nodeStyles:i}=Q(t),{shapeSvg:r,bbox:e,label:n}=(t.labelStyle=r,await gL(e,t,yL(t))),a=t?.padding??0,s=Math.max(e.width+2*(t.padding??0),t?.width??0),o=Math.max(e.height+2*(t.padding??0),t?.height??0),l=-e.width/2-a,a=-e.height/2-a,c=t.cssStyles,h=KN.svg(r),u=FL(t,{});"handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid");let d=[{x:l,y:a},{x:l+s+8,y:a},{x:l+s+8,y:a+o},{x:l-8,y:a+o},{x:l-8,y:a},{x:l,y:a},{x:l,y:a+o}],p=h.polygon(d.map(e=>[e.x,e.y]),u),g=r.insert(()=>p,":first-child");return g.attr("class","basic label-container").attr("style",D7(c)),i&&"handDrawn"!==t.look&&g.selectAll("path").attr("style",i),c&&"handDrawn"!==t.look&&g.selectAll("path").attr("style",i),n.attr("transform",`translate(${-s/2+4+(t.padding??0)-(e.x-(e.left??0))},${-o/2+(t.padding??0)-(e.y-(e.top??0))})`),mL(t,g),t.intersect=function(e){return H.rect(t,e)},r}var GD=s(()=>{n(),GL(),jL(),ZN(),hC(),mt(UD,"shadedProcess")});async function jD(e,t){var{labelStyles:r,nodeStyles:i}=Q(t),{shapeSvg:r,bbox:e,label:n}=(t.labelStyle=r,await gL(e,t,yL(t))),a=Math.max(e.width+2*(t.padding??0),t?.width??0),s=Math.max(e.height+2*(t.padding??0),t?.height??0),o=-a/2,l=-s/2,c=t.cssStyles,h=KN.svg(r),u=FL(t,{});"handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid");let d=[{x:o,y:l},{x:o,y:l+s},{x:o+a,y:l+s},{x:o+a,y:l-s/2}],p=uL(d),g=h.path(p,u),f=r.insert(()=>g,":first-child");return f.attr("class","basic label-container"),c&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",c),i&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",i),f.attr("transform",`translate(0, ${s/4})`),n.attr("transform",`translate(${-a/2+(t.padding??0)-(e.x-(e.left??0))}, ${-s/4+(t.padding??0)-(e.y-(e.top??0))})`),mL(t,f),t.intersect=function(e){return H.polygon(t,d,e)},r}var WD=s(()=>{n(),GL(),jL(),ZN(),mt(jD,"slopedRect")});async function YD(e,t){return oD(e,t,{rx:0,ry:0,classes:"",labelPaddingX:t.labelPaddingX??2*(t?.padding||0),labelPaddingY:+(t?.padding||0)})}var VD=s(()=>{lD(),mt(YD,"squareRect")});async function HD(e,t){var{labelStyles:r,nodeStyles:i}=Q(t),{shapeSvg:r,bbox:e}=(t.labelStyle=r,await gL(e,t,yL(t))),n=e.height+t.padding,e=e.width+n/4+t.padding,a=n/2,s=t.cssStyles,o=KN.svg(r),l=FL(t,{});"handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid");let c=[{x:-e/2+a,y:-n/2},{x:e/2-a,y:-n/2},...pL(-e/2+a,0,a,50,90,270),{x:e/2-a,y:n/2},...pL(e/2-a,0,a,50,270,450)],h=uL(c),u=o.path(h,l),d=r.insert(()=>u,":first-child");return d.attr("class","basic label-container outer-path"),s&&"handDrawn"!==t.look&&d.selectChildren("path").attr("style",s),i&&"handDrawn"!==t.look&&d.selectChildren("path").attr("style",i),mL(t,d),t.intersect=function(e){return H.polygon(t,c,e)},r}var XD=s(()=>{n(),GL(),jL(),ZN(),mt(HD,"stadium")});async function KD(e,t){return oD(e,t,{rx:5,ry:5,classes:"flowchart-node"})}var ZD=s(()=>{lD(),mt(KD,"state")});function QD(e,t,{config:{themeVariables:r}}){var{labelStyles:i,nodeStyles:n}=Q(t),i=(t.labelStyle=i,t.cssStyles),{lineColor:r,stateBorder:a,nodeBorder:s}=r,e=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),o=KN.svg(e),l=FL(t,{});"handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid");let c=o.circle(0,0,14,{...l,stroke:r,strokeWidth:2}),h=a??s,u=o.circle(0,0,5,{...l,fill:h,stroke:h,strokeWidth:2,fillStyle:"solid"}),d=e.insert(()=>c,":first-child");return d.insert(()=>u),i&&d.selectAll("path").attr("style",i),n&&d.selectAll("path").attr("style",n),mL(t,d),t.intersect=function(e){return H.circle(t,7,e)},e}var JD=s(()=>{ZN(),GL(),jL(),n(),mt(QD,"stateEnd")});function eM(e,t,{config:{themeVariables:r}}){let i=r.lineColor,n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),a;if("handDrawn"===t.look){let e=KN.svg(n).circle(0,0,14,OL(i));(a=n.insert(()=>e)).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else(a=n.insert("circle",":first-child")).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return mL(t,a),t.intersect=function(e){return H.circle(t,7,e)},n}var tM=s(()=>{ZN(),GL(),jL(),n(),mt(eM,"stateStart")});async function rM(a,s){var{labelStyles:o,nodeStyles:e}=Q(s);s.labelStyle=o;let{shapeSvg:l,bbox:t}=await gL(a,s,yL(s)),r=(s?.padding||0)/2,c=t.width+s.padding,h=t.height+s.padding,u=-t.width/2-r,d=-t.height/2-r,i=[{x:0,y:0},{x:c,y:0},{x:c,y:-h},{x:0,y:-h},{x:0,y:0},{x:-8,y:0},{x:c+8,y:0},{x:c+8,y:-h},{x:-8,y:-h},{x:-8,y:0}];if("handDrawn"===s.look){let e=KN.svg(l),t=FL(s,{}),r=e.rectangle(u-8,d,c+16,h,t),i=e.line(u,d,u,d+h,t),n=e.line(u+c,d,u+c,d+h,t);l.insert(()=>i,":first-child"),l.insert(()=>n,":first-child"),o=l.insert(()=>r,":first-child"),a=s.cssStyles,o.attr("class","basic label-container").attr("style",D7(a)),mL(s,o)}else a=iI(l,c,h,i),e&&a.attr("style",e),mL(s,a);return s.intersect=function(e){return H.polygon(s,i,e)},l}var iM=s(()=>{n(),GL(),jL(),ZN(),nI(),hC(),mt(rM,"subroutine")});async function nM(e,t){var{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;let{shapeSvg:n,bbox:a}=await gL(e,t,yL(t)),s=Math.max(a.width+2*(t.padding??0),t?.width??0),o=Math.max(a.height+2*(t.padding??0),t?.height??0),l=-s/2,c=-o/2,h=.2*o,u=.2*o,d=t.cssStyles,p=KN.svg(n),g=FL(t,{}),f=[{x:l-h/2,y:c},{x:l+s+h/2,y:c},{x:l+s+h/2,y:c+o},{x:l-h/2,y:c+o}],m=[{x:l+s-h/2,y:c+o},{x:l+s+h/2,y:c+o},{x:l+s+h/2,y:c+o-u}],y=("handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid"),uL(f)),v=p.path(y,g),b=uL(m),x=p.path(b,{...g,fillStyle:"solid"}),T=n.insert(()=>x,":first-child");return T.insert(()=>v,":first-child"),T.attr("class","basic label-container"),d&&"handDrawn"!==t.look&&T.selectAll("path").attr("style",d),i&&"handDrawn"!==t.look&&T.selectAll("path").attr("style",i),mL(t,T),t.intersect=function(e){return H.polygon(t,f,e)},n}var aM=s(()=>{n(),jL(),ZN(),GL(),mt(nM,"taggedRect")});async function sM(e,t){var{labelStyles:r,nodeStyles:i}=Q(t),{shapeSvg:r,bbox:e,label:n}=(t.labelStyle=r,await gL(e,t,yL(t))),a=Math.max(e.width+2*(t.padding??0),t?.width??0),s=Math.max(e.height+2*(t.padding??0),t?.height??0),o=s/4,l=.2*a,c=.2*s,h=s+o,u=t.cssStyles,d=KN.svg(r),p=FL(t,{});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-a/2-a/2*.1,y:h/2},...dL(-a/2-a/2*.1,h/2,a/2+a/2*.1,h/2,o,.8),{x:a/2+a/2*.1,y:-h/2},{x:-a/2-a/2*.1,y:-h/2}],f=-a/2+a/2*.1,m=-h/2-.4*c,y=[{x:f+a-l,y:1.4*(m+s)},{x:f+a,y:m+s-c},{x:f+a,y:.9*(m+s)},...dL(f+a,1.3*(m+s),f+a-l,1.5*(m+s),.03*-s,.5)],v=uL(g),b=d.path(v,p),x=uL(y),T=d.path(x,{...p,fillStyle:"solid"}),w=r.insert(()=>T,":first-child");return w.insert(()=>b,":first-child"),w.attr("class","basic label-container"),u&&"handDrawn"!==t.look&&w.selectAll("path").attr("style",u),i&&"handDrawn"!==t.look&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(0,${-o/2})`),n.attr("transform",`translate(${-a/2+(t.padding??0)-(e.x-(e.left??0))},${-s/2+(t.padding??0)-o/2-(e.y-(e.top??0))})`),mL(t,w),t.intersect=function(e){return H.polygon(t,g,e)},r}var oM=s(()=>{n(),GL(),ZN(),jL(),mt(sM,"taggedWaveEdgedRectangle")});async function lM(e,t){var{labelStyles:r,nodeStyles:i}=Q(t),{shapeSvg:r,bbox:e}=(t.labelStyle=r,await gL(e,t,yL(t))),n=Math.max(e.width+t.padding,t?.width||0),a=-n/2,s=-(e=Math.max(e.height+t.padding,t?.height||0))/2,o=r.insert("rect",":first-child");return o.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",a).attr("y",s).attr("width",n).attr("height",e),mL(t,o),t.intersect=function(e){return H.rect(t,e)},r}var cM=s(()=>{n(),GL(),jL(),mt(lM,"text")});async function hM(e,a){var{labelStyles:t,nodeStyles:r}=Q(a);a.labelStyle=t;let{shapeSvg:s,bbox:i,label:n,halfPadding:o}=await gL(e,a,yL(a)),l="neo"===a.look?2*o:o,c=i.height+l,h=c/2,u=h/(2.5+c/50),d=i.width+u+l,p=a.cssStyles,g;if("handDrawn"===a.look){let e=KN.svg(s),t=dM(0,0,d,c,u,h),r=pM(0,0,d,c,u,h),i=e.path(t,FL(a,{})),n=e.path(r,FL(a,{fill:"none"}));g=s.insert(()=>n,":first-child"),(g=s.insert(()=>i,":first-child")).attr("class","basic label-container"),p&&g.attr("style",p)}else t=uM(0,0,d,c,u,h),(g=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",D7(p)).attr("style",r)).attr("class","basic label-container"),p&&g.selectAll("path").attr("style",p),r&&g.selectAll("path").attr("style",r);return g.attr("label-offset-x",u),g.attr("transform",`translate(${-d/2}, ${c/2} )`),n.attr("transform",`translate(${-i.width/2-u-(i.x-(i.left??0))}, ${-i.height/2-(i.y-(i.top??0))})`),mL(a,g),a.intersect=function(t){var r=H.rect(a,t),i=r.y-(a.y??0);if(0!=h&&(Math.abs(i)<(a.height??0)/2||Math.abs(i)==(a.height??0)/2&&Math.abs(r.x-(a.x??0))>(a.width??0)/2-u)){let e=u*u*(1-i*i/(h*h));0!=e&&(e=Math.sqrt(Math.abs(e))),e=u-e,0{n(),jL(),ZN(),GL(),hC(),uM=mt((e,t,r,i,n,a)=>`M${e},${t} a${n},${a} 0,0,1 0,${-i} l${r},0 a${n},${a} 0,0,1 0,${i} M${r},${-i} a${n},${a} 0,0,0 0,${i} l${-r},0`,"createCylinderPathD"),dM=mt((e,t,r,i,n,a)=>[`M${e},`+t,`M${e+r},`+t,`a${n},${a} 0,0,0 0,`+-i,`l${-r},0`,`a${n},${a} 0,0,0 0,`+i,`l${r},0`].join(" "),"createOuterCylinderPathD"),pM=mt((e,t,r,i,n,a)=>[`M${e+r/2},`+-i/2,`a${n},${a} 0,0,0 0,`+i].join(" "),"createInnerCylinderPathD"),mt(hM,"tiltedCylinder")});async function fM(e,n){var{labelStyles:t,nodeStyles:r}=Q(n);n.labelStyle=t;let{shapeSvg:a,bbox:i}=await gL(e,n,yL(n)),s=i.width+n.padding,o=i.height+n.padding,l=[{x:-3*o/6,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:0,y:-o}],c,h=n.cssStyles;if("handDrawn"===n.look){let e=KN.svg(a),t=FL(n,{}),r=uL(l),i=e.path(r,t);c=a.insert(()=>i,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=iI(a,s,o,l);return r&&c.attr("style",r),n.width=s,n.height=o,mL(n,c),n.intersect=function(e){return H.polygon(n,l,e)},a}var mM=s(()=>{n(),GL(),jL(),ZN(),nI(),mt(fM,"trapezoid")});async function yM(e,t){var{labelStyles:r,nodeStyles:i}=Q(t),{shapeSvg:r,bbox:e}=(t.labelStyle=r,await gL(e,t,yL(t))),n=Math.max(60,e.width+2*(t.padding??0),t?.width??0),e=Math.max(20,e.height+2*(t.padding??0),t?.height??0),a=t.cssStyles,s=KN.svg(r),o=FL(t,{});"handDrawn"!==t.look&&(o.roughness=0,o.fillStyle="solid");let l=[{x:-n/2*.8,y:-e/2},{x:n/2*.8,y:-e/2},{x:n/2,y:-e/2*.6},{x:n/2,y:e/2},{x:-n/2,y:e/2},{x:-n/2,y:-e/2*.6}],c=uL(l),h=s.path(c,o),u=r.insert(()=>h,":first-child");return u.attr("class","basic label-container"),a&&"handDrawn"!==t.look&&u.selectChildren("path").attr("style",a),i&&"handDrawn"!==t.look&&u.selectChildren("path").attr("style",i),mL(t,u),t.intersect=function(e){return H.polygon(t,l,e)},r}var vM=s(()=>{n(),GL(),jL(),ZN(),mt(yM,"trapezoidalPentagon")});async function bM(e,t){var{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await gL(e,t,yL(t)),o=t.useHtmlLabels||vr(O()),l=a.width+(t.padding??0),c=l+a.height,h=l+a.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],d=t.cssStyles,p=KN.svg(n),g=FL(t,{}),f=("handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid"),uL(u)),m=p.path(f,g),y=n.insert(()=>m,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return d&&"handDrawn"!==t.look&&y.selectChildren("path").attr("style",d),i&&"handDrawn"!==t.look&&y.selectChildren("path").attr("style",i),t.width=l,t.height=c,mL(t,y),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${c/2-(a.height+(t.padding??0)/(o?2:1)-(a.y-(a.top??0)))})`),t.intersect=function(e){return M.info("Triangle intersect",t,u,e),H.polygon(t,u,e)},n}var xM=s(()=>{e(),n(),GL(),jL(),ZN(),n(),Au(),li(),mt(bM,"triangle")});async function TM(e,t){var{labelStyles:r,nodeStyles:i}=Q(t),{shapeSvg:r,bbox:e,label:n}=(t.labelStyle=r,await gL(e,t,yL(t))),a=Math.max(e.width+2*(t.padding??0),t?.width??0),s=Math.max(e.height+2*(t.padding??0),t?.height??0),o=s/8,l=s+o,c=t.cssStyles,h=0<(h=70-a)?h/2:0,u=KN.svg(r),d=FL(t,{});"handDrawn"!==t.look&&(d.roughness=0,d.fillStyle="solid");let p=[{x:-a/2-h,y:l/2},...dL(-a/2-h,l/2,a/2+h,l/2,o,.8),{x:a/2+h,y:-l/2},{x:-a/2-h,y:-l/2}],g=uL(p),f=u.path(g,d),m=r.insert(()=>f,":first-child");return m.attr("class","basic label-container"),c&&"handDrawn"!==t.look&&m.selectAll("path").attr("style",c),i&&"handDrawn"!==t.look&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(0,${-o/2})`),n.attr("transform",`translate(${-a/2+(t.padding??0)-(e.x-(e.left??0))},${-s/2+(t.padding??0)-o-(e.y-(e.top??0))})`),mL(t,m),t.intersect=function(e){return H.polygon(t,p,e)},r}var wM=s(()=>{n(),GL(),ZN(),jL(),mt(TM,"waveEdgedRectangle")});async function kM(e,t){var{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;let{shapeSvg:n,bbox:a}=await gL(e,t,yL(t)),s=Math.max(a.width+2*(t.padding??0),t?.width??0),o=Math.max(a.height+2*(t.padding??0),t?.height??0),l=s/o,c=s,h=o;c>h*l?h=c/l:c=h*l,c=Math.max(c,100),h=Math.max(h,50);var r=Math.min(.2*h,h/4),e=h+2*r,u=t.cssStyles,d=KN.svg(n),p=FL(t,{});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-c/2,y:e/2},...dL(-c/2,e/2,c/2,e/2,r,1),{x:c/2,y:-e/2},...dL(c/2,-e/2,-c/2,-e/2,r,-1)],f=uL(g),m=d.path(f,p),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&"handDrawn"!==t.look&&y.selectAll("path").attr("style",u),i&&"handDrawn"!==t.look&&y.selectAll("path").attr("style",i),mL(t,y),t.intersect=function(e){return H.polygon(t,g,e)},n}var EM=s(()=>{n(),GL(),jL(),ZN(),mt(kM,"waveRectangle")});async function _M(e,t){var{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await gL(e,t,yL(t)),o=Math.max(a.width+2*(t.padding??0),t?.width??0),l=Math.max(a.height+2*(t.padding??0),t?.height??0),c=-o/2,h=-l/2,u=t.cssStyles,d=KN.svg(n),p=FL(t,{}),g=[{x:c-5,y:h-5},{x:c-5,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h-5}],f=`M${c-5},${h-5} L${c+o},${h-5} L${c+o},${h+l} L${c-5},${h+l} L${c-5},${h-5} M${c-5},${h} L${c+o},${h} M${c},${h-5} L${c},`+(h+l),m=("handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid"),d.path(f,p)),y=n.insert(()=>m,":first-child");return y.attr("transform","translate(2.5, 2.5)"),y.attr("class","basic label-container"),u&&"handDrawn"!==t.look&&y.selectAll("path").attr("style",u),i&&"handDrawn"!==t.look&&y.selectAll("path").attr("style",i),s.attr("transform",`translate(${-a.width/2+2.5-(a.x-(a.left??0))}, ${-a.height/2+2.5-(a.y-(a.top??0))})`),mL(t,y),t.intersect=function(e){return H.polygon(t,g,e)},n}var SM=s(()=>{n(),jL(),ZN(),GL(),mt(_M,"windowPane")});async function CM(e,t){var r,i=t,n=(i.alias&&(t.label=i.alias),"handDrawn"===t.look&&(A=(A=cr().themeVariables).background,await CM(e,{...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none","fill: "+A]})),cr());t.useHtmlLabels=n.htmlLabels;let o=n.er?.diagramPadding??10,l=n.er?.entityPadding??6,a=t.cssStyles,{labelStyles:s,nodeStyles:c}=Q(t);if(0===i.attributes.length&&t.label)return A={rx:0,ry:0,labelPaddingX:o,labelPaddingY:1.5*o,classes:""},L7(t.label,n)+2*A.labelPaddingXe+(t?.rowHeight??0),0)),Math.max(C.width+2*o,t?.width||0,A)),I=Math.max((z??0)+d.height,t?.height||0),D=-N/2,M=-I/2,q=(u.selectAll("g:not(:first-child)").each((e,t,r)=>{let i=V(r[t]),n=i.attr("transform"),a=0,s=0;n&&(r=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n))&&(a=parseFloat(r[1]),s=parseFloat(r[2]),i.attr("class").includes("attribute-name")?a+=m:i.attr("class").includes("attribute-keys")?a+=m+y:i.attr("class").includes("attribute-comment")&&(a+=m+y+v)),i.attr("transform",`translate(${D+o/2+a}, ${s+M+d.height+l/2})`)}),u.select(".name").attr("transform","translate("+-d.width/2+", "+(M+l/2)+")"),R.rectangle(D,M,N,I,L)),U=u.insert(()=>q,":first-child").attr("style",a.join("")),G=cr().themeVariables,{rowEven:j,rowOdd:W,nodeBorder:Y}=G;g.push(0);for([F,_]of f.entries()){let e=(F+1)%2==0&&0!==_.yOffset,t=R.rectangle(D,d.height+M+_?.yOffset,N,_?.rowHeight,{...L,fill:e?j:W,stroke:Y});u.insert(()=>t,"g.label").attr("style",a.join("")).attr("class","row-rect-"+(e?"even":"odd"))}let O=R.line(D,d.height+M,N+D,d.height+M,L);u.insert(()=>O).attr("class","divider"),O=R.line(m+D,d.height+M,m+D,I+M,L),u.insert(()=>O).attr("class","divider"),x&&(O=R.line(m+y+D,d.height+M,m+y+D,I+M,L),u.insert(()=>O).attr("class","divider")),T&&(O=R.line(m+y+v+D,d.height+M,m+y+v+D,I+M,L),u.insert(()=>O).attr("class","divider"));for(S of g)O=R.line(D,d.height+M+S,N+D,d.height+M+S,L),u.insert(()=>O).attr("class","divider");return mL(t,U),c&&"handDrawn"!==t.look&&(e=c.split(";")?.filter(e=>e.includes("stroke"))?.map(e=>""+e).join("; "),u.selectAll("path").attr("style",e??""),u.selectAll(".row-rect-even path").attr("style",c)),t.intersect=function(e){return H.rect(t,e)},u}async function AM(e,t,r,i=0,n=0,a=[],s=""){if(e=e.insert("g").attr("class","label "+a.join(" ")).attr("transform",`translate(${i}, ${n})`).attr("style",s),t!==kc(t)&&(t=(t=kc(t)).replaceAll("<","<").replaceAll(">",">")),a=e.node().appendChild(await oL(e,t,{width:L7(t,r)+100,style:s,useHtmlLabels:r.htmlLabels},r)),t.includes("<")||t.includes(">")){let e=a.children[0];for(e.textContent=e.textContent.replaceAll("<","<").replaceAll(">",">");e.childNodes[0];)(e=e.childNodes[0]).textContent=e.textContent.replaceAll("<","<").replaceAll(">",">")}let o=a.getBBox();return Qt(r.htmlLabels)&&((i=a.children[0]).style.textAlign="start",n=V(a),o=i.getBoundingClientRect(),n.attr("width",o.width),n.attr("height",o.height)),o}var RM=s(()=>{n(),GL(),jL(),ZN(),lD(),li(),lL(),zc(),hw(),hC(),mt(CM,"erBox"),mt(AM,"addText")});async function LM(e,t,r,i,n=r.class.padding??12){let a=i?0:3,s=e.insert("g").attr("class",yL(t)).attr("id",t.domId||t.id),o=null,l=null,c=null,h=null,u=0,d,p=0;var g,f;o=s.insert("g").attr("class","annotation-group text"),0").length,e.innerHTML.includes("")&&(h+=e.innerHTML.split("").length-1),e.getElementsByTagName("img"));if(u){let i=""===o.replace(/]*>/g,"").trim();await Promise.all([...u].map(r=>new Promise(t=>{function e(){var e;r.style.display="flex",r.style.flexDirection="column",i?(e=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,e=5*parseInt(e,10)+"px",r.style.minWidth=e,r.style.maxWidth=e):r.style.width="100%",t(r)}mt(e,"setupImage"),setTimeout(()=>{r.complete&&e()}),r.addEventListener("error",e),r.addEventListener("load",e)})))}c=e.getBoundingClientRect(),t.attr("width",c.width),t.attr("height",c.height)}else i.includes("font-weight: bolder")&&V(l).selectAll("tspan").attr("font-weight",""),h=l.children.length,u=l.children[0],""!==l.textContent&&!l.textContent.includes(">")||(u.textContent=o[0]+o.substring(1).replaceAll(">",">").replaceAll("<","<").trim()," "!==o[1])||(u.textContent=u.textContent[0]+" "+u.textContent.substring(1)),"undefined"===u.textContent&&(u.textContent=""),c=l.getBBox();return n.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}var IM=s(()=>{hw(),li(),n(),hC(),Au(),lL(),zc(),mt(LM,"textHelper"),mt(NM,"addText")});async function DM(t,r){let e=O(),s=e.class.padding??12,i=s,o=r.useHtmlLabels??Qt(e.htmlLabels)??!0,l=r,{shapeSvg:c,bbox:n}=(l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[],await LM(t,r,e,o,i)),{labelStyles:a,nodeStyles:h}=Q(r),u=(r.labelStyle=a,r.cssStyles=l.styles||"",t=l.styles?.join(";")||h||"",r.cssStyles||(r.cssStyles=t.replaceAll("!important","").split(";")),0===l.members.length&&0===l.methods.length&&!e.class?.hideEmptyMembersBox),d=KN.svg(c),p=FL(r,{}),g=("handDrawn"!==r.look&&(p.roughness=0,p.fillStyle="solid"),n.width),f=n.height,m=(0===l.members.length&&0===l.methods.length?f+=i:0v,":first-child");b.attr("class","basic label-container");var x=b.node().getBBox(),T=(c.selectAll(".text").each((e,t,r)=>{let i=(t=V(r[t])).attr("transform"),n=(i&&(r=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i))?parseFloat(r[2]):0)+y+s-(u?s:0===l.members.length&&0===l.methods.length?-s/2:0),a=(o||(n-=4),m);(t.attr("class").includes("label-group")||t.attr("class").includes("annotation-group"))&&(a=-t.node()?.getBBox().width/2||0,c.selectAll("text").each(function(e,t,r){"middle"===window.getComputedStyle(r[t]).textAnchor&&(a=0)})),t.attr("transform",`translate(${a}, ${n})`)}),c.select(".annotation-group").node().getBBox().height-(u?s/2:0)||0),w=c.select(".label-group").node().getBBox().height-(u?s/2:0)||0,k=c.select(".members-group").node().getBBox().height-(u?s/2:0)||0;if(0e).attr("class","divider").attr("style",t)}if(u||0e).attr("class","divider").attr("style",t)}return"handDrawn"!==l.look&&c.selectAll("path").attr("style",t),b.select(":nth-child(2)").attr("style",t),c.selectAll(".divider").select("path").attr("style",t),r.labelStyle?c.selectAll("span").attr("style",r.labelStyle):c.selectAll("span").attr("style",t),o||((T=(x=RegExp(/color\s*:\s*([^;]*)/)).exec(t))?(w=T[0].replace("color","fill"),c.selectAll("tspan").attr("style",w)):a&&(k=x.exec(a))&&(t=k[0].replace("color","fill"),c.selectAll("tspan").attr("style",t))),mL(r,b),r.intersect=function(e){return H.rect(r,e)},c}var MM=s(()=>{n(),Au(),hw(),ZN(),jL(),GL(),IM(),zc(),mt(DM,"classBox")});async function OM(e,t){var{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;let n=t,a=t,s="verifyMethod"in t,o=yL(t),l=e.insert("g").attr("class",o).attr("id",t.domId??t.id),c,h=c=s?await PM(l,`<<${n.type}>>`,0,t.labelStyle):await PM(l,"<<Element>>",0,t.labelStyle),u=await PM(l,n.name,h,t.labelStyle+"; font-weight: bold;"),d=(h+=u+20,s?(r=await PM(l,n.requirementId?"ID: "+n.requirementId:"",h,t.labelStyle),h+=r,e=await PM(l,n.text?"Text: "+n.text:"",h,t.labelStyle),h+=e,r=await PM(l,n.risk?"Risk: "+n.risk:"",h,t.labelStyle),h+=r,await PM(l,n.verifyMethod?"Verification: "+n.verifyMethod:"",h,t.labelStyle)):(e=await PM(l,a.type?"Type: "+a.type:"",h,t.labelStyle),h+=e,await PM(l,a.docRef?"Doc Ref: "+a.docRef:"",h,t.labelStyle)),(l.node()?.getBBox().width??200)+20),p=(l.node()?.getBBox().height??200)+20,g=-d/2,f=-p/2,m=KN.svg(l),y=FL(t,{}),v=("handDrawn"!==t.look&&(y.roughness=0,y.fillStyle="solid"),m.rectangle(g,f,d,p,y)),b=l.insert(()=>v,":first-child");if(b.attr("class","basic label-container").attr("style",i),l.selectAll(".label").each((e,t,r)=>{let i=V(r[t]),n=i.attr("transform"),a=0,s=0,o=(n&&(r=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n))&&(a=parseFloat(r[1]),s=parseFloat(r[2])),s-p/2),l=10+g;0!==t&&1!==t||(l=a),i.attr("transform",`translate(${l}, ${20+o})`)}),h>c+u+20){let e=m.line(g,f+c+u+20,g+d,f+c+u+20,y);l.insert(()=>e).attr("style",i)}return mL(t,b),t.intersect=function(e){return H.rect(t,e)},l}async function PM(e,t,r,i=""){if(""===t)return 0;let n=e.insert("g").attr("class","label").attr("style",i),a=O(),s=a.htmlLabels??!0,o=await oL(n,Nh(lC(t)),{width:L7(t,a)+50,classes:"markdown-node-label",useHtmlLabels:s,style:i},a),l;if(s)e=o.children[0],t=V(o),l=e.getBoundingClientRect(),t.attr("width",l.width),t.attr("height",l.height);else{var c;for(c of o.children[0].children)c.textContent=c.textContent.replaceAll(">",">").replaceAll("<","<"),i&&c.setAttribute("style",i);(l=o.getBBox()).height+=6}return n.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}var $M=s(()=>{n(),GL(),jL(),ZN(),hC(),Au(),lL(),hw(),mt(OM,"requirementBox"),mt(PM,"addText")});async function BM(e,i,{config:t}){var{labelStyles:n,nodeStyles:r}=Q(i),n=(i.labelStyle=n||"",i.width);i.width=(i.width??200)-10;let{shapeSvg:a,bbox:s,label:o}=await gL(e,i,yL(i)),l=i.padding||10,c,h,u=("ticket"in i&&i.ticket&&t?.kanban?.ticketBaseUrl&&(c=t?.kanban?.ticketBaseUrl.replace("#TICKET#",i.ticket),h=a.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",c).attr("target","_blank")),{useHtmlLabels:i.useHtmlLabels,labelStyle:i.labelStyle||"",width:i.width,img:i.img,padding:i.padding||8,centerLabel:!1}),d,p;h?{label:d,bbox:p}=await fL(h,"ticket"in i&&i.ticket||"",u):{label:d,bbox:p}=await fL(a,"ticket"in i&&i.ticket||"",u);var{label:e,bbox:t}=await fL(a,"assigned"in i&&i.assigned||"",u),n=(i.width=n,i?.width||0),g=Math.max(p.height,t.height)/2,f=Math.max(s.height+20,i?.height||0)+g,m=-n/2,y=-f/2;o.attr("transform","translate("+(l-n/2)+", "+(-g-s.height/2)+")"),d.attr("transform","translate("+(l-n/2)+", "+(-g+s.height/2)+")"),e.attr("transform","translate("+(l+n/2-t.width-20)+", "+(-g+s.height/2)+")");let v,{rx:b,ry:x}=i,T=i.cssStyles;if("handDrawn"===i.look){let e=KN.svg(a),t=FL(i,{}),r=b||x?e.path(KI(m,y,n,f,b||0),t):e.rectangle(m,y,n,f,t);(v=a.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",T||null)}else(v=a.insert("rect",":first-child")).attr("class","basic label-container __APA__").attr("style",r).attr("rx",b??5).attr("ry",x??5).attr("x",m).attr("y",y).attr("width",n).attr("height",f),(e="priority"in i&&i.priority)&&(t=a.append("line"),g=2+m,r=y+Math.floor((b??0)/2),n=y+f-Math.floor((b??0)/2),t.attr("x1",g).attr("y1",r).attr("x2",g).attr("y2",n).attr("stroke-width","4").attr("stroke",FM(e)));return mL(i,v),i.height=f,i.intersect=function(e){return H.rect(i,e)},a}var FM,zM=s(()=>{n(),GL(),QI(),jL(),ZN(),FM=mt(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority"),mt(BM,"kanbanItem")});async function qM(e,i){var{labelStyles:n,nodeStyles:t}=Q(i),{shapeSvg:n,bbox:e,halfPadding:r,label:a}=(i.labelStyle=n,await gL(e,i,yL(i))),s=e.width+10*r,r=e.height+8*r,o=.15*s,l=i.cssStyles,c=e.height+20,s=Math.max(s,e.width+20),r=Math.max(r,c);a.attr("transform",`translate(${-e.width/2}, ${-e.height/2})`);let h,u=`M0 0 a${o},${o} 1 0,0 ${.25*s},${-1*r*.1} a${o},${o} 1 0,0 ${.25*s},0 a${o},${o} 1 0,0 ${.25*s},0 a${o},${o} 1 0,0 ${.25*s},${.1*r} a${o},${o} 1 0,0 ${.15*s},${.33*r} a${.8*o},${.8*o} 1 0,0 0,${.34*r} a${o},${o} 1 0,0 ${-1*s*.15},${.33*r} a${o},${o} 1 0,0 ${-1*s*.25},${.15*r} a${o},${o} 1 0,0 ${-1*s*.25},0 a${o},${o} 1 0,0 ${-1*s*.25},0 a${o},${o} 1 0,0 ${-1*s*.25},${-1*r*.15} a${o},${o} 1 0,0 ${-1*s*.1},${-1*r*.33} a${.8*o},${.8*o} 1 0,0 0,${-1*r*.34} a${o},${o} 1 0,0 ${.1*s},${-1*r*.33} H0 V0 Z`;if("handDrawn"===i.look){let e=KN.svg(n),t=FL(i,{}),r=e.path(u,t);(h=n.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",D7(l))}else h=n.insert("path",":first-child").attr("class","basic label-container").attr("style",t).attr("d",u);return h.attr("transform",`translate(${-s/2}, ${-r/2})`),mL(i,h),i.calcIntersect=function(e,t){return H.rect(e,t)},i.intersect=function(e){return M.info("Bang intersect",i,e),H.rect(i,e)},n}var UM=s(()=>{e(),n(),GL(),jL(),ZN(),hC(),mt(qM,"bang")});async function GM(e,i){var{labelStyles:t,nodeStyles:r}=Q(i);i.labelStyle=t;let{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await gL(e,i,yL(i)),l=a.width+2*s,c=a.height+2*s,h=.15*l,u=.25*l,d=.35*l,p=.2*l,g=i.cssStyles,f,m=`M0 0 a${h},${h} 0 0,1 ${.25*l},${-1*l*.1} a${d},${d} 1 0,1 ${.4*l},${-1*l*.1} a${u},${u} 1 0,1 ${.35*l},${.2*l} a${h},${h} 1 0,1 ${.15*l},${.35*c} a${p},${p} 1 0,1 ${-1*l*.15},${.65*c} a${u},${h} 1 0,1 ${-1*l*.25},${.15*l} a${d},${d} 1 0,1 ${-1*l*.5},0 a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15} a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35} a${p},${p} 1 0,1 ${.1*l},${-1*c*.65} H0 V0 Z`;if("handDrawn"===i.look){let e=KN.svg(n),t=FL(i,{}),r=e.path(m,t);(f=n.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",D7(g))}else f=n.insert("path",":first-child").attr("class","basic label-container").attr("style",r).attr("d",m);return o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),f.attr("transform",`translate(${-l/2}, ${-c/2})`),mL(i,f),i.calcIntersect=function(e,t){return H.rect(e,t)},i.intersect=function(e){return M.info("Cloud intersect",i,e),H.rect(i,e)},n}var jM=s(()=>{ZN(),e(),hC(),GL(),jL(),n(),mt(GM,"cloud")});async function WM(e,t){var{labelStyles:r,nodeStyles:i}=Q(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await gL(e,t,yL(t)),l=a.width+8*s,c=a.height+2*s,h=` M${-l/2} ${c/2-5} v${10-c} q0,-5 5,-5 h${l-10} q5,0 5,5 v${c-10} q0,5 -5,5 h${10-l} q-5,0 -5,-5 Z `,u=n.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",h);return n.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),n.append(()=>o.node()),mL(t,u),t.calcIntersect=function(e,t){return H.rect(e,t)},t.intersect=function(e){return H.rect(t,e)},n}var YM=s(()=>{GL(),jL(),n(),mt(WM,"defaultMindmapNode")});async function VM(e,t){return cI(e,t,{padding:t.padding??0})}var HM=s(()=>{hI(),mt(VM,"mindmapCircle")});function XM(e){return e in QM}var KM,ZM,QM,JM,eO,tO,rO,iO,nO,aO,sO,oO,lO,cO,hO,uO,dO=s(()=>{JN(),rI(),sI(),lI(),hI(),pI(),mI(),bI(),wI(),EI(),RI(),NI(),DI(),OI(),$I(),FI(),qI(),jI(),YI(),HI(),ZI(),eD(),rD(),nD(),sD(),hD(),dD(),gD(),mD(),TD(),kD(),_D(),CD(),RD(),ID(),PD(),FD(),qD(),GD(),WD(),VD(),XD(),ZD(),JD(),tM(),iM(),aM(),oM(),cM(),gM(),mM(),vM(),xM(),wM(),EM(),SM(),RM(),MM(),$M(),zM(),UM(),jM(),YM(),HM(),KM=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:YD},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:zD},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:HD},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:rM},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:_I},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:cI},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:qM},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:GM},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:LD},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:UI},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:pD},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:uD},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:fM},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:aD},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:II},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:lM},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:aI},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:UD},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:eM},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:QD},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:BI},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:WI},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:fI},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:vI},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:TI},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:fD},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:TM},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:zI},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:hM},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:yD},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:kI},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:LI},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:bM},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:_M},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:MI},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:yM},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:PI},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:jD},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:SD},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:ED},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:tI},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:dI},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:sM},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:nM},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:kM},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:DD},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:wD}],ZM=mt(()=>{var e=[...Object.entries({state:KD,choice:oI,note:AD,rectWithTitle:BD,labelRect:cD,iconSquare:tD,iconCircle:XI,icon:VI,iconRounded:JI,imageSquare:iD,anchor:QN,kanbanItem:BM,mindmapCircle:VM,defaultMindmapNode:WM,classBox:DM,erBox:CM,requirementBox:OM}),...KM.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))];return Object.fromEntries(e)},"generateShapeMap"),QM=ZM(),mt(XM,"isValidShape")}),pO=s(()=>{hw(),Y9(),Au(),e(),dO(),hC(),zc(),Cu(),pw(),pn(),JM=class{constructor(){this.vertexCounter=0,this.config=O(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=Th,this.setAccDescription=kh,this.setDiagramTitle=_h,this.getAccTitle=wh,this.getAccDescription=Eh,this.getDiagramTitle=Sh,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{mt(this,"FlowDB")}sanitizeText(e){return L.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case"markdown":case"string":case"text":return e;default:return"markdown"}}lookUpDomId(e){for(var t of this.vertices.values())if(t.id===e)return t.domId;return e}addVertex(i,n,a,s,o,l,c={},e){if(i&&0!==i.trim().length){let r;var t;if(void 0!==e&&(t=e.includes(` `)?e+` `:`{ `+e+` }`,r=W9(t,{schema:j9})),e=this.edges.find(e=>e.id===i))void 0!==(t=r)?.animate&&(e.animate=t.animate),void 0!==t?.animation&&(e.animation=t.animation),void 0!==t?.curve&&(e.interpolate=t.curve);else{let e,t=this.vertices.get(i);if(void 0===t&&(t={id:i,labelType:"text",domId:"flowchart-"+i+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(i,t)),this.vertexCounter++,void 0!==n?(this.config=O(),e=this.sanitizeText(n.text.trim()),t.labelType=n.type,e.startsWith('"')&&e.endsWith('"')&&(e=e.substring(1,e.length-1)),t.text=e):void 0===t.text&&(t.text=i),void 0!==a&&(t.type=a),s?.forEach(e=>{t.styles.push(e)}),o?.forEach(e=>{t.classes.push(e)}),void 0!==l&&(t.dir=l),void 0===t.props?t.props=c:void 0!==c&&Object.assign(t.props,c),void 0!==r){if(r.shape){if(r.shape!==r.shape.toLowerCase()||r.shape.includes("_"))throw new Error(`No such shape: ${r.shape}. Shape names should be lowercase.`);if(!XM(r.shape))throw new Error(`No such shape: ${r.shape}.`);t.type=r?.shape}r?.label&&(t.text=r?.label,t.labelType=this.sanitizeNodeLabelType(r?.labelType)),r?.icon&&(t.icon=r?.icon,!r.label?.trim())&&t.text===i&&(t.text=""),r?.form&&(t.form=r?.form),r?.pos&&(t.pos=r?.pos),r?.img&&(t.img=r?.img,!r.label?.trim())&&t.text===i&&(t.text=""),r?.constraint&&(t.constraint=r.constraint),r.w&&(t.assetWidth=Number(r.w)),r.h&&(t.assetHeight=Number(r.h))}}}}addSingleLink(e,t,r,i){let n={start:e,end:t,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};if(M.info("abc78 Got edge...",n),void 0!==(e=r.text)&&(n.text=this.sanitizeText(e.text.trim()),n.text.startsWith('"')&&n.text.endsWith('"')&&(n.text=n.text.substring(1,n.text.length-1)),n.labelType=this.sanitizeNodeLabelType(e.type)),void 0!==r&&(n.type=r.type,n.stroke=r.stroke,n.length=10e.id===i)?(n.id=i,n.isUserDefinedId=!0):0===(t=this.edges.filter(e=>e.start===n.start&&e.end===n.end)).length?n.id=cC(n.start,n.end,{counter:0,prefix:"L"}):n.id=cC(n.start,n.end,{counter:t.length+1,prefix:"L"}),!(this.edges.length<(this.config.maxEdges??500)))throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.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.`);M.info("Pushing edge..."),this.edges.push(n)}isLinkData(e){return null!==e&&"object"==typeof e&&"id"in e&&"string"==typeof e.id}addLink(e,t,r){var i,n=this.isLinkData(r)?r.id.replace("@",""):void 0;M.info("addLink",e,t,n);for(i of e)for(var a of t){var s=i===e[e.length-1],o=a===t[0];s&&o?this.addSingleLink(i,a,r,n):this.addSingleLink(i,a,r,void 0)}}updateLinkInterpolate(e,t){e.forEach(e=>{"default"===e?this.edges.defaultInterpolate=t:this.edges[e].interpolate=t})}updateLink(e,t){e.forEach(e=>{if("number"==typeof e&&e>=this.edges.length)throw new Error(`The index ${e} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);"default"===e?this.edges.defaultStyle=t:(this.edges[e].style=t,0<(this.edges[e]?.style?.length??0)&&!this.edges[e]?.style?.some(e=>e?.startsWith("fill"))&&this.edges[e]?.style?.push("fill:none"))})}addClass(e,t){let i=t.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");e.split(",").forEach(e=>{let r=this.classes.get(e);void 0===r&&(r={id:e,styles:[],textStyles:[]},this.classes.set(e,r)),i?.forEach(e=>{var t;/color/.exec(e)&&(t=e.replace("fill","bgFill"),r.textStyles.push(t)),r.styles.push(e)})})}setDirection(e){this.direction=e.trim(),/.*/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),"TD"===this.direction&&(this.direction="TB")}setClass(e,r){for(let t of e.split(",")){var i=this.vertices.get(t);i&&i.classes.push(r),(i=this.edges.find(e=>e.id===t))&&i.classes.push(r),(i=this.subGraphLookup.get(t))&&i.classes.push(r)}}setTooltip(e,t){if(void 0!==t){t=this.sanitizeText(t);for(var r of e.split(","))this.tooltips.set("gen-1"===this.version?this.lookUpDomId(r):r,t)}}setClickFun(e,t,i){let n=this.lookUpDomId(e);if("loose"===O().securityLevel&&void 0!==t){let r=[];if("string"==typeof i){r=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t{var e=document.querySelector(`[id="${n}"]`);null!==e&&e.addEventListener("click",()=>{sC.runFunc(t,...r)},!1)}))}}setLink(e,t,r){e.split(",").forEach(e=>{void 0!==(e=this.vertices.get(e))&&(e.link=sC.formatUrl(t,this.config),e.linkTarget=r)}),this.setClass(e,"clickable")}getTooltip(e){return this.tooltips.get(e)}setClickEvent(e,t,r){e.split(",").forEach(e=>{this.setClickFun(e,t,r)}),this.setClass(e,"clickable")}bindFunctions(t){this.funs.forEach(e=>{e(t)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(e){let i=PT();V(e).select("svg").selectAll("g.node").on("mouseover",e=>{var t=V(e.currentTarget),r=t.attr("title");null!==r&&(e=e.currentTarget?.getBoundingClientRect(),i.transition().duration(200).style("opacity",".9"),i.text(t.attr("title")).style("left",window.scrollX+e.left+(e.right-e.left)/2+"px").style("top",window.scrollY+e.bottom+"px"),i.html(dn.sanitize(r)),t.classed("hover",!0))}).on("mouseout",e=>{i.transition().duration(500).style("opacity",0),V(e.currentTarget).classed("hover",!1)})}clear(e="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=O(),xh()}setGen(e){this.version=e||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(e,t,r){let i=e.text.trim(),n=r.text;e===r&&/\s/.exec(r.text)&&(i=void 0);var a=(e=mt(e=>{let r={boolean:{},number:{},string:{}},i=[],n;return{nodeList:e.filter(function(e){var t=typeof e;return e.stmt&&"dir"===e.stmt?(n=e.value,!1):""!==e.trim()&&(t in r?!r[t].hasOwnProperty(e)&&(r[t][e]=!0):!i.includes(e)&&i.push(e))}),dir:n}},"uniq")(t.flat())).nodeList,t=e.dir,e=O().flowchart??{},t=t??(e.inheritDir?this.getDirection()??O().direction??void 0:void 0);if("gen-1"===this.version)for(let e=0;e":i="arrow_point",t.startsWith("<")&&(i="double_"+i,r=r.slice(1));break;case"o":i="arrow_circle",t.startsWith("o")&&(i="double_"+i,r=r.slice(1))}let n="normal",a=r.length-1;return r.startsWith("=")&&(n="thick"),r.startsWith("~")&&(n="invisible"),(e=this.countChar(".",r))&&(n="dotted",a=e),{type:i,stroke:n,length:a}}destructLink(e,t){if(e=this.destructEndLink(e),t){if((t=this.destructStartLink(t)).stroke!==e.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===t.type)t.type=e.type;else{if(t.type!==e.type)return{type:"INVALID",stroke:"INVALID"};t.type="double_"+t.type}return"double_arrow"===t.type&&(t.type="double_arrow_point"),t.length=e.length,t}return e}exists(e,t){for(var r of e)if(r.nodes.includes(t))return!0;return!1}makeUniq(r,i){let n=[];return r.nodes.forEach((e,t)=>{this.exists(i,e)||n.push(r.nodes[t])}),{nodes:n}}getTypeFromVertex(e){if(e.img)return"imageSquare";if(e.icon)return"circle"===e.form?"iconCircle":"square"===e.form?"iconSquare":"rounded"===e.form?"iconRounded":"icon";switch(e.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return e.type}}findNode(e,t){return e.find(e=>e.id===t)}destructEdgeType(e){let t="none",r="arrow_point";switch(e){case"arrow_point":case"arrow_circle":case"arrow_cross":r=e;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":t=e.replace("double_",""),r=t}return{arrowTypeStart:t,arrowTypeEnd:r}}addNodeFromVertex(e,t,r,i,n,a){var r=r.get(e.id),i=i.get(e.id)??!1,s=this.findNode(t,e.id);s?(s.cssStyles=e.styles,s.cssCompiledStyles=this.getCompiledStyles(e.classes),s.cssClasses=e.classes.join(" ")):(s={id:e.id,label:e.text,labelType:e.labelType,labelStyle:"",parentId:r,padding:n.flowchart?.padding||8,cssStyles:e.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...e.classes]),cssClasses:"default "+e.classes.join(" "),dir:e.dir,domId:e.domId,look:a,link:e.link,linkTarget:e.linkTarget,tooltip:this.getTooltip(e.id),icon:e.icon,pos:e.pos,img:e.img,assetWidth:e.assetWidth,assetHeight:e.assetHeight,constraint:e.constraint},i?t.push({...s,isGroup:!0,shape:"rect"}):t.push({...s,isGroup:!1,shape:this.getTypeFromVertex(e)}))}getCompiledStyles(e){let t=[];for(var r of e)(r=this.classes.get(r))?.styles&&(t=[...t,...r.styles??[]].map(e=>e.trim())),r?.textStyles&&(t=[...t,...r.textStyles??[]].map(e=>e.trim()));return t}getData(){let a=O(),t=[],s=[],r=this.getSubGraphs(),i=new Map,n=new Map;for(let e=r.length-1;0<=e;e--){var o,l=r[e];0{this.addNodeFromVertex(e,t,i,n,a,a.look||"classic")});let h=this.getEdges();return h.forEach((e,t)=>{var{arrowTypeStart:r,arrowTypeEnd:i}=this.destructEdgeType(e.type),n=[...h.defaultStyle??[]],t=(e.style&&n.push(...e.style),{id:cC(e.start,e.end,{counter:t,prefix:"L"},e.id),isUserDefinedId:e.isUserDefinedId,start:e.start,end:e.end,type:e.type??"normal",label:e.text,labelType:e.labelType,labelpos:"c",thickness:e.stroke,minlen:e.length,classes:"invisible"===e?.stroke?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:"invisible"===e?.stroke||"arrow_open"===e?.type?"none":r,arrowTypeEnd:"invisible"===e?.stroke||"arrow_open"===e?.type?"none":i,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(e.classes),labelStyle:n,style:n,pattern:e.stroke,look:a.look,animate:e.animate,animation:e.animation,curve:e.interpolate||this.edges.defaultInterpolate||a.flowchart?.curve});s.push(t)}),{nodes:t,edges:s,other:{},config:a}}defaultConfig(){return Lh.flowchart}}}),gO=s(()=>{hw(),eO=mt((e,t)=>{let r;return"sandbox"===t&&(r=V("#i"+e)),V("sandbox"===t?r.nodes()[0].contentDocument.body:"body").select(`[id="${e}"]`)},"getDiagramElement")}),fO=s(()=>{tO=mt(({flowchart:e})=>{var t=e?.subGraphTitleMargin?.top??0;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:e=e?.subGraphTitleMargin?.bottom??0,subGraphTitleTotalMargin:t+e}},"getSubGraphTitleMargins")}),mO=s(()=>{Au(),li(),e(),fO(),hw(),ZN(),lL(),UL(),$D(),QI(),jL(),rO=mt(async(i,n)=>{M.info("Creating subgraph rect for ",n.id,n);let e=O(),{themeVariables:t,handDrawnSeed:a}=e,{clusterBkg:s,clusterBorder:o}=t,{labelStyles:r,nodeStyles:l,borderStyles:c,backgroundStyles:h}=Q(n),u=i.insert("g").attr("class","cluster "+n.cssClasses).attr("id",n.id).attr("data-look",n.look),d=vr(e),p=u.insert("g").attr("class","cluster-label "),g,f=(g="markdown"===n.labelType?await oL(p,n.label,{style:n.labelStyle,useHtmlLabels:d,isNode:!0,width:n.width}):await OD(p,n.label,n.labelStyle||"",!1,!0)).getBBox();vr(e)&&(i=g.children[0],m=V(g),f=i.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height));var i=n.width<=f.width+n.padding?f.width+n.padding:n.width,m=(n.width<=f.width+n.padding?n.diff=(i-n.width)/2-n.padding:n.diff=-n.padding,n.height),y=n.x-i/2,v=n.y-m/2;M.trace("Data ",n,JSON.stringify(n));let b;if("handDrawn"===n.look){let e=KN.svg(u),t=FL(n,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:a}),r=e.path(KI(y,v,i,m,0),t);(b=u.insert(()=>(M.debug("Rough node insert CXC",r),r),":first-child")).select("path:nth-child(2)").attr("style",c.join(";")),b.select("path").attr("style",h.join(";").replace("fill","stroke"))}else(b=u.insert("rect",":first-child")).attr("style",l).attr("rx",n.rx).attr("ry",n.ry).attr("x",y).attr("y",v).attr("width",i).attr("height",m);return y=tO(e).subGraphTitleTopMargin,p.attr("transform",`translate(${n.x-f.width/2}, ${n.y-n.height/2+y})`),r&&(v=p.select("span"))&&v.attr("style",r),i=b.node().getBBox(),n.offsetX=0,n.width=i.width,n.height=i.height,n.offsetY=f.height-n.padding/2,n.intersect=function(e){return ML(n,e)},{cluster:u,labelBBox:f}},"rect"),iO=mt((e,t)=>{var r=(e=e.insert("g").attr("class","note-cluster").attr("id",t.id)).insert("rect",":first-child"),i=0*t.padding,n=i/2,n=(r.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-n).attr("y",t.y-t.height/2-n).attr("width",t.width+i).attr("height",t.height+i).attr("fill","none"),r.node().getBBox());return t.width=n.width,t.height=n.height,t.intersect=function(e){return ML(t,e)},{cluster:e,labelBBox:{width:0,height:0}}},"noteGroup"),nO=mt(async(n,a)=>{let e=O(),{themeVariables:t,handDrawnSeed:s}=e,{altBackground:o,compositeBackground:l,compositeTitleBackground:c,nodeBorder:h}=t,u=n.insert("g").attr("class",a.cssClasses).attr("id",a.id).attr("data-id",a.id).attr("data-look",a.look),r=u.insert("g",":first-child"),i=u.insert("g").attr("class","cluster-label"),d=u.append("rect"),p=await OD(i,a.label,a.labelStyle,void 0,!0),g=p.getBBox();vr(e)&&(n=p.children[0],f=V(p),g=n.getBoundingClientRect(),f.attr("width",g.width),f.attr("height",g.height));var f=(n=0*a.padding)/2,m=(a.width<=g.width+a.padding?g.width+a.padding:a.width)+n,y=(a.width<=g.width+a.padding?a.diff=(m-a.width)/2-a.padding:a.diff=-a.padding,a.height+n),n=a.height+n-g.height-6,v=a.x-m/2,b=a.y-y/2;a.width=m;let x=a.y-a.height/2-f+g.height+2,T;if("handDrawn"===a.look){let e=a.cssClasses.includes("statediagram-cluster-alt"),t=KN.svg(u),r=a.rx||a.ry?t.path(KI(v,b,m,y,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:h,seed:s}):t.rectangle(v,b,m,y,{seed:s}),i=(T=u.insert(()=>r,":first-child"),t.rectangle(v,x,m,n,{fill:e?o:l,fillStyle:e?"hachure":"solid",stroke:h,seed:s}));T=u.insert(()=>r,":first-child"),d=u.insert(()=>i)}else(T=r.insert("rect",":first-child")).attr("class","outer").attr("x",v).attr("y",b).attr("width",m).attr("height",y).attr("data-look",a.look),d.attr("class","inner").attr("x",v).attr("y",x).attr("width",m).attr("height",n);return i.attr("transform",`translate(${a.x-g.width/2}, ${1+b-(vr(e)?0:3)})`),f=T.node().getBBox(),a.height=f.height,a.offsetX=0,a.offsetY=g.height-a.padding/2,a.labelBBox=g,a.intersect=function(e){return ML(a,e)},{cluster:u,labelBBox:g}},"roundedWithTitle"),aO=mt(async(i,n)=>{M.info("Creating subgraph rect for ",n.id,n);let e=O(),{themeVariables:t,handDrawnSeed:a}=e,{clusterBkg:s,clusterBorder:o}=t,{labelStyles:r,nodeStyles:l,borderStyles:c,backgroundStyles:h}=Q(n),u=i.insert("g").attr("class","cluster "+n.cssClasses).attr("id",n.id).attr("data-look",n.look),d=vr(e),p=u.insert("g").attr("class","cluster-label "),g=await oL(p,n.label,{style:n.labelStyle,useHtmlLabels:d,isNode:!0,width:n.width}),f=g.getBBox();vr(e)&&(i=g.children[0],m=V(g),f=i.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height));var i=n.width<=f.width+n.padding?f.width+n.padding:n.width,m=(n.width<=f.width+n.padding?n.diff=(i-n.width)/2-n.padding:n.diff=-n.padding,n.height),y=n.x-i/2,v=n.y-m/2;M.trace("Data ",n,JSON.stringify(n));let b;if("handDrawn"===n.look){let e=KN.svg(u),t=FL(n,{roughness:.7,fill:s,stroke:o,fillWeight:4,seed:a}),r=e.path(KI(y,v,i,m,n.rx),t);(b=u.insert(()=>(M.debug("Rough node insert CXC",r),r),":first-child")).select("path:nth-child(2)").attr("style",c.join(";")),b.select("path").attr("style",h.join(";").replace("fill","stroke"))}else(b=u.insert("rect",":first-child")).attr("style",l).attr("rx",n.rx).attr("ry",n.ry).attr("x",y).attr("y",v).attr("width",i).attr("height",m);return y=tO(e).subGraphTitleTopMargin,p.attr("transform",`translate(${n.x-f.width/2}, ${n.y-n.height/2+y})`),r&&(v=p.select("span"))&&v.attr("style",r),i=b.node().getBBox(),n.offsetX=0,n.width=i.width,n.height=i.height,n.offsetY=f.height-n.padding/2,n.intersect=function(e){return ML(n,e)},{cluster:u,labelBBox:f}},"kanbanSection"),sO=mt((t,r)=>{var{themeVariables:i,handDrawnSeed:n}=O(),i=i.nodeBorder,e=(t=t.insert("g").attr("class",r.cssClasses).attr("id",r.id).attr("data-look",r.look)).insert("g",":first-child"),a=0*r.padding,s=r.width+a,a=(r.diff=-r.padding,r.height+a),o=r.x-s/2,l=r.y-a/2;r.width=s;let c;if("handDrawn"===r.look){let e=KN.svg(t).rectangle(o,l,s,a,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:i,seed:n});c=t.insert(()=>e,":first-child")}else(c=e.insert("rect",":first-child")).attr("class","divider").attr("x",o).attr("y",l).attr("width",s).attr("height",a).attr("data-look",r.look);return i=c.node().getBBox(),r.height=i.height,r.offsetX=0,r.offsetY=0,r.intersect=function(e){return ML(r,e)},{cluster:t,labelBBox:{}}},"divider"),oO={rect:rO,squareRect:rO,roundedWithTitle:nO,noteGroup:iO,divider:sO,kanbanSection:aO},lO=new Map,cO=mt(async(e,t)=>{var r=t.shape||"rect",r=await oO[r](e,t);return lO.set(t.id,r),r},"insertCluster"),hO=mt(()=>{lO=new Map},"clear")}),yO=s(()=>{uO=mt((e,t)=>t?"translate("+-e.width/2+", "+-e.height/2+")":"translate("+-((e.x??0)+e.width/2)+", "+-((e.y??0)+e.height/2)+")","computeLabelTransform")});function vO(e,t){if(void 0===e||void 0===t)return{angle:0,deltaX:0,deltaY:0};e=TO(e),t=TO(t);var[e,r]=[e.x,e.y],[t,i]=[t.x,t.y],t=t-e,e=i-r;return{angle:Math.atan(e/t),deltaX:t,deltaY:e}}var bO,xO,TO,wO,kO,EO,_O,SO=s(()=>{bO={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},xO={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5},mt(vO,"calculateDeltaAndAngle"),TO=mt(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),wO=mt(c=>({x:mt(function(e,t,r){let i=0,n=TO(r[0]).x{e(),kO=mt((e,t,r,i,n,a)=>{t.arrowTypeStart&&_O(e,"start",t.arrowTypeStart,r,i,n,a),t.arrowTypeEnd&&_O(e,"end",t.arrowTypeEnd,r,i,n,a)},"addEdgeMarkers"),EO={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},_O=mt((e,t,r,i,n,a,s)=>{let o=EO[r],l,c;o?(n=n+`_${a}-`+o.type+("start"===t?"Start":"End"),s&&""!==s.trim()?(a=n+"_"+s.replace(/[^\dA-Za-z]/g,"_"),document.getElementById(a)||(l=document.getElementById(n))&&((c=l.cloneNode(!0)).id=a,c.querySelectorAll("path, circle, line").forEach(e=>{e.setAttribute("stroke",s),o.fill&&e.setAttribute("fill",s)}),l.parentNode?.appendChild(c)),e.attr("marker-"+t,`url(${i}#${a})`)):e.attr("marker-"+t,`url(${i}#${n})`)):M.warn("Unknown arrow type: "+r)},"addEdgeMarker")});function AO(e,t){vr(O())&&e&&(e.style.width=9*t.length+"px",e.style.height="12px")}function RO(t){var r=[],i=[];for(let e=1;e({...e})),s=(2<=e.length&&bO[t.arrowTypeStart]&&(n=bO[t.arrowTypeStart],s=NO(i=e[0],e[1]).angle,r=n*Math.cos(s),n*=Math.sin(s),a[0].x=i.x+r,a[0].y=i.y+n),e.length);return 2<=s&&bO[t.arrowTypeEnd]&&(r=bO[t.arrowTypeEnd],i=e[s-1],n=NO(e[s-2],i).angle,t=r*Math.cos(n),e=r*Math.sin(n),a[s-1].x=i.x-t,a[s-1].y=i.y-e),a}var DO,MO,OO,PO,$O,BO,FO,zO,qO,UO,GO,jO,WO,YO,VO,HO,XO,KO,ZO,QO,JO,eP,tP,rP,iP,nP,aP,sP,oP,lP,cP,hP,uP=s(()=>{Au(),li(),e(),lL(),yO(),hC(),SO(),fO(),hw(),ZN(),$D(),CO(),jL(),DO=mt(e=>"string"==typeof e?e:O()?.flowchart?.curve,"resolveEdgeCurveType"),MO=new Map,OO=new Map,PO=mt(()=>{MO.clear(),OO.clear()},"clear"),$O=mt(e=>e?"string"==typeof e?e:e.reduce((e,t)=>e+";"+t,""):"","getLabelStyles"),BO=mt(async(t,r)=>{var i=O(),n=vr(i),a=Q(r).labelStyles,s=(r.labelStyle=a,(a=t.insert("g").attr("class","edgeLabel")).insert("g").attr("class","label").attr("data-id",r.id)),e="markdown"===r.labelType,e=await oL(t,r.label,{style:$O(r.labelStyle),useHtmlLabels:n,addSvgBackground:!0,isNode:!1,markdown:e,width:void 0},i);s.node().appendChild(e),M.info("abc82",r,r.labelType);let o=e.getBBox(),l=o;n?(i=e.children[0],h=V(e),o=i.getBoundingClientRect(),l=o,h.attr("width",o.width),h.attr("height",o.height)):(i=V(e).select("text").node())&&"function"==typeof i.getBBox&&(l=i.getBBox()),s.attr("transform",uO(l,n)),MO.set(r.id,a),r.width=o.width,r.height=o.height;let c;if(r.startLabelLeft){var h=t.insert("g").attr("class","edgeTerminals"),i=h.insert("g").attr("class","inner"),s=await OD(i,r.startLabelLeft,$O(r.labelStyle)||"",!1,!1);let e=(c=s).getBBox();n&&(a=s.children[0],s=V(s),e=a.getBoundingClientRect(),s.attr("width",e.width),s.attr("height",e.height)),i.attr("transform",uO(e,n)),OO.get(r.id)||OO.set(r.id,{}),OO.get(r.id).startLeft=h,AO(c,r.startLabelLeft)}if(r.startLabelRight){s=(a=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),i=await OD(s,r.startLabelRight,$O(r.labelStyle)||"",!1,!1),c=i,s.node().appendChild(i);let e=i.getBBox();n&&(h=i.children[0],i=V(i),e=h.getBoundingClientRect(),i.attr("width",e.width),i.attr("height",e.height)),s.attr("transform",uO(e,n)),OO.get(r.id)||OO.set(r.id,{}),OO.get(r.id).startRight=a,AO(c,r.startLabelRight)}if(r.endLabelLeft){i=(h=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),s=await OD(i,r.endLabelLeft,$O(r.labelStyle)||"",!1,!1);let e=(c=s).getBBox();n&&(a=s.children[0],u=V(s),e=a.getBoundingClientRect(),u.attr("width",e.width),u.attr("height",e.height)),i.attr("transform",uO(e,n)),h.node().appendChild(s),OO.get(r.id)||OO.set(r.id,{}),OO.get(r.id).endLeft=h,AO(c,r.endLabelLeft)}if(r.endLabelRight){var u=(a=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),i=await OD(u,r.endLabelRight,$O(r.labelStyle)||"",!1,!1);let e=(c=i).getBBox();n&&(s=i.children[0],h=V(i),e=s.getBoundingClientRect(),h.attr("width",e.width),h.attr("height",e.height)),u.attr("transform",uO(e,n)),a.node().appendChild(i),OO.get(r.id)||OO.set(r.id,{}),OO.get(r.id).endRight=a,AO(c,r.endLabelRight)}return e},"insertEdgeLabel"),mt(AO,"setTerminalWidth"),FO=mt((i,n)=>{M.debug("Moving label abc88 ",i.id,i.label,MO.get(i.id),n);var a,s=n.updatedPath||n.originalPath,o=O(),o=tO(o).subGraphTitleTotalMargin;if(i.label){let e=MO.get(i.id),t=i.x,r=i.y;s&&(a=sC.calcLabelPosition(s),M.debug("Moving label "+i.label+" from (",t,",",r,") to (",a.x,",",a.y,") abc88"),n.updatedPath)&&(t=a.x,r=a.y),e.attr("transform",`translate(${t}, ${r+o/2})`)}if(i.startLabelLeft){let e=OO.get(i.id).startLeft,t=i.x,r=i.y;s&&(n=sC.calcTerminalLabelPosition(i.arrowTypeStart?10:0,"start_left",s),t=n.x,r=n.y),e.attr("transform",`translate(${t}, ${r})`)}if(i.startLabelRight){let e=OO.get(i.id).startRight,t=i.x,r=i.y;s&&(a=sC.calcTerminalLabelPosition(i.arrowTypeStart?10:0,"start_right",s),t=a.x,r=a.y),e.attr("transform",`translate(${t}, ${r})`)}if(i.endLabelLeft){let e=OO.get(i.id).endLeft,t=i.x,r=i.y;s&&(o=sC.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_left",s),t=o.x,r=o.y),e.attr("transform",`translate(${t}, ${r})`)}if(i.endLabelRight){let e=OO.get(i.id).endRight,t=i.x,r=i.y;s&&(n=sC.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_right",s),t=n.x,r=n.y),e.attr("transform",`translate(${t}, ${r})`)}},"positionEdgeLabel"),zO=mt((e,t)=>{var r=e.x,i=e.y,r=Math.abs(t.x-r),t=Math.abs(t.y-i);return e.width/2<=r||e.height/2<=t},"outsideNode"),qO=mt((e,i,n)=>{M.debug(`intersection calc abc89: outsidePoint: ${JSON.stringify(i)} insidePoint : ${JSON.stringify(n)} node : x:${e.x} y:${e.y} w:${e.width} h:`+e.height);let a=e.x,t=e.y,r=Math.abs(a-n.x),s=e.width/2,o=n.xMath.abs(a-i.x)*l)return e=n.y{M.warn("abc88 cutPathAtIntersect",e,i);let n=[],a=e[0],s=!1;return e.forEach(e=>{if(M.info("abc88 checking point",e,i),zO(i,e)||s)M.warn("abc88 outside",e,a),a=e,s||n.push(e);else{let t=qO(i,a,e),r=(M.debug("abc88 inside",e,a,t),M.debug("abc88 intersection",t,i),!1);n.forEach(e=>{r=r||e.x===t.x&&e.y===t.y}),n.some(e=>e.x===t.x&&e.y===t.y)?M.warn("abc88 no intersect",t,n):n.push(t),s=!0}}),M.debug("returning points",n),n},"cutPathAtIntersect"),mt(RO,"extractCornerPoints"),GO=mt(function(e,t,r){var i=t.x-e.x,e=t.y-e.y,r=r/Math.sqrt(i*i+e*e);return{x:t.x-r*i,y:t.y-r*e}},"findAdjacentPoint"),jO=mt(function(i){var e=RO(i).cornerPointPositions,n=[];for(let r=0;r(e=Math.floor((e-t-r)/4),`0 ${t} ${Array(e).fill("2 2").join(" ")} `+r),"generateDashArray"),YO=mt(function(t,e,r,i,n,a,s,o=!1){let l=O().handDrawnSeed,c=e.points,h=!1,u=n,d=a;var p,g=[];for(p in e.cssCompiledStyles)BL(p)||g.push(e.cssCompiledStyles[p]);M.debug("UIO intersect check",e.points,d.x,u.x),d.intersect&&u.intersect&&!o&&((c=c.slice(1,e.points.length-1)).unshift(u.intersect(c[0])),M.debug("Last point UIO",e.start,"--\x3e",e.end,c[c.length-1],d,d.intersect(c[c.length-1])),c.push(d.intersect(c[c.length-1]))),n=btoa(JSON.stringify(c)),e.toCluster&&(M.info("to cluster abc88",r.get(e.toCluster)),c=UO(e.points,r.get(e.toCluster).node),h=!0),e.fromCluster&&(M.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(c,null,2)),c=UO(c.reverse(),r.get(e.fromCluster).node).reverse(),h=!0);let f=c.filter(e=>!Number.isNaN(e.y)),m=DO(e.curve),y=("rounded"!==m&&(f=jO(f)),r3);switch(m){case"linear":y=r3;break;case"basis":y=k3;break;case"cardinal":y=P3;break;case"bumpX":y=f3;break;case"bumpY":y=m3;break;case"catmullRom":y=Y3;break;case"monotoneX":y=hT;break;case"monotoneY":y=uT;break;case"natural":y=fT;break;case"step":y=vT;break;case"stepAfter":y=xT;break;case"stepBefore":y=bT;break;case"rounded":y=r3;break;default:y=k3}let{x:v,y:b}=wO(e),x=o3().x(v).y(b).curve(y),T;switch(e.thickness){case"normal":T="edge-thickness-normal";break;case"thick":T="edge-thickness-thick";break;case"invisible":T="edge-thickness-invisible";break;default:T="edge-thickness-normal"}switch(e.pattern){case"solid":T+=" edge-pattern-solid";break;case"dotted":T+=" edge-pattern-dotted";break;case"dashed":T+=" edge-pattern-dashed";break;default:T+=" edge-pattern-solid"}let w,k="rounded"===m?LO(IO(f,e),5):x(f),E=Array.isArray(e.style)?e.style:[e.style],_=E.find(e=>e?.startsWith("stroke:")),S="",C=(e.animate&&(S="edge-animation-fast"),e.animation&&(S="edge-animation-"+e.animation),"handDrawn"===e.look?(a=KN.svg(t),Object.assign([],f),o=a.path(k,{roughness:.3,seed:l}),T+=" transition",r=(w=V(o).select("path").attr("id",e.id).attr("class"," "+T+(e.classes?" "+e.classes:"")+(S?" "+S:"")).attr("style",E?E.reduce((e,t)=>e+";"+t,""):"")).attr("d"),w.attr("d",r),t.node().appendChild(w.node())):(a=g.join(";"),o=E?E.reduce((e,t)=>e+t+";",""):"",r=(a?a+";"+o+";":o)+";"+(E?E.reduce((e,t)=>e+";"+t,""):""),w=t.append("path").attr("d",k).attr("id",e.id).attr("class"," "+T+(e.classes?" "+e.classes:"")+(S?" "+S:"")).attr("style",r),_=r.match(/stroke:([^;]+)/)?.[1],o=!0===e.animate||!!e.animation||a.includes("animation"),a="function"==typeof(r=w.node()).getTotalLength?r.getTotalLength():0,r=xO[e.arrowTypeStart]||0,A=xO[e.arrowTypeEnd]||0,"neo"!==e.look||o||(o=`stroke-dasharray: ${"dotted"===e.pattern||"dashed"===e.pattern?WO(a,r,A):`0 ${r} ${a-r-A} `+A}; stroke-dashoffset: 0;`,w.attr("style",o+w.attr("style")))),w.attr("data-edge",!0),w.attr("data-et","edge"),w.attr("data-id",e.id),w.attr("data-points",n),e.showPoints&&f.forEach(e=>{t.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",e.x).attr("cy",e.y)}),"");(O().flowchart.arrowMarkerAbsolute||O().state.arrowMarkerAbsolute)&&(C=(C=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(").replace(/\)/g,"\\)")),M.info("arrowTypeStart",e.arrowTypeStart),M.info("arrowTypeEnd",e.arrowTypeEnd),kO(w,e,C,s,i,_);var a=Math.floor(c.length/2),r=c[a],A={};return(h=!sC.isLabelCoordinateInPath(r,w.attr("d"))||h)&&(A.updatedPath=c),A.originalPath=e.points,A},"insertEdge"),mt(LO,"generateRoundedPath"),mt(NO,"calculateDeltaAndAngle"),mt(IO,"applyMarkerOffsetsToPoints")}),dP=s(()=>{e(),VO=mt((t,e,r,i)=>{e.forEach(e=>{cP[e](t,r,i)})},"insertMarkers"),HO=mt((e,t,r)=>{M.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),XO=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).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")},"composition"),KO=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).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")},"aggregation"),ZO=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).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")},"dependency"),QO=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),JO=mt((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),eP=mt((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),tP=mt((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),rP=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),iP=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),nP=mt((e,t,r)=>{var i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18"),(i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),i.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),aP=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),sP=mt((e,t,r)=>{var i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),(i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),i.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),oP=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0 L20,10 M20,10 L0,20`)},"requirement_arrow"),lP=mt((e,t,r)=>{(e=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g")).append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),e.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),e.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),cP={extension:HO,composition:XO,aggregation:KO,dependency:ZO,lollipop:QO,point:JO,circle:eP,cross:tP,barb:rP,only_one:iP,zero_or_one:nP,one_or_more:aP,zero_or_more:sP,requirement_arrow:oP,requirement_contains:lP},hP=VO});async function pP(t,r,i){let n,a;"rect"===r.shape&&(r.rx&&r.ry?r.shape="roundedRect":r.shape="squareRect");var s=r.shape?QM[r.shape]:void 0;if(!s)throw new Error(`No such shape: ${r.shape}. Please check your syntax.`);if(r.link){let e;"sandbox"===i.config.securityLevel?e="_top":r.linkTarget&&(e=r.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",r.link).attr("target",e??null),a=await s(n,r,i)}else a=await s(t,r,i),n=a;return r.tooltip&&a.attr("title",r.tooltip),gP.set(r.id,n),r.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}var gP,fP,mP,yP,vP,bP=s(()=>{e(),dO(),gP=new Map,mt(pP,"insertNode"),fP=mt((e,t)=>{gP.set(t.id,e)},"setNodeElem"),mP=mt(()=>{gP.clear()},"clear"),yP=mt(e=>{var t=gP.get(e.id),r=(M.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")"),e.diff||0);return e.clusterNode?t.attr("transform","translate("+(e.x+r-e.width/2)+", "+(e.y-e.height/2-8)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),r},"positionNode")}),xP=s(()=>{li(),zc(),e(),mO(),uP(),dP(),bP(),n(),hC(),vP={common:L,getConfig:cr,insertCluster:cO,insertEdge:YO,insertEdgeLabel:BO,insertMarkers:hP,insertNode:pP,interpolateToCurve:T7,labelHelper:gL,log:M,positionEdgeLabel:FO}});function TP(e){return"symbol"==typeof e||e_(e)&&"[object Symbol]"==Iw(e)}var wP,kP=s(()=>{Dw(),t_(),mt(TP,"isSymbol"),wP=TP});function EP(e,t){for(var r=-1,i=null==e?0:e.length,n=Array(i);++r{mt(EP,"arrayMap"),_P=EP});function CP(e){var t;return"string"==typeof e?e:c_(e)?_P(e,CP)+"":wP(e)?LP?LP.call(e):"":"0"==(t=e+"")&&1/e==-AP?"-0":t}var AP,RP,LP,NP,IP=s(()=>{yw(),SP(),d_(),kP(),AP=1/0,RP=aw?aw.prototype:void 0,LP=RP?RP.toString:void 0,mt(CP,"baseToString"),NP=CP});function DP(e){for(var t=e.length;t--&&MP.test(e.charAt(t)););return t}var MP,OP,PP=s(()=>{MP=/\s/,mt(DP,"trimmedEndIndex"),OP=DP});function $P(e){return e&&e.slice(0,OP(e)+1).replace(BP,"")}var BP,FP,zP=s(()=>{PP(),BP=/^\s+/,mt($P,"baseTrim"),FP=$P});function qP(e){if("number"==typeof e)return e;if(wP(e))return UP;if(Ow(e)&&(t="function"==typeof e.valueOf?e.valueOf():e,e=Ow(t)?t+"":t),"string"!=typeof e)return 0===e?e:+e;e=FP(e);var t=jP.test(e);return t||WP.test(e)?YP(e.slice(2),t?2:8):GP.test(e)?UP:+e}var UP,GP,jP,WP,YP,VP,HP=s(()=>{zP(),Pw(),kP(),UP=NaN,GP=/^[-+]0x[0-9a-f]+$/i,jP=/^0b[01]+$/i,WP=/^0o[0-7]+$/i,YP=parseInt,mt(qP,"toNumber"),VP=qP});function XP(e){return e?(e=VP(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}var KP,ZP=s(()=>{HP(),mt(XP,"toFinite"),KP=XP});function QP(e){var t=(e=KP(e))%1;return e==e?t?e-t:e:0}var JP,e$,t$,r$=s(()=>{ZP(),mt(QP,"toInteger"),JP=QP}),i$=s(()=>{pk(),mw(),e$=hk(iw,"WeakMap"),t$=e$});function n$(){}var a$,s$=s(()=>{mt(n$,"noop"),a$=n$});function o$(e,t){for(var r=-1,i=null==e?0:e.length;++r{mt(o$,"arrayEach"),l$=o$});function h$(e,t,r,i){for(var n=e.length,a=r+(i?1:-1);i?a--:++a{mt(h$,"baseFindIndex"),u$=h$});function p$(e){return e!=e}var g$,f$=s(()=>{mt(p$,"baseIsNaN"),g$=p$});function m$(e,t,r){for(var i=r-1,n=e.length;++i{mt(m$,"strictIndexOf"),y$=m$});function b$(e,t,r){return t==t?y$(e,t,r):u$(e,g$,r)}var x$,T$=s(()=>{d$(),f$(),v$(),mt(b$,"baseIndexOf"),x$=b$});function w$(e,t){return!(null==e||!e.length)&&-1{T$(),mt(w$,"arrayIncludes"),k$=w$}),C$=s(()=>{jE(),E$=qE(Object.keys,Object),_$=E$});function A$(e){if(!HE(e))return _$(e);var t,r=[];for(t in Object(e))L$.call(e,t)&&"constructor"!=t&&r.push(t);return r}var R$,L$,N$,I$=s(()=>{XE(),C$(),R$=Object.prototype,L$=R$.hasOwnProperty,mt(A$,"baseKeys"),N$=A$});function D$(e){return(y_(e)?bS:N$)(e)}var M$,O$,P$,$$,B$=s(()=>{xS(),I$(),v_(),mt(D$,"keys"),M$=D$}),F$=s(()=>{aS(),lS(),b7(),v_(),XE(),B$(),P$=Object.prototype,O$=P$.hasOwnProperty,P$=m7(function(e,t){if(HE(t)||y_(t))oS(t,M$(t),e);else for(var r in t)O$.call(t,r)&&nS(e,r,t[r])}),$$=P$});function z$(e,t){var r;return!c_(e)&&(!("number"!=(r=typeof e)&&"symbol"!=r&&"boolean"!=r&&null!=e&&!wP(e))||U$.test(e)||!q$.test(e)||null!=t&&e in Object(t))}var q$,U$,G$,j$=s(()=>{d_(),kP(),q$=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,U$=/^\w*$/,mt(z$,"isKey"),G$=z$});function W$(e){var t=(e=B6(e,function(e){return 500===t.size&&t.clear(),e})).cache;return e}var Y$,V$,H$,X$,K$,Z$=s(()=>{F6(),mt(W$,"memoizeCapped"),Y$=W$}),Q$=s(()=>{Z$(),V$=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,H$=/\\(\\)?/g,X$=Y$(function(e){var n=[];return 46===e.charCodeAt(0)&&n.push(""),e.replace(V$,function(e,t,r,i){n.push(r?i.replace(H$,"$1"):t||e)}),n}),K$=X$});function J$(e){return null==e?"":NP(e)}var eB,tB=s(()=>{IP(),mt(J$,"toString"),eB=J$});function rB(e,t){return c_(e)?e:G$(e,t)?[e]:K$(eB(e))}var iB,nB=s(()=>{d_(),j$(),Q$(),tB(),mt(rB,"castPath"),iB=rB});function aB(e){var t;return"string"==typeof e||wP(e)?e:"0"==(t=e+"")&&1/e==-1/0?"-0":t}var sB,oB=s(()=>{kP(),mt(aB,"toKey"),sB=aB});function lB(e,t){for(var r=0,i=(t=iB(t,e)).length;null!=e&&r{nB(),oB(),mt(lB,"baseGet"),cB=lB});function uB(e,t,r){return void 0===(e=null==e?void 0:cB(e,t))?r:e}var dB,pB=s(()=>{hB(),mt(uB,"get"),dB=uB});function gB(e,t){for(var r=-1,i=t.length,n=e.length;++r{mt(gB,"arrayPush"),fB=gB});function yB(e){return c_(e)||o_(e)||!!(vB&&e&&e[vB])}var vB,bB,xB=s(()=>{yw(),u_(),d_(),vB=aw?aw.isConcatSpreadable:void 0,mt(yB,"isFlattenable"),bB=yB});function TB(e,t,r,i,n){var a=-1,s=e.length;for(r=r||bB,n=n||[];++a{mB(),xB(),mt(TB,"baseFlatten"),wB=TB});function EB(e){return null!=e&&e.length?wB(e,1):[]}var _B,SB=s(()=>{kB(),mt(EB,"flatten"),_B=EB});function CB(e){return s7(XS(e,void 0,_B),e+"")}var AB,RB=s(()=>{SB(),KS(),l7(),mt(CB,"flatRest"),AB=CB});function LB(e,t,r){var i=-1,n=e.length;(r=n>>0,t>>>=0;for(var a=Array(n);++i{mt(LB,"baseSlice"),NB=LB});function DB(e){return MB.test(e)}var MB,OB,PB=s(()=>{MB=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),mt(DB,"hasUnicode"),OB=DB});function $B(e,t,r,i){var n=-1,a=null==e?0:e.length;for(i&&a&&(r=e[++n]);++n{mt($B,"arrayReduce"),BB=$B});function zB(e,t){return e&&oS(t,M$(t),e)}var qB,UB=s(()=>{lS(),B$(),mt(zB,"baseAssign"),qB=zB});function GB(e,t){return e&&oS(t,LS(t),e)}var jB,WB=s(()=>{lS(),NS(),mt(GB,"baseAssignIn"),jB=GB});function YB(e,t){for(var r=-1,i=null==e?0:e.length,n=0,a=[];++r{mt(YB,"arrayFilter"),VB=YB});function XB(){return[]}var KB,ZB,QB,JB,eF,tF=s(()=>{mt(XB,"stubArray"),KB=XB}),rF=s(()=>{HB(),tF(),ZB=Object.prototype,QB=ZB.propertyIsEnumerable,eF=(JB=Object.getOwnPropertySymbols)?function(t){return null==t?[]:(t=Object(t),VB(JB(t),function(e){return QB.call(t,e)}))}:KB});function iF(e,t){return oS(e,eF(e),t)}var nF,aF,sF,oF=s(()=>{lS(),rF(),mt(iF,"copySymbols"),nF=iF}),lF=s(()=>{mB(),WE(),rF(),tF(),aF=Object.getOwnPropertySymbols,sF=aF?function(e){for(var t=[];e;)fB(t,eF(e)),e=GE(e);return t}:KB});function cF(e,t){return oS(e,sF(e),t)}var hF,uF=s(()=>{lS(),lF(),mt(cF,"copySymbolsIn"),hF=cF});function dF(e,t,r){return t=t(e),c_(e)?t:fB(t,r(e))}var pF,gF=s(()=>{mB(),d_(),mt(dF,"baseGetAllKeys"),pF=dF});function fF(e){return pF(e,M$,eF)}var mF,yF=s(()=>{gF(),rF(),B$(),mt(fF,"getAllKeys"),mF=fF});function vF(e){return pF(e,LS,sF)}var bF,xF,TF,wF,kF,EF,_F,SF,CF,AF,RF,LF,NF,IF,DF,MF,OF,PF,$F,BF=s(()=>{gF(),lF(),NS(),mt(vF,"getAllKeysIn"),bF=vF}),FF=s(()=>{pk(),mw(),xF=hk(iw,"DataView"),TF=xF}),zF=s(()=>{pk(),mw(),wF=hk(iw,"Promise"),kF=wF}),qF=s(()=>{pk(),mw(),EF=hk(iw,"Set"),_F=EF}),UF=s(()=>{FF(),u6(),zF(),qF(),i$(),Dw(),Zw(),SF="[object Map]",CF="[object Promise]",AF="[object Set]",RF="[object WeakMap]",LF="[object DataView]",NF=Kw(TF),IF=Kw(c6),DF=Kw(kF),MF=Kw(_F),OF=Kw(t$),PF=Iw,(TF&&PF(new TF(new ArrayBuffer(1)))!=LF||c6&&PF(new c6)!=SF||kF&&PF(kF.resolve())!=CF||_F&&PF(new _F)!=AF||t$&&PF(new t$)!=RF)&&(PF=mt(function(e){var t=Iw(e);if(e=(e="[object Object]"==t?e.constructor:void 0)?Kw(e):"")switch(e){case NF:return LF;case IF:return SF;case DF:return CF;case MF:return AF;case OF:return RF}return t},"getTag")),$F=PF});function GF(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&WF.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var jF,WF,YF,VF=s(()=>{jF=Object.prototype,WF=jF.hasOwnProperty,mt(GF,"initCloneArray"),YF=GF});function HF(e,t){return t=t?RE(e.buffer):e.buffer,new e.constructor(t,e.byteOffset,e.byteLength)}var XF,KF=s(()=>{LE(),mt(HF,"cloneDataView"),XF=HF});function ZF(e){var t=new e.constructor(e.source,QF.exec(e));return t.lastIndex=e.lastIndex,t}var QF,JF,ez=s(()=>{QF=/\w*$/,mt(ZF,"cloneRegExp"),JF=ZF});function tz(e){return iz?Object(iz.call(e)):{}}var rz,iz,nz,az=s(()=>{yw(),rz=aw?aw.prototype:void 0,iz=rz?rz.valueOf:void 0,mt(tz,"cloneSymbol"),nz=tz});function sz(e,t,r){var i=e.constructor;switch(t){case"[object ArrayBuffer]":return RE(e);case"[object Boolean]":case"[object Date]":return new i(+e);case"[object DataView]":return XF(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return IE(e,r);case"[object Map]":return new i;case"[object Number]":case"[object String]":return new i(e);case"[object RegExp]":return JF(e);case"[object Set]":return new i;case"[object Symbol]":return nz(e)}}var oz,lz=s(()=>{LE(),KF(),ez(),az(),DE(),mt(sz,"initCloneByTag"),oz=sz});function cz(e){return e_(e)&&"[object Map]"==$F(e)}var hz,uz,dz,pz=s(()=>{UF(),t_(),mt(cz,"baseIsMap"),hz=cz}),gz=s(()=>{pz(),X_(),K_(),uz=(uz=Y_&&Y_.isMap)?U_(uz):hz,dz=uz});function fz(e){return e_(e)&&"[object Set]"==$F(e)}var mz,yz,vz,bz=s(()=>{UF(),t_(),mt(fz,"baseIsSet"),mz=fz}),xz=s(()=>{bz(),X_(),K_(),yz=(yz=Y_&&Y_.isSet)?U_(yz):mz,vz=yz});function Tz(r,i,n,e,t,a){var s,o=i&wz,l=i&kz,c=i&Ez;if(void 0===(s=n?t?n(r,e,t,a):n(r):s)){if(!Ow(r))return r;if(e=c_(r)){if(s=YF(r),!o)return OE(r,s)}else{var h=$F(r),u=h==Sz||h==Cz;if(S_(r))return kE(r,o);if(h==Az||h==_z||u&&!t){if(s=l||u?{}:ZE(r),!o)return l?hF(r,jB(s,r)):nF(r,qB(s,r))}else{if(!Rz[h])return t?r:{};s=oz(r,h,o)}}if(u=(a=a||new rE).get(r))return u;a.set(r,s),vz(r)?r.forEach(function(e){s.add(Tz(e,i,n,e,r,a))}):dz(r)&&r.forEach(function(e,t){s.set(t,Tz(e,i,n,t,r,a))});var d=e?void 0:(c?l?bF:mF:l?LS:M$)(r);l$(d||r,function(e,t){d&&(e=r[t=e]),nS(s,t,Tz(e,i,n,t,r,a))})}return s}var wz,kz,Ez,_z,Sz,Cz,Az,Rz,Lz,Nz=s(()=>{aE(),c$(),aS(),UB(),WB(),SE(),BE(),oF(),uF(),yF(),BF(),UF(),VF(),lz(),QE(),d_(),A_(),gz(),Pw(),xz(),B$(),NS(),wz=1,kz=2,Ez=4,Sz="[object Function]",Cz="[object GeneratorFunction]",Az="[object Object]",(Rz={})[_z="[object Arguments]"]=Rz["[object Array]"]=Rz["[object ArrayBuffer]"]=Rz["[object DataView]"]=Rz["[object Boolean]"]=Rz["[object Date]"]=Rz["[object Float32Array]"]=Rz["[object Float64Array]"]=Rz["[object Int8Array]"]=Rz["[object Int16Array]"]=Rz["[object Int32Array]"]=Rz["[object Map]"]=Rz["[object Number]"]=Rz[Az]=Rz["[object RegExp]"]=Rz["[object Set]"]=Rz["[object String]"]=Rz["[object Symbol]"]=Rz["[object Uint8Array]"]=Rz["[object Uint8ClampedArray]"]=Rz["[object Uint16Array]"]=Rz["[object Uint32Array]"]=!0,Rz["[object Error]"]=Rz[Sz]=Rz["[object WeakMap]"]=!1,mt(Tz,"baseClone"),Lz=Tz});function Iz(e){return Lz(e,4)}var Dz,Mz=s(()=>{Nz(),mt(Iz,"clone"),Dz=Iz});function Oz(e){return Lz(e,5)}var Pz,$z=s(()=>{Nz(),mt(Oz,"cloneDeep"),Pz=Oz});function Bz(e){for(var t=-1,r=null==e?0:e.length,i=0,n=[];++t{mt(Bz,"compact"),Fz=Bz});function qz(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}var Uz,Gz=s(()=>{mt(qz,"setCacheAdd"),Uz=qz});function jz(e){return this.__data__.has(e)}var Wz,Yz=s(()=>{mt(jz,"setCacheHas"),Wz=jz});function Vz(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new M6;++t{O6(),Gz(),Yz(),mt(Vz,"SetCache"),Vz.prototype.add=Vz.prototype.push=Uz,Vz.prototype.has=Wz,Hz=Vz});function Kz(e,t){for(var r=-1,i=null==e?0:e.length;++r{mt(Kz,"arraySome"),Zz=Kz});function Jz(e,t){return e.has(t)}var eq,tq=s(()=>{mt(Jz,"cacheHas"),eq=Jz});function rq(e,t,r,i,n,a){var s=1&r,o=e.length;if(o!=(l=t.length)&&!(s&&o{Xz(),Qz(),tq(),mt(rq,"equalArrays"),iq=rq});function aq(e){var r=-1,i=Array(e.size);return e.forEach(function(e,t){i[++r]=[t,e]}),i}var sq,oq=s(()=>{mt(aq,"mapToArray"),sq=aq});function lq(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var cq,hq=s(()=>{mt(lq,"setToArray"),cq=lq});function uq(e,t,r,i,n,a,s){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!a(new _E(e),new _E(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return qk(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var o=sq;case"[object Set]":var l,o=o||cq;return!!(e.size==t.size||1&i)&&((l=s.get(e))?l==t:(i|=2,s.set(e,t),l=iq(o(e),o(t),i,n,a,s),s.delete(e),l));case"[object Symbol]":if(pq)return pq.call(e)==pq.call(t)}return!1}var dq,pq,gq,fq=s(()=>{yw(),CE(),Uk(),nq(),oq(),hq(),dq=aw?aw.prototype:void 0,pq=dq?dq.valueOf:void 0,mt(uq,"equalByTag"),gq=uq});function mq(e,t,r,i,n,a){var s=1&r,o=mF(e),l=o.length;if(l!=mF(t).length&&!s)return!1;for(var c=l;c--;){var h=o[c];if(!(s?h in t:vq.call(t,h)))return!1}var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var p=!0;a.set(e,t),a.set(t,e);for(var g=s;++c{yF(),yq=Object.prototype,vq=yq.hasOwnProperty,mt(mq,"equalObjects"),bq=mq});function Tq(e,t,r,i,n,a){var s=c_(e),o=c_(t),l=s?kq:$F(e),o=o?kq:$F(t),c=(l=l==wq?Eq:l)==Eq,h=(o=o==wq?Eq:o)==Eq;if((o=l==o)&&S_(e)){if(!S_(t))return!1;c=!(s=!0)}return o&&!c?(a=a||new rE,s||H_(e)?iq(e,t,r,i,n,a):gq(e,t,l,r,i,n,a)):1&r||(s=c&&Sq.call(e,"__wrapped__"),l=h&&Sq.call(t,"__wrapped__"),!s&&!l)?o&&(a=a||new rE,bq(e,t,r,i,n,a)):n(s?e.value():e,l?t.value():t,r,i,a=a||new rE)}var wq,kq,Eq,_q,Sq,Cq,Aq=s(()=>{aE(),nq(),fq(),xq(),UF(),d_(),A_(),Z_(),wq="[object Arguments]",kq="[object Array]",Eq="[object Object]",_q=Object.prototype,Sq=_q.hasOwnProperty,mt(Tq,"baseIsEqualDeep"),Cq=Tq});function Rq(e,t,r,i,n){return e===t||(null==e||null==t||!e_(e)&&!e_(t)?e!=e&&t!=t:Cq(e,t,r,i,Rq,n))}var Lq,Nq=s(()=>{Aq(),t_(),mt(Rq,"baseIsEqual"),Lq=Rq});function Iq(e,t,r,i){var n=r.length,a=n,s=!i;if(null==e)return!a;for(e=Object(e);n--;){var o=r[n];if(s&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++n{aE(),Nq(),mt(Iq,"baseIsMatch"),Dq=Iq});function Oq(e){return e==e&&!Ow(e)}var Pq,$q=s(()=>{Pw(),mt(Oq,"isStrictComparable"),Pq=Oq});function Bq(e){for(var t=M$(e),r=t.length;r--;){var i=t[r],n=e[i];t[r]=[i,n,Pq(n)]}return t}var Fq,zq=s(()=>{$q(),B$(),mt(Bq,"getMatchData"),Fq=Bq});function qq(t,r){return function(e){return null!=e&&e[t]===r&&(void 0!==r||t in Object(e))}}var Uq,Gq=s(()=>{mt(qq,"matchesStrictComparable"),Uq=qq});function jq(t){var r=Fq(t);return 1==r.length&&r[0][2]?Uq(r[0][0],r[0][1]):function(e){return e===t||Dq(e,t,r)}}var Wq,Yq=s(()=>{Mq(),zq(),Gq(),mt(jq,"baseMatches"),Wq=jq});function Vq(e,t){return null!=e&&t in Object(e)}var Hq,Xq=s(()=>{mt(Vq,"baseHasIn"),Hq=Vq});function Kq(e,t,r){for(var i=-1,n=(t=iB(t,e)).length,a=!1;++i{nB(),u_(),d_(),fS(),f_(),oB(),mt(Kq,"hasPath"),Zq=Kq});function Jq(e,t){return null!=e&&Zq(e,t,Hq)}var eU,tU=s(()=>{Xq(),Qq(),mt(Jq,"hasIn"),eU=Jq});function rU(r,i){return G$(r)&&Pq(i)?Uq(sB(r),i):function(e){var t=dB(e,r);return void 0===t&&t===i?eU(e,r):Lq(i,t,3)}}var iU,nU=s(()=>{Nq(),pB(),tU(),j$(),$q(),Gq(),oB(),mt(rU,"baseMatchesProperty"),iU=rU});function aU(t){return function(e){return e?.[t]}}var sU,oU=s(()=>{mt(aU,"baseProperty"),sU=aU});function lU(t){return function(e){return cB(e,t)}}var cU,hU=s(()=>{hB(),mt(lU,"basePropertyDeep"),cU=lU});function uU(e){return G$(e)?sU(sB(e)):cU(e)}var dU,pU=s(()=>{oU(),hU(),j$(),oB(),mt(uU,"property"),dU=uU});function gU(e){return"function"==typeof e?e:null==e?US:"object"==typeof e?c_(e)?iU(e[0],e[1]):Wq(e):dU(e)}var fU,mU=s(()=>{Yq(),nU(),GS(),d_(),pU(),mt(gU,"baseIteratee"),fU=gU});function yU(e,t,r,i){for(var n=-1,a=null==e?0:e.length;++n{mt(yU,"arrayAggregator"),vU=yU});function xU(e,t){return e&&mE(e,t,M$)}var TU,wU=s(()=>{vE(),B$(),mt(xU,"baseForOwn"),TU=xU});function kU(a,s){return function(e,t){if(null!=e){if(!y_(e))return a(e,t);for(var r=e.length,i=s?r:-1,n=Object(e);(s?i--:++i{v_(),mt(kU,"createBaseEach"),EU=kU}),AU=s(()=>{wU(),CU(),_U=EU(TU),SU=_U});function RU(e,i,n,a){return SU(e,function(e,t,r){i(a,e,n(e),r)}),a}var LU,NU=s(()=>{AU(),mt(RU,"baseAggregator"),LU=RU});function IU(n,a){return function(e,t){var r=c_(e)?vU:LU,i=a?a():{};return r(e,n,fU(t,2),i)}}var DU,MU,OU,PU,$U,BU,FU,zU=s(()=>{bU(),NU(),mU(),d_(),mt(IU,"createAggregator"),DU=IU}),qU=s(()=>{mw(),MU=mt(function(){return iw.Date.now()},"now"),OU=MU}),UU=s(()=>{u7(),Uk(),g7(),NS(),PU=Object.prototype,$U=PU.hasOwnProperty,BU=h7(function(e,t){e=Object(e);var r=-1,i=t.length,n=2{mt(GU,"arrayIncludesWith"),jU=GU});function YU(e,t,r,i){var n=-1,a=k$,s=!0,o=e.length,l=[],c=t.length;if(o){r&&(t=_P(t,U_(r))),i?(a=jU,s=!1):200<=t.length&&(a=eq,s=!1,t=new Hz(t));e:for(;++n{Xz(),S$(),WU(),SP(),X_(),tq(),mt(YU,"baseDifference"),VU=YU}),ZU=s(()=>{KU(),kB(),u7(),T_(),HU=h7(function(e,t){return x_(e)?VU(e,wB(t,1,x_,!0)):[]}),XU=HU});function QU(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var JU,eG=s(()=>{mt(QU,"last"),JU=QU});function tG(e,t,r){var i=null==e?0:e.length;return i?(t=r||void 0===t?1:JP(t),NB(e,t<0?0:t,i)):[]}var rG,iG=s(()=>{IB(),r$(),mt(tG,"drop"),rG=tG});function nG(e,t,r){var i=null==e?0:e.length;return i?(t=r||void 0===t?1:JP(t),NB(e,0,(t=i-t)<0?0:t)):[]}var aG,sG=s(()=>{IB(),r$(),mt(nG,"dropRight"),aG=nG});function oG(e){return"function"==typeof e?e:US}var lG,cG=s(()=>{GS(),mt(oG,"castFunction"),lG=oG});function hG(e,t){return(c_(e)?l$:SU)(e,lG(t))}var v,uG=s(()=>{c$(),AU(),cG(),d_(),mt(hG,"forEach"),v=hG}),dG=s(()=>{uG()});function pG(e,t){for(var r=-1,i=null==e?0:e.length;++r{mt(pG,"arrayEvery"),gG=pG});function mG(e,i){var n=!0;return SU(e,function(e,t,r){return n=!!i(e,t,r)}),n}var yG,vG=s(()=>{AU(),mt(mG,"baseEvery"),yG=mG});function bG(e,t,r){var i=c_(e)?gG:yG;return r&&p7(e,t,r)&&(t=void 0),i(e,fU(t,3))}var xG,TG=s(()=>{fG(),vG(),mU(),d_(),g7(),mt(bG,"every"),xG=bG});function wG(e,i){var n=[];return SU(e,function(e,t,r){i(e,t,r)&&n.push(e)}),n}var kG,EG=s(()=>{AU(),mt(wG,"baseFilter"),kG=wG});function _G(e,t){return(c_(e)?VB:kG)(e,fU(t,3))}var SG,CG=s(()=>{HB(),EG(),mU(),d_(),mt(_G,"filter"),SG=_G});function AG(a){return function(e,t,r){var i,n=Object(e);return y_(e)||(i=fU(t,3),e=M$(e),t=mt(function(e){return i(n[e],e,n)},"predicate")),-1<(t=a(e,t,r))?n[i?e[t]:t]:void 0}}var RG,LG=s(()=>{mU(),v_(),B$(),mt(AG,"createFind"),RG=AG});function NG(e,t,r){var i=null==e?0:e.length;return i?((r=null==r?0:JP(r))<0&&(r=IG(i+r,0)),u$(e,fU(t,3),r)):-1}var IG,DG,MG,OG,PG=s(()=>{d$(),mU(),r$(),IG=Math.max,mt(NG,"findIndex"),DG=NG}),$G=s(()=>{LG(),PG(),MG=RG(DG),OG=MG});function BG(e){return e&&e.length?e[0]:void 0}var FG,zG=s(()=>{mt(BG,"head"),FG=BG}),qG=s(()=>{zG()});function UG(e,i){var n=-1,a=y_(e)?Array(e.length):[];return SU(e,function(e,t,r){a[++n]=i(e,t,r)}),a}var GG,jG=s(()=>{AU(),v_(),mt(UG,"baseMap"),GG=UG});function WG(e,t){return(c_(e)?_P:GG)(e,fU(t,3))}var b,YG=s(()=>{SP(),mU(),jG(),d_(),mt(WG,"map"),b=WG});function VG(e,t){return wB(b(e,t),1)}var HG,XG=s(()=>{kB(),YG(),mt(VG,"flatMap"),HG=VG});function KG(e,t){return null==e?e:mE(e,lG(t),LS)}var ZG,QG=s(()=>{vE(),cG(),NS(),mt(KG,"forIn"),ZG=KG});function JG(e,t){return e&&TU(e,lG(t))}var ej,tj,rj,ij,nj=s(()=>{wU(),cG(),mt(JG,"forOwn"),ej=JG}),aj=s(()=>{cE(),zU(),rj=Object.prototype,tj=rj.hasOwnProperty,rj=DU(function(e,t,r){tj.call(e,r)?e[r].push(t):lE(e,r,[t])}),ij=rj});function sj(e,t){return t{mt(sj,"baseGt"),oj=sj});function cj(e,t){return null!=e&&uj.call(e,t)}var hj,uj,dj,pj=s(()=>{hj=Object.prototype,uj=hj.hasOwnProperty,mt(cj,"baseHas"),dj=cj});function gj(e,t){return null!=e&&Zq(e,t,dj)}var fj,mj=s(()=>{pj(),Qq(),mt(gj,"has"),fj=gj});function yj(e){return"string"==typeof e||!c_(e)&&e_(e)&&"[object String]"==Iw(e)}var vj,bj=s(()=>{Dw(),d_(),t_(),mt(yj,"isString"),vj=yj});function xj(t,e){return _P(e,function(e){return t[e]})}var Tj,wj=s(()=>{SP(),mt(xj,"baseValues"),Tj=xj});function kj(e){return null==e?[]:Tj(e,M$(e))}var Ej,_j=s(()=>{wj(),B$(),mt(kj,"values"),Ej=kj});function Sj(e,t,r,i){return e=y_(e)?e:Ej(e),r=r&&!i?JP(r):0,i=e.length,r<0&&(r=Cj(i+r,0)),vj(e)?r<=i&&-1{T$(),v_(),bj(),r$(),_j(),Cj=Math.max,mt(Sj,"includes"),Aj=Sj});function Lj(e,t,r){var i=null==e?0:e.length;return i?((r=null==r?0:JP(r))<0&&(r=Nj(i+r,0)),x$(e,t,r)):-1}var Nj,Ij,Dj=s(()=>{T$(),r$(),Nj=Math.max,mt(Lj,"indexOf"),Ij=Lj});function Mj(e){if(null!=e){if(y_(e)&&(c_(e)||"string"==typeof e||"function"==typeof e.splice||S_(e)||H_(e)||o_(e)))return!e.length;var t,r=$F(e);if("[object Map]"==r||"[object Set]"==r)return!e.size;if(HE(e))return!N$(e).length;for(t in e)if(Pj.call(e,t))return!1}return!0}var Oj,Pj,$j,Bj=s(()=>{I$(),UF(),u_(),d_(),v_(),A_(),XE(),Z_(),Oj=Object.prototype,Pj=Oj.hasOwnProperty,mt(Mj,"isEmpty"),$j=Mj});function Fj(e){return e_(e)&&"[object RegExp]"==Iw(e)}var zj,qj,Uj,Gj=s(()=>{Dw(),t_(),mt(Fj,"baseIsRegExp"),zj=Fj}),jj=s(()=>{Gj(),X_(),K_(),qj=(qj=Y_&&Y_.isRegExp)?U_(qj):zj,Uj=qj});function Wj(e){return void 0===e}var Yj,Vj=s(()=>{mt(Wj,"isUndefined"),Yj=Wj});function Hj(e,t){return e{mt(Hj,"baseLt"),Xj=Hj});function Zj(e,i){var n={};return i=fU(i,3),TU(e,function(e,t,r){lE(n,t,i(e,t,r))}),n}var Qj,Jj=s(()=>{cE(),wU(),mU(),mt(Zj,"mapValues"),Qj=Zj});function eW(e,t,r){for(var i=-1,n=e.length;++i{kP(),mt(eW,"baseExtremum"),tW=eW});function iW(e){return e&&e.length?tW(e,US,oj):void 0}var nW,aW=s(()=>{rW(),lj(),GS(),mt(iW,"max"),nW=iW});function sW(e){return e&&e.length?tW(e,US,Xj):void 0}var oW,lW=s(()=>{rW(),Kj(),GS(),mt(sW,"min"),oW=sW});function cW(e,t){return e&&e.length?tW(e,fU(t,2),Xj):void 0}var hW,uW=s(()=>{rW(),mU(),Kj(),mt(cW,"minBy"),hW=cW});function dW(t){if("function"!=typeof t)throw new TypeError("Expected a function");return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}var pW,gW=s(()=>{mt(dW,"negate"),pW=dW});function fW(e,t,r,i){if(Ow(e))for(var n=-1,a=(t=iB(t,e)).length,s=a-1,o=e;null!=o&&++n{aS(),nB(),fS(),Pw(),oB(),mt(fW,"baseSet"),mW=fW});function vW(e,t,r){for(var i=-1,n=t.length,a={};++i{hB(),yW(),nB(),mt(vW,"basePickBy"),bW=vW});function TW(e,r){var t;return null==e?{}:(t=_P(bF(e),function(e){return[e]}),r=fU(r),bW(e,t,function(e,t){return r(e,t[0])}))}var wW,kW=s(()=>{SP(),mU(),xW(),BF(),mt(TW,"pickBy"),wW=TW});function EW(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var _W,SW=s(()=>{mt(EW,"baseSortBy"),_W=EW});function CW(e,t){if(e!==t){var r=void 0!==e,i=null===e,n=e==e,a=wP(e),s=void 0!==t,o=null===t,l=t==t,c=wP(t);if(!o&&!c&&!a&&t{kP(),mt(CW,"compareAscending"),AW=CW});function LW(e,t,r){for(var i=-1,n=e.criteria,a=t.criteria,s=n.length,o=r.length;++i{RW(),mt(LW,"compareMultiple"),NW=LW});function DW(e,i,r){i=i.length?_P(i,function(t){return c_(t)?function(e){return cB(e,1===t.length?t[0]:t)}:t}):[US];var n=-1,e=(i=_P(i,U_(fU)),GG(e,function(t,e,r){return{criteria:_P(i,function(e){return e(t)}),index:++n,value:t}}));return _W(e,function(e,t){return NW(e,t,r)})}var MW,OW,PW,$W=s(()=>{SP(),hB(),mU(),jG(),SW(),X_(),IW(),GS(),d_(),mt(DW,"baseOrderBy"),MW=DW}),BW=s(()=>{oU(),OW=sU("length"),PW=OW});function FW(e){for(var t=VW.lastIndex=0;VW.test(e);)++t;return t}var zW,qW,UW,GW,jW,WW,YW,VW,HW,XW=s(()=>{zW="["+(GW="\\ud800-\\udfff")+"]",qW="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",UW="\\ud83c[\\udffb-\\udfff]",YW="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",WW="[\\ufe0e\\ufe0f]?",jW="(?:\\u200d(?:"+[GW="[^"+GW+"]","(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]"].join("|")+")"+WW+YW+")*",WW=WW+YW+jW,YW="(?:"+[GW+qW+"?",qW,"(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]",zW].join("|")+")",VW=RegExp(UW+"(?="+UW+")|"+YW+WW,"g"),mt(FW,"unicodeSize"),HW=FW});function KW(e){return(OB(e)?HW:PW)(e)}var ZW,QW=s(()=>{BW(),PB(),XW(),mt(KW,"stringSize"),ZW=KW});function JW(r,e){return bW(r,e,function(e,t){return eU(r,t)})}var eY,tY,rY,iY=s(()=>{xW(),tU(),mt(JW,"basePick"),eY=JW}),nY=s(()=>{iY(),RB(),tY=AB(function(e,t){return null==e?{}:eY(e,t)}),rY=tY});function aY(e,t,r,i){for(var n=-1,a=oY(sY((t-e)/(r||1)),0),s=Array(a);a--;)s[i?a:++n]=e,e+=r;return s}var sY,oY,lY,cY=s(()=>{sY=Math.ceil,oY=Math.max,mt(aY,"baseRange"),lY=aY});function hY(i){return function(e,t,r){return r&&"number"!=typeof r&&p7(e,t,r)&&(t=r=void 0),e=KP(e),void 0===t?(t=e,e=0):t=KP(t),r=void 0===r?e{cY(),g7(),ZP(),mt(hY,"createRange"),uY=hY}),fY=s(()=>{gY(),dY=uY(),pY=dY});function mY(e,i,n,a,t){return t(e,function(e,t,r){n=a?(a=!1,e):i(n,e,t,r)}),n}var yY,vY=s(()=>{mt(mY,"baseReduce"),yY=mY});function bY(e,t,r){var i=c_(e)?BB:yY,n=arguments.length<3;return i(e,fU(t,4),r,n,SU)}var xY,TY=s(()=>{FB(),AU(),mU(),vY(),d_(),mt(bY,"reduce"),xY=bY});function wY(e,t){return(c_(e)?VB:kG)(e,pW(fU(t,3)))}var kY,EY=s(()=>{HB(),EG(),mU(),d_(),gW(),mt(wY,"reject"),kY=wY});function _Y(e){var t;return null==e?0:y_(e)?vj(e)?ZW(e):e.length:"[object Map]"==(t=$F(e))||"[object Set]"==t?e.size:N$(e).length}var SY,CY=s(()=>{I$(),UF(),v_(),bj(),QW(),mt(_Y,"size"),SY=_Y});function AY(e,i){var n;return SU(e,function(e,t,r){return!(n=i(e,t,r))}),!!n}var RY,LY=s(()=>{AU(),mt(AY,"baseSome"),RY=AY});function NY(e,t,r){var i=c_(e)?Zz:RY;return r&&p7(e,t,r)&&(t=void 0),i(e,fU(t,3))}var IY,DY,MY,OY,PY,$Y=s(()=>{Qz(),mU(),LY(),d_(),g7(),mt(NY,"some"),IY=NY}),BY=s(()=>{kB(),$W(),u7(),g7(),DY=h7(function(e,t){var r;return null==e?[]:(1<(r=t.length)&&p7(e,t[0],t[1])?t=[]:2{qF(),s$(),hq(),OY=_F&&1/cq(new _F([,-0]))[1]==1/0?function(e){return new _F(e)}:a$,PY=OY});function zY(e,t,r){var i=-1,n=k$,a=e.length,s=!0,o=[],l=o;if(r)s=!1,n=jU;else if(200<=a){var c=t?null:PY(e);if(c)return cq(c);s=!1,n=eq,l=new Hz}else l=t?[]:o;e:for(;++i{Xz(),S$(),WU(),tq(),FY(),hq(),mt(zY,"baseUniq"),qY=zY}),WY=s(()=>{kB(),u7(),jY(),T_(),UY=h7(function(e){return qY(wB(e,1,x_,!0))}),GY=UY});function YY(e){return e&&e.length?qY(e):[]}var VY,HY=s(()=>{jY(),mt(YY,"uniq"),VY=YY});function XY(e,t){return e&&e.length?qY(e,fU(t,2)):[]}var KY,ZY=s(()=>{mU(),jY(),mt(XY,"uniqBy"),KY=XY});function QY(e){var t=++JY;return eB(e)+t}var JY,eV,tV=s(()=>{tB(),JY=0,mt(QY,"uniqueId"),eV=QY});function rV(e,t,r){for(var i=-1,n=e.length,a=t.length,s={};++i{mt(rV,"baseZipObject"),iV=rV});function aV(e,t){return iV(e||[],t||[],nS)}var sV,oV=s(()=>{aS(),nV(),mt(aV,"zipObject"),sV=aV}),lV=s(()=>{F$(),Mz(),$z(),zz(),e7(),UU(),ZU(),iG(),sG(),dG(),TG(),CG(),$G(),qG(),XG(),SB(),uG(),QG(),nj(),aj(),mj(),GS(),Rj(),Dj(),d_(),Bj(),qw(),Pw(),jj(),bj(),Vj(),B$(),eG(),YG(),Jj(),aW(),x7(),lW(),uW(),s$(),qU(),nY(),kW(),fY(),TY(),EY(),CY(),$Y(),BY(),WY(),HY(),tV(),_j(),oV()});function cV(e,t){e[t]?e[t]++:e[t]=1}function hV(e,t){--e[t]||delete e[t]}function uV(e,t,r,i){return t=""+t,r=""+r,!e&&r{lV(),(gV=class{static{mt(this,"Graph")}constructor(e={}){this._isDirected=!Object.prototype.hasOwnProperty.call(e,"directed")||e.directed,this._isMultigraph=!!Object.prototype.hasOwnProperty.call(e,"multigraph")&&e.multigraph,this._isCompound=!!Object.prototype.hasOwnProperty.call(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=QS(void 0),this._defaultEdgeLabelFn=QS(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return Bw(e)||(e=QS(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return M$(this._nodes)}sources(){var t=this;return SG(this.nodes(),function(e){return $j(t._in[e])})}sinks(){var t=this;return SG(this.nodes(),function(e){return $j(t._out[e])})}setNodes(e,t){var r=arguments,i=this;return v(e,function(e){1this.removeEdge(this._edgeObjs[e]),"removeEdge"),delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],v(this.children(e),e=>{this.setParent(e)}),delete this._children[e]),v(M$(this._in[e]),t),delete this._in[e],delete this._preds[e],v(M$(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount),this}setParent(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(Yj(t))t="\0";else{for(var r=t+="";!Yj(r);r=this.parent(r))if(r===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound&&"\0"!==(e=this._parent[e]))return e}children(e){var t;return Yj(e)&&(e="\0"),this._isCompound?(t=this._children[e])?M$(t):void 0:"\0"===e?this.nodes():this.hasNode(e)?[]:void 0}predecessors(e){if(e=this._preds[e])return M$(e)}successors(e){if(e=this._sucs[e])return M$(e)}neighbors(e){var t=this.predecessors(e);if(t)return GY(t,this.successors(e))}isLeaf(e){return 0===(e=this.isDirected()?this.successors(e):this.neighbors(e)).length}filterNodes(r){var i=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound}),n=(i.setGraph(this.graph()),this),a=(v(this._nodes,function(e,t){r(t)&&i.setNode(t,e)}),v(this._edgeObjs,function(e){i.hasNode(e.v)&&i.hasNode(e.w)&&i.setEdge(e,n.edge(e))}),{});function s(e){var t=n.parent(e);return void 0===t||i.hasNode(t)?a[e]=t:t in a?a[t]:s(t)}return mt(s,"findParent"),this._isCompound&&v(i.nodes(),function(e){i.setParent(e,s(e))}),i}setDefaultEdgeLabel(e){return Bw(e)||(e=QS(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return Ej(this._edgeObjs)}setPath(e,r){var i=this,n=arguments;return xY(e,function(e,t){return 1{fV()});function yV(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function vV(e,t){if("_next"!==e&&"_prev"!==e)return t}var bV,xV=s(()=>{bV=class{static{mt(this,"List")}constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,t=e._prev;if(t!==e)return yV(t),t}enqueue(e){var t=this._sentinel;e._prev&&e._next&&yV(e),e._next=t._next,t._next._prev=e,(t._next=e)._prev=t}toString(){for(var e=[],t=this._sentinel,r=t._prev;r!==t;)e.push(JSON.stringify(r,vV)),r=r._prev;return"["+e.join(", ")+"]"}},mt(yV,"unlink"),mt(vV,"filterOutLinks")});function TV(t,e){return t.nodeCount()<=1?[]:(e=wV((e=EV(t,e||SV)).graph,e.buckets,e.zeroIdx),_B(b(e,function(e){return t.outEdges(e.v,e.w)})))}function wV(e,t,r){for(var i,n=[],a=t[t.length-1],s=t[0];e.nodeCount();){for(;i=s.dequeue();)kV(e,t,r,i);for(;i=a.dequeue();)kV(e,t,r,i);if(e.nodeCount())for(var o=t.length-2;0{lV(),mV(),xV(),SV=QS(1),mt(TV,"greedyFAS"),mt(wV,"doGreedyFAS"),mt(kV,"removeNode"),mt(EV,"buildState"),mt(_V,"assignBucket")});function AV(r){var e="greedy"===r.graph().acyclicer?TV(r,t(r)):RV(r);function t(t){return function(e){return t.edge(e).weight}}v(e,function(e){var t=r.edge(e);r.removeEdge(e),t.forwardName=e.name,t.reversed=!0,r.setEdge(e.w,e.v,t,eV("rev"))}),mt(t,"weightFn")}function RV(t){var r=[],i={},n={};function a(e){Object.prototype.hasOwnProperty.call(n,e)||(n[e]=!0,i[e]=!0,v(t.outEdges(e),function(e){Object.prototype.hasOwnProperty.call(i,e.w)?r.push(e):a(e.w)}),delete i[e])}return mt(a,"dfs"),v(t.nodes(),a),r}function LV(i){v(i.edges(),function(e){var t,r=i.edge(e);r.reversed&&(i.removeEdge(e),t=r.forwardName,delete r.reversed,delete r.forwardName,i.setEdge(e.w,e.v,r,t))})}var NV=s(()=>{lV(),CV(),mt(AV,"run"),mt(RV,"dfsFAS"),mt(LV,"undo")});function IV(e,t,r,i){for(var n;n=eV(i),e.hasNode(n););return r.dummy=t,e.setNode(n,r),n}function DV(i){var n=(new gV).setGraph(i.graph());return v(i.nodes(),function(e){n.setNode(e,i.node(e))}),v(i.edges(),function(e){var t=n.edge(e.v,e.w)||{weight:0,minlen:1},r=i.edge(e);n.setEdge(e.v,e.w,{weight:t.weight+r.weight,minlen:Math.max(t.minlen,r.minlen)})}),n}function MV(t){var r=new gV({multigraph:t.isMultigraph()}).setGraph(t.graph());return v(t.nodes(),function(e){t.children(e).length||r.setNode(e,t.node(e))}),v(t.edges(),function(e){r.setEdge(e,t.edge(e))}),r}function OV(e,t){var r,i=e.x,n=e.y,a=t.x-i,t=t.y-n,s=e.width/2,e=e.height/2;if(a||t)return e=Math.abs(t)*s>Math.abs(a)*e?(r=(e=t<0?-e:e)*a/t,e):(r=a<0?-s:s)*t/a,{x:i+r,y:n+e};throw new Error("Not possible to find intersection inside of the rectangle")}function PV(i){var n=b(pY(zV(i)+1),function(){return[]});return v(i.nodes(),function(e){var t=i.node(e),r=t.rank;Yj(r)||(n[r][t.order]=e)}),n}function $V(t){var r=oW(b(t.nodes(),function(e){return t.node(e).rank}));v(t.nodes(),function(e){e=t.node(e),fj(e,"rank")&&(e.rank-=r)})}function BV(r){var i=oW(b(r.nodes(),function(e){return r.node(e).rank})),n=[],a=(v(r.nodes(),function(e){var t=r.node(e).rank-i;n[t]||(n[t]=[]),n[t].push(e)}),0),s=r.graph().nodeRankFactor;v(n,function(e,t){Yj(e)&&t%s!=0?--a:a&&v(e,function(e){r.node(e).rank+=a})})}function FV(e,t,r,i){var n={width:0,height:0};return 4<=arguments.length&&(n.rank=r,n.order=i),IV(e,"border",n,t)}function zV(t){return nW(b(t.nodes(),function(e){if(e=t.node(e).rank,!Yj(e))return e}))}function qV(e,t){var r={lhs:[],rhs:[]};return v(e,function(e){(t(e)?r.lhs:r.rhs).push(e)}),r}function UV(e,t){var r=OU();try{return t()}finally{console.log(e+" time: "+(OU()-r)+"ms")}}function GV(e,t){return t()}var jV=s(()=>{lV(),mV(),mt(IV,"addDummyNode"),mt(DV,"simplify"),mt(MV,"asNonCompoundGraph"),mt(OV,"intersectRect"),mt(PV,"buildLayerMatrix"),mt($V,"normalizeRanks"),mt(BV,"removeEmptyRanks"),mt(FV,"addBorderNode"),mt(zV,"maxRank"),mt(qV,"partition"),mt(UV,"time"),mt(GV,"notime")});function WV(a){function s(e){var t=a.children(e),r=a.node(e);if(t.length&&v(t,s),Object.prototype.hasOwnProperty.call(r,"minRank")){r.borderLeft=[],r.borderRight=[];for(var i=r.minRank,n=r.maxRank+1;i{lV(),jV(),mt(WV,"addBorderSegments"),mt(YV,"addBorderNode")});function HV(e){var t=e.graph().rankdir.toLowerCase();"lr"!==t&&"rl"!==t||KV(e)}function XV(e){var t=e.graph().rankdir.toLowerCase();"bt"!==t&&"rl"!==t||QV(e),"lr"!==t&&"rl"!==t||(eH(e),KV(e))}function KV(t){v(t.nodes(),function(e){ZV(t.node(e))}),v(t.edges(),function(e){ZV(t.edge(e))})}function ZV(e){var t=e.width;e.width=e.height,e.height=t}function QV(t){v(t.nodes(),function(e){JV(t.node(e))}),v(t.edges(),function(e){e=t.edge(e),v(e.points,JV),Object.prototype.hasOwnProperty.call(e,"y")&&JV(e)})}function JV(e){e.y=-e.y}function eH(t){v(t.nodes(),function(e){tH(t.node(e))}),v(t.edges(),function(e){e=t.edge(e),v(e.points,tH),Object.prototype.hasOwnProperty.call(e,"x")&&tH(e)})}function tH(e){var t=e.x;e.x=e.y,e.y=t}var rH=s(()=>{lV(),mt(HV,"adjust"),mt(XV,"undo"),mt(KV,"swapWidthHeight"),mt(ZV,"swapWidthHeightOne"),mt(QV,"reverseY"),mt(JV,"reverseYOne"),mt(eH,"swapXY"),mt(tH,"swapXYOne")});function iH(t){t.graph().dummyChains=[],v(t.edges(),function(e){nH(t,e)})}function nH(e,t){var r=t.v,i=e.node(r).rank,n=t.w,a=e.node(n).rank,s=t.name,o=e.edge(t),l=o.labelRank;if(a!==i+1){e.removeEdge(t);var c,h=void 0,u=0;for(++i;i{lV(),jV(),mt(iH,"run"),mt(nH,"normalizeEdge"),mt(aH,"undo")});function oH(r){var i={};function n(e){var t=r.node(e);return Object.prototype.hasOwnProperty.call(i,e)?t.rank:(i[e]=!0,(e=oW(b(r.outEdges(e),function(e){return n(e.w)-r.edge(e).minlen})))!==Number.POSITIVE_INFINITY&&null!=e||(e=0),t.rank=e)}mt(n,"dfs"),v(r.sources(),n)}function lH(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var cH=s(()=>{lV(),mt(oH,"longestPath"),mt(lH,"slack")});function hH(e){var t,r=new gV({directed:!1}),i=e.nodes()[0],n=e.nodeCount();for(r.setNode(i,{});uH(r,e){lV(),mV(),cH(),mt(hH,"feasibleTree"),mt(uH,"tightTree"),mt(dH,"findMinSlackEdge"),mt(pH,"shiftRanks")}),fH=s(()=>{}),mH=s(()=>{}),yH=s(()=>{lV(),mH(),QS(1)}),vH=s(()=>{yH()}),bH=s(()=>{}),xH=s(()=>{bH()}),TH=s(()=>{lV(),QS(1)});function wH(t){var r={},i={},n=[];function a(e){if(Object.prototype.hasOwnProperty.call(i,e))throw new kH;Object.prototype.hasOwnProperty.call(r,e)||(i[e]=!0,r[e]=!0,v(t.predecessors(e),a),delete i[e],n.push(e))}if(mt(a,"visit"),v(t.sinks(),a),SY(r)!==t.nodeCount())throw new kH;return n}function kH(){}var EH=s(()=>{lV(),wH.CycleException=kH,mt(wH,"topsort"),mt(kH,"CycleException"),kH.prototype=new Error}),_H=s(()=>{EH()});function SH(t,e,r){c_(e)||(e=[e]);var i=(t.isDirected()?t.successors:t.neighbors).bind(t),n=[],a={};return v(e,function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);CH(t,e,"post"===r,a,i,n)}),n}function CH(t,e,r,i,n,a){Object.prototype.hasOwnProperty.call(i,e)||(i[e]=!0,r||a.push(e),v(n(e),function(e){CH(t,e,r,i,n,a)}),r&&a.push(e))}var AH=s(()=>{lV(),mt(SH,"dfs"),mt(CH,"doDfs")});function RH(e,t){return SH(e,t,"post")}var LH=s(()=>{AH(),mt(RH,"postorder")});function NH(e,t){return SH(e,t,"pre")}var IH=s(()=>{AH(),mt(NH,"preorder")}),DH=s(()=>{mH(),fV()}),MH=s(()=>{fH(),yH(),vH(),xH(),TH(),_H(),LH(),IH(),DH(),bH(),EH()});function OH(e){oH(e=DV(e));var t,r=hH(e);for(FH(r),PH(r,e);t=qH(r);)GH(r,e,t,UH(r,e,t))}function PH(t,r){var e=(e=RH(t,t.nodes())).slice(0,e.length-1);v(e,function(e){$H(t,r,e)})}function $H(e,t,r){var i=e.node(r).parent;e.edge(r,i).cutvalue=BH(e,t,r)}function BH(i,n,a){var s=i.node(a).parent,o=!0,e=n.edge(a,s),l=0;return e||(o=!1,e=n.edge(s,a)),l=e.weight,v(n.nodeEdges(a),function(e){var t=e.v===a,r=t?e.w:e.v;r!==s&&(t=t===o,e=n.edge(e).weight,l+=t?e:-e,WH(i,a,r))&&(e=i.edge(a,r).cutvalue,l+=t?-e:e)}),l}function FH(e,t){arguments.length<2&&(t=e.nodes()[0]),zH(e,{},1,t)}function zH(t,r,i,n,e){var a=i,s=t.node(n);return r[n]=!0,v(t.neighbors(n),function(e){Object.prototype.hasOwnProperty.call(r,e)||(i=zH(t,r,i,e,n))}),s.low=a,s.lim=i++,e?s.parent=e:delete s.parent,i}function qH(t){return OG(t.edges(),function(e){return t.edge(e).cutvalue<0})}function UH(t,r,e){var i=e.v,n=e.w,e=(r.hasEdge(i,n)||(i=e.w,n=e.v),t.node(i)),i=t.node(n),a=e,s=!1,n=(e.lim>i.lim&&(a=i,s=!0),SG(r.edges(),function(e){return s===YH(0,t.node(e.v),a)&&s!==YH(0,t.node(e.w),a)}));return hW(n,function(e){return lH(r,e)})}function GH(e,t,r,i){var n=r.v;e.removeEdge(n,r.w),e.setEdge(i.v,i.w,{}),FH(e),PH(e,t),jH(e,t)}function jH(n,a){var e=OG(n.nodes(),function(e){return!a.node(e).parent}),e=(e=NH(n,e)).slice(1);v(e,function(e){var t=n.node(e).parent,r=a.edge(e,t),i=!1;r||(r=a.edge(t,e),i=!0),a.node(e).rank=a.node(t).rank+(i?r.minlen:-r.minlen)})}function WH(e,t,r){return e.hasEdge(t,r)}function YH(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}var VH=s(()=>{lV(),MH(),jV(),gH(),cH(),OH.initLowLimValues=FH,OH.initCutValues=PH,OH.calcCutValue=BH,OH.leaveEdge=qH,OH.enterEdge=UH,OH.exchangeEdges=GH,mt(OH,"networkSimplex"),mt(PH,"initCutValues"),mt($H,"assignCutValue"),mt(BH,"calcCutValue"),mt(FH,"initLowLimValues"),mt(zH,"dfsAssignLowLim"),mt(qH,"leaveEdge"),mt(UH,"enterEdge"),mt(GH,"exchangeEdges"),mt(jH,"updateRanks"),mt(WH,"isTreeEdge"),mt(YH,"isDescendant")});function HH(e){switch(e.graph().ranker){case"network-simplex":KH(e);break;case"tight-tree":XH(e);break;case"longest-path":ZH(e);break;default:KH(e)}}function XH(e){oH(e),hH(e)}function KH(e){OH(e)}var ZH,QH=s(()=>{gH(),VH(),cH(),mt(HH,"rank"),ZH=oH,mt(XH,"tightTreeRanker"),mt(KH,"networkSimplexRanker")});function JH(t){var r=IV(t,"root",{},"_root"),i=tX(t),n=nW(Ej(i))-1,a=2*n+1,s=(t.graph().nestingRoot=r,v(t.edges(),function(e){t.edge(e).minlen*=a}),rX(t)+1);v(t.children(),function(e){eX(t,r,a,s,n,i,e)}),t.graph().nodeRankFactor=a}function eX(n,a,s,o,l,c,h){var u,d,e,t=n.children(h);t.length?(u=FV(n,"_bt"),d=FV(n,"_bb"),e=n.node(h),n.setParent(u,h),e.borderTop=u,n.setParent(d,h),e.borderBottom=d,v(t,function(e){eX(n,a,s,o,l,c,e);var t=n.node(e),r=t.borderTop||e,i=r!==(e=t.borderBottom||e)?1:l-c[h]+1;n.setEdge(u,r,{weight:t=t.borderTop?o:2*o,minlen:i,nestingEdge:!0}),n.setEdge(e,d,{weight:t,minlen:i,nestingEdge:!0})}),n.parent(h)||n.setEdge(a,u,{weight:0,minlen:l+c[h]})):h!==a&&n.setEdge(a,h,{weight:0,minlen:s})}function tX(i){var n={};function a(e,t){var r=i.children(e);r&&r.length&&v(r,function(e){a(e,t+1)}),n[e]=t}return mt(a,"dfs"),v(i.children(),function(e){a(e,1)}),n}function rX(r){return xY(r.edges(),function(e,t){return e+r.edge(t).weight},0)}function iX(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,v(t.edges(),function(e){t.edge(e).nestingEdge&&t.removeEdge(e)})}var nX=s(()=>{lV(),jV(),mt(JH,"run"),mt(eX,"dfs"),mt(tX,"treeDepths"),mt(rX,"sumWeights"),mt(iX,"cleanup")});function aX(n,a,e){var s,o={};v(e,function(e){for(var t,r,i=n.parent(e);i;){if((t=n.parent(i))?(r=o[t],o[t]=i):(r=s,s=i),r&&r!==i)return void a.setEdge(r,i);i=t}})}var sX=s(()=>{lV(),mt(aX,"addSubgraphConstraints")});function oX(n,r,a){var s=lX(n),o=new gV({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(function(e){return n.node(e)});return v(n.nodes(),function(i){var e=n.node(i),t=n.parent(i);(e.rank===r||e.minRank<=r&&r<=e.maxRank)&&(o.setNode(i),o.setParent(i,t||s),v(n[a](i),function(e){var t=e.v===i?e.w:e.v,r=o.edge(t,i),r=Yj(r)?0:r.weight;o.setEdge(t,i,{weight:n.edge(e).weight+r})}),Object.prototype.hasOwnProperty.call(e,"minRank"))&&o.setNode(i,{borderLeft:e.borderLeft[r],borderRight:e.borderRight[r]})}),o}function lX(e){for(var t;e.hasNode(t=eV("_root")););return t}var cX=s(()=>{lV(),mV(),mt(oX,"buildLayerGraph"),mt(lX,"createRootNode")});function hX(e,t){for(var r=0,i=1;i>1]+=e.weight;o+=e.weight*r})),o}var dX=s(()=>{lV(),mt(hX,"crossCount"),mt(uX,"twoLayerCrossCount")});function pX(r){var i={},e=SG(r.nodes(),function(e){return!r.children(e).length}),t=nW(b(e,function(e){return r.node(e).rank})),n=b(pY(t+1),function(){return[]});function a(e){var t;fj(i,e)||(i[e]=!0,t=r.node(e),n[t.rank].push(e),v(r.successors(e),a))}return mt(a,"dfs"),t=MY(e,function(e){return r.node(e).rank}),v(t,a),n}var gX=s(()=>{lV(),mt(pX,"initOrder")});function fX(i,e){return b(e,function(e){var t=i.inEdges(e);return t.length?{v:e,barycenter:(t=xY(t,function(e,t){var r=i.edge(t),t=i.node(t.v);return{sum:e.sum+r.weight*t.order,weight:e.weight+r.weight}},{sum:0,weight:0})).sum/t.weight,weight:t.weight}:{v:e}})}var mX=s(()=>{lV(),mt(fX,"barycenter")});function yX(e,t){var i={};return v(e,function(e,t){t=i[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t},Yj(e.barycenter)||(t.barycenter=e.barycenter,t.weight=e.weight)}),v(t.edges(),function(e){var t=i[e.v],r=i[e.w];Yj(t)||Yj(r)||(r.indegree++,t.out.push(i[e.w]))}),vX(SG(i,function(e){return!e.indegree}))}function vX(r){var e=[];function t(t){return function(e){e.merged||(Yj(e.barycenter)||Yj(t.barycenter)||e.barycenter>=t.barycenter)&&bX(t,e)}}function i(t){return function(e){e.in.push(t),0==--e.indegree&&r.push(e)}}for(mt(t,"handleIn"),mt(i,"handleOut");r.length;){var n=r.pop();e.push(n),v(n.in.reverse(),t(n)),v(n.out,i(n))}return b(SG(e,function(e){return!e.merged}),function(e){return rY(e,["vs","i","barycenter","weight"])})}function bX(e,t){var r=0,i=0;e.weight&&(r+=e.barycenter*e.weight,i+=e.weight),t.weight&&(r+=t.barycenter*t.weight,i+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/i,e.weight=i,e.i=Math.min(t.i,e.i),t.merged=!0}var xX=s(()=>{lV(),mt(yX,"resolveConflicts"),mt(vX,"doResolveConflicts"),mt(bX,"mergeEntries")});function TX(e,t){var r=(e=qV(e,function(e){return Object.prototype.hasOwnProperty.call(e,"barycenter")})).lhs,i=MY(e.rhs,function(e){return-e.i}),n=[],a=0,s=0,o=0,e=(r.sort(kX(!!t)),o=wX(n,i,o),v(r,function(e){o+=e.vs.length,n.push(e.vs),a+=e.barycenter*e.weight,s+=e.weight,o=wX(n,i,o)}),{vs:_B(n)});return s&&(e.barycenter=a/s,e.weight=s),e}function wX(e,t,r){for(var i;t.length&&(i=JU(t)).i<=r;)t.pop(),e.push(i.vs),r++;return r}function kX(r){return function(e,t){return e.barycentert.barycenter?1:r?t.i-e.i:e.i-t.i}}var EX=s(()=>{lV(),jV(),mt(TX,"sort"),mt(wX,"consumeUnsortable"),mt(kX,"compareWithBias")});function _X(r,e,i,n){var t,a=r.children(e),s=(e=r.node(e))?e.borderLeft:void 0,o=e?e.borderRight:void 0,l={},e=(s&&(a=SG(a,function(e){return e!==s&&e!==o})),fX(r,a));return v(e,function(e){var t;r.children(e.v).length&&(t=_X(r,e.v,i,n),l[e.v]=t,Object.prototype.hasOwnProperty.call(t,"barycenter"))&&CX(e,t)}),SX(a=yX(e,i),l),e=TX(a,n),s&&(e.vs=_B([s,e.vs,o]),r.predecessors(s).length)&&(a=r.node(r.predecessors(s)[0]),t=r.node(r.predecessors(o)[0]),Object.prototype.hasOwnProperty.call(e,"barycenter")||(e.barycenter=0,e.weight=0),e.barycenter=(e.barycenter*e.weight+a.order+t.order)/(e.weight+2),e.weight+=2),e}function SX(e,t){v(e,function(e){e.vs=_B(e.vs.map(function(e){return t[e]?t[e].vs:e}))})}function CX(e,t){Yj(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}var AX=s(()=>{lV(),mX(),xX(),EX(),mt(_X,"sortSubgraph"),mt(SX,"expandSubgraphs"),mt(CX,"mergeBarycenters")});function RX(e){var t=zV(e),r=LX(e,pY(1,t+1),"inEdges"),i=LX(e,pY(t-1,-1,-1),"outEdges");IX(e,pX(e));for(var n,a=Number.POSITIVE_INFINITY,s=0,o=0;o<4;++s,++o){NX(s%2?r:i,2<=s%4);var l,c=hX(e,l=PV(e));c{lV(),mV(),jV(),sX(),cX(),dX(),gX(),AX(),mt(RX,"order"),mt(LX,"buildLayerGraphs"),mt(NX,"sweepLayerGraphs"),mt(IX,"assignOrder")});function MX(c){var h=PX(c);v(c.graph().dummyChains,function(e){for(var t,r=c.node(e).edgeObj,i=OX(c,h,r.v,r.w),n=i.path,a=i.lca,s=0,o=n[s],l=!0;e!==r.w;){if(t=c.node(e),l){for(;(o=n[s])!==a&&c.node(o).maxRanko||l>t[c].lim););for(n=c,c=i;(c=e.parent(c))!==n;)s.push(c);return{path:a.concat(s.reverse()),lca:n}}function PX(r){var i={},n=0;function a(e){var t=n;v(r.children(e),a),i[e]={low:t,lim:n++}}return mt(a,"dfs"),v(r.children(),a),i}var $X=s(()=>{lV(),mt(MX,"parentDummyChains"),mt(OX,"findPath"),mt(PX,"postorder")});function BX(c,e){var h={};function t(e,i){var a=0,s=0,o=e.length,l=JU(i);return v(i,function(e,t){var r=zX(c,e),n=r?c.node(r).order:o;!r&&e!==l||(v(i.slice(s,t+1),function(i){v(c.predecessors(i),function(e){var t=c.node(e),r=t.order;!(rn)&&qX(s,e,a)})})}function t(r,i){var n,a=-1,s=0;return v(i,function(e,t){"border"===o.node(e).dummy&&(e=o.predecessors(e)).length&&(n=o.node(e[0]).order,l(i,s,t,a,n),s=t,a=n),l(i,s,i.length,n,r.length)}),i}return mt(l,"scan"),mt(t,"visitLayer"),xY(e,t),s}function zX(t,e){if(t.node(e).dummy)return OG(t.predecessors(e),function(e){return t.node(e).dummy})}function qX(e,t,r){r{lV(),mV(),jV(),mt(BX,"findType1Conflicts"),mt(FX,"findType2Conflicts"),mt(zX,"findOtherInnerSegmentNode"),mt(qX,"addConflict"),mt(UX,"hasConflict"),mt(GX,"verticalAlignment"),mt(jX,"horizontalCompaction"),mt(WX,"buildBlockGraph"),mt(YX,"findSmallestWidthAlignment"),mt(VX,"alignCoordinates"),mt(HX,"balance"),mt(XX,"positionX"),mt(KX,"sep"),mt(ZX,"width")});function JX(r){eK(r=MV(r)),ej(XX(r),function(e,t){r.node(t).x=e})}function eK(r){var e=PV(r),i=r.graph().ranksep,n=0;v(e,function(e){var t=nW(b(e,function(e){return r.node(e).height}));v(e,function(e){r.node(e).y=n+t/2}),n+=t+i})}var tK=s(()=>{lV(),jV(),QX(),mt(JX,"position"),mt(eK,"positionY")});function rK(t,e){var r=e&&e.debugTiming?UV:GV;r("layout",()=>{var e=r(" buildLayoutGraph",()=>aK(t));r(" runLayout",()=>iK(e,r)),r(" updateInputGraph",()=>nK(t,e))})}function iK(e,t){t(" makeSpaceForEdgeLabels",()=>sK(e)),t(" removeSelfEdges",()=>fK(e)),t(" acyclic",()=>AV(e)),t(" nestingGraph.run",()=>JH(e)),t(" rank",()=>HH(MV(e))),t(" injectEdgeLabelProxies",()=>oK(e)),t(" removeEmptyRanks",()=>BV(e)),t(" nestingGraph.cleanup",()=>iX(e)),t(" normalizeRanks",()=>$V(e)),t(" assignRankMinMax",()=>lK(e)),t(" removeEdgeLabelProxies",()=>cK(e)),t(" normalize.run",()=>iH(e)),t(" parentDummyChains",()=>MX(e)),t(" addBorderSegments",()=>WV(e)),t(" order",()=>RX(e)),t(" insertSelfEdges",()=>mK(e)),t(" adjustCoordinateSystem",()=>HV(e)),t(" position",()=>JX(e)),t(" positionSelfEdges",()=>yK(e)),t(" removeBorderNodes",()=>gK(e)),t(" normalize.undo",()=>aH(e)),t(" fixupEdgeLabelCoords",()=>dK(e)),t(" undoCoordinateSystem",()=>XV(e)),t(" translateGraph",()=>hK(e)),t(" assignNodeIntersects",()=>uK(e)),t(" reversePoints",()=>pK(e)),t(" acyclic.undo",()=>LV(e))}function nK(i,n){v(i.nodes(),function(e){var t=i.node(e),r=n.node(e);t&&(t.x=r.x,t.y=r.y,n.children(e).length)&&(t.width=r.width,t.height=r.height)}),v(i.edges(),function(e){var t=i.edge(e),e=n.edge(e);t.points=e.points,Object.prototype.hasOwnProperty.call(e,"x")&&(t.x=e.x,t.y=e.y)}),i.graph().width=n.graph().width,i.graph().height=n.graph().height}function aK(r){var i=new gV({multigraph:!0,compound:!0}),e=bK(r.graph());return i.setGraph(v7({},TK,vK(e,xK),rY(e,wK))),v(r.nodes(),function(e){var t=bK(r.node(e));i.setNode(e,FU(vK(t,kK),EK)),i.setParent(e,r.parent(e))}),v(r.edges(),function(e){var t=bK(r.edge(e));i.setEdge(e,v7({},SK,vK(t,_K),rY(t,CK)))}),i}function sK(t){var r=t.graph();r.ranksep/=2,v(t.edges(),function(e){(e=t.edge(e)).minlen*=2,"c"!==e.labelpos.toLowerCase()&&("TB"===r.rankdir||"BT"===r.rankdir?e.width+=e.labeloffset:e.height+=e.labeloffset)})}function oK(r){v(r.edges(),function(e){var t=r.edge(e);t.width&&t.height&&(t=r.node(e.v),t={rank:(r.node(e.w).rank-t.rank)/2+t.rank,e:e},IV(r,"edge-proxy",t,"_ep"))})}function lK(t){var r=0;v(t.nodes(),function(e){(e=t.node(e)).borderTop&&(e.minRank=t.node(e.borderTop).rank,e.maxRank=t.node(e.borderBottom).rank,r=nW(r,e.maxRank))}),t.graph().maxRank=r}function cK(r){v(r.nodes(),function(e){var t=r.node(e);"edge-proxy"===t.dummy&&(r.edge(t.e).labelRank=t.rank,r.removeNode(e))})}function hK(t){var n=Number.POSITIVE_INFINITY,a=0,s=Number.POSITIVE_INFINITY,o=0,e=t.graph(),r=e.marginx||0,i=e.marginy||0;function l(e){var t=e.x,r=e.y,i=e.width,e=e.height;n=Math.min(n,t-i/2),a=Math.max(a,t+i/2),s=Math.min(s,r-e/2),o=Math.max(o,r+e/2)}mt(l,"getExtremes"),v(t.nodes(),function(e){l(t.node(e))}),v(t.edges(),function(e){e=t.edge(e),Object.prototype.hasOwnProperty.call(e,"x")&&l(e)}),n-=r,s-=i,v(t.nodes(),function(e){(e=t.node(e)).x-=n,e.y-=s}),v(t.edges(),function(e){e=t.edge(e),v(e.points,function(e){e.x-=n,e.y-=s}),Object.prototype.hasOwnProperty.call(e,"x")&&(e.x-=n),Object.prototype.hasOwnProperty.call(e,"y")&&(e.y-=s)}),e.width=a-n+r,e.height=o-s+i}function uK(a){v(a.edges(),function(e){var t,r=a.edge(e),i=a.node(e.v),e=a.node(e.w),n=r.points?(t=r.points[0],r.points[r.points.length-1]):(r.points=[],t=e,i);r.points.unshift(OV(i,t)),r.points.push(OV(e,n))})}function dK(r){v(r.edges(),function(e){var t=r.edge(e);if(Object.prototype.hasOwnProperty.call(t,"x"))switch("l"!==t.labelpos&&"r"!==t.labelpos||(t.width-=t.labeloffset),t.labelpos){case"l":t.x-=t.width/2+t.labeloffset;break;case"r":t.x+=t.width/2+t.labeloffset}})}function pK(t){v(t.edges(),function(e){(e=t.edge(e)).reversed&&e.points.reverse()})}function gK(a){v(a.nodes(),function(e){var t,r,i,n;a.children(e).length&&(e=a.node(e),t=a.node(e.borderTop),r=a.node(e.borderBottom),i=a.node(JU(e.borderLeft)),n=a.node(JU(e.borderRight)),e.width=Math.abs(n.x-i.x),e.height=Math.abs(r.y-t.y),e.x=i.x+e.width/2,e.y=t.y+e.height/2)}),v(a.nodes(),function(e){"border"===a.node(e).dummy&&a.removeNode(e)})}function fK(r){v(r.edges(),function(e){var t;e.v===e.w&&((t=r.node(e.v)).selfEdges||(t.selfEdges=[]),t.selfEdges.push({e:e,label:r.edge(e)}),r.removeEdge(e))})}function mK(n){var e=PV(n);v(e,function(e){var i=0;v(e,function(e,t){var r=n.node(e);r.order=t+i,v(r.selfEdges,function(e){IV(n,"selfedge",{width:e.label.width,height:e.label.height,rank:r.rank,order:t+ ++i,e:e.e,label:e.label},"_se")}),delete r.selfEdges})})}function yK(s){v(s.nodes(),function(e){var t,r,i,n,a=s.node(e);"selfedge"===a.dummy&&(t=(n=s.node(a.e.v)).x+n.width/2,r=n.y,i=a.x-t,n=n.height/2,s.setEdge(a.e,a.label),s.removeNode(e),a.label.points=[{x:t+2*i/3,y:r-n},{x:t+5*i/6,y:r-n},{x:t+i,y:r},{x:t+5*i/6,y:r+n},{x:t+2*i/3,y:r+n}],a.label.x=a.x,a.label.y=a.y)})}function vK(e,t){return Qj(rY(e,t),Number)}function bK(e){var r={};return v(e,function(e,t){r[t.toLowerCase()]=e}),r}var xK,TK,wK,kK,EK,_K,SK,CK,AK=s(()=>{lV(),mV(),VV(),rH(),NV(),sH(),QH(),nX(),DX(),$X(),tK(),jV(),mt(rK,"layout"),mt(iK,"runLayout"),mt(nK,"updateInputGraph"),xK=["nodesep","edgesep","ranksep","marginx","marginy"],TK={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},wK=["acyclicer","ranker","rankdir","align"],kK=["width","height"],EK={width:0,height:0},_K=["minlen","weight","width","height","labeloffset"],SK={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},CK=["labelpos"],mt(aK,"buildLayoutGraph"),mt(sK,"makeSpaceForEdgeLabels"),mt(oK,"injectEdgeLabelProxies"),mt(lK,"assignRankMinMax"),mt(cK,"removeEdgeLabelProxies"),mt(hK,"translateGraph"),mt(uK,"assignNodeIntersects"),mt(dK,"fixupEdgeLabelCoords"),mt(pK,"reversePointsForReversedEdges"),mt(gK,"removeBorderNodes"),mt(fK,"removeSelfEdges"),mt(mK,"insertSelfEdges"),mt(yK,"positionSelfEdges"),mt(vK,"selectNumberAttrs"),mt(bK,"canonicalize")}),RK=s(()=>{NV(),AK(),sH(),QH()});function LK(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:NK(e),edges:IK(e)};return Yj(e.graph())||(t.value=Dz(e.graph())),t}function NK(i){return b(i.nodes(),function(e){var t=i.node(e),r=i.parent(e),e={v:e};return Yj(t)||(e.value=t),Yj(r)||(e.parent=r),e})}function IK(i){return b(i.edges(),function(e){var t=i.edge(e),r={v:e.v,w:e.w};return Yj(e.name)||(r.name=e.name),Yj(t)||(r.value=t),r})}var DK,MK,OK,PK,$K,BK,FK,zK,qK,UK,GK,jK,WK,YK,VK,HK=s(()=>{lV(),fV(),mt(LK,"write"),mt(NK,"writeNodes"),mt(IK,"writeEdges")}),XK=s(()=>{e(),mV(),HK(),DK=new Map,MK=new Map,OK=new Map,PK=mt(()=>{MK.clear(),OK.clear(),DK.clear()},"clear"),$K=mt((e,t)=>{var r=MK.get(t)||[];return M.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),BK=mt((e,t)=>{var r=MK.get(t)||[];return M.info("Descendants of ",t," is ",r),M.info("Edge is ",e),e.v!==t&&e.w!==t&&(r?r.includes(e.v)||$K(e.v,t)||$K(e.w,t)||r.includes(e.w):(M.debug("Tilt, ",t,",not in descendants"),!1))},"edgeInCluster"),FK=mt((r,i,n,a)=>{M.warn("Copying children of ",r,"root",a,"data",i.node(r),a);var e=i.children(r)||[];r!==a&&e.push(r),M.warn("Copying (nodes) clusterId",r,"nodes",e),e.forEach(e=>{var t;0{M.info("Edge",e);var t=i.edge(e.v,e.w,e.name);M.info("Edge data",t,a);try{BK(e,a)?(M.info("Copying as ",e.v,e.w,t,e.name),n.setEdge(e.v,e.w,t,e.name),M.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):M.info("Skipping copy of edge ",e.v,"--\x3e",e.w," rootId: ",a," clusterId:",r)}catch(e){M.error(e)}})),M.debug("Removing node",e),i.removeNode(e)})},"copy"),zK=mt((e,t)=>{let r=t.children(e),i=[...r];for(var n of r)OK.set(n,e),i=[...i,...zK(n,t)];return i},"extractDescendants"),qK=mt((e,t,r)=>{let i=e.edges().filter(e=>e.v===t||e.w===t),n=e.edges().filter(e=>e.v===r||e.w===r),a=i.map(e=>({v:e.v===t?r:e.v,w:e.w===t?t:e.w})),s=n.map(e=>({v:e.v,w:e.w}));return a.filter(t=>s.some(e=>t.v===e.v&&t.w===e.w))},"findCommonEdges"),UK=mt((e,t,r)=>{var i,n=t.children(e);if(M.trace("Searching children of id ",e,n),n.length<1)return e;let a;for(i of n){var s=UK(i,t,r),o=qK(t,r,s);if(s){if(!(0DK.has(e)&&DK.get(e).externalConnections&&DK.has(e)?DK.get(e).id:e,"getAnchorId"),jK=mt((a,e)=>{if(!a||10{$K(e.v,t)^$K(e.w,t)&&(M.warn("Edge: ",e," leaves cluster ",t),M.warn("Descendants of XXX ",t,": ",MK.get(t)),DK.get(t).externalConnections=!0)})):M.debug("Not a cluster ",t,MK)});for(var t of DK.keys()){var r=DK.get(t).id;(r=a.parent(r))!==t&&DK.has(r)&&!DK.get(r).externalConnections&&(DK.get(t).id=r)}a.edges().forEach(function(e){var t,r,i,n=a.edge(e);M.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),M.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(a.edge(e))),e.v,M.warn("Fix XXX",DK,"ids:",e.v,e.w,"Translating: ",DK.get(e.v)," --- ",DK.get(e.w)),(DK.get(e.v)||DK.get(e.w))&&(M.warn("Fixing and trying - removing XXX",e.v,e.w,e.name),t=GK(e.v),r=GK(e.w),a.removeEdge(e.v,e.w,e.name),t!==e.v&&(i=a.parent(t),DK.get(i).externalConnections=!0,n.fromCluster=e.v),r!==e.w&&(i=a.parent(r),DK.get(i).externalConnections=!0,n.toCluster=e.w),M.warn("Fix Replacing with XXX",t,r,e.name),a.setEdge(t,r,n,e.name))}),M.warn("Adjusted Graph",LK(a)),WK(a,0),M.trace(DK)}},"adjustClustersAndEdges"),WK=mt((r,i)=>{if(M.warn("extractor - ",i,LK(r),r.children("D")),10{if(0===e.length)return[];let r=Object.assign([],e);return e.forEach(e=>{e=t.children(e),e=YK(t,e),r=[...r,...e]}),r},"sorter"),VK=mt(e=>YK(e,e.children()),"sortNodesByHierarchy")}),KK={};PGe(KK,{render:()=>QK});var ZK,QK,JK=s(()=>{RK(),HK(),mV(),dP(),n(),XK(),bP(),mO(),uP(),e(),fO(),Au(),ZK=mt(async(e,n,a,s,o,l)=>{M.warn("Graph in recursive render:XAX",LK(n),o);let c=n.graph().rankdir,i=(M.trace("Dir in recursive render - dir:",c),e=e.insert("g").attr("class","root"),n.nodes()?M.info("Recursive render XXX",n.nodes()):M.info("No nodes found for",n),0{var e=n.edges().map(async function(e){var t=n.edge(e.v,e.w,e.name);M.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),M.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(n.edge(e))),M.info("Fix",DK,"ids:",e.v,e.w,"Translating: ",DK.get(e.v),DK.get(e.w)),await BO(r,t)});await Promise.all(e)},"processEdges")(),M.info("Graph before layout:",JSON.stringify(LK(n))),M.info("############################################# XXX"),M.info("### Layout ### XXX"),M.info("############################################# XXX"),rK(n),M.info("Graph after layout:",JSON.stringify(LK(n))),0),p=tO(l).subGraphTitleTotalMargin;return await Promise.all(VK(n).map(async function(e){var t,r=n.node(e);M.info("Position XBX => "+e+": ("+r.x,","+r.y,") width: ",r.width," height: ",r.height),r?.clusterNode?(r.y+=p,M.info("A tainted cluster node XBX1",e,r.id,r.width,r.height,r.x,r.y,n.parent(e)),DK.get(r.id).node=r,yP(r)):0 "+e.w+": "+JSON.stringify(t),t),t.points.forEach(e=>e.y+=p/2),n.node(e.v)),e=n.node(e.w),r=YO(h,t,DK,a,r,e,s);FO(t,r)}),n.nodes().forEach(function(e){var t=n.node(e);M.info(e,t.type,t.diff),t.isGroup&&(d=t.diff)}),M.warn("Returning from recursive render XAX",e,d),{elem:e,diff:d}},"recursiveRender"),QK=mt(async(e,t)=>{let l=new gV({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),r=t.select("g");hP(r,e.markers,e.type,e.diagramId),mP(),PO(),hO(),PK(),e.nodes.forEach(e=>{l.setNode(e.id,{...e}),e.parentId&&l.setParent(e.id,e.parentId)}),M.debug("Edges:",e.edges),e.edges.forEach(e=>{var t,r,i,n,a,s,o;e.start===e.end?(r=(t=e.start)+"---"+t+"---1",i=t+"---"+t+"---2",n=l.node(t),l.setNode(r,{domId:r,id:r,parentId:n.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),l.setParent(r,n.parentId),l.setNode(i,{domId:i,id:i,parentId:n.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),l.setParent(i,n.parentId),a=structuredClone(e),s=structuredClone(e),o=structuredClone(e),a.label="",a.arrowTypeEnd="none",a.id=t+"-cyclic-special-1",s.arrowTypeStart="none",s.arrowTypeEnd="none",s.id=t+"-cyclic-special-mid",o.label="",n.isGroup&&(a.fromCluster=t,o.toCluster=t),o.id=t+"-cyclic-special-2",o.arrowTypeStart="none",l.setEdge(t,r,a,t+"-cyclic-special-0"),l.setEdge(r,i,s,t+"-cyclic-special-1"),l.setEdge(i,t,o,t+"-cyce.length)&&(t=e.length);for(var r=0,i=Array(t);r=e.length?{done:!0}:{done:!1,value:e[a++]}},"n"),e:mt(function(e){throw e},"e"),f:t};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 oZ(e,t,r){return(t=fZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lZ(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function cZ(e,t){var r=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var i,n,a,s,o=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=a.call(r)).done)&&(o.push(i.value),o.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{if(!l&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw n}}return o}}function hZ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uZ(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dZ(e,t){return tZ(e)||cZ(e,t)||yZ(e,t)||hZ()}function pZ(e){return rZ(e)||lZ(e)||yZ(e)||uZ()}function gZ(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return String(e);if("object"!=typeof(r=r.call(e,t)))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}function fZ(e){return"symbol"==typeof(e=gZ(e,"string"))?e:e+""}function mZ(e){return(mZ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yZ(e,t){var r;if(e)return"string"==typeof e?eZ(e,t):"Map"===(r="Object"===(r={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?eZ(e,t):void 0}function vZ(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function bZ(){return yte||(yte=1,mt(e,"isObject"),mte=e),mte;function e(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}}function xZ(){var e;return bte||(bte=1,e="object"==typeof fte&&fte&&fte.Object===Object&&fte,vte=e),vte}function TZ(){var e,t;return Tte||(Tte=1,t=xZ(),e="object"==typeof self&&self&&self.Object===Object&&self,t=t||e||Function("return this")(),xte=t),xte}function wZ(){var e,t;return kte||(kte=1,e=TZ(),t=mt(function(){return e.Date.now()},"now"),wte=t),wte}function kZ(){var r;return _te||(_te=1,r=/\s/,mt(e,"trimmedEndIndex"),Ete=e),Ete;function e(e){for(var t=e.length;t--&&r.test(e.charAt(t)););return t}}function EZ(){var t,r;return Cte||(Cte=1,t=kZ(),r=/^\s+/,mt(e,"baseTrim"),Ste=e),Ste;function e(e){return e&&e.slice(0,t(e)+1).replace(r,"")}}function _Z(){var e;return Rte||(Rte=1,e=TZ().Symbol,Ate=e),Ate}function SZ(){var e,t,a,s,o;return Nte||(Nte=1,e=_Z(),t=Object.prototype,a=t.hasOwnProperty,s=t.toString,o=e?e.toStringTag:void 0,mt(r,"getRawTag"),Lte=r),Lte;function r(e){var t=a.call(e,o),r=e[o];try{var i=!(e[o]=void 0)}catch{}var n=s.call(e);return i&&(t?e[o]=r:delete e[o]),n}}function CZ(){var t;return Dte||(Dte=1,t=Object.prototype.toString,mt(e,"objectToString"),Ite=e),Ite;function e(e){return t.call(e)}}function AZ(){var e,t,r,i;return Ote||(Ote=1,e=_Z(),t=SZ(),r=CZ(),i=e?e.toStringTag:void 0,mt(n,"baseGetTag"),Mte=n),Mte;function n(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":(i&&i in Object(e)?t:r)(e)}}function RZ(){return $te||($te=1,mt(e,"isObjectLike"),Pte=e),Pte;function e(e){return null!=e&&"object"==typeof e}}function LZ(){var t,r;return Fte||(Fte=1,t=AZ(),r=RZ(),mt(e,"isSymbol"),Bte=e),Bte;function e(e){return"symbol"==typeof e||r(e)&&"[object Symbol]"==t(e)}}function NZ(){var r,i,n,a,s,o,l;return qte||(qte=1,r=EZ(),i=bZ(),n=LZ(),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt,mt(e,"toNumber"),zte=e),zte;function e(e){if("number"==typeof e)return e;if(n(e))return NaN;if(i(e)&&(t="function"==typeof e.valueOf?e.valueOf():e,e=i(t)?t+"":t),"string"!=typeof e)return 0===e?e:+e;e=r(e);var t=s.test(e);return t||o.test(e)?l(e.slice(2),t?2:8):a.test(e)?NaN:+e}}function IZ(){var w,k,E,_,S;return Gte||(Gte=1,w=bZ(),k=wZ(),E=NZ(),_=Math.max,S=Math.min,mt(e,"debounce"),Ute=e),Ute;function e(i,r,e){var n,a,s,o,l,c,h=0,t=!1,u=!1,d=!0;if("function"!=typeof i)throw new TypeError("Expected a function");function p(e){var t=n,r=a;return n=a=void 0,h=e,o=i.apply(r,t)}function g(e){return h=e,l=setTimeout(y,r),t?p(e):o}function f(e){var t=r-(e-c);return u?S(t,s-(e-h)):t}function m(e){var t=e-c;return void 0===c||r<=t||t<0||u&&s<=e-h}function y(){var e=k();if(m(e))return v(e);l=setTimeout(y,f(e))}function v(e){return l=void 0,d&&n?p(e):(n=a=void 0,o)}function b(){void 0!==l&&clearTimeout(l),n=c=a=l=void(h=0)}function x(){return void 0===l?o:v(k())}function T(){var e=k(),t=m(e);if(n=arguments,a=this,c=e,t){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)),o}return r=E(r)||0,w(e)&&(t=!!e.leading,u="maxWait"in e,s=u?_(E(e.maxWait)||0,r):s,d="trailing"in e?!!e.trailing:d),mt(p,"invokeFunc"),mt(g,"leadingEdge"),mt(f,"remainingWait"),mt(m,"shouldInvoke"),mt(y,"timerExpired"),mt(v,"trailingEdge"),mt(b,"cancel"),mt(x,"flush"),mt(T,"debounced"),T.cancel=b,T.flush=x,T}}function DZ(e,t,r,i,n){return n=n*Math.PI/180,{x:Math.cos(n)*(e-r)-Math.sin(n)*(t-i)+r,y:Math.sin(n)*(e-r)+Math.cos(n)*(t-i)+i}}function MZ(e,t,r){var i,n,a;return 0===r?e:(i=(t.x1+t.x2)/2,a=1/(n=t.w/t.h),t=DZ(e.x,e.y,i,e=(t.y1+t.y2)/2,r),{x:(r=sre(t.x,t.y,i,e,n,a)).x,y:r.y})}function OZ(){return Mre||(Mre=1,s=Ire,function(){var d,l,p,g,t,c,r,f,m,e,i,n,h,u;function a(e){this.cmp=e??d,this.nodes=[]}l=Math.floor,m=Math.min,d=mt(function(e,t){return e>1])<0;)e[r]=a,r=s;return e[r]=n},"_siftdown"),u=mt(function(e,t,r){var i,n,a,s,o;for(null==r&&(r=d),n=e.length,a=e[o=t],i=2*t+1;i{try{var e=t(Object,"defineProperty");return e({},"",{}),e}catch{}})(),Fse=e),Fse}function NQ(){var i;return Use||(Use=1,i=LQ(),mt(e,"baseAssignValue"),qse=e),qse;function e(e,t,r){"__proto__"==t&&i?i(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}}function IQ(){var n,a,s;return jse||(jse=1,n=NQ(),a=nQ(),s=Object.prototype.hasOwnProperty,mt(e,"assignValue"),Gse=e),Gse;function e(e,t,r){var i=e[t];s.call(e,t)&&a(i,r)&&(void 0!==r||t in e)||n(e,t,r)}}function DQ(){var i;return Yse||(Yse=1,i=/^(?:0|[1-9]\d*)$/,mt(e,"isIndex"),Wse=e),Wse;function e(e,t){var r=typeof e;return!!(t=t??9007199254740991)&&("number"==r||"symbol"!=r&&i.test(e))&&-1>0&255)/255,t[1]=(e>>8&255)/255,t[2]=(e>>16&255)/255,t[3]=(e>>24&255)/255,t}function qJ(e){return e[0]+(e[1]<<8)+(e[2]<<16)+(e[3]<<24)}function UJ(t,e){var r=t.createTexture();return r.buffer=function(e){t.bindTexture(t.TEXTURE_2D,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_NEAREST),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e),t.generateMipmap(t.TEXTURE_2D),t.bindTexture(t.TEXTURE_2D,null)},r.deleteTexture=function(){t.deleteTexture(r)},r}function GJ(e,t){switch(t){case"float":return[1,e.FLOAT,4];case"vec2":return[2,e.FLOAT,4];case"vec3":return[3,e.FLOAT,4];case"vec4":return[4,e.FLOAT,4];case"int":return[1,e.INT,4];case"ivec2":return[2,e.INT,4]}}function jJ(e,t,r){switch(t){case e.FLOAT:return new Float32Array(r);case e.INT:return new Int32Array(r)}}function WJ(e,t,r,i,n,a){switch(t){case e.FLOAT:return new Float32Array(r.buffer,a*i,n);case e.INT:return new Int32Array(r.buffer,a*i,n)}}function YJ(e,t,r,i){var n=(t=dZ(GJ(e,t),2))[0],i=jJ(e,t=t[1],i),a=e.createBuffer();return e.bindBuffer(e.ARRAY_BUFFER,a),e.bufferData(e.ARRAY_BUFFER,i,e.STATIC_DRAW),t===e.FLOAT?e.vertexAttribPointer(r,n,t,!1,0,0):t===e.INT&&e.vertexAttribIPointer(r,n,t,0,0),e.enableVertexAttribArray(r),e.bindBuffer(e.ARRAY_BUFFER,null),a}function VJ(t,e,r,i){var n=(r=dZ(GJ(t,r),3))[0],a=r[1],r=r[2],s=jJ(t,a,e*n),o=n*r,l=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,l),t.bufferData(t.ARRAY_BUFFER,e*o,t.DYNAMIC_DRAW),t.enableVertexAttribArray(i),a===t.FLOAT?t.vertexAttribPointer(i,n,a,!1,o,0):a===t.INT&&t.vertexAttribIPointer(i,n,a,o,0),t.vertexAttribDivisor(i,1),t.bindBuffer(t.ARRAY_BUFFER,null);for(var c=new Array(e),h=0;h{function i(e){if(iZ(this,i),this._obj=Object.create(null),this.size=0,null!=e)for(var t=null!=e.instanceString&&e.instanceString()===this.instanceString()?e.toArray():e,r=0;r{if(See){if(See.requestAnimationFrame)return function(e){See.requestAnimationFrame(e)};if(See.mozRequestAnimationFrame)return function(e){See.mozRequestAnimationFrame(e)};if(See.webkitRequestAnimationFrame)return function(e){See.webkitRequestAnimationFrame(e)};if(See.msRequestAnimationFrame)return function(e){See.msRequestAnimationFrame(e)}}return function(e){e&&setTimeout(function(){e(Yte())},1e3/60)}})(),Hte=mt(function(e){return Vte(e)},"requestAnimationFrame"),Xte=Yte,Kte=mt(function(e){for(var t,r=1y&&(u[v]=y,g[v]=T,f[v]=b),r||(v=T*o+x,!r&&u[v]>y&&(u[v]=y,g[v]=x,f[v]=b)))}for(var w=0;w=e.x1&&e.y2>=e.y1?{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1}:null!=e.w&&null!=e.h&&0<=e.w&&0<=e.h?{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}:void 0:void 0},"makeBoundingBox"),uie=mt(function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},"copyBoundingBox"),die=mt(function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},"clearBoundingBox"),pie=mt(function(e,t){e.x1=Math.min(e.x1,t.x1),e.x2=Math.max(e.x2,t.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,t.y1),e.y2=Math.max(e.y2,t.y2),e.h=e.y2-e.y1},"updateBoundingBox"),gie=mt(function(e,t,r){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,r),e.y2=Math.max(e.y2,r),e.h=e.y2-e.y1},"expandBoundingBoxByPoint"),fie=mt(function(e){var t=1t.x2||t.x1>e.x2||e.x2t.y2||t.y1>e.y2)},"boundingBoxesIntersect"),bie=mt(function(e,t,r){return e.x1<=t&&t<=e.x2&&e.y1<=r&&r<=e.y2},"inBoundingBox"),xie=mt(function(e,t){return bie(e,t.x,t.y)},"pointInBoundingBox"),Tie=mt(function(e,t){return bie(e,t.x1,t.y1)&&bie(e,t.x2,t.y2)},"boundingBoxInBoundingBox"),wie=null!=(ohe=Math.hypot)?ohe:function(e,t){return Math.sqrt(e*e+t*t)},mt($Z,"inflatePolygon"),mt(BZ,"miterBox"),kie=mt(function(e,t,r,i,n,a,s){var o,l="auto"===(l=7=u&&c[1]<=o||0<(c=$ie(e,t,r,i,h=r+n-l,u=i+a-l,l+s)).length&&c[0]>=h&&c[1]>=u||0<(c=$ie(e,t,r,i,o=r-n+l,h=i+a-l,l+s)).length&&c[0]<=o&&c[1]>=h?[c[0],c[1]]:[]},"roundRectangleIntersectLine"),Eie=mt(function(e,t,r,i,n,a,s){var o=Math.min(r,n),r=Math.max(r,n),n=Math.min(i,a),i=Math.max(i,a);return o-s<=e&&e<=r+s&&n-s<=t&&t<=i+s},"inLineVicinity"),_ie=mt(function(e,t,r,i,n,a,s,o,l){var c=Math.min(r,s,n)-l,r=Math.max(r,s,n)+l,s=Math.min(i,o,a)-l,n=Math.max(i,o,a)+l;return!(eo&&(o=t[s][c],l=c);n[l].push(e[s])}for(var h=0;h=n.threshold||"dendrogram"===n.mode&&1===e.length)return!1;var p=t[s],g=t[i[s]],f="dendrogram"===n.mode?{left:p,right:g,key:p.key}:{value:p.value.concat(g.value),key:p.key};e[p.index]=f,e.splice(g.index,1),t[p.key]=f;for(var m=0;mr[g.key][y.key]&&(a=r[g.key][y.key])):"max"===n.linkage?(a=r[p.key][y.key],r[p.key][y.key]s&&(s=t[n*e+(a=l)])}0=t.minIterations-1||v==t.maxIterations-1)){for(var G=0,I=0;I{var e=o[t];null!=e&&null!=e.then?e.then(function(e){s(t,e)},function(e){i(e)}):s(t,e)})(e)})},Qne.resolve=function(r){return new Qne(function(e,t){e(r)})},Qne.reject=function(r){return new Qne(function(e,t){t(r)})},nae=typeof Promise<"u"?Promise:Qne,aae=mt(function(e,t,r){var i=Gee(e),n=!i;(t=this._private=ste({duration:1e3},t,r)).target=e,t.style=t.style||t.css,t.started=!1,t.playing=!1,t.hooked=!1,t.applying=!1,t.progress=0,t.completes=[],t.frames=[],t.complete&&Mee(t.complete)&&t.completes.push(t.complete),n&&(r=e.position(),t.startPosition=t.startPosition||{x:r.x,y:r.y},t.startStyle=t.startStyle||e.cy().style().getAnimationStartStyle(e,t.style)),i&&(n=e.pan(),t.startPan={x:n.x,y:n.y},t.startZoom=e.zoom()),this.length=1,this[0]=this},"Animation"),Vce=aae.prototype,ste(Vce,{instanceString:mt(function(){return"animation"},"instanceString"),hook:mt(function(){var e,t=this._private;return t.hooked||(e=t.target._private.animation,(t.queue?e.queue:e.current).push(this),zee(t.target)&&t.target.cy().addToAnimationPool(t.target),t.hooked=!0),this},"hook"),play:mt(function(){var e=this._private;return 1===e.progress&&(e.progress=0),e.playing=!0,e.started=!1,e.stopped=!1,this.hook(),this},"play"),playing:mt(function(){return this._private.playing},"playing"),apply:mt(function(){var e=this._private;return e.applying=!0,e.started=!1,e.stopped=!1,this.hook(),this},"apply"),applying:mt(function(){return this._private.applying},"applying"),pause:mt(function(){var e=this._private;return e.playing=!1,e.started=!1,this},"pause"),stop:mt(function(){var e=this._private;return e.playing=!1,e.started=!1,e.stopped=!0,this},"stop"),rewind:mt(function(){return this.progress(0)},"rewind"),fastforward:mt(function(){return this.progress(1)},"fastforward"),time:mt(function(e){var t=this._private;return void 0===e?t.progress*t.duration:this.progress(e/t.duration)},"time"),progress:mt(function(e){var t=this._private,r=t.playing;return void 0===e?t.progress:(r&&this.pause(),t.progress=e,t.started=!1,r&&this.play(),this)},"progress"),completed:mt(function(){return 1===this._private.progress},"completed"),reverse:mt(function(){var i=this._private,e=i.playing,t=(e&&this.pause(),i.progress=1-i.progress,i.started=!1,mt(function(e,t){var r=i[e];null!=r&&(i[e]=i[t],i[t]=r)},"swap"));if(t("zoom","startZoom"),t("pan","startPan"),t("position","startPosition"),i.style)for(var r=0;r\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:ite,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"}).variable="(?:[\\w-.]|(?:\\\\"+noe.metaChar+"))+",noe.className="(?:[\\w-]|(?:\\\\"+noe.metaChar+"))+",noe.value=noe.string+"|"+noe.number,noe.id=noe.variable;for(var t,r=noe.comparatorOp.split("|"),n=0;n{for(var e,t={},r=0;r")+h(e.child,t);case soe.ANCESTOR:case soe.DESCENDANT:return h(e.ancestor,t)+" "+h(e.descendant,t);case soe.COMPOUND_SPLIT:var a=h(e.left,t),n=h(e.subject,t),s=h(e.right,t);return a+(0":u=!0,i=r=":u=!0,i=r<=e;break;case"<":u=!0,i=ea.length?t.substr(a.length):""}function i(){c=c.length>u.length?c.substr(u.length):""}for(t=t.replace(/[/][*](\s|.)+?[*][/]/g,""),mt(r,"removeSelAndBlockFromRemaining"),mt(i,"removePropAndValFromRem");!t.match(/^\s*$/);){var n=t.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!n){yre("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+t);break}var a=n[0],s=n[1];if("core"!==s&&new woe(s).invalid)yre("Skipping parsing of block: Invalid selector found in string stylesheet: "+s);else{for(var o=n[2],l=!1,c=o,h=[];!c.match(/^\s*$/);){if(!(p=c.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/))){yre("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+o),l=!0;break}var u=p[0],d=p[1],p=p[2];this.properties[d]?this.parse(d,p)?h.push({name:d,val:p}):yre("Skipping property: Invalid property definition in: "+u):yre("Skipping property: Invalid property name in: "+u),i()}if(l){r();break}this.selector(s);for(var g=0;gl.max||l.strictMax&&r===l.max)?null:(s={name:t,value:r,strValue:""+r+(b||""),units:b,bypass:i},l.unitless||"px"!==b&&"em"!==b?s.pfValue=r:s.pfValue="px"!==b&&b?this.getEmSizeInPixels()*r:r,"ms"!==b&&"s"!==b||(s.pfValue="ms"===b?r:1e3*r),"deg"!==b&&"rad"!==b||(s.pfValue="rad"===b?r:Jre(r)),"%"===b&&(s.pfValue=r/100),s);if(l.propList){var T,w=[];if("none"!=(T=""+r)){for(var k=T.split(/\s*,\s*|\s+/),E=0;Ethis._private.maxZoom?this._private.maxZoom:t)=i.minZoom&&(i.maxZoom=t),this},"zoomRange"),minZoom:mt(function(e){return void 0===e?this._private.minZoom:this.zoomRange({min:e})},"minZoom"),maxZoom:mt(function(e){return void 0===e?this._private.maxZoom:this.zoomRange({max:e})},"maxZoom"),getZoomedViewport:mt(function(e){var t,r,i=this._private,n=i.pan,a=i.zoom,s=!i.zoomingEnabled;return he(e)?r=e:Pee(e)&&(r=e.level,null!=e.position?t=Yre(e.position,a,n):null!=e.renderedPosition&&(t=e.renderedPosition),null!=t)&&!i.panningEnabled&&(s=!0),r=(r=r>i.maxZoom?i.maxZoom:r)t.maxZoom||!t.zoomingEnabled?a=!0:(t.zoom=r,n.push("zoom"))),!i||a&&e.cancelOnFailedZoom||!t.panningEnabled||(r=e.pan,he(r.x)&&(t.pan.x=r.x,s=!1),he(r.y)&&(t.pan.y=r.y,s=!1),s)||n.push("pan"),0=r.numIter||(Mle(n,r),n.temperature=n.temperature*r.coolingFactor,n.temperature=r.animationThreshold&&a(),Hte(h)):(Yle(n,r),o())},"frame");h()}else{for(;c;)c=s(l),l++;Yle(n,r),o()}return this},gJ.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},gJ.prototype.destroy=function(){return this.thread&&this.thread.stop(),this},Ale=mt(function(e,t,r){for(var i=r.eles.edges(),n=r.eles.nodes(),a=hie(r.boundingBox||{x1:0,y1:0,w:e.width(),h:e.height()}),s={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:n.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:i.size(),temperature:r.initialTemp,clientWidth:a.w,clientHeight:a.h,boundingBox:a},o=r.eles.components(),l={},c=0;cr.maxX)&&(r.maxX=e.maxX+r.padRight,i=!0),(null==r.minX||e.minX-r.padLeftr.maxY)&&(r.maxY=e.maxY+r.padBottom,i=!0),(null==r.minY||e.minY-r.padTop(t=Rie(y,v,h[u],h[u+1],h[u+2],h[u+3])))return E(e,t),!0}else if("bezier"===i.edgeType||"multibezier"===i.edgeType||"self"===i.edgeType||"compound"===i.edgeType)for(h=i.allpts,u=0;u+5(t=Aie(y,v,h[u],h[u+1],h[u+2],h[u+3],h[u+4],h[u+5])))return E(e,t),!0;for(var l=l||r.source,c=c||r.target,d=b.getArrowWidth(n,a),p=[{name:"source",x:i.arrowStartX,y:i.arrowStartY,angle:i.srcArrowAngle},{name:"target",x:i.arrowEndX,y:i.arrowEndY,angle:i.tgtArrowAngle},{name:"mid-source",x:i.midX,y:i.midY,angle:i.midsrcArrowAngle},{name:"mid-target",x:i.midX,y:i.midY,angle:i.midtgtArrowAngle}],u=0;u(t.y-e.y)*(r.x-e.x)}return mt(n,"ccw"),n(e,r,i)!==n(t,r,i)&&n(e,t,r)!==n(e,t,i)}mt(g,"preprop"),mt(f,"getRotatedLabelBox"),mt(m,"doLinesIntersect");for(var y=0;yMath.abs(x)?n:i:"upward"===u||"downward"===u?(h=i,y=!0):"leftward"!==u&&"rightward"!==u||(h=n,y=!0),(n=h===i)?x:m),i=rie(h=n?b:v),x=!1;y&&(p||g)||!("downward"===u&&h<0||"upward"===u&&0=Math.abs(T)},"getIsTooClose"))(m),u=y(Math.abs(T)-Math.abs(m)),!g&&!u||x?n?(h=a.y1+m+(c?o/2*i:0),b=a.x1,t=a.x2,r.segpts=[b,h,t,h]):(p=a.x1+m+(c?s/2*i:0),u=a.y1,d=a.y2,r.segpts=[p,u,p,d]):n?(p=Math.abs(h)<=o/2,d=Math.abs(v)<=l/2,p?(y=(a.x1+a.x2)/2,g=a.y1,u=a.y2,r.segpts=[y,g,y,u]):d?(x=(a.y1+a.y2)/2,v=a.x1,l=a.x2,r.segpts=[v,x,l,x]):r.segpts=[a.x1,a.y2]):(p=Math.abs(h)<=s/2,g=Math.abs(b)<=t/2,p?(y=(a.y1+a.y2)/2,u=a.x1,d=a.x2,r.segpts=[u,y,d,y]):g?(v=(a.x1+a.x2)/2,l=a.y1,x=a.y2,r.segpts=[v,l,v,x]):r.segpts=[a.x2,a.y1]),r.isRound&&(y=e.pstyle("taxi-radius").value,g="arc-radius"===e.pstyle("radius-type").value[0],r.radii=new Array(r.segpts.length/2).fill(y),r.isArcRadius=new Array(r.segpts.length/2).fill(g))},tryToCorrectInvalidPoints:function(e,t){var r,i,n,a,s,o,l,c,h,u,d,p,g,f,m,y,v,b,x,T,w,k,E=e._private.rscratch;"bezier"===E.edgeType&&(m=t.srcPos,r=t.tgtPos,i=t.srcW,n=t.srcH,a=t.tgtW,s=t.tgtH,k=t.srcShape,o=t.tgtShape,v=t.srcCornerRadius,l=t.tgtCornerRadius,b=t.srcRs,t=t.tgtRs,y=!he(E.startX)||!he(E.startY),f=!he(E.arrowStartX)||!he(E.arrowStartY),c=!he(E.endX)||!he(E.endY),h=!he(E.arrowEndX)||!he(E.arrowEndY),u=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth*3,x=(T=iie({x:E.ctrlpts[0],y:E.ctrlpts[1]},{x:E.startX,y:E.startY}))n.poolIndex()&&(e=i,i=n,n=e),r.srcPos=i.position()),s=r.tgtPos=n.position(),o=r.srcW=i.outerWidth(),l=r.srcH=i.outerHeight(),c=r.tgtW=n.outerWidth(),h=r.tgtH=n.outerHeight(),u=r.srcShape=M.nodeShapes[D.getNodeShape(i)],d=r.tgtShape=M.nodeShapes[D.getNodeShape(n)],p=r.srcCornerRadius="auto"===i.pstyle("corner-radius").value?"auto":i.pstyle("corner-radius").pfValue,g=r.tgtCornerRadius="auto"===n.pstyle("corner-radius").value?"auto":n.pstyle("corner-radius").pfValue,f=r.tgtRs=n._private.rscratch,m=r.srcRs=i._private.rscratch;r.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var y=0;y=N.desktopTapThreshold2),b(t)),o=(e&&(N.hoverData.tapholdCancelled=!0),mt(function(){var e=N.hoverData.dragDelta=N.hoverData.dragDelta||[];0===e.length?(e.push(f[0]),e.push(f[1])):(e[0]+=f[0],e[1]+=f[1])},"updateDragDelta")),y=(n=!0,I(d,["mousemove","vmousemove","tapdrag"],t,{x:l[0],y:l[1]}),mt(function(e){return{originalEvent:t,type:e,position:{x:l[0],y:l[1]}}},"makeEvent")),v=mt(function(){N.data.bgActivePosistion=void 0,N.hoverData.selecting||a.emit(y("boxstart")),u[4]=1,N.hoverData.selecting=!0,N.redrawHint("select",!0),N.redraw()},"goIntoBoxMode");if(3===N.hoverData.which?e&&(r=y("cxtdrag"),(g||a).emit(r),N.hoverData.cxtDragged=!0,!N.hoverData.cxtOver||d!==N.hoverData.cxtOver)&&(N.hoverData.cxtOver&&N.hoverData.cxtOver.emit(y("cxtdragout")),N.hoverData.cxtOver=d)&&d.emit(y("cxtdragover")):N.hoverData.dragging?(n=!0,a.panningEnabled()&&a.userPanningEnabled()&&(N.hoverData.justStartedPan?(r=N.hoverData.mdownPos,i={x:(l[0]-r[0])*s,y:(l[1]-r[1])*s},N.hoverData.justStartedPan=!1):i={x:f[0]*s,y:f[1]*s},a.panBy(i),a.emit(y("dragpan")),N.hoverData.dragged=!0),l=N.projectIntoViewport(t.clientX,t.clientY)):1!=u[4]||null!=g&&!g.pannable()?(g&&g.pannable()&&g.active()&&g.unactivate(),g&&g.grabbed()||d==p||(p&&I(p,["mouseout","tapdragout"],t,{x:l[0],y:l[1]}),d&&I(d,["mouseover","tapdragover"],t,{x:l[0],y:l[1]}),N.hoverData.last=d),g&&(e?a.boxSelectionEnabled()&&h?(g&&g.grabbed()&&(M(m),g.emit(y("freeon")),m.emit(y("free")),N.dragData.didDrag)&&(g.emit(y("dragfreeon")),m.emit(y("dragfree"))),v()):g&&g.grabbed()&&N.nodeIsDraggable(g)&&((r=!N.dragData.didDrag)&&N.redrawHint("eles",!0),N.dragData.didDrag=!0,N.hoverData.draggingEles||D(m,{inDragLayer:!0}),s={x:0,y:0},he(f[0])&&he(f[1])&&(s.x+=f[0],s.y+=f[1],r)&&((i=N.hoverData.dragDelta)&&he(i[0])&&he(i[1])&&(s.x+=i[0],s.y+=i[1])),N.hoverData.draggingEles=!0,m.silentShift(s).emit(y("position")).emit(y("drag")),N.redrawHint("drag",!0),N.redraw()):o()),n=!0):e&&(N.hoverData.dragging||!a.boxSelectionEnabled()||!h&&a.panningEnabled()&&a.userPanningEnabled()?!N.hoverData.selecting&&a.panningEnabled()&&a.userPanningEnabled()&&W(g,N.hoverData.downs)&&(N.hoverData.dragging=!0,N.hoverData.justStartedPan=!0,u[4]=0,N.data.bgActivePosistion=Hre(c),N.redrawHint("select",!0),N.redraw()):v(),g)&&g.pannable()&&g.active()&&g.unactivate(),u[2]=l[0],u[3]=l[1],n)return t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),!1}},"mousemoveHandler"),!1),N.registerBinding(e,"mouseup",mt(function(t){var e,r,i,n,a,s,o,l,c;1===N.hoverData.which&&1!==t.which&&N.hoverData.capture||N.hoverData.capture&&(N.hoverData.capture=!1,e=N.cy,r=N.projectIntoViewport(t.clientX,t.clientY),i=N.selection,l=N.findNearestElement(r[0],r[1],!0,!1),n=N.dragData.possibleDragElements,a=N.hoverData.down,c=b(t),N.data.bgActivePosistion&&(N.redrawHint("select",!0),N.redraw()),N.hoverData.tapholdCancelled=!0,N.data.bgActivePosistion=void 0,a&&a.unactivate(),s=mt(function(e){return{originalEvent:t,type:e,position:{x:r[0],y:r[1]}}},"makeEvent"),3===N.hoverData.which?(o=s("cxttapend"),(a||e).emit(o),N.hoverData.cxtDragged||(o=s("cxttap"),(a||e).emit(o)),N.hoverData.cxtDragged=!1,N.hoverData.which=null):1===N.hoverData.which&&(I(l,["mouseup","tapend","vmouseup"],t,{x:r[0],y:r[1]}),N.dragData.didDrag||N.hoverData.dragged||N.hoverData.selecting||N.hoverData.isOverThresholdDrag||(I(a,["click","tap","vclick"],t,{x:r[0],y:r[1]}),u=!1,t.timeStamp-d<=e.multiClickDebounceTime()?(h&&clearTimeout(h),u=!0,d=null,I(a,["dblclick","dbltap","vdblclick"],t,{x:r[0],y:r[1]})):(h=setTimeout(function(){u||I(a,["oneclick","onetap","voneclick"],t,{x:r[0],y:r[1]})},e.multiClickDebounceTime()),d=t.timeStamp)),null!=a||N.dragData.didDrag||N.hoverData.selecting||N.hoverData.dragged||b(t)||(e.$(p).unselect(["tapunselect"]),0=N.touchTapThreshold2}if(e&&N.touchData.cxt&&(t.preventDefault(),x=t.touches[0].clientX-G,T=t.touches[0].clientY-j,w=t.touches[1].clientX-G,k=t.touches[1].clientY-j,2.25<=(l=ce(x,T,w,k))/q||22500<=l)&&(N.touchData.cxt=!1,N.data.bgActivePosistion=void 0,N.redrawHint("select",!0),g=o("cxttapend"),N.touchData.start?(N.touchData.start.unactivate().emit(g),N.touchData.start=null):i.emit(g)),e&&N.touchData.cxt){var g=o("cxtdrag"),f=(N.data.bgActivePosistion=void 0,N.redrawHint("select",!0),(N.touchData.start||i).emit(g),N.touchData.start&&(N.touchData.start._private.grabbed=!1),N.touchData.cxtDragged=!0,N.findNearestElement(n[0],n[1],!0,!0));(!N.touchData.cxtOver||f!==N.touchData.cxtOver)&&(N.touchData.cxtOver&&N.touchData.cxtOver.emit(o("cxtdragout")),N.touchData.cxtOver=f)&&f.emit(o("cxtdragover"))}else if(e&&t.touches[2]&&i.boxSelectionEnabled())t.preventDefault(),N.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,N.touchData.selecting||i.emit(o("boxstart")),N.touchData.selecting=!0,N.touchData.didSelect=!0,r[4]=1,r&&0!==r.length&&void 0!==r[0]?(r[2]=(n[0]+n[2]+n[4])/3,r[3]=(n[1]+n[3]+n[5])/3):(r[0]=(n[0]+n[2]+n[4])/3,r[1]=(n[1]+n[3]+n[5])/3,r[2]=(n[0]+n[2]+n[4])/3+1,r[3]=(n[1]+n[3]+n[5])/3+1),N.redrawHint("select",!0),N.redraw();else if(e&&t.touches[1]&&!N.touchData.didSelect&&i.zoomingEnabled()&&i.panningEnabled()&&i.userZoomingEnabled()&&i.userPanningEnabled()){if(t.preventDefault(),N.data.bgActivePosistion=void 0,N.redrawHint("select",!0),E=N.dragData.touchDragEles){N.redrawHint("drag",!0);for(var m=0;m=f.deqFastCost*(1e3/60-(e?i:0)))break}else if(e){if(l>=f.deqCost*n||l>=f.deqAvgCost*i)break}else if(c>=f.deqNoDrawCost*(1e3/60))break;var h=f.deq(p,o,s);if(!(0=.2*e.width&&this.retireTexture(e)},bhe.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);.8=t)return a.retired=!1,a.usedWidth=0,a.invalidatedWidth=0,a.fullnessChecks=0,_re(a.eleCaches),a.context.setTransform(1,0,0,1,0,0),a.context.clearRect(0,0,a.width,a.height),Ere(i,a),r.push(a),a}},bhe.queueElement=function(e,t){var r=this.getElementQueue(),i=this.getElementKeyToQueue(),n=this.getKey(e),a=i[n];a?(a.level=Math.max(a.level,t),a.eles.merge(e),a.reqs++,r.updateItem(a)):(a={eles:e.spawn().merge(e),level:t,reqs:1,key:n},r.push(a),i[n]=a)},bhe.dequeue=function(e){for(var t=this.getElementQueue(),r=this.getElementKeyToQueue(),i=[],n=this.lookup,a=0;a<1&&0=f||!Tie(g.bb,v.boundingBox()))&&!(g=p({insert:!0,after:g})))return null;l||m?s.queueLayer(g,v):s.drawEleInLayer(g,v,a,e),g.eles.push(v),b[a]=g}}return l||(m?null:u)},Ehe.getEleLevelForLayerLevel=function(e,t){return e},Ehe.drawEleInLayer=function(e,t,r,i){var n=this.renderer,e=e.context,a=t.boundingBox();0!==a.w&&0!==a.h&&t.visible()&&(r=this.getEleLevelForLayerLevel(r,i),n.setImgSmoothing(e,!1),n.drawCachedElement(e,t,null,null,r,!0),n.setImgSmoothing(e,!0))},Ehe.levelIsComplete=function(e,t){var r=this.layersByLevel[e];if(!r||0===r.length)return!1;for(var i=0,n=0;ns.minMbLowQualFrames)&&(s.motionBlurPxRatio=s.mbPxRBlurry),s.clearingMotionBlur&&(s.motionBlurPxRatio=1),s.textureDrawLastFrame&&!a&&(n[s.NODE]=!0,n[s.SELECT_BOX]=!0),t.style()),v=t.zoom(),b=void 0!==c?c:v,x=t.pan(),T={x:x.x,y:x.y},w={zoom:v,pan:{x:x.x,y:x.y}},k=(void 0===(k=s.prevViewport)||w.zoom!==k.zoom||w.pan.x!==k.pan.x||w.pan.y!==k.pan.y||f&&!g||(s.motionBlurPxRatio=1),b*=i,(T=h||T).x*=i,T.y*=i,s.getCachedZSortedEles());function E(e,t,r,i,n){var a=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",s.colorFillStyle(e,255,255,255,s.motionBlurTransparency),e.fillRect(t,r,i,n),e.globalCompositeOperation=a}function _(e,t){var r,i,n,a=s.clearingMotionBlur||e!==u.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]&&e!==u.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]?(r=T,i=b,n=s.canvasWidth,s.canvasHeight):(r={x:x.x*p,y:x.y*p},i=v*p,n=s.canvasWidth*p,s.canvasHeight*p);e.setTransform(1,0,0,1,0,0),"motionBlur"===t?E(e,0,0,n,a):o||void 0!==t&&!t||e.clearRect(0,0,n,a),l||(e.translate(r.x,r.y),e.scale(i,i)),h&&e.translate(h.x,h.y),c&&e.scale(c,c)}mt(E,"mbclear"),mt(_,"setContextTransform"),a||(s.textureDrawLastFrame=!1),a?(s.textureDrawLastFrame=!0,s.textureCache||(s.textureCache={},s.textureCache.bb=t.mutableElements().boundingBox(),s.textureCache.texture=s.data.bufferCanvases[s.TEXTURE_BUFFER],(f=s.data.bufferContexts[s.TEXTURE_BUFFER]).setTransform(1,0,0,1,0,0),f.clearRect(0,0,s.canvasWidth*s.textureMult,s.canvasHeight*s.textureMult),s.render({forcedContext:f,drawOnlyNodeLayer:!0,forcedPxRatio:i*s.textureMult}),(w=s.textureCache.viewport={zoom:t.zoom(),pan:t.pan(),width:s.canvasWidth,height:s.canvasHeight}).mpan={x:(0-w.pan.x)/w.zoom,y:(0-w.pan.y)/w.zoom}),n[s.DRAG]=!1,n[s.NODE]=!1,S=u.contexts[s.NODE],g=s.textureCache.texture,w=s.textureCache.viewport,S.setTransform(1,0,0,1,0,0),d?E(S,0,0,w.width,w.height):S.clearRect(0,0,w.width,w.height),f=m.core("outside-texture-bg-color").value,m=m.core("outside-texture-bg-opacity").value,s.colorFillStyle(S,f[0],f[1],f[2],m),S.fillRect(0,0,w.width,w.height),v=t.zoom(),_(S,!1),S.clearRect(w.mpan.x,w.mpan.y,w.width/w.zoom/i,w.height/w.zoom/i),S.drawImage(g,w.mpan.x,w.mpan.y,w.width/w.zoom/i,w.height/w.zoom/i)):s.textureOnViewport&&!o&&(s.textureCache=null);var S,C,f=t.extent(),m=s.pinching||s.hoverData.dragging||s.swipePanning||s.data.wheelZooming||s.hoverData.draggingEles||s.cy.animated(),g=s.hideEdgesOnViewport&&m;(m=[])[s.NODE]=!n[s.NODE]&&d&&!s.clearedForMotionBlur[s.NODE]||s.clearingMotionBlur,m[s.NODE]&&(s.clearedForMotionBlur[s.NODE]=!0),m[s.DRAG]=!n[s.DRAG]&&d&&!s.clearedForMotionBlur[s.DRAG]||s.clearingMotionBlur,m[s.DRAG]&&(s.clearedForMotionBlur[s.DRAG]=!0),(n[s.NODE]||l||r||m[s.NODE])&&(C=d&&!m[s.NODE]&&1!==p,_(S=o||(C?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]:u.contexts[s.NODE]),d&&!C?"motionBlur":void 0),g?s.drawCachedNodes(S,k.nondrag,i,f):s.drawLayeredElements(S,k.nondrag,i,f),s.debug&&s.drawDebugPoints(S,k.nondrag),l||d||(n[s.NODE]=!1)),!r&&(n[s.DRAG]||l||m[s.DRAG])&&(C=d&&!m[s.DRAG]&&1!==p,_(S=o||(C?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]:u.contexts[s.DRAG]),d&&!C?"motionBlur":void 0),g?s.drawCachedNodes(S,k.drag,i,f):s.drawCachedElements(S,k.drag,i,f),s.debug&&s.drawDebugPoints(S,k.drag),l||d||(n[s.DRAG]=!1)),this.drawSelectionRectangle(e,_),d&&1!==p&&(r=u.contexts[s.NODE],C=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_NODE],g=u.contexts[s.DRAG],i=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_DRAG],f=mt(function(e,t,r){e.setTransform(1,0,0,1,0,0),r||!y?e.clearRect(0,0,s.canvasWidth,s.canvasHeight):E(e,0,0,s.canvasWidth,s.canvasHeight),r=p,e.drawImage(t,0,0,s.canvasWidth*r,s.canvasHeight*r,0,0,s.canvasWidth,s.canvasHeight)},"drawMotionBlur"),(n[s.NODE]||m[s.NODE])&&(f(r,C,m[s.NODE]),n[s.NODE]=!1),n[s.DRAG]||m[s.DRAG])&&(f(g,i,m[s.DRAG]),n[s.DRAG]=!1),s.prevViewport=w,s.clearingMotionBlur&&(s.clearingMotionBlur=!1,s.motionBlurCleared=!0,s.motionBlur=!0),d&&(s.motionBlurTimeout=setTimeout(function(){s.motionBlurTimeout=null,s.clearedForMotionBlur[s.NODE]=!1,s.clearedForMotionBlur[s.DRAG]=!1,s.motionBlur=!1,s.clearingMotionBlur=!a,s.mbFrames=0,n[s.NODE]=!0,n[s.DRAG]=!0,s.redraw()},100)),o||t.emit("render")},drawSelectionRectangle:function(e,t){var r,i=this,n=i.cy,a=i.data,n=n.style(),s=e.drawOnlyNodeLayer,o=e.drawAllLayers,l=a.canvasNeedsRedraw;(i.showFps||!s&&l[i.SELECT_BOX]&&!o)&&(t(s=e.forcedContext||a.contexts[i.SELECT_BOX]),1==i.selection[4]&&(i.hoverData.selecting||i.touchData.selecting)&&(r=i.cy.zoom(),t=n.core("selection-box-border-width").value/r,s.lineWidth=t,s.fillStyle="rgba("+n.core("selection-box-color").value[0]+","+n.core("selection-box-color").value[1]+","+n.core("selection-box-color").value[2]+","+n.core("selection-box-opacity").value+")",s.fillRect(i.selection[0],i.selection[1],i.selection[2]-i.selection[0],i.selection[3]-i.selection[1]),0=t-1)return!1;(this.freePointer.x!==c&&this.enableWrapping?s:(o(),r))()}return this.keyToLocation.set(e,g),this.needsBuffer=!0,g},"draw")},{key:"getOffsets",value:mt(function(e){return this.keyToLocation.get(e)},"getOffsets")},{key:"isEmpty",value:mt(function(){return 0===this.freePointer.x&&0===this.freePointer.row},"isEmpty")},{key:"canFit",value:mt(function(e){var t,r;return!this.locked&&(t=this.texSize,r=this.texRows,e=this.getScale(e).texW,!(this.freePointer.x+e>t)||this.freePointer.row p1. vec2 p01Norm = normalize(vec2(-p01.y, p01.x)); // Determine the bend direction. float sigma = sign(dot(p01 + p21, normal)); float width = aLineWidth[0]; if(sign(pos.y) == -sigma) { // This is an intersecting vertex. Adjust the position so that there's no overlap. vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm); gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0); } else { // This is a non-intersecting vertex. Treat it like a mitre join. vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm); gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0); } vColor = aColor; } else if(aVertType == `).concat(3,` && vid < 3) { // massage the first triangle into an edge arrow if(vid == 0) position = vec2(-0.15, -0.3); if(vid == 1) position = vec2( 0.0, 0.0); if(vid == 2) position = vec2( 0.15, -0.3); gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); vColor = aColor; } else { gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space } vAtlasId = aAtlasId; vVertType = aVertType; vIndex = aIndex; } `),i=this.batchManager.getIndexArray(),n=IJ(t,r,`#version 300 es precision highp float; // declare texture unit for each texture atlas in the batch `.concat(i.map(function(e){return"uniform sampler2D uTexture".concat(e,";")}).join(` `),` uniform vec4 uBGColor; uniform float uZoom; in vec2 vTexCoord; in vec4 vColor; in vec2 vPosition; // model coordinates flat in int vAtlasId; flat in vec4 vIndex; flat in int vVertType; flat in vec2 vTopRight; flat in vec2 vBotLeft; flat in vec4 vCornerRadius; flat in vec4 vBorderColor; flat in vec2 vBorderWidth; out vec4 outColor; `).concat(` float circleSD(vec2 p, float r) { return distance(vec2(0), p) - r; // signed distance } `,` `).concat(` float rectangleSD(vec2 p, vec2 b) { vec2 d = abs(p)-b; return distance(vec2(0),max(d,0.0)) + min(max(d.x,d.y),0.0); } `,` `).concat(` float roundRectangleSD(vec2 p, vec2 b, vec4 cr) { cr.xy = (p.x > 0.0) ? cr.xy : cr.zw; cr.x = (p.y > 0.0) ? cr.x : cr.y; vec2 q = abs(p) - b + cr.x; return min(max(q.x, q.y), 0.0) + distance(vec2(0), max(q, 0.0)) - cr.x; } `,` `).concat(` float ellipseSD(vec2 p, vec2 ab) { p = abs( p ); // symmetry // find root with Newton solver vec2 q = ab*(p-ab); float w = (q.x1.0) ? d : -d; } `,` vec4 blend(vec4 top, vec4 bot) { // blend colors with premultiplied alpha return vec4( top.rgb + (bot.rgb * (1.0 - top.a)), top.a + (bot.a * (1.0 - top.a)) ); } vec4 distInterp(vec4 cA, vec4 cB, float d) { // interpolate color using Signed Distance // scale to the zoom level so that borders don't look blurry when zoomed in // note 1.5 is an aribitrary value chosen because it looks good return mix(cA, cB, 1.0 - smoothstep(0.0, 1.5 / uZoom, abs(d))); } void main(void) { if(vVertType == `).concat(0,`) { // look up the texel from the texture unit `).concat(i.map(function(e){return"if(vAtlasId == ".concat(e,") outColor = texture(uTexture").concat(e,", vTexCoord);")}).join(` else `),` } else if(vVertType == `).concat(3,`) { // mimics how canvas renderer uses context.globalCompositeOperation = 'destination-out'; outColor = blend(vColor, uBGColor); outColor.a = 1.0; // make opaque, masks out line under arrow } else if(vVertType == `).concat(4,` && vBorderWidth == vec2(0.0)) { // simple rectangle with no border outColor = vColor; // unit square is already transformed to the rectangle, nothing else needs to be done } else if(vVertType == `).concat(4," || vVertType == ").concat(7,` || vVertType == `).concat(5," || vVertType == ").concat(6,`) { // use SDF float outerBorder = vBorderWidth[0]; float innerBorder = vBorderWidth[1]; float borderPadding = outerBorder * 2.0; float w = vTopRight.x - vBotLeft.x - borderPadding; float h = vTopRight.y - vBotLeft.y - borderPadding; vec2 b = vec2(w/2.0, h/2.0); // half width, half height vec2 p = vPosition - vec2(vTopRight.x - b[0] - outerBorder, vTopRight.y - b[1] - outerBorder); // translate to center float d; // signed distance if(vVertType == `).concat(4,`) { d = rectangleSD(p, b); } else if(vVertType == `).concat(7,` && w == h) { d = circleSD(p, b.x); // faster than ellipse } else if(vVertType == `).concat(7,`) { d = ellipseSD(p, b); } else { d = roundRectangleSD(p, b, vCornerRadius.wzyx); } // use the distance to interpolate a color to smooth the edges of the shape, doesn't need multisampling // we must smooth colors inwards, because we can't change pixels outside the shape's bounding box if(d > 0.0) { if(d > outerBorder) { discard; } else { outColor = distInterp(vBorderColor, vec4(0), d - outerBorder); } } else { if(d > innerBorder) { vec4 outerColor = outerBorder == 0.0 ? vec4(0) : vBorderColor; vec4 innerBorderColor = blend(vBorderColor, vColor); outColor = distInterp(innerBorderColor, outerColor, d); } else { vec4 outerColor; if(innerBorder == 0.0 && outerBorder == 0.0) { outerColor = vec4(0); } else if(innerBorder == 0.0) { outerColor = vBorderColor; } else { outerColor = blend(vBorderColor, vColor); } outColor = distInterp(vColor, outerColor, d - innerBorder); } } } else { outColor = vColor; } `).concat(e.picking?`if(outColor.a == 0.0) discard; else outColor = vIndex;`:"",` } `));n.aPosition=t.getAttribLocation(n,"aPosition"),n.aIndex=t.getAttribLocation(n,"aIndex"),n.aVertType=t.getAttribLocation(n,"aVertType"),n.aTransform=t.getAttribLocation(n,"aTransform"),n.aAtlasId=t.getAttribLocation(n,"aAtlasId"),n.aTex=t.getAttribLocation(n,"aTex"),n.aPointAPointB=t.getAttribLocation(n,"aPointAPointB"),n.aPointCPointD=t.getAttribLocation(n,"aPointCPointD"),n.aLineWidth=t.getAttribLocation(n,"aLineWidth"),n.aColor=t.getAttribLocation(n,"aColor"),n.aCornerRadius=t.getAttribLocation(n,"aCornerRadius"),n.aBorderColor=t.getAttribLocation(n,"aBorderColor"),n.uPanZoomMatrix=t.getUniformLocation(n,"uPanZoomMatrix"),n.uAtlasSize=t.getUniformLocation(n,"uAtlasSize"),n.uBGColor=t.getUniformLocation(n,"uBGColor"),n.uZoom=t.getUniformLocation(n,"uZoom"),n.uTextures=[];for(var a=0;a=this.maxInstances)&&this.endBatch()}}}catch(e){l.e(e)}finally{l.f()}}},"drawTexture")},{key:"setTransformMatrix",value:mt(function(e,t,r,i){var n,a,s=!(4=this.maxInstances&&this.endBatch()},"drawPickingRectangle")},{key:"drawNode",value:mt(function(e,t,r){var i,n,a,s,o=this.simpleShapeOptions.get(r);this._isVisible(e,o)&&(s=o.shapeProps,void 0===(n=this._getVertTypeForShape(e,s.shape))||o.isSimple&&!o.isSimple(e)?this.drawTexture(e,t,r):(r=this.instanceCount,5!==(this.vertTypeBuffer.getView(r)[0]=n)&&6!==n||(i=o.getBoundingBox(e),i=this._getCornerRadius(e,s.radius,i),(a=this.cornerRadiusBuffer.getView(r))[0]=i,a[1]=i,a[2]=i,a[3]=i,6===n&&(a[0]=0,a[2]=0)),zJ(t,this.indexBuffer.getView(r)),FJ(e.pstyle(s.color).value,e.pstyle(s.opacity).value,this.colorBuffer.getView(r)),(i=this.lineWidthBuffer.getView(r))[0]=0,i[1]=0,s.border&&0<(n=e.pstyle("border-width").value)&&(FJ(e.pstyle("border-color").value,e.pstyle("border-opacity").value,this.borderColorBuffer.getView(r)),"inside"===(a=e.pstyle("border-position").value)?(i[0]=0,i[1]=-n):"outside"===a?(i[0]=n,i[1]=0):(i[0]=t=n/2,i[1]=-t)),s=this.transformBuffer.getMatrixView(r),this.setTransformMatrix(e,s,o),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()))},"drawNode")},{key:"_getVertTypeForShape",value:mt(function(e,t){switch(e.pstyle(t).value){case"rectangle":return 4;case"ellipse":return 7;case"roundrectangle":case"round-rectangle":return 5;case"bottom-round-rectangle":return 6;default:return}},"_getVertTypeForShape")},{key:"_getCornerRadius",value:mt(function(e,t,r){var i=r.w,r=r.h;return"auto"===e.pstyle(t).value?Vie(i,r):(e=e.pstyle(t).pfValue,Math.min(e,r/2,i/2))},"_getCornerRadius")},{key:"drawEdgeArrow",value:mt(function(e,t,r){var i,n,a,s,o,l;e.visible()&&(l=e._private.rscratch,l="source"===r?(i=l.arrowStartX,n=l.arrowStartY,l.srcArrowAngle):(i=l.arrowEndX,n=l.arrowEndY,l.tgtArrowAngle),isNaN(i)||null==i||isNaN(n)||null==n||isNaN(l)||null==l||"none"!==e.pstyle(r+"-arrow-shape").value&&(r=e.pstyle(r+"-arrow-color").value,a=e.pstyle("opacity").value*e.pstyle("line-opacity").value,s=e.pstyle("width").pfValue,e=e.pstyle("arrow-scale").value,s=this.r.getArrowWidth(s,e),e=this.instanceCount,ZJ(o=this.transformBuffer.getMatrixView(e)),JJ(o,o,[i,n]),tee(o,o,[s,s]),eee(o,o,l),this.vertTypeBuffer.getView(e)[0]=3,zJ(t,this.indexBuffer.getView(e)),FJ(r,a,this.colorBuffer.getView(e)),this.instanceCount++,this.instanceCount>=this.maxInstances)&&this.endBatch())},"drawEdgeArrow")},{key:"drawEdgeLine",value:mt(function(e,t){if(e.visible()){var r=this._getEdgePoints(e);if(r){var i=e.pstyle("opacity").value,n=e.pstyle("line-opacity").value,a=e.pstyle("width").pfValue,s=e.pstyle("line-color").value,o=i*n;if(r.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),4==r.length)e=this.instanceCount,this.vertTypeBuffer.getView(e)[0]=1,zJ(t,this.indexBuffer.getView(e)),FJ(s,o,this.colorBuffer.getView(e)),this.lineWidthBuffer.getView(e)[0]=a,(i=this.pointAPointBBuffer.getView(e))[0]=r[0],i[1]=r[1],i[2]=r[2],i[3]=r[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch();else for(var l=0;l=this.maxInstances&&this.endBatch()}}}},"drawEdgeLine")},{key:"_isValidEdge",value:mt(function(e){return!((e=e._private.rscratch).badLine||null==e.allpts||isNaN(e.allpts[0]))},"_isValidEdge")},{key:"_getEdgePoints",value:mt(function(e){var t=e._private.rscratch;if(this._isValidEdge(e))return 4==(t=t.allpts).length?t:(e=this._getNumSegments(e),this._getCurveSegmentPoints(t,e))},"_getEdgePoints")},{key:"_getNumSegments",value:mt(function(e){return Math.min(Math.max(15,5),this.maxInstances)},"_getNumSegments")},{key:"_getCurveSegmentPoints",value:mt(function(e,t){if(4==e.length)return e;for(var r=Array(2*(t+1)),i=0;i<=t;i++)0==i?(r[0]=e[0],r[1]=e[1]):i==t?(r[2*i]=e[e.length-2],r[2*i+1]=e[e.length-1]):this._setCurvePoint(e,i/t,r,2*i);return r},"_getCurveSegmentPoints")},{key:"_setCurvePoint",value:mt(function(e,t,r,i){if(!(e.length<=2)){for(var n=Array(e.length-2),a=0;a{mt(function(e,t){"object"==typeof r&&"object"==typeof i?i.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof r?r.layoutBase=t():e.layoutBase=t()},"webpackUniversalModuleDefinition")(r,function(){return r=[function(e,t,r){function i(){}mt(i,"LayoutConstants"),i.QUALITY=1,i.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,i.DEFAULT_INCREMENTAL=!1,i.DEFAULT_ANIMATION_ON_LAYOUT=!0,i.DEFAULT_ANIMATION_DURING_LAYOUT=!1,i.DEFAULT_ANIMATION_PERIOD=50,i.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,i.DEFAULT_GRAPH_MARGIN=15,i.NODE_DIMENSIONS_INCLUDE_LABELS=!1,i.SIMPLE_NODE_HALF_SIZE=(i.SIMPLE_NODE_SIZE=40)/2,i.EMPTY_COMPOUND_NODE_SIZE=40,i.MIN_EDGE_LENGTH=1,i.INITIAL_WORLD_BOUNDARY=(i.WORLD_BOUNDARY=1e6)/1e3,i.WORLD_CENTER_X=1200,i.WORLD_CENTER_Y=900,e.exports=i},function(e,t,r){var i,n=r(2),a=r(8),s=r(9);function o(e,t,r){n.call(this,r),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=r,this.bendpoints=[],this.source=e,this.target=t}for(i in mt(o,"LEdge"),o.prototype=Object.create(n.prototype),n)o[i]=n[i];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(e){if(this.source===e)return this.target;if(this.target===e)return this.source;throw"Node is not incident with this edge"},o.prototype.getOtherEndInGraph=function(e,t){for(var r=this.getOtherEnd(e),i=t.getGraphManager().getRoot();;){if(r.getOwner()==t)return r;if(r.getOwner()==i)break;r=r.getOwner().getParent()}return null},o.prototype.updateLength=function(){var e=new Array(4);this.isOverlapingSourceAndTarget=a.getIntersection(this.target.getRect(),this.source.getRect(),e),this.isOverlapingSourceAndTarget||(this.lengthX=e[0]-e[2],this.lengthY=e[1]-e[3],Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.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=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=o},function(e,t,r){function i(e){this.vGraphObject=e}mt(i,"LGraphObject"),e.exports=i},function(e,t,r){var i,n=r(2),a=r(10),s=r(13),o=r(0),l=r(16),c=r(4);function h(e,t,r,i){n.call(this,i=null==r&&null==i?t:i),null!=e.graphManager&&(e=e.graphManager),this.estimatedSize=a.MIN_VALUE,this.inclusionTreeDepth=a.MAX_VALUE,this.vGraphObject=i,this.edges=[],this.graphManager=e,this.rect=null!=r&&null!=t?new s(t.x,t.y,r.width,r.height):new s}for(i in mt(h,"LNode"),h.prototype=Object.create(n.prototype),n)h[i]=n[i];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(e){this.rect.width=e},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(e){this.rect.height=e},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(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},h.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},h.prototype.setRect=function(e,t){this.rect.x=e.x,this.rect.y=e.y,this.rect.width=t.width,this.rect.height=t.height},h.prototype.setCenter=function(e,t){this.rect.x=e-this.rect.width/2,this.rect.y=t-this.rect.height/2},h.prototype.setLocation=function(e,t){this.rect.x=e,this.rect.y=t},h.prototype.moveBy=function(e,t){this.rect.x+=e,this.rect.y+=t},h.prototype.getEdgeListToNode=function(t){var r=[],i=this;return i.edges.forEach(function(e){if(e.target==t){if(e.source!=i)throw"Incorrect edge source!";r.push(e)}}),r},h.prototype.getEdgesBetween=function(t){var r=[],i=this;return i.edges.forEach(function(e){if(e.source!=i&&e.target!=i)throw"Incorrect edge source and/or target";e.target!=t&&e.source!=t||r.push(e)}),r},h.prototype.getNeighborsList=function(){var t=new Set,r=this;return r.edges.forEach(function(e){if(e.source==r)t.add(e.target);else{if(e.target!=r)throw"Incorrect incidency!";t.add(e.source)}}),t},h.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),r=0;re&&(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)),this.labelHeight>t)&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-t)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-t),this.setHeight(this.labelHeight))},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==a.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(e){(t=this.rect.x)>o.WORLD_BOUNDARY?t=o.WORLD_BOUNDARY:t<-o.WORLD_BOUNDARY&&(t=-o.WORLD_BOUNDARY),(r=this.rect.y)>o.WORLD_BOUNDARY?r=o.WORLD_BOUNDARY:r<-o.WORLD_BOUNDARY&&(r=-o.WORLD_BOUNDARY);var t=new c(t,r),r=e.inverseTransformPoint(t);this.setLocation(r.x,r.y)},h.prototype.getLeft=function(){return this.rect.x},h.prototype.getRight=function(){return this.rect.x+this.rect.width},h.prototype.getTop=function(){return this.rect.y},h.prototype.getBottom=function(){return this.rect.y+this.rect.height},h.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},e.exports=h},function(e,t,r){function i(e,t){null==e&&null==t?(this.x=0,this.y=0):(this.x=e,this.y=t)}mt(i,"PointD"),i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.setX=function(e){this.x=e},i.prototype.setY=function(e){this.y=e},i.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},i.prototype.getCopy=function(){return new i(this.x,this.y)},i.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=i},function(e,t,r){var i,n=r(2),d=r(10),a=r(0),s=r(6),o=r(3),l=r(1),p=r(13),c=r(12),h=r(11);function u(e,t,r){n.call(this,r),this.estimatedSize=d.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=e,null!=t&&t instanceof s?this.graphManager=t:null!=t&&t instanceof Layout&&(this.graphManager=t.graphManager)}for(i in mt(u,"LGraph"),u.prototype=Object.create(n.prototype),n)u[i]=n[i];u.prototype.getNodes=function(){return this.nodes},u.prototype.getEdges=function(){return this.edges},u.prototype.getGraphManager=function(){return this.graphManager},u.prototype.getParent=function(){return this.parent},u.prototype.getLeft=function(){return this.left},u.prototype.getRight=function(){return this.right},u.prototype.getTop=function(){return this.top},u.prototype.getBottom=function(){return this.bottom},u.prototype.isConnected=function(){return this.isConnected},u.prototype.add=function(e,t,r){if(null==t&&null==r){var i=e;if(null==this.graphManager)throw"Graph has no graph mgr!";if(-1=this.nodes.length&&(r=0,n.forEach(function(e){e.owner==t&&r++}),r==this.nodes.length)&&(this.isConnected=!0)}},e.exports=u},function(e,t,r){var c,h=r(1);function i(e){c=r(5),this.layout=e,this.graphs=[],this.edges=[]}mt(i,"LGraphManager"),i.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),e=this.add(e,t);return this.setRootGraph(e),this.rootGraph},i.prototype.add=function(e,t,r,i,n){if(null==r&&null==i&&null==n){if(null==e)throw"Graph is null!";if(null==t)throw"Parent node is null!";if(-1=t.getRight()?r[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(r[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?r[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(r[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom())),Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()))),t=(a=t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()?1:a)*r[0],e=r[1]/a;r[0]p.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*p.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-p.ADAPTATION_LOWER_NODE_LIMIT)/(p.ADAPTATION_UPPER_NODE_LIMIT-p.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-p.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=p.MAX_NODE_DISPLACEMENT_INCREMENTAL):(e>p.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(p.COOLING_ADAPTATION_FACTOR,1-(e-p.ADAPTATION_LOWER_NODE_LIMIT)/(p.ADAPTATION_UPPER_NODE_LIMIT-p.ADAPTATION_LOWER_NODE_LIMIT)*(1-p.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=p.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},a.prototype.calcSpringForces=function(){for(var e,t=this.getAllEdges(),r=0;rthis.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement=a.length||o>=a[0].length))for(var l=0;l{mt(function(e,t){"object"==typeof r&&"object"==typeof i?i.exports=t(Che()):"function"==typeof define&&define.amd?define(["layout-base"],t):"object"==typeof r?r.coseBase=t(Che()):e.coseBase=t(e.layoutBase)},"webpackUniversalModuleDefinition")(r,function(r){return n=[function(e,t){e.exports=r},function(e,t,r){var i,n=r(0).FDLayoutConstants;function a(){}for(i in mt(a,"CoSEConstants"),n)a[i]=n[i];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=n.DEFAULT_EDGE_LENGTH,a.DEFAULT_COMPONENT_SEPERATION=60,a.TILE=!0,a.TILING_PADDING_VERTICAL=10,a.TILING_PADDING_HORIZONTAL=10,a.TREE_REDUCTION_ON_INCREMENTAL=!1,e.exports=a},function(e,t,r){var i,n=r(0).FDLayoutEdge;function a(e,t,r){n.call(this,e,t,r)}for(i in mt(a,"CoSEEdge"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];e.exports=a},function(e,t,r){var i,n=r(0).LGraph;function a(e,t,r){n.call(this,e,t,r)}for(i in mt(a,"CoSEGraph"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];e.exports=a},function(e,t,r){var i,n=r(0).LGraphManager;function a(e){n.call(this,e)}for(i in mt(a,"CoSEGraphManager"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];e.exports=a},function(e,t,r){var i,n=r(0).FDLayoutNode,a=r(0).IMath;function s(e,t,r,i){n.call(this,e,t,r,i)}for(i in mt(s,"CoSENode"),s.prototype=Object.create(n.prototype),n)s[i]=n[i];s.prototype.move=function(){var e=this.graphManager.getLayout();this.displacementX=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*a.sign(this.displacementY)),null==this.child||0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),e.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},s.prototype.propogateDisplacementToChildren=function(e,t){for(var r,i=this.getChild().getNodes(),n=0;ni&&(i=Math.floor(s.y)),a=Math.floor(s.x+u.DEFAULT_COMPONENT_SEPERATION)}this.transform(new f(d.WORLD_CENTER_X-s.x/2,d.WORLD_CENTER_Y-s.y/2))},b.radialLayout=function(e,t,r){var i=Math.max(this.maxDiagonalInTree(e),u.DEFAULT_RADIAL_SEPARATION),t=(b.branchRadialLayout(t,null,0,359,0,i),l.calculateBounds(e)),n=new c;n.setDeviceOrgX(t.getMinX()),n.setDeviceOrgY(t.getMinY()),n.setWorldOrgX(r.x),n.setWorldOrgY(r.y);for(var a=0;al&&(l=h.rect.height)}r+=l+e.verticalPadding}},b.prototype.tileCompoundMembers=function(r,i){var n=this;this.tiledMemberPack=[],Object.keys(r).forEach(function(e){var t=i[e];n.tiledMemberPack[e]=n.tileNodes(r[e],t.paddingLeft+t.paddingRight),t.rect.width=n.tiledMemberPack[e].width,t.rect.height=n.tiledMemberPack[e].height})},b.prototype.tileNodes=function(e,t){var r={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:u.TILING_PADDING_VERTICAL,horizontalPadding:u.TILING_PADDING_HORIZONTAL};e.sort(function(e,t){return e.rect.width*e.rect.height>t.rect.width*t.rect.height?-1:e.rect.width*e.rect.heighte.rowHeight[r]&&(n=e.rowHeight[r],e.rowHeight[r]=i,n=e.rowHeight[r]-n),e.height+=n,e.rows[r].push(t)},b.prototype.getShortestRowIndex=function(e){for(var t=-1,r=Number.MAX_VALUE,i=0;ir&&(t=i,r=e.rowWidth[i]);return t},b.prototype.canAddHorizontal=function(e,t,r){var i,n,a=this.getShortestRowIndex(e);return a<0||(n=e.rowWidth[a])+e.horizontalPadding+t<=e.width||(i=0,e.rowHeight[a]a&&t!=r){i.splice(-1,1),e.rows[r].push(n),e.rowWidth[t]=e.rowWidth[t]-a,e.rowWidth[r]=e.rowWidth[r]+a,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var s=Number.MIN_VALUE,o=0;os&&(s=i[o].height);0{mt(function(e,t){"object"==typeof r&&"object"==typeof i?i.exports=t(Ahe()):"function"==typeof define&&define.amd?define(["cose-base"],t):"object"==typeof r?r.cytoscapeCoseBilkent=t(Ahe()):e.cytoscapeCoseBilkent=t(e.coseBase)},"webpackUniversalModuleDefinition")(r,function(r){return n=[function(e,t){e.exports=r},function(e,t,r){var i=r(0).layoutBase.LayoutConstants,n=r(0).layoutBase.FDLayoutConstants,a=r(0).CoSEConstants,g=r(0).CoSELayout,u=r(0).CoSENode,d=r(0).layoutBase.PointD,p=r(0).layoutBase.DimensionD,s={ready:mt(function(){},"ready"),stop:mt(function(){},"stop"),quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function o(e,t){var r,i={};for(r in e)i[r]=e[r];for(r in t)i[r]=t[r];return i}function l(e){this.options=o(s,e),c(this.options)}mt(o,"extend"),mt(l,"_CoSELayout");var c=mt(function(e){null!=e.nodeRepulsion&&(a.DEFAULT_REPULSION_STRENGTH=n.DEFAULT_REPULSION_STRENGTH=e.nodeRepulsion),null!=e.idealEdgeLength&&(a.DEFAULT_EDGE_LENGTH=n.DEFAULT_EDGE_LENGTH=e.idealEdgeLength),null!=e.edgeElasticity&&(a.DEFAULT_SPRING_STRENGTH=n.DEFAULT_SPRING_STRENGTH=e.edgeElasticity),null!=e.nestingFactor&&(a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor),null!=e.gravity&&(a.DEFAULT_GRAVITY_STRENGTH=n.DEFAULT_GRAVITY_STRENGTH=e.gravity),null!=e.numIter&&(a.MAX_ITERATIONS=n.MAX_ITERATIONS=e.numIter),null!=e.gravityRange&&(a.DEFAULT_GRAVITY_RANGE_FACTOR=n.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange),null!=e.gravityCompound&&(a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=n.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound),null!=e.gravityRangeCompound&&(a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound),null!=e.initialEnergyOnIncremental&&(a.DEFAULT_COOLING_FACTOR_INCREMENTAL=n.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental),"draft"==e.quality?i.QUALITY=0:"proof"==e.quality?i.QUALITY=2:i.QUALITY=1,a.NODE_DIMENSIONS_INCLUDE_LABELS=n.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,a.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=!e.randomize,a.ANIMATE=n.ANIMATE=i.ANIMATE=e.animate,a.TILE=e.tile,a.TILING_PADDING_VERTICAL="function"==typeof e.tilingPaddingVertical?e.tilingPaddingVertical.call():e.tilingPaddingVertical,a.TILING_PADDING_HORIZONTAL="function"==typeof e.tilingPaddingHorizontal?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal},"getUserOptions"),r=(l.prototype.run=function(){var s,o,l=this.options,c=(this.idToLNode={},this.layout=new g),h=this,e=(h.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this}),c.newGraphManager()),t=(this.gm=e,this.options.eles.nodes()),r=this.options.eles.edges();this.root=e.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(t),c);for(var i=0;i{let r={id:t.id,labelText:t.label,height:t.height,width:t.width,padding:t.padding??0};Object.keys(t).forEach(e=>{["id","label","height","width","padding","x","y"].includes(e)||(r[e]=t[e])}),i.add({group:"nodes",data:r,position:{x:t.x??0,y:t.y??0}})})}function Nhe(e,i){e.forEach(t=>{let r={id:t.id,source:t.start,target:t.end};Object.keys(t).forEach(e=>{["id","start","end"].includes(e)||(r[e]=t[e])}),i.add({group:"edges",data:r})})}function Ihe(i){return new Promise(t=>{let e=V("body").append("div").attr("id","cy").attr("style","display:none"),r=_he({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});e.remove(),Lhe(i.nodes,r),Nhe(i.edges,r),r.nodes().forEach(function(t){t.layoutDimensions=()=>{var e=t.data();return{w:e.width,h:e.height}}}),r.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),r.ready(e=>{M.info("Cytoscape ready",e),t(r)})})}function Dhe(e){return e.nodes().map(e=>{let t=e.data(),r=e.position(),i={id:t.id,x:r.x,y:r.y};return Object.keys(t).forEach(e=>{"id"!==e&&(i[e]=t[e])}),i})}function Mhe(e){return e.edges().map(e=>{let t=e.data(),r=e._private.rscratch,i={id:t.id,source:t.source,target:t.target,startX:r.startX,startY:r.startY,midX:r.midX,midY:r.midY,endX:r.endX,endY:r.endY};return Object.keys(t).forEach(e=>{["id","source","target"].includes(e)||(i[e]=t[e])}),i})}var Ohe,Phe=s(()=>{She(),Ohe=G(Rhe(),1),hw(),e(),_he.use(Ohe.default),mt(Lhe,"addNodes"),mt(Nhe,"addEdges"),mt(Ihe,"createCytoscapeInstance"),mt(Dhe,"extractPositionedNodes"),mt(Mhe,"extractPositionedEdges")});async function $he(e,t){M.debug("Starting cose-bilkent layout algorithm");try{Bhe(e);var r=await Ihe(e),i=Dhe(r),n=Mhe(r);return M.debug(`Layout completed: ${i.length} nodes, ${n.length} edges`),{nodes:i,edges:n}}catch(e){throw M.error("Error in cose-bilkent layout algorithm:",e),e}}function Bhe(e){if(!e)throw new Error("Layout data is required");if(!e.config)throw new Error("Configuration is required in layout data");if(!e.rootNode)throw new Error("Root node is required");if(!e.nodes||!Array.isArray(e.nodes))throw new Error("No nodes found in layout data");if(Array.isArray(e.edges))return!0;throw new Error("Edges array is required in layout data")}var Fhe,zhe=s(()=>{e(),Phe(),mt($he,"executeCoseBilkentLayout"),mt(Bhe,"validateLayoutData")}),qhe=s(()=>{zhe(),Fhe=mt(async(n,e,{insertCluster:a,insertEdge:s,insertEdgeLabel:o,insertMarkers:t,insertNode:l,log:c,positionEdgeLabel:h},{})=>{let u={},d={},r=e.select("g"),p=(t(r,n.markers,n.type,n.diagramId),r.insert("g").attr("class","subgraphs")),g=r.insert("g").attr("class","edgePaths"),f=r.insert("g").attr("class","edgeLabels"),m=r.insert("g").attr("class","nodes"),i=(c.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(n.nodes.map(async e=>{var t,r,i;e.isGroup?(t={...e},d[e.id]=t,u[e.id]=t,await a(p,e)):(t={...e},u[e.id]=t,i=(r=await l(m,e,{config:n.config,dir:n.direction||"TB"})).node().getBBox(),t.width=i.width,t.height=i.height,t.domId=r,c.debug(`Node ${e.id} dimensions: ${i.width}x`+i.height))})),c.debug("Running cose-bilkent layout algorithm"),{...n,nodes:n.nodes.map(e=>{var t=u[e.id];return{...e,width:t.width,height:t.height}})}),y=await $he(i,n.config);c.debug("Positioning nodes based on layout results"),y.nodes.forEach(e=>{var t=u[e.id];t?.domId&&(t.domId.attr("transform",`translate(${e.x}, ${e.y})`),t.x=e.x,t.y=e.y,c.debug(`Positioned node ${t.id} at center (${e.x}, ${e.y})`))}),y.edges.forEach(t=>{var e=n.edges.find(e=>e.id===t.id);e&&(e.points=[{x:t.startX,y:t.startY},{x:t.midX,y:t.midY},{x:t.endX,y:t.endY}])}),c.debug("Inserting and positioning edges"),await Promise.all(n.edges.map(async t=>{await o(f,t);var e,r=u[t.start??""],i=u[t.end??""];r&&i&&(e=(e=y.edges.find(e=>e.id===t.id))?(c.debug("APA01 positionedEdge",e),{...t}):{...t,points:[{x:r.x||0,y:r.y||0},{x:i.x||0,y:i.y||0}]},r=s(g,e,d,n.type,r,i,n.diagramId),h(e,r))})),c.debug("Cose-bilkent rendering completed")},"render")}),Uhe={};PGe(Uhe,{render:()=>Ghe});var Ghe,jhe,Whe,Yhe,Vhe,Hhe,Xhe,Khe,Zhe,Qhe,Jhe,eue,tue,rue,iue,nue,aue,sue,oue,lue=s(()=>{qhe(),Ghe=Fhe}),cue=s(()=>{xP(),e(),jhe={},Whe=mt(e=>{for(var t of e)jhe[t.name]=t},"registerLayoutLoaders"),mt(()=>{Whe([{name:"dagre",loader:mt(async()=>Promise.resolve().then(()=>(JK(),KK)),"loader")},{name:"cose-bilkent",loader:mt(async()=>Promise.resolve().then(()=>(lue(),Uhe)),"loader")}])},"registerDefaultLayoutLoaders")(),Yhe=mt(async(e,t)=>{var r;if(e.layoutAlgorithm in jhe)return(await(r=jhe[e.layoutAlgorithm]).loader()).render(e,t,vP,{algorithm:r.algorithm});throw new Error("Unknown layout algorithm: "+e.layoutAlgorithm)},"render"),Vhe=mt((e="",{fallback:t="dagre"}={})=>{if(e in jhe)return e;if(t in jhe)return M.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm")}),hue=s(()=>{ph(),e(),Hhe=mt((e,t,r,i)=>{e.attr("class",r);var{width:r,height:n,x:a,y:s}=Xhe(e,t),i=(rh(e,n,r,i),Khe(a,s,r,n,t));e.attr("viewBox",i),M.debug(`viewBox configured: ${i} with padding: `+t)},"setupViewPortForSVG"),Xhe=mt((e,t)=>({width:(e=e.node()?.getBBox()||{width:0,height:0,x:0,y:0}).width+2*t,height:e.height+2*t,x:e.x,y:e.y}),"calculateDimensionsWithPadding"),Khe=mt((e,t,r,i,n)=>e-n+` ${t-n} ${r} `+i,"createViewBox")}),uue=s(()=>{hw(),Au(),e(),gO(),cue(),hue(),hC(),Zhe=mt(function(e,t){return t.db.getClasses()},"getClasses"),Qhe=mt(async function(e,t,r,i){M.info("REF0:"),M.info("Drawing state diagram (v2)",t);let{securityLevel:n,flowchart:a,layout:s}=O(),o;"sandbox"===n&&(o=V("#i"+t));var l,c="sandbox"===n?o.nodes()[0].contentDocument:document,h=(M.debug("Before getData: "),i.db.getData()),u=(M.debug("Data: ",h),eO(t,n)),d=i.db.getDirection(),d=(h.type=i.type,h.layoutAlgorithm=Vhe(s),"dagre"===h.layoutAlgorithm&&"elk"===s&&M.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),h.direction=d,h.nodeSpacing=a?.nodeSpacing||50,h.rankSpacing=a?.rankSpacing||50,h.markers=["point","circle","cross"],h.diagramId=t,M.debug("REF1:",h),await Yhe(h,u),h.config.flowchart?.diagramPadding??8);sC.insertTitle(u,"flowchartTitleText",a?.titleTopMargin||0,i.db.getDiagramTitle()),Hhe(u,d,"flowchart",a?.useMaxWidth||!1);for(l of h.nodes){var p=V(`#${t} [id="${l.id}"]`);if(p&&l.link){let e=c.createElementNS("http://www.w3.org/2000/svg","a"),t=(e.setAttributeNS("http://www.w3.org/2000/svg","class",l.cssClasses),e.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===n?e.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):l.linkTarget&&e.setAttributeNS("http://www.w3.org/2000/svg","target",l.linkTarget),p.insert(function(){return e},":first-child")),r=p.select(".label-container"),i=(r&&t.append(function(){return r.node()}),p.select(".label"));i&&t.append(function(){return i.node()})}}},"draw"),Jhe={getClasses:Zhe,draw:Qhe}}),due=s(()=>{function P(){this.yy={}}var e=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),$=[1,4],B=[1,3],F=[1,5],z=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],q=[2,2],U=[1,13],G=[1,14],j=[1,15],W=[1,16],Y=[1,23],V=[1,25],H=[1,26],X=[1,27],t=[1,50],r=[1,49],K=[1,29],Z=[1,30],Q=[1,31],J=[1,32],ee=[1,33],i=[1,45],n=[1,47],a=[1,43],s=[1,48],o=[1,44],l=[1,51],c=[1,46],h=[1,52],u=[1,53],te=[1,34],re=[1,35],ie=[1,36],ne=[1,37],ae=[1,38],se=[1,58],d=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],p=[1,62],g=[1,61],f=[1,63],oe=[8,9,11,75,77,78],le=[1,79],ce=[1,92],he=[1,97],ue=[1,96],de=[1,93],pe=[1,89],ge=[1,95],fe=[1,91],me=[1,98],ye=[1,94],ve=[1,99],be=[1,90],xe=[8,9,10,11,40,75,77,78],m=[8,9,10,11,40,46,75,77,78],y=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],Te=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],we=[44,60,89,102,105,106,109,111,114,115,116],ke=[1,122],Ee=[1,123],_e=[1,125],Se=[1,124],Ce=[44,60,62,74,89,102,105,106,109,111,114,115,116],Ae=[1,134],Re=[1,148],Le=[1,149],Ne=[1,150],Ie=[1,151],De=[1,136],Me=[1,138],Oe=[1,142],Pe=[1,143],$e=[1,144],Be=[1,145],Fe=[1,146],ze=[1,147],qe=[1,152],Ue=[1,153],Ge=[1,132],je=[1,133],We=[1,140],Ye=[1,135],Ve=[1,139],He=[1,137],Xe=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],Ke=[1,155],Ze=[1,157],v=[8,9,11],b=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],x=[1,177],T=[1,173],w=[1,174],k=[1,178],E=[1,175],_=[1,176],Qe=[77,116,119],S=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],Je=[10,106],et=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],C=[1,248],A=[1,246],R=[1,250],L=[1,244],N=[1,245],I=[1,247],D=[1,249],M=[1,251],tt=[1,269],rt=[8,9,11,106],O=[8,9,10,11,60,84,105,106,109,110,111,112],$={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,direction_td:125,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",78:"LINK_ID",80:"STR",81:"MD_STR",84:"STYLE",85:"LINKSTYLE",86:"CLASSDEF",87:"CLASS",88:"CLICK",89:"DOWN",90:"UP",93:"idString[vertex]",94:"idString[class]",95:"CALLBACKNAME",96:"CALLBACKARGS",97:"HREF",98:"LINK_TARGET",99:"STR[link]",100:"STR[tooltip]",102:"DEFAULT",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"NODE_STRING",110:"UNIT",111:"BRKT",112:"PCT",114:"MINUS",115:"MULT",116:"UNICODE_TEXT",117:"TEXT",118:"TAGSTART",119:"EDGE_TEXT",121:"direction_tb",122:"direction_bt",123:"direction_rl",124:"direction_lr",125:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1],[33,1]],performAction:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 2:this.$=[];break;case 3:(!Array.isArray(a[o])||0t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0"),40;case 11:return 40;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 95;case 17:this.popState();break;case 18:return 96;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 88;case 35:case 36:case 37:return e.lex.firstGraph()&&this.begin("dir"),12;case 38:return 27;case 39:return 32;case 40:case 41:case 42:case 43:return 98;case 44:return this.popState(),13;case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:return this.popState(),14;case 55:return 121;case 56:return 122;case 57:return 123;case 58:return 124;case 59:return 125;case 60:return 78;case 61:return 105;case 62:return 111;case 63:return 46;case 64:return 60;case 65:return 44;case 66:return 8;case 67:return 106;case 68:return 115;case 69:return this.popState(),77;case 70:return this.pushState("edgeText"),75;case 71:return 119;case 72:return this.popState(),77;case 73:return this.pushState("thickEdgeText"),75;case 74:return 119;case 75:return this.popState(),77;case 76:return this.pushState("dottedEdgeText"),75;case 77:return 119;case 78:return 77;case 79:return this.popState(),53;case 80:return"TEXT";case 81:return this.pushState("ellipseText"),52;case 82:return this.popState(),55;case 83:return this.pushState("text"),54;case 84:return this.popState(),57;case 85:return this.pushState("text"),56;case 86:return 58;case 87:return this.pushState("text"),67;case 88:return this.popState(),64;case 89:return this.pushState("text"),63;case 90:return this.popState(),49;case 91:return this.pushState("text"),48;case 92:return this.popState(),69;case 93:return this.popState(),71;case 94:return 117;case 95:return this.pushState("trapText"),68;case 96:return this.pushState("trapText"),70;case 97:return 118;case 98:return 67;case 99:return 90;case 100:return"SEP";case 101:return 89;case 102:return 115;case 103:return 111;case 104:return 44;case 105:return 109;case 106:return 114;case 107:return 116;case 108:return this.popState(),62;case 109:return this.pushState("text"),62;case 110:return this.popState(),51;case 111:return this.pushState("text"),50;case 112:return this.popState(),31;case 113:return this.pushState("text"),29;case 114:return this.popState(),66;case 115:return this.pushState("text"),65;case 116:return"TEXT";case 117:return"QUOTE";case 118:return 9;case 119:return 10;case 120:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:.*direction\s+TD[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},shapeData:{rules:[8,11,12,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},callbackargs:{rules:[17,18,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},callbackname:{rules:[14,15,16,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},href:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},click:{rules:[21,24,33,34,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},dottedEdgeText:{rules:[21,24,75,77,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},thickEdgeText:{rules:[21,24,72,74,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},edgeText:{rules:[21,24,69,71,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},trapText:{rules:[21,24,78,81,83,85,89,91,92,93,94,95,96,109,111,113,115],inclusive:!1},ellipseText:{rules:[21,24,78,79,80,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},text:{rules:[21,24,78,81,82,83,84,85,88,89,90,91,95,96,108,109,110,111,112,113,114,115,116],inclusive:!1},vertex:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_descr:{rules:[3,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_title:{rules:[1,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},md_string:{rules:[19,20,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},string:{rules:[21,22,23,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,72,73,75,76,78,81,83,85,86,87,89,91,95,96,97,98,99,100,101,102,103,104,105,106,107,109,111,113,115,117,118,119,120],inclusive:!0}}};$.lexer=B,mt(P,"Parser"),(eue=new((P.prototype=$).Parser=P)).parser=eue,tue=eue}),pue=s(()=>{due(),(rue=Object.assign({},tue)).parse=e=>(e=e.replace(/}\s*\n/g,`} `),tue.parse(e)),iue=rue}),gue=s(()=>{nue=mt(()=>` /* Font Awesome icon styling - consolidated */ .label-icon { display: inline-block; height: 1em; overflow: visible; vertical-align: -0.125em; } .node .label-icon path { fill: currentColor; stroke: revert; stroke-width: revert; } `,"getIconStyles")}),fue=s(()=>{Kr(),gue(),aue=mt((e,t)=>{var r=(n=ht)(e,"r"),i=n(e,"g"),n=n(e,"b");return lt(r,i,n,t)},"fade"),sue=mt(e=>`.label { font-family: ${e.fontFamily}; color: ${e.nodeTextColor||e.textColor}; } .cluster-label text { fill: ${e.titleColor}; } .cluster-label span { color: ${e.titleColor}; } .cluster-label span p { background-color: transparent; } .label text,span { fill: ${e.nodeTextColor||e.textColor}; color: ${e.nodeTextColor||e.textColor}; } .node rect, .node circle, .node ellipse, .node polygon, .node path { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; stroke-width: 1px; } .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label { 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; } .rough-node .label,.node .label, .image-shape .label, .icon-shape .label { text-align: center; } .node.clickable { cursor: pointer; } .root .anchor path { fill: ${e.lineColor} !important; stroke-width: 0; stroke: ${e.lineColor}; } .arrowheadPath { fill: ${e.arrowheadColor}; } .edgePath .path { stroke: ${e.lineColor}; stroke-width: 2.0px; } .flowchart-link { stroke: ${e.lineColor}; fill: none; } .edgeLabel { background-color: ${e.edgeLabelBackground}; p { background-color: ${e.edgeLabelBackground}; } rect { opacity: 0.5; background-color: ${e.edgeLabelBackground}; fill: ${e.edgeLabelBackground}; } text-align: center; } /* For html labels only */ .labelBkg { background-color: ${aue(e.edgeLabelBackground,.5)}; // background-color: } .cluster rect { fill: ${e.clusterBkg}; stroke: ${e.clusterBorder}; stroke-width: 1px; } .cluster text { fill: ${e.titleColor}; } .cluster span { color: ${e.titleColor}; } /* .cluster div { color: ${e.titleColor}; } */ div.mermaidTooltip { position: absolute; text-align: center; max-width: 200px; padding: 2px; font-family: ${e.fontFamily}; font-size: 12px; background: ${e.tertiaryColor}; border: 1px solid ${e.border2}; border-radius: 2px; pointer-events: none; z-index: 100; } .flowchartTitleText { text-anchor: middle; font-size: 18px; fill: ${e.textColor}; } rect.text { fill: none; stroke-width: 0; } .icon-shape, .image-shape { background-color: ${e.edgeLabelBackground}; p { background-color: ${e.edgeLabelBackground}; padding: 2px; } .label rect { opacity: 0.5; background-color: ${e.edgeLabelBackground}; fill: ${e.edgeLabelBackground}; } text-align: center; } ${nue()} `,"getStyles"),oue=sue}),mue={};PGe(mue,{diagram:()=>yue});var yue,vue,bue,xue,Tue=s(()=>{Au(),pO(),uue(),pue(),fue(),yue={parser:iue,get db(){return new JM},renderer:Jhe,styles:oue,init:mt(e=>{e.flowchart||(e.flowchart={}),e.layout&&Rh({layout:e.layout}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,Rh({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}})},"init")}}),wue=s(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],i=[1,10],n=[1,11],a=[1,12],s=[1,13],o=[1,23],l=[1,24],P=[1,25],$=[1,26],B=[1,27],c=[1,19],F=[1,28],z=[1,29],h=[1,20],u=[1,18],d=[1,21],p=[1,22],g=[1,36],f=[1,37],m=[1,38],y=[1,39],v=[1,40],b=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,65,66,67,68,69],x=[1,45],T=[1,46],w=[1,55],k=[40,48,50,51,52,70,71],E=[1,66],_=[1,64],S=[1,61],C=[1,65],A=[1,67],R=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,65,66,67,68,69],q=[65,66,67,68,69],U=[1,84],G=[1,83],j=[1,81],W=[1,82],Y=[6,10,42,47],L=[6,10,13,41,42,47,48,49],N=[1,92],I=[1,91],D=[1,90],M=[19,58],V=[1,101],H=[1,100],O=[19,58,60,62],i={trace:mt(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,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,attributeKeyType:59,",":60,ATTRIBUTE_KEY:61,COMMENT:62,cardinality:63,relType:64,ZERO_OR_ONE:65,ZERO_OR_MORE:66,ONE_OR_MORE:67,ONLY_ONE:68,MD_PARENT:69,NON_IDENTIFYING:70,IDENTIFYING:71,WORD:72,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",51:"DECIMAL_NUM",52:"ENTITY_ONE",58:"ATTRIBUTE_WORD",60:",",61:"ATTRIBUTE_KEY",62:"COMMENT",65:"ZERO_OR_ONE",66:"ZERO_OR_MORE",67:"ONE_OR_MORE",68:"ONLY_ONE",69:"MD_PARENT",70:"NON_IDENTIFYING",71:"IDENTIFYING",72:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[55,1],[56,1],[56,3],[59,1],[57,1],[12,3],[63,1],[63,1],[63,1],[63,1],[63,1],[64,1],[64,1],[14,1],[14,1],[14,1]],performAction:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 1:break;case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:i.addEntity(a[o-4]),i.addEntity(a[o-2]),i.addRelationship(a[o-4],a[o],a[o-2],a[o-3]);break;case 9:i.addEntity(a[o-8]),i.addEntity(a[o-4]),i.addRelationship(a[o-8],a[o],a[o-4],a[o-5]),i.setClass([a[o-8]],a[o-6]),i.setClass([a[o-4]],a[o-2]);break;case 10:i.addEntity(a[o-6]),i.addEntity(a[o-2]),i.addRelationship(a[o-6],a[o],a[o-2],a[o-3]),i.setClass([a[o-6]],a[o-4]);break;case 11:i.addEntity(a[o-6]),i.addEntity(a[o-4]),i.addRelationship(a[o-6],a[o],a[o-4],a[o-5]),i.setClass([a[o-4]],a[o-2]);break;case 12:i.addEntity(a[o-3]),i.addAttributes(a[o-3],a[o-1]);break;case 13:i.addEntity(a[o-5]),i.addAttributes(a[o-5],a[o-1]),i.setClass([a[o-5]],a[o-3]);break;case 14:i.addEntity(a[o-2]);break;case 15:i.addEntity(a[o-4]),i.setClass([a[o-4]],a[o-2]);break;case 16:i.addEntity(a[o]);break;case 17:i.addEntity(a[o-2]),i.setClass([a[o-2]],a[o]);break;case 18:i.addEntity(a[o-6],a[o-4]),i.addAttributes(a[o-6],a[o-1]);break;case 19:i.addEntity(a[o-8],a[o-6]),i.addAttributes(a[o-8],a[o-1]),i.setClass([a[o-8]],a[o-3]);break;case 20:i.addEntity(a[o-5],a[o-3]);break;case 21:i.addEntity(a[o-7],a[o-5]),i.setClass([a[o-7]],a[o-2]);break;case 22:i.addEntity(a[o-3],a[o-1]);break;case 23:i.addEntity(a[o-5],a[o-3]),i.setClass([a[o-5]],a[o]);break;case 24:case 25:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 26:case 27:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 32:i.setDirection("TB");break;case 33:i.setDirection("BT");break;case 34:i.setDirection("RL");break;case 35:i.setDirection("LR");break;case 36:this.$=a[o-3],i.addClass(a[o-2],a[o-1]);break;case 37:case 38:case 59:case 67:this.$=[a[o]];break;case 39:case 40:this.$=a[o-2].concat([a[o]]);break;case 41:this.$=a[o-2],i.setClass(a[o-1],a[o]);break;case 42:this.$=a[o-3],i.addCssStyles(a[o-2],a[o-1]);break;case 43:this.$=[a[o]];break;case 44:a[o-2].push(a[o]),this.$=a[o-2];break;case 46:this.$=a[o-1]+a[o];break;case 54:case 79:case 80:this.$=a[o].replace(/"/g,"");break;case 55:case 56:case 57:case 58:case 81:this.$=a[o];break;case 60:a[o].push(a[o-1]),this.$=a[o];break;case 61:this.$={type:a[o-1],name:a[o]};break;case 62:this.$={type:a[o-2],name:a[o-1],keys:a[o]};break;case 63:this.$={type:a[o-2],name:a[o-1],comment:a[o]};break;case 64:this.$={type:a[o-3],name:a[o-2],keys:a[o-1],comment:a[o]};break;case 65:case 66:case 69:this.$=a[o];break;case 68:a[o-2].push(a[o]),this.$=a[o-2];break;case 70:this.$=a[o].replace(/"/g,"");break;case 71:this.$={cardA:a[o],relType:a[o-1],cardB:a[o-2]};break;case 72:this.$=i.Cardinality.ZERO_OR_ONE;break;case 73:this.$=i.Cardinality.ZERO_OR_MORE;break;case 74:this.$=i.Cardinality.ONE_OR_MORE;break;case 75:this.$=i.Cardinality.ONLY_ONE;break;case 76:this.$=i.Cardinality.MD_PARENT;break;case 77:this.$=i.Identification.NON_IDENTIFYING;break;case 78:this.$=i.Identification.IDENTIFYING}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:i,24:n,26:a,28:s,29:14,30:15,31:16,32:17,33:o,34:l,35:P,36:$,37:B,40:c,43:F,44:z,48:h,50:u,51:d,52:p},t(r,[2,7],{1:[2,1]}),t(r,[2,3]),{9:30,11:9,22:i,24:n,26:a,28:s,29:14,30:15,31:16,32:17,33:o,34:l,35:P,36:$,37:B,40:c,43:F,44:z,48:h,50:u,51:d,52:p},t(r,[2,5]),t(r,[2,6]),t(r,[2,16],{12:31,63:35,15:[1,32],17:[1,33],20:[1,34],65:g,66:f,67:m,68:y,69:v}),{23:[1,41]},{25:[1,42]},{27:[1,43]},t(r,[2,27]),t(r,[2,28]),t(r,[2,29]),t(r,[2,30]),t(r,[2,31]),t(b,[2,54]),t(b,[2,55]),t(b,[2,56]),t(b,[2,57]),t(b,[2,58]),t(r,[2,32]),t(r,[2,33]),t(r,[2,34]),t(r,[2,35]),{16:44,40:x,41:T},{16:47,40:x,41:T},{16:48,40:x,41:T},t(r,[2,4]),{11:49,40:c,48:h,50:u,51:d,52:p},{16:50,40:x,41:T},{18:51,19:[1,52],53:53,54:54,58:w},{11:56,40:c,48:h,50:u,51:d,52:p},{64:57,70:[1,58],71:[1,59]},t(k,[2,72]),t(k,[2,73]),t(k,[2,74]),t(k,[2,75]),t(k,[2,76]),t(r,[2,24]),t(r,[2,25]),t(r,[2,26]),{13:E,38:60,41:_,42:S,45:62,46:63,48:C,49:A},t(R,[2,37]),t(R,[2,38]),{16:68,40:x,41:T,42:S},{13:E,38:69,41:_,42:S,45:62,46:63,48:C,49:A},{13:[1,70],15:[1,71]},t(r,[2,17],{63:35,12:72,17:[1,73],42:S,65:g,66:f,67:m,68:y,69:v}),{19:[1,74]},t(r,[2,14]),{18:75,19:[2,59],53:53,54:54,58:w},{55:76,58:[1,77]},{58:[2,65]},{21:[1,78]},{63:79,65:g,66:f,67:m,68:y,69:v},t(q,[2,77]),t(q,[2,78]),{6:U,10:G,39:80,42:j,47:W},{40:[1,85],41:[1,86]},t(Y,[2,43],{46:87,13:E,41:_,48:C,49:A}),t(L,[2,45]),t(L,[2,50]),t(L,[2,51]),t(L,[2,52]),t(L,[2,53]),t(r,[2,41],{42:S}),{6:U,10:G,39:88,42:j,47:W},{14:89,40:N,50:I,72:D},{16:93,40:x,41:T},{11:94,40:c,48:h,50:u,51:d,52:p},{18:95,19:[1,96],53:53,54:54,58:w},t(r,[2,12]),{19:[2,60]},t(M,[2,61],{56:97,57:98,59:99,61:V,62:H}),t([19,58,61,62],[2,66]),t(r,[2,22],{15:[1,103],17:[1,102]}),t([40,48,50,51,52],[2,71]),t(r,[2,36]),{13:E,41:_,45:104,46:63,48:C,49:A},t(r,[2,47]),t(r,[2,48]),t(r,[2,49]),t(R,[2,39]),t(R,[2,40]),t(L,[2,46]),t(r,[2,42]),t(r,[2,8]),t(r,[2,79]),t(r,[2,80]),t(r,[2,81]),{13:[1,105],42:S},{13:[1,107],15:[1,106]},{19:[1,108]},t(r,[2,15]),t(M,[2,62],{57:109,60:[1,110],62:H}),t(M,[2,63]),t(O,[2,67]),t(M,[2,70]),t(O,[2,69]),{18:111,19:[1,112],53:53,54:54,58:w},{16:113,40:x,41:T},t(Y,[2,44],{46:87,13:E,41:_,48:C,49:A}),{14:114,40:N,50:I,72:D},{16:115,40:x,41:T},{14:116,40:N,50:I,72:D},t(r,[2,13]),t(M,[2,64]),{59:117,61:V},{19:[1,118]},t(r,[2,20]),t(r,[2,23],{17:[1,119],42:S}),t(r,[2,11]),{13:[1,120],42:S},t(r,[2,10]),t(O,[2,68]),t(r,[2,18]),{18:121,19:[1,122],53:53,54:54,58:w},{14:123,40:N,50:I,72:D},{19:[1,124]},t(r,[2,21]),t(r,[2,9]),t(r,[2,19])],defaultActions:{55:[2,65],75:[2,60]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0{e(),Au(),Cu(),hC(),xue=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.direction="TB",this.Cardinality={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"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=Th,this.getAccTitle=wh,this.setAccDescription=kh,this.getAccDescription=Eh,this.setDiagramTitle=_h,this.getDiagramTitle=Sh,this.getConfig=mt(()=>O().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{mt(this,"ErDB")}addEntity(e,t=""){return this.entities.has(e)?!this.entities.get(e)?.alias&&t&&(this.entities.get(e).alias=t,M.info(`Add alias '${t}' to entity '${e}'`)):(this.entities.set(e,{id:`entity-${e}-`+this.entities.size,label:e,attributes:[],alias:t,shape:"erBox",look:O().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),M.info("Added new entity :",e)),this.entities.get(e)}getEntity(e){return this.entities.get(e)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(e,t){let r=this.addEntity(e),i;for(i=t.length-1;0<=i;i--)t[i].keys||(t[i].keys=[]),t[i].comment||(t[i].comment=""),r.attributes.push(t[i]),M.debug("Added attribute ",t[i].name)}addRelationship(e,t,r,i){e=this.entities.get(e),r=this.entities.get(r),e&&r&&(e={entityA:e.id,roleA:t,entityB:r.id,relSpec:i},this.relationships.push(e),M.debug("Added new relationship :",e))}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(e){this.direction=e}getCompiledStyles(e){let t=[];for(var r of e)(r=this.classes.get(r))?.styles&&(t=[...t,...r.styles??[]].map(e=>e.trim())),r?.textStyles&&(t=[...t,...r.textStyles??[]].map(e=>e.trim()));return t}addCssStyles(e,t){for(var r of e){var i,n=this.entities.get(r);if(!t||!n)return;for(i of t)n.cssStyles.push(i)}}addClass(e,t){e.forEach(e=>{let r=this.classes.get(e);void 0===r&&(r={id:e,styles:[],textStyles:[]},this.classes.set(e,r)),t&&t.forEach(function(e){var t;/color/.exec(e)&&(t=e.replace("fill","bgFill"),r.textStyles.push(t)),r.styles.push(e)})})}setClass(e,t){for(var r of e){var i=this.entities.get(r);if(i)for(var n of t)i.cssClasses+=" "+n}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],xh()}getData(){var e,t,r=[],i=[],n=O();for(e of this.entities.keys()){var a=this.entities.get(e);a&&(a.cssCompiledStyles=this.getCompiledStyles(a.cssClasses.split(" ")),r.push(a))}let s=0;for(t of this.relationships){var o={id:cC(t.entityA,t.entityB,{prefix:"id",counter:s++}),type:"normal",curve:"basis",start:t.entityA,end:t.entityB,label:t.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:t.relSpec.cardB.toLowerCase(),arrowTypeEnd:t.relSpec.cardA.toLowerCase(),pattern:"IDENTIFYING"==t.relSpec.relType?"solid":"dashed",look:n.look,labelType:"markdown"};i.push(o)}return{nodes:r,edges:i,other:{},config:n,direction:"TB"}}}}),Eue={};PGe(Eue,{draw:()=>_ue});var _ue,Sue,Cue,Aue,Rue=s(()=>{Au(),e(),gO(),cue(),hue(),hC(),hw(),_ue=mt(async function(e,t,r,i){M.info("REF0:"),M.info("Drawing er diagram (unified)",t);let{securityLevel:n,er:a,layout:s}=O(),o=i.db.getData(),l=eO(t,n);o.type=i.type,o.layoutAlgorithm=Vhe(s),o.config.flowchart.nodeSpacing=a?.nodeSpacing||140,o.config.flowchart.rankSpacing=a?.rankSpacing||80,o.direction=i.db.getDirection(),o.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],o.diagramId=t,await Yhe(o,l),"elk"===o.layoutAlgorithm&&l.select(".edges").lower(),t=l.selectAll('[id*="-background"]'),0{Kr(),Sue=mt((e,t)=>{var r=(n=ht)(e,"r"),i=n(e,"g"),n=n(e,"b");return lt(r,i,n,t)},"fade"),Cue=mt(e=>` .entityBox { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; } .relationshipLabelBox { fill: ${e.tertiaryColor}; opacity: 0.7; background-color: ${e.tertiaryColor}; rect { opacity: 0.5; } } .labelBkg { background-color: ${Sue(e.tertiaryColor,.5)}; } .edgeLabel .label { fill: ${e.nodeBorder}; font-size: 14px; } .label { font-family: ${e.fontFamily}; color: ${e.nodeTextColor||e.textColor}; } .edge-pattern-dashed { stroke-dasharray: 8,8; } .node rect, .node circle, .node ellipse, .node polygon { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; stroke-width: 1px; } .relationshipLine { stroke: ${e.lineColor}; stroke-width: 1; fill: none; } .marker { fill: none !important; stroke: ${e.lineColor} !important; stroke-width: 1; } .edgeLabel { background-color: ${e.edgeLabelBackground}; } .edgeLabel .label rect { fill: ${e.edgeLabelBackground}; } .edgeLabel .label text { fill: ${e.textColor}; } `,"getStyles"),Aue=Cue}),Nue={};PGe(Nue,{diagram:()=>Iue});var Iue,Due=s(()=>{wue(),kue(),Rue(),Lue(),Iue={parser:bue,get db(){return new xue},renderer:Eue,styles:Aue}});function Mue(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$type}function Oue(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$refText&&"ref"in e}function Pue(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$refText&&"items"in e}function $ue(e){return"object"==typeof e&&null!==e&&"string"==typeof e.name&&"string"==typeof e.type&&"string"==typeof e.path}function Bue(e){return"object"==typeof e&&null!==e&&"object"==typeof e.info&&"string"==typeof e.message}function Fue(e){return"object"==typeof e&&null!==e&&Array.isArray(e.content)}function zue(e){return"object"==typeof e&&null!==e&&"object"==typeof e.tokenType}function que(e){return Fue(e)&&"string"==typeof e.fullText}var Uue,Gue=s(()=>{mt(Mue,"isAstNode"),mt(Oue,"isReference"),mt(Pue,"isMultiReference"),mt($ue,"isAstNodeDescription"),mt(Bue,"isLinkingError"),Uue=class{static{mt(this,"AbstractAstReflection")}constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){var t=this.types[e.container.$type];if(!t)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);if(t=t.properties[e.property]?.referenceType)return t;throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`)}getTypeMetaData(e){return this.types[e]||{name:e,properties:{},superTypes:[]}}isInstance(e,t){return Mue(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){var r,i;return e===t||(void 0!==(i=(r=(r=this.subtypes[e])||(this.subtypes[e]={}))[t])?i:(e=!!(i=this.types[e])&&i.superTypes.some(e=>this.isSubtype(e,t)),r[t]=e))}getAllSubTypes(e){var t=this.allSubtypes[e];if(t)return t;var r,i=[];for(r of this.getAllTypes())this.isSubtype(r,e)&&i.push(r);return this.allSubtypes[e]=i}},mt(Fue,"isCompositeCstNode"),mt(zue,"isLeafCstNode"),mt(que,"isRootCstNode")});function jue(e){return"string"==typeof e?e:"u"t[Symbol.iterator](),e=>e.next());if("number"==typeof t.length)return new Vue(()=>({index:0}),e=>e.index({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){var t=e.iterator.next();if(!t.done)return t;e.iterator=void 0}if(e.array){if(e.arrIndex{function e(e){return e.reduce((e,t)=>e+t,0)}function t(e){return e.reduce((e,t)=>e*t,0)}function r(e){return e.reduce((e,t)=>Math.min(e,t))}function i(e){return e.reduce((e,t)=>Math.max(e,t))}var n;Vue=class a{static{mt(this,"StreamImpl")}constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){let e={state:this.startFn(),next:mt(()=>this.nextFn(e.state),"next"),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let e=this.iterator(),t=0,r=e.next();for(;!r.done;)t++,r=e.next();return t}toArray(){for(var e,t=[],r=this.iterator();void 0!==(e=r.next()).value&&t.push(e.value),!e.done;);return t}toSet(){return new Set(this)}toMap(t,r){var e=this.map(e=>[t?t(e):e,r?r(e):e]);return new Map(e)}toString(){return this.join()}concat(e){return new a(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),e=>{let t;if(!e.firstDone){do{if(!(t=this.nextFn(e.first)).done)return t}while(!t.done);e.firstDone=!0}do{if(!(t=e.iterator.next()).done)return t}while(!t.done);return Xue})}join(e=","){let t=this.iterator(),r="",i,n=!1;for(;(i=t.next()).done||(n&&(r+=e),r+=jue(i.value)),n=!0,!i.done;);return r}indexOf(e,t=0){let r=this.iterator(),i=0,n=r.next();for(;!n.done;){if(i>=t&&n.value===e)return i;n=r.next(),i++}return-1}every(e){let t=this.iterator(),r=t.next();for(;!r.done;){if(!e(r.value))return!1;r=t.next()}return!0}some(e){let t=this.iterator(),r=t.next();for(;!r.done;){if(e(r.value))return!0;r=t.next()}return!1}forEach(e){let t=this.iterator(),r=0,i=t.next();for(;!i.done;)e(i.value,r),i=t.next(),r++}map(r){return new a(this.startFn,e=>{var{done:e,value:t}=this.nextFn(e);return e?Xue:{done:!1,value:r(t)}})}filter(r){return new a(this.startFn,e=>{var t;do{if(!(t=this.nextFn(e)).done&&r(t.value))return t}while(!t.done);return Xue})}nonNullable(){return this.filter(e=>null!=e)}reduce(e,t){let r=this.iterator(),i=t,n=r.next();for(;!n.done;)i=void 0===i?n.value:e(i,n.value),n=r.next();return i}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,r){var i=e.next();return i.done?r:void 0===(e=this.recursiveReduce(e,t,r))?i.value:t(e,i.value)}find(e){let t=this.iterator(),r=t.next();for(;!r.done;){if(e(r.value))return r.value;r=t.next()}}findIndex(e){let t=this.iterator(),r=0,i=t.next();for(;!i.done;){if(e(i.value))return r;i=t.next(),r++}return-1}includes(e){let t=this.iterator(),r=t.next();for(;!r.done;){if(r.value===e)return!0;r=t.next()}return!1}flatMap(i){return new a(()=>({this:this.startFn()}),e=>{do{if(e.iterator){if(!(t=e.iterator.next()).done)return t;e.iterator=void 0}var{done:t,value:r}=this.nextFn(e.this);if(!t){if(!Wue(r=i(r)))return{done:!1,value:r};e.iterator=r[Symbol.iterator]()}}while(e.iterator);return Xue})}flat(e){if((e=void 0===e?1:e)<=0)return this;let i=1({this:i.startFn()}),e=>{do{if(e.iterator){if(!(t=e.iterator.next()).done)return t;e.iterator=void 0}var{done:t,value:r}=i.nextFn(e.this);if(!t){if(!Wue(r))return{done:!1,value:r};e.iterator=r[Symbol.iterator]()}}while(e.iterator);return Xue})}head(){var e=this.iterator().next();if(!e.done)return e.value}tail(r=1){return new a(()=>{var t=this.startFn();for(let e=0;e({size:0,state:this.startFn()}),e=>(e.size++,t({set:new Set,internalState:this.startFn()}),e=>{var t;do{if(!(t=this.nextFn(e.internalState)).done){var r=i?i(t.value):t.value;if(!e.set.has(r))return e.set.add(r),t}}while(!t.done);return Xue})}exclude(e,t){let r=new Set;for(var i of e)i=t?t(i):i,r.add(i);return this.filter(e=>(e=t?t(e):e,!r.has(e)))}},mt(jue,"toString"),mt(Wue,"isIterable"),Hue=new Vue(()=>{},()=>Xue),Xue=Object.freeze({done:!0,value:void 0}),mt(Yue,"stream"),Kue=class extends Vue{static{mt(this,"TreeStreamImpl")}constructor(e,r,t){super(()=>({iterators:t?.includeRoot?[[e][Symbol.iterator]()]:[r(e)[Symbol.iterator]()],pruned:!1}),e=>{for(e.pruned&&(e.iterators.pop(),e.pruned=!1);0this.nextFn(e.state),"next"),prune:mt(()=>{e.state.pruned=!0},"prune"),[Symbol.iterator]:()=>e};return e}},n=Zue=Zue||{},mt(e,"sum"),n.sum=e,mt(t,"product"),n.product=t,mt(r,"min"),n.min=r,mt(i,"max"),n.max=i}),Jue={};function ede(i,n={}){for(let[r,e]of Object.entries(i))r.startsWith("$")||(Array.isArray(e)?e.forEach((e,t)=>{Mue(e)&&(e.$container=i,e.$containerProperty=r,e.$containerIndex=t,n.deep)&&ede(e,n)}):Mue(e)&&(e.$container=i,e.$containerProperty=r,n.deep)&&ede(e,n))}function tde(e,t){let r=e;for(;r;){if(t(r))return r;r=r.$container}}function rde(e,t){let r=e;for(;r;){if(t(r))return!0;r=r.$container}return!1}function ide(e){if(e=nde(e).$document)return e;throw new Error("AST node has no document.")}function nde(e){for(;e.$container;)e=e.$container;return e}function ade(e){return Oue(e)?e.ref?[e.ref]:[]:Pue(e)?e.items.map(e=>e.ref):[]}function sde(n,e){if(!n)throw new Error("Node must be an AstNode.");let a=e?.range;return new Vue(()=>({keys:Object.keys(n),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndexsde(e,t));throw new Error("Root node must be an AstNode.")}function lde(e,t){if(e)return t?.range&&!cde(e,t.range)?new Kue(e,()=>[]):new Kue(e,e=>sde(e,t),{includeRoot:!0});throw new Error("Root node must be an AstNode.")}function cde(e,t){return!t||!!(e=e.$cstNode?.range)&&w0e(e,t)}function hde(a){return new Vue(()=>({keys:Object.keys(a),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndexude,copyAstNode:()=>pde,findRootNode:()=>nde,getContainerOfType:()=>tde,getDocument:()=>ide,getReferenceNodes:()=>ade,hasContainerOfType:()=>rde,linkContentToContainer:()=>ede,streamAllContents:()=>ode,streamAst:()=>lde,streamContents:()=>sde,streamReferences:()=>hde});var gde=s(()=>{Gue(),Que(),$0e(),mt(ede,"linkContentToContainer"),mt(tde,"getContainerOfType"),mt(rde,"hasContainerOfType"),mt(ide,"getDocument"),mt(nde,"findRootNode"),mt(ade,"getReferenceNodes"),mt(sde,"streamContents"),mt(ode,"streamAllContents"),mt(lde,"streamAst"),mt(cde,"isAstNodeInRange"),mt(hde,"streamReferences"),mt(ude,"assignMandatoryProperties"),mt(dde,"copyDefaultValue"),mt(pde,"copyAstNode")}),fde={};function mde(e){return d0e.isInstance(e,gpe.$type)}function yde(e){return d0e.isInstance(e,fpe.$type)}function vde(e){return d0e.isInstance(e,mpe.$type)}function bde(e){return d0e.isInstance(e,ype.$type)}function xde(e){return d0e.isInstance(e,vpe.$type)}function Tde(e){return d0e.isInstance(e,bpe.$type)}function wde(e){return d0e.isInstance(e,xpe.$type)}function kde(e){return d0e.isInstance(e,Tpe.$type)}function Ede(e){return d0e.isInstance(e,wpe.$type)}function _de(e){return d0e.isInstance(e,kpe.$type)}function Sde(e){return d0e.isInstance(e,Epe.$type)}function Cde(e){return d0e.isInstance(e,_pe.$type)}function Ade(e){return d0e.isInstance(e,Spe.$type)}function Rde(e){return d0e.isInstance(e,Cpe.$type)}function Lde(e){return d0e.isInstance(e,Ape.$type)}function Nde(e){return d0e.isInstance(e,Rpe.$type)}function Ide(e){return d0e.isInstance(e,Lpe.$type)}function Dde(e){return d0e.isInstance(e,Npe.$type)}function Mde(e){return d0e.isInstance(e,Ipe.$type)}function Ode(e){return d0e.isInstance(e,Dpe.$type)}function Pde(e){return d0e.isInstance(e,Mpe.$type)}function $de(e){return d0e.isInstance(e,Ope.$type)}function Bde(e){return d0e.isInstance(e,Ppe.$type)}function Fde(e){return d0e.isInstance(e,$pe.$type)}function zde(e){return d0e.isInstance(e,Bpe.$type)}function qde(e){return d0e.isInstance(e,Fpe.$type)}function Ude(e){return d0e.isInstance(e,zpe.$type)}function Gde(e){return d0e.isInstance(e,qpe.$type)}function jde(e){return d0e.isInstance(e,Upe.$type)}function Wde(e){return d0e.isInstance(e,Gpe.$type)}function Yde(e){return d0e.isInstance(e,jpe.$type)}function Vde(e){return d0e.isInstance(e,Wpe.$type)}function Hde(e){return d0e.isInstance(e,Ype.$type)}function Xde(e){return d0e.isInstance(e,Vpe.$type)}function Kde(e){return d0e.isInstance(e,Hpe.$type)}function Zde(e){return d0e.isInstance(e,Xpe.$type)}function Qde(e){return d0e.isInstance(e,Kpe.$type)}function Jde(e){return d0e.isInstance(e,Zpe.$type)}function epe(e){return d0e.isInstance(e,Qpe.$type)}function tpe(e){return d0e.isInstance(e,Jpe.$type)}function rpe(e){return d0e.isInstance(e,e0e.$type)}function ipe(e){return d0e.isInstance(e,t0e.$type)}function npe(e){return d0e.isInstance(e,r0e.$type)}function ape(e){return d0e.isInstance(e,i0e.$type)}function spe(e){return d0e.isInstance(e,n0e.$type)}function ope(e){return d0e.isInstance(e,a0e.$type)}function lpe(e){return d0e.isInstance(e,s0e.$type)}function cpe(e){return d0e.isInstance(e,o0e.$type)}function hpe(e){return d0e.isInstance(e,l0e.$type)}function upe(e){return d0e.isInstance(e,c0e.$type)}function dpe(e){return d0e.isInstance(e,h0e.$type)}PGe(fde,{AbstractElement:()=>gpe,AbstractParserRule:()=>fpe,AbstractRule:()=>mpe,AbstractType:()=>ype,Action:()=>vpe,Alternatives:()=>bpe,ArrayLiteral:()=>xpe,ArrayType:()=>Tpe,Assignment:()=>wpe,BooleanLiteral:()=>kpe,CharacterRange:()=>Epe,Condition:()=>_pe,Conjunction:()=>Spe,CrossReference:()=>Cpe,Disjunction:()=>Ape,EndOfFile:()=>Rpe,Grammar:()=>Lpe,GrammarImport:()=>Npe,Group:()=>Ipe,InferredType:()=>Dpe,InfixRule:()=>Mpe,InfixRuleOperatorList:()=>Ope,InfixRuleOperators:()=>Ppe,Interface:()=>$pe,Keyword:()=>Bpe,LangiumGrammarAstReflection:()=>u0e,LangiumGrammarTerminals:()=>ppe,NamedArgument:()=>Fpe,NegatedToken:()=>zpe,Negation:()=>qpe,NumberLiteral:()=>Upe,Parameter:()=>Gpe,ParameterReference:()=>jpe,ParserRule:()=>Wpe,ReferenceType:()=>Ype,RegexToken:()=>Vpe,ReturnType:()=>Hpe,RuleCall:()=>Xpe,SimpleType:()=>Kpe,StringLiteral:()=>Zpe,TerminalAlternatives:()=>Qpe,TerminalElement:()=>Jpe,TerminalGroup:()=>e0e,TerminalRule:()=>t0e,TerminalRuleCall:()=>r0e,Type:()=>i0e,TypeAttribute:()=>n0e,TypeDefinition:()=>a0e,UnionType:()=>s0e,UnorderedGroup:()=>o0e,UntilToken:()=>l0e,ValueLiteral:()=>c0e,Wildcard:()=>h0e,isAbstractElement:()=>mde,isAbstractParserRule:()=>yde,isAbstractRule:()=>vde,isAbstractType:()=>bde,isAction:()=>xde,isAlternatives:()=>Tde,isArrayLiteral:()=>wde,isArrayType:()=>kde,isAssignment:()=>Ede,isBooleanLiteral:()=>_de,isCharacterRange:()=>Sde,isCondition:()=>Cde,isConjunction:()=>Ade,isCrossReference:()=>Rde,isDisjunction:()=>Lde,isEndOfFile:()=>Nde,isGrammar:()=>Ide,isGrammarImport:()=>Dde,isGroup:()=>Mde,isInferredType:()=>Ode,isInfixRule:()=>Pde,isInfixRuleOperatorList:()=>$de,isInfixRuleOperators:()=>Bde,isInterface:()=>Fde,isKeyword:()=>zde,isNamedArgument:()=>qde,isNegatedToken:()=>Ude,isNegation:()=>Gde,isNumberLiteral:()=>jde,isParameter:()=>Wde,isParameterReference:()=>Yde,isParserRule:()=>Vde,isReferenceType:()=>Hde,isRegexToken:()=>Xde,isReturnType:()=>Kde,isRuleCall:()=>Zde,isSimpleType:()=>Qde,isStringLiteral:()=>Jde,isTerminalAlternatives:()=>epe,isTerminalElement:()=>tpe,isTerminalGroup:()=>rpe,isTerminalRule:()=>ipe,isTerminalRuleCall:()=>npe,isType:()=>ape,isTypeAttribute:()=>spe,isTypeDefinition:()=>ope,isUnionType:()=>lpe,isUnorderedGroup:()=>cpe,isUntilToken:()=>hpe,isValueLiteral:()=>upe,isWildcard:()=>dpe,reflection:()=>d0e});var ppe,gpe,fpe,mpe,ype,vpe,bpe,xpe,Tpe,wpe,kpe,Epe,_pe,Spe,Cpe,Ape,Rpe,Lpe,Npe,Ipe,Dpe,Mpe,Ope,Ppe,$pe,Bpe,Fpe,zpe,qpe,Upe,Gpe,jpe,Wpe,Ype,Vpe,Hpe,Xpe,Kpe,Zpe,Qpe,Jpe,e0e,t0e,r0e,i0e,n0e,a0e,s0e,o0e,l0e,c0e,h0e,u0e,d0e,p0e=s(()=>{Gue(),ppe={ID:/\^?[_a-zA-Z][\w_]*/,STRING:/"(\\.|[^"\\])*"|'(\\.|[^'\\])*'/,NUMBER:/NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity)/,RegexLiteral:/\/(?![*+?])(?:[^\r\n\[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*\])+\/[a-z]*/,WS:/\s+/,ML_COMMENT:/\/\*[\s\S]*?\*\//,SL_COMMENT:/\/\/[^\n\r]*/},gpe={$type:"AbstractElement",cardinality:"cardinality"},mt(mde,"isAbstractElement"),fpe={$type:"AbstractParserRule"},mt(yde,"isAbstractParserRule"),mpe={$type:"AbstractRule"},mt(vde,"isAbstractRule"),ype={$type:"AbstractType"},mt(bde,"isAbstractType"),vpe={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"},mt(xde,"isAction"),bpe={$type:"Alternatives",cardinality:"cardinality",elements:"elements"},mt(Tde,"isAlternatives"),xpe={$type:"ArrayLiteral",elements:"elements"},mt(wde,"isArrayLiteral"),Tpe={$type:"ArrayType",elementType:"elementType"},mt(kde,"isArrayType"),wpe={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"},mt(Ede,"isAssignment"),kpe={$type:"BooleanLiteral",true:"true"},mt(_de,"isBooleanLiteral"),Epe={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"},mt(Sde,"isCharacterRange"),_pe={$type:"Condition"},mt(Cde,"isCondition"),Spe={$type:"Conjunction",left:"left",right:"right"},mt(Ade,"isConjunction"),Cpe={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"},mt(Rde,"isCrossReference"),Ape={$type:"Disjunction",left:"left",right:"right"},mt(Lde,"isDisjunction"),Rpe={$type:"EndOfFile",cardinality:"cardinality"},mt(Nde,"isEndOfFile"),Lpe={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"},mt(Ide,"isGrammar"),Npe={$type:"GrammarImport",path:"path"},mt(Dde,"isGrammarImport"),Ipe={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"},mt(Mde,"isGroup"),Dpe={$type:"InferredType",name:"name"},mt(Ode,"isInferredType"),Mpe={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"},mt(Pde,"isInfixRule"),Ope={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"},mt($de,"isInfixRuleOperatorList"),Ppe={$type:"InfixRuleOperators",precedences:"precedences"},mt(Bde,"isInfixRuleOperators"),$pe={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"},mt(Fde,"isInterface"),Bpe={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"},mt(zde,"isKeyword"),Fpe={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"},mt(qde,"isNamedArgument"),zpe={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"},mt(Ude,"isNegatedToken"),qpe={$type:"Negation",value:"value"},mt(Gde,"isNegation"),Upe={$type:"NumberLiteral",value:"value"},mt(jde,"isNumberLiteral"),Gpe={$type:"Parameter",name:"name"},mt(Wde,"isParameter"),jpe={$type:"ParameterReference",parameter:"parameter"},mt(Yde,"isParameterReference"),Wpe={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"},mt(Vde,"isParserRule"),Ype={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"},mt(Hde,"isReferenceType"),Vpe={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"},mt(Xde,"isRegexToken"),Hpe={$type:"ReturnType",name:"name"},mt(Kde,"isReturnType"),Xpe={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"},mt(Zde,"isRuleCall"),Kpe={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"},mt(Qde,"isSimpleType"),Zpe={$type:"StringLiteral",value:"value"},mt(Jde,"isStringLiteral"),Qpe={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"},mt(epe,"isTerminalAlternatives"),Jpe={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"},mt(tpe,"isTerminalElement"),e0e={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"},mt(rpe,"isTerminalGroup"),t0e={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"},mt(ipe,"isTerminalRule"),r0e={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"},mt(npe,"isTerminalRuleCall"),i0e={$type:"Type",name:"name",type:"type"},mt(ape,"isType"),n0e={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"},mt(spe,"isTypeAttribute"),a0e={$type:"TypeDefinition"},mt(ope,"isTypeDefinition"),s0e={$type:"UnionType",types:"types"},mt(lpe,"isUnionType"),o0e={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"},mt(cpe,"isUnorderedGroup"),l0e={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"},mt(hpe,"isUntilToken"),c0e={$type:"ValueLiteral"},mt(upe,"isValueLiteral"),h0e={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"},mt(dpe,"isWildcard"),u0e=class extends Uue{static{mt(this,"LangiumGrammarAstReflection")}constructor(){super(...arguments),this.types={AbstractElement:{name:gpe.$type,properties:{cardinality:{name:gpe.cardinality}},superTypes:[]},AbstractParserRule:{name:fpe.$type,properties:{},superTypes:[mpe.$type,ype.$type]},AbstractRule:{name:mpe.$type,properties:{},superTypes:[]},AbstractType:{name:ype.$type,properties:{},superTypes:[]},Action:{name:vpe.$type,properties:{cardinality:{name:vpe.cardinality},feature:{name:vpe.feature},inferredType:{name:vpe.inferredType},operator:{name:vpe.operator},type:{name:vpe.type,referenceType:ype.$type}},superTypes:[gpe.$type]},Alternatives:{name:bpe.$type,properties:{cardinality:{name:bpe.cardinality},elements:{name:bpe.elements,defaultValue:[]}},superTypes:[gpe.$type]},ArrayLiteral:{name:xpe.$type,properties:{elements:{name:xpe.elements,defaultValue:[]}},superTypes:[c0e.$type]},ArrayType:{name:Tpe.$type,properties:{elementType:{name:Tpe.elementType}},superTypes:[a0e.$type]},Assignment:{name:wpe.$type,properties:{cardinality:{name:wpe.cardinality},feature:{name:wpe.feature},operator:{name:wpe.operator},predicate:{name:wpe.predicate},terminal:{name:wpe.terminal}},superTypes:[gpe.$type]},BooleanLiteral:{name:kpe.$type,properties:{true:{name:kpe.true,defaultValue:!1}},superTypes:[_pe.$type,c0e.$type]},CharacterRange:{name:Epe.$type,properties:{cardinality:{name:Epe.cardinality},left:{name:Epe.left},lookahead:{name:Epe.lookahead},parenthesized:{name:Epe.parenthesized,defaultValue:!1},right:{name:Epe.right}},superTypes:[Jpe.$type]},Condition:{name:_pe.$type,properties:{},superTypes:[]},Conjunction:{name:Spe.$type,properties:{left:{name:Spe.left},right:{name:Spe.right}},superTypes:[_pe.$type]},CrossReference:{name:Cpe.$type,properties:{cardinality:{name:Cpe.cardinality},deprecatedSyntax:{name:Cpe.deprecatedSyntax,defaultValue:!1},isMulti:{name:Cpe.isMulti,defaultValue:!1},terminal:{name:Cpe.terminal},type:{name:Cpe.type,referenceType:ype.$type}},superTypes:[gpe.$type]},Disjunction:{name:Ape.$type,properties:{left:{name:Ape.left},right:{name:Ape.right}},superTypes:[_pe.$type]},EndOfFile:{name:Rpe.$type,properties:{cardinality:{name:Rpe.cardinality}},superTypes:[gpe.$type]},Grammar:{name:Lpe.$type,properties:{imports:{name:Lpe.imports,defaultValue:[]},interfaces:{name:Lpe.interfaces,defaultValue:[]},isDeclared:{name:Lpe.isDeclared,defaultValue:!1},name:{name:Lpe.name},rules:{name:Lpe.rules,defaultValue:[]},types:{name:Lpe.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:Npe.$type,properties:{path:{name:Npe.path}},superTypes:[]},Group:{name:Ipe.$type,properties:{cardinality:{name:Ipe.cardinality},elements:{name:Ipe.elements,defaultValue:[]},guardCondition:{name:Ipe.guardCondition},predicate:{name:Ipe.predicate}},superTypes:[gpe.$type]},InferredType:{name:Dpe.$type,properties:{name:{name:Dpe.name}},superTypes:[ype.$type]},InfixRule:{name:Mpe.$type,properties:{call:{name:Mpe.call},dataType:{name:Mpe.dataType},inferredType:{name:Mpe.inferredType},name:{name:Mpe.name},operators:{name:Mpe.operators},parameters:{name:Mpe.parameters,defaultValue:[]},returnType:{name:Mpe.returnType,referenceType:ype.$type}},superTypes:[fpe.$type]},InfixRuleOperatorList:{name:Ope.$type,properties:{associativity:{name:Ope.associativity},operators:{name:Ope.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:Ppe.$type,properties:{precedences:{name:Ppe.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:$pe.$type,properties:{attributes:{name:$pe.attributes,defaultValue:[]},name:{name:$pe.name},superTypes:{name:$pe.superTypes,defaultValue:[],referenceType:ype.$type}},superTypes:[ype.$type]},Keyword:{name:Bpe.$type,properties:{cardinality:{name:Bpe.cardinality},predicate:{name:Bpe.predicate},value:{name:Bpe.value}},superTypes:[gpe.$type]},NamedArgument:{name:Fpe.$type,properties:{calledByName:{name:Fpe.calledByName,defaultValue:!1},parameter:{name:Fpe.parameter,referenceType:Gpe.$type},value:{name:Fpe.value}},superTypes:[]},NegatedToken:{name:zpe.$type,properties:{cardinality:{name:zpe.cardinality},lookahead:{name:zpe.lookahead},parenthesized:{name:zpe.parenthesized,defaultValue:!1},terminal:{name:zpe.terminal}},superTypes:[Jpe.$type]},Negation:{name:qpe.$type,properties:{value:{name:qpe.value}},superTypes:[_pe.$type]},NumberLiteral:{name:Upe.$type,properties:{value:{name:Upe.value}},superTypes:[c0e.$type]},Parameter:{name:Gpe.$type,properties:{name:{name:Gpe.name}},superTypes:[]},ParameterReference:{name:jpe.$type,properties:{parameter:{name:jpe.parameter,referenceType:Gpe.$type}},superTypes:[_pe.$type]},ParserRule:{name:Wpe.$type,properties:{dataType:{name:Wpe.dataType},definition:{name:Wpe.definition},entry:{name:Wpe.entry,defaultValue:!1},fragment:{name:Wpe.fragment,defaultValue:!1},inferredType:{name:Wpe.inferredType},name:{name:Wpe.name},parameters:{name:Wpe.parameters,defaultValue:[]},returnType:{name:Wpe.returnType,referenceType:ype.$type}},superTypes:[fpe.$type]},ReferenceType:{name:Ype.$type,properties:{isMulti:{name:Ype.isMulti,defaultValue:!1},referenceType:{name:Ype.referenceType}},superTypes:[a0e.$type]},RegexToken:{name:Vpe.$type,properties:{cardinality:{name:Vpe.cardinality},lookahead:{name:Vpe.lookahead},parenthesized:{name:Vpe.parenthesized,defaultValue:!1},regex:{name:Vpe.regex}},superTypes:[Jpe.$type]},ReturnType:{name:Hpe.$type,properties:{name:{name:Hpe.name}},superTypes:[]},RuleCall:{name:Xpe.$type,properties:{arguments:{name:Xpe.arguments,defaultValue:[]},cardinality:{name:Xpe.cardinality},predicate:{name:Xpe.predicate},rule:{name:Xpe.rule,referenceType:mpe.$type}},superTypes:[gpe.$type]},SimpleType:{name:Kpe.$type,properties:{primitiveType:{name:Kpe.primitiveType},stringType:{name:Kpe.stringType},typeRef:{name:Kpe.typeRef,referenceType:ype.$type}},superTypes:[a0e.$type]},StringLiteral:{name:Zpe.$type,properties:{value:{name:Zpe.value}},superTypes:[c0e.$type]},TerminalAlternatives:{name:Qpe.$type,properties:{cardinality:{name:Qpe.cardinality},elements:{name:Qpe.elements,defaultValue:[]},lookahead:{name:Qpe.lookahead},parenthesized:{name:Qpe.parenthesized,defaultValue:!1}},superTypes:[Jpe.$type]},TerminalElement:{name:Jpe.$type,properties:{cardinality:{name:Jpe.cardinality},lookahead:{name:Jpe.lookahead},parenthesized:{name:Jpe.parenthesized,defaultValue:!1}},superTypes:[gpe.$type]},TerminalGroup:{name:e0e.$type,properties:{cardinality:{name:e0e.cardinality},elements:{name:e0e.elements,defaultValue:[]},lookahead:{name:e0e.lookahead},parenthesized:{name:e0e.parenthesized,defaultValue:!1}},superTypes:[Jpe.$type]},TerminalRule:{name:t0e.$type,properties:{definition:{name:t0e.definition},fragment:{name:t0e.fragment,defaultValue:!1},hidden:{name:t0e.hidden,defaultValue:!1},name:{name:t0e.name},type:{name:t0e.type}},superTypes:[mpe.$type]},TerminalRuleCall:{name:r0e.$type,properties:{cardinality:{name:r0e.cardinality},lookahead:{name:r0e.lookahead},parenthesized:{name:r0e.parenthesized,defaultValue:!1},rule:{name:r0e.rule,referenceType:t0e.$type}},superTypes:[Jpe.$type]},Type:{name:i0e.$type,properties:{name:{name:i0e.name},type:{name:i0e.type}},superTypes:[ype.$type]},TypeAttribute:{name:n0e.$type,properties:{defaultValue:{name:n0e.defaultValue},isOptional:{name:n0e.isOptional,defaultValue:!1},name:{name:n0e.name},type:{name:n0e.type}},superTypes:[]},TypeDefinition:{name:a0e.$type,properties:{},superTypes:[]},UnionType:{name:s0e.$type,properties:{types:{name:s0e.types,defaultValue:[]}},superTypes:[a0e.$type]},UnorderedGroup:{name:o0e.$type,properties:{cardinality:{name:o0e.cardinality},elements:{name:o0e.elements,defaultValue:[]}},superTypes:[gpe.$type]},UntilToken:{name:l0e.$type,properties:{cardinality:{name:l0e.cardinality},lookahead:{name:l0e.lookahead},parenthesized:{name:l0e.parenthesized,defaultValue:!1},terminal:{name:l0e.terminal}},superTypes:[Jpe.$type]},ValueLiteral:{name:c0e.$type,properties:{},superTypes:[]},Wildcard:{name:h0e.$type,properties:{cardinality:{name:h0e.cardinality},lookahead:{name:h0e.lookahead},parenthesized:{name:h0e.parenthesized,defaultValue:!1}},superTypes:[Jpe.$type]}}}},d0e=new u0e}),g0e={};function f0e(e){let t=e,r=!1;for(;t;){var i=tde(t.grammarSource,Vde);if(!i||!i.dataType)return r?t:void 0;t=t.container,r=!0}}function m0e(e){return new Kue(e,e=>Fue(e)?e.content:[],{includeRoot:!0})}function y0e(e){return m0e(e).filter(zue)}function v0e(e,t){for(;e.container;)if((e=e.container)===t)return!0;return!1}function b0e(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function x0e(e){var t,r;if(e)return{offset:e,end:t,range:r}=e,{range:r,offset:e,end:t,length:t-e}}function T0e(e,t){var r;return e.end.linet.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character?O0e.After:(r=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,e=e.end.lineO0e.After}function k0e(e,t,r=P0e){var i;if(e)return 0!e.hidden)-1;0<=e;e--){var i=t.content[e];if(_0e(i,r))return i}}}function _0e(e,t){return zue(e)&&t.includes(e.tokenType.name)}function S0e(e,t){return zue(e)?e:Fue(e)&&(e=A0e(e,t,!1))?S0e(e,t):void 0}function C0e(e,t){return zue(e)?e:Fue(e)&&(e=A0e(e,t,!0))?C0e(e,t):void 0}function A0e(e,t,r){let i=0,n=e.content.length-1,a;for(;i<=n;){var s=Math.floor((i+n)/2),o=e.content[s];if(o.offset<=t&&o.end>t)return o;o.end<=t?(a=r?o:void 0,i=s+1):n=s-1}return a}function R0e(r,i=!0){for(;r.container;){let e=r.container,t=e.content.indexOf(r);for(;0P0e,RangeComparison:()=>O0e,compareRange:()=>T0e,findCommentNode:()=>E0e,findDeclarationNodeAtOffset:()=>k0e,findLeafNodeAtOffset:()=>S0e,findLeafNodeBeforeOffset:()=>C0e,flattenCst:()=>y0e,getDatatypeNode:()=>f0e,getInteriorNodes:()=>I0e,getNextNode:()=>L0e,getPreviousNode:()=>R0e,getStartlineNode:()=>N0e,inRange:()=>w0e,isChildNode:()=>v0e,isCommentNode:()=>_0e,streamCst:()=>m0e,toDocumentSegment:()=>x0e,tokenToRange:()=>b0e});var O0e,P0e,$0e=s(()=>{var e;Gue(),Que(),gde(),p0e(),mt(f0e,"getDatatypeNode"),mt(m0e,"streamCst"),mt(y0e,"flattenCst"),mt(v0e,"isChildNode"),mt(b0e,"tokenToRange"),mt(x0e,"toDocumentSegment"),(e=O0e=O0e||{})[e.Before=0]="Before",e[e.After=1]="After",e[e.OverlapFront=2]="OverlapFront",e[e.OverlapBack=3]="OverlapBack",e[e.Inside=4]="Inside",e[e.Outside=5]="Outside",mt(T0e,"compareRange"),mt(w0e,"inRange"),P0e=/^[\w\p{L}]$/u,mt(k0e,"findDeclarationNodeAtOffset"),mt(E0e,"findCommentNode"),mt(_0e,"isCommentNode"),mt(S0e,"findLeafNodeAtOffset"),mt(C0e,"findLeafNodeBeforeOffset"),mt(A0e,"binarySearch"),mt(R0e,"getPreviousNode"),mt(L0e,"getNextNode"),mt(N0e,"getStartlineNode"),mt(I0e,"getInteriorNodes"),mt(D0e,"getCommonParent"),mt(M0e,"getParentChain")});function B0e(e,t="Error: Got unexpected value."){throw new Error(t)}function F0e(e,t="Error: Condition is violated."){if(!e)throw new Error(t)}var z0e,q0e=s(()=>{z0e=class extends Error{static{mt(this,"ErrorWithLocation")}constructor(e,t){super(e?`${t} at ${e.range.start.line}:`+e.range.start.character:t)}},mt(B0e,"assertUnreachable"),mt(F0e,"assertCondition")});function U0e(e){return e.charCodeAt(0)}function G0e(e,t){Array.isArray(e)?e.forEach(function(e){t.push(e)}):t.push(e)}function j0e(e,t){if(!0===e[t])throw"duplicate flag "+t;e[t]=!0}function W0e(e){if(void 0===e)throw Error("Internal Error - Should never get here!");return!0}function Y0e(){throw Error("Internal Error - Should never get here!")}function V0e(e){return"Character"===e.type}var H0e,X0e,K0e,Z0e,Q0e,J0e,ege,tge,rge=s(()=>{mt(U0e,"cc"),mt(G0e,"insertToSet"),mt(j0e,"addFlag"),mt(W0e,"ASSERT_EXISTS"),mt(Y0e,"ASSERT_NEVER_REACH_HERE"),mt(V0e,"isCharacter")}),ige=s(()=>{rge(),H0e=[];for(let e=U0e("0");e<=U0e("9");e++)H0e.push(e);X0e=[U0e("_")].concat(H0e);for(let e=U0e("a");e<=U0e("z");e++)X0e.push(e);for(let e=U0e("A");e<=U0e("Z");e++)X0e.push(e);K0e=[U0e(" "),U0e("\f"),U0e(` `),U0e("\r"),U0e("\t"),U0e("\v"),U0e("\t"),U0e(" "),U0e(" "),U0e(" "),U0e(" "),U0e(" "),U0e(" "),U0e(" "),U0e(" "),U0e(" "),U0e(" "),U0e(" "),U0e(" "),U0e(" "),U0e("\u2028"),U0e("\u2029"),U0e(" "),U0e(" "),U0e(" "),U0e("\ufeff")]}),nge=s(()=>{rge(),ige(),Z0e=/[0-9a-fA-F]/,Q0e=/[0-9]/,J0e=/[1-9]/,ege=class{static{mt(this,"RegExpParser")}constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");for(var t=this.disjunction(),r=(this.consumeChar("/"),{type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1});this.isRegExpFlag();)switch(this.popChar()){case"g":j0e(r,"global");break;case"i":j0e(r,"ignoreCase");break;case"m":j0e(r,"multiLine");break;case"u":j0e(r,"unicode");break;case"y":j0e(r,"sticky")}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:r,value:t,loc:this.loc(0)}}disjunction(){var e=[],t=this.idx;for(e.push(this.alternative());"|"===this.peekChar();)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(t)}}alternative(){for(var e=[],t=this.idx;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){var t=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(t)};case"$":return{type:"EndAnchor",loc:this.loc(t)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(t)};case"B":return{type:"NonWordBoundary",loc:this.loc(t)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let e;switch(this.popChar()){case"=":e="Lookahead";break;case"!":e="NegativeLookahead";break;case"<":switch(this.popChar()){case"=":e="Lookbehind";break;case"!":e="NegativeLookbehind"}}W0e(e);var r=this.disjunction();return this.consumeChar(")"),{type:e,value:r,loc:this.loc(t)}}return Y0e()}quantifier(e=!1){let t,r=this.idx;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":var i=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:i,atMost:i};break;case",":t=this.isDigit()?{atLeast:i,atMost:this.integerIncludingZero()}:{atLeast:i,atMost:1/0},this.consumeChar("}")}if(!0===e&&void 0===t)return;W0e(t)}if((!0!==e||void 0!==t)&&W0e(t))return"?"===this.peekChar(0)?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t.loc=this.loc(r),t}atom(){let e,t=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group()}return W0e(e=void 0===e&&this.isPatternCharacter()?this.patternCharacter():e)?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):Y0e()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[U0e(` `),U0e("\r"),U0e("\u2028"),U0e("\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 e,t=!1;switch(this.popChar()){case"d":e=H0e;break;case"D":e=H0e,t=!0;break;case"s":e=K0e;break;case"S":e=K0e,t=!0;break;case"w":e=X0e;break;case"W":e=X0e,t=!0}return W0e(e)?{type:"Set",value:e,complement:t}:Y0e()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=U0e("\f");break;case"n":e=U0e(` `);break;case"r":e=U0e("\r");break;case"t":e=U0e("\t");break;case"v":e=U0e("\v")}return W0e(e)?{type:"Character",value:e}:Y0e()}controlLetterEscapeAtom(){this.consumeChar("c");var e=this.popChar();if(!1===/[a-zA-Z]/.test(e))throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:U0e("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:U0e(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case` `:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:U0e(this.popChar())}}}characterClass(){let e=[],t=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),t=!0);this.isClassAtom();){var r=this.classAtom();if(r.type,V0e(r)&&this.isRangeDash()){this.consumeChar("-");var i=this.classAtom();if(i.type,V0e(i)){if(i.value=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}}}),age=s(()=>{tge=class{static{mt(this,"BaseRegExpVisitor")}visitChildren(e){for(var t in e){var r=e[t];e.hasOwnProperty(t)&&(void 0!==r.type?this.visit(r):Array.isArray(r)&&r.forEach(e=>{this.visit(e)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Lookbehind":this.visitLookbehind(e);break;case"NegativeLookbehind":this.visitNegativeLookbehind(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e)}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitLookbehind(e){}visitNegativeLookbehind(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}}}),sge=s(()=>{nge(),age()}),oge={};function lge(e){try{e=`/${e="string"!=typeof e?e.source:e}/`;var t,r=fge.pattern(e),i=[];for(t of r.value.value)yge.reset(e),yge.visit(t),i.push({start:yge.startRegexp,end:yge.endRegex});return i}catch{return[]}}function cge(e){try{return e=(e="string"==typeof e?new RegExp(e):e).toString(),yge.reset(e),yge.visit(fge.pattern(e)),yge.multiline}catch{return!1}}function hge(e){let t="string"==typeof e?new RegExp(e):e;return vge.some(e=>t.test(e))}function uge(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function dge(e,t){return e=pge(e),!!(t=t.match(e))&&0",s)-s+1);break;default:i(2)}break;case"[":(e=/\[(?:\\.|.)*?\]/g).lastIndex=s,i((e=e.exec(a)||[])[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":r(1);break;case"{":(e=/\{\d+,?\d*\}/g).lastIndex=s,(e=e.exec(a))?r(e[0].length):i(1);break;case"(":if("?"===a[s+1])switch(a[s+2]){case":":t+="(?:",s+=3,t+=o()+"|$)";break;case"=":t+="(?=",s+=3,t+=o()+")";break;case"!":e=s,s+=3,o(),t+=a.substr(e,s-e);break;case"<":switch(a[s+3]){case"=":case"!":e=s,s+=4,o(),t+=a.substr(e,s-e);break;default:r(a.indexOf(">",s)-s+1),t+=o()+"|$)"}}else r(1),t+=o()+"|$)";break;case")":return++s,t;default:i(1)}return t}return mt(o,"process"),new RegExp(o(),e.flags)}PGe(oge,{NEWLINE_REGEXP:()=>gge,escapeRegExp:()=>uge,getTerminalParts:()=>lge,isMultilineComment:()=>cge,isWhitespace:()=>hge,partialMatches:()=>dge,partialRegExp:()=>pge,whitespaceCharacters:()=>vge});var gge,fge,mge,yge,vge,bge=s(()=>{sge(),gge=/\r?\n/gm,fge=new ege,mge=class extends tge{static{mt(this,"TerminalRegExpVisitor")}constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){var t=String.fromCharCode(e.value);this.multiline||t!==` `||(this.multiline=!0),e.quantifier?(this.isStarting=!1,this.endRegexpStack=[]):(e=uge(t),this.endRegexpStack.push(e),this.isStarting&&(this.startRegexp+=e))}visitSet(e){var t;this.multiline||(t=this.regex.substring(e.loc.begin,e.loc.end),t=new RegExp(t),this.multiline=!!` `.match(t)),e.quantifier?(this.isStarting=!1,this.endRegexpStack=[]):(t=this.regex.substring(e.loc.begin,e.loc.end),this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t))}visitChildren(e){"Group"===e.type&&e.quantifier||super.visitChildren(e)}},yge=new mge,mt(lge,"getTerminalParts"),mt(cge,"isMultilineComment"),vge=` \r              

   `.split(""),mt(hge,"isWhitespace"),mt(uge,"escapeRegExp"),mt(dge,"partialMatches"),mt(pge,"partialRegExp")}),xge={};function Tge(e){return e.rules.find(e=>Vde(e)&&e.entry)}function wge(e){return e.rules.filter(e=>ipe(e)&&e.hidden)}function kge(e,t){var r,i=new Set,n=Tge(e);if(!n)return new Set(e.rules);for(r of[n].concat(wge(e)))Ege(r,i,t);var a,s=new Set;for(a of e.rules)(i.has(a.name)||ipe(a)&&a.hidden)&&s.add(a);return s}function Ege(e,t,r){t.add(e.name),ode(e).forEach(e=>{(Zde(e)||r&&npe(e))&&(e=e.rule.ref)&&!t.has(e.name)&&Ege(e,t,r)})}function _ge(e){let t=new Set;return ode(e).forEach(e=>{Rde(e)&&(Vde(e.type.ref)&&t.add(e.type.ref),Ode(e.type.ref))&&Vde(e.type.ref.$container)&&t.add(e.type.ref.$container)}),t}function Sge(e){return e.terminal||(e.type.ref?Oge(e.type.ref)?.terminal:void 0)}function Cge(e){return e.hidden&&!hge(Kge(e))}function Age(e,t){return e&&t?Lge(e,t,e.astNode,!0):[]}function Rge(e,t,r){return e&&t&&0!==(t=Lge(e,t,e.astNode,!0)).length?t[r=void 0!==r?Math.max(0,Math.min(r,t.length-1)):0]:void 0}function Lge(e,t,r,i){return!i&&(i=tde(e.grammarSource,Ede))&&i.feature===t?[e]:Fue(e)&&e.astNode===r?e.content.flatMap(e=>Lge(e,t,r,!1)):[]}function Nge(e,t){return e?Dge(e,t,e?.astNode):[]}function Ige(e,t,r){return e&&0!==(t=Dge(e,t,e?.astNode)).length?t[r=void 0!==r?Math.max(0,Math.min(r,t.length-1)):0]:void 0}function Dge(e,t,r){if(e.astNode!==r)return[];if(zde(e.grammarSource)&&e.grammarSource.value===t)return[e];for(var i,n,a=m0e(e).iterator(),s=[];(n=a.next()).done||((i=n.value).astNode===r?zde(i.grammarSource)&&i.grammarSource.value===t&&s.push(i):a.prune()),!n.done;);return s}function Mge(e){for(var t=e.astNode;t===e.container?.astNode;){var r=tde(e.grammarSource,Ede);if(r)return r;e=e.container}}function Oge(e){let t=e;return Ode(t)&&(xde(t.$container)?t=t.$container.$container:yde(t.$container)?t=t.$container:B0e(t.$container)),Pge(e,t,new Map)}function Pge(i,e,n){function t(e,t){let r;return tde(e,Ede)||(r=Pge(t,t,n)),n.set(i,r),r}if(mt(t,"go"),n.has(i))return n.get(i);n.set(i,void 0);for(var r of ode(e)){if(Ede(r)&&"name"===r.feature.toLowerCase())return n.set(i,r),r;if(Zde(r)&&Vde(r.rule.ref))return t(r,r.rule.ref);if(Qde(r)&&r.typeRef?.ref)return t(r,r.typeRef.ref)}}function $ge(t){var e=t.$container;if(Mde(e)){var r=e.elements;for(let e=r.indexOf(t)-1;0<=e;e--){var i=r[e];if(xde(i))return i;if(i=ode(r[e]).find(xde))return i}}if(mde(e))return $ge(e)}function Bge(e,t){return"?"===e||"*"===e||Mde(t)&&!!t.guardCondition}function Fge(e){return"*"===e||"+"===e}function zge(e){return"+="===e}function qge(e){return Uge(e,new Set)}function Uge(e,t){if(t.has(e))return!0;t.add(e);for(var r of ode(e))if(Zde(r)){if(!r.rule.ref||Vde(r.rule.ref)&&!Uge(r.rule.ref,t)||Pde(r.rule.ref))return!1}else{if(Ede(r))return!1;if(xde(r))return!1}return!!e.definition}function Gge(e){return jge(e.type,new Set)}function jge(e,t){return!!t.has(e)||(t.add(e),!kde(e)&&!Hde(e)&&(lpe(e)?e.types.every(e=>jge(e,t)):!!Qde(e)&&(void 0!==e.primitiveType||void 0!==e.stringType||void 0!==e.typeRef&&!!ape(e=e.typeRef.ref)&&jge(e.type,t))))}function Wge(e){if(!ipe(e))return e.inferredType?e.inferredType.name:e.dataType||(e.returnType&&(e=e.returnType.ref)?e.name:void 0)}function Yge(e){if(yde(e))return Vde(e)&&qge(e)?e.name:Wge(e)??e.name;if(Fde(e)||ape(e)||Kde(e))return e.name;if(xde(e)){var t=Vge(e);if(t)return t}else if(Ode(e))return e.name;throw new Error("Cannot get name of Unknown Type")}function Vge(e){return e.inferredType?e.inferredType.name:e.type?.ref?Yge(e.type.ref):void 0}function Hge(e){return ipe(e)?e.type?.name??"string":Vde(e)&&qge(e)?e.name:Wge(e)??e.name}function Xge(e){return ipe(e)?e.type?.name??"string":Wge(e)??e.name}function Kge(e){var e=Zge(e.definition,t={s:!1,i:!1,u:!1}),t=Object.entries(t).filter(([,e])=>e).map(([e])=>e).join("");return new RegExp(e,t)}function Zge(e,t){if(epe(e))return Qge(e);if(rpe(e))return Jge(e);if(Sde(e))return r1e(e);if(npe(e)){var r=e.rule.ref;if(r)return n1e(Zge(r.definition),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});throw new Error("Missing rule reference.")}if(Ude(e))return t1e(e);if(hpe(e))return e1e(e);var i;if(Xde(e))return r=e.regex.lastIndexOf("/"),i=e.regex.substring(1,r),r=e.regex.substring(r+1),t&&(t.i=r.includes("i"),t.s=r.includes("s"),t.u=r.includes("u")),n1e(i,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1});if(dpe(e))return n1e(a1e,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});throw new Error(`Invalid terminal element: ${e?.$type}, `+e?.$cstNode?.text)}function Qge(e){return n1e(e.elements.map(e=>Zge(e)).join("|"),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function Jge(e){return n1e(e.elements.map(e=>Zge(e)).join(""),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function e1e(e){return n1e(a1e+"*?"+Zge(e.terminal),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function t1e(e){return n1e(`(?!${Zge(e.terminal)})${a1e}*?`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function r1e(e){return e.right?n1e(`[${i1e(e.left)}-${i1e(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1}):n1e(i1e(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function i1e(e){return uge(e.value)}function n1e(e,t){return(t.parenthesized||t.lookahead||!1!==t.wrap)&&(e=`(${t.lookahead??(t.parenthesized?"":"?:")}${e})`),t.cardinality?""+e+t.cardinality:e}PGe(xge,{findAssignment:()=>Mge,findNameAssignment:()=>Oge,findNodeForKeyword:()=>Ige,findNodeForProperty:()=>Rge,findNodesForKeyword:()=>Nge,findNodesForKeywordInternal:()=>Dge,findNodesForProperty:()=>Age,getActionAtElement:()=>$ge,getActionType:()=>Vge,getAllReachableRules:()=>kge,getAllRulesUsedForCrossReferences:()=>_ge,getCrossReferenceTerminal:()=>Sge,getEntryRule:()=>Tge,getExplicitRuleType:()=>Wge,getHiddenRules:()=>wge,getRuleType:()=>Xge,getRuleTypeName:()=>Hge,getTypeName:()=>Yge,isArrayCardinality:()=>Fge,isArrayOperator:()=>zge,isCommentTerminal:()=>Cge,isDataType:()=>Gge,isDataTypeRule:()=>qge,isOptionalCardinality:()=>Bge,terminalRegex:()=>Kge});var a1e,s1e=s(()=>{q0e(),p0e(),Gue(),gde(),$0e(),bge(),mt(Tge,"getEntryRule"),mt(wge,"getHiddenRules"),mt(kge,"getAllReachableRules"),mt(Ege,"ruleDfs"),mt(_ge,"getAllRulesUsedForCrossReferences"),mt(Sge,"getCrossReferenceTerminal"),mt(Cge,"isCommentTerminal"),mt(Age,"findNodesForProperty"),mt(Rge,"findNodeForProperty"),mt(Lge,"findNodesForPropertyInternal"),mt(Nge,"findNodesForKeyword"),mt(Ige,"findNodeForKeyword"),mt(Dge,"findNodesForKeywordInternal"),mt(Mge,"findAssignment"),mt(Oge,"findNameAssignment"),mt(Pge,"findNameAssignmentInternal"),mt($ge,"getActionAtElement"),mt(Bge,"isOptionalCardinality"),mt(Fge,"isArrayCardinality"),mt(zge,"isArrayOperator"),mt(qge,"isDataTypeRule"),mt(Uge,"isDataTypeRuleInternal"),mt(Gge,"isDataType"),mt(jge,"isDataTypeInternal"),mt(Wge,"getExplicitRuleType"),mt(Yge,"getTypeName"),mt(Vge,"getActionType"),mt(Hge,"getRuleTypeName"),mt(Xge,"getRuleType"),mt(Kge,"terminalRegex"),a1e=/[\s\S]/.source,mt(Zge,"abstractElementToRegex"),mt(Qge,"terminalAlternativesToRegex"),mt(Jge,"terminalGroupToRegex"),mt(e1e,"untilTokenToRegex"),mt(t1e,"negateTokenToRegex"),mt(r1e,"characterRangeToRegex"),mt(i1e,"keywordToRegex"),mt(n1e,"withCardinality")});function o1e(e){var t,r=[];for(t of e.Grammar.rules)ipe(t)&&Cge(t)&&cge(Kge(t))&&r.push(t.name);return{multilineCommentRules:r,nameRegexp:P0e}}var l1e=s(()=>{$0e(),s1e(),bge(),p0e(),mt(o1e,"createGrammarConfig")}),c1e=s(()=>{});function h1e(e){console&&console.error&&console.error("Error: "+e)}function u1e(e){console&&console.warn&&console.warn("Warning: "+e)}var d1e=s(()=>{mt(h1e,"PRINT_ERROR"),mt(u1e,"PRINT_WARNING")});function p1e(e){var t=(new Date).getTime(),e=e();return{time:(new Date).getTime()-t,value:e}}var g1e=s(()=>{mt(p1e,"timer")});function f1e(e){function t(){}mt(t,"FakeConstructor"),t.prototype=e;let r=new t;function i(){return typeof r.bar}return mt(i,"fakeAccess"),i(),i(),e}var m1e=s(()=>{mt(f1e,"toFastProperties")}),y1e=s(()=>{d1e(),g1e(),m1e()});function v1e(e){return b1e(e)?e.LABEL:e.name}function b1e(e){return vj(e.LABEL)&&""!==e.LABEL}function x1e(e){return b(e,T1e)}function T1e(e){function t(e){return b(e,T1e)}var r,i;if(mt(t,"convertDefinition"),e instanceof k1e)return r={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx},vj(e.label)&&(r.label=e.label),r;if(e instanceof _1e)return{type:"Alternative",definition:t(e.definition)};if(e instanceof S1e)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof C1e)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof A1e)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:T1e(new I1e({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof L1e)return{type:"RepetitionWithSeparator",idx:e.idx,separator:T1e(new I1e({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof R1e)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof N1e)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof I1e)return r={type:"Terminal",name:e.terminalType.name,label:v1e(e.terminalType),idx:e.idx},vj(e.label)&&(r.terminalLabel=e.label),i=e.terminalType.PATTERN,e.terminalType.PATTERN&&(r.pattern=Uj(i)?i.source:i),r;if(e instanceof E1e)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}var w1e,k1e,E1e,_1e,S1e,C1e,A1e,R1e,L1e,N1e,I1e,D1e,M1e=s(()=>{lV(),mt(v1e,"tokenLabel"),mt(b1e,"hasTokenLabel"),w1e=class{static{mt(this,"AbstractProduction")}get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(t){t.visit(this),v(this.definition,e=>{e.accept(t)})}},k1e=class extends w1e{static{mt(this,"NonTerminal")}constructor(e){super([]),this.idx=1,$$(this,wW(e,e=>void 0!==e))}set definition(e){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(e){e.visit(this)}},E1e=class extends w1e{static{mt(this,"Rule")}constructor(e){super(e.definition),this.orgText="",$$(this,wW(e,e=>void 0!==e))}},_1e=class extends w1e{static{mt(this,"Alternative")}constructor(e){super(e.definition),this.ignoreAmbiguities=!1,$$(this,wW(e,e=>void 0!==e))}},S1e=class extends w1e{static{mt(this,"Option")}constructor(e){super(e.definition),this.idx=1,$$(this,wW(e,e=>void 0!==e))}},C1e=class extends w1e{static{mt(this,"RepetitionMandatory")}constructor(e){super(e.definition),this.idx=1,$$(this,wW(e,e=>void 0!==e))}},A1e=class extends w1e{static{mt(this,"RepetitionMandatoryWithSeparator")}constructor(e){super(e.definition),this.idx=1,$$(this,wW(e,e=>void 0!==e))}},R1e=class extends w1e{static{mt(this,"Repetition")}constructor(e){super(e.definition),this.idx=1,$$(this,wW(e,e=>void 0!==e))}},L1e=class extends w1e{static{mt(this,"RepetitionWithSeparator")}constructor(e){super(e.definition),this.idx=1,$$(this,wW(e,e=>void 0!==e))}},N1e=class extends w1e{static{mt(this,"Alternation")}get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,$$(this,wW(e,e=>void 0!==e))}},I1e=class{static{mt(this,"Terminal")}constructor(e){this.idx=1,$$(this,wW(e,e=>void 0!==e))}accept(e){e.visit(this)}},mt(x1e,"serializeGrammar"),mt(T1e,"serializeProduction")}),O1e=s(()=>{M1e(),D1e=class{static{mt(this,"GAstVisitor")}visit(e){var t=e;switch(t.constructor){case k1e:return this.visitNonTerminal(t);case _1e:return this.visitAlternative(t);case S1e:return this.visitOption(t);case C1e:return this.visitRepetitionMandatory(t);case A1e:return this.visitRepetitionMandatoryWithSeparator(t);case L1e:return this.visitRepetitionWithSeparator(t);case R1e:return this.visitRepetition(t);case N1e:return this.visitAlternation(t);case I1e:return this.visitTerminal(t);case E1e:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}});function P1e(e){return e instanceof _1e||e instanceof S1e||e instanceof R1e||e instanceof C1e||e instanceof A1e||e instanceof L1e||e instanceof I1e||e instanceof E1e}function $1e(e,t=[]){return e instanceof S1e||e instanceof R1e||e instanceof L1e||(e instanceof N1e?IY(e.definition,e=>$1e(e,t)):!(e instanceof k1e&&Aj(t,e))&&e instanceof w1e&&(e instanceof k1e&&t.push(e),xG(e.definition,e=>$1e(e,t))))}function B1e(e){return e instanceof N1e}function F1e(e){if(e instanceof k1e)return"SUBRULE";if(e instanceof S1e)return"OPTION";if(e instanceof N1e)return"OR";if(e instanceof C1e)return"AT_LEAST_ONE";if(e instanceof A1e)return"AT_LEAST_ONE_SEP";if(e instanceof L1e)return"MANY_SEP";if(e instanceof R1e)return"MANY";if(e instanceof I1e)return"CONSUME";throw Error("non exhaustive match")}var z1e=s(()=>{lV(),M1e(),mt(P1e,"isSequenceProd"),mt($1e,"isOptionalProd"),mt(B1e,"isBranchingProd"),mt(F1e,"getProductionDslName")}),q1e=s(()=>{M1e(),O1e(),z1e()});function U1e(e,t,r){return[new S1e({definition:[new I1e({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}var G1e,j1e=s(()=>{lV(),q1e(),G1e=class{static{mt(this,"RestWalker")}walk(r,i=[]){v(r.definition,(e,t)=>{if(t=rG(r.definition,t+1),e instanceof k1e)this.walkProdRef(e,t,i);else if(e instanceof I1e)this.walkTerminal(e,t,i);else if(e instanceof _1e)this.walkFlat(e,t,i);else if(e instanceof S1e)this.walkOption(e,t,i);else if(e instanceof C1e)this.walkAtLeastOne(e,t,i);else if(e instanceof A1e)this.walkAtLeastOneSep(e,t,i);else if(e instanceof L1e)this.walkManySep(e,t,i);else if(e instanceof R1e)this.walkMany(e,t,i);else{if(!(e instanceof N1e))throw Error("non exhaustive match");this.walkOr(e,t,i)}})}walkTerminal(e,t,r){}walkProdRef(e,t,r){}walkFlat(e,t,r){t=t.concat(r),this.walk(e,t)}walkOption(e,t,r){t=t.concat(r),this.walk(e,t)}walkAtLeastOne(e,t,r){t=[new S1e({definition:e.definition})].concat(t,r),this.walk(e,t)}walkAtLeastOneSep(e,t,r){t=U1e(e,t,r),this.walk(e,t)}walkMany(e,t,r){t=[new S1e({definition:e.definition})].concat(t,r),this.walk(e,t)}walkManySep(e,t,r){t=U1e(e,t,r),this.walk(e,t)}walkOr(e,t,r){let i=t.concat(r);v(e.definition,e=>{e=new _1e({definition:[e]}),this.walk(e,i)})}},mt(U1e,"restForRepetitionWithSeparator")});function W1e(e){if(e instanceof k1e)return W1e(e.referencedRule);if(e instanceof I1e)return H1e(e);if(P1e(e))return Y1e(e);if(B1e(e))return V1e(e);throw Error("non exhaustive match")}function Y1e(e){let t=[],r=e.definition,i=0,n=r.length>i,a,s=!0;for(;n&&s;)a=r[i],s=$1e(a),t=t.concat(W1e(a)),i+=1,n=r.length>i;return VY(t)}function V1e(e){return e=b(e.definition,e=>W1e(e)),VY(_B(e))}function H1e(e){return[e.terminalType]}var X1e,K1e=s(()=>{lV(),q1e(),mt(W1e,"first"),mt(Y1e,"firstForSequence"),mt(V1e,"firstForBranching"),mt(H1e,"firstForTerminal")}),Z1e=s(()=>{X1e="_~IN~_"});function Q1e(e){let t={};return v(e,e=>{e=new efe(e).startWalking(),$$(t,e)}),t}function J1e(e,t){return e.name+t+X1e}var efe,tfe=s(()=>{j1e(),K1e(),lV(),Z1e(),q1e(),efe=class extends G1e{static{mt(this,"ResyncFollowsWalker")}constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,r){}walkProdRef(e,t,r){e=J1e(e.referencedRule,e.idx)+this.topProd.name,t=t.concat(r),r=W1e(new _1e({definition:t})),this.follows[e]=r}},mt(Q1e,"computeAllProdsFollows"),mt(J1e,"buildBetweenProdsFollowPrefix")});function rfe(e){var t,e=e.toString();return nfe.hasOwnProperty(e)?nfe[e]:(t=afe.pattern(e),nfe[e]=t)}function ife(){nfe={}}var nfe,afe,sfe=s(()=>{sge(),nfe={},afe=new ege,mt(rfe,"getRegExpAst"),mt(ife,"clearRegExpParserCache")});function ofe(e,t=!1){try{var r=rfe(e);return lfe(r.value,{},r.flags.ignoreCase)}catch(r){r.message===gfe?t&&u1e(`${ffe} Unable to optimize: < ${e.toString()} > 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.`):(t=t?` This will disable the lexer's first char optimizations. See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`:"",h1e(`${ffe} Failed parsing: < ${e.toString()} > Using the @chevrotain/regexp-to-ast library Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+t))}return[]}function lfe(t,n,a){switch(t.type){case"Disjunction":for(let e=0;e{if("number"==typeof t)cfe(t,n,a);else{var r=t;if(!0===a)for(let e=r.from;e<=r.to;e++)cfe(e,n,a);else{for(let e=r.from;e<=r.to&&e=eme){var t=r.from>=eme?r.from:eme,e=r.to,t=Wfe(t),i=Wfe(e);for(let e=t;e<=i;e++)n[e]=e}}}});break;case"Group":lfe(s.value,n,a);break;default:throw Error("Non Exhaustive Match")}if(i=void 0!==s.quantifier&&0===s.quantifier.atLeast,"Group"===s.type&&!1===dfe(s)||"Group"!==s.type&&0==i)break}break;default:throw Error("non exhaustive match!")}return Ej(n)}function cfe(e,t,r){var i=Wfe(e);t[i]=i,!0===r&&hfe(e,t)}function hfe(e,t){var r=(e=String.fromCharCode(e)).toUpperCase();r!==e?t[r=Wfe(r.charCodeAt(0))]=r:(r=e.toLowerCase())!==e&&(t[e=Wfe(r.charCodeAt(0))]=e)}function ufe(e,r){return OG(e.value,e=>{if("number"==typeof e)return Aj(r,e);{let t=e;return void 0!==OG(r,e=>t.from<=e&&e<=t.to)}})}function dfe(e){var t=e.quantifier;return!(!t||0!==t.atLeast)||!!e.value&&(c_(e.value)?xG(e.value,dfe):dfe(e.value))}function pfe(t,e){var r,i;return e instanceof RegExp?(r=rfe(e),(i=new mfe(t)).visit(r),i.found):void 0!==OG(e,e=>Aj(t,e.charCodeAt(0)))}var gfe,ffe,mfe,yfe=s(()=>{sge(),lV(),y1e(),sfe(),rme(),gfe="Complement Sets are not supported for first char optimization",ffe=`Unable to use "first char" lexer optimizations: `,mt(ofe,"getOptimizedStartCodesIndices"),mt(lfe,"firstCharOptimizedIndices"),mt(cfe,"addOptimizedIdxToResult"),mt(hfe,"handleIgnoreCase"),mt(ufe,"findCode"),mt(dfe,"isWholeOptional"),mfe=class extends tge{static{mt(this,"CharCodeFinder")}constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(!0!==this.found){switch(e.type){case"Lookahead":return void this.visitLookahead(e);case"NegativeLookahead":return void this.visitNegativeLookahead(e);case"Lookbehind":return void this.visitLookbehind(e);case"NegativeLookbehind":return void this.visitNegativeLookbehind(e)}super.visitChildren(e)}}visitCharacter(e){Aj(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?void 0===ufe(e,this.targetCharCodes)&&(this.found=!0):void 0!==ufe(e,this.targetCharCodes)&&(this.found=!0)}},mt(pfe,"canMatchCharCode")});function vfe(e,n){var t=(n=FU(n,{useSticky:Kfe,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` `],tracer:mt((e,t)=>t(),"tracer")})).tracer;t("initCharCodeToOptimizedIndexMap",()=>{Yfe()});let r,i=(t("Reject Lexer.NA",()=>{r=kY(e,e=>e[Vfe]===Tme.NA)}),!1),a;t("Transform Patterns",()=>{i=!1,a=b(r,e=>{var t,e=e[Vfe];if(Uj(e))return 1!==(t=e.source).length||"^"===t||"$"===t||"."===t||e.ignoreCase?2!==t.length||"\\"!==t[0]||Aj(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],t[1])?(n.useSticky?Ofe:Mfe)(e):t[1]:t;if(Bw(e))return i=!0,{exec:e};if("object"==typeof e)return i=!0,e;if("string"==typeof e)return 1===e.length?e:(t=e.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),e=new RegExp(t),(n.useSticky?Ofe:Mfe)(e));throw Error("non exhaustive match")})});let s,o,l,c,h;t("misc mapping",()=>{s=b(r,e=>e.tokenTypeIdx),o=b(r,e=>{if((e=e.GROUP)!==Tme.SKIPPED){if(vj(e))return e;if(Yj(e))return!1;throw Error("non exhaustive match")}}),l=b(r,e=>{if(e=e.LONGER_ALT)return c_(e)?b(e,e=>Ij(r,e)):[Ij(r,e)]}),c=b(r,e=>e.PUSH_MODE),h=b(r,e=>fj(e,"POP_MODE"))});let u;t("Line Terminator Handling",()=>{let t=Gfe(n.lineTerminatorCharacters);u=b(r,e=>!1),"onlyOffset"!==n.positionTracking&&(u=b(r,e=>fj(e,"LINE_BREAKS")?!!e.LINE_BREAKS:!1===qfe(e,t)&&pfe(t,e.PATTERN)))});let d,p,g,f,m=(t("Misc Mapping #2",()=>{d=b(r,Ffe),p=b(a,zfe),g=xY(r,(e,t)=>(t=t.GROUP,vj(t)&&t!==Tme.SKIPPED&&(e[t]=[]),e),{}),f=b(a,(e,t)=>({pattern:a[t],longerAlt:l[t],canLineTerminator:u[t],isCustom:d[t],short:p[t],group:o[t],push:c[t],pop:h[t],tokenTypeIdx:s[t],tokenType:r[t]}))}),!0),y=[];return n.safeMode||t("First Char Optimization",()=>{y=xY(r,(r,e,i)=>{if("string"==typeof e.PATTERN){var t=Wfe(e.PATTERN.charCodeAt(0));jfe(r,t,f[i])}else if(c_(e.START_CHARS_HINT)){let t;v(e.START_CHARS_HINT,e=>{e=Wfe("string"==typeof e?e.charCodeAt(0):e),t!==e&&(t=e,jfe(r,e,f[i]))})}else Uj(e.PATTERN)?e.PATTERN.unicode?(m=!1,n.ensureOptimizations&&h1e(`${ffe} Unable to analyze < ${e.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`)):(t=ofe(e.PATTERN,n.ensureOptimizations),$j(t)&&(m=!1),v(t,e=>{jfe(r,e,f[i])})):(n.ensureOptimizations&&h1e(`${ffe} TokenType: <${e.name}> is using a custom token pattern without providing 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:i,canBeOptimized:m}}function bfe(e,t){let r=[],i=Tfe(e);r=r.concat(i.errors);var n=(e=wfe(i.valid)).valid;return r=(r=(r=(r=(r=r.concat(e.errors)).concat(xfe(n))).concat(Afe(n))).concat(Rfe(n,t))).concat(Lfe(n))}function xfe(e){let t=[],r=SG(e,e=>Uj(e[Vfe]));return t=(t=(t=(t=(t=t.concat(kfe(r))).concat(_fe(r))).concat(Sfe(r))).concat(Cfe(r))).concat(Efe(r))}function Tfe(e){var t=SG(e,e=>!fj(e,Vfe));return{errors:b(t,e=>({message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:bme.MISSING_PATTERN,tokenTypes:[e]})),valid:XU(e,t)}}function wfe(e){var t=SG(e,e=>(e=e[Vfe],!(Uj(e)||Bw(e)||fj(e,"exec")||vj(e))));return{errors:b(t,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:bme.INVALID_PATTERN,tokenTypes:[e]})),valid:XU(e,t)}}function kfe(e){class i extends tge{static{mt(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(e){this.found=!0}}return e=SG(e,e=>{e=e.PATTERN;try{var t=rfe(e),r=new i;return r.visit(t),r.found}catch{return Zfe.test(e.source)}}),b(e,e=>({message:`Unexpected RegExp Anchor Error: Token Type: ->`+e.name+`<- static 'PATTERN' cannot contain end of input anchor '$' See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:bme.EOI_ANCHOR_FOUND,tokenTypes:[e]}))}function Efe(e){return e=SG(e,e=>e.PATTERN.test("")),b(e,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:bme.EMPTY_MATCH_PATTERN,tokenTypes:[e]}))}function _fe(e){class i extends tge{static{mt(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(e){this.found=!0}}return e=SG(e,e=>{e=e.PATTERN;try{var t=rfe(e),r=new i;return r.visit(t),r.found}catch{return Qfe.test(e.source)}}),b(e,e=>({message:`Unexpected RegExp Anchor Error: Token Type: ->`+e.name+`<- static 'PATTERN' cannot contain start of input anchor '^' See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:bme.SOI_ANCHOR_FOUND,tokenTypes:[e]}))}function Sfe(e){return e=SG(e,e=>(e=e[Vfe])instanceof RegExp&&(e.multiline||e.global)),b(e,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:bme.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}))}function Cfe(e){let i=[],t=b(e,r=>xY(e,(e,t)=>(r.PATTERN.source!==t.PATTERN.source||Aj(i,t)||t.PATTERN===Tme.NA||(i.push(t),e.push(t)),e),[]));t=Fz(t);var r=SG(t,e=>1{var t=b(e,e=>e.name);return{message:`The same RegExp pattern ->${FG(e).PATTERN}<-has been used in all of the following Token Types: ${t.join(", ")} <-`,type:bme.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}})}function Afe(e){return e=SG(e,e=>!!fj(e,"GROUP")&&(e=e.GROUP)!==Tme.SKIPPED&&e!==Tme.NA&&!vj(e)),b(e,e=>({message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:bme.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}))}function Rfe(e,t){return e=SG(e,e=>void 0!==e.PUSH_MODE&&!Aj(t,e.PUSH_MODE)),b(e,e=>({message:`Token Type: ->${e.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${e.PUSH_MODE}<-which does not exist`,type:bme.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}))}function Lfe(e){let a=[],t=xY(e,(e,t,r)=>{var i=t.PATTERN;return i!==Tme.NA&&(vj(i)?e.push({str:i,idx:r,tokenType:t}):Uj(i)&&Ife(i)&&e.push({str:i.source,idx:r,tokenType:t})),e},[]);return v(e,(i,n)=>{v(t,({str:e,idx:t,tokenType:r})=>{n${r.name}<- can never be matched. Because it appears AFTER the Token Type ->${i.name}<-in the lexer's definition. See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`,a.push({message:t,type:bme.UNREACHABLE_PATTERN,tokenTypes:[i,r]}))})}),a}function Nfe(e,t){var r;if(Uj(t))return!Dfe(t)&&null!==(r=t.exec(e))&&0===r.index;if(Bw(t))return t(e,0,[],{});if(fj(t,"exec"))return t.exec(e,0,[],{});if("string"==typeof t)return t===e;throw Error("non exhaustive match")}function Ife(t){return void 0===OG([".","\\","[","]","|","^","$","(",")","?","*","+","{"],e=>-1!==t.source.indexOf(e))}function Dfe(e){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\? property in its definition `,type:bme.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),fj(e,Xfe)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+Xfe+`> property in its definition `,type:bme.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),fj(e,Xfe)&&fj(e,Hfe)&&!fj(e.modes,e.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${Hfe}: <${e.defaultMode}>which does not exist `,type:bme.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),fj(e,Xfe)&&v(e.modes,(r,i)=>{v(r,(t,e)=>{Yj(t)?n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${i}> at index: <${e}> `,type:bme.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED}):fj(t,"LONGER_ALT")&&(e=c_(t.LONGER_ALT)?t.LONGER_ALT:[t.LONGER_ALT],v(e,e=>{Yj(e)||Aj(r,e)||n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${e.name}> on token <${t.name}> outside of mode <${i}> `,type:bme.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})}))})}),n}function $fe(e,t,r){let i=[],n=!1,a=Fz(_B(Ej(e.modes))),s=kY(a,e=>e[Vfe]===Tme.NA),o=Gfe(r);return t&&v(s,e=>{var t=qfe(e,o);!1!==t?(t={message:Ufe(e,t),type:t.issue,tokenType:e},i.push(t)):fj(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(n=!0):pfe(o,e.PATTERN)&&(n=!0)}),t&&!n&&i.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:bme.NO_LINE_BREAKS_FLAGS}),i}function Bfe(r){let i={},e=M$(r);return v(e,e=>{var t=r[e];if(!c_(t))throw Error("non exhaustive match");i[e]=[]}),i}function Ffe(e){if(e=e.PATTERN,Uj(e))return!1;if(Bw(e))return!0;if(fj(e,"exec"))return!0;if(vj(e))return!1;throw Error("non exhaustive match")}function zfe(e){return!(!vj(e)||1!==e.length)&&e.charCodeAt(0)}function qfe(e,t){if(fj(e,"LINE_BREAKS"))return!1;if(Uj(e.PATTERN)){try{pfe(t,e.PATTERN)}catch(e){return{issue:bme.IDENTIFY_TERMINATOR,errMsg:e.message}}return!1}if(vj(e.PATTERN))return!1;if(Ffe(e))return{issue:bme.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function Ufe(e,t){if(t.issue===bme.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern. The problem is in the <${e.name}> Token Type Root cause: ${t.errMsg}. For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===bme.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. The problem is in the <${e.name}> Token Type For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function Gfe(e){return b(e,e=>vj(e)?e.charCodeAt(0):e)}function jfe(e,t,r){void 0===e[t]?e[t]=[r]:e[t].push(r)}function Wfe(e){return e{sge(),Eme(),lV(),y1e(),yfe(),sfe(),Vfe="PATTERN",Hfe="defaultMode",Xfe="modes",Kfe="boolean"==typeof new RegExp("(?:)").sticky,mt(vfe,"analyzeTokenTypes"),mt(bfe,"validatePatterns"),mt(xfe,"validateRegExpPattern"),mt(Tfe,"findMissingPatterns"),mt(wfe,"findInvalidPatterns"),Zfe=/[^\\][$]/,mt(kfe,"findEndOfInputAnchor"),mt(Efe,"findEmptyMatchRegExps"),Qfe=/[^\\[][\^]|^\^/,mt(_fe,"findStartOfInputAnchor"),mt(Sfe,"findUnsupportedFlags"),mt(Cfe,"findDuplicatePatterns"),mt(Afe,"findInvalidGroupType"),mt(Rfe,"findModesThatDoNotExist"),mt(Lfe,"findUnreachablePatterns"),mt(Nfe,"tryToMatchStrToPattern"),mt(Ife,"noMetaChar"),mt(Dfe,"usesLookAheadOrBehind"),mt(Mfe,"addStartOfInput"),mt(Ofe,"addStickyFlag"),mt(Pfe,"performRuntimeChecks"),mt($fe,"performWarningRuntimeChecks"),mt(Bfe,"cloneEmptyGroups"),mt(Ffe,"isCustomPattern"),mt(zfe,"isShortPattern"),Jfe={test:mt(function(t){var r=t.length;for(let e=this.lastIndex;e{e.isParent=0e.CATEGORIES)));var n=XU(r,t);t=t.concat(n),$j(n)?i=!1:r=n}return t}function ome(e){v(e,e=>{ume(e)||((yme[mme]=e).tokenTypeIdx=mme++),dme(e)&&!c_(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),dme(e)||(e.CATEGORIES=[]),pme(e)||(e.categoryMatches=[]),gme(e)||(e.categoryMatchesMap={})})}function lme(e){v(e,r=>{r.categoryMatches=[],v(r.categoryMatchesMap,(e,t)=>{r.categoryMatches.push(yme[t].tokenTypeIdx)})})}function cme(e){v(e,e=>{hme([],e)})}function hme(r,i){v(r,e=>{i.categoryMatchesMap[e.tokenTypeIdx]=!0}),v(i.CATEGORIES,e=>{var t=r.concat(i);Aj(t,e)||hme(t,e)})}function ume(e){return fj(e,"tokenTypeIdx")}function dme(e){return fj(e,"CATEGORIES")}function pme(e){return fj(e,"categoryMatches")}function gme(e){return fj(e,"categoryMatchesMap")}function fme(e){return fj(e,"tokenTypeIdx")}var mme,yme,vme,bme,xme,Tme,wme=s(()=>{lV(),mt(ime,"tokenStructuredMatcher"),mt(nme,"tokenStructuredMatcherNoCategories"),mme=1,yme={},mt(ame,"augmentTokenTypes"),mt(sme,"expandCategories"),mt(ome,"assignTokenDefaultProps"),mt(lme,"assignCategoriesTokensProp"),mt(cme,"assignCategoriesMapProp"),mt(hme,"singleAssignCategoriesToksMap"),mt(ume,"hasShortKeyProperty"),mt(dme,"hasCategoriesProperty"),mt(pme,"hasExtendingTokensTypesProperty"),mt(gme,"hasExtendingTokensTypesMapProperty"),mt(fme,"isTokenType")}),kme=s(()=>{vme={buildUnableToPopLexerModeMessage(e){return`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(e,t,r,i,n,a){return`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${r} characters.`}}}),Eme=s(()=>{var e;rme(),lV(),y1e(),wme(),kme(),sfe(),(e=bme=bme||{})[e.MISSING_PATTERN=0]="MISSING_PATTERN",e[e.INVALID_PATTERN=1]="INVALID_PATTERN",e[e.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",e[e.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",e[e.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",e[e.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",e[e.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",e[e.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",e[e.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",e[e.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",e[e.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",e[e.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",e[e.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",e[e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE",xme={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` `,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:vme,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0},Object.freeze(xme),(Tme=class{static{mt(this,"Lexer")}constructor(n,a=xme){if(this.lexerDefinition=n,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=(e,t)=>{var r,i,n,a;return!0===this.traceInitPerf?(this.traceInitIndent++,r=new Array(this.traceInitIndent+1).join("\t"),{time:i,value:n}=(this.traceInitIndent <${e}>`),p1e(t)),a=10 time: ${i}ms`),this.traceInitIndent--,n):t()},"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=$$({},xme,a);var e=this.config.traceInitPerf;!0===e?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof e&&(this.traceInitMaxIdent=e,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let r,e=!0,i=(this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===xme.lineTerminatorsPattern)this.config.lineTerminatorsPattern=Jfe;else if(this.config.lineTerminatorCharacters===xme.lineTerminatorCharacters)throw Error(`Error: Missing 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=c_(n)?{modes:{defaultMode:Dz(n)},defaultMode:Hfe}:(e=!1,Dz(n))}),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Pfe(r,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat($fe(r,this.trackStartLines,this.config.lineTerminatorCharacters))})),r.modes=r.modes||{},v(r.modes,(e,t)=>{r.modes[t]=kY(e,e=>Yj(e))}),M$(r.modes)),t;if(v(r.modes,(t,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(bfe(t,i))}),$j(this.lexerDefinitionErrors)){ame(t);let e;this.TRACE_INIT("analyzeTokenTypes",()=>{e=vfe(t,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:a.positionTracking,ensureOptimizations:a.ensureOptimizations,safeMode:a.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[r]=e.patternIdxToConfig,this.charCodeToPatternIdxToConfig[r]=e.charCodeToPatternIdxToConfig,this.emptyGroups=$$({},this.emptyGroups,e.emptyGroups),this.hasCustom=e.hasCustom||this.hasCustom,this.canModeBeOptimized[r]=e.canBeOptimized}})}),this.defaultMode=r.defaultMode,!$j(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling)throw t=b(this.lexerDefinitionErrors,e=>e.message).join(`----------------------- `),new Error(`Errors detected in definition of Lexer: `+t);v(this.lexerDefinitionWarning,e=>{u1e(e.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(Kfe?(this.chopInput=US,this.match=this.matchWithTest):(this.updateLastIndex=a$,this.match=this.matchWithExec),e&&(this.handleModes=a$),!1===this.trackStartLines&&(this.computeNewColumn=US),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=a$),/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 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 e=xY(this.canModeBeOptimized,(e,t,r)=>(!1===t&&e.push(r),e),[]);if(a.ensureOptimizations&&!$j(e))throw Error(`Lexer Modes: < ${e.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",()=>{ife()}),this.TRACE_INIT("toFastProperties",()=>{f1e(this)})})}tokenize(e,t=this.defaultMode){if($j(this.lexerDefinitionErrors))return this.tokenizeInternal(e,t);throw e=b(this.lexerDefinitionErrors,e=>e.message).join(`----------------------- `),new Error(`Unable to Tokenize because Errors detected in definition of Lexer: `+e)}tokenizeInternal(n,P){let e,a,t,r,i,s,o,l,c,h,$,u,d,B,p,g=n,F=g.length,f=0,m=0,z=this.hasCustom?0:Math.floor(n.length/10),y=new Array(z),v=[],b=this.trackStartLines?1:void 0,x=this.trackStartLines?1:void 0,T=Bfe(this.emptyGroups),q=this.trackStartLines,w=this.config.lineTerminatorsPattern,k=0,E=[],_=[],S=[],U=[];Object.freeze(U);let C;function A(){return E}function R(e){return e=Wfe(e),void 0===(e=_[e])?U:e}mt(A,"getPossiblePatternsSlow"),mt(R,"getPossiblePatternsOptimized");var G=mt(e=>{var t;1===S.length&&void 0===e.tokenType.PUSH_MODE?(t=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e),v.push({offset:e.startOffset,line:e.startLine,column:e.startColumn,length:e.image.length,message:t})):(S.pop(),e=JU(S),E=this.patternIdxToConfig[e],_=this.charCodeToPatternIdxToConfig[e],k=E.length,t=this.canModeBeOptimized[e]&&!1===this.config.safeMode,C=_&&t?R:A)},"pop_mode");function L(e){S.push(e),_=this.charCodeToPatternIdxToConfig[e],E=this.patternIdxToConfig[e],k=E.length,k=E.length,e=this.canModeBeOptimized[e]&&!1===this.config.safeMode,C=_&&e?R:A}mt(L,"push_mode"),L.call(this,P);let N,j=this.config.recoveryEnabled;for(;fs.length){s=r,o=l,N=D;break}}}break}}if(null!==s){if(c=s.length,void 0!==(h=N.group)&&($=N.tokenTypeIdx,u=this.createTokenInstance(s,f,$,N.tokenType,b,x,c),this.handlePayload(u,o),!1===h?m=this.addToken(y,m,u):T[h].push(u)),n=this.chopInput(n,c),f+=c,x=this.computeNewColumn(x,c),!0===q&&!0===N.canLineTerminator){let e=0,t,r;for(w.lastIndex=0;!0===(t=w.test(s))&&(r=w.lastIndex-1,e++),!0===t;);0!==e&&(b+=e,x=c-r,this.updateTokenEndLineColumnLocation(u,h,r,e,b,x,c))}this.handleModes(N,G,L,u)}else{let e=f,t=b,r=x,i=!1===j;for(;!1===i&&f{lV(),Eme(),wme(),mt(_me,"tokenLabel"),mt(Sme,"hasTokenLabel"),Nme="parent",Ime="categories",Dme="label",Mme="group",Ome="push_mode",Pme="pop_mode",$me="longer_alt",Bme="line_breaks",Fme="start_chars_hint",mt(Cme,"createToken"),mt(Ame,"createTokenInternal"),ame([zme=Cme({name:"EOF",pattern:Tme.NA})]),mt(Rme,"createTokenInstance"),mt(Lme,"tokenMatcher")}),Wme=s(()=>{jme(),lV(),q1e(),qme={buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${Sme(e)?`--> ${_me(e)} <--`:`token of type --> ${e.name} <--`} but found --> '${t.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:e}){return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,customUserDescription:r}){var i="Expecting: ",t=` but found: '`+FG(t).image+"'";return r?i+r+t:(r=xY(e,(e,t)=>e.concat(t),[]),e=b(r,e=>`[${b(e,e=>_me(e)).join(", ")}]`),i+`one of these possible Token sequences: `+b(e,(e,t)=>` ${t+1}. `+e).join(` `)+t)},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:r}){var i="Expecting: ",t=` but found: '`+FG(t).image+"'";return r?i+r+t:i+`expecting at least one iteration which starts with one of these possible Token sequences:: <${b(e,e=>`[${b(e,e=>_me(e)).join(",")}]`).join(" ,")}>`+t}},Object.freeze(qme),Ume={buildRuleNotFoundError(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+`<- inside top level rule: ->`+e.name+"<-"}},Gme={buildDuplicateFoundError(e,t){function r(e){return e instanceof I1e?e.terminalType.name:e instanceof k1e?e.nonTerminalName:""}mt(r,"getExtraProductionArgument");let i=e.name,n=FG(t),a=n.idx,s=F1e(n),o=r(n),l=0${s}${l?a:""}<- ${o?`with argument: ->${o}<-`:""} appears more than once (${t.length} times) in the top level rule: ->${i}<-. For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES `;return c=(c=c.replace(/[ \t]+/g," ")).replace(/\s\s+/g,` `)},buildNamespaceConflictError(e){return`Namespace conflict found in grammar. The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.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(e){var t=b(e.prefixPath,e=>_me(e)).join(", "),r=0===e.alternation.idx?"":e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix in inside <${e.topLevelRule.name}> Rule, <${t}> 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(e){var t=b(e.prefixPath,e=>_me(e)).join(", "),r=0===e.alternation.idx?"":e.alternation.idx;return`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in inside <${e.topLevelRule.name}> Rule, <${t}> 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(e){let t=F1e(e.repetition);return 0!==e.repetition.idx&&(t+=e.repetition.idx),`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens. This could lead to an infinite loop.`},buildTokenNameError(e){return"deprecated"},buildEmptyAlternationError(e){return`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in inside <${e.topLevelRule.name}> Rule. Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(e){return`An Alternation cannot have more than 256 alternatives: inside <${e.topLevelRule.name}> Rule. has ${e.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(e){var t=e.topLevelRule.name;return`Left Recursion found in grammar. rule: <${t}> can be invoked from itself (directly or indirectly) without consuming any Tokens. The grammar path that causes this is: ${t+" --\x3e "+b(e.leftRecursionPath,e=>e.name).concat([t]).join(" --\x3e ")} To fix this refactor your grammar to remove the left recursion. see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(e){return"deprecated"},buildDuplicateRuleNameError(e){return`Duplicate definition, rule: ->${e.topLevelRule instanceof E1e?e.topLevelRule.name:e.topLevelRule}<- is already defined in the grammar: ->${e.grammarName}<-`}}});function Yme(e,t){return(e=new Vme(e,t)).resolveRefs(),e.errors}var Vme,Hme=s(()=>{uve(),lV(),q1e(),mt(Yme,"resolveGrammar"),Vme=class extends D1e{static{mt(this,"GastRefResolverVisitor")}constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){v(Ej(this.nameToTopRule),e=>{(this.currTopLevel=e).accept(this)})}visitNonTerminal(e){var t=this.nameToTopRule[e.nonTerminalName];t?e.referencedRule=t:(t=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e),this.errors.push({message:t,type:lve.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName}))}}});function Xme(t,r,i=[]){i=Dz(i);let n=[],a=0;function s(e){return e.concat(rG(t,a+1))}function o(e){return e=Xme(s(e),r,i),n.concat(e)}for(mt(s,"remainingPathWith"),mt(o,"getAlternativesForProd");i.length{!1===$j(e.definition)&&(n=o(e.definition))}),n;if(!(e instanceof I1e))throw Error("non exhaustive match");i.push(e.terminalType)}}a++}return n.push({partialPath:i,suffixDef:rG(t,a)}),n}function Kme(e,t,r,i){let n="EXIT_NONE_TERMINAL",a=[n],s="EXIT_ALTERNATIVE",o=!1,l=t.length,c=l-i-1,h=[],u=[];for(u.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!$j(u);)if((v=u.pop())===s)o&&JU(u).idx<=c&&u.pop();else{var d=v.def,p=v.idx,g=v.ruleStack,f=v.occurrenceStack;if(!$j(d)){var m=d[0];if(m===n)v={idx:p,def:rG(d),ruleStack:aG(g),occurrenceStack:aG(f)},u.push(v);else if(m instanceof I1e)if(p{lV(),K1e(),j1e(),q1e(),Jme=class extends G1e{static{mt(this,"AbstractNextPossibleTokensWalker")}constructor(e,t){super(),this.topProd=e,this.path=t,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=Dz(this.path.ruleStack).reverse(),this.occurrenceStack=Dz(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,t=[]){this.found||super.walk(e,t)}walkProdRef(e,t,r){e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence&&(t=t.concat(r),this.updateExpectedNext(),this.walk(e.referencedRule,t))}updateExpectedNext(){$j(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},Qme=class extends Jme{static{mt(this,"NextAfterTokenWalker")}constructor(e,t){super(e,t),this.path=t,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,t,r){this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found&&(e=t.concat(r),t=new _1e({definition:e}),this.possibleTokTypes=W1e(t),this.found=!0)}},Jme=class extends G1e{static{mt(this,"AbstractNextTerminalAfterProductionWalker")}constructor(e,t){super(),this.topRule=e,this.occurrence=t,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},eye=class extends Jme{static{mt(this,"NextTerminalAfterManyWalker")}walkMany(e,t,r){var i;e.idx===this.occurrence?(i=FG(t.concat(r)),this.result.isEndOfRule=void 0===i,i instanceof I1e&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)):super.walkMany(e,t,r)}},tye=class extends Jme{static{mt(this,"NextTerminalAfterManySepWalker")}walkManySep(e,t,r){var i;e.idx===this.occurrence?(i=FG(t.concat(r)),this.result.isEndOfRule=void 0===i,i instanceof I1e&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)):super.walkManySep(e,t,r)}},rye=class extends Jme{static{mt(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(e,t,r){var i;e.idx===this.occurrence?(i=FG(t.concat(r)),this.result.isEndOfRule=void 0===i,i instanceof I1e&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)):super.walkAtLeastOne(e,t,r)}},iye=class extends Jme{static{mt(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(e,t,r){var i;e.idx===this.occurrence?(i=FG(t.concat(r)),this.result.isEndOfRule=void 0===i,i instanceof I1e&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)):super.walkAtLeastOneSep(e,t,r)}},mt(Xme,"possiblePathsFrom"),mt(Kme,"nextPossibleTokensAfter"),mt(Zme,"expandTopLevelRule")});function aye(e){if(e instanceof S1e||"Option"===e)return xye.OPTION;if(e instanceof R1e||"Repetition"===e)return xye.REPETITION;if(e instanceof C1e||"RepetitionMandatory"===e)return xye.REPETITION_MANDATORY;if(e instanceof A1e||"RepetitionMandatoryWithSeparator"===e)return xye.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof L1e||"RepetitionWithSeparator"===e)return xye.REPETITION_WITH_SEPARATOR;if(e instanceof N1e||"Alternation"===e)return xye.ALTERNATION;throw Error("non exhaustive match")}function sye(e){var{occurrence:e,rule:t,prodType:r,maxLookahead:i}=e;return(r=aye(r))===xye.ALTERNATION?fye(e,t,i):mye(e,t,r,i)}function oye(e,t,r,i,n,a){return a(e=fye(e,t,r),i,bye(e)?nme:ime,n)}function lye(e,t,r,i,n,a){return t=bye(e=mye(e,t,n,r))?nme:ime,a(e[0],t,i)}function cye(c,e,h,t){let u=c.length,r=xG(c,e=>xG(e,e=>1===e.length));if(e)return function(e){var r=b(e,e=>e.GATE);for(let t=0;t_B(e)),t=xY(e,(t,e,r)=>(v(e,e=>{fj(t,e.tokenTypeIdx)||(t[e.tokenTypeIdx]=r),v(e.categoryMatches,e=>{fj(t,e)||(t[e]=r)})}),t),{});return function(){var e=this.LA(1);return t[e.tokenTypeIdx]}}}function hye(n,a,r){let e=xG(n,e=>1===e.length),s=n.length;if(!e||r)return function(){e:for(let e=0;e(t[e.tokenTypeIdx]=!0,v(e.categoryMatches,e=>{t[e]=!0}),t),[]);return function(){var e=this.LA(1);return!0===t[e.tokenTypeIdx]}}}function uye(t){var r=new Array(t);for(let e=0;eXme([e],1)),n=uye(t.length),a=b(t,e=>{let t={};return v(e,e=>{e=dye(e.partialPath),v(e,e=>{t[e]=!0})}),t}),s=t;for(let r=1;r<=i;r++){var o=s;s=uye(o.length);for(let t=0;t{e=dye(e.partialPath),v(e,e=>{a[t][e]=!0})})}}}return n}function fye(e,t,r,i){return e=new wye(e,xye.ALTERNATION,i),t.accept(e),gye(e.result,r)}function mye(e,t,r,i){var n=new wye(e,r),n=(t.accept(n),n.result),t=new Tye(t,e,r).startWalking();return gye([new _1e({definition:n}),new _1e({definition:t})],i)}function yye(t,r){e:for(let e=0;ee===(t=r[t])||t.categoryMatchesMap[e.tokenTypeIdx])}function bye(e){return xG(e,e=>xG(e,e=>xG(e,e=>$j(e.categoryMatches))))}var xye,Tye,wye,kye=s(()=>{var e;lV(),nye(),j1e(),wme(),q1e(),(e=xye=xye||{})[e.OPTION=0]="OPTION",e[e.REPETITION=1]="REPETITION",e[e.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",e[e.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",e[e.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",e[e.ALTERNATION=5]="ALTERNATION",mt(aye,"getProdType"),mt(sye,"getLookaheadPaths"),mt(oye,"buildLookaheadFuncForOr"),mt(lye,"buildLookaheadFuncForOptionalProd"),mt(cye,"buildAlternativesLookAheadFunc"),mt(hye,"buildSingleAlternativeLookaheadFunction"),Tye=class extends G1e{static{mt(this,"RestDefinitionFinderWalker")}constructor(e,t,r){super(),this.topProd=e,this.targetOccurrence=t,this.targetProdType=r}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,t,r,i){return e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.restDef=r.concat(i),!0)}walkOption(e,t,r){this.checkIsTarget(e,xye.OPTION,t,r)||super.walkOption(e,t,r)}walkAtLeastOne(e,t,r){this.checkIsTarget(e,xye.REPETITION_MANDATORY,t,r)||super.walkOption(e,t,r)}walkAtLeastOneSep(e,t,r){this.checkIsTarget(e,xye.REPETITION_MANDATORY_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}walkMany(e,t,r){this.checkIsTarget(e,xye.REPETITION,t,r)||super.walkOption(e,t,r)}walkManySep(e,t,r){this.checkIsTarget(e,xye.REPETITION_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}},wye=class extends D1e{static{mt(this,"InsideDefinitionFinderVisitor")}constructor(e,t,r){super(),this.targetOccurrence=e,this.targetProdType=t,this.targetRef=r,this.result=[]}checkIsTarget(e,t){e.idx!==this.targetOccurrence||this.targetProdType!==t||void 0!==this.targetRef&&e!==this.targetRef||(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,xye.OPTION)}visitRepetition(e){this.checkIsTarget(e,xye.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,xye.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,xye.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,xye.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,xye.ALTERNATION)}},mt(uye,"initializeArrayOfArrays"),mt(dye,"pathToHashKeys"),mt(pye,"isUniquePrefixHash"),mt(gye,"lookAheadSequenceFromAlternatives"),mt(fye,"getLookaheadPathsForOr"),mt(mye,"getLookaheadPathsForOptionalProd"),mt(yye,"containsPath"),mt(vye,"isStrictPrefixOfPath"),mt(bye,"areTokenCategoriesNotUsed")});function Eye(e){return e=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName}),b(e,e=>Object.assign({type:lve.CUSTOM_LOOKAHEAD_VALIDATION},e))}function _ye(t,e,r,i){var n=HG(t,e=>Sye(e,r)),e=Fye(t,e,r),a=HG(t,e=>Oye(e,r)),s=HG(t,e=>Rye(e,t,i,r));return n.concat(e,a,s)}function Sye(i,n){var e=new zye,e=(i.accept(e),e.allProductions),e=ij(e,Cye),e=wW(e,e=>1{var t=FG(e),e=n.buildDuplicateFoundError(i,e),r=F1e(t),e={message:e,type:lve.DUPLICATE_PRODUCTIONS,ruleName:i.name,dslName:r,occurrence:t.idx};return(r=Aye(t))&&(e.parameter=r),e})}function Cye(e){return`${F1e(e)}_#_${e.idx}_#_`+Aye(e)}function Aye(e){return e instanceof I1e?e.terminalType.name:e instanceof k1e?e.nonTerminalName:""}function Rye(r,e,t,i){var n=[];return 1t.name===r.name?e+1:e,0)&&(e=i.buildDuplicateRuleNameError({topLevelRule:r,grammarName:t}),n.push({message:e,type:lve.DUPLICATE_RULE_NAME,ruleName:r.name})),n}function Lye(e,t,r){var i=[];return Aj(t,e)||i.push({message:`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,type:lve.INVALID_RULE_OVERRIDE,ruleName:e}),i}function Nye(r,e,i,n=[]){var t,a=[],e=Iye(e.definition);return $j(e)?[]:(t=r.name,Aj(e,r)&&a.push({message:i.buildLeftRecursionError({topLevelRule:r,leftRecursionPath:n}),type:lve.LEFT_RECURSION,ruleName:t}),t=XU(e,n.concat([r])),e=HG(t,e=>{var t=Dz(n);return t.push(e),Nye(r,e,i,t)}),a.concat(e))}function Iye(e){let t=[];if($j(e))return t;if((r=FG(e))instanceof k1e)t.push(r.referencedRule);else if(r instanceof _1e||r instanceof S1e||r instanceof C1e||r instanceof A1e||r instanceof L1e||r instanceof R1e)t=t.concat(Iye(r.definition));else if(r instanceof N1e)t=_B(b(r.definition,e=>Iye(e.definition)));else if(!(r instanceof I1e))throw Error("non exhaustive match");var r=$1e(r),i=1{var e=aG(r.definition);return HG(e,(e,t)=>(e=Kme([e],[],ime,1),$j(e)?[{message:n.buildEmptyAlternationError({topLevelRule:i,alternation:r,emptyChoiceIdx:t}),type:lve.NONE_LAST_EMPTY_ALT,ruleName:i.name,occurrence:r.idx,alternative:t+1}]:[]))})}function Mye(i,n,a){var e=new qye,e=(i.accept(e),e.alternations),e=kY(e,e=>!0===e.ignoreAmbiguities);return HG(e,e=>{var t=$ye(r=fye(e.idx,i,e.maxLookahead||n,e),e,i,a),r=Bye(r,e,i,a);return t.concat(r)})}function Oye(t,r){var e=new qye,e=(t.accept(e),e.alternations);return HG(e,e=>255{var e=new Uye,e=(i.accept(e),e.allProductions);v(e,e=>{var t=aye(e),r=e.maxLookahead||n,t=mye(e.idx,i,t,r)[0];$j(_B(t))&&(r=a.buildEmptyRepetitionError({topLevelRule:i,repetition:e}),s.push({message:r,type:lve.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name}))})}),s}function $ye(a,s,r,i){let o=[],e=xY(a,(e,t,n)=>(!0!==s.definition[n].ignoreAmbiguities&&v(t,r=>{let i=[n];v(a,(e,t)=>{n!==t&&yye(e,r)&&!0!==s.definition[t].ignoreAmbiguities&&i.push(t)}),1{var t=b(e.alts,e=>e+1);return{message:i.buildAlternationAmbiguityError({topLevelRule:r,alternation:s,ambiguityIndices:t,prefixPath:e.path}),type:lve.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:s.idx,alternatives:e.alts}})}function Bye(e,n,a,s){let o=xY(e,(e,t,r)=>(t=b(t,e=>({idx:r,path:e})),e.concat(t)),[]);return Fz(HG(o,e=>{if(!0===n.definition[e.idx].ignoreAmbiguities)return[];let i=e.idx,t=e.path,r=SG(o,e=>!0!==n.definition[e.idx].ignoreAmbiguities&&e.idx{var t=[e.idx+1,i+1],r=0===n.idx?"":n.idx;return{message:s.buildAlternationPrefixAmbiguityError({topLevelRule:a,alternation:n,ambiguityIndices:t,prefixPath:e.path}),type:lve.AMBIGUOUS_PREFIX_ALTS,ruleName:a.name,occurrence:r,alternatives:t}})}))}function Fye(e,t,r){let i=[],n=b(t,e=>e.name);return v(e,e=>{var t=e.name;Aj(n,t)&&(e=r.buildNamespaceConflictError(e),i.push({message:e,type:lve.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t}))}),i}var zye,qye,Uye,Gye=s(()=>{lV(),uve(),q1e(),kye(),nye(),wme(),mt(Eye,"validateLookahead"),mt(_ye,"validateGrammar"),mt(Sye,"validateDuplicateProductions"),mt(Cye,"identifyProductionForDuplicates"),mt(Aye,"getExtraProductionArgument"),zye=class extends D1e{static{mt(this,"OccurrenceValidationCollector")}constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}},mt(Rye,"validateRuleDoesNotAlreadyExist"),mt(Lye,"validateRuleIsOverridden"),mt(Nye,"validateNoLeftRecursion"),mt(Iye,"getFirstNoneTerminal"),qye=class extends D1e{static{mt(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}},mt(Dye,"validateEmptyOrAlternative"),mt(Mye,"validateAmbiguousAlternationAlternatives"),Uye=class extends D1e{static{mt(this,"RepetitionCollector")}constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}},mt(Oye,"validateTooManyAlts"),mt(Pye,"validateSomeNonEmptyLookaheadPath"),mt($ye,"checkAlternativesAmbiguities"),mt(Bye,"checkPrefixAlternativesAmbiguities"),mt(Fye,"checkTerminalAndNoneTerminalsNameSpace")});function jye(e){let t=FU(e,{errMsgProvider:Ume}),r={};return v(e.rules,e=>{r[e.name]=e}),Yme(r,t.errMsgProvider)}function Wye(e){return _ye((e=FU(e,{errMsgProvider:Gme})).rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}var Yye=s(()=>{lV(),Hme(),Gye(),Wme(),mt(jye,"resolveGrammar"),mt(Wye,"validateGrammar")});function Vye(e){return Aj(Hye,e.name)}var Hye,Xye,Kye,Zye,Qye,Jye,e2e=s(()=>{lV(),Hye=["MismatchedTokenException","NoViableAltException","EarlyExitException","NotAllInputParsedException"],Object.freeze(Hye),mt(Vye,"isRecognitionException"),Xye=class extends Error{static{mt(this,"RecognitionException")}constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},Kye=class extends Xye{static{mt(this,"MismatchedTokenException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name="MismatchedTokenException"}},Zye=class extends Xye{static{mt(this,"NoViableAltException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name="NoViableAltException"}},Qye=class extends Xye{static{mt(this,"NotAllInputParsedException")}constructor(e,t){super(e,t),this.name="NotAllInputParsedException"}},Jye=class extends Xye{static{mt(this,"EarlyExitException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name="EarlyExitException"}}});function t2e(e,t,r,i,n,a,s){let o=this.getKeyForAutomaticLookahead(i,n),l=this.firstAfterRepMap[o],c=(void 0===l&&(i=this.getCurrRuleFullName(),i=this.getGAstProductions()[i],l=new a(i,n).startWalking(),this.firstAfterRepMap[o]=l),l.token),h=l.occurrence,u=l.isEndOfRule;1===this.RULE_STACK.length&&u&&void 0===c&&(c=zme,h=1),void 0!==c&&void 0!==h&&this.shouldInRepetitionRecoveryBeTried(c,h,s)&&this.tryInRepetitionRecovery(e,t,r,c)}var r2e,i2e,n2e,a2e,s2e=s(()=>{jme(),lV(),e2e(),Z1e(),uve(),r2e={},i2e="InRuleRecoveryException",n2e=class extends Error{static{mt(this,"InRuleRecoveryException")}constructor(e){super(e),this.name=i2e}},a2e=class{static{mt(this,"Recoverable")}initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(fj(e,"recoveryEnabled")?e:sve).recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=t2e)}getTokenToInsert(e){return(e=Rme(e,"",NaN,NaN,NaN,NaN,NaN,NaN)).isInsertedInRecovery=!0,e}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,r,i){let n=this.findReSyncTokenType(),a=this.exportLexerState(),s=[],o=!1,l=this.LA(1),c=this.LA(1),h=mt(()=>{var e=this.LA(0),e=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:l,previous:e,ruleName:this.getCurrRuleFullName()});(e=new Kye(e,l,this.LA(0))).resyncedTokens=aG(s),this.SAVE_ERROR(e)},"generateErrorMessage");for(;!o;){if(this.tokenMatcher(c,i))return void h();if(r.call(this))return h(),void e.apply(this,t);this.tokenMatcher(c,n)?o=!0:(c=this.SKIP_TOKEN(),this.addToResyncTokens(c,s))}this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(e,t,r){return!(!1===r||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))}getFollowsForInRuleRecovery(e,t){return e=this.getCurrentGrammarPath(e,t),this.getNextPossibleTokenTypes(e)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e))return t=this.SKIP_TOKEN(),this.consumeToken(),t;throw new n2e("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e)||$j(t))return!1;let r=this.LA(1);return void 0!==OG(t,e=>this.tokenMatcher(r,e))}canRecoverWithSingleTokenDeletion(e){return!!this.canTokenTypeBeDeletedInRecovery(e)&&this.tokenMatcher(this.LA(2),e)}isInCurrentRuleReSyncSet(e){var t=this.getCurrFollowKey(),t=this.getFollowSetFromFollowKey(t);return Aj(t,e)}findReSyncTokenType(){let e=this.flattenFollowSet(),t=this.LA(1),r=2;for(;;){var i=OG(e,e=>Lme(t,e));if(void 0!==i)return i;t=this.LA(r),r++}}getCurrFollowKey(){var e,t,r;return 1===this.RULE_STACK.length?r2e:(e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName(),{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(r)})}buildFullFollowKeyStack(){let r=this.RULE_STACK,i=this.RULE_OCCURRENCE_STACK;return b(r,(e,t)=>0===t?r2e:{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:i[t],inRule:this.shortRuleNameToFullName(r[t-1])})}flattenFollowSet(){var e=b(this.buildFullFollowKeyStack(),e=>this.getFollowSetFromFollowKey(e));return _B(e)}getFollowSetFromFollowKey(e){return e===r2e?[zme]:(e=e.ruleName+e.idxInCallingRule+X1e+e.inRule,this.resyncFollows[e])}addToResyncTokens(e,t){return this.tokenMatcher(e,zme)||t.push(e),t}reSyncTo(e){let t=[],r=this.LA(1);for(;!1===this.tokenMatcher(r,e);)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,t);return aG(t)}attemptInRepetitionRecovery(e,t,r,i,n,a,s){}getCurrentGrammarPath(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:Dz(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return b(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}},mt(t2e,"attemptInRepetitionRecovery")});function o2e(e,t,r){return r|t|e}var l2e,c2e=s(()=>{mt(o2e,"getKeyForAutomaticLookahead")}),h2e=s(()=>{lV(),Wme(),uve(),Gye(),kye(),l2e=class{static{mt(this,"LLkLookaheadStrategy")}constructor(e){this.maxLookahead=null!=(e=e?.maxLookahead)?e:sve.maxLookahead}validate(e){var t,r,i=this.validateNoLeftRecursion(e.rules);return $j(i)?(t=this.validateEmptyOrAlternatives(e.rules),r=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),e=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead),[...i,...t,...r,...e]):i}validateNoLeftRecursion(e){return HG(e,e=>Nye(e,e,Gme))}validateEmptyOrAlternatives(e){return HG(e,e=>Dye(e,Gme))}validateAmbiguousAlternationAlternatives(e,t){return HG(e,e=>Mye(e,t,Gme))}validateSomeNonEmptyLookaheadPath(e,t){return Pye(e,t,Gme)}buildLookaheadForAlternation(e){return oye(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,cye)}buildLookaheadForOptional(e){return lye(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,aye(e.prodType),hye)}}});function u2e(e){return g2e.reset(),e.accept(g2e),e=g2e.dslMethods,g2e.reset(),e}var d2e,p2e,g2e,f2e=s(()=>{lV(),uve(),c2e(),q1e(),h2e(),d2e=class{static{mt(this,"LooksAhead")}initLooksAhead(e){this.dynamicTokensEnabled=(fj(e,"dynamicTokensEnabled")?e:sve).dynamicTokensEnabled,this.maxLookahead=(fj(e,"maxLookahead")?e:sve).maxLookahead,this.lookaheadStrategy=fj(e,"lookaheadStrategy")?e.lookaheadStrategy:new l2e({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){v(e,s=>{this.TRACE_INIT(s.name+" Rule Lookahead",()=>{var{alternation:e,repetition:t,option:r,repetitionMandatory:i,repetitionMandatoryWithSeparator:n,repetitionWithSeparator:a}=u2e(s);v(e,r=>{var e=0===r.idx?"":r.idx;this.TRACE_INIT(""+F1e(r)+e,()=>{var e=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:r.idx,rule:s,maxLookahead:r.maxLookahead||this.maxLookahead,hasPredicates:r.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),t=o2e(this.fullRuleNameToShort[s.name],256,r.idx);this.setLaFuncCache(t,e)})}),v(t,e=>{this.computeLookaheadFunc(s,e.idx,768,"Repetition",e.maxLookahead,F1e(e))}),v(r,e=>{this.computeLookaheadFunc(s,e.idx,512,"Option",e.maxLookahead,F1e(e))}),v(i,e=>{this.computeLookaheadFunc(s,e.idx,1024,"RepetitionMandatory",e.maxLookahead,F1e(e))}),v(n,e=>{this.computeLookaheadFunc(s,e.idx,1536,"RepetitionMandatoryWithSeparator",e.maxLookahead,F1e(e))}),v(a,e=>{this.computeLookaheadFunc(s,e.idx,1280,"RepetitionWithSeparator",e.maxLookahead,F1e(e))})})})}computeLookaheadFunc(r,i,n,a,s,e){this.TRACE_INIT(""+e+(0===i?"":i),()=>{var e=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:i,rule:r,maxLookahead:s||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:a}),t=o2e(this.fullRuleNameToShort[r.name],n,i);this.setLaFuncCache(t,e)})}getKeyForAutomaticLookahead(e,t){return t|e|this.getLastExplicitRuleShortName()}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},p2e=class extends D1e{static{mt(this,"DslMethodsCollectorVisitor")}constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}},g2e=new p2e,mt(u2e,"collectMethods")});function m2e(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset{mt(m2e,"setNodeLocationOnlyOffset"),mt(y2e,"setNodeLocationFull"),mt(v2e,"addTerminalToCst"),mt(b2e,"addNoneTerminalToCst")});function T2e(e,t){Object.defineProperty(e,w2e,{enumerable:!1,configurable:!0,writable:!1,value:t})}var w2e,k2e=s(()=>{w2e="name",mt(T2e,"defineNameProp")});function E2e(t,r){var i=M$(t),n=i.length;for(let e=0;ee.msg),Error(`Errors Detected in CST Visitor <${this.constructor.name}>: `+e.join(` `).replace(/\n/g,` `))},"validateVisitor")});return r.prototype=e,(r.prototype.constructor=r)._RULE_NAMES=t,r}function S2e(e,t,r){var i=mt(function(){},"derivedConstructor");T2e(i,e+"BaseSemanticsWithDefaults");let n=Object.create(r.prototype);return v(t,e=>{n[e]=E2e}),i.prototype=n,i.prototype.constructor=i}function C2e(e,t){return A2e(e,t)}function A2e(t,e){return e=SG(e,e=>!1===Bw(t[e])),e=b(e,e=>({msg:`Missing visitor method: <${e}> on ${t.constructor.name} CST Visitor.`,type:R2e.MISSING_METHOD,methodName:e})),Fz(e)}var R2e,L2e,N2e,I2e,D2e,M2e,O2e,P2e=s(()=>{var e;lV(),k2e(),mt(E2e,"defaultVisit"),mt(_2e,"createBaseSemanticVisitorConstructor"),mt(S2e,"createBaseVisitorConstructorWithDefaults"),(e=R2e=R2e||{})[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD",mt(C2e,"validateVisitor"),mt(A2e,"validateMissingCstMethods")}),$2e=s(()=>{x2e(),lV(),P2e(),uve(),L2e=class{static{mt(this,"TreeBuilder")}initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=(fj(e,"nodeLocationTracking")?e:sve).nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=y2e,this.setNodeLocationFromNode=y2e,this.cstPostRule=a$,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=a$,this.setNodeLocationFromNode=a$,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=m2e,this.setNodeLocationFromNode=m2e,this.cstPostRule=a$,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=a$,this.setNodeLocationFromNode=a$,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid config option: "${e.nodeLocationTracking}"`);this.setNodeLocationFromToken=a$,this.setNodeLocationFromNode=a$,this.cstPostRule=a$,this.setInitialNodeLocation=a$}else this.cstInvocationStateUpdate=a$,this.cstFinallyStateUpdate=a$,this.cstPostTerminal=a$,this.cstPostNonTerminal=a$,this.cstPostRule=a$}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){var t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){e={name:e,children:Object.create(null)},this.setInitialNodeLocation(e),this.CST_STACK.push(e)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){var t=this.LA(0);(e=e.location).startOffset<=t.startOffset?(e.endOffset=t.endOffset,e.endLine=t.endLine,e.endColumn=t.endColumn):(e.startOffset=NaN,e.startLine=NaN,e.startColumn=NaN)}cstPostRuleOnlyOffset(e){var t=this.LA(0);(e=e.location).startOffset<=t.startOffset?e.endOffset=t.endOffset:e.startOffset=NaN}cstPostTerminal(e,t){var r=this.CST_STACK[this.CST_STACK.length-1];v2e(r,t,e),this.setNodeLocationFromToken(r.location,t)}cstPostNonTerminal(e,t){var r=this.CST_STACK[this.CST_STACK.length-1];b2e(r,t,e),this.setNodeLocationFromNode(r.location,e.location)}getBaseCstVisitorConstructor(){var e;return Yj(this.baseCstVisitorConstructor)?(e=_2e(this.className,M$(this.gastProductionsCache)),this.baseCstVisitorConstructor=e):this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){var e;return Yj(this.baseCstVisitorWithDefaultsConstructor)?(e=S2e(this.className,M$(this.gastProductionsCache),this.getBaseCstVisitorConstructor()),this.baseCstVisitorWithDefaultsConstructor=e):this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){var e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){var e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){var e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}}}),B2e=s(()=>{uve(),N2e=class{static{mt(this,"LexerAdapter")}initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(!0!==this.selfAnalysisDone)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):ave}LA(e){return(e=this.currIdx+e)<0||this.tokVectorLength<=e?ave:this.tokVector[e]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}}}),F2e=s(()=>{lV(),e2e(),uve(),Wme(),Gye(),q1e(),I2e=class{static{mt(this,"RecognizerApi")}ACTION(e){return e.call(this)}consume(e,t,r){return this.consumeInternal(t,e,r)}subrule(e,t,r){return this.subruleInternal(t,e,r)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,t,r=ove){Aj(this.definedRulesNames,e)&&(i={message:Gme.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:lve.DUPLICATE_RULE_NAME,ruleName:e},this.definitionErrors.push(i)),this.definedRulesNames.push(e);var i=this.defineRule(e,t,r);return this[e]=i}OVERRIDE_RULE(e,t,r=ove){var i=Lye(e,this.definedRulesNames,this.className),i=(this.definitionErrors=this.definitionErrors.concat(i),this.defineRule(e,t,r));return this[e]=i}BACKTRACK(t,r){return function(){this.isBackTrackingStack.push(1);var e=this.saveRecogState();try{return t.apply(this,r),!0}catch(e){if(Vye(e))return!1;throw e}finally{this.reloadRecogState(e),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return x1e(Ej(this.gastProductionsCache))}}}),z2e=s(()=>{lV(),c2e(),e2e(),kye(),nye(),uve(),s2e(),jme(),wme(),D2e=class{static{mt(this,"RecognizerEngine")}initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=nme,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},fj(t,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a property. See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0 For Further details.`);if(c_(e)){if($j(e))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 e[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(c_(e))this.tokensMap=xY(e,(e,t)=>(e[t.name]=t,e),{});else if(fj(e,"modes")&&xG(_B(Ej(e.modes)),fme))t=_B(Ej(e.modes)),t=VY(t),this.tokensMap=xY(t,(e,t)=>(e[t.name]=t,e),{});else{if(!Ow(e))throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=Dz(e)}this.tokensMap.EOF=zme,t=fj(e,"modes")?_B(Ej(e.modes)):Ej(e),e=xG(t,e=>$j(e.categoryMatches)),this.tokenMatcher=e?nme:ime,ame(Ej(this.tokensMap))}defineRule(r,i,e){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 n=(fj(e,"resyncEnabled")?e:ove).resyncEnabled,a=(fj(e,"recoveryValueFunc")?e:ove).recoveryValueFunc,s=this.ruleShortNameIdx<<12;return this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=r,this.fullRuleNameToShort[r]=s,e=!0===this.outputCst?mt(function(...e){try{this.ruleInvocationStateUpdate(s,r,this.subruleIdx),i.apply(this,e);var t=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(t),t}catch(e){return this.invokeRuleCatch(e,n,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTry"):mt(function(...e){try{return this.ruleInvocationStateUpdate(s,r,this.subruleIdx),i.apply(this,e)}catch(e){return this.invokeRuleCatch(e,n,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTryCst"),Object.assign(e,{ruleName:r,originalGrammarAction:i})}invokeRuleCatch(e,t,r){var i=1===this.RULE_STACK.length,t=t&&!this.isBackTracking()&&this.recoveryEnabled;if(Vye(e)){var n=e;if(t){if(t=this.findReSyncTokenType(),this.isInCurrentRuleReSyncSet(t))return n.resyncedTokens=this.reSyncTo(t),this.outputCst?((t=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,t):r(e);this.outputCst&&((t=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,n.partialCstResult=t)}else if(i)return this.moveToTerminatedState(),r(e);throw n}throw e}optionInternal(e,t){var r=this.getKeyForAutomaticLookahead(512,t);return this.optionInternalLogic(e,t,r)}optionInternalLogic(e,t,r){let i=this.getLaFuncFromCache(r),n;if("function"!=typeof e){n=e.DEF;let t=e.GATE;if(void 0!==t){let e=i;i=mt(()=>t.call(this)&&e.call(this),"lookAheadFunc")}}else n=e;if(!0===i.call(this))return n.call(this)}atLeastOneInternal(e,t){var r=this.getKeyForAutomaticLookahead(1024,e);return this.atLeastOneInternalLogic(e,t,r)}atLeastOneInternalLogic(e,r,t){let i=this.getLaFuncFromCache(t),n;if("function"!=typeof r){n=r.DEF;let t=r.GATE;if(void 0!==t){let e=i;i=mt(()=>t.call(this)&&e.call(this),"lookAheadFunc")}}else n=r;if(!0!==i.call(this))throw this.raiseEarlyExitException(e,xye.REPETITION_MANDATORY,r.ERR_MSG);{let e=this.doSingleRepetition(n);for(;!0===i.call(this)&&!0===e;)e=this.doSingleRepetition(n)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,r],i,1024,e,rye)}atLeastOneSepFirstInternal(e,t){var r=this.getKeyForAutomaticLookahead(1536,e);this.atLeastOneSepFirstInternalLogic(e,t,r)}atLeastOneSepFirstInternalLogic(e,t,r){let i=t.DEF,n=t.SEP;if(!0!==this.getLaFuncFromCache(r).call(this))throw this.raiseEarlyExitException(e,xye.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG);for(i.call(this),r=mt(()=>this.tokenMatcher(this.LA(1),n),"separatorLookAheadFunc");!0===this.tokenMatcher(this.LA(1),n);)this.CONSUME(n),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,n,r,i,iye],r,1536,e,iye)}manyInternal(e,t){var r=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,t,r)}manyInternalLogic(e,r,t){let i=this.getLaFuncFromCache(t),n;if("function"!=typeof r){n=r.DEF;let t=r.GATE;if(void 0!==t){let e=i;i=mt(()=>t.call(this)&&e.call(this),"lookaheadFunction")}}else n=r;let a=!0;for(;!0===i.call(this)&&!0===a;)a=this.doSingleRepetition(n);this.attemptInRepetitionRecovery(this.manyInternal,[e,r],i,768,e,eye,a)}manySepFirstInternal(e,t){var r=this.getKeyForAutomaticLookahead(1280,e);this.manySepFirstInternalLogic(e,t,r)}manySepFirstInternalLogic(e,t,r){let i=t.DEF,n=t.SEP;if(!0===this.getLaFuncFromCache(r).call(this)){for(i.call(this),t=mt(()=>this.tokenMatcher(this.LA(1),n),"separatorLookAheadFunc");!0===this.tokenMatcher(this.LA(1),n);)this.CONSUME(n),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,n,t,i,tye],t,1280,e,tye)}}repetitionSepSecondInternal(e,t,r,i,n){for(;r();)this.CONSUME(t),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,r,i,n],r,1536,e,n)}doSingleRepetition(e){var t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){var r=this.getKeyForAutomaticLookahead(256,t),i=c_(e)?e:e.DEF;if(void 0!==(r=this.getLaFuncFromCache(r).call(this,i)))return i[r].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){var e,t;this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()&&(e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Qye(t,e)))}subruleInternal(e,t,r){var i;try{var n=void 0!==r?r.ARGS:void 0;return this.subruleIdx=t,i=e.apply(this,n),this.cstPostNonTerminal(i,void 0!==r&&void 0!==r.LABEL?r.LABEL:e.ruleName),i}catch(t){throw this.subruleInternalError(t,r,e.ruleName)}}subruleInternalError(e,t,r){throw Vye(e)&&void 0!==e.partialCstResult&&(this.cstPostNonTerminal(e.partialCstResult,void 0!==t&&void 0!==t.LABEL?t.LABEL:r),delete e.partialCstResult),e}consumeInternal(e,t,r){let i;try{var n=this.LA(1);!0===this.tokenMatcher(n,e)?(this.consumeToken(),i=n):this.consumeInternalError(e,n,r)}catch(r){i=this.consumeInternalRecovery(e,t,r)}return this.cstPostTerminal(void 0!==r&&void 0!==r.LABEL?r.LABEL:e.name,i),i}consumeInternalError(e,t,r){var i=this.LA(0),r=void 0!==r&&r.ERR_MSG?r.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:i,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Kye(r,t,i))}consumeInternalRecovery(e,t,r){if(!this.recoveryEnabled||"MismatchedTokenException"!==r.name||this.isBackTracking())throw r;t=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,t)}catch(e){throw e.name===i2e?r:e}}saveRecogState(){var e=this.errors,t=Dz(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,t,r){this.RULE_OCCURRENCE_STACK.push(r),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t)}isBackTracking(){return 0!==this.isBackTrackingStack.length}getCurrRuleFullName(){var e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),zme)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}}),q2e=s(()=>{e2e(),lV(),kye(),uve(),M2e=class{static{mt(this,"ErrorHandler")}initErrorHandler(e){this._errors=[],this.errorMessageProvider=(fj(e,"errorMessageProvider")?e:sve).errorMessageProvider}SAVE_ERROR(e){if(Vye(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:Dz(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return Dz(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,r){var i=this.getCurrRuleFullName(),e=mye(e,this.getGAstProductions()[i],t,this.maxLookahead)[0],n=[];for(let e=1;e<=this.maxLookahead;e++)n.push(this.LA(e));throw t=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:e,actual:n,previous:this.LA(0),customUserDescription:r,ruleName:i}),this.SAVE_ERROR(new Jye(t,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){var r=this.getCurrRuleFullName(),e=fye(e,this.getGAstProductions()[r],this.maxLookahead),i=[];for(let e=1;e<=this.maxLookahead;e++)i.push(this.LA(e));throw r=this.LA(0),e=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:e,actual:i,previous:r,customUserDescription:t,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Zye(e,this.LA(1),r))}}}),U2e=s(()=>{nye(),lV(),O2e=class{static{mt(this,"ContentAssist")}initContentAssist(){}computeContentAssist(e,t){var r=this.gastProductionsCache[e];if(Yj(r))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return Kme([r],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){var t=FG(e.ruleStack),t=this.getGAstProductions()[t];return new Qme(t,e).startWalking()}}});function G2e(e,t,r,i=!1){Y2e(r);var n=JU(this.recordingProdStack),a=Bw(t)?t:t.DEF,e=new e({definition:[],idx:r});return i&&(e.separator=t.SEP),fj(t,"MAX_LOOKAHEAD")&&(e.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(e),a.call(this),n.definition.push(e),this.recordingProdStack.pop(),V2e}function j2e(e,t){Y2e(t);let r=JU(this.recordingProdStack),i=!1===c_(e),n=0==i?e:e.DEF,a=new N1e({definition:[],idx:t,ignoreAmbiguities:i&&!0===e.IGNORE_AMBIGUITIES});return fj(e,"MAX_LOOKAHEAD")&&(a.maxLookahead=e.MAX_LOOKAHEAD),t=IY(n,e=>Bw(e.GATE)),a.hasPredicates=t,r.definition.push(a),v(n,e=>{var t=new _1e({definition:[]});a.definition.push(t),fj(e,"IGNORE_AMBIGUITIES")?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:fj(e,"GATE")&&(t.ignoreAmbiguities=!0),this.recordingProdStack.push(t),e.ALT.call(this),this.recordingProdStack.pop()}),V2e}function W2e(e){return 0===e?"":""+e}function Y2e(e){if(e<0||H2e Idx value must be a none negative value smaller than `+(H2e+1))).KNOWN_RECORDER_ERROR=!0,e}var V2e,H2e,X2e,K2e,Z2e,Q2e,J2e,eve=s(()=>{lV(),q1e(),Eme(),wme(),jme(),uve(),c2e(),V2e={description:"This Object indicates the Parser is during Recording Phase"},Object.freeze(V2e),H2e=Math.pow(2,8)-1,ame([X2e=Cme({name:"RECORDING_PHASE_TOKEN",pattern:Tme.NA})]),K2e=Rme(X2e,`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(K2e),Z2e={name:`This CSTNode indicates the Parser is in Recording Phase See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},Q2e=class{static{mt(this,"GastRecorder")}initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let r=0;r<10;r++){var e=0{var t=this;for(let e=0;e<10;e++){var r=0!0}LA_RECORD(e){return ave}topLevelRuleRecord(e,t){try{var r=new E1e({definition:[],name:e});return r.name=e,this.recordingProdStack.push(r),t.call(this),this.recordingProdStack.pop(),r}catch(e){if(!0!==e.KNOWN_RECORDER_ERROR)try{e.message=e.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 e}}optionInternalRecord(e,t){return G2e.call(this,S1e,e,t)}atLeastOneInternalRecord(e,t){G2e.call(this,C1e,t,e)}atLeastOneSepFirstInternalRecord(e,t){G2e.call(this,A1e,t,e,!0)}manyInternalRecord(e,t){G2e.call(this,R1e,t,e)}manySepFirstInternalRecord(e,t){G2e.call(this,L1e,t,e,!0)}orInternalRecord(e,t){return j2e.call(this,e,t)}subruleInternalRecord(e,t,r){var i,n;if(Y2e(t),e&&!1!==fj(e,"ruleName"))return i=JU(this.recordingProdStack),n=e.ruleName,n=new k1e({idx:t,nonTerminalName:n,label:r?.LABEL,referencedRule:void 0}),i.definition.push(n),this.outputCst?Z2e:V2e;throw(r=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}> inside top level rule: <${this.recordingProdStack[0].name}>`)).KNOWN_RECORDER_ERROR=!0,r}consumeInternalRecord(e,t,r){var i;if(Y2e(t),ume(e))return i=JU(this.recordingProdStack),r=new I1e({idx:t,terminalType:e,label:r?.LABEL}),i.definition.push(r),K2e;throw(i=new Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}> inside top level rule: <${this.recordingProdStack[0].name}>`)).KNOWN_RECORDER_ERROR=!0,i}},mt(G2e,"recordProd"),mt(j2e,"recordOrProd"),mt(W2e,"getIdxSuffix"),mt(Y2e,"assertMethodIdxIsValid")}),tve=s(()=>{lV(),y1e(),uve(),J2e=class{static{mt(this,"PerformanceTracer")}initPerformanceTracer(e){var t;fj(e,"traceInitPerf")?(e=e.traceInitPerf,this.traceInitMaxIdent=(t="number"==typeof e)?e:1/0,this.traceInitPerf=t?0 <${e}>`),p1e(t)),a=10 time: ${i}ms`),this.traceInitIndent--,n):t()}}});function rve(n,e){e.forEach(r=>{let i=r.prototype;Object.getOwnPropertyNames(i).forEach(e=>{var t;"constructor"!==e&&((t=Object.getOwnPropertyDescriptor(i,e))&&(t.get||t.set)?Object.defineProperty(n.prototype,e,t):n.prototype[e]=r.prototype[e])})})}var ive=s(()=>{mt(rve,"applyMixins")});function nve(e=void 0){return function(){return e}}var ave,sve,ove,lve,cve,hve,uve=s(()=>{var e;lV(),y1e(),tfe(),jme(),Wme(),Yye(),s2e(),f2e(),$2e(),B2e(),F2e(),z2e(),q2e(),U2e(),eve(),tve(),ive(),Gye(),ave=Rme(zme,"",NaN,NaN,NaN,NaN,NaN,NaN),Object.freeze(ave),sve=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:qme,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),ove=Object.freeze({recoveryValueFunc:mt(()=>{},"recoveryValueFunc"),resyncEnabled:!0}),(e=lve=lve||{})[e.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",e[e.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",e[e.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",e[e.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",e[e.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",e[e.LEFT_RECURSION=5]="LEFT_RECURSION",e[e.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",e[e.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",e[e.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",e[e.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",e[e.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",e[e.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",e[e.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION",mt(nve,"EMPTY_ALT"),(cve=class t{static{mt(this,"Parser")}static performSelfAnalysis(e){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 e;this.selfAnalysisDone=!0;let r=this.className,i=(this.TRACE_INIT("toFastProps",()=>{f1e(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),v(this.definedRulesNames,e=>{let t=this[e].originalGrammarAction,r;this.TRACE_INIT(e+" Rule",()=>{r=this.topLevelRuleRecord(e,t)}),this.gastProductionsCache[e]=r})}finally{this.disableRecording()}}),[]);if(this.TRACE_INIT("Grammar Resolving",()=>{i=jye({rules:Ej(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(i)}),this.TRACE_INIT("Grammar Validations",()=>{var e,t;$j(i)&&!1===this.skipValidations&&(e=Wye({rules:Ej(this.gastProductionsCache),tokenTypes:Ej(this.tokensMap),errMsgProvider:Gme,grammarName:r}),t=Eye({lookaheadStrategy:this.lookaheadStrategy,rules:Ej(this.gastProductionsCache),tokenTypes:Ej(this.tokensMap),grammarName:r}),this.definitionErrors=this.definitionErrors.concat(e,t))}),$j(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{var e=Q1e(Ej(this.gastProductionsCache));this.resyncFollows=e}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var e,t;null!=(t=(e=this.lookaheadStrategy).initialize)&&t.call(e,{rules:Ej(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(Ej(this.gastProductionsCache))})),!t.DEFER_DEFINITION_ERRORS_HANDLING&&!$j(this.definitionErrors))throw e=b(this.definitionErrors,e=>e.message),new Error(`Parser Definition Errors detected: `+e.join(` ------------------------------- `))})}constructor(e,t){if(this.definitionErrors=[],this.selfAnalysisDone=!1,this.initErrorHandler(t),this.initLexerAdapter(),this.initLooksAhead(t),this.initRecognizerEngine(e,t),this.initRecoverable(t),this.initTreeBuilder(t),this.initContentAssist(),this.initGastRecorder(t),this.initPerformanceTracer(t),fj(t,"ignoredIssues"))throw new Error(`The IParserConfig property has been deprecated. Please use the flag on the relevant DSL method instead. See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES For further details.`);this.skipValidations=(fj(t,"skipValidations")?t:sve).skipValidations}}).DEFER_DEFINITION_ERRORS_HANDLING=!1,rve(cve,[a2e,d2e,L2e,N2e,D2e,I2e,M2e,O2e,Q2e,J2e]),hve=class extends cve{static{mt(this,"EmbeddedActionsParser")}constructor(e,t=sve){(t=Dz(t)).outputCst=!1,super(e,t)}}}),dve=s(()=>{q1e()}),pve=s(()=>{}),gve=s(()=>{dve(),pve()}),fve=s(()=>{c1e()}),mve=s(()=>{c1e(),uve(),Eme(),jme(),kye(),h2e(),Wme(),e2e(),kme(),q1e(),q1e(),gve(),fve()});function yve(e,t,r){return e.name+`_${t}_`+r}function vve(t){var r={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]},i=(bve(r,t),t.length);for(let e=0;exve(t,r,e)));return Ive(t,r,i,e,...n)}function Sve(e,t,r){var i=Fve(e,t,r,{type:Uve});return Nve(e,i),Lve(e,t,r,Ive(e,t,i,r,Cve(e,t,r)))}function Cve(t,r,e){return 1===(e=SG(b(e.definition,e=>xve(t,r,e)),e=>void 0!==e)).length?e[0]:0===e.length?void 0:Mve(t,e)}function Ave(e,t,r,i,n){var a=i.left,i=i.right,s=Fve(e,t,r,{type:Kve}),o=(Nve(e,s),Fve(e,t,r,{type:Zve}));return a.loopback=s,o.loopback=s,Bve(i,e.decisionMap[yve(t,n?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=s),void 0===n?(Bve(s,a),Bve(s,o)):(Bve(s,o),Bve(s,n.left),Bve(n.right,a)),{left:a,right:o}}function Rve(e,t,r,i,n){var a=i.left,i=i.right,s=Fve(e,t,r,{type:Xve}),o=(Nve(e,s),Fve(e,t,r,{type:Zve})),l=Fve(e,t,r,{type:Hve});return s.loopback=l,o.loopback=l,Bve(s,a),Bve(s,o),Bve(i,l),void 0!==n?(Bve(l,o),Bve(l,n.left),Bve(n.right,a)):Bve(l,s),{left:e.decisionMap[yve(t,n?"RepetitionWithSeparator":"Repetition",r.idx)]=s,right:o}}function Lve(e,t,r,i){var n=i.left;return Bve(n,i.right),e.decisionMap[yve(t,"Option",r.idx)]=n,i}function Nve(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}function Ive(e,t,r,i,...n){var a,s=Fve(e,t,i,{type:Vve,start:r});r.end=s;for(a of n)void 0!==a?(Bve(r,a.left),Bve(a.right,s)):Bve(r,s);return n={left:r,right:s},e.decisionMap[yve(t,Dve(i),i.idx)]=r,n}function Dve(e){if(e instanceof N1e)return"Alternation";if(e instanceof S1e)return"Option";if(e instanceof R1e)return"Repetition";if(e instanceof L1e)return"RepetitionWithSeparator";if(e instanceof C1e)return"RepetitionMandatory";if(e instanceof A1e)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function Mve(t,r){var i=r.length;for(let e=0;e{YG(),CG(),mve(),mt(yve,"buildATNKey"),Uve=1,Gve=2,jve=4,Wve=5,Yve=7,Vve=8,Hve=9,Xve=10,Kve=11,Zve=12,Qve=class{static{mt(this,"AbstractTransition")}constructor(e){this.target=e}isEpsilon(){return!1}},Jve=class extends Qve{static{mt(this,"AtomTransition")}constructor(e,t){super(e),this.tokenType=t}},ebe=class extends Qve{static{mt(this,"EpsilonTransition")}constructor(e){super(e)}isEpsilon(){return!0}},tbe=class extends Qve{static{mt(this,"RuleTransition")}constructor(e,t,r){super(e),this.rule=t,this.followState=r}isEpsilon(){return!0}},mt(vve,"createATN"),mt(bve,"createRuleStartAndStopATNStates"),mt(xve,"atom"),mt(Tve,"repetition"),mt(wve,"repetitionSep"),mt(kve,"repetitionMandatory"),mt(Eve,"repetitionMandatorySep"),mt(_ve,"alternation"),mt(Sve,"option"),mt(Cve,"block"),mt(Ave,"plus"),mt(Rve,"star"),mt(Lve,"optional"),mt(Nve,"defineDecisionState"),mt(Ive,"makeAlts"),mt(Dve,"getProdType"),mt(Mve,"makeBlock"),mt(Ove,"tokenRef"),mt(Pve,"ruleRef"),mt($ve,"buildRuleHandle"),mt(Bve,"epsilon"),mt(Fve,"newState"),mt(zve,"addTransition"),mt(qve,"removeState")});function ibe(e,t=!0){return`${t?"a"+e.alt:""}s${e.state.stateNumber}:`+e.stack.map(e=>e.stateNumber.toString()).join("_")}var nbe,abe,sbe=s(()=>{YG(),nbe={},abe=class{static{mt(this,"ATNConfigSet")}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){var t=ibe(e);t in this.map||(this.map[t]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return b(this.configs,e=>e.alt)}get key(){let e="";for(var t in this.map)e+=t+":";return e}},mt(ibe,"getATNConfigKey")});function obe(i,n){let a={};return e=>{let t=e.toString(),r=a[t];return void 0===r&&(r={atnStartState:i,decision:n,states:{}},a[t]=r),r}}function lbe(e,t=!0){var r,i=new Set;for(r of e){var n,a,s=new Set;for(n of r){if(void 0===n){if(t)break;return!1}for(a of[n.tokenTypeIdx].concat(n.categoryMatches))if(i.has(a)){if(!s.has(a))return!1}else i.add(a),s.add(a)}}return!0}function cbe(t){var r=t.decisionStates.length,i=Array(r);for(let e=0;e_me(e)).join(", "),r=0===e.production.idx?"":e.production.idx;return`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${fbe(e.production)}${r}> inside <${e.topLevelRule.name}> Rule, <${t}> 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 fbe(e){if(e instanceof k1e)return"SUBRULE";if(e instanceof S1e)return"OPTION";if(e instanceof N1e)return"OR";if(e instanceof C1e)return"AT_LEAST_ONE";if(e instanceof A1e)return"AT_LEAST_ONE_SEP";if(e instanceof L1e)return"MANY_SEP";if(e instanceof R1e)return"MANY";if(e instanceof I1e)return"CONSUME";throw Error("non exhaustive match")}function mbe(e,t,r){return t=HG(t.configs.elements,e=>e.state.transitions),{actualToken:r,possibleTokenTypes:KY(t.filter(e=>e instanceof Jve).map(e=>e.tokenType),e=>e.tokenTypeIdx),tokenPath:e}}function ybe(e,t){return e.edges[t.tokenTypeIdx]}function vbe(e,t,r){var i,n=new abe,a=[];for(i of e.elements)if(!1!==r.is(i.alt))if(i.state.type===Yve)a.push(i);else{var s=i.state.transitions.length;for(let e=0;e{mve(),rbe(),sbe(),lW(),XG(),ZY(),YG(),SB(),uG(),Bj(),TY(),mt(obe,"createDFACache"),Dbe=class{static{mt(this,"PredicateSet")}constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let t="",r=this.predicates.length;for(let e=0;econsole.log(e)}initialize(e){this.atn=vve(e.rules),this.dfas=cbe(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){let{prodOccurrence:t,rule:r,hasPredicates:i,dynamicTokensEnabled:n}=e,a=this.dfas,s=this.logging,o=yve(r,"Alternation",t),l=this.atn.decisionMap[o].decision,c=b(sye({maxLookahead:1,occurrence:t,prodType:"Alternation",rule:r}),e=>b(e,e=>e[0]));if(!lbe(c,!1)||n)return i?function(t){var r=new Dbe,i=void 0===t?0:t.length;for(let e=0;e(v(e,e=>{e&&(t[e.tokenTypeIdx]=r,v(e.categoryMatches,e=>{t[e]=r}))}),t),{});return i?function(e){var t=this.LA(1),t=r[t.tokenTypeIdx];if(void 0===e||void 0===t||void 0===(e=null==(e=e[t])?void 0:e.GATE)||!1!==e.call(this))return t}:function(){var e=this.LA(1);return r[e.tokenTypeIdx]}}}buildLookaheadForOptional(r){let{prodOccurrence:e,rule:t,prodType:i,dynamicTokensEnabled:n}=r,a=this.dfas,s=this.logging,o=yve(t,i,e),l=this.atn.decisionMap[o].decision,c=b(sye({maxLookahead:1,occurrence:e,prodType:i,rule:t}),e=>b(e,e=>e[0]));if(lbe(c)&&c[0][0]&&!n){if(r=c[0],1===(r=_B(r)).length&&$j(r[0].categoryMatches)){let e=r[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{let t=xY(r,(t,e)=>(void 0!==e&&(t[e.tokenTypeIdx]=!0,v(e.categoryMatches,e=>{t[e]=!0})),t),{});return function(){var e=this.LA(1);return!0===t[e.tokenTypeIdx]}}}return function(){var e=hbe.call(this,a,l,Mbe,s);return"object"!=typeof e&&0===e}}},mt(lbe,"isLL1Sequence"),mt(cbe,"initATNSimulator"),mt(hbe,"adaptivePredict"),mt(ube,"performLookahead"),mt(dbe,"computeLookaheadTarget"),mt(pbe,"reportLookaheadAmbiguity"),mt(gbe,"buildAmbiguityError"),mt(fbe,"getProductionDslName"),mt(mbe,"buildAdaptivePredictError"),mt(ybe,"getExistingTargetState"),mt(vbe,"computeReachSet"),mt(bbe,"getReachableTarget"),mt(xbe,"getUniqueAlt"),mt(Tbe,"newDFAState"),mt(wbe,"addDFAEdge"),mt(kbe,"addDFAState"),mt(Ebe,"computeStartState"),mt(_be,"closure"),mt(Sbe,"getEpsilonTarget"),mt(Cbe,"hasConfigInRuleStopState"),mt(Abe,"allConfigsInRuleStopStates"),mt(Rbe,"hasConflictTerminatingPrediction"),mt(Lbe,"getConflictingAltSets"),mt(Nbe,"hasConflictingAltSet"),mt(Ibe,"hasStateAssociatedWithOneAlt")}),$be=s(()=>{Pbe()}),Bbe={};PGe(Bbe,{AnnotatedTextEdit:()=>oxe,ChangeAnnotation:()=>axe,ChangeAnnotationIdentifier:()=>sxe,CodeAction:()=>jxe,CodeActionContext:()=>Gxe,CodeActionKind:()=>qxe,CodeActionTriggerKind:()=>Uxe,CodeDescription:()=>txe,CodeLens:()=>Wxe,Color:()=>Vbe,ColorInformation:()=>Hbe,ColorPresentation:()=>Xbe,Command:()=>ixe,CompletionItem:()=>Axe,CompletionItemKind:()=>wxe,CompletionItemLabelDetails:()=>Cxe,CompletionItemTag:()=>Exe,CompletionList:()=>Rxe,CreateFile:()=>cxe,DeleteFile:()=>uxe,Diagnostic:()=>rxe,DiagnosticRelatedInformation:()=>Qbe,DiagnosticSeverity:()=>Jbe,DiagnosticTag:()=>exe,DocumentHighlight:()=>Oxe,DocumentHighlightKind:()=>Mxe,DocumentLink:()=>Vxe,DocumentSymbol:()=>zxe,DocumentUri:()=>Fbe,EOL:()=>d4e,FoldingRange:()=>Zbe,FoldingRangeKind:()=>Kbe,FormattingOptions:()=>Yxe,Hover:()=>Nxe,InlayHint:()=>n4e,InlayHintKind:()=>r4e,InlayHintLabelPart:()=>i4e,InlineCompletionContext:()=>h4e,InlineCompletionItem:()=>s4e,InlineCompletionList:()=>o4e,InlineCompletionTriggerKind:()=>l4e,InlineValueContext:()=>t4e,InlineValueEvaluatableExpression:()=>e4e,InlineValueText:()=>Qxe,InlineValueVariableLookup:()=>Jxe,InsertReplaceEdit:()=>_xe,InsertTextFormat:()=>kxe,InsertTextMode:()=>Sxe,Location:()=>Wbe,LocationLink:()=>Ybe,MarkedString:()=>Lxe,MarkupContent:()=>Txe,MarkupKind:()=>xxe,OptionalVersionedTextDocumentIdentifier:()=>vxe,ParameterInformation:()=>Ixe,Position:()=>Gbe,Range:()=>jbe,RenameFile:()=>hxe,SelectedCompletionInfo:()=>c4e,SelectionRange:()=>Hxe,SemanticTokenModifiers:()=>Kxe,SemanticTokenTypes:()=>Xxe,SemanticTokens:()=>Zxe,SignatureInformation:()=>Dxe,StringValue:()=>a4e,SymbolInformation:()=>Bxe,SymbolKind:()=>Pxe,SymbolTag:()=>$xe,TextDocument:()=>p4e,TextDocumentEdit:()=>lxe,TextDocumentIdentifier:()=>mxe,TextDocumentItem:()=>bxe,TextEdit:()=>nxe,URI:()=>zbe,VersionedTextDocumentIdentifier:()=>yxe,WorkspaceChange:()=>fxe,WorkspaceEdit:()=>dxe,WorkspaceFolder:()=>u4e,WorkspaceSymbol:()=>Fxe,integer:()=>qbe,uinteger:()=>Ube});var Fbe,zbe,qbe,Ube,Gbe,jbe,Wbe,Ybe,Vbe,Hbe,Xbe,Kbe,Zbe,Qbe,Jbe,exe,txe,rxe,ixe,nxe,axe,sxe,oxe,lxe,cxe,hxe,uxe,dxe,pxe,gxe,fxe,mxe,yxe,vxe,bxe,xxe,Txe,wxe,kxe,Exe,_xe,Sxe,Cxe,Axe,Rxe,Lxe,Nxe,Ixe,Dxe,Mxe,Oxe,Pxe,$xe,Bxe,Fxe,zxe,qxe,Uxe,Gxe,jxe,Wxe,Yxe,Vxe,Hxe,Xxe,Kxe,Zxe,Qxe,Jxe,e4e,t4e,r4e,i4e,n4e,a4e,s4e,o4e,l4e,c4e,h4e,u4e,d4e,p4e,g4e,yt,f4e,m4e,y4e,v4e,b4e,x4e,T4e=s(()=>{function e(e){return"string"==typeof e}var t,r,i,n;function a(e){return"string"==typeof e}function s(e){return"number"==typeof e&&t.MIN_VALUE<=e&&e<=t.MAX_VALUE}function o(e){return"number"==typeof e&&r.MIN_VALUE<=e&&e<=r.MAX_VALUE}function l(e,t){return{line:e=e===Number.MAX_VALUE?Ube.MAX_VALUE:e,character:t=t===Number.MAX_VALUE?Ube.MAX_VALUE:t}}function c(e){return yt.objectLiteral(e)&&yt.uinteger(e.line)&&yt.uinteger(e.character)}function h(e,t,r,i){if(yt.uinteger(e)&&yt.uinteger(t)&&yt.uinteger(r)&&yt.uinteger(i))return{start:Gbe.create(e,t),end:Gbe.create(r,i)};if(Gbe.is(e)&&Gbe.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${r}, ${i}]`)}function u(e){return yt.objectLiteral(e)&&Gbe.is(e.start)&&Gbe.is(e.end)}function d(e,t){return{uri:e,range:t}}function p(e){return yt.objectLiteral(e)&&jbe.is(e.range)&&(yt.string(e.uri)||yt.undefined(e.uri))}function g(e,t,r,i){return{targetUri:e,targetRange:t,targetSelectionRange:r,originSelectionRange:i}}function f(e){return yt.objectLiteral(e)&&jbe.is(e.targetRange)&&yt.string(e.targetUri)&&jbe.is(e.targetSelectionRange)&&(jbe.is(e.originSelectionRange)||yt.undefined(e.originSelectionRange))}function m(e,t,r,i){return{red:e,green:t,blue:r,alpha:i}}function y(e){return yt.objectLiteral(e)&&yt.numberRange(e.red,0,1)&&yt.numberRange(e.green,0,1)&&yt.numberRange(e.blue,0,1)&&yt.numberRange(e.alpha,0,1)}function v(e,t){return{range:e,color:t}}function b(e){return yt.objectLiteral(e)&&jbe.is(e.range)&&Vbe.is(e.color)}function x(e,t,r){return{label:e,textEdit:t,additionalTextEdits:r}}function T(e){return yt.objectLiteral(e)&&yt.string(e.label)&&(yt.undefined(e.textEdit)||nxe.is(e))&&(yt.undefined(e.additionalTextEdits)||yt.typedArray(e.additionalTextEdits,nxe.is))}function w(e,t,r,i,n,a){return e={startLine:e,endLine:t},yt.defined(r)&&(e.startCharacter=r),yt.defined(i)&&(e.endCharacter=i),yt.defined(n)&&(e.kind=n),yt.defined(a)&&(e.collapsedText=a),e}function k(e){return yt.objectLiteral(e)&&yt.uinteger(e.startLine)&&yt.uinteger(e.startLine)&&(yt.undefined(e.startCharacter)||yt.uinteger(e.startCharacter))&&(yt.undefined(e.endCharacter)||yt.uinteger(e.endCharacter))&&(yt.undefined(e.kind)||yt.string(e.kind))}function E(e,t){return{location:e,message:t}}function _(e){return yt.defined(e)&&Wbe.is(e.location)&&yt.string(e.message)}function S(e){return yt.objectLiteral(e)&&yt.string(e.href)}function C(e,t,r,i,n,a){return e={range:e,message:t},yt.defined(r)&&(e.severity=r),yt.defined(i)&&(e.code=i),yt.defined(n)&&(e.source=n),yt.defined(a)&&(e.relatedInformation=a),e}function A(e){var t;return yt.defined(e)&&jbe.is(e.range)&&yt.string(e.message)&&(yt.number(e.severity)||yt.undefined(e.severity))&&(yt.integer(e.code)||yt.string(e.code)||yt.undefined(e.code))&&(yt.undefined(e.codeDescription)||yt.string(null==(t=e.codeDescription)?void 0:t.href))&&(yt.string(e.source)||yt.undefined(e.source))&&(yt.undefined(e.relatedInformation)||yt.typedArray(e.relatedInformation,Qbe.is))}function R(e,t,...r){return e={title:e,command:t},yt.defined(r)&&0yt.string(e.kind)?cxe.is(e)||hxe.is(e)||uxe.is(e):lxe.is(e)))}function J(e){return{uri:e}}function ee(e){return yt.defined(e)&&yt.string(e.uri)}function te(e,t){return{uri:e,version:t}}function re(e){return yt.defined(e)&&yt.string(e.uri)&&yt.integer(e.version)}function ie(e,t){return{uri:e,version:t}}function ne(e){return yt.defined(e)&&yt.string(e.uri)&&(null===e.version||yt.integer(e.version))}function ae(e,t,r,i){return{uri:e,languageId:t,version:r,text:i}}function se(e){return yt.defined(e)&&yt.string(e.uri)&&yt.string(e.languageId)&&yt.integer(e.version)&&yt.string(e.text)}function oe(e){return e===i.PlainText||e===i.Markdown}function le(e){var t=e;return yt.objectLiteral(e)&&xxe.is(t.kind)&&yt.string(t.value)}function ce(e,t,r){return{newText:e,insert:t,replace:r}}function he(e){return e&&yt.string(e.newText)&&jbe.is(e.insert)&&jbe.is(e.replace)}function ue(e){return e&&(yt.string(e.detail)||void 0===e.detail)&&(yt.string(e.description)||void 0===e.description)}function de(e){return{label:e}}function pe(e,t){return{items:e||[],isIncomplete:!!t}}function ge(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function fe(e){return yt.string(e)||yt.objectLiteral(e)&&yt.string(e.language)&&yt.string(e.value)}function me(e){var t=e;return!!t&&yt.objectLiteral(t)&&(Txe.is(t.contents)||Lxe.is(t.contents)||yt.typedArray(t.contents,Lxe.is))&&(void 0===e.range||jbe.is(e.range))}function ye(e,t){return t?{label:e,documentation:t}:{label:e}}function ve(e,t,...r){return e={label:e},yt.defined(t)&&(e.documentation=t),yt.defined(r)?e.parameters=r:e.parameters=[],e}function be(e,t){return e={range:e},yt.number(t)&&(e.kind=t),e}function xe(e,t,r,i,n){return e={name:e,kind:t,location:{uri:i,range:r}},n&&(e.containerName=n),e}function Te(e,t,r,i){return void 0!==i?{name:e,kind:t,location:{uri:r,range:i}}:{name:e,kind:t,location:{uri:r}}}function we(e,t,r,i,n,a){return e={name:e,detail:t,kind:r,range:i,selectionRange:n},void 0!==a&&(e.children=a),e}function ke(e){return e&&yt.string(e.name)&&yt.number(e.kind)&&jbe.is(e.range)&&jbe.is(e.selectionRange)&&(void 0===e.detail||yt.string(e.detail))&&(void 0===e.deprecated||yt.boolean(e.deprecated))&&(void 0===e.children||Array.isArray(e.children))&&(void 0===e.tags||Array.isArray(e.tags))}function Ee(e,t,r){return e={diagnostics:e},null!=t&&(e.only=t),null!=r&&(e.triggerKind=r),e}function _e(e){return yt.defined(e)&&yt.typedArray(e.diagnostics,rxe.is)&&(void 0===e.only||yt.typedArray(e.only,yt.string))&&(void 0===e.triggerKind||e.triggerKind===Uxe.Invoked||e.triggerKind===Uxe.Automatic)}function Se(e,t,r){let i={title:e},n=!0;return"string"==typeof t?(n=!1,i.kind=t):ixe.is(t)?i.command=t:i.edit=t,n&&void 0!==r&&(i.kind=r),i}function Ce(e){return e&&yt.string(e.title)&&(void 0===e.diagnostics||yt.typedArray(e.diagnostics,rxe.is))&&(void 0===e.kind||yt.string(e.kind))&&(void 0!==e.edit||void 0!==e.command)&&(void 0===e.command||ixe.is(e.command))&&(void 0===e.isPreferred||yt.boolean(e.isPreferred))&&(void 0===e.edit||dxe.is(e.edit))}function Ae(e,t){return e={range:e},yt.defined(t)&&(e.data=t),e}function Re(e){return yt.defined(e)&&jbe.is(e.range)&&(yt.undefined(e.command)||ixe.is(e.command))}function Le(e,t){return{tabSize:e,insertSpaces:t}}function Ne(e){return yt.defined(e)&&yt.uinteger(e.tabSize)&&yt.boolean(e.insertSpaces)}function Ie(e,t,r){return{range:e,target:t,data:r}}function De(e){return yt.defined(e)&&jbe.is(e.range)&&(yt.undefined(e.target)||yt.string(e.target))}function Me(e,t){return{range:e,parent:t}}function Oe(e){return yt.objectLiteral(e)&&jbe.is(e.range)&&(void 0===e.parent||n.is(e.parent))}function Pe(e){return yt.objectLiteral(e)&&(void 0===e.resultId||"string"==typeof e.resultId)&&Array.isArray(e.data)&&(0===e.data.length||"number"==typeof e.data[0])}function $e(e,t){return{range:e,text:t}}function Be(e){return null!=e&&jbe.is(e.range)&&yt.string(e.text)}function Fe(e,t,r){return{range:e,variableName:t,caseSensitiveLookup:r}}function ze(e){return null!=e&&jbe.is(e.range)&&yt.boolean(e.caseSensitiveLookup)&&(yt.string(e.variableName)||void 0===e.variableName)}function qe(e,t){return{range:e,expression:t}}function Ue(e){return null!=e&&jbe.is(e.range)&&(yt.string(e.expression)||void 0===e.expression)}function Ge(e,t){return{frameId:e,stoppedLocation:t}}function je(e){return yt.defined(e)&&jbe.is(e.stoppedLocation)}function We(e){return 1===e||2===e}function Ye(e){return{value:e}}function Ve(e){return yt.objectLiteral(e)&&(void 0===e.tooltip||yt.string(e.tooltip)||Txe.is(e.tooltip))&&(void 0===e.location||Wbe.is(e.location))&&(void 0===e.command||ixe.is(e.command))}function He(e,t,r){return e={position:e,label:t},void 0!==r&&(e.kind=r),e}function Xe(e){return yt.objectLiteral(e)&&Gbe.is(e.position)&&(yt.string(e.label)||yt.typedArray(e.label,i4e.is))&&(void 0===e.kind||r4e.is(e.kind))&&void 0===e.textEdits||yt.typedArray(e.textEdits,nxe.is)&&(void 0===e.tooltip||yt.string(e.tooltip)||Txe.is(e.tooltip))&&(void 0===e.paddingLeft||yt.boolean(e.paddingLeft))&&(void 0===e.paddingRight||yt.boolean(e.paddingRight))}function Ke(e){return{kind:"snippet",value:e}}function Ze(e,t,r,i){return{insertText:e,filterText:t,range:r,command:i}}function Qe(e){return{items:e}}function Je(e,t){return{range:e,text:t}}function et(e,t){return{triggerKind:e,selectedCompletionInfo:t}}function tt(e){return yt.objectLiteral(e)&&zbe.is(e.uri)&&yt.string(e.name)}function rt(e,t,r,i){return new g4e(e,t,r,i)}function it(e){return!!(yt.defined(e)&&yt.string(e.uri)&&(yt.undefined(e.languageId)||yt.string(e.languageId))&&yt.uinteger(e.lineCount)&&yt.func(e.getText)&&yt.func(e.positionAt)&&yt.func(e.offsetAt))}function nt(t,e){let r=t.getText(),i=M(e,(e,t)=>{var r=e.range.start.line-t.range.start.line;return 0==r?e.range.start.character-t.range.start.character:r}),n=r.length;for(let e=i.length-1;0<=e;e--){var a=i[e],s=t.offsetAt(a.range.start),o=t.offsetAt(a.range.end);if(!(o<=n))throw new Error("Overlapping edit");r=r.substring(0,s)+a.newText+r.substring(o,r.length),n=s}return r}function M(i,n){if(!(i.length<=1)){var a=i.length/2|0,s=i.slice(0,a),o=i.slice(a);M(s,n),M(o,n);let e=0,t=0,r=0;for(;e{var t;lxe.is(e)&&(t=new pxe(e.edits,this._changeAnnotations),this._textEditChanges[e.textDocument.uri]=t)})):r.changes&&Object.keys(r.changes).forEach(e=>{var t=new pxe(r.changes[e]);this._textEditChanges[e]=t}):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(r){if(vxe.is(r)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let e={uri:r.uri,version:r.version},t=this._textEditChanges[e.uri];return t||(this._workspaceEdit.documentChanges.push({textDocument:e,edits:i=[]}),t=new pxe(i,this._changeAnnotations),this._textEditChanges[e.uri]=t),t}{if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");let e=this._textEditChanges[r];var i;return e||(this._workspaceEdit.changes[r]=i=[],e=new pxe(i),this._textEditChanges[r]=e),e}}initDocumentChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new gxe,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let i;axe.is(t)||sxe.is(t)?i=t:r=t;let n,a;if(n=void 0===i?cxe.create(e,r):(a=sxe.is(i)?i:this._changeAnnotations.manage(i),cxe.create(e,r,a)),this._workspaceEdit.documentChanges.push(n),void 0!==a)return a}renameFile(e,t,r,i){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let n;axe.is(r)||sxe.is(r)?n=r:i=r;let a,s;if(a=void 0===n?hxe.create(e,t,i):(s=sxe.is(n)?n:this._changeAnnotations.manage(n),hxe.create(e,t,i,s)),this._workspaceEdit.documentChanges.push(a),void 0!==s)return s}deleteFile(e,t,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let i;axe.is(t)||sxe.is(t)?i=t:r=t;let n,a;if(n=void 0===i?uxe.create(e,r):(a=sxe.is(i)?i:this._changeAnnotations.manage(i),uxe.create(e,r,a)),this._workspaceEdit.documentChanges.push(n),void 0!==a)return a}},O=mxe=mxe||{},mt(J,"create"),O.create=J,mt(ee,"is"),O.is=ee,O=yxe=yxe||{},mt(te,"create"),O.create=te,mt(re,"is"),O.is=re,O=vxe=vxe||{},mt(ie,"create"),O.create=ie,mt(ne,"is"),O.is=ne,O=bxe=bxe||{},mt(ae,"create"),O.create=ae,mt(se,"is"),O.is=se,(i=xxe=xxe||{}).PlainText="plaintext",i.Markdown="markdown",mt(oe,"is"),i.is=oe,O=Txe=Txe||{},mt(le,"is"),O.is=le,(O=wxe=wxe||{}).Text=1,O.Method=2,O.Function=3,O.Constructor=4,O.Field=5,O.Variable=6,O.Class=7,O.Interface=8,O.Module=9,O.Property=10,O.Unit=11,O.Value=12,O.Enum=13,O.Keyword=14,O.Snippet=15,O.Color=16,O.File=17,O.Reference=18,O.Folder=19,O.EnumMember=20,O.Constant=21,O.Struct=22,O.Event=23,O.Operator=24,O.TypeParameter=25,(O=kxe=kxe||{}).PlainText=1,O.Snippet=2,(Exe=Exe||{}).Deprecated=1,O=_xe=_xe||{},mt(ce,"create"),O.create=ce,mt(he,"is"),O.is=he,(O=Sxe=Sxe||{}).asIs=1,O.adjustIndentation=2,O=Cxe=Cxe||{},mt(ue,"is"),O.is=ue,O=Axe=Axe||{},mt(de,"create"),O.create=de,O=Rxe=Rxe||{},mt(pe,"create"),O.create=pe,O=Lxe=Lxe||{},mt(ge,"fromPlainText"),O.fromPlainText=ge,mt(fe,"is"),O.is=fe,O=Nxe=Nxe||{},mt(me,"is"),O.is=me,O=Ixe=Ixe||{},mt(ye,"create"),O.create=ye,O=Dxe=Dxe||{},mt(ve,"create"),O.create=ve,(O=Mxe=Mxe||{}).Text=1,O.Read=2,O.Write=3,O=Oxe=Oxe||{},mt(be,"create"),O.create=be,(O=Pxe=Pxe||{}).File=1,O.Module=2,O.Namespace=3,O.Package=4,O.Class=5,O.Method=6,O.Property=7,O.Field=8,O.Constructor=9,O.Enum=10,O.Interface=11,O.Function=12,O.Variable=13,O.Constant=14,O.String=15,O.Number=16,O.Boolean=17,O.Array=18,O.Object=19,O.Key=20,O.Null=21,O.EnumMember=22,O.Struct=23,O.Event=24,O.Operator=25,O.TypeParameter=26,($xe=$xe||{}).Deprecated=1,O=Bxe=Bxe||{},mt(xe,"create"),O.create=xe,O=Fxe=Fxe||{},mt(Te,"create"),O.create=Te,O=zxe=zxe||{},mt(we,"create"),O.create=we,mt(ke,"is"),O.is=ke,(O=qxe=qxe||{}).Empty="",O.QuickFix="quickfix",O.Refactor="refactor",O.RefactorExtract="refactor.extract",O.RefactorInline="refactor.inline",O.RefactorRewrite="refactor.rewrite",O.Source="source",O.SourceOrganizeImports="source.organizeImports",O.SourceFixAll="source.fixAll",(O=Uxe=Uxe||{}).Invoked=1,O.Automatic=2,O=Gxe=Gxe||{},mt(Ee,"create"),O.create=Ee,mt(_e,"is"),O.is=_e,O=jxe=jxe||{},mt(Se,"create"),O.create=Se,mt(Ce,"is"),O.is=Ce,O=Wxe=Wxe||{},mt(Ae,"create"),O.create=Ae,mt(Re,"is"),O.is=Re,O=Yxe=Yxe||{},mt(Le,"create"),O.create=Le,mt(Ne,"is"),O.is=Ne,O=Vxe=Vxe||{},mt(Ie,"create"),O.create=Ie,mt(De,"is"),O.is=De,n=Hxe=Hxe||{},mt(Me,"create"),n.create=Me,mt(Oe,"is"),n.is=Oe,(O=Xxe=Xxe||{}).namespace="namespace",O.type="type",O.class="class",O.enum="enum",O.interface="interface",O.struct="struct",O.typeParameter="typeParameter",O.parameter="parameter",O.variable="variable",O.property="property",O.enumMember="enumMember",O.event="event",O.function="function",O.method="method",O.macro="macro",O.keyword="keyword",O.modifier="modifier",O.comment="comment",O.string="string",O.number="number",O.regexp="regexp",O.operator="operator",O.decorator="decorator",(O=Kxe=Kxe||{}).declaration="declaration",O.definition="definition",O.readonly="readonly",O.static="static",O.deprecated="deprecated",O.abstract="abstract",O.async="async",O.modification="modification",O.documentation="documentation",O.defaultLibrary="defaultLibrary",O=Zxe=Zxe||{},mt(Pe,"is"),O.is=Pe,O=Qxe=Qxe||{},mt($e,"create"),O.create=$e,mt(Be,"is"),O.is=Be,O=Jxe=Jxe||{},mt(Fe,"create"),O.create=Fe,mt(ze,"is"),O.is=ze,O=e4e=e4e||{},mt(qe,"create"),O.create=qe,mt(Ue,"is"),O.is=Ue,O=t4e=t4e||{},mt(Ge,"create"),O.create=Ge,mt(je,"is"),O.is=je,(O=r4e=r4e||{}).Type=1,O.Parameter=2,mt(We,"is"),O.is=We,O=i4e=i4e||{},mt(Ye,"create"),O.create=Ye,mt(Ve,"is"),O.is=Ve,O=n4e=n4e||{},mt(He,"create"),O.create=He,mt(Xe,"is"),O.is=Xe,O=a4e=a4e||{},mt(Ke,"createSnippet"),O.createSnippet=Ke,O=s4e=s4e||{},mt(Ze,"create"),O.create=Ze,O=o4e=o4e||{},mt(Qe,"create"),O.create=Qe,(O=l4e=l4e||{}).Invoked=0,O.Automatic=1,O=c4e=c4e||{},mt(Je,"create"),O.create=Je,O=h4e=h4e||{},mt(et,"create"),O.create=et,O=u4e=u4e||{},mt(tt,"is"),O.is=tt,d4e=[` `,`\r `,"\r"],O=p4e=p4e||{},mt(rt,"create"),O.create=rt,mt(it,"is"),O.is=it,mt(nt,"applyEdits"),O.applyEdits=nt,mt(M,"mergeSort"),g4e=class{static{mt(this,"FullTextDocument")}constructor(e,t,r,i){this._uri=e,this._languageId=t,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){var t;return e?(t=this.offsetAt(e.start),e=this.offsetAt(e.end),this._content.substring(t,e)):this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let t=[],r=this._content,i=!0;for(let e=0;ee?i=n:r=n+1}var a=r-1;return Gbe.create(a,e-t[a])}offsetAt(e){var t,r=this.getLineOffsets();return e.line>=r.length?this._content.length:e.line<0?0:(t=r[e.line],r=e.line+1{T4e(),$0e(),f4e=class{static{mt(this,"CstNodeBuilder")}constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){return this.rootNode=new x4e(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){var t=new v4e;return t.grammarSource=e,t.root=this.rootNode,this.current.content.push(t),this.nodeStack.push(t),t}buildLeafNode(e,t){return(e=new y4e(e.startOffset,e.image.length,b0e(e),e.tokenType,!t)).grammarSource=t,e.root=this.rootNode,this.current.content.push(e),e}removeNode(e){var t=e.container;t&&0<=(e=t.content.indexOf(e))&&t.content.splice(e,1)}addHiddenNodes(e){var t,r=[];for(t of e){var i=new y4e(t.startOffset,t.image.length,b0e(t),t.tokenType,!0);i.root=this.rootNode,r.push(i)}let n=this.current,a=!1;if(0{p0e(),mve(),$be(),p0e(),s1e(),gde(),w4e(),E4e=Symbol("Datatype"),mt(k4e,"isDataTypeNode"),_4e=mt(e=>e.endsWith("​")?e:e+"​","withRuleSuffix"),S4e=class{static{mt(this,"AbstractLangiumParser")}constructor(e){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;var t=this.lexer.definition,r="production"===e.LanguageMetaData.mode;e.shared.profilers.LangiumProfiler?.isActive("parsing")?this.wrapper=new D4e(t,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask("parsing",e.LanguageMetaData.languageId)):this.wrapper=new I4e(t,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider})}alternatives(e,t){this.wrapper.wrapOr(e,t)}optional(e,t){this.wrapper.wrapOption(e,t)}many(e,t){this.wrapper.wrapMany(e,t)}atLeastOne(e,t){this.wrapper.wrapAtLeastOne(e,t)}getRule(e){return this.allRules.get(e)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},C4e=class extends S4e{static{mt(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new f4e,this.stack=[],this.assignmentMap=new Map,this.operatorPrecedence=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,t){let r=this.computeRuleType(e),i;return Pde(e)&&(i=e.name,this.registerPrecedenceMap(e)),t=this.wrapper.DEFINE_RULE(_4e(e.name),this.startImplementation(r,i,t).bind(this)),this.allRules.set(e.name,t),Vde(e)&&e.entry&&(this.mainRule=t),t}registerPrecedenceMap(t){var e=t.name,r=new Map;for(let e=0;e{var t,r=!this.isRecording()&&void 0!==i;return r&&(this.stack.push(t={$type:i}),i===E4e?t.value="":void 0!==n&&(t.$infixName=n)),a(e),r?this.construct():void 0}}extractHiddenTokens(e){var t=this.lexerResult.hidden;if(!t.length)return[];var r=e.startOffset;for(let e=0;er)return t.splice(0,e);return t.splice(0,t.length)}consume(t,r,i){if(t=this.wrapper.wrapConsume(t,r),!this.isRecording()&&this.isValidToken(t)){var r=this.extractHiddenTokens(t),r=(this.nodeBuilder.addHiddenNodes(r),this.nodeBuilder.buildLeafNode(t,i)),{assignment:e,crossRef:n}=this.getAssignment(i),a=this.current;if(e){var s=zde(i)?t.image:this.converter.convert(t.image,r);this.assign(e.operator,e.feature,s,r,n)}else if(k4e(a)){let e=t.image;zde(i)||(e=this.converter.convert(e,r).toString()),a.value+=e}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&"number"==typeof e.endOffset&&!isNaN(e.endOffset)}subrule(e,t,r,i,n){let a;this.isRecording()||r||(a=this.nodeBuilder.buildCompositeNode(i));let s;try{s=this.wrapper.wrapSubrule(e,t,n)}finally{this.isRecording()||void 0!==(s=void 0!==s||r?s:this.construct())&&a&&0r?(r=s.precedence,t=e):s.precedence!==r||s.rightAssoc||(t=e)}var o=a.slice(0,t),l=a.slice(t+1),c=n.slice(0,t+1),n=n.slice(t+1),c={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:c,operators:o},o={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:n,operators:l},n=this.constructInfix(c,i),l=this.constructInfix(o,i);return{$type:e.$type,$cstNode:e.$cstNode,left:n,operator:a[t],right:l}}}getAssignment(e){var t;return this.assignmentMap.has(e)||(t=tde(e,Ede),this.assignmentMap.set(e,{assignment:t,crossRef:t&&Rde(t.terminal)?t.terminal.isMulti?"multi":"single":void 0})),this.assignmentMap.get(e)}assign(e,t,r,i,n){var a=this.current,s="single"===n&&"string"==typeof r?this.linker.buildReference(a,t,i,r):"multi"===n&&"string"==typeof r?this.linker.buildMultiReference(a,t,i,r):r;switch(e){case"=":a[t]=s;break;case"?=":a[t]=!0;break;case"+=":Array.isArray(a[t])||(a[t]=[]),a[t].push(s)}}assignWithoutOverride(e,t){for(var[r,i]of Object.entries(t)){var n=e[r];void 0===n?e[r]=i:Array.isArray(n)&&Array.isArray(i)&&(i.push(...n),e[r]=i)}return(t=e.$cstNode)&&(t.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}},A4e=class{static{mt(this,"AbstractParserErrorMessageProvider")}buildMismatchTokenMessage(e){return qme.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return qme.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return qme.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return qme.buildEarlyExitMessage(e)}},R4e=class extends A4e{static{mt(this,"LangiumParserErrorMessageProvider")}buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${t.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}},L4e=class extends S4e{static{mt(this,"LangiumCompletionParser")}constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){return this.resetState(),e=this.lexer.tokenize(e,{mode:"partial"}),this.tokens=e.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,t){return t=this.wrapper.DEFINE_RULE(_4e(e.name),this.startImplementation(t).bind(this)),this.allRules.set(e.name,t),e.entry&&(this.mainRule=t),t}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(r){return e=>{var t=this.keepStackSize();try{r(e)}finally{this.resetStackSize(t)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){var e=this.elementStack.length;return this.stackSize=e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,t,r){this.wrapper.wrapConsume(e,t),this.isRecording()||(this.lastElementStack=[...this.elementStack,r],this.nextTokenIndex=this.currIdx+1)}subrule(e,t,r,i,n){this.before(i),this.wrapper.wrapSubrule(e,t,n),this.after(i)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){this.isRecording()||0<=(e=this.elementStack.lastIndexOf(e))&&this.elementStack.splice(e)}get currIdx(){return this.wrapper.currIdx}},N4e={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new R4e},I4e=class extends hve{static{mt(this,"ChevrotainWrapper")}constructor(e,t){var r=t&&"maxLookahead"in t;super(e,{...N4e,lookaheadStrategy:r?new l2e({maxLookahead:t.maxLookahead}):new Obe({logging:t.skipValidations?()=>{}:void 0}),...t})}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t,r){return this.RULE(e,t,r)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t,void 0)}wrapSubrule(e,t,r){return this.subrule(e,t,{ARGS:[r]})}wrapOr(e,t){this.or(e,t)}wrapOption(e,t){this.option(e,t)}wrapMany(e,t){this.many(e,t)}wrapAtLeastOne(e,t){this.atLeastOne(e,t)}rule(e){return e.call(this,{})}},D4e=class extends I4e{static{mt(this,"ProfilerWrapper")}constructor(e,t,r){super(e,t),this.task=r}rule(e){this.task.start(),this.task.startSubTask(this.ruleName(e));try{return super.rule(e)}finally{this.task.stopSubTask(this.ruleName(e)),this.task.stop()}}ruleName(e){return e.ruleName}subrule(e,t,r){this.task.startSubTask(this.ruleName(t));try{return super.subrule(e,t,r)}finally{this.task.stopSubTask(this.ruleName(t))}}}});function O4e(e,t,r){return P4e({parser:t,tokens:r,ruleNames:new Map},e),t}function P4e(e,t){let r=kge(t,!1),i=Yue(t.rules).filter(Vde).filter(e=>r.has(e));for(var n of i){var a={...e,consume:1,optional:1,subrule:1,many:1,or:1};e.parser.rule(n,B4e(a,n.definition))}var s;for(s of Yue(t.rules).filter(Pde).filter(e=>r.has(e)))e.parser.rule(s,$4e(e,s))}function $4e(r,e){let t=e.call.rule.ref;if(!t)throw new Error("Could not resolve reference to infix operator rule: "+e.call.rule.$refText);if(ipe(t))throw new Error("Cannot use terminal rule in infix expression");let i=e.operators.precedences.flatMap(e=>e.operators),n={$type:"Group",elements:[]},a={$container:n,$type:"Assignment",feature:"parts",operator:"+=",terminal:e.call},s={$container:n,$type:"Group",elements:[],cardinality:"*"},o=(n.elements.push(a,s),{$container:s,$type:"Assignment",feature:"operators",operator:"+=",terminal:{$type:"Alternatives",elements:i}}),l={...a,$container:s},c=(s.elements.push(o,l),i.map(e=>r.tokens[e.value]).map((e,t)=>({ALT:mt(()=>r.parser.consume(t,e,o),"ALT")}))),h;return e=>{h=h??K4e(r,t),r.parser.subrule(0,h,!1,a,e),r.parser.many(0,{DEF:mt(()=>{r.parser.alternatives(0,c),r.parser.subrule(1,h,!1,l,e)},"DEF")})}}function B4e(t,r,e=!1){let i;if(zde(r))i=H4e(t,r);else if(xde(r))i=F4e(t,r);else if(Ede(r))i=B4e(t,r.terminal);else if(Rde(r))i=V4e(t,r);else if(Zde(r))i=z4e(t,r);else if(Tde(r))i=G4e(t,r);else if(cpe(r))i=j4e(t,r);else if(Mde(r))i=W4e(t,r);else{if(!Nde(r))throw new z0e(r.$cstNode,"Unexpected element type: "+r.$type);{let e=t.consume++;i=mt(()=>t.parser.consume(e,zme,r),"method")}}return X4e(t,e?void 0:Y4e(r),i,r.cardinality)}function F4e(e,t){let r=Yge(t);return()=>e.parser.action(r,t)}function z4e(a,s){let o=s.rule.ref;if(yde(o)){let t=a.subrule++,r=Vde(o)&&o.fragment,i=0({}),n;return e=>{n=n??K4e(a,o),a.parser.subrule(t,n,r,s,i(e))}}if(ipe(o)){let e=a.consume++,t=Q4e(a,o.name);return()=>a.parser.consume(e,t,s)}if(!o)throw new z0e(s.$cstNode,"Undefined rule: "+s.rule.$refText);B0e(o)}function q4e(s,e){if(e.some(e=>e.calledByName)){let n=e.map(e=>({parameterName:e.parameter?.ref?.name,predicate:U4e(e.value)}));return e=>{var t,r,i={};for({parameterName:t,predicate:r}of n)t&&(i[t]=r(e));return i}}{let a=e.map(e=>U4e(e.value));return t=>{var r,i,n={};for(let e=0;et(e)||r(e)}if(Ade(i)){let t=U4e(i.left),r=U4e(i.right);return e=>t(e)&&r(e)}if(Gde(i)){let t=U4e(i.value);return e=>!t(e)}if(Yde(i)){let t=i.parameter.ref.name;return e=>void 0!==e&&!0===e[t]}if(_de(i)){let e=!!i.true;return()=>e}B0e()}function G4e(r,i){if(1===i.elements.length)return B4e(r,i.elements[0]);{let e=[];for(var n of i.elements){var a={ALT:B4e(r,n,!0)};(n=Y4e(n))&&(a.GATE=U4e(n)),e.push(a)}let t=r.or++;return i=>r.parser.alternatives(t,e.map(e=>{let t={ALT:mt(()=>e.ALT(i),"ALT")},r=e.GATE;return r&&(t.GATE=()=>r(i)),t}))}}function j4e(s,e){if(1===e.elements.length)return B4e(s,e.elements[0]);let t=[];for(var r of e.elements){var i={ALT:B4e(s,r,!0)};(r=Y4e(r))&&(i.GATE=U4e(r)),t.push(i)}let o=s.or++,l=mt((e,t)=>`uGroup_${e}_`+t.getRuleStack().join("-"),"idFunc"),n=mt(a=>s.parser.alternatives(o,t.map((t,r)=>{let e={ALT:mt(()=>!0,"ALT")},i=s.parser,n=(e.ALT=()=>{var e;t.ALT(a),i.isRecording()||(e=l(o,i),i.unorderedGroups.get(e)||i.unorderedGroups.set(e,[]),"u"n(a):e.GATE=()=>!i.unorderedGroups.get(l(o,i))?.[r],e})),"alternatives"),a=X4e(s,Y4e(e),n,"*");return e=>{a(e),s.parser.isRecording()||s.parser.unorderedGroups.delete(l(o,s.parser))}}function W4e(t,e){let r=e.elements.map(e=>B4e(t,e));return t=>r.forEach(e=>e(t))}function Y4e(e){if(Mde(e))return e.guardCondition}function V4e(n,a,s=a.terminal){if(s){if(Zde(s)&&Vde(s.rule.ref)){let t=s.rule.ref,r=n.subrule++,i;return e=>{i=i??K4e(n,t),n.parser.subrule(r,i,!1,a,e)}}if(Zde(s)&&ipe(s.rule.ref)){let e=n.consume++,t=Q4e(n,s.rule.ref.name);return()=>n.parser.consume(e,t,a)}if(zde(s)){let e=n.consume++,t=Q4e(n,s.value);return()=>n.parser.consume(e,t,a)}throw new Error("Could not build cross reference parser")}if(!a.type.ref)throw new Error("Could not resolve reference to type: "+a.type.$refText);if(s=Oge(a.type.ref)?.terminal)return V4e(n,a,s);throw new Error("Could not find name assignment for type: "+Yge(a.type.ref))}function H4e(e,t){let r=e.consume++,i=e.tokens[t.value];if(i)return()=>e.parser.consume(r,i,t);throw new Error("Could not find token for keyword: "+t.value)}function X4e(i,e,n,t){let a=e&&U4e(e);if(!t){if(a){let t=i.or++;return e=>i.parser.alternatives(t,[{ALT:mt(()=>n(e),"ALT"),GATE:mt(()=>a(e),"GATE")},{ALT:nve(),GATE:mt(()=>!a(e),"GATE")}])}return n}if("*"===t){let t=i.many++;return e=>i.parser.many(t,{DEF:mt(()=>n(e),"DEF"),GATE:a?()=>a(e):void 0})}if("+"===t){let r=i.many++;if(a){let t=i.or++;return e=>i.parser.alternatives(t,[{ALT:mt(()=>i.parser.atLeastOne(r,{DEF:mt(()=>n(e),"DEF")}),"ALT"),GATE:mt(()=>a(e),"GATE")},{ALT:nve(),GATE:mt(()=>!a(e),"GATE")}])}return e=>i.parser.atLeastOne(r,{DEF:mt(()=>n(e),"DEF")})}if("?"===t){let t=i.optional++;return e=>i.parser.optional(t,{DEF:mt(()=>n(e),"DEF"),GATE:a?()=>a(e):void 0})}B0e()}function K4e(e,t){if(t=Z4e(e,t),e=e.parser.getRule(t))return e;throw new Error(`Rule "${t}" not found."`)}function Z4e(i,n){if(yde(n))return n.name;if(i.ruleNames.has(n))return i.ruleNames.get(n);{let e=n,t=e.$container,r=n.$type;for(;!Vde(t);)(Mde(t)||Tde(t)||cpe(t))&&(r=t.elements.indexOf(e).toString()+":"+r),t=(e=t).$container;return r=t.name+":"+r,i.ruleNames.set(n,r),r}}function Q4e(e,t){if(e=e.tokens[t])return e;throw new Error(`Token "${t}" not found."`)}var J4e=s(()=>{mve(),p0e(),q0e(),Que(),s1e(),mt(O4e,"createParser"),mt(P4e,"buildRules"),mt($4e,"buildInfixRule"),mt(B4e,"buildElement"),mt(F4e,"buildAction"),mt(z4e,"buildRuleCall"),mt(q4e,"buildRuleCallPredicate"),mt(U4e,"buildPredicate"),mt(G4e,"buildAlternatives"),mt(j4e,"buildUnorderedGroup"),mt(W4e,"buildGroup"),mt(Y4e,"getGuardCondition"),mt(V4e,"buildCrossReference"),mt(H4e,"buildKeyword"),mt(X4e,"wrap"),mt(K4e,"getRule"),mt(Z4e,"getRuleName"),mt(Q4e,"getToken")});function e5e(e){var t=e.Grammar,r=e.parser.Lexer;return O4e(t,e=new L4e(e),r.definition),e.finalize(),e}var t5e=s(()=>{M4e(),J4e(),mt(e5e,"createCompletionParser")});function r5e(e){return(e=i5e(e)).finalize(),e}function i5e(e){var t=e.Grammar,r=e.parser.Lexer;return O4e(t,new C4e(e),r.definition)}var n5e,a5e,s5e,o5e=s(()=>{M4e(),J4e(),mt(r5e,"createLangiumParser"),mt(i5e,"prepareLangiumParser")}),l5e=s(()=>{mve(),p0e(),gde(),s1e(),bge(),Que(),n5e=class{static{mt(this,"DefaultTokenBuilder")}constructor(){this.diagnostics=[]}buildTokens(e,t){var e=Yue(kge(e,!1)),r=this.buildTerminalTokens(e);return(e=this.buildKeywordTokens(e,r,t)).push(...r),e}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){var e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(ipe).filter(e=>!e.fragment).map(e=>this.buildTerminalToken(e)).toArray()}buildTerminalToken(e){var t=Kge(e),r=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,i={name:e.name,PATTERN:r};return"function"==typeof r&&(i.LINE_BREAKS=!0),e.hidden&&(i.GROUP=hge(t)?Tme.SKIPPED:"hidden"),i}requiresCustomPattern(e){return!(!e.flags.includes("u")&&!e.flags.includes("s"))}regexPatternFunction(e){let r=new RegExp(e,e.flags+"y");return(e,t)=>(r.lastIndex=t,r.exec(e))}buildKeywordTokens(e,t,r){return e.filter(yde).flatMap(e=>ode(e).filter(zde)).distinct(e=>e.value).toArray().sort((e,t)=>t.value.length-e.value.length).map(e=>this.buildKeywordToken(e,t,!!r?.caseInsensitive))}buildKeywordToken(e,t,r){return r=this.buildKeywordPattern(e,r),e={name:e.value,PATTERN:r,LONGER_ALT:this.findLongerAlt(e,t)},"function"==typeof r&&(e.LINE_BREAKS=!0),e}buildKeywordPattern(e,t){return t?new RegExp(uge(e.value),"i"):e.value}findLongerAlt(i,e){return e.reduce((e,t)=>{var r=t?.PATTERN;return r?.source&&dge("^"+r.source+"$",i.value)&&e.push(t),e},[])}}}),c5e=s(()=>{function e(t){let r="";for(let e=1;e{var t,r;function i(){if(void 0===t)throw new Error("No runtime abstraction layer installed");return t}function n(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");t=e}Object.defineProperty(e,"__esModule",{value:!0}),mt(i,"RAL"),r=i,mt(n,"install"),r.install=n,e.default=i}),u5e=NGe(e=>{function t(e){return!0===e||!1===e}function r(e){return"string"==typeof e||e instanceof String}function i(e){return"number"==typeof e||e instanceof Number}function n(e){return e instanceof Error}function a(e){return"function"==typeof e}function s(e){return Array.isArray(e)}function o(e){return s(e)&&e.every(e=>r(e))}Object.defineProperty(e,"__esModule",{value:!0}),e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0,mt(t,"boolean"),e.boolean=t,mt(r,"string"),e.string=r,mt(i,"number"),e.number=i,mt(n,"error"),e.error=n,mt(a,"func"),e.func=a,mt(s,"array"),e.array=s,mt(o,"stringArray"),e.stringArray=o}),d5e=NGe(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;var s=h5e();{var r=t.Event={};let e={dispose(){}};r.None=function(){return e}}var n=class{static{mt(this,"CallbackList")}add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:mt(()=>this.remove(e,t),"dispose")})}remove(i,n=null){if(this._callbacks){let r=!1;for(let e=0,t=this._callbacks.length;e{this._callbacks||(this._callbacks=new n),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);let i={dispose:mt(()=>{this._callbacks&&(this._callbacks.remove(e,t),i.dispose=a._noop,this._options)&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this)},"dispose")};return Array.isArray(r)&&r.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};(t.Emitter=r)._noop=function(){}}),p5e=NGe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;var t,r,i=h5e(),n=u5e(),a=d5e();function s(e){return e&&(e===r.None||e===r.Cancelled||n.boolean(e.isCancellationRequested)&&!!e.onCancellationRequested)}(r=t||(e.CancellationToken=t={})).None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:a.Event.None}),r.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:a.Event.None}),mt(s,"is"),r.is=s;var o=Object.freeze(function(e,t){let r=(0,i.default)().timer.setTimeout(e.bind(t),0);return{dispose(){r.dispose()}}}),l=class{static{mt(this,"MutableToken")}constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?o:(this._emitter||(this._emitter=new a.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},c=class{static{mt(this,"CancellationTokenSource")}get token(){return this._token||(this._token=new l),this._token}cancel(){this._token?this._token.cancel():this._token=t.Cancelled}dispose(){this._token?this._token instanceof l&&this._token.dispose():this._token=t.None}};e.CancellationTokenSource=c}),g5e={},f5e=s(()=>{U(g5e,G(p5e(),1))});function m5e(){return new Promise(e=>{"u"{f5e(),mt(m5e,"delayNextTick"),T5e=0,w5e=10,mt(y5e,"startCancelableOperation"),mt(v5e,"setInterruptionPeriod"),k5e=Symbol("OperationCancelled"),mt(b5e,"isOperationCancelled"),mt(x5e,"interruptAndCheck"),E5e=class{static{mt(this,"Deferred")}constructor(){this.promise=new Promise((t,r)=>{this.resolve=e=>(t(e),this),this.reject=e=>(r(e),this)})}}});function S5e(i,n){if(!(i.length<=1)){var a=i.length/2|0,s=i.slice(0,a),o=i.slice(a);S5e(s,n),S5e(o,n);let e=0,t=0,r=0;for(;er.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}function L5e(e){var t=R5e(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var N5e,I5e,D5e,M5e,O5e,P5e,$5e,B5e,F5e,z5e,q5e,U5e,G5e=s(()=>{function e(e,t,r,i){return new N5e(e,t,r,i)}function t(e,t,r){if(e instanceof N5e)return e.update(t,r),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")}function r(e,t){let r=e.getText(),i=S5e(t.map(L5e),(e,t)=>{var r=e.range.start.line-t.range.start.line;return 0==r?e.range.start.character-t.range.start.character:r}),n=0,a=[];for(var s of i){var o=e.offsetAt(s.range.start);if(on&&a.push(r.substring(n,o)),s.newText.length&&a.push(s.newText),n=e.offsetAt(s.range.end)}return a.push(r.substr(n)),a.join("")}var i;N5e=class n{static{mt(this,"FullTextDocument")}constructor(e,t,r,i){this._uri=e,this._languageId=t,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){var t;return e?(t=this.offsetAt(e.start),e=this.offsetAt(e.end),this._content.substring(t,e)):this._content}update(e,t){for(var a of e)if(n.isIncremental(a)){var s=R5e(a.range),o=this.offsetAt(s.start),l=this.offsetAt(s.end);this._content=this._content.substring(0,o)+a.text+this._content.substring(l,this._content.length);let r=Math.max(s.start.line,0),e=Math.max(s.end.line,0),i=this._lineOffsets,n=C5e(a.text,!1,o);if(e-r===n.length)for(let e=0,t=n.length;ee?i=n:r=n+1}var a=r-1;return{line:a,character:(e=this.ensureBeforeEOL(e,t[a]))-t[a]}}offsetAt(e){var t,r=this.getLineOffsets();return e.line>=r.length?this._content.length:e.line<0?0:(t=r[e.line],e.character<=0?t:(r=e.line+1{{var u,d,p={975:e=>{function d(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function a(e,t){for(var r,i="",n=0,a=-1,s=0,o=0;o<=e.length;++o){if(o{for(var r in t)f.o(t,r)&&!f.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},f.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);let e={},i,r=((f.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(e),f.d(e,{URI:mt(()=>k,"URI"),Utils:mt(()=>u,"Utils")}),"object"==typeof process?i="win32"===process.platform:"object"==typeof navigator&&(i=0<=navigator.userAgent.indexOf("Windows")),/^\w[\w\d+.-]*$/),n=/^\//,a=/^\/\//;function m(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!r.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!n.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}mt(m,"a");let s=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class k{static{mt(this,"l")}static isUri(e){return e instanceof k||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,r,i,n,a=!1){"object"==typeof e?(this.scheme=e.scheme||"",this.authority=e.authority||"",this.path=e.path||"",this.query=e.query||"",this.fragment=e.fragment||""):(this.scheme=e||a?e:"file",this.authority=t||"",this.path=((e,t)=>{switch(e){case"https":case"http":case"file":t?"/"!==t[0]&&(t="/"+t):t="/"}return t})(this.scheme,r||""),this.query=i||"",this.fragment=n||"",m(this,a))}get fsPath(){return b(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:r,path:i,query:n,fragment:a}=e;return void 0===t?t=this.scheme:null===t&&(t=""),void 0===r?r=this.authority:null===r&&(r=""),void 0===i?i=this.path:null===i&&(i=""),void 0===n?n=this.query:null===n&&(n=""),void 0===a?a=this.fragment:null===a&&(a=""),t===this.scheme&&r===this.authority&&i===this.path&&n===this.query&&a===this.fragment?this:new E(t,r,i,n,a)}static parse(e,t=!1){return(e=s.exec(e))?new E(e[2]||"",w(e[4]||""),w(e[5]||""),w(e[7]||""),w(e[9]||""),t):new E("","","","","")}static file(e){let t="",r;return"/"===(e=i?e.replace(/\\/g,"/"):e)[0]&&"/"===e[1]&&(e=-1===(r=e.indexOf("/",2))?(t=e.substring(2),"/"):(t=e.substring(2,r),e.substring(r)||"/")),new E("file",t,e,"","")}static from(e){return m(e=new E(e.scheme,e.authority,e.path,e.query,e.fragment),!0),e}toString(e=!1){return x(this,e)}toJSON(){return this}static revive(e){var t;return e&&(e instanceof k?e:((t=new E(e))._formatted=e.external,t._fsPath=e._sep===o?e.fsPath:null,t))}}let o=i?1:void 0;class E extends k{static{mt(this,"d")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=b(this,!1)),this._fsPath}toString(e=!1){return e?x(this,!0):(this._formatted||(this._formatted=x(this,!1)),this._formatted)}toJSON(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=o),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}let l={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function y(t,r,i){let n,a=-1;for(let e=0;eT(e)):e}mt(w,"w");let c=f(975),h=c.posix||c;(d=u=u||{}).joinPath=function(e,...t){return e.with({path:h.join(e.path,...t)})},d.resolvePath=function(e,...t){let r=e.path,i=!1,n=("/"!==r[0]&&(r="/"+r,i=!0),h.resolve(r,...t));return i&&"/"===n[0]&&!e.authority&&(n=n.substring(1)),e.with({path:n})},d.dirname=function(e){if(0===e.path.length||"/"===e.path)return e;let t=h.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},d.basename=function(e){return h.basename(e.path)},d.extname=function(e){return h.extname(e.path)},D5e=e}({URI:M5e,Utils:O5e}=D5e)}),W5e=s(()=>{j5e();{var e=P5e=P5e||{};e.basename=O5e.basename,e.dirname=O5e.dirname,e.extname=O5e.extname,e.joinPath=O5e.joinPath,e.resolvePath=O5e.resolvePath;let a="object"==typeof process&&"win32"===process?.platform;function t(e,t){return e?.toString()===t?.toString()}function r(e,t){var e=("string"==typeof e?M5e.parse(e):e).path,t=("string"==typeof t?M5e.parse(t):t).path,r=e.split("/").filter(e=>00({name:e.name,uri:P5e.joinPath(M5e.parse(t),e.name).toString(),element:e.element})):[]}all(){return this.collectValues(this.root)}findAll(e){return(e=this.getNode(P5e.normalize(e),!1))?this.collectValues(e):[]}getNode(e,t){var r,i=e.split("/");"/"===e.charAt(e.length-1)&&i.pop();let n=this.root;for(r of i){let e=n.children.get(r);if(!e){if(!t)return;e={name:r,children:new Map,parent:n},n.children.set(r,e)}n=e}return n}collectValues(e){var t,r=[];e.element&&r.push(e.element);for(t of e.children.values())r.push(...this.collectValues(t));return r}}}),Y5e=s(()=>{var e;G5e(),Y5e(),f5e(),Que(),W5e(),(e=B5e=B5e||{})[e.Changed=0]="Changed",e[e.Parsed=1]="Parsed",e[e.IndexedContent=2]="IndexedContent",e[e.ComputedScopes=3]="ComputedScopes",e[e.Linked=4]="Linked",e[e.IndexedReferences=5]="IndexedReferences",e[e.Validated=6]="Validated",F5e=class{static{mt(this,"DefaultLangiumDocumentFactory")}constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=g5e.CancellationToken.None){var r=await this.fileSystemProvider.readFile(e);return this.createAsync(e,r,t)}fromTextDocument(e,t,r){return t=t??M5e.parse(e.uri),g5e.CancellationToken.is(r)?this.createAsync(t,e,r):this.create(t,e,r)}fromString(e,t,r){return g5e.CancellationToken.is(r)?this.createAsync(t,e,r):this.create(t,e,r)}fromModel(e,t){return this.create(t,{$model:e})}create(e,t,r){var i;return"string"==typeof t?(i=this.parse(e,t,r),this.createLangiumDocument(i,e,void 0,t)):"$model"in t?(i={value:t.$model,parserErrors:[],lexerErrors:[]},this.createLangiumDocument(i,e)):(i=this.parse(e,t.getText(),r),this.createLangiumDocument(i,e,t))}async createAsync(e,t,r){var i;return"string"==typeof t?(i=await this.parseAsync(e,t,r),this.createLangiumDocument(i,e,void 0,t)):(i=await this.parseAsync(e,t.getText(),r),this.createLangiumDocument(i,e,t))}createLangiumDocument(t,r,e,i){let n;if(e)n={parseResult:t,uri:r,state:B5e.Parsed,references:[],textDocument:e};else{let e=this.createTextDocumentGetter(r,i);n={parseResult:t,uri:r,state:B5e.Parsed,references:[],get textDocument(){return e()}}}return t.value.$document=n}async update(e,t){var r=e.parseResult.value.$cstNode?.root.fullText,i=this.textDocuments?.get(e.uri.toString()),n=i?i.getText():await this.fileSystemProvider.readFile(e.uri);return i?Object.defineProperty(e,"textDocument",{value:i}):(i=this.createTextDocumentGetter(e.uri,n),Object.defineProperty(e,"textDocument",{get:i})),r!==n&&(e.parseResult=await this.parseAsync(e.uri,n,t),e.parseResult.value.$document=e),e.state=B5e.Parsed,e}parse(e,t,r){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(t,r)}parseAsync(e,t,r){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(t,r)}createTextDocumentGetter(e,t){let r=this.serviceRegistry,i;return()=>i=i??I5e.create(e.toString(),r.getServices(e).LanguageMetaData.languageId,0,t??"")}},z5e=class{static{mt(this,"DefaultLangiumDocuments")}constructor(e){this.documentTrie=new $5e,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return Yue(this.documentTrie.all())}addDocument(e){var t=e.uri.toString();if(this.documentTrie.has(t))throw new Error(`A document with the URI '${t}' is already present.`);this.documentTrie.insert(t,e)}getDocument(e){return e=e.toString(),this.documentTrie.find(e)}getDocuments(e){return e=e.toString(),this.documentTrie.findAll(e)}async getOrCreateDocument(e,t){return this.getDocument(e)||(e=await this.langiumDocumentFactory.fromUri(e,t),this.addDocument(e),e)}createDocument(e,t,r){return r?this.langiumDocumentFactory.fromString(t,e,r).then(e=>(this.addDocument(e),e)):(r=this.langiumDocumentFactory.fromString(t,e),this.addDocument(r),r)}hasDocument(e){return this.documentTrie.has(e.toString())}invalidateDocument(e){return e=e.toString(),(e=this.documentTrie.find(e))&&this.documentBuilder().resetToState(e,B5e.Changed),e}deleteDocument(e){var e=e.toString(),t=this.documentTrie.find(e);return t&&(t.state=B5e.Changed,this.documentTrie.delete(e)),t}deleteDocuments(e){var t,e=e.toString(),r=this.documentTrie.findAll(e);for(t of r)t.state=B5e.Changed;return this.documentTrie.delete(e),r}}}),V5e=s(()=>{f5e(),Gue(),gde(),_5e(),Y5e(),q5e=Symbol("RefResolving"),U5e=class{static{mt(this,"DefaultLinker")}constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async link(n,e=g5e.CancellationToken.None){if(this.profiler?.isActive("linking")){let i=this.profiler.createTask("linking",this.languageId);i.start();try{for(let r of lde(n.parseResult.value))await x5e(e),hde(r).forEach(e=>{var t=r.$type+":"+e.property;i.startSubTask(t);try{this.doLink(e,n)}finally{i.stopSubTask(t)}})}finally{i.stop()}}else for(var t of lde(n.parseResult.value))await x5e(e),hde(t).forEach(e=>this.doLink(e,n))}doLink(e,t){var r=e.reference;if("_ref"in r&&void 0===r._ref){r._ref=q5e;try{var i=this.getCandidate(e);Bue(i)?r._ref=i:(r._nodeDescription=i,n=this.loadAstNode(i),r._ref=n??this.createLinkingError(e,i))}catch(t){console.error(`An error occurred while resolving reference to '${r.$refText}':`,t);var n=t.message??String(t);r._ref={info:e,message:`An error occurred while resolving reference to '${r.$refText}': `+n}}t.references.push(r)}else if("_items"in r&&void 0===r._items){r._items=q5e;try{var a=this.getCandidates(e),s=[];if(Bue(a))r._linkingError=a;else for(var o of a){var l=this.loadAstNode(o);l&&s.push({ref:l,$nodeDescription:o})}r._items=s}catch(t){r._linkingError={info:e,message:`An error occurred while resolving reference to '${r.$refText}': `+t},r._items=[]}t.references.push(r)}}unlink(e){for(var t of e.references)"_ref"in t?(t._ref=void 0,delete t._nodeDescription):"_items"in t&&(t._items=void 0,delete t._linkingError);e.references=[]}getCandidate(e){return this.scopeProvider.getScope(e).getElement(e.reference.$refText)??this.createLinkingError(e)}getCandidates(e){var t=this.scopeProvider.getScope(e).getElements(e.reference.$refText).distinct(e=>e.documentUri+"#"+e.path).toArray();return 0{s1e(),mt(H5e,"isNamed"),X5e=class{static{mt(this,"DefaultNameProvider")}getName(e){if(H5e(e))return e.name}getNameNode(e){return Rge(e.$cstNode,"name")}}}),u3e=s(()=>{s1e(),Gue(),gde(),$0e(),Que(),W5e(),p0e(),K5e=class{static{mt(this,"DefaultReferences")}constructor(e){this.nameProvider=e.references.NameProvider,this.index=e.shared.workspace.IndexManager,this.nodeLocator=e.workspace.AstNodeLocator,this.documents=e.shared.workspace.LangiumDocuments,this.hasMultiReference=lde(e.Grammar).some(e=>Rde(e)&&e.isMulti)}findDeclarations(e){if(e){var t=Mge(e),r=e.astNode;if(t&&r){if(Oue(t=r[t.feature])||Pue(t))return ade(t);if(Array.isArray(t))for(var i of t)if((Oue(i)||Pue(i))&&i.$refNode&&i.$refNode.offset<=e.offset&&i.$refNode.end>=e.end)return ade(i)}if(r&&(t=this.nameProvider.getNameNode(r))&&(t===e||v0e(e,t)))return this.getSelfNodes(r)}return[]}getSelfNodes(t){if(this.hasMultiReference){var e=this.index.findAllReferences(t,this.nodeLocator.getAstNodePath(t));if(e=this.getNodeFromReferenceDescription(e.head()))for(var r of hde(e))if(Pue(r.reference)&&r.reference.items.some(e=>e.ref===t))return r.reference.items.map(e=>e.ref)}return[t]}getNodeFromReferenceDescription(e){var t;return e&&(t=this.documents.getDocument(e.sourceUri))?this.nodeLocator.getAstNode(t.parseResult.value,e.sourcePath):void 0}findDeclarationNodes(e){var t,r=[];for(t of this.findDeclarations(e)){var i=this.nameProvider.getNameNode(t)??t.$cstNode;i&&r.push(i)}return r}findReferences(e,t){var r=[];t.includeDeclaration&&r.push(...this.getSelfReferences(e));let i=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(i=i.filter(e=>P5e.equals(e.sourceUri,t.documentUri))),r.push(...i),Yue(r)}getSelfReferences(e){var t,r=[];for(t of this.getSelfNodes(e)){var i,n,a=this.nameProvider.getNameNode(t);a&&(i=ide(t),n=this.nodeLocator.getAstNodePath(t),r.push({sourceUri:i.uri,sourcePath:n,targetUri:i.uri,targetPath:n,segment:x0e(a),local:!0}))}return r}}}),d3e=s(()=>{Que(),Z5e=class{static{mt(this,"MultiMap")}constructor(e){if(this.map=new Map,e)for(var[t,r]of e)this.add(t,r)}get size(){return Zue.sum(Yue(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,t){var r;return void 0===t?this.map.delete(e):!!((r=this.map.get(e))&&0<=(t=r.indexOf(t)))&&(1===r.length?this.map.delete(e):r.splice(t,1),!0)}get(e){return this.map.get(e)??[]}getStream(e){return(e=this.map.get(e))?Yue(e):Hue}has(e,t){return void 0===t?this.map.has(e):!!(e=this.map.get(e))&&0<=e.indexOf(t)}add(e,t){return this.map.has(e)?this.map.get(e).push(t):this.map.set(e,[t]),this}addAll(e,t){return this.map.has(e)?this.map.get(e).push(...t):this.map.set(e,Array.from(t)),this}forEach(r){this.map.forEach((e,t)=>e.forEach(e=>r(e,t,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return Yue(this.map.entries()).flatMap(([t,e])=>e.map(e=>[t,e]))}keys(){return Yue(this.map.keys())}values(){return Yue(this.map.values()).flat()}entriesGroupedByKey(){return Yue(this.map.entries())}},Q5e=class{static{mt(this,"BiMap")}get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(var[t,r]of e)this.set(t,r)}clear(){this.map.clear(),this.inverse.clear()}set(e,t){return this.map.set(e,t),this.inverse.set(t,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){var t=this.map.get(e);return void 0!==t&&(this.map.delete(e),this.inverse.delete(t),!0)}}}),p3e=s(()=>{gde(),f5e(),d3e(),_5e(),J5e=class{static{mt(this,"DefaultScopeComputation")}constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,t=g5e.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,t)}async collectExportedSymbolsForNode(e,t,r=sde,i=g5e.CancellationToken.None){var n,a=[];this.addExportedSymbol(e,a,t);for(n of r(e))await x5e(i),this.addExportedSymbol(n,a,t);return a}addExportedSymbol(e,t,r){var i=this.nameProvider.getName(e);i&&t.push(this.descriptions.createDescription(e,i,r))}async collectLocalSymbols(e,t=g5e.CancellationToken.None){var r,i=e.parseResult.value,n=new Z5e;for(r of ode(i))await x5e(t),this.addLocalSymbol(r,e,n);return n}addLocalSymbol(e,t,r){var i,n=e.$container;n&&(i=this.nameProvider.getName(e))&&r.add(n,this.descriptions.createDescription(e,i,t))}}}),g3e=s(()=>{d3e(),Que(),e3e=class{static{mt(this,"StreamScope")}constructor(e,t,r){this.elements=e,this.outerScope=t,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(t){let r=this.caseInsensitive?t.toLowerCase():t,e=this.caseInsensitive?this.elements.find(e=>e.name.toLowerCase()===r):this.elements.find(e=>e.name===t);return e||(this.outerScope?this.outerScope.getElement(t):void 0)}getElements(t){let r=this.caseInsensitive?t.toLowerCase():t,e=this.caseInsensitive?this.elements.filter(e=>e.name.toLowerCase()===r):this.elements.filter(e=>e.name===t);return(this.concatOuterScope||e.isEmpty())&&this.outerScope?e.concat(this.outerScope.getElements(t)):e}},t3e=class{static{mt(this,"MapScope")}constructor(e,t,r){this.elements=new Map,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0;for(var i of e){var n=this.caseInsensitive?i.name.toLowerCase():i.name;this.elements.set(n,i)}this.outerScope=t}getElement(e){var t=this.caseInsensitive?e.toLowerCase():e;return this.elements.get(t)||(this.outerScope?this.outerScope.getElement(e):void 0)}getElements(e){var t=this.caseInsensitive?e.toLowerCase():e,t=(t=this.elements.get(t))?[t]:[];return(this.concatOuterScope||0{n3e=class{static{mt(this,"DisposableCache")}constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}},a3e=class extends n3e{static{mt(this,"SimpleCache")}constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,t){this.throwIfDisposed(),this.cache.set(e,t)}get(e,t){return this.throwIfDisposed(),this.cache.has(e)?this.cache.get(e):t?(t=t(),this.cache.set(e,t),t):void 0}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},s3e=class extends n3e{static{mt(this,"ContextCache")}constructor(e){super(),this.cache=new Map,this.converter=e??(e=>e)}has(e,t){return this.throwIfDisposed(),this.cacheForContext(e).has(t)}set(e,t,r){this.throwIfDisposed(),this.cacheForContext(e).set(t,r)}get(e,t,r){return this.throwIfDisposed(),(e=this.cacheForContext(e)).has(t)?e.get(t):r?(r=r(),e.set(t,r),r):void 0}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){this.throwIfDisposed(),e?(e=this.converter(e),this.cache.delete(e)):this.cache.clear()}cacheForContext(e){let t=this.converter(e),r=this.cache.get(t);return r||(r=new Map,this.cache.set(t,r)),r}},o3e=class extends s3e{static{mt(this,"DocumentCache")}constructor(e,t){super(e=>e.toString()),t?(this.toDispose.push(e.workspace.DocumentBuilder.onDocumentPhase(t,e=>{this.clear(e.uri.toString())})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{for(var r of t)this.clear(r)}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{var r;for(r of e.concat(t))this.clear(r)}))}},l3e=class extends a3e{static{mt(this,"WorkspaceCache")}constructor(e,t){super(),t?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(t,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{0{this.clear()}))}}}),m3e=s(()=>{g3e(),gde(),Que(),f3e(),c3e=class{static{mt(this,"DefaultScopeProvider")}constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new l3e(e.shared)}getScope(t){let r=[],i=this.reflection.getReferenceType(t),n=ide(t.container).localSymbols;if(n){let e=t.container;for(;n.has(e)&&r.push(n.getStream(e).filter(e=>this.reflection.isSubtype(e.type,i))),e=e.$container;);}let a=this.getGlobalScope(i,t);for(let e=r.length-1;0<=e;e--)a=this.createScope(r[e],a);return a}createScope(e,t,r){return new e3e(Yue(e),t,r)}createScopeForNodes(e,t,r){return e=Yue(e).map(e=>{var t=this.nameProvider.getName(e);if(t)return this.descriptions.createDescription(e,t)}).nonNullable(),new e3e(e,t,r)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new r3e(this.indexManager.allElements(e)))}}});function y3e(e){return"string"==typeof e.$comment}function v3e(e){return"object"==typeof e&&!!e&&("$ref"in e||"$error"in e)}var b3e,x3e,T3e=s(()=>{j5e(),Gue(),gde(),s1e(),mt(y3e,"isAstNodeWithComment"),mt(v3e,"isIntermediateReference"),b3e=class{static{mt(this,"DefaultJsonSerializer")}constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,t){let r=t??{},i=t?.replacer,n=mt((e,t)=>this.replacer(e,t,r),"defaultReplacer"),a=i?(e,t)=>i(e,t,n):n;try{return this.currentDocument=ide(e),JSON.stringify(e,a,t?.space)}finally{this.currentDocument=void 0}}deserialize(e,t){return t=t??{},e=JSON.parse(e),this.linkNode(e,e,t),e}replacer(t,r,{refText:e,sourceText:i,textRegions:n,comments:a,uriConverter:s}){if(!this.ignoreProperties.has(t)){if(Oue(r)){var o=r.ref,l=e?r.$refText:void 0;if(o){let e=ide(o),t="";return this.currentDocument&&this.currentDocument!==e&&(t=s?s(e.uri,o):e.uri.toString()),o=this.astNodeLocator.getAstNodePath(o),{$ref:t+"#"+o,$refText:l}}return{$error:r.error?.message??"Could not resolve reference",$refText:l}}if(Pue(r)){var c,o=e?r.$refText:void 0,h=[];for(c of r.items){let e=c.ref,t=ide(c.ref),r="";this.currentDocument&&this.currentDocument!==t&&(r=s?s(t.uri,e):t.uri.toString());var u=this.astNodeLocator.getAstNodePath(e);h.push(r+"#"+u)}return{$refs:h,$refText:o}}if(Mue(r)){let e;return n&&(e=this.addAstNodeRegionWithAssignmentsTo({...r}),!t||r.$document)&&e?.$textRegion&&(e.$textRegion.documentURI=this.currentDocument?.uri.toString()),i&&!t&&((e=e??{...r}).$sourceText=r.$cstNode?.text),a&&(e=e??{...r},l=this.commentProvider.getComment(r))&&(e.$comment=l.replace(/\r/g,"")),e??r}return r}}addAstNodeRegionWithAssignmentsTo(i){let n=mt(e=>({offset:e.offset,end:e.end,length:e.length,range:e.range}),"createDocumentSegment");if(i.$cstNode){let e=i.$textRegion=n(i.$cstNode),r=e.assignments={};return Object.keys(i).filter(e=>!e.startsWith("$")).forEach(e=>{var t=Age(i.$cstNode,e).map(n);0!==t.length&&(r[e]=t)}),i}}linkNode(t,r,i,e,n,a){for(var[s,o]of Object.entries(t))if(Array.isArray(o))for(let e=0;e{W5e(),x3e=class{static{mt(this,"DefaultServiceRegistry")}get map(){return this.fileExtensionMap}constructor(e){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.fileNameMap=new Map,this.textDocuments=e?.workspace.TextDocuments}register(e){var t,r=e.LanguageMetaData;for(t of r.fileExtensions)this.fileExtensionMap.has(t)&&console.warn(`The file extension ${t} is used by multiple languages. It is now assigned to '${r.languageId}'.`),this.fileExtensionMap.set(t,e);if(r.fileNames)for(var i of r.fileNames)this.fileNameMap.has(i)&&console.warn(`The file name ${i} is used by multiple languages. It is now assigned to '${r.languageId}'.`),this.fileNameMap.set(i,e);this.languageIdMap.set(r.languageId,e)}getServices(e){if(0===this.languageIdMap.size)throw new Error("The service registry is empty. Use `register` to register the services of a language.");var t=this.textDocuments?.get(e)?.languageId;if(void 0!==t){var r=this.languageIdMap.get(t);if(r)return r}if(r=P5e.extname(e),e=P5e.basename(e),e=this.fileNameMap.get(e)??this.fileExtensionMap.get(r))return e;throw t?new Error(`The service registry contains no services for the extension '${r}' for language '${t}'.`):new Error(`The service registry contains no services for the extension '${r}'.`)}hasServices(e){try{return this.getServices(e),!0}catch{return!1}}get all(){return Array.from(this.languageIdMap.values())}}});function k3e(e){return{code:e}}var E3e,_3e,S3e=s(()=>{var e;vke(),d3e(),_5e(),Que(),mt(k3e,"diagnosticData"),(e=E3e=E3e||{}).defaults=["fast","slow","built-in"],e.all=e.defaults,_3e=class{static{mt(this,"ValidationRegistry")}constructor(e){this.entries=new Z5e,this.knownCategories=new Set(E3e.defaults),this.entriesBefore=[],this.entriesAfter=[],this.reflection=e.shared.AstReflection}register(e,t=this,r="fast"){if("built-in"===r)throw new Error("The 'built-in' category is reserved for lexer, parser, and linker errors.");this.knownCategories.add(r);for(var[i,n]of Object.entries(e))if(Array.isArray(n))for(var a of n)a={check:this.wrapValidationException(a,t),category:r},this.addEntry(i,a);else"function"==typeof n?(n={check:this.wrapValidationException(n,t),category:r},this.addEntry(i,n)):B0e()}wrapValidationException(i,n){return async(e,t,r)=>{await this.handleException(()=>i.call(n,e,t,r),"An error occurred during validation",t,e)}}async handleException(e,t,r,i){try{await e()}catch(e){if(b5e(e))throw e;console.error(t+":",e),e instanceof Error&&e.stack&&console.error(e.stack),r("error",t+": "+(e instanceof Error?e.message:String(e)),{node:i})}}addEntry(e,t){if("AstNode"===e)this.entries.add("AstNode",t);else for(var r of this.reflection.getAllSubTypes(e))this.entries.add(r,t)}getChecks(e,t){let r=Yue(this.entries.get(e)).concat(this.entries.get("AstNode"));return(r=t?r.filter(e=>t.includes(e.category)):r).map(e=>e.check)}registerBeforeDocument(e,t=this){this.entriesBefore.push(this.wrapPreparationException(e,"An error occurred during set-up of the validation",t))}registerAfterDocument(e,t=this){this.entriesAfter.push(this.wrapPreparationException(e,"An error occurred during tear-down of the validation",t))}wrapPreparationException(n,a,s){return async(e,t,r,i)=>{await this.handleException(()=>n.call(s,e,t,r,i),a,t,e)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}}});function C3e(e){if(e.range)return e.range;let t;return"string"==typeof e.property?t=Rge(e.node.$cstNode,e.property,e.index):"string"==typeof e.keyword&&(t=Ige(e.node.$cstNode,e.keyword,e.index)),(t=t??e.node.$cstNode)?t.range:{start:{line:0,character:0},end:{line:0,character:0}}}function A3e(e){switch(e){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+e)}}function R3e(e){switch(e){case"error":return k3e(I3e.LexingError);case"warning":return k3e(I3e.LexingWarning);case"info":return k3e(I3e.LexingInfo);case"hint":return k3e(I3e.LexingHint);default:throw new Error("Invalid diagnostic severity: "+e)}}var L3e,N3e,I3e,D3e,M3e,O3e,P3e,$3e,B3e,F3e,z3e,q3e,U3e=s(()=>{var e;f5e(),s1e(),gde(),$0e(),_5e(),S3e(),L3e=Object.freeze({validateNode:!0,validateChildren:!0}),N3e=class{static{mt(this,"DefaultDocumentValidator")}constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async validateDocument(e,t={},r=g5e.CancellationToken.None){var i=e.parseResult,n=[];if(await x5e(r),t.categories&&!t.categories.includes("built-in")||(this.processLexingErrors(i,n,t),!(t.stopAfterLexingErrors&&n.some(e=>e.data?.code===I3e.LexingError)||(this.processParsingErrors(i,n,t),t.stopAfterParsingErrors&&n.some(e=>e.data?.code===I3e.ParsingError))||(this.processLinkingErrors(e,n,t),t.stopAfterLinkingErrors&&n.some(e=>e.data?.code===I3e.LinkingError))))){try{n.push(...await this.validateAst(i.value,t,r))}catch(e){if(b5e(e))throw e;console.error("An error occurred during validation:",e)}await x5e(r)}return n}processLexingErrors(e,t,r){var i;for(i of[...e.lexerErrors,...e.lexerReport?.diagnostics??[]]){var n={severity:A3e(n=i.severity??"error"),range:{start:{line:i.line-1,character:i.column-1},end:{line:i.line-1,character:i.column+i.length-1}},message:i.message,data:R3e(n),source:this.getSource()};t.push(n)}}processParsingErrors(e,t,r){for(var i of e.parserErrors){let e;var n,a;isNaN(i.token.startOffset)?"previousToken"in i&&(a=i.previousToken,e=isNaN(a.startOffset)?{start:n={line:0,character:0},end:n}:{start:n={line:a.endLine-1,character:a.endColumn},end:n}):e=b0e(i.token),e&&(a={severity:A3e("error"),range:e,message:i.message,data:k3e(I3e.ParsingError),source:this.getSource()},t.push(a))}}processLinkingErrors(e,t,r){for(var i of e.references){var n=i.error;n&&(i={node:n.info.container,range:i.$refNode?.range,property:n.info.property,index:n.info.index,data:{code:I3e.LinkingError,containerType:n.info.container.$type,property:n.info.property,refText:n.info.reference.$refText}},t.push(this.toDiagnostic("error",n.message,i)))}}async validateAst(e,t,r=g5e.CancellationToken.None){let i=[],n=mt((e,t,r)=>{i.push(this.toDiagnostic(e,t,r))},"acceptor");return await this.validateAstBefore(e,t,n,r),await this.validateAstNodes(e,t,n,r),await this.validateAstAfter(e,t,n,r),i}async validateAstBefore(e,t,r,i=g5e.CancellationToken.None){var n;for(n of this.validationRegistry.checksBefore)await x5e(i),await n(e,r,t.categories??[],i)}async validateAstNodes(e,t,r,i=g5e.CancellationToken.None){if(this.profiler?.isActive("validating")){var n=this.profiler.createTask("validating",this.languageId);n.start();try{var a,s=lde(e).iterator();for(a of s){n.startSubTask(a.$type);var o,l=this.validateSingleNodeOptions(a,t);if(l.validateNode)try{for(o of this.validationRegistry.getChecks(a.$type,t.categories))await o(a,r,i)}finally{n.stopSubTask(a.$type)}l.validateChildren||s.prune()}}finally{n.stop()}}else{var c,h=lde(e).iterator();for(c of h){await x5e(i);var u,d=this.validateSingleNodeOptions(c,t);if(d.validateNode)for(u of this.validationRegistry.getChecks(c.$type,t.categories))await u(c,r,i);d.validateChildren||h.prune()}}}validateSingleNodeOptions(e,t){return L3e}async validateAstAfter(e,t,r,i=g5e.CancellationToken.None){var n;for(n of this.validationRegistry.checksAfter)await x5e(i),await n(e,r,t.categories??[],i)}toDiagnostic(e,t,r){return{message:t,range:C3e(r),severity:A3e(e),code:r.code,codeDescription:r.codeDescription,tags:r.tags,relatedInformation:r.relatedInformation,data:r.data,source:this.getSource()}}getSource(){return this.metadata.languageId}},mt(C3e,"getDiagnosticRange"),mt(A3e,"toDiagnosticSeverity"),mt(R3e,"toDiagnosticData"),(e=I3e=I3e||{}).LexingError="lexing-error",e.LexingWarning="lexing-warning",e.LexingInfo="lexing-info",e.LexingHint="lexing-hint",e.ParsingError="parsing-error",e.LinkingError="linking-error"}),G3e=s(()=>{f5e(),Gue(),gde(),$0e(),_5e(),W5e(),D3e=class{static{mt(this,"DefaultAstNodeDescriptionProvider")}constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,r){var r=r??ide(e),i=(t=t??this.nameProvider.getName(e),this.astNodeLocator.getAstNodePath(e));if(!t)throw new Error(`Node at path ${i} has no name.`);let n,a=mt(()=>n=n??x0e(this.nameProvider.getNameNode(e)??e.$cstNode),"nameSegmentGetter");return{node:e,name:t,get nameSegment(){return a()},selectionSegment:x0e(e.$cstNode),type:e.$type,documentUri:r.uri,path:i}}},M3e=class{static{mt(this,"DefaultReferenceDescriptionProvider")}constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=g5e.CancellationToken.None){let r=[],i=e.parseResult.value;for(var n of lde(i))await x5e(t),hde(n).forEach(e=>{e.reference.error||r.push(...this.createInfoDescriptions(e))});return r}createInfoDescriptions(e){var t=e.reference;if(t.error||!t.$refNode)return[];let r=[];Oue(t)&&t.$nodeDescription?r=[t.$nodeDescription]:Pue(t)&&(r=t.items.map(e=>e.$nodeDescription).filter(e=>void 0!==e));var i,n=ide(e.container).uri,a=this.nodeLocator.getAstNodePath(e.container),s=[],o=x0e(t.$refNode);for(i of r)s.push({sourceUri:n,sourcePath:a,targetUri:i.documentUri,targetPath:i.path,segment:o,local:P5e.equals(i.documentUri,n)});return s}}}),j3e=s(()=>{O3e=class{static{mt(this,"DefaultAstNodeLocator")}constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){var t;return e.$container?(t=this.getAstNodePath(e.$container),e=this.getPathSegment(e),t+this.segmentSeparator+e):""}getPathSegment({$containerProperty:e,$containerIndex:t}){if(e)return void 0!==t?e+this.indexSeparator+t:e;throw new Error("Missing '$containerProperty' in AST node.")}getAstNode(e,t){return t.split(this.segmentSeparator).reduce((e,t)=>{var r,i;return e&&0!==t.length?0<(i=t.indexOf(this.indexSeparator))?(r=t.substring(0,i),i=parseInt(t.substring(i+1)),e[r]?.[i]):e[t]:e},e)}}}),W3e={},Y3e=s(()=>{U(W3e,G(d5e(),1))}),V3e=s(()=>{Y3e(),_5e(),P3e=class{static{mt(this,"DefaultConfigurationProvider")}constructor(e){this._ready=new E5e,this.onConfigurationSectionUpdateEmitter=new W3e.Emitter,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){this.workspaceConfig=e.capabilities.workspace?.configuration??!1}async initialized(t){var e;if(this.workspaceConfig&&(t.register&&(e=this.serviceRegistry.all,t.register({section:e.map(e=>this.toSectionName(e.LanguageMetaData.languageId))})),t.fetchConfiguration)){let e=this.serviceRegistry.all.map(e=>({section:this.toSectionName(e.LanguageMetaData.languageId)})),r=await t.fetchConfiguration(e);e.forEach((e,t)=>{this.updateSectionConfiguration(e.section,r[t])})}this._ready.resolve()}updateConfiguration(e){"object"==typeof e.settings&&null!==e.settings&&Object.entries(e.settings).forEach(([e,t])=>{this.updateSectionConfiguration(e,t),this.onConfigurationSectionUpdateEmitter.fire({section:e,configuration:t})})}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){if(await this.ready,e=this.toSectionName(e),this.settings[e])return this.settings[e][t]}toSectionName(e){return""+e}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}}}),H3e=NGe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Message=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType=e.RequestType0=e.AbstractMessageSignature=e.ParameterStructures=e.ResponseError=e.ErrorCodes=void 0;var i,n=u5e(),t=((t=i||(e.ErrorCodes=i={})).ParseError=-32700,t.InvalidRequest=-32600,t.MethodNotFound=-32601,t.InvalidParams=-32602,t.InternalError=-32603,t.jsonrpcReservedErrorRangeStart=-32099,t.serverErrorStart=-32099,t.MessageWriteError=-32099,t.MessageReadError=-32098,t.PendingResponseRejected=-32097,t.ConnectionInactive=-32096,t.ServerNotInitialized=-32002,t.UnknownErrorCode=-32001,t.jsonrpcReservedErrorRangeEnd=-32e3,t.serverErrorEnd=-32e3,class c extends Error{static{mt(this,"ResponseError")}constructor(e,t,r){super(t),this.code=n.number(e)?e:i.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,c.prototype)}toJson(){var e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),e}}),r=(e.ResponseError=t,class h{static{mt(this,"ParameterStructures")}constructor(e){this.kind=e}static is(e){return e===h.auto||e===h.byName||e===h.byPosition}toString(){return this.kind}}),t=((e.ParameterStructures=r).auto=new r("auto"),r.byPosition=new r("byPosition"),r.byName=new r("byName"),class{static{mt(this,"AbstractMessageSignature")}constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return r.auto}}),a=(e.AbstractMessageSignature=t,class extends t{static{mt(this,"RequestType0")}constructor(e){super(e,0)}}),a=(e.RequestType0=a,class extends t{static{mt(this,"RequestType")}constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}}),a=(e.RequestType=a,class extends t{static{mt(this,"RequestType1")}constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}}),a=(e.RequestType1=a,class extends t{static{mt(this,"RequestType2")}constructor(e){super(e,2)}}),a=(e.RequestType2=a,class extends t{static{mt(this,"RequestType3")}constructor(e){super(e,3)}}),a=(e.RequestType3=a,class extends t{static{mt(this,"RequestType4")}constructor(e){super(e,4)}}),a=(e.RequestType4=a,class extends t{static{mt(this,"RequestType5")}constructor(e){super(e,5)}}),a=(e.RequestType5=a,class extends t{static{mt(this,"RequestType6")}constructor(e){super(e,6)}}),a=(e.RequestType6=a,class extends t{static{mt(this,"RequestType7")}constructor(e){super(e,7)}}),a=(e.RequestType7=a,class extends t{static{mt(this,"RequestType8")}constructor(e){super(e,8)}}),a=(e.RequestType8=a,class extends t{static{mt(this,"RequestType9")}constructor(e){super(e,9)}}),a=(e.RequestType9=a,class extends t{static{mt(this,"NotificationType")}constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}}),a=(e.NotificationType=a,class extends t{static{mt(this,"NotificationType0")}constructor(e){super(e,0)}}),a=(e.NotificationType0=a,class extends t{static{mt(this,"NotificationType1")}constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}}),a=(e.NotificationType1=a,class extends t{static{mt(this,"NotificationType2")}constructor(e){super(e,2)}}),a=(e.NotificationType2=a,class extends t{static{mt(this,"NotificationType3")}constructor(e){super(e,3)}}),a=(e.NotificationType3=a,class extends t{static{mt(this,"NotificationType4")}constructor(e){super(e,4)}}),a=(e.NotificationType4=a,class extends t{static{mt(this,"NotificationType5")}constructor(e){super(e,5)}}),a=(e.NotificationType5=a,class extends t{static{mt(this,"NotificationType6")}constructor(e){super(e,6)}}),a=(e.NotificationType6=a,class extends t{static{mt(this,"NotificationType7")}constructor(e){super(e,7)}}),a=(e.NotificationType7=a,class extends t{static{mt(this,"NotificationType8")}constructor(e){super(e,8)}}),a=(e.NotificationType8=a,class extends t{static{mt(this,"NotificationType9")}constructor(e){super(e,9)}});function s(e){return e&&n.string(e.method)&&(n.string(e.id)||n.number(e.id))}function o(e){return e&&n.string(e.method)&&void 0===e.id}function l(e){return e&&(void 0!==e.result||!!e.error)&&(n.string(e.id)||n.number(e.id)||null===e.id)}e.NotificationType9=a,t=e.Message={},mt(s,"isRequest"),t.isRequest=s,mt(o,"isNotification"),t.isNotification=o,mt(l,"isResponse"),t.isResponse=l}),X3e=NGe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=e.LinkedMap=e.Touch=void 0,(r=n||(e.Touch=n={})).None=0,r.First=1,r.AsOld=r.First,r.Last=2,r.AsNew=r.Last;var t,n,r=class{static{mt(this,"LinkedMap")}constructor(){this[t]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=n.None){if(e=this._map.get(e))return t!==n.None&&this.touch(e,t),e.value}set(e,t,r=n.None){let i=this._map.get(e);if(i)i.value=t,r!==n.None&&this.touch(i,r);else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case n.None:this.addItemLast(i);break;case n.First:this.addItemFirst(i);break;default:n.Last,this.addItemLast(i)}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){var t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(this._head||this._tail){var e;if(this._head&&this._tail)return e=this._head,this._map.delete(e.key),this.removeItem(e),this._size--,e.value;throw new Error("Invalid list")}}forEach(e,t){let r=this._state,i=this._head;for(;i;){if((t?e.bind(t):e)(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){let t=this._state,r=this._head,e={[Symbol.iterator]:()=>e,next:mt(()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");var e;return r?(e={value:r.key,done:!1},r=r.next,e):{value:void 0,done:!0}},"next")};return e}values(){let t=this._state,r=this._head,e={[Symbol.iterator]:()=>e,next:mt(()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");var e;return r?(e={value:r.value,done:!1},r=r.next,e):{value:void 0,done:!0}},"next")};return e}entries(){let t=this._state,r=this._head,e={[Symbol.iterator]:()=>e,next:mt(()=>{if(this._state!==t)throw new Error("LinkedMap got modified during iteration.");var e;return r?(e={value:[r.key,r.value],done:!1},r=r.next,e):{value:void 0,done:!0}},"next")};return e}[(t=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(r){if(!(r>=this.size))if(0===r)this.clear();else{let e=this._head,t=this.size;for(;e&&t>r;)this._map.delete(e.key),e=e.next,t--;this._head=e,this._size=t,e&&(e.previous=void 0),this._state++}}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{var t=e.next,r=e.previous;if(!t||!r)throw new Error("Invalid list");(t.previous=r).next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");var r,i;t!==n.First&&t!==n.Last||(t===n.First?e!==this._head&&(i=e.next,r=e.previous,e===this._tail?(r.next=void 0,this._tail=r):(i.previous=r).next=i,e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++):t===n.Last&&e!==this._tail&&(r=e.next,i=e.previous,e===this._head?(r.previous=void 0,this._head=r):(r.previous=i).next=r,e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++))}toJSON(){let r=[];return this.forEach((e,t)=>{r.push([t,e])}),r}fromJSON(e){this.clear();for(var[t,r]of e)this.set(t,r)}},r=(e.LinkedMap=r,class extends r{static{mt(this,"LRUCache")}constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=n.AsNew){return super.get(e,t)}peek(e){return super.get(e,n.None)}set(e,t){return super.set(e,t,n.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}});e.LRUCache=r}),K3e=NGe(e=>{function t(e){return{dispose:e}}Object.defineProperty(e,"__esModule",{value:!0}),e.Disposable=void 0,e=e.Disposable={},mt(t,"create"),e.create=t}),Z3e=NGe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=void 0;var r,t=p5e(),i=((i=r={}).Continue=0,i.Cancelled=1,class{static{mt(this,"SharedArraySenderStrategy")}constructor(){this.buffers=new Map}enableCancellation(e){var t;null!==e.id&&(t=new SharedArrayBuffer(4),new Int32Array(t,0,1)[0]=r.Continue,this.buffers.set(e.id,t),e.$cancellationData=t)}async sendCancellation(e,t){void 0!==(t=this.buffers.get(t))&&(t=new Int32Array(t,0,1),Atomics.store(t,0,r.Cancelled))}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}}),n=(e.SharedArraySenderStrategy=i,class{static{mt(this,"SharedArrayBufferCancellationToken")}constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===r.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}}),a=class{static{mt(this,"SharedArrayBufferCancellationTokenSource")}constructor(e){this.token=new n(e)}cancel(){}dispose(){}},i=class{static{mt(this,"SharedArrayReceiverStrategy")}constructor(){this.kind="request"}createCancellationTokenSource(e){return void 0===(e=e.$cancellationData)?new t.CancellationTokenSource:new a(e)}};e.SharedArrayReceiverStrategy=i}),Q3e=NGe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Semaphore=void 0;var t=h5e(),r=class{static{mt(this,"Semaphore")}constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(r){return new Promise((e,t)=>{this._waiting.push({thunk:r,resolve:e,reject:t}),this.runNext()})}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,t.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(0!==this._waiting.length&&this._active!==this._capacity){let t=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{var e=t.thunk();e instanceof Promise?e.then(e=>{this._active--,t.resolve(e),this.runNext()},e=>{this._active--,t.reject(e),this.runNext()}):(this._active--,t.resolve(e),this.runNext())}catch(e){this._active--,t.reject(e),this.runNext()}}}};e.Semaphore=r}),J3e=NGe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=void 0;var l=h5e(),t=u5e(),r=d5e(),i=Q3e();function n(e){return e&&t.func(e.listen)&&t.func(e.dispose)&&t.func(e.onError)&&t.func(e.onClose)&&t.func(e.onPartialMessage)}s=e.MessageReader={},mt(n,"is"),s.is=n;var a,s=class{static{mt(this,"AbstractMessageReader")}constructor(){this.errorEmitter=new r.Emitter,this.closeEmitter=new r.Emitter,this.partialMessageEmitter=new r.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error("Reader received error. Reason: "+(t.string(e.message)?e.message:"unknown"))}};function o(e){let t,r,i=new Map,n,a=new Map;if(void 0===e||"string"==typeof e)t=e??"utf-8";else{if(t=e.charset??"utf-8",void 0!==e.contentDecoder&&(r=e.contentDecoder,i.set(r.name,r)),void 0!==e.contentDecoders)for(var s of e.contentDecoders)i.set(s.name,s);if(void 0!==e.contentTypeDecoder&&(n=e.contentTypeDecoder,a.set(n.name,n)),void 0!==e.contentTypeDecoders)for(var o of e.contentTypeDecoders)a.set(o.name,o)}return void 0===n&&(n=(0,l.default)().applicationJson.decoder,a.set(n.name,n)),{charset:t,contentDecoder:r,contentDecoders:i,contentTypeDecoder:n,contentTypeDecoders:a}}e.AbstractMessageReader=s,c=a={},mt(o,"fromOptions"),c.fromOptions=o;var c=class extends s{static{mt(this,"ReadableStreamMessageReader")}constructor(e,t){super(),this.readable=e,this.options=a.fromOptions(t),this.buffer=(0,l.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new i.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){return this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e,e=this.readable.onData(e=>{this.onData(e)}),this.readable.onError(e=>this.fireError(e)),this.readable.onClose(()=>this.fireClose()),e}onData(e){try{for(this.buffer.append(e);;){if(-1===this.nextMessageLength){var r=this.buffer.tryReadHeaders(!0);if(!r)return;var i=r.get("content-length");if(!i)return void this.fireError(new Error(`Header must provide a Content-Length property. `+JSON.stringify(Object.fromEntries(r))));var n=parseInt(i);if(isNaN(n))return void this.fireError(new Error("Content-Length value must be a number. Got "+i));this.nextMessageLength=n}let t=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===t)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{var e=void 0!==this.options.contentDecoder?await this.options.contentDecoder.decode(t):t,e=await this.options.contentTypeDecoder.decode(e,this.options);this.callback(e)}).catch(e=>{this.fireError(e)})}}catch(e){this.fireError(e)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=(0,l.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};e.ReadableStreamMessageReader=c}),eTe=NGe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=void 0;var t=h5e(),r=u5e(),i=Q3e(),n=d5e();function a(e){return e&&r.func(e.dispose)&&r.func(e.onClose)&&r.func(e.onError)&&r.func(e.write)}o=e.MessageWriter={},mt(a,"is"),o.is=a;var s,o=class{static{mt(this,"AbstractMessageWriter")}constructor(){this.errorEmitter=new n.Emitter,this.closeEmitter=new n.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,r){this.errorEmitter.fire([this.asError(e),t,r])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error("Writer received error. Reason: "+(r.string(e.message)?e.message:"unknown"))}};function l(e){return void 0===e||"string"==typeof e?{charset:e??"utf-8",contentTypeEncoder:(0,t.default)().applicationJson.encoder}:{charset:e.charset??"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,t.default)().applicationJson.encoder}}e.AbstractMessageWriter=o,c=s={},mt(l,"fromOptions"),c.fromOptions=l;var c=class extends o{static{mt(this,"WriteableStreamMessageWriter")}constructor(e,t){super(),this.writable=e,this.options=s.fromOptions(t),this.errorCount=0,this.writeSemaphore=new i.Semaphore(1),this.writable.onError(e=>this.fireError(e)),this.writable.onClose(()=>this.fireClose())}async write(r){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(r,this.options).then(e=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(e):e).then(e=>{var t=[];return t.push("Content-Length: ",e.byteLength.toString(),`\r `),t.push(`\r `),this.doWrite(r,t,e)},e=>{throw this.fireError(e),e}))}async doWrite(e,t,r){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(r)}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}};e.WriteableStreamMessageWriter=c}),tTe=NGe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractMessageBuffer=void 0;var t=class{static{mt(this,"AbstractMessageBuffer")}constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){e="string"==typeof e?this.fromString(e,this._encoding):e,this._chunks.push(e),this._totalLength+=e.byteLength}tryReadHeaders(n=!1){if(0!==this._chunks.length){let e=0,t=0,r=0,i=0;e:for(;tthis._totalLength)throw new Error("Cannot read so many bytes!");var t,r;if(this._chunks[0].byteLength===e)return t=this._chunks[0],this._chunks.shift(),this._totalLength-=e,this.asNative(t);if(this._chunks[0].byteLength>e)return t=this._chunks[0],r=this.asNative(t,e),this._chunks[0]=t.slice(e),this._totalLength-=e,r;let i=this.allocNative(e),n=0;for(;0e?(a=s.slice(0,e),i.set(a,n),n+=e,this._chunks[0]=s.slice(e),this._totalLength-=e,e-=e):(i.set(s,n),n+=s.byteLength,this._chunks.shift(),this._totalLength-=s.byteLength,e-=s.byteLength)}return i}};e.AbstractMessageBuffer=t}),rTe=NGe(ue=>{Object.defineProperty(ue,"__esModule",{value:!0}),ue.createMessageConnection=ue.ConnectionOptions=ue.MessageStrategy=ue.CancellationStrategy=ue.CancellationSenderStrategy=ue.CancellationReceiverStrategy=ue.RequestCancellationReceiverStrategy=ue.IdCancellationReceiverStrategy=ue.ConnectionStrategy=ue.ConnectionError=ue.ConnectionErrors=ue.LogTraceNotification=ue.SetTraceNotification=ue.TraceFormat=ue.TraceValues=ue.Trace=ue.NullLogger=ue.ProgressType=ue.ProgressToken=void 0;var de,pe,ge,fe=h5e(),me=u5e(),ye=H3e(),ve=X3e(),be=d5e(),xe=p5e();function e(e){return"string"==typeof e||"number"==typeof e}(de={}).type=new ye.NotificationType("$/cancelRequest"),i=pe||(ue.ProgressToken=pe={}),mt(e,"is"),i.is=e,(ge={}).type=new ye.NotificationType("$/progress");var Te,we,t,ke,r,Ee,_e,Se,i=class{static{mt(this,"ProgressType")}constructor(){}};function n(e){return me.func(e)}function a(e){if(!me.string(e))return t.Off;switch(e=e.toLowerCase()){case"off":return t.Off;case"messages":return t.Messages;case"compact":return t.Compact;case"verbose":return t.Verbose;default:return t.Off}}function s(e){switch(e){case t.Off:return"off";case t.Messages:return"messages";case t.Compact:return"compact";case t.Verbose:return"verbose";default:return"off"}}function o(e){return me.string(e)&&"json"===(e=e.toLowerCase())?r.JSON:r.Text}ue.ProgressType=i,i=Te={},mt(n,"is"),i.is=n,ue.NullLogger=Object.freeze({error:mt(()=>{},"error"),warn:mt(()=>{},"warn"),info:mt(()=>{},"info"),log:mt(()=>{},"log")}),(i=we||(ue.Trace=we={}))[i.Off=0]="Off",i[i.Messages=1]="Messages",i[i.Compact=2]="Compact",i[i.Verbose=3]="Verbose",ue.TraceValues={Off:"off",Messages:"messages",Compact:"compact",Verbose:"verbose"},t=we||(ue.Trace=we={}),mt(a,"fromString"),t.fromString=a,mt(s,"toString"),t.toString=s,(i=ke||(ue.TraceFormat=ke={})).Text="text",i.JSON="json",r=ke||(ue.TraceFormat=ke={}),mt(o,"fromString"),r.fromString=o,(Ee||(ue.SetTraceNotification=Ee={})).type=new ye.NotificationType("$/setTrace"),(_e||(ue.LogTraceNotification=_e={})).type=new ye.NotificationType("$/logTrace"),(i=Se||(ue.ConnectionErrors=Se={}))[i.Closed=1]="Closed",i[i.Disposed=2]="Disposed",i[i.AlreadyListening=3]="AlreadyListening";var l,Ce,c,h,u,Ae,Re,Le,Ne=class T extends Error{static{mt(this,"ConnectionError")}constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,T.prototype)}};function d(e){return e&&me.func(e.cancelUndispatched)}function p(e){return e&&(void 0===e.kind||"id"===e.kind)&&me.func(e.createCancellationTokenSource)&&(void 0===e.dispose||me.func(e.dispose))}function g(e){return e&&"request"===e.kind&&me.func(e.createCancellationTokenSource)&&(void 0===e.dispose||me.func(e.dispose))}function f(e){return Ce.is(e)||c.is(e)}function m(e){return e&&me.func(e.sendCancellation)&&me.func(e.cleanup)}function y(e){return e&&h.is(e.receiver)&&u.is(e.sender)}function v(e){return e&&me.func(e.handleMessage)}function b(e){return e&&(Ae.is(e.cancellationStrategy)||l.is(e.connectionStrategy)||Re.is(e.messageStrategy))}function x(r,p,P,o){let g=void 0!==P?P:ue.NullLogger,$=0,B=0,F=0,f="2.0",u,d=new Map,a,s=new Map,i=new Map,e,l=new ve.LinkedMap,m=new Map,y=new Set,v=new Map,c=we.Off,h=ke.Text,b,n=Le.New,t=new be.Emitter,z=new be.Emitter,q=new be.Emitter,U=new be.Emitter,G=new be.Emitter,x=o&&o.cancellationStrategy?o.cancellationStrategy:Ae.Message;function T(e){if(null===e)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+e.toString()}function j(e){return null===e?"res-unknown-"+(++F).toString():"res-"+e.toString()}function W(){return"not-"+(++B).toString()}function Y(e,t){ye.Message.isRequest(t)?e.set(T(t.id),t):ye.Message.isResponse(t)?e.set(j(t.id),t):e.set(W(),t)}function V(e){}function w(){return n===Le.Listening}function k(){return n===Le.Closed}function E(){return n===Le.Disposed}function _(){n!==Le.New&&n!==Le.Listening||(n=Le.Closed,z.fire(void 0))}function H(e){t.fire([e,void 0,void 0])}function X(e){t.fire(e)}function S(){e||0===l.size||(e=(0,fe.default)().timer.setImmediate(()=>{e=void 0,K()}))}function C(e){(ye.Message.isRequest(e)?Q:ye.Message.isNotification(e)?ee:ye.Message.isResponse(e)?J:te)(e)}function K(){if(0!==l.size){var e=l.shift();try{var t=o?.messageStrategy;Re.is(t)?t.handleMessage(e,C):C(e)}finally{S()}}}mt(T,"createRequestQueueKey"),mt(j,"createResponseQueueKey"),mt(W,"createNotificationQueueKey"),mt(Y,"addMessageToQueue"),mt(V,"cancelUndispatched"),mt(w,"isListening"),mt(k,"isClosed"),mt(E,"isDisposed"),mt(_,"closeHandler"),mt(H,"readErrorHandler"),mt(X,"writeErrorHandler"),r.onClose(_),r.onError(H),p.onClose(_),p.onError(X),mt(S,"triggerMessageQueue"),mt(C,"handleMessage"),mt(K,"processMessageQueue");let Z=mt(e=>{try{if(ye.Message.isNotification(e)&&e.method===de.type.method){var t=e.params.id,r=T(t),i=l.get(r);if(ye.Message.isRequest(i)){var n=o?.connectionStrategy,a=n&&n.cancelUndispatched?n.cancelUndispatched(i,V):void 0;if(a&&(void 0!==a.error||void 0!==a.result))return l.delete(r),v.delete(t),a.id=i.id,R(a,e.method,Date.now()),void p.write(a).catch(()=>g.error("Sending response for canceled message failed."))}var s=v.get(t);if(void 0!==s)return s.cancel(),void L(e);y.add(t)}Y(l,e)}finally{S()}},"callback");function Q(s){if(!E()){mt(l,"reply"),mt(c,"replyError"),mt(h,"replySuccess"),ne(s);let e=d.get(s.method),i,n,a=(e&&(i=e.type,n=e.handler),Date.now());if(n||u){let t=s.id??String(Date.now()),r=Ce.is(x.receiver)?x.receiver.createCancellationTokenSource(t):x.receiver.createCancellationTokenSource(s);null!==s.id&&y.has(s.id)&&r.cancel(),null!==s.id&&v.set(t,r);try{let e;if(n)if(void 0===s.params){if(void 0!==i&&0!==i.numberOfParams)return void c(new ye.ResponseError(ye.ErrorCodes.InvalidParams,`Request ${s.method} defines ${i.numberOfParams} params but received none.`),s.method,a);e=n(r.token)}else if(Array.isArray(s.params)){if(void 0!==i&&i.parameterStructures===ye.ParameterStructures.byName)return void c(new ye.ResponseError(ye.ErrorCodes.InvalidParams,`Request ${s.method} defines parameters by name but received parameters by position`),s.method,a);e=n(...s.params,r.token)}else{if(void 0!==i&&i.parameterStructures===ye.ParameterStructures.byPosition)return void c(new ye.ResponseError(ye.ErrorCodes.InvalidParams,`Request ${s.method} defines parameters by position but received parameters by name`),s.method,a);e=n(s.params,r.token)}else u&&(e=u(s.method,s.params,r.token));var o=e;e?o.then?o.then(e=>{v.delete(t),l(e,s.method,a)},e=>{v.delete(t),e instanceof ye.ResponseError?c(e,s.method,a):e&&me.string(e.message)?c(new ye.ResponseError(ye.ErrorCodes.InternalError,`Request ${s.method} failed with message: `+e.message),s.method,a):c(new ye.ResponseError(ye.ErrorCodes.InternalError,`Request ${s.method} failed unexpectedly without providing any details.`),s.method,a)}):(v.delete(t),l(e,s.method,a)):(v.delete(t),h(e,s.method,a))}catch(e){v.delete(t),e instanceof ye.ResponseError?l(e,s.method,a):e&&me.string(e.message)?c(new ye.ResponseError(ye.ErrorCodes.InternalError,`Request ${s.method} failed with message: `+e.message),s.method,a):c(new ye.ResponseError(ye.ErrorCodes.InternalError,`Request ${s.method} failed unexpectedly without providing any details.`),s.method,a)}}else c(new ye.ResponseError(ye.ErrorCodes.MethodNotFound,"Unhandled method "+s.method),s.method,a);function l(e,t,r){var i={jsonrpc:f,id:s.id};e instanceof ye.ResponseError?i.error=e.toJson():i.result=void 0===e?null:e,R(i,t,r),p.write(i).catch(()=>g.error("Sending response failed."))}function c(e,t,r){R(e={jsonrpc:f,id:s.id,error:e.toJson()},t,r),p.write(e).catch(()=>g.error("Sending response failed."))}function h(e,t,r){void 0===e&&(e=null),R(e={jsonrpc:f,id:s.id,result:e},t,r),p.write(e).catch(()=>g.error("Sending response failed."))}}}function J(e){if(!E())if(null===e.id)e.error?g.error(`Received response message without id: Error is: `+JSON.stringify(e.error,void 0,4)):g.error("Received response message without id. No further error information provided.");else{var t=e.id,r=m.get(t);if(ae(e,r),void 0!==r){m.delete(t);try{if(e.error){var i=e.error;r.reject(new ye.ResponseError(i.code,i.message,i.data))}else{if(void 0===e.result)throw new Error("Should never happen.");r.resolve(e.result)}}catch(e){e.message?g.error(`Response handler '${r.method}' failed with message: `+e.message):g.error(`Response handler '${r.method}' failed unexpectedly.`)}}}}function ee(r){if(!E()){let e,t;var i,n;if(r.method===de.type.method)i=r.params.id,y.delete(i),L(r);else if((i=s.get(r.method))&&(t=i.handler,e=i.type),t||a)try{L(r),t?void 0===r.params?(void 0!==e&&0!==e.numberOfParams&&e.parameterStructures!==ye.ParameterStructures.byName&&g.error(`Notification ${r.method} defines ${e.numberOfParams} params but received none.`),t()):Array.isArray(r.params)?(n=r.params,r.method===ge.type.method&&2===n.length&&pe.is(n[0])?t({token:n[0],value:n[1]}):(void 0!==e&&(e.parameterStructures===ye.ParameterStructures.byName&&g.error(`Notification ${r.method} defines parameters by name but received parameters by position`),e.numberOfParams!==r.params.length)&&g.error(`Notification ${r.method} defines ${e.numberOfParams} params but received ${n.length} arguments`),t(...n))):(void 0!==e&&e.parameterStructures===ye.ParameterStructures.byPosition&&g.error(`Notification ${r.method} defines parameters by position but received parameters by name`),t(r.params)):a&&a(r.method,r.params)}catch(e){e.message?g.error(`Notification handler '${r.method}' failed with message: `+e.message):g.error(`Notification handler '${r.method}' failed unexpectedly.`)}else q.fire(r)}}function te(e){e?(g.error(`Received message which is neither a response nor a notification message: `+JSON.stringify(e,null,4)),(me.string(e.id)||me.number(e.id))&&(e=e.id,e=m.get(e))&&e.reject(new Error("The received response has neither a result nor an error property."))):g.error("Received empty message.")}function A(e){if(null!=e)switch(c){case we.Verbose:return JSON.stringify(e,null,4);case we.Compact:return JSON.stringify(e);default:return}}function re(t){if(c!==we.Off&&b)if(h===ke.Text){let e;c!==we.Verbose&&c!==we.Compact||!t.params||(e=`Params: ${A(t.params)} `),b.log(`Sending request '${t.method} - (${t.id})'.`,e)}else N("send-request",t)}function ie(t){if(c!==we.Off&&b)if(h===ke.Text){let e;c!==we.Verbose&&c!==we.Compact||(e=t.params?`Params: ${A(t.params)} `:`No parameters provided. `),b.log(`Sending notification '${t.method}'.`,e)}else N("send-notification",t)}function R(t,r,i){if(c!==we.Off&&b)if(h===ke.Text){let e;c!==we.Verbose&&c!==we.Compact||(t.error&&t.error.data?e=`Error data: ${A(t.error.data)} `:t.result?e=`Result: ${A(t.result)} `:void 0===t.error&&(e=`No result returned. `)),b.log(`Sending response '${r} - (${t.id})'. Processing request took ${Date.now()-i}ms`,e)}else N("send-response",t)}function ne(t){if(c!==we.Off&&b)if(h===ke.Text){let e;c!==we.Verbose&&c!==we.Compact||!t.params||(e=`Params: ${A(t.params)} `),b.log(`Received request '${t.method} - (${t.id})'.`,e)}else N("receive-request",t)}function L(t){if(c!==we.Off&&b&&t.method!==_e.type.method)if(h===ke.Text){let e;c!==we.Verbose&&c!==we.Compact||(e=t.params?`Params: ${A(t.params)} `:`No parameters provided. `),b.log(`Received notification '${t.method}'.`,e)}else N("receive-notification",t)}function ae(r,i){if(c!==we.Off&&b)if(h===ke.Text){let e,t;c!==we.Verbose&&c!==we.Compact||(r.error&&r.error.data?e=`Error data: ${A(r.error.data)} `:r.result?e=`Result: ${A(r.result)} `:void 0===r.error&&(e=`No result returned. `)),i?(t=r.error?` Request failed: ${r.error.message} (${r.error.code}).`:"",b.log(`Received response '${i.method} - (${r.id})' in ${Date.now()-i.timerStart}ms.`+t,e)):b.log(`Received response ${r.id} without active response promise.`,e)}else N("receive-response",r)}function N(e,t){b&&c!==we.Off&&(e={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()},b.log(e))}function I(){if(k())throw new Ne(Se.Closed,"Connection is closed.");if(E())throw new Ne(Se.Disposed,"Connection is disposed.")}function se(){if(w())throw new Ne(Se.AlreadyListening,"Connection is already listening")}function oe(){if(!w())throw new Error("Call listen() first.")}function D(e){return void 0===e?null:e}function le(e){if(null!==e)return e}function ce(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function M(e,t){switch(e){case ye.ParameterStructures.auto:return ce(t)?le(t):[D(t)];case ye.ParameterStructures.byName:if(ce(t))return le(t);throw new Error("Received parameters by name but param is not an object literal.");case ye.ParameterStructures.byPosition:return[D(t)];default:throw new Error("Unknown parameter structure "+e.toString())}}function he(e,t){let r,i=e.numberOfParams;switch(i){case 0:r=void 0;break;case 1:r=M(e.parameterStructures,t[0]);break;default:r=[];for(let e=0;e{I();let a,s;if(me.string(i)){a=i;let e=n[0],t=0,r=ye.ParameterStructures.auto;ye.ParameterStructures.is(e)&&(t=1,r=e);var o=n.length,l=o-t;switch(l){case 0:s=void 0;break;case 1:s=M(r,n[t]);break;default:if(r===ye.ParameterStructures.byName)throw new Error(`Received ${l} parameters for 'by Name' notification parameter structure.`);s=n.slice(t,o).map(e=>D(e))}}else a=i.method,s=he(i,n);return ie(i={jsonrpc:f,method:a,params:s}),p.write(i).catch(e=>{throw g.error("Sending notification failed."),e})},"sendNotification"),onNotification:mt((e,t)=>{I();let r;return me.func(e)?a=e:t&&(me.string(e)?(r=e,s.set(e,{type:void 0,handler:t})):(r=e.method,s.set(e.method,{type:e,handler:t}))),{dispose:mt(()=>{void 0!==r?s.delete(r):a=void 0},"dispose")}},"onNotification"),onProgress:mt((e,t,r)=>{if(i.has(t))throw new Error(`Progress handler for token ${t} already registered`);return i.set(t,r),{dispose:mt(()=>{i.delete(t)},"dispose")}},"onProgress"),sendProgress:mt((e,t,r)=>O.sendNotification(ge.type,{token:t,value:r}),"sendProgress"),onUnhandledProgress:U.event,sendRequest:mt((a,...s)=>{I(),oe();let o,l,c;if(me.string(a)){o=a;let e=s[0],t=s[s.length-1],r=0,i=ye.ParameterStructures.auto,n=(ye.ParameterStructures.is(e)&&(r=1,i=e),s.length);xe.CancellationToken.is(t)&&(--n,c=t);var h=n-r;switch(h){case 0:l=void 0;break;case 1:l=M(i,s[r]);break;default:if(i===ye.ParameterStructures.byName)throw new Error(`Received ${h} parameters for 'by Name' request parameter structure.`);l=s.slice(r,n).map(e=>D(e))}}else{var e=s,a=(o=a.method,l=he(a,e),a.numberOfParams);c=xe.CancellationToken.is(e[a])?e[a]:void 0}let n=$++,u,d=(c&&(u=c.onCancellationRequested(()=>{var e=x.sender.sendCancellation(O,n);return void 0===e?(g.log("Received no promise from cancellation strategy when cancelling id "+n),Promise.resolve()):e.catch(()=>{g.log(`Sending cancellation messages for id ${n} failed`)})})),{jsonrpc:f,id:n,method:o,params:l});return re(d),"function"==typeof x.sender.enableCancellation&&x.sender.enableCancellation(d),new Promise(async(t,r)=>{var e=mt(e=>{t(e),x.sender.cleanup(n),u?.dispose()},"resolveWithCleanup"),i=mt(e=>{r(e),x.sender.cleanup(n),u?.dispose()},"rejectWithCleanup"),e={method:o,timerStart:Date.now(),resolve:e,reject:i};try{await p.write(d),m.set(n,e)}catch(i){throw g.error("Sending request failed."),e.reject(new ye.ResponseError(ye.ErrorCodes.MessageWriteError,i.message||"Unknown reason")),i}})},"sendRequest"),onRequest:mt((e,t)=>{I();let r=null;return Te.is(e)?(r=void 0,u=e):me.string(e)?(r=null,void 0!==t&&(r=e,d.set(e,{handler:t,type:void 0}))):void 0!==t&&(r=e.method,d.set(e.method,{type:e,handler:t})),{dispose:mt(()=>{null!==r&&(void 0!==r?d.delete(r):u=void 0)},"dispose")}},"onRequest"),hasPendingResponse:mt(()=>0{let i=!1,n=ke.Text;void 0!==r&&(me.boolean(r)?i=r:(i=r.sendNotification||!1,n=r.traceFormat||ke.Text)),c=e,h=n,b=c===we.Off?void 0:t,!i||k()||E()||await O.sendNotification(Ee.type,{value:we.toString(e)})},"trace"),onError:t.event,onClose:z.event,onUnhandledNotification:q.event,onDispose:G.event,end:mt(()=>{p.end()},"end"),dispose:mt(()=>{if(!E()){n=Le.Disposed,G.fire(void 0);var e,t=new ye.ResponseError(ye.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(e of m.values())e.reject(t);m=new Map,v=new Map,y=new Set,l=new ve.LinkedMap,me.func(p.dispose)&&p.dispose(),me.func(r.dispose)&&r.dispose()}},"dispose"),listen:mt(()=>{I(),se(),n=Le.Listening,r.listen(Z)},"listen"),inspect:mt(()=>{(0,fe.default)().console.log("inspect")},"inspect")};return O.onNotification(_e.type,e=>{var t;c!==we.Off&&b&&(t=c===we.Verbose||c===we.Compact,b.log(e.message,t?e.verbose:void 0))}),O.onNotification(ge.type,e=>{var t=i.get(e.token);t?t(e.value):U.fire(e)}),O}ue.ConnectionError=Ne,i=l||(ue.ConnectionStrategy=l={}),mt(d,"is"),i.is=d,i=Ce||(ue.IdCancellationReceiverStrategy=Ce={}),mt(p,"is"),i.is=p,i=c||(ue.RequestCancellationReceiverStrategy=c={}),mt(g,"is"),i.is=g,(i=h||(ue.CancellationReceiverStrategy=h={})).Message=Object.freeze({createCancellationTokenSource(e){return new xe.CancellationTokenSource}}),mt(f,"is"),i.is=f,(i=u||(ue.CancellationSenderStrategy=u={})).Message=Object.freeze({sendCancellation(e,t){return e.sendNotification(de.type,{id:t})},cleanup(e){}}),mt(m,"is"),i.is=m,(i=Ae||(ue.CancellationStrategy=Ae={})).Message=Object.freeze({receiver:h.Message,sender:u.Message}),mt(y,"is"),i.is=y,i=Re||(ue.MessageStrategy=Re={}),mt(v,"is"),i.is=v,i=ue.ConnectionOptions={},mt(b,"is"),i.is=b,i=Le={New:1,1:"New",Listening:2,2:"Listening",Closed:3,3:"Closed",Disposed:4,4:"Disposed"},mt(x,"createMessageConnection"),ue.createMessageConnection=x}),iTe=NGe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressType=e.ProgressToken=e.createMessageConnection=e.NullLogger=e.ConnectionOptions=e.ConnectionStrategy=e.AbstractMessageBuffer=e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=e.CancellationToken=e.CancellationTokenSource=e.Emitter=e.Event=e.Disposable=e.LRUCache=e.Touch=e.LinkedMap=e.ParameterStructures=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.ErrorCodes=e.ResponseError=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType0=e.RequestType=e.Message=e.RAL=void 0,e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=void 0;var t=H3e(),r=(Object.defineProperty(e,"Message",{enumerable:!0,get:mt(function(){return t.Message},"get")}),Object.defineProperty(e,"RequestType",{enumerable:!0,get:mt(function(){return t.RequestType},"get")}),Object.defineProperty(e,"RequestType0",{enumerable:!0,get:mt(function(){return t.RequestType0},"get")}),Object.defineProperty(e,"RequestType1",{enumerable:!0,get:mt(function(){return t.RequestType1},"get")}),Object.defineProperty(e,"RequestType2",{enumerable:!0,get:mt(function(){return t.RequestType2},"get")}),Object.defineProperty(e,"RequestType3",{enumerable:!0,get:mt(function(){return t.RequestType3},"get")}),Object.defineProperty(e,"RequestType4",{enumerable:!0,get:mt(function(){return t.RequestType4},"get")}),Object.defineProperty(e,"RequestType5",{enumerable:!0,get:mt(function(){return t.RequestType5},"get")}),Object.defineProperty(e,"RequestType6",{enumerable:!0,get:mt(function(){return t.RequestType6},"get")}),Object.defineProperty(e,"RequestType7",{enumerable:!0,get:mt(function(){return t.RequestType7},"get")}),Object.defineProperty(e,"RequestType8",{enumerable:!0,get:mt(function(){return t.RequestType8},"get")}),Object.defineProperty(e,"RequestType9",{enumerable:!0,get:mt(function(){return t.RequestType9},"get")}),Object.defineProperty(e,"ResponseError",{enumerable:!0,get:mt(function(){return t.ResponseError},"get")}),Object.defineProperty(e,"ErrorCodes",{enumerable:!0,get:mt(function(){return t.ErrorCodes},"get")}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:mt(function(){return t.NotificationType},"get")}),Object.defineProperty(e,"NotificationType0",{enumerable:!0,get:mt(function(){return t.NotificationType0},"get")}),Object.defineProperty(e,"NotificationType1",{enumerable:!0,get:mt(function(){return t.NotificationType1},"get")}),Object.defineProperty(e,"NotificationType2",{enumerable:!0,get:mt(function(){return t.NotificationType2},"get")}),Object.defineProperty(e,"NotificationType3",{enumerable:!0,get:mt(function(){return t.NotificationType3},"get")}),Object.defineProperty(e,"NotificationType4",{enumerable:!0,get:mt(function(){return t.NotificationType4},"get")}),Object.defineProperty(e,"NotificationType5",{enumerable:!0,get:mt(function(){return t.NotificationType5},"get")}),Object.defineProperty(e,"NotificationType6",{enumerable:!0,get:mt(function(){return t.NotificationType6},"get")}),Object.defineProperty(e,"NotificationType7",{enumerable:!0,get:mt(function(){return t.NotificationType7},"get")}),Object.defineProperty(e,"NotificationType8",{enumerable:!0,get:mt(function(){return t.NotificationType8},"get")}),Object.defineProperty(e,"NotificationType9",{enumerable:!0,get:mt(function(){return t.NotificationType9},"get")}),Object.defineProperty(e,"ParameterStructures",{enumerable:!0,get:mt(function(){return t.ParameterStructures},"get")}),X3e()),i=(Object.defineProperty(e,"LinkedMap",{enumerable:!0,get:mt(function(){return r.LinkedMap},"get")}),Object.defineProperty(e,"LRUCache",{enumerable:!0,get:mt(function(){return r.LRUCache},"get")}),Object.defineProperty(e,"Touch",{enumerable:!0,get:mt(function(){return r.Touch},"get")}),K3e()),n=(Object.defineProperty(e,"Disposable",{enumerable:!0,get:mt(function(){return i.Disposable},"get")}),d5e()),a=(Object.defineProperty(e,"Event",{enumerable:!0,get:mt(function(){return n.Event},"get")}),Object.defineProperty(e,"Emitter",{enumerable:!0,get:mt(function(){return n.Emitter},"get")}),p5e()),s=(Object.defineProperty(e,"CancellationTokenSource",{enumerable:!0,get:mt(function(){return a.CancellationTokenSource},"get")}),Object.defineProperty(e,"CancellationToken",{enumerable:!0,get:mt(function(){return a.CancellationToken},"get")}),Z3e()),o=(Object.defineProperty(e,"SharedArraySenderStrategy",{enumerable:!0,get:mt(function(){return s.SharedArraySenderStrategy},"get")}),Object.defineProperty(e,"SharedArrayReceiverStrategy",{enumerable:!0,get:mt(function(){return s.SharedArrayReceiverStrategy},"get")}),J3e()),l=(Object.defineProperty(e,"MessageReader",{enumerable:!0,get:mt(function(){return o.MessageReader},"get")}),Object.defineProperty(e,"AbstractMessageReader",{enumerable:!0,get:mt(function(){return o.AbstractMessageReader},"get")}),Object.defineProperty(e,"ReadableStreamMessageReader",{enumerable:!0,get:mt(function(){return o.ReadableStreamMessageReader},"get")}),eTe()),c=(Object.defineProperty(e,"MessageWriter",{enumerable:!0,get:mt(function(){return l.MessageWriter},"get")}),Object.defineProperty(e,"AbstractMessageWriter",{enumerable:!0,get:mt(function(){return l.AbstractMessageWriter},"get")}),Object.defineProperty(e,"WriteableStreamMessageWriter",{enumerable:!0,get:mt(function(){return l.WriteableStreamMessageWriter},"get")}),tTe()),h=(Object.defineProperty(e,"AbstractMessageBuffer",{enumerable:!0,get:mt(function(){return c.AbstractMessageBuffer},"get")}),rTe()),u=(Object.defineProperty(e,"ConnectionStrategy",{enumerable:!0,get:mt(function(){return h.ConnectionStrategy},"get")}),Object.defineProperty(e,"ConnectionOptions",{enumerable:!0,get:mt(function(){return h.ConnectionOptions},"get")}),Object.defineProperty(e,"NullLogger",{enumerable:!0,get:mt(function(){return h.NullLogger},"get")}),Object.defineProperty(e,"createMessageConnection",{enumerable:!0,get:mt(function(){return h.createMessageConnection},"get")}),Object.defineProperty(e,"ProgressToken",{enumerable:!0,get:mt(function(){return h.ProgressToken},"get")}),Object.defineProperty(e,"ProgressType",{enumerable:!0,get:mt(function(){return h.ProgressType},"get")}),Object.defineProperty(e,"Trace",{enumerable:!0,get:mt(function(){return h.Trace},"get")}),Object.defineProperty(e,"TraceValues",{enumerable:!0,get:mt(function(){return h.TraceValues},"get")}),Object.defineProperty(e,"TraceFormat",{enumerable:!0,get:mt(function(){return h.TraceFormat},"get")}),Object.defineProperty(e,"SetTraceNotification",{enumerable:!0,get:mt(function(){return h.SetTraceNotification},"get")}),Object.defineProperty(e,"LogTraceNotification",{enumerable:!0,get:mt(function(){return h.LogTraceNotification},"get")}),Object.defineProperty(e,"ConnectionErrors",{enumerable:!0,get:mt(function(){return h.ConnectionErrors},"get")}),Object.defineProperty(e,"ConnectionError",{enumerable:!0,get:mt(function(){return h.ConnectionError},"get")}),Object.defineProperty(e,"CancellationReceiverStrategy",{enumerable:!0,get:mt(function(){return h.CancellationReceiverStrategy},"get")}),Object.defineProperty(e,"CancellationSenderStrategy",{enumerable:!0,get:mt(function(){return h.CancellationSenderStrategy},"get")}),Object.defineProperty(e,"CancellationStrategy",{enumerable:!0,get:mt(function(){return h.CancellationStrategy},"get")}),Object.defineProperty(e,"MessageStrategy",{enumerable:!0,get:mt(function(){return h.MessageStrategy},"get")}),h5e());e.RAL=u.default}),nTe=NGe(e=>{Object.defineProperty(e,"__esModule",{value:!0});var t,r=iTe(),i=class h extends r.AbstractMessageBuffer{static{mt(this,"MessageBuffer")}constructor(e="utf-8"){super(e),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return h.emptyBuffer}fromString(e,t){return(new TextEncoder).encode(e)}toString(e,t){return("ascii"===t?this.asciiDecoder:new TextDecoder(t)).decode(e)}asNative(e,t){return void 0===t?e:e.slice(0,t)}allocNative(e){return new Uint8Array(e)}},n=(i.emptyBuffer=new Uint8Array(0),class{static{mt(this,"ReadableStreamWrapper")}constructor(e){this.socket=e,this._onData=new r.Emitter,this._messageListener=e=>{e.data.arrayBuffer().then(e=>{this._onData.fire(new Uint8Array(e))},()=>{(0,r.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(e){return this.socket.addEventListener("close",e),r.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),r.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),r.Disposable.create(()=>this.socket.removeEventListener("end",e))}onData(e){return this._onData.event(e)}}),a=class{static{mt(this,"WritableStreamWrapper")}constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener("close",e),r.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),r.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),r.Disposable.create(()=>this.socket.removeEventListener("end",e))}write(e,t){if("string"==typeof e&&void 0!==t&&"utf-8"!==t)throw new Error("In a Browser environments only utf-8 text encoding is supported. But got encoding: "+t);return this.socket.send(e),Promise.resolve()}end(){this.socket.close()}},s=new TextEncoder,o=Object.freeze({messageBuffer:Object.freeze({create:mt(e=>new i(e),"create")}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:mt((e,t)=>{if("utf-8"!==t.charset)throw new Error("In a Browser environments only utf-8 text encoding is supported. But got encoding: "+t.charset);return Promise.resolve(s.encode(JSON.stringify(e,void 0,0)))},"encode")}),decoder:Object.freeze({name:"application/json",decode:mt((e,t)=>{if(e instanceof Uint8Array)return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)));throw new Error("In a Browser environments only Uint8Arrays are supported.")},"decode")})}),stream:Object.freeze({asReadableStream:mt(e=>new n(e),"asReadableStream"),asWritableStream:mt(e=>new a(e),"asWritableStream")}),console:console,timer:Object.freeze({setTimeout(e,t,...r){let i=setTimeout(e,t,...r);return{dispose:mt(()=>clearTimeout(i),"dispose")}},setImmediate(e,...t){let r=setTimeout(e,0,...t);return{dispose:mt(()=>clearTimeout(r),"dispose")}},setInterval(e,t,...r){let i=setInterval(e,t,...r);return{dispose:mt(()=>clearInterval(i),"dispose")}}})});function l(){return o}function c(){r.RAL.install(o)}mt(l,"RIL"),t=l,mt(c,"install"),t.install=c,e.default=l}),aTe=NGe(e=>{var i=e&&e.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&("get"in n?t.__esModule:!n.writable&&!n.configurable)||(n={enumerable:!0,get:mt(function(){return t[r]},"get")}),Object.defineProperty(e,i,n)}:function(e,t,r,i){e[i=void 0===i?r:i]=t[r]}),t=e&&e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)},n=(Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.BrowserMessageWriter=e.BrowserMessageReader=void 0,nTe().default.install(),iTe()),t=(t(iTe(),e),class extends n.AbstractMessageReader{static{mt(this,"BrowserMessageReader")}constructor(e){super(),this._onData=new n.Emitter,this._messageListener=e=>{this._onData.fire(e.data)},e.addEventListener("error",e=>this.fireError(e)),e.onmessage=this._messageListener}listen(e){return this._onData.event(e)}}),t=(e.BrowserMessageReader=t,class extends n.AbstractMessageWriter{static{mt(this,"BrowserMessageWriter")}constructor(e){super(),this.port=e,this.errorCount=0,e.addEventListener("error",e=>this.fireError(e))}write(t){try{return this.port.postMessage(t),Promise.resolve()}catch(e){return this.handleError(e,t),Promise.reject(e)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}});function r(e,t,r,i){return void 0===r&&(r=n.NullLogger),n.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,n.createMessageConnection)(e,t,r,i)}e.BrowserMessageWriter=t,mt(r,"createMessageConnection"),e.createMessageConnection=r}),sTe=NGe((e,t)=>{t.exports=aTe()}),oTe=NGe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ProtocolNotificationType=e.ProtocolNotificationType0=e.ProtocolRequestType=e.ProtocolRequestType0=e.RegistrationType=e.MessageDirection=void 0;var t=aTe(),r=(e.MessageDirection={clientToServer:"clientToServer",serverToClient:"serverToClient",both:"both"},class{static{mt(this,"RegistrationType")}constructor(e){this.method=e}}),r=(e.RegistrationType=r,class extends t.RequestType0{static{mt(this,"ProtocolRequestType0")}constructor(e){super(e)}}),r=(e.ProtocolRequestType0=r,class extends t.RequestType{static{mt(this,"ProtocolRequestType")}constructor(e){super(e,t.ParameterStructures.byName)}}),r=(e.ProtocolRequestType=r,class extends t.NotificationType0{static{mt(this,"ProtocolNotificationType0")}constructor(e){super(e)}}),r=(e.ProtocolNotificationType0=r,class extends t.NotificationType{static{mt(this,"ProtocolNotificationType")}constructor(e){super(e,t.ParameterStructures.byName)}});e.ProtocolNotificationType=r}),lTe=NGe(e=>{function t(e){return!0===e||!1===e}function r(e){return"string"==typeof e||e instanceof String}function i(e){return"number"==typeof e||e instanceof Number}function n(e){return e instanceof Error}function a(e){return"function"==typeof e}function s(e){return Array.isArray(e)}function o(e){return s(e)&&e.every(e=>r(e))}function l(e,t){return Array.isArray(e)&&e.every(t)}function c(e){return null!==e&&"object"==typeof e}Object.defineProperty(e,"__esModule",{value:!0}),e.objectLiteral=e.typedArray=e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0,mt(t,"boolean"),e.boolean=t,mt(r,"string"),e.string=r,mt(i,"number"),e.number=i,mt(n,"error"),e.error=n,mt(a,"func"),e.func=a,mt(s,"array"),e.array=s,mt(o,"stringArray"),e.stringArray=o,mt(l,"typedArray"),e.typedArray=l,mt(c,"objectLiteral"),e.objectLiteral=c}),cTe=NGe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ImplementationRequest=void 0;var t=oTe();(e=e.ImplementationRequest={method:"textDocument/implementation"}).messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)}),hTe=NGe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TypeDefinitionRequest=void 0;var t=oTe();(e=e.TypeDefinitionRequest={method:"textDocument/typeDefinition"}).messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)}),uTe=NGe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=void 0;var t,r=oTe();(t=e.WorkspaceFoldersRequest={method:"workspace/workspaceFolders"}).messageDirection=r.MessageDirection.serverToClient,t.type=new r.ProtocolRequestType0(t.method),(t=e.DidChangeWorkspaceFoldersNotification={method:"workspace/didChangeWorkspaceFolders"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolNotificationType(t.method)}),dTe=NGe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationRequest=void 0;var t=oTe();(e=e.ConfigurationRequest={method:"workspace/configuration"}).messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)}),pTe=NGe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPresentationRequest=e.DocumentColorRequest=void 0;var t,r=oTe();(t=e.DocumentColorRequest={method:"textDocument/documentColor"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),(t=e.ColorPresentationRequest={method:"textDocument/colorPresentation"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}),gTe=NGe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=void 0;var t,r=oTe();(t=e.FoldingRangeRequest={method:"textDocument/foldingRange"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),(t=e.FoldingRangeRefreshRequest={method:"workspace/foldingRange/refresh"}).messageDirection=r.MessageDirection.serverToClient,t.type=new r.ProtocolRequestType0(t.method)}),fTe=NGe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DeclarationRequest=void 0;var t=oTe();(e=e.DeclarationRequest={method:"textDocument/declaration"}).messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)}),mTe=NGe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionRangeRequest=void 0;var t=oTe();(e=e.SelectionRangeRequest={method:"textDocument/selectionRange"}).messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)}),yTe=NGe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=void 0;var t,r=aTe(),i=oTe();function n(e){return e===t.type}(t=e.WorkDoneProgress={}).type=new r.ProgressType,mt(n,"is"),t.is=n,(r=e.WorkDoneProgressCreateRequest={method:"window/workDoneProgress/create"}).messageDirection=i.MessageDirection.serverToClient,r.type=new i.ProtocolRequestType(r.method),(r=e.WorkDoneProgressCancelNotification={method:"window/workDoneProgress/cancel"}).messageDirection=i.MessageDirection.clientToServer,r.type=new i.ProtocolNotificationType(r.method)}),vTe=NGe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.CallHierarchyPrepareRequest=void 0;var t,r=oTe();(t=e.CallHierarchyPrepareRequest={method:"textDocument/prepareCallHierarchy"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),(t=e.CallHierarchyIncomingCallsRequest={method:"callHierarchy/incomingCalls"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),(t=e.CallHierarchyOutgoingCallsRequest={method:"callHierarchy/outgoingCalls"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}),bTe=NGe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.SemanticTokensRegistrationType=e.TokenFormat=void 0;var t,r,i=oTe();(e.TokenFormat={}).Relative="relative",(r=t||(e.SemanticTokensRegistrationType=t={})).method="textDocument/semanticTokens",r.type=new i.RegistrationType(r.method),(r=e.SemanticTokensRequest={method:"textDocument/semanticTokens/full"}).messageDirection=i.MessageDirection.clientToServer,r.type=new i.ProtocolRequestType(r.method),r.registrationMethod=t.method,(r=e.SemanticTokensDeltaRequest={method:"textDocument/semanticTokens/full/delta"}).messageDirection=i.MessageDirection.clientToServer,r.type=new i.ProtocolRequestType(r.method),r.registrationMethod=t.method,(r=e.SemanticTokensRangeRequest={method:"textDocument/semanticTokens/range"}).messageDirection=i.MessageDirection.clientToServer,r.type=new i.ProtocolRequestType(r.method),r.registrationMethod=t.method,(r=e.SemanticTokensRefreshRequest={method:"workspace/semanticTokens/refresh"}).messageDirection=i.MessageDirection.serverToClient,r.type=new i.ProtocolRequestType0(r.method)}),xTe=NGe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ShowDocumentRequest=void 0;var t=oTe();(e=e.ShowDocumentRequest={method:"window/showDocument"}).messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)}),TTe=NGe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedEditingRangeRequest=void 0;var t=oTe();(e=e.LinkedEditingRangeRequest={method:"textDocument/linkedEditingRange"}).messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)}),wTe=NGe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.DidRenameFilesNotification=e.WillRenameFilesRequest=e.DidCreateFilesNotification=e.WillCreateFilesRequest=e.FileOperationPatternKind=void 0;var t,r=oTe();e.FileOperationPatternKind={file:"file",folder:"folder"},(t=e.WillCreateFilesRequest={method:"workspace/willCreateFiles"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),(t=e.DidCreateFilesNotification={method:"workspace/didCreateFiles"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolNotificationType(t.method),(t=e.WillRenameFilesRequest={method:"workspace/willRenameFiles"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),(t=e.DidRenameFilesNotification={method:"workspace/didRenameFiles"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolNotificationType(t.method),(t=e.DidDeleteFilesNotification={method:"workspace/didDeleteFiles"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolNotificationType(t.method),(t=e.WillDeleteFilesRequest={method:"workspace/willDeleteFiles"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}),kTe=NGe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=void 0;var t=oTe();e.UniquenessLevel={document:"document",project:"project",group:"group",scheme:"scheme",global:"global"},e.MonikerKind={$import:"import",$export:"export",local:"local"},(e=e.MonikerRequest={method:"textDocument/moniker"}).messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)}),ETe=NGe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchySubtypesRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchyPrepareRequest=void 0;var t,r=oTe();(t=e.TypeHierarchyPrepareRequest={method:"textDocument/prepareTypeHierarchy"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),(t=e.TypeHierarchySupertypesRequest={method:"typeHierarchy/supertypes"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),(t=e.TypeHierarchySubtypesRequest={method:"typeHierarchy/subtypes"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method)}),_Te=NGe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.InlineValueRefreshRequest=e.InlineValueRequest=void 0;var t,r=oTe();(t=e.InlineValueRequest={method:"textDocument/inlineValue"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),(t=e.InlineValueRefreshRequest={method:"workspace/inlineValue/refresh"}).messageDirection=r.MessageDirection.serverToClient,t.type=new r.ProtocolRequestType0(t.method)}),STe=NGe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=void 0;var t,r=oTe();(t=e.InlayHintRequest={method:"textDocument/inlayHint"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),(t=e.InlayHintResolveRequest={method:"inlayHint/resolve"}).messageDirection=r.MessageDirection.clientToServer,t.type=new r.ProtocolRequestType(t.method),(t=e.InlayHintRefreshRequest={method:"workspace/inlayHint/refresh"}).messageDirection=r.MessageDirection.serverToClient,t.type=new r.ProtocolRequestType0(t.method)}),CTe=NGe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=void 0;var t,r=aTe(),i=lTe(),n=oTe();function a(e){return e&&i.boolean(e.retriggerRequest)}t=e.DiagnosticServerCancellationData={},mt(a,"is"),t.is=a,e.DocumentDiagnosticReportKind={Full:"full",Unchanged:"unchanged"},(t=e.DocumentDiagnosticRequest={method:"textDocument/diagnostic"}).messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method),t.partialResult=new r.ProgressType,(t=e.WorkspaceDiagnosticRequest={method:"workspace/diagnostic"}).messageDirection=n.MessageDirection.clientToServer,t.type=new n.ProtocolRequestType(t.method),t.partialResult=new r.ProgressType,(t=e.DiagnosticRefreshRequest={method:"workspace/diagnostic/refresh"}).messageDirection=n.MessageDirection.serverToClient,t.type=new n.ProtocolRequestType0(t.method)}),ATe=NGe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DidCloseNotebookDocumentNotification=e.DidSaveNotebookDocumentNotification=e.DidChangeNotebookDocumentNotification=e.NotebookCellArrayChange=e.DidOpenNotebookDocumentNotification=e.NotebookDocumentSyncRegistrationType=e.NotebookDocument=e.NotebookCell=e.ExecutionSummary=e.NotebookCellKind=void 0,T4e();var t,i,r,n,a,s=j(Bbe),o=lTe(),l=oTe();function c(e){return 1===e||2===e}function h(e,t){return e={executionOrder:e},!0!==t&&!1!==t||(e.success=t),e}function u(e){return o.objectLiteral(e)&&s.uinteger.is(e.executionOrder)&&(void 0===e.success||o.boolean(e.success))}function d(e,t){return e===t||null!=e&&null!=t&&e.executionOrder===t.executionOrder&&e.success===t.success}function p(e,t){return{kind:e,document:t}}function g(e){return o.objectLiteral(e)&&t.is(e.kind)&&s.DocumentUri.is(e.document)&&(void 0===e.metadata||o.objectLiteral(e.metadata))}function f(e,t){var r=new Set;return e.document!==t.document&&r.add("document"),e.kind!==t.kind&&r.add("kind"),e.executionSummary!==t.executionSummary&&r.add("executionSummary"),void 0===e.metadata&&void 0===t.metadata||m(e.metadata,t.metadata)||r.add("metadata"),void 0===e.executionSummary&&void 0===t.executionSummary||i.equals(e.executionSummary,t.executionSummary)||r.add("executionSummary"),r}function m(t,r){if(t!==r){if(null==t||null==r||typeof t!=typeof r||"object"!=typeof t)return!1;var e=Array.isArray(t),i=Array.isArray(r);if(e!==i)return!1;if(e&&i){if(t.length!==r.length)return!1;for(let e=0;e{Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionRequest=void 0;var t=oTe();(e=e.InlineCompletionRequest={method:"textDocument/inlineCompletion"}).messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)}),LTe=NGe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceSymbolRequest=e.CodeActionResolveRequest=e.CodeActionRequest=e.DocumentSymbolRequest=e.DocumentHighlightRequest=e.ReferencesRequest=e.DefinitionRequest=e.SignatureHelpRequest=e.SignatureHelpTriggerKind=e.HoverRequest=e.CompletionResolveRequest=e.CompletionRequest=e.CompletionTriggerKind=e.PublishDiagnosticsNotification=e.WatchKind=e.RelativePattern=e.FileChangeType=e.DidChangeWatchedFilesNotification=e.WillSaveTextDocumentWaitUntilRequest=e.WillSaveTextDocumentNotification=e.TextDocumentSaveReason=e.DidSaveTextDocumentNotification=e.DidCloseTextDocumentNotification=e.DidChangeTextDocumentNotification=e.TextDocumentContentChangeEvent=e.DidOpenTextDocumentNotification=e.TextDocumentSyncKind=e.TelemetryEventNotification=e.LogMessageNotification=e.ShowMessageRequest=e.ShowMessageNotification=e.MessageType=e.DidChangeConfigurationNotification=e.ExitNotification=e.ShutdownRequest=e.InitializedNotification=e.InitializeErrorCodes=e.InitializeRequest=e.WorkDoneProgressOptions=e.TextDocumentRegistrationOptions=e.StaticRegistrationOptions=e.PositionEncodingKind=e.FailureHandlingKind=e.ResourceOperationKind=e.UnregistrationRequest=e.RegistrationRequest=e.DocumentSelector=e.NotebookCellTextDocumentFilter=e.NotebookDocumentFilter=e.TextDocumentFilter=void 0,e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.WillRenameFilesRequest=e.DidRenameFilesNotification=e.WillCreateFilesRequest=e.DidCreateFilesNotification=e.FileOperationPatternKind=e.LinkedEditingRangeRequest=e.ShowDocumentRequest=e.SemanticTokensRegistrationType=e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.TokenFormat=e.CallHierarchyPrepareRequest=e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=e.SelectionRangeRequest=e.DeclarationRequest=e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=e.ColorPresentationRequest=e.DocumentColorRequest=e.ConfigurationRequest=e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=e.TypeDefinitionRequest=e.ImplementationRequest=e.ApplyWorkspaceEditRequest=e.ExecuteCommandRequest=e.PrepareRenameRequest=e.RenameRequest=e.PrepareSupportDefaultBehavior=e.DocumentOnTypeFormattingRequest=e.DocumentRangesFormattingRequest=e.DocumentRangeFormattingRequest=e.DocumentFormattingRequest=e.DocumentLinkResolveRequest=e.DocumentLinkRequest=e.CodeLensRefreshRequest=e.CodeLensResolveRequest=e.CodeLensRequest=e.WorkspaceSymbolResolveRequest=void 0,e.InlineCompletionRequest=e.DidCloseNotebookDocumentNotification=e.DidSaveNotebookDocumentNotification=e.DidChangeNotebookDocumentNotification=e.NotebookCellArrayChange=e.DidOpenNotebookDocumentNotification=e.NotebookDocumentSyncRegistrationType=e.NotebookDocument=e.NotebookCell=e.ExecutionSummary=e.NotebookCellKind=e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=e.InlineValueRefreshRequest=e.InlineValueRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchySubtypesRequest=e.TypeHierarchyPrepareRequest=void 0;var r,t,i,n,a,s=oTe(),o=(T4e(),j(Bbe)),l=lTe(),c=cTe(),h=(Object.defineProperty(e,"ImplementationRequest",{enumerable:!0,get:mt(function(){return c.ImplementationRequest},"get")}),hTe()),u=(Object.defineProperty(e,"TypeDefinitionRequest",{enumerable:!0,get:mt(function(){return h.TypeDefinitionRequest},"get")}),uTe()),d=(Object.defineProperty(e,"WorkspaceFoldersRequest",{enumerable:!0,get:mt(function(){return u.WorkspaceFoldersRequest},"get")}),Object.defineProperty(e,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:mt(function(){return u.DidChangeWorkspaceFoldersNotification},"get")}),dTe()),p=(Object.defineProperty(e,"ConfigurationRequest",{enumerable:!0,get:mt(function(){return d.ConfigurationRequest},"get")}),pTe()),g=(Object.defineProperty(e,"DocumentColorRequest",{enumerable:!0,get:mt(function(){return p.DocumentColorRequest},"get")}),Object.defineProperty(e,"ColorPresentationRequest",{enumerable:!0,get:mt(function(){return p.ColorPresentationRequest},"get")}),gTe()),P=(Object.defineProperty(e,"FoldingRangeRequest",{enumerable:!0,get:mt(function(){return g.FoldingRangeRequest},"get")}),Object.defineProperty(e,"FoldingRangeRefreshRequest",{enumerable:!0,get:mt(function(){return g.FoldingRangeRefreshRequest},"get")}),fTe()),$=(Object.defineProperty(e,"DeclarationRequest",{enumerable:!0,get:mt(function(){return P.DeclarationRequest},"get")}),mTe()),f=(Object.defineProperty(e,"SelectionRangeRequest",{enumerable:!0,get:mt(function(){return $.SelectionRangeRequest},"get")}),yTe()),m=(Object.defineProperty(e,"WorkDoneProgress",{enumerable:!0,get:mt(function(){return f.WorkDoneProgress},"get")}),Object.defineProperty(e,"WorkDoneProgressCreateRequest",{enumerable:!0,get:mt(function(){return f.WorkDoneProgressCreateRequest},"get")}),Object.defineProperty(e,"WorkDoneProgressCancelNotification",{enumerable:!0,get:mt(function(){return f.WorkDoneProgressCancelNotification},"get")}),vTe()),y=(Object.defineProperty(e,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:mt(function(){return m.CallHierarchyIncomingCallsRequest},"get")}),Object.defineProperty(e,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:mt(function(){return m.CallHierarchyOutgoingCallsRequest},"get")}),Object.defineProperty(e,"CallHierarchyPrepareRequest",{enumerable:!0,get:mt(function(){return m.CallHierarchyPrepareRequest},"get")}),bTe()),B=(Object.defineProperty(e,"TokenFormat",{enumerable:!0,get:mt(function(){return y.TokenFormat},"get")}),Object.defineProperty(e,"SemanticTokensRequest",{enumerable:!0,get:mt(function(){return y.SemanticTokensRequest},"get")}),Object.defineProperty(e,"SemanticTokensDeltaRequest",{enumerable:!0,get:mt(function(){return y.SemanticTokensDeltaRequest},"get")}),Object.defineProperty(e,"SemanticTokensRangeRequest",{enumerable:!0,get:mt(function(){return y.SemanticTokensRangeRequest},"get")}),Object.defineProperty(e,"SemanticTokensRefreshRequest",{enumerable:!0,get:mt(function(){return y.SemanticTokensRefreshRequest},"get")}),Object.defineProperty(e,"SemanticTokensRegistrationType",{enumerable:!0,get:mt(function(){return y.SemanticTokensRegistrationType},"get")}),xTe()),F=(Object.defineProperty(e,"ShowDocumentRequest",{enumerable:!0,get:mt(function(){return B.ShowDocumentRequest},"get")}),TTe()),v=(Object.defineProperty(e,"LinkedEditingRangeRequest",{enumerable:!0,get:mt(function(){return F.LinkedEditingRangeRequest},"get")}),wTe()),b=(Object.defineProperty(e,"FileOperationPatternKind",{enumerable:!0,get:mt(function(){return v.FileOperationPatternKind},"get")}),Object.defineProperty(e,"DidCreateFilesNotification",{enumerable:!0,get:mt(function(){return v.DidCreateFilesNotification},"get")}),Object.defineProperty(e,"WillCreateFilesRequest",{enumerable:!0,get:mt(function(){return v.WillCreateFilesRequest},"get")}),Object.defineProperty(e,"DidRenameFilesNotification",{enumerable:!0,get:mt(function(){return v.DidRenameFilesNotification},"get")}),Object.defineProperty(e,"WillRenameFilesRequest",{enumerable:!0,get:mt(function(){return v.WillRenameFilesRequest},"get")}),Object.defineProperty(e,"DidDeleteFilesNotification",{enumerable:!0,get:mt(function(){return v.DidDeleteFilesNotification},"get")}),Object.defineProperty(e,"WillDeleteFilesRequest",{enumerable:!0,get:mt(function(){return v.WillDeleteFilesRequest},"get")}),kTe()),x=(Object.defineProperty(e,"UniquenessLevel",{enumerable:!0,get:mt(function(){return b.UniquenessLevel},"get")}),Object.defineProperty(e,"MonikerKind",{enumerable:!0,get:mt(function(){return b.MonikerKind},"get")}),Object.defineProperty(e,"MonikerRequest",{enumerable:!0,get:mt(function(){return b.MonikerRequest},"get")}),ETe()),T=(Object.defineProperty(e,"TypeHierarchyPrepareRequest",{enumerable:!0,get:mt(function(){return x.TypeHierarchyPrepareRequest},"get")}),Object.defineProperty(e,"TypeHierarchySubtypesRequest",{enumerable:!0,get:mt(function(){return x.TypeHierarchySubtypesRequest},"get")}),Object.defineProperty(e,"TypeHierarchySupertypesRequest",{enumerable:!0,get:mt(function(){return x.TypeHierarchySupertypesRequest},"get")}),_Te()),w=(Object.defineProperty(e,"InlineValueRequest",{enumerable:!0,get:mt(function(){return T.InlineValueRequest},"get")}),Object.defineProperty(e,"InlineValueRefreshRequest",{enumerable:!0,get:mt(function(){return T.InlineValueRefreshRequest},"get")}),STe()),k=(Object.defineProperty(e,"InlayHintRequest",{enumerable:!0,get:mt(function(){return w.InlayHintRequest},"get")}),Object.defineProperty(e,"InlayHintResolveRequest",{enumerable:!0,get:mt(function(){return w.InlayHintResolveRequest},"get")}),Object.defineProperty(e,"InlayHintRefreshRequest",{enumerable:!0,get:mt(function(){return w.InlayHintRefreshRequest},"get")}),CTe()),E=(Object.defineProperty(e,"DiagnosticServerCancellationData",{enumerable:!0,get:mt(function(){return k.DiagnosticServerCancellationData},"get")}),Object.defineProperty(e,"DocumentDiagnosticReportKind",{enumerable:!0,get:mt(function(){return k.DocumentDiagnosticReportKind},"get")}),Object.defineProperty(e,"DocumentDiagnosticRequest",{enumerable:!0,get:mt(function(){return k.DocumentDiagnosticRequest},"get")}),Object.defineProperty(e,"WorkspaceDiagnosticRequest",{enumerable:!0,get:mt(function(){return k.WorkspaceDiagnosticRequest},"get")}),Object.defineProperty(e,"DiagnosticRefreshRequest",{enumerable:!0,get:mt(function(){return k.DiagnosticRefreshRequest},"get")}),ATe()),z=(Object.defineProperty(e,"NotebookCellKind",{enumerable:!0,get:mt(function(){return E.NotebookCellKind},"get")}),Object.defineProperty(e,"ExecutionSummary",{enumerable:!0,get:mt(function(){return E.ExecutionSummary},"get")}),Object.defineProperty(e,"NotebookCell",{enumerable:!0,get:mt(function(){return E.NotebookCell},"get")}),Object.defineProperty(e,"NotebookDocument",{enumerable:!0,get:mt(function(){return E.NotebookDocument},"get")}),Object.defineProperty(e,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:mt(function(){return E.NotebookDocumentSyncRegistrationType},"get")}),Object.defineProperty(e,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:mt(function(){return E.DidOpenNotebookDocumentNotification},"get")}),Object.defineProperty(e,"NotebookCellArrayChange",{enumerable:!0,get:mt(function(){return E.NotebookCellArrayChange},"get")}),Object.defineProperty(e,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:mt(function(){return E.DidChangeNotebookDocumentNotification},"get")}),Object.defineProperty(e,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:mt(function(){return E.DidSaveNotebookDocumentNotification},"get")}),Object.defineProperty(e,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:mt(function(){return E.DidCloseNotebookDocumentNotification},"get")}),RTe());function _(e){return l.string(e)||l.string(e.language)||l.string(e.scheme)||l.string(e.pattern)}function S(e){return l.objectLiteral(e)&&(l.string(e.notebookType)||l.string(e.scheme)||l.string(e.pattern))}function C(e){return l.objectLiteral(e)&&(l.string(e.notebook)||t.is(e.notebook))&&(void 0===e.language||l.string(e.language))}function A(e){if(!Array.isArray(e))return!1;for(var t of e)if(!l.string(t)&&!r.is(t)&&!i.is(t))return!1;return!0}function R(e){return e&&l.string(e.id)&&0{Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var n=aTe();function t(e,t,r,i){return n.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,n.createMessageConnection)(e,t,r,i)}mt(t,"createProtocolConnection"),e.createProtocolConnection=t}),ITe=NGe(e=>{var i=e&&e.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&("get"in n?t.__esModule:!n.writable&&!n.configurable)||(n={enumerable:!0,get:mt(function(){return t[r]},"get")}),Object.defineProperty(e,i,n)}:function(e,t,r,i){e[i=void 0===i?r:i]=t[r]}),t=e&&e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)},r=(Object.defineProperty(e,"__esModule",{value:!0}),e.LSPErrorCodes=e.createProtocolConnection=void 0,t(aTe(),e),t((T4e(),j(Bbe)),e),t(oTe(),e),t(LTe(),e),NTe());Object.defineProperty(e,"createProtocolConnection",{enumerable:!0,get:mt(function(){return r.createProtocolConnection},"get")}),e.LSPErrorCodes={lspReservedErrorRangeStart:-32899,RequestFailed:-32803,ServerCancelled:-32802,ContentModified:-32801,RequestCancelled:-32800,lspReservedErrorRangeEnd:-32800}}),DTe=NGe(e=>{var i=e&&e.__createBinding||(Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&("get"in n?t.__esModule:!n.writable&&!n.configurable)||(n={enumerable:!0,get:mt(function(){return t[r]},"get")}),Object.defineProperty(e,i,n)}:function(e,t,r,i){e[i=void 0===i?r:i]=t[r]}),t=e&&e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||i(t,e,r)},n=(Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0,sTe());function r(e,t,r,i){return(0,n.createMessageConnection)(e,t,r,i)}t(sTe(),e),t(ITe(),e),mt(r,"createProtocolConnection"),e.createProtocolConnection=r}),MTe=s(()=>{function e(e){return{dispose:mt(async()=>e(),"dispose")}}var t=$3e=$3e||{};mt(e,"create"),t.create=e}),OTe=s(()=>{B3e=G(DTe(),1),f5e(),MTe(),d3e(),_5e(),Que(),W5e(),Y5e(),F3e=class{static{mt(this,"DefaultDocumentBuilder")}constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new Z5e,this.documentPhaseListeners=new Z5e,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=B5e.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.fileSystemProvider=e.workspace.FileSystemProvider,this.workspaceManager=()=>e.workspace.WorkspaceManager,this.serviceRegistry=e.ServiceRegistry}async build(e,t={},r=g5e.CancellationToken.None){for(var i of e){var n,a=i.uri.toString();i.state===B5e.Validated?"boolean"==typeof t.validation&&t.validation?this.resetToState(i,B5e.IndexedReferences):"object"==typeof t.validation&&0<(n=this.findMissingValidationCategories(i,t)).length&&(this.buildState.set(a,{completed:!1,options:{validation:{categories:n}},result:this.buildState.get(a)?.result}),i.state=B5e.IndexedReferences):this.buildState.delete(a)}this.currentState=B5e.Changed,await this.emitUpdate(e.map(e=>e.uri),[]),await this.buildDocuments(e,t,r)}async update(e,t,r=g5e.CancellationToken.None){this.currentState=B5e.Changed;var i,n,a,s=[];for(i of t)for(n of this.langiumDocuments.deleteDocuments(i))s.push(n.uri),this.cleanUpDeleted(n);for(a of t=(await Promise.all(e.map(e=>this.findChangedUris(e)))).flat()){let e=this.langiumDocuments.getDocument(a);void 0===e&&((e=this.langiumDocumentFactory.fromModel({$type:"INVALID"},a)).state=B5e.Changed,this.langiumDocuments.addDocument(e)),this.resetToState(e,B5e.Changed)}let o=Yue(t).concat(s).map(e=>e.toString()).toSet();this.langiumDocuments.all.filter(e=>!o.has(e.uri.toString())&&this.shouldRelink(e,o)).forEach(e=>this.resetToState(e,B5e.ComputedScopes)),await this.emitUpdate(t,s),await x5e(r),e=this.sortDocuments(this.langiumDocuments.all.filter(e=>e.state!n.has(e)).toArray()}async findChangedUris(e){if(this.langiumDocuments.getDocument(e)??this.textDocuments?.get(e))return[e];try{var t=await this.fileSystemProvider.stat(e);if(t.isDirectory)return await this.workspaceManager().searchFolder(e);if(this.workspaceManager().shouldIncludeEntry(t))return[e]}catch{}return[]}async emitUpdate(t,r){await Promise.all(this.updateListeners.map(e=>e(t,r)))}sortDocuments(e){let t=0,r=e.length-1;for(;tvoid 0!==e.error)||this.indexManager.isAffected(e,t)}onUpdate(t){return this.updateListeners.push(t),$3e.create(()=>{var e=this.updateListeners.indexOf(t);0<=e&&this.updateListeners.splice(e,1)})}resetToState(e,t){switch(t){case B5e.Changed:case B5e.Parsed:this.indexManager.removeContent(e.uri);case B5e.IndexedContent:e.localSymbols=void 0;case B5e.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case B5e.Linked:this.indexManager.removeReferences(e.uri);case B5e.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case B5e.Validated:}e.state>t&&(e.state=t)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=B5e.Changed}async buildDocuments(e,t,r){this.prepareBuild(e,t),await this.runCancelable(e,B5e.Parsed,r,e=>this.langiumDocumentFactory.update(e,r)),await this.runCancelable(e,B5e.IndexedContent,r,e=>this.indexManager.updateContent(e,r)),await this.runCancelable(e,B5e.ComputedScopes,r,async e=>{var t=this.serviceRegistry.getServices(e.uri).references.ScopeComputation;e.localSymbols=await t.collectLocalSymbols(e,r)}),t=e.filter(e=>this.shouldLink(e)),await this.runCancelable(t,B5e.Linked,r,e=>this.serviceRegistry.getServices(e.uri).references.Linker.link(e,r)),await this.runCancelable(t,B5e.IndexedReferences,r,e=>this.indexManager.updateReferences(e,r)),t=e.filter(e=>!!this.shouldValidate(e)||(this.markAsCompleted(e),!1)),await this.runCancelable(t,B5e.Validated,r,async e=>{await this.validate(e,r),this.markAsCompleted(e)})}markAsCompleted(e){(e=this.buildState.get(e.uri.toString()))&&(e.completed=!0)}prepareBuild(e,t){for(var r of e){var r=r.uri.toString(),i=this.buildState.get(r);i&&!i.completed||this.buildState.set(r,{completed:!1,options:t,result:i?.result})}}async runCancelable(e,t,r,i){for(var n of e)n.statee.state===t),await this.notifyBuildPhase(e,t,r),this.currentState=t}onBuildPhase(e,t){return this.buildPhaseListeners.add(e,t),$3e.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),$3e.create(()=>{this.documentPhaseListeners.delete(e,t)})}waitUntil(e,t,r){let i;return t&&"path"in t?i=t:r=t,r=r??g5e.CancellationToken.None,i?this.awaitDocumentState(e,i,r):this.awaitBuilderState(e,r)}awaitDocumentState(n,a,s){var e=this.langiumDocuments.getDocument(a);return e?e.state>=n?Promise.resolve(a):s.isCancellationRequested?Promise.reject(k5e):this.currentState>=n&&n>e.state?Promise.reject(new B3e.ResponseError(B3e.LSPErrorCodes.RequestFailed,`Document state of ${a.toString()} is ${B5e[e.state]}, requiring ${B5e[n]}, but workspace state is already ${B5e[this.currentState]}. Returning undefined.`)):new Promise((t,e)=>{let r=this.onDocumentPhase(n,e=>{P5e.equals(e.uri,a)&&(r.dispose(),i.dispose(),t(e.uri))}),i=s.onCancellationRequested(()=>{r.dispose(),i.dispose(),e(k5e)})}):Promise.reject(new B3e.ResponseError(B3e.LSPErrorCodes.ServerCancelled,"No document found for URI: "+a.toString()))}awaitBuilderState(n,a){return this.currentState>=n?Promise.resolve():a.isCancellationRequested?Promise.reject(k5e):new Promise((e,t)=>{let r=this.onBuildPhase(n,()=>{r.dispose(),i.dispose(),e()}),i=a.onCancellationRequested(()=>{r.dispose(),i.dispose(),t(k5e)})})}async notifyDocumentPhase(e,t,r){var i;for(i of this.documentPhaseListeners.get(t).slice())try{await x5e(r),await i(e,r)}catch(e){if(!b5e(e))throw e}}async notifyBuildPhase(e,t,r){var i;if(0!==e.length)for(i of this.buildPhaseListeners.get(t).slice())await x5e(r),await i(e,r)}shouldLink(e){return this.getBuildOptions(e).eagerLinking??!0}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,t){var r=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,i="object"==typeof(n=this.getBuildOptions(e)).validation?{...n.validation}:{},n=(i.categories=this.findMissingValidationCategories(e,n),await r.validateDocument(e,i,t));e.diagnostics?e.diagnostics.push(...n):e.diagnostics=n,(r=this.buildState.get(e.uri.toString()))&&(r.result??(r.result={}),r.result.validationChecks?r.result.validationChecks=Yue(r.result.validationChecks).concat(i.categories).distinct().toArray():r.result.validationChecks=[...i.categories])}getBuildOptions(e){return this.buildState.get(e.uri.toString())?.options??{}}}}),PTe=s(()=>{gde(),f3e(),f5e(),Que(),W5e(),z3e=class{static{mt(this,"DefaultIndexManager")}constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new s3e,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){let r=ide(e).uri,i=[];return this.referenceIndex.forEach(e=>{e.forEach(e=>{P5e.equals(e.targetUri,r)&&e.targetPath===t&&i.push(e)})}),Yue(i)}allElements(t,r){let e=Yue(this.symbolIndex.keys());return(e=r?e.filter(e=>!r||r.has(e)):e).map(e=>this.getFileDescriptions(e,t)).flat()}getFileDescriptions(e,t){return t?this.symbolByTypeIndex.get(e,t,()=>(this.symbolIndex.get(e)??[]).filter(e=>this.astReflection.isSubtype(e.type,t))):this.symbolIndex.get(e)??[]}remove(e){this.removeContent(e),this.removeReferences(e)}removeContent(e){e=e.toString(),this.symbolIndex.delete(e),this.symbolByTypeIndex.clear(e)}removeReferences(e){e=e.toString(),this.referenceIndex.delete(e)}async updateContent(e,t=g5e.CancellationToken.None){t=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.collectExportedSymbols(e,t),e=e.uri.toString(),this.symbolIndex.set(e,t),this.symbolByTypeIndex.clear(e)}async updateReferences(e,t=g5e.CancellationToken.None){t=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,t),this.referenceIndex.set(e.uri.toString(),t)}isAffected(e,t){return!!(e=this.referenceIndex.get(e.uri.toString()))&&e.some(e=>!e.local&&t.has(e.targetUri.toString()))}}}),$Te=s(()=>{f5e(),_5e(),W5e(),Que(),q3e=class{static{mt(this,"DefaultWorkspaceManager")}constructor(e){this.initialBuildOptions={},this._ready=new E5e,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(e){this.folders=e.workspaceFolders??void 0}initialized(e){return this.mutex.write(e=>this.initializeWorkspace(this.folders??[],e))}async initializeWorkspace(e,t=g5e.CancellationToken.None){e=await this.performStartup(e),await x5e(t),await this.documentBuilder.build(e,this.initialBuildOptions,t)}async performStartup(e){let t=[],r=mt(e=>{t.push(e),this.langiumDocuments.hasDocument(e.uri)||this.langiumDocuments.addDocument(e)},"collector"),i=(await this.loadAdditionalDocuments(e,r),[]);return await Promise.all(e.map(e=>this.getRootFolder(e)).map(async e=>this.traverseFolder(e,i))),e=Yue(i).distinct(e=>e.toString()).filter(e=>!this.langiumDocuments.hasDocument(e)),await this.loadWorkspaceDocuments(e,r),this._ready.resolve(),t}async loadWorkspaceDocuments(e,t){await Promise.all(e.map(async e=>{e=await this.langiumDocuments.getOrCreateDocument(e),t(e)}))}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return M5e.parse(e.uri)}async traverseFolder(e,t){try{var r=await this.fileSystemProvider.readDirectory(e);await Promise.all(r.map(async e=>{this.shouldIncludeEntry(e)&&(e.isDirectory?await this.traverseFolder(e.uri,t):e.isFile&&t.push(e.uri))}))}catch(r){console.error("Failure to read directory content of "+e.toString(!0),r)}}async searchFolder(e){var t=[];return await this.traverseFolder(e,t),t}shouldIncludeEntry(e){var t=P5e.basename(e.uri);return!t.startsWith(".")&&(e.isDirectory?"node_modules"!==t&&"out"!==t:!!e.isFile&&this.serviceRegistry.hasServices(e.uri))}}});function BTe(e){return Array.isArray(e)&&(0===e.length||"name"in e[0])}function FTe(e){return e&&"modes"in e&&"defaultMode"in e}function zTe(e){return!BTe(e)&&!FTe(e)}var qTe,UTe,GTe,jTe=s(()=>{mve(),qTe=class{static{mt(this,"DefaultLexerErrorMessageProvider")}buildUnexpectedCharactersMessage(e,t,r,i,n){return vme.buildUnexpectedCharactersMessage(e,t,r,i,n)}buildUnableToPopLexerModeMessage(e){return vme.buildUnableToPopLexerModeMessage(e)}},UTe={mode:"full"},GTe=class{static{mt(this,"DefaultLexer")}constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;var t=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive}),t=(this.tokenTypes=this.toTokenTypeDictionary(t),zTe(t)?Object.values(t):t),e="production"===e.LanguageMetaData.mode;this.chevrotainLexer=new Tme(t,{positionTracking:"full",skipValidations:e,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=0){var r=this.chevrotainLexer.tokenize(e);return{tokens:r.tokens,errors:r.errors,hidden:r.groups.hidden??[],report:this.tokenBuilder.flushLexingReport?.(e)}}toTokenTypeDictionary(e){if(zTe(e))return e;let t=FTe(e)?Object.values(e.modes).flat():e,r={};return t.forEach(e=>r[e.name]=e),r}},mt(BTe,"isTokenTypeArray"),mt(FTe,"isIMultiModeLexerDefinition"),mt(zTe,"isTokenTypeDictionary")});function WTe(e,t,r){let i,n;return i="string"==typeof e?(n=t,r):(n=e.range.start,t),n=n||Gbe.create(0,0),r=VTe(e),t=awe(i),QTe({index:0,tokens:HTe({lines:r,position:n,options:t}),position:n})}function YTe(e,t){var r,i,t=awe(t);return 0!==(e=VTe(e)).length&&(r=e[e.length-1],i=t.start,t=t.end,!!i?.exec(e[0]))&&!!t?.exec(r)}function VTe(e){return("string"==typeof e?e:e.text).split(gge)}function HTe(a){let s=[],o=a.position.line,l=a.position.character;for(let n=0;n=r.length?0{T4e(),bge(),W5e(),mt(WTe,"parseJSDoc"),mt(YTe,"isJSDoc"),mt(VTe,"getLines"),hwe=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,uwe=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu,mt(HTe,"tokenize"),mt(XTe,"buildInlineTokens"),dwe=/\S/,pwe=/\s*$/,mt(KTe,"skipWhitespace"),mt(ZTe,"lastCharacter"),mt(QTe,"parseJSDocComment"),mt(JTe,"parseJSDocElement"),mt(ewe,"appendEmptyLine"),mt(twe,"parseJSDocText"),mt(rwe,"parseJSDocInline"),mt(iwe,"parseJSDocTag"),mt(nwe,"parseJSDocLine"),mt(awe,"normalizeOptions"),mt(swe,"normalizeOption"),gwe=class{static{mt(this,"JSDocCommentImpl")}constructor(e,t){this.elements=e,this.range=t}getTag(t){return this.getAllTags().find(e=>e.name===t)}getTags(t){return this.getAllTags().filter(e=>e.name===t)}getAllTags(){return this.elements.filter(e=>"name"in e)}toString(){let e="";for(var t of this.elements)0===e.length?e=t.toString():(t=t.toString(),e+=cwe(e)+t);return e.trim()}toMarkdown(e){let t="";for(var r of this.elements)0===t.length?t=r.toMarkdown(e):(r=r.toMarkdown(e),t+=cwe(t)+r);return t.trim()}},fwe=class{static{mt(this,"JSDocTagImpl")}constructor(e,t,r,i){this.name=e,this.content=t,this.inline=r,this.range=i}toString(){let e="@"+this.name,t=this.content.toString();return 1===this.content.inlines.length?e=e+" "+t:1r.range.start.line&&(t+=` `)}return t}toMarkdown(t){let r="";for(let e=0;ei.range.start.line&&(r+=` `)}return r}},ywe=class{static{mt(this,"JSDocLineImpl")}constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}},mt(cwe,"fillNewlines")}),Swe=s(()=>{gde(),_we(),vwe=class{static{mt(this,"JSDocDocumentationProvider")}constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(r){var e=this.commentProvider.getComment(r);if(e&&YTe(e))return WTe(e).toMarkdown({renderLink:mt((e,t)=>this.documentationLinkRenderer(r,e,t),"renderLink"),renderTag:mt(e=>this.documentationTagRenderer(r,e),"renderTag")})}documentationLinkRenderer(e,t,r){var i;return(e=this.findNameInLocalSymbols(e,t)??this.findNameInGlobalScope(e,t))&&e.nameSegment?(t=e.nameSegment.range.start.line+1,i=e.nameSegment.range.start.character+1,`[${r}](${e.documentUri.with({fragment:`L${t},`+i}).toString()})`):void 0}documentationTagRenderer(e,t){}findNameInLocalSymbols(t,r){var i=ide(t).localSymbols;if(i){let e=t;do{var n=i.getStream(e).find(e=>e.name===r);if(n)return n}while(e=e.$container)}}findNameInGlobalScope(e,t){return this.indexManager.allElements().find(e=>e.name===t)}}}),Cwe=s(()=>{T3e(),$0e(),bwe=class{static{mt(this,"DefaultCommentProvider")}constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){return y3e(e)?e.$comment:E0e(e.$cstNode,this.grammarConfig().multilineCommentRules)?.text}}}),Awe=s(()=>{_5e(),Y3e(),xwe=class{static{mt(this,"DefaultAsyncParser")}constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,t){return Promise.resolve(this.syncParser.parse(e))}},Twe=class{static{mt(this,"AbstractThreadedAsyncParser")}constructor(e){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=e.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length{var e;0{n=setTimeout(()=>{this.terminateWorker(r)},this.terminationDelay)});return r.parse(e).then(e=>{e=this.hydrator.hydrate(e),i.resolve(e)}).catch(e=>{i.reject(e)}).finally(()=>{a.dispose(),clearTimeout(n)}),i.promise}terminateWorker(e){e.terminate(),0<=(e=this.workerPool.indexOf(e))&&this.workerPool.splice(e,1)}async acquireParserWorker(e){this.initializeWorkers();for(var t of this.workerPool)if(t.ready)return t.lock(),t;let r=new E5e;return e.onCancellationRequested(()=>{var e=this.queue.indexOf(r);0<=e&&this.queue.splice(e,1),r.reject(k5e)}),this.queue.push(r),r.promise}},wwe=class{static{mt(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,t,r,i){this.onReadyEmitter=new W3e.Emitter,this.deferred=new E5e,this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=i,t(e=>{this.deferred.resolve(e),this.unlock()}),r(e=>{this.deferred.reject(e),this.unlock()})}terminate(){this.deferred.reject(k5e),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(e){if(this._parsing)throw new Error("Parser worker is busy");return this._parsing=!0,this.deferred=new E5e,this.sendMessage(e),this.deferred.promise}}}),Rwe=s(()=>{f5e(),_5e(),kwe=class{static{mt(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new g5e.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();var t=y5e();return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,r=g5e.CancellationToken.None){var i=new E5e;return e.push({action:t,deferred:i,cancellationToken:r}),this.performNextOperation(),i.promise}async performNextOperation(){if(this.done){var e=[];if(0{try{var i=await Promise.resolve().then(()=>e(r));t.resolve(i)}catch(e){b5e(e)?t.resolve(void 0):t.reject(e)}})),this.done=!0,this.performNextOperation()}}cancelWrite(){this.previousTokenSource.cancel()}}}),Lwe=s(()=>{w4e(),p0e(),Gue(),gde(),d3e(),$0e(),Ewe=class{static{mt(this,"DefaultHydrator")}constructor(e){this.grammarElementIdMap=new Q5e,this.tokenTypeIdMap=new Q5e,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport?this.dehydrateLexerReport(e.lexerReport):void 0,parserErrors:e.parserErrors.map(e=>({...e,message:e.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){var t,r=new Map,i=new Map;for(t of lde(e))r.set(t,{});if(e.$cstNode)for(var n of m0e(e.$cstNode))i.set(n,{});return{astNodes:r,cstNodes:i}}dehydrateAstNode(e,t){var r,i,n=t.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,void 0!==e.$cstNode&&(n.$cstNode=this.dehydrateCstNode(e.$cstNode,t));for([r,i]of Object.entries(e))if(!r.startsWith("$"))if(Array.isArray(i)){var a,s=[];n[r]=s;for(a of i)Mue(a)?s.push(this.dehydrateAstNode(a,t)):Oue(a)?s.push(this.dehydrateReference(a,t)):s.push(a)}else Mue(i)?n[r]=this.dehydrateAstNode(i,t):Oue(i)?n[r]=this.dehydrateReference(i,t):void 0!==i&&(n[r]=i);return n}dehydrateReference(e,t){var r={};return r.$refText=e.$refText,e.$refNode&&(r.$refNode=t.cstNodes.get(e.$refNode)),r}dehydrateCstNode(e,t){var r=t.cstNodes.get(e);return que(e)?r.fullText=e.fullText:r.grammarSource=this.getGrammarElementId(e.grammarSource),r.hidden=e.hidden,r.astNode=t.astNodes.get(e.astNode),Fue(e)?r.content=e.content.map(e=>this.dehydrateCstNode(e,t)):zue(e)&&(r.tokenType=e.tokenType.name,r.offset=e.offset,r.length=e.length,r.startLine=e.range.start.line,r.startColumn=e.range.start.character,r.endLine=e.range.end.line,r.endColumn=e.range.end.character),r}hydrate(e){var t=e.value,r=this.createHydrationContext(t);return"$cstNode"in t&&this.hydrateCstNode(t.$cstNode,r),{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport,parserErrors:e.parserErrors,value:this.hydrateAstNode(t,r)}}createHydrationContext(e){var t,r=new Map,i=new Map;for(t of lde(e))r.set(t,{});let n;if(e.$cstNode)for(var a of m0e(e.$cstNode)){let e;"fullText"in a?(e=new x4e(a.fullText),n=e):"content"in a?e=new v4e:"tokenType"in a&&(e=this.hydrateCstLeafNode(a)),e&&(i.set(a,e),e.root=n)}return{astNodes:r,cstNodes:i}}hydrateAstNode(e,t){var r,i,n=t.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode&&(n.$cstNode=t.cstNodes.get(e.$cstNode));for([r,i]of Object.entries(e))if(!r.startsWith("$"))if(Array.isArray(i)){var a,s=[];n[r]=s;for(a of i)Mue(a)?s.push(this.setParent(this.hydrateAstNode(a,t),n)):Oue(a)?s.push(this.hydrateReference(a,n,r,t)):s.push(a)}else Mue(i)?n[r]=this.setParent(this.hydrateAstNode(i,t),n):Oue(i)?n[r]=this.hydrateReference(i,n,r,t):void 0!==i&&(n[r]=i);return n}setParent(e,t){return e.$container=t,e}hydrateReference(e,t,r,i){return this.linker.buildReference(t,r,i.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,t,r=0){var i=t.cstNodes.get(e);if("number"==typeof e.grammarSource&&(i.grammarSource=this.getGrammarElement(e.grammarSource)),i.astNode=t.astNodes.get(e.astNode),Fue(i))for(var n of e.content)n=this.hydrateCstNode(n,t,r++),i.content.push(n);return i}hydrateCstLeafNode(e){var t=this.getTokenType(e.tokenType),r=e.offset;return new y4e(r,e.length,{start:{line:e.startLine,character:e.startColumn},end:{line:e.endLine,character:e.endColumn}},t,e.hidden)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(e)return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.getKey(e)}createGrammarElementIdMap(){let e=0;for(var t of lde(this.grammar))mde(t)&&this.grammarElementIdMap.set(t,e++)}}});function Nwe(e){return{documentation:{CommentProvider:mt(e=>new bwe(e),"CommentProvider"),DocumentationProvider:mt(e=>new vwe(e),"DocumentationProvider")},parser:{AsyncParser:mt(e=>new xwe(e),"AsyncParser"),GrammarConfig:mt(e=>o1e(e),"GrammarConfig"),LangiumParser:mt(e=>r5e(e),"LangiumParser"),CompletionParser:mt(e=>e5e(e),"CompletionParser"),ValueConverter:mt(()=>new a5e,"ValueConverter"),TokenBuilder:mt(()=>new n5e,"TokenBuilder"),Lexer:mt(e=>new GTe(e),"Lexer"),ParserErrorMessageProvider:mt(()=>new R4e,"ParserErrorMessageProvider"),LexerErrorMessageProvider:mt(()=>new qTe,"LexerErrorMessageProvider")},workspace:{AstNodeLocator:mt(()=>new O3e,"AstNodeLocator"),AstNodeDescriptionProvider:mt(e=>new D3e(e),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:mt(e=>new M3e(e),"ReferenceDescriptionProvider")},references:{Linker:mt(e=>new U5e(e),"Linker"),NameProvider:mt(()=>new X5e,"NameProvider"),ScopeProvider:mt(e=>new c3e(e),"ScopeProvider"),ScopeComputation:mt(e=>new J5e(e),"ScopeComputation"),References:mt(e=>new K5e(e),"References")},serializer:{Hydrator:mt(e=>new Ewe(e),"Hydrator"),JsonSerializer:mt(e=>new b3e(e),"JsonSerializer")},validation:{DocumentValidator:mt(e=>new N3e(e),"DocumentValidator"),ValidationRegistry:mt(e=>new _3e(e),"ValidationRegistry")},shared:mt(()=>e.shared,"shared")}}function Iwe(t){return{ServiceRegistry:mt(e=>new x3e(e),"ServiceRegistry"),workspace:{LangiumDocuments:mt(e=>new z5e(e),"LangiumDocuments"),LangiumDocumentFactory:mt(e=>new F5e(e),"LangiumDocumentFactory"),DocumentBuilder:mt(e=>new F3e(e),"DocumentBuilder"),IndexManager:mt(e=>new z3e(e),"IndexManager"),WorkspaceManager:mt(e=>new q3e(e),"WorkspaceManager"),FileSystemProvider:mt(e=>t.fileSystemProvider(e),"FileSystemProvider"),WorkspaceLock:mt(()=>new kwe,"WorkspaceLock"),ConfigurationProvider:mt(e=>new P3e(e),"ConfigurationProvider")},profilers:{}}}var Dwe=s(()=>{l1e(),t5e(),o5e(),l5e(),c5e(),V5e(),h3e(),u3e(),p3e(),m3e(),T3e(),w3e(),U3e(),S3e(),G3e(),j3e(),V3e(),OTe(),Y5e(),PTe(),$Te(),jTe(),Swe(),Cwe(),M4e(),Awe(),Rwe(),Lwe(),mt(Nwe,"createDefaultCoreModule"),mt(Iwe,"createDefaultSharedCoreModule")});function Mwe(e,t,r,i,n,a,s,o,l){return Pwe([e,t,r,i,n,a,s,o,l].reduce(Bwe,{}))}function Owe(e){if(e&&e[zwe])for(var t of Object.values(e))Owe(t);return e}function Pwe(r,i){let n=new Proxy({},{deleteProperty:mt(()=>!1,"deleteProperty"),set:mt(()=>{throw new Error("Cannot set property on injected service container")},"set"),get:mt((e,t)=>t===zwe||$we(e,t,r,i||n),"get"),getOwnPropertyDescriptor:mt((e,t)=>($we(e,t,r,i||n),Object.getOwnPropertyDescriptor(e,t)),"getOwnPropertyDescriptor"),has:mt((e,t)=>t in r,"has"),ownKeys:mt(()=>[...Object.getOwnPropertyNames(r)],"ownKeys")});return n}function $we(e,t,r,i){if(t in e){if(e[t]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable. Cause: "+e[t]);if(e[t]===qwe)throw new Error('Cycle detected. Please make "'+String(t)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return e[t]}if(t in r){r=r[t],e[t]=qwe;try{e[t]="function"==typeof r?r(i):Pwe(r,i)}catch(r){throw e[t]=r instanceof Error?r:void 0,r}return e[t]}}function Bwe(e,t){if(t)for(var[r,i]of Object.entries(t)){var n;null!=i&&("object"==typeof i?(n=e[r],e[r]=Bwe("object"==typeof n&&null!==n?n:{},i)):e[r]=i)}return e}var Fwe,zwe,qwe,Uwe,Gwe,jwe,Wwe,Ywe,Vwe,Hwe=s(()=>{(Fwe=Fwe||{}).merge=(e,t)=>Bwe(Bwe({},e),t),mt(Mwe,"inject"),zwe=Symbol("isProxy"),mt(Owe,"eagerLoad"),mt(Pwe,"_inject"),qwe=Symbol(),mt($we,"_resolve"),mt(Bwe,"_merge")}),Xwe=s(()=>{}),Kwe=s(()=>{Cwe(),Swe(),_we()}),Zwe=s(()=>{}),Qwe=s(()=>{l1e(),Zwe()}),Jwe=s(()=>{mve(),l5e(),jTe(),Uwe={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]},(Gwe=Gwe||{}).REGULAR="indentation-sensitive",Gwe.IGNORE_INDENTATION="ignore-indentation",jwe=class extends n5e{static{mt(this,"IndentationAwareTokenBuilder")}constructor(e=Uwe){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options={...Uwe,...e},this.indentTokenType=Cme({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=Cme({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(e,t){var r;if(!BTe(e=super.buildTokens(e,t)))throw new Error("Invalid tokens built by default builder");let{indentTokenName:i,dedentTokenName:n,whitespaceTokenName:a,ignoreIndentationDelimiters:s}=this.options,o,l,c,h=[];for(r of e){for(var[u,d]of s)r.name===u?r.PUSH_MODE=Gwe.IGNORE_INDENTATION:r.name===d&&(r.POP_MODE=!0);r.name===n?o=r:r.name===i?l=r:r.name===a?c=r:h.push(r)}if(o&&l&&c)return 0{}),tke=s(()=>{Awe(),t5e(),w4e(),Jwe(),o5e(),M4e(),jTe(),J4e(),eke(),l5e(),c5e()}),rke=s(()=>{V5e(),h3e(),u3e(),g3e(),p3e(),m3e()}),ike=s(()=>{Lwe(),T3e()}),nke=s(()=>{Ywe=class{static{mt(this,"EmptyFileSystemProvider")}stat(e){throw new Error("No file system is available.")}statSync(e){throw new Error("No file system is available.")}async exists(){return!1}existsSync(){return!1}readBinary(){throw new Error("No file system is available.")}readBinarySync(){throw new Error("No file system is available.")}readFile(){throw new Error("No file system is available.")}readFileSync(){throw new Error("No file system is available.")}async readDirectory(){return[]}readDirectorySync(){return[]}},Vwe={fileSystemProvider:mt(()=>new Ywe,"fileSystemProvider")}});function ake(){var e=Mwe(Iwe(Vwe),lke),t=Mwe(Nwe({shared:e}),oke);return e.ServiceRegistry.register(t),t}function ske(e){var t=ake(),e=t.serializer.JsonSerializer.deserialize(e);return t.shared.workspace.LangiumDocumentFactory.fromModel(e,M5e.parse(`memory:/${e.name??"grammar"}.langium`)),e}var oke,lke,cke,hke,uke=s(()=>{Dwe(),Hwe(),p0e(),nke(),W5e(),oke={Grammar:mt(()=>{},"Grammar"),LanguageMetaData:mt(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},lke={AstReflection:mt(()=>new u0e,"AstReflection")},mt(ake,"createMinimalGrammarServices"),mt(ske,"loadGrammarFromJson")}),dke={},pke=(PGe(dke,{AstUtils:()=>Jue,BiMap:()=>Q5e,Cancellation:()=>g5e,ContextCache:()=>s3e,CstUtils:()=>g0e,DONE_RESULT:()=>Xue,Deferred:()=>E5e,Disposable:()=>$3e,DisposableCache:()=>n3e,DocumentCache:()=>o3e,EMPTY_STREAM:()=>Hue,ErrorWithLocation:()=>z0e,GrammarUtils:()=>xge,MultiMap:()=>Z5e,OperationCancelled:()=>k5e,Reduction:()=>Zue,RegExpUtils:()=>oge,SimpleCache:()=>a3e,StreamImpl:()=>Vue,TreeStreamImpl:()=>Kue,URI:()=>M5e,UriTrie:()=>$5e,UriUtils:()=>P5e,WorkspaceCache:()=>l3e,assertCondition:()=>F0e,assertUnreachable:()=>B0e,delayNextTick:()=>m5e,interruptAndCheck:()=>x5e,isOperationCancelled:()=>b5e,loadGrammarFromJson:()=>ske,setInterruptionPeriod:()=>v5e,startCancelableOperation:()=>y5e,stream:()=>Yue}),s(()=>{f3e(),Y3e(),U(dke,W3e),d3e(),MTe(),q0e(),uke(),_5e(),Que(),W5e(),gde(),f5e(),$0e(),s1e(),bge()})),gke=s(()=>{U3e(),S3e()}),fke=s(()=>{d3e(),cke=class{static{mt(this,"DefaultLangiumProfiler")}constructor(e){this.activeCategories=new Set,this.allCategories=new Set(["validating","parsing","linking"]),this.activeCategories=e??new Set(this.allCategories),this.records=new Z5e}isActive(e){return this.activeCategories.has(e)}start(...e){e?e.forEach(e=>this.activeCategories.add(e)):this.activeCategories=new Set(this.allCategories)}stop(...e){e?e.forEach(e=>this.activeCategories.delete(e)):this.activeCategories.clear()}createTask(t,e){if(this.isActive(t))return console.log(`Creating profiling task for '${t}.${e}'.`),new hke(e=>this.records.add(t,this.dumpRecord(t,e)),e);throw new Error(`Category "${t}" is not active.`)}dumpRecord(e,t){console.info(`Task ${e}.${t.identifier} executed in ${t.duration.toFixed(2)}ms and ended at `+t.date.toISOString());var r,i=[];for(r of t.entries.keys()){var n=t.entries.get(r),a=n.reduce((e,t)=>e+t);i.push({name:t.identifier+"."+r,count:n.length,duration:a})}function s(e){return Math.round(100*e)/100}return e=t.duration-i.map(e=>e.duration).reduce((e,t)=>e+t,0),i.push({name:t.identifier,count:1,duration:e}),i.sort((e,t)=>t.duration-e.duration),mt(s,"Round"),console.table(i.map(e=>({Element:e.name,Count:e.count,"Self %":s(100*e.duration/t.duration),"Time (ms)":s(e.duration)}))),t}getRecords(...e){return 0===e.length?this.records.values():this.records.entries().filter(t=>e.some(e=>e===t[0])).flatMap(e=>e[1])}},hke=class{static{mt(this,"ProfilingTask")}constructor(e,t){this.stack=[],this.entries=new Z5e,this.addRecord=e,this.identifier=t}start(){if(void 0!==this.startTime)throw new Error(`Task "${this.identifier}" is already started.`);this.startTime=performance.now()}stop(){if(void 0===this.startTime)throw new Error(`Task "${this.identifier}" was not started.`);if(0!==this.stack.length)throw new Error(`Task "${this.identifier}" cannot be stopped before sub-task(s): ${this.stack.map(e=>e.id).join(", ")}.`);var e={identifier:this.identifier,date:new Date,duration:performance.now()-this.startTime,entries:this.entries};this.addRecord(e),this.startTime=void 0,this.entries.clear()}startSubTask(e){this.stack.push({id:e,start:performance.now(),content:0})}stopSubTask(e){var t=this.stack.pop();if(!t)throw new Error(`Task "${this.identifier}.${e}" was not started.`);if(t.id!==e)throw new Error(`Sub-Task "${t.id}" is not already stopped.`);var r=performance.now()-t.start,r=(void 0!==this.stack.at(-1)&&(this.stack[this.stack.length-1].content+=r),r-t.content);this.entries.add(e,r)}}}),mke=s(()=>{G3e(),j3e(),V3e(),OTe(),Y5e(),nke(),PTe(),Rwe(),$Te(),fke()}),yke={},vke=(PGe(yke,{AbstractAstReflection:()=>Uue,AbstractCstNode:()=>m4e,AbstractLangiumParser:()=>S4e,AbstractParserErrorMessageProvider:()=>A4e,AbstractThreadedAsyncParser:()=>Twe,AstUtils:()=>Jue,BiMap:()=>Q5e,Cancellation:()=>g5e,CompositeCstNodeImpl:()=>v4e,ContextCache:()=>s3e,CstNodeBuilder:()=>f4e,CstUtils:()=>g0e,DEFAULT_TOKENIZE_OPTIONS:()=>UTe,DONE_RESULT:()=>Xue,DatatypeSymbol:()=>E4e,DefaultAstNodeDescriptionProvider:()=>D3e,DefaultAstNodeLocator:()=>O3e,DefaultAsyncParser:()=>xwe,DefaultCommentProvider:()=>bwe,DefaultConfigurationProvider:()=>P3e,DefaultDocumentBuilder:()=>F3e,DefaultDocumentValidator:()=>N3e,DefaultHydrator:()=>Ewe,DefaultIndexManager:()=>z3e,DefaultJsonSerializer:()=>b3e,DefaultLangiumDocumentFactory:()=>F5e,DefaultLangiumDocuments:()=>z5e,DefaultLangiumProfiler:()=>cke,DefaultLexer:()=>GTe,DefaultLexerErrorMessageProvider:()=>qTe,DefaultLinker:()=>U5e,DefaultNameProvider:()=>X5e,DefaultReferenceDescriptionProvider:()=>M3e,DefaultReferences:()=>K5e,DefaultScopeComputation:()=>J5e,DefaultScopeProvider:()=>c3e,DefaultServiceRegistry:()=>x3e,DefaultTokenBuilder:()=>n5e,DefaultValueConverter:()=>a5e,DefaultWorkspaceLock:()=>kwe,DefaultWorkspaceManager:()=>q3e,Deferred:()=>E5e,Disposable:()=>$3e,DisposableCache:()=>n3e,DocumentCache:()=>o3e,DocumentState:()=>B5e,DocumentValidator:()=>I3e,EMPTY_SCOPE:()=>i3e,EMPTY_STREAM:()=>Hue,EmptyFileSystem:()=>Vwe,EmptyFileSystemProvider:()=>Ywe,ErrorWithLocation:()=>z0e,GrammarAST:()=>fde,GrammarUtils:()=>xge,IndentationAwareLexer:()=>Wwe,IndentationAwareTokenBuilder:()=>jwe,JSDocDocumentationProvider:()=>vwe,LangiumCompletionParser:()=>L4e,LangiumParser:()=>C4e,LangiumParserErrorMessageProvider:()=>R4e,LeafCstNodeImpl:()=>y4e,LexingMode:()=>Gwe,MapScope:()=>t3e,Module:()=>Fwe,MultiMap:()=>Z5e,MultiMapScope:()=>r3e,OperationCancelled:()=>k5e,ParserWorker:()=>wwe,ProfilingTask:()=>hke,Reduction:()=>Zue,RefResolving:()=>q5e,RegExpUtils:()=>oge,RootCstNodeImpl:()=>x4e,SimpleCache:()=>a3e,StreamImpl:()=>Vue,StreamScope:()=>e3e,TextDocument:()=>I5e,TreeStreamImpl:()=>Kue,URI:()=>M5e,UriTrie:()=>$5e,UriUtils:()=>P5e,VALIDATE_EACH_NODE:()=>L3e,ValidationCategory:()=>E3e,ValidationRegistry:()=>_3e,ValueConverter:()=>s5e,WorkspaceCache:()=>l3e,assertCondition:()=>F0e,assertUnreachable:()=>B0e,createCompletionParser:()=>e5e,createDefaultCoreModule:()=>Nwe,createDefaultSharedCoreModule:()=>Iwe,createGrammarConfig:()=>o1e,createLangiumParser:()=>r5e,createParser:()=>O4e,delayNextTick:()=>m5e,diagnosticData:()=>k3e,eagerLoad:()=>Owe,getDiagnosticRange:()=>C3e,indentationBuilderDefaultOptions:()=>Uwe,inject:()=>Mwe,interruptAndCheck:()=>x5e,isAstNode:()=>Mue,isAstNodeDescription:()=>$ue,isAstNodeWithComment:()=>y3e,isCompositeCstNode:()=>Fue,isIMultiModeLexerDefinition:()=>FTe,isJSDoc:()=>YTe,isLeafCstNode:()=>zue,isLinkingError:()=>Bue,isMultiReference:()=>Pue,isNamed:()=>H5e,isOperationCancelled:()=>b5e,isReference:()=>Oue,isRootCstNode:()=>que,isTokenTypeArray:()=>BTe,isTokenTypeDictionary:()=>zTe,loadGrammarFromJson:()=>ske,parseJSDoc:()=>WTe,prepareLangiumParser:()=>i5e,setInterruptionPeriod:()=>v5e,startCancelableOperation:()=>y5e,stream:()=>Yue,toDiagnosticData:()=>R3e,toDiagnosticSeverity:()=>A3e}),s(()=>{Dwe(),Hwe(),w3e(),Xwe(),Gue(),Kwe(),Qwe(),tke(),rke(),ike(),pke(),U(yke,dke),gke(),mke(),p0e()}));function bke(e){return g6e.isInstance(e,Bke.$type)}function xke(e){return g6e.isInstance(e,zke.$type)}function Tke(e){return g6e.isInstance(e,jke.$type)}function wke(e){return g6e.isInstance(e,Xke.$type)}function kke(e){return g6e.isInstance(e,Zke.$type)}function Eke(e){return g6e.isInstance(e,t6e.$type)}function _ke(e){return g6e.isInstance(e,i6e.$type)}function Ske(e){return g6e.isInstance(e,n6e.$type)}function Cke(e){return g6e.isInstance(e,a6e.$type)}function Ake(e){return g6e.isInstance(e,s6e.$type)}function Rke(e){return g6e.isInstance(e,u6e.$type)}var Lke,a,Nke,Ike,Dke,Mke,Oke,Pke,$ke,Bke,Fke,zke,qke,Uke,Gke,jke,Wke,Yke,Vke,Hke,Xke,Kke,Zke,Qke,Jke,e6e,t6e,r6e,i6e,n6e,a6e,s6e,o6e,l6e,c6e,h6e,u6e,d6e,p6e,g6e,f6e,m6e,y6e,v6e,b6e,x6e,T6e,w6e,k6e,E6e,_6e,S6e,C6e,A6e,R6e,L6e,N6e,I6e,D6e,M6e,O6e,P6e,$6e,B6e,F6e,z6e,q6e,U6e,G6e,j6e,W6e,Y6e,V6e,H6e=s(()=>{vke(),vke(),vke(),vke(),Lke=Object.defineProperty,a=mt((e,t)=>Lke(e,"name",{value:t,configurable:!0}),"__name"),(Nke=Nke||{}).Terminals={ARROW_DIRECTION:/L|R|T|B/,ARROW_GROUP:/\{group\}/,ARROW_INTO:/<|>/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ARCH_ICON:/\([\w-:]+\)/,ARCH_TITLE:/\[(?:"([^"\\]|\\.)*"|'([^'\\]|\\.)*'|[\w ]+)\]/},(Ike=Ike||{}).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,REFERENCE:/\w([-\./\w]*[-\w])?/},(Dke=Dke||{}).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(Mke=Mke||{}).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(Oke=Oke||{}).Terminals={NUMBER_PIE:/(?:-?[0-9]+\.[0-9]+(?!\.))|(?:-?(0|[1-9][0-9]*)(?!\.))/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(Pke=Pke||{}).Terminals={GRATICULE:/circle|polygon/,BOOLEAN:/true|false/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NUMBER:/(?:[0-9]+\.[0-9]+(?!\.))|(?:0|[1-9][0-9]*(?!\.))/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},($ke=$ke||{}).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,TREEMAP_KEYWORD:/treemap-beta|treemap/,CLASS_DEF:/classDef\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\s+([^;\r\n]*))?(?:;)?/,STYLE_SEPARATOR:/:::/,SEPARATOR:/:/,COMMA:/,/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,ID2:/[a-zA-Z_][a-zA-Z0-9_]*/,NUMBER2:/[0-9_\.\,]+/,STRING2:/"[^"]*"|'[^']*'/},{...Nke.Terminals,...Ike.Terminals,...Dke.Terminals,...Mke.Terminals,...Oke.Terminals,...Pke.Terminals,...$ke.Terminals},Bke={$type:"Architecture",accDescr:"accDescr",accTitle:"accTitle",edges:"edges",groups:"groups",junctions:"junctions",services:"services",title:"title"},mt(bke,"isArchitecture"),a(bke,"isArchitecture"),Fke={$type:"Axis",label:"label",name:"name"},zke={$type:"Branch",name:"name",order:"order"},mt(xke,"isBranch"),a(xke,"isBranch"),qke={$type:"Checkout",branch:"branch"},Uke={$type:"CherryPicking",id:"id",parent:"parent",tags:"tags"},Gke={$type:"ClassDefStatement",className:"className",styleText:"styleText"},jke={$type:"Commit",id:"id",message:"message",tags:"tags",type:"type"},mt(Tke,"isCommit"),a(Tke,"isCommit"),Wke={$type:"Curve",entries:"entries",label:"label",name:"name"},Yke={$type:"Direction",accDescr:"accDescr",accTitle:"accTitle",dir:"dir",statements:"statements",title:"title"},Vke={$type:"Edge",lhsDir:"lhsDir",lhsGroup:"lhsGroup",lhsId:"lhsId",lhsInto:"lhsInto",rhsDir:"rhsDir",rhsGroup:"rhsGroup",rhsId:"rhsId",rhsInto:"rhsInto",title:"title"},Hke={$type:"Entry",axis:"axis",value:"value"},Xke={$type:"GitGraph",accDescr:"accDescr",accTitle:"accTitle",statements:"statements",title:"title"},mt(wke,"isGitGraph"),a(wke,"isGitGraph"),Kke={$type:"Group",icon:"icon",id:"id",in:"in",title:"title"},Zke={$type:"Info",accDescr:"accDescr",accTitle:"accTitle",title:"title"},mt(kke,"isInfo"),a(kke,"isInfo"),Qke={$type:"Item",classSelector:"classSelector",name:"name"},Jke={$type:"Junction",id:"id",in:"in"},e6e={$type:"Leaf",classSelector:"classSelector",name:"name",value:"value"},t6e={$type:"Merge",branch:"branch",id:"id",tags:"tags",type:"type"},mt(Eke,"isMerge"),a(Eke,"isMerge"),r6e={$type:"Option",name:"name",value:"value"},i6e={$type:"Packet",accDescr:"accDescr",accTitle:"accTitle",blocks:"blocks",title:"title"},mt(_ke,"isPacket"),a(_ke,"isPacket"),n6e={$type:"PacketBlock",bits:"bits",end:"end",label:"label",start:"start"},mt(Ske,"isPacketBlock"),a(Ske,"isPacketBlock"),a6e={$type:"Pie",accDescr:"accDescr",accTitle:"accTitle",sections:"sections",showData:"showData",title:"title"},mt(Cke,"isPie"),a(Cke,"isPie"),s6e={$type:"PieSection",label:"label",value:"value"},mt(Ake,"isPieSection"),a(Ake,"isPieSection"),o6e={$type:"Radar",accDescr:"accDescr",accTitle:"accTitle",axes:"axes",curves:"curves",options:"options",title:"title"},l6e={$type:"Section",classSelector:"classSelector",name:"name"},c6e={$type:"Service",icon:"icon",iconText:"iconText",id:"id",in:"in",title:"title"},h6e={$type:"Statement"},u6e={$type:"Treemap",accDescr:"accDescr",accTitle:"accTitle",title:"title",TreemapRows:"TreemapRows"},mt(Rke,"isTreemap"),a(Rke,"isTreemap"),d6e={$type:"TreemapRow",indent:"indent",item:"item"},p6e=class extends Uue{static{mt(this,"MermaidAstReflection")}constructor(){super(...arguments),this.types={Architecture:{name:Bke.$type,properties:{accDescr:{name:Bke.accDescr},accTitle:{name:Bke.accTitle},edges:{name:Bke.edges,defaultValue:[]},groups:{name:Bke.groups,defaultValue:[]},junctions:{name:Bke.junctions,defaultValue:[]},services:{name:Bke.services,defaultValue:[]},title:{name:Bke.title}},superTypes:[]},Axis:{name:Fke.$type,properties:{label:{name:Fke.label},name:{name:Fke.name}},superTypes:[]},Branch:{name:zke.$type,properties:{name:{name:zke.name},order:{name:zke.order}},superTypes:[h6e.$type]},Checkout:{name:qke.$type,properties:{branch:{name:qke.branch}},superTypes:[h6e.$type]},CherryPicking:{name:Uke.$type,properties:{id:{name:Uke.id},parent:{name:Uke.parent},tags:{name:Uke.tags,defaultValue:[]}},superTypes:[h6e.$type]},ClassDefStatement:{name:Gke.$type,properties:{className:{name:Gke.className},styleText:{name:Gke.styleText}},superTypes:[]},Commit:{name:jke.$type,properties:{id:{name:jke.id},message:{name:jke.message},tags:{name:jke.tags,defaultValue:[]},type:{name:jke.type}},superTypes:[h6e.$type]},Curve:{name:Wke.$type,properties:{entries:{name:Wke.entries,defaultValue:[]},label:{name:Wke.label},name:{name:Wke.name}},superTypes:[]},Direction:{name:Yke.$type,properties:{accDescr:{name:Yke.accDescr},accTitle:{name:Yke.accTitle},dir:{name:Yke.dir},statements:{name:Yke.statements,defaultValue:[]},title:{name:Yke.title}},superTypes:[Xke.$type]},Edge:{name:Vke.$type,properties:{lhsDir:{name:Vke.lhsDir},lhsGroup:{name:Vke.lhsGroup,defaultValue:!1},lhsId:{name:Vke.lhsId},lhsInto:{name:Vke.lhsInto,defaultValue:!1},rhsDir:{name:Vke.rhsDir},rhsGroup:{name:Vke.rhsGroup,defaultValue:!1},rhsId:{name:Vke.rhsId},rhsInto:{name:Vke.rhsInto,defaultValue:!1},title:{name:Vke.title}},superTypes:[]},Entry:{name:Hke.$type,properties:{axis:{name:Hke.axis,referenceType:Fke.$type},value:{name:Hke.value}},superTypes:[]},GitGraph:{name:Xke.$type,properties:{accDescr:{name:Xke.accDescr},accTitle:{name:Xke.accTitle},statements:{name:Xke.statements,defaultValue:[]},title:{name:Xke.title}},superTypes:[]},Group:{name:Kke.$type,properties:{icon:{name:Kke.icon},id:{name:Kke.id},in:{name:Kke.in},title:{name:Kke.title}},superTypes:[]},Info:{name:Zke.$type,properties:{accDescr:{name:Zke.accDescr},accTitle:{name:Zke.accTitle},title:{name:Zke.title}},superTypes:[]},Item:{name:Qke.$type,properties:{classSelector:{name:Qke.classSelector},name:{name:Qke.name}},superTypes:[]},Junction:{name:Jke.$type,properties:{id:{name:Jke.id},in:{name:Jke.in}},superTypes:[]},Leaf:{name:e6e.$type,properties:{classSelector:{name:e6e.classSelector},name:{name:e6e.name},value:{name:e6e.value}},superTypes:[Qke.$type]},Merge:{name:t6e.$type,properties:{branch:{name:t6e.branch},id:{name:t6e.id},tags:{name:t6e.tags,defaultValue:[]},type:{name:t6e.type}},superTypes:[h6e.$type]},Option:{name:r6e.$type,properties:{name:{name:r6e.name},value:{name:r6e.value,defaultValue:!1}},superTypes:[]},Packet:{name:i6e.$type,properties:{accDescr:{name:i6e.accDescr},accTitle:{name:i6e.accTitle},blocks:{name:i6e.blocks,defaultValue:[]},title:{name:i6e.title}},superTypes:[]},PacketBlock:{name:n6e.$type,properties:{bits:{name:n6e.bits},end:{name:n6e.end},label:{name:n6e.label},start:{name:n6e.start}},superTypes:[]},Pie:{name:a6e.$type,properties:{accDescr:{name:a6e.accDescr},accTitle:{name:a6e.accTitle},sections:{name:a6e.sections,defaultValue:[]},showData:{name:a6e.showData,defaultValue:!1},title:{name:a6e.title}},superTypes:[]},PieSection:{name:s6e.$type,properties:{label:{name:s6e.label},value:{name:s6e.value}},superTypes:[]},Radar:{name:o6e.$type,properties:{accDescr:{name:o6e.accDescr},accTitle:{name:o6e.accTitle},axes:{name:o6e.axes,defaultValue:[]},curves:{name:o6e.curves,defaultValue:[]},options:{name:o6e.options,defaultValue:[]},title:{name:o6e.title}},superTypes:[]},Section:{name:l6e.$type,properties:{classSelector:{name:l6e.classSelector},name:{name:l6e.name}},superTypes:[Qke.$type]},Service:{name:c6e.$type,properties:{icon:{name:c6e.icon},iconText:{name:c6e.iconText},id:{name:c6e.id},in:{name:c6e.in},title:{name:c6e.title}},superTypes:[]},Statement:{name:h6e.$type,properties:{},superTypes:[]},Treemap:{name:u6e.$type,properties:{accDescr:{name:u6e.accDescr},accTitle:{name:u6e.accTitle},title:{name:u6e.title},TreemapRows:{name:u6e.TreemapRows,defaultValue:[]}},superTypes:[]},TreemapRow:{name:d6e.$type,properties:{indent:{name:d6e.indent},item:{name:d6e.item}},superTypes:[]}}}static{a(this,"MermaidAstReflection")}},g6e=new p6e,m6e=a(()=>f6e=f6e??ske(`{"$type":"Grammar","isDeclared":true,"name":"ArchitectureGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@18"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[(?:\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'|[\\\\w ]+)\\\\]/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`),"ArchitectureGrammarGrammar"),v6e=a(()=>y6e=y6e??ske(`{"$type":"Grammar","isDeclared":true,"name":"GitGraphGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`),"GitGraphGrammarGrammar"),x6e=a(()=>b6e=b6e??ske(`{"$type":"Grammar","isDeclared":true,"name":"InfoGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"?"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`),"InfoGrammarGrammar"),w6e=a(()=>T6e=T6e??ske(`{"$type":"Grammar","isDeclared":true,"name":"PacketGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"packet"},{"$type":"Keyword","value":"packet-beta"}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}],"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"+"},{"$type":"Assignment","feature":"bits","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]}]},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`),"PacketGrammarGrammar"),E6e=a(()=>k6e=k6e??ske(`{"$type":"Grammar","isDeclared":true,"name":"PieGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"FLOAT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?(0|[1-9][0-9]*)(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@2"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@3"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`),"PieGrammarGrammar"),S6e=a(()=>_6e=_6e??ske(`{"$type":"Grammar","isDeclared":true,"name":"RadarGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}},"isMulti":false}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"types":[]}`),"RadarGrammarGrammar"),A6e=a(()=>C6e=C6e??ske(`{"$type":"Grammar","isDeclared":true,"name":"TreemapGrammar","rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"Treemap","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"TreemapRows","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"CLASS_DEF","definition":{"$type":"RegexToken","regex":"/classDef\\\\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\\\\s+([^;\\\\r\\\\n]*))?(?:;)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Section","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Leaf","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"Item","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"classSelector","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Section","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[]},{"$type":"Interface","name":"Leaf","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}]},{"$type":"Interface","name":"ClassDefStatement","attributes":[{"$type":"TypeAttribute","name":"className","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"styleText","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"Treemap","attributes":[{"$type":"TypeAttribute","name":"TreemapRows","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@15"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * Treemap grammar for Langium\\n * Converted from mindmap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treemap declaration.\\n */"}`),"TreemapGrammarGrammar"),O6e={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(M6e={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(D6e={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(I6e={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(N6e={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(L6e={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(R6e={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"},P6e={AstReflection:a(()=>new p6e,"AstReflection")},$6e={Grammar:a(()=>m6e(),"Grammar"),LanguageMetaData:a(()=>R6e,"LanguageMetaData"),parser:{}},B6e={Grammar:a(()=>v6e(),"Grammar"),LanguageMetaData:a(()=>L6e,"LanguageMetaData"),parser:{}},F6e={Grammar:a(()=>x6e(),"Grammar"),LanguageMetaData:a(()=>N6e,"LanguageMetaData"),parser:{}},z6e={Grammar:a(()=>w6e(),"Grammar"),LanguageMetaData:a(()=>I6e,"LanguageMetaData"),parser:{}},q6e={Grammar:a(()=>E6e(),"Grammar"),LanguageMetaData:a(()=>D6e,"LanguageMetaData"),parser:{}},U6e={Grammar:a(()=>S6e(),"Grammar"),LanguageMetaData:a(()=>M6e,"LanguageMetaData"),parser:{}},G6e={Grammar:a(()=>A6e(),"Grammar"),LanguageMetaData:a(()=>O6e,"LanguageMetaData"),parser:{}},j6e={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},W6e=class extends a5e{static{mt(this,"AbstractMermaidValueConverter")}static{a(this,"AbstractMermaidValueConverter")}runConverter(e,t,r){var i=this.runCommonConverter(e,t,r);return void 0===(i=void 0===i?this.runCustomConverter(e,t,r):i)?super.runConverter(e,t,r):i}runCommonConverter(e,t,r){return void 0!==(e=j6e[e.name])&&null!==(e=e.exec(t))?void 0!==e[1]?e[1].trim().replace(/[\t ]{2,}/gm," "):void 0!==e[2]?e[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,` `):void 0:void 0}},Y6e=class extends W6e{static{mt(this,"CommonValueConverter")}static{a(this,"CommonValueConverter")}runCustomConverter(e,t,r){}},V6e=class extends n5e{static{mt(this,"AbstractMermaidTokenBuilder")}static{a(this,"AbstractMermaidTokenBuilder")}constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,r){return(e=super.buildKeywordTokens(e,t,r)).forEach(e=>{this.keywords.has(e.name)&&void 0!==e.PATTERN&&(e.PATTERN=new RegExp(e.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),e}},class extends V6e{static{mt(this,"CommonTokenBuilder")}static{a(this,"CommonTokenBuilder")}}});function X6e(e=Vwe){var e=Mwe(Iwe(e),P6e),t=Mwe(Nwe({shared:e}),B6e,Z6e);return e.ServiceRegistry.register(t),{shared:e,GitGraph:t}}var K6e,Z6e,Q6e=s(()=>{H6e(),vke(),K6e=class extends V6e{static{mt(this,"GitGraphTokenBuilder")}static{a(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},Z6e={parser:{TokenBuilder:a(()=>new K6e,"TokenBuilder"),ValueConverter:a(()=>new Y6e,"ValueConverter")}},mt(X6e,"createGitGraphServices"),a(X6e,"createGitGraphServices")});function J6e(e=Vwe){var e=Mwe(Iwe(e),P6e),t=Mwe(Nwe({shared:e}),F6e,tEe);return e.ServiceRegistry.register(t),{shared:e,Info:t}}var eEe,tEe,rEe=s(()=>{H6e(),vke(),eEe=class extends V6e{static{mt(this,"InfoTokenBuilder")}static{a(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},tEe={parser:{TokenBuilder:a(()=>new eEe,"TokenBuilder"),ValueConverter:a(()=>new Y6e,"ValueConverter")}},mt(J6e,"createInfoServices"),a(J6e,"createInfoServices")});function iEe(e=Vwe){var e=Mwe(Iwe(e),P6e),t=Mwe(Nwe({shared:e}),z6e,aEe);return e.ServiceRegistry.register(t),{shared:e,Packet:t}}var nEe,aEe,sEe=s(()=>{H6e(),vke(),nEe=class extends V6e{static{mt(this,"PacketTokenBuilder")}static{a(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},aEe={parser:{TokenBuilder:a(()=>new nEe,"TokenBuilder"),ValueConverter:a(()=>new Y6e,"ValueConverter")}},mt(iEe,"createPacketServices"),a(iEe,"createPacketServices")});function oEe(e=Vwe){var e=Mwe(Iwe(e),P6e),t=Mwe(Nwe({shared:e}),q6e,hEe);return e.ServiceRegistry.register(t),{shared:e,Pie:t}}var lEe,cEe,hEe,uEe=s(()=>{H6e(),vke(),lEe=class extends V6e{static{mt(this,"PieTokenBuilder")}static{a(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},cEe=class extends W6e{static{mt(this,"PieValueConverter")}static{a(this,"PieValueConverter")}runCustomConverter(e,t,r){if("PIE_SECTION_LABEL"===e.name)return t.replace(/"/g,"").trim()}},hEe={parser:{TokenBuilder:a(()=>new lEe,"TokenBuilder"),ValueConverter:a(()=>new cEe,"ValueConverter")}},mt(oEe,"createPieServices"),a(oEe,"createPieServices")});function dEe(e=Vwe){var e=Mwe(Iwe(e),P6e),t=Mwe(Nwe({shared:e}),$6e,fEe);return e.ServiceRegistry.register(t),{shared:e,Architecture:t}}var pEe,gEe,fEe,mEe=s(()=>{H6e(),vke(),pEe=class extends V6e{static{mt(this,"ArchitectureTokenBuilder")}static{a(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},gEe=class extends W6e{static{mt(this,"ArchitectureValueConverter")}static{a(this,"ArchitectureValueConverter")}runCustomConverter(e,t,r){if("ARCH_ICON"===e.name)return t.replace(/[()]/g,"").trim();if("ARCH_TEXT_ICON"===e.name)return t.replace(/["()]/g,"");if("ARCH_TITLE"===e.name){let e=t.replace(/^\[|]$/g,"").trim();return(e=e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")?(e=e.slice(1,-1)).replace(/\\"/g,'"').replace(/\\'/g,"'"):e).trim()}}},fEe={parser:{TokenBuilder:a(()=>new pEe,"TokenBuilder"),ValueConverter:a(()=>new gEe,"ValueConverter")}},mt(dEe,"createArchitectureServices"),a(dEe,"createArchitectureServices")});function yEe(e=Vwe){var e=Mwe(Iwe(e),P6e),t=Mwe(Nwe({shared:e}),U6e,bEe);return e.ServiceRegistry.register(t),{shared:e,Radar:t}}var vEe,bEe,xEe=s(()=>{H6e(),vke(),vEe=class extends V6e{static{mt(this,"RadarTokenBuilder")}static{a(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},bEe={parser:{TokenBuilder:a(()=>new vEe,"TokenBuilder"),ValueConverter:a(()=>new Y6e,"ValueConverter")}},mt(yEe,"createRadarServices"),a(yEe,"createRadarServices")});function TEe(e){var t,r=e.validation.TreemapValidator;(e=e.validation.ValidationRegistry)&&(t={Treemap:r.checkSingleRoot.bind(r)},e.register(t,r))}function wEe(e=Vwe){var e=Mwe(Iwe(e),P6e),t=Mwe(Nwe({shared:e}),G6e,CEe);return e.ServiceRegistry.register(t),TEe(t),{shared:e,Treemap:t}}var kEe,EEe,_Ee,SEe,CEe,AEe=s(()=>{H6e(),vke(),kEe=class extends V6e{static{mt(this,"TreemapTokenBuilder")}static{a(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},EEe=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,_Ee=class extends W6e{static{mt(this,"TreemapValueConverter")}static{a(this,"TreemapValueConverter")}runCustomConverter(e,t,r){return"NUMBER2"===e.name?parseFloat(t.replace(/,/g,"")):"SEPARATOR"===e.name||"STRING2"===e.name?t.substring(1,t.length-1):"INDENTATION"===e.name?t.length:"ClassDef"===e.name?"string"!=typeof t?t:(e=EEe.exec(t))?{$type:"ClassDefStatement",className:e[1],styleText:e[2]||void 0}:void 0:void 0}},mt(TEe,"registerValidationChecks"),a(TEe,"registerValidationChecks"),SEe=class{static{mt(this,"TreemapValidator")}static{a(this,"TreemapValidator")}checkSingleRoot(e,t){let r;for(var i of e.TreemapRows)i.item&&(void 0===r&&void 0===i.indent?r=0:(void 0===i.indent||void 0!==r&&r>=parseInt(i.indent,10))&&t("error","Multiple root nodes are not allowed in a treemap.",{node:i,property:"item"}))}},CEe={parser:{TokenBuilder:a(()=>new kEe,"TokenBuilder"),ValueConverter:a(()=>new _Ee,"ValueConverter")},validation:{TreemapValidator:a(()=>new SEe,"TreemapValidator")}},mt(wEe,"createTreemapServices"),a(wEe,"createTreemapServices")}),REe={},LEe=(PGe(REe,{InfoModule:()=>tEe,createInfoServices:()=>J6e}),s(()=>{rEe(),H6e()})),NEe={},IEe=(PGe(NEe,{PacketModule:()=>aEe,createPacketServices:()=>iEe}),s(()=>{sEe(),H6e()})),DEe={},MEe=(PGe(DEe,{PieModule:()=>hEe,createPieServices:()=>oEe}),s(()=>{uEe(),H6e()})),OEe={},PEe=(PGe(OEe,{ArchitectureModule:()=>fEe,createArchitectureServices:()=>dEe}),s(()=>{mEe(),H6e()})),$Ee={},BEe=(PGe($Ee,{GitGraphModule:()=>Z6e,createGitGraphServices:()=>X6e}),s(()=>{Q6e(),H6e()})),FEe={},zEe=(PGe(FEe,{RadarModule:()=>bEe,createRadarServices:()=>yEe}),s(()=>{xEe(),H6e()})),qEe={},UEe=(PGe(qEe,{TreemapModule:()=>CEe,createTreemapServices:()=>wEe}),s(()=>{AEe(),H6e()}));async function GEe(e,t){var r=WEe[e];if(!r)throw new Error("Unknown diagram type: "+e);if(jEe[e]||await r(),0<(r=jEe[e].parse(t)).lexerErrors.length||0{Q6e(),rEe(),sEe(),uEe(),mEe(),xEe(),AEe(),H6e(),jEe={},WEe={info:a(async()=>{var e=(e=(await Promise.resolve().then(()=>(LEe(),REe))).createInfoServices)().Info.parser.LangiumParser;jEe.info=e},"info"),packet:a(async()=>{var e=(e=(await Promise.resolve().then(()=>(IEe(),NEe))).createPacketServices)().Packet.parser.LangiumParser;jEe.packet=e},"packet"),pie:a(async()=>{var e=(e=(await Promise.resolve().then(()=>(MEe(),DEe))).createPieServices)().Pie.parser.LangiumParser;jEe.pie=e},"pie"),architecture:a(async()=>{var e=(e=(await Promise.resolve().then(()=>(PEe(),OEe))).createArchitectureServices)().Architecture.parser.LangiumParser;jEe.architecture=e},"architecture"),gitGraph:a(async()=>{var e=(e=(await Promise.resolve().then(()=>(BEe(),$Ee))).createGitGraphServices)().GitGraph.parser.LangiumParser;jEe.gitGraph=e},"gitGraph"),radar:a(async()=>{var e=(e=(await Promise.resolve().then(()=>(zEe(),FEe))).createRadarServices)().Radar.parser.LangiumParser;jEe.radar=e},"radar"),treemap:a(async()=>{var e=(e=(await Promise.resolve().then(()=>(UEe(),qEe))).createTreemapServices)().Treemap.parser.LangiumParser;jEe.treemap=e},"treemap")},mt(GEe,"parse"),a(GEe,"parse"),YEe=class extends Error{static{mt(this,"MermaidParseError")}constructor(e){super(`Parsing failed: ${e.lexerErrors.map(e=>`Lexer error on line ${void 0===e.line||isNaN(e.line)?"?":e.line}, column ${void 0===e.column||isNaN(e.column)?"?":e.column}: `+e.message).join(` `)} `+e.parserErrors.map(e=>`Parse error on line ${void 0===e.token.startLine||isNaN(e.token.startLine)?"?":e.token.startLine}, column ${void 0===e.token.startColumn||isNaN(e.token.startColumn)?"?":e.token.startColumn}: `+e.message).join(` `)),this.result=e}static{a(this,"MermaidParseError")}}});function HEe(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}var XEe,KEe,ZEe=s(()=>{mt(HEe,"populateCommonDb")}),QEe=s(()=>{XEe={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4}}),JEe=s(()=>{KEe=class{constructor(e){this.init=e,this.records=this.init()}static{mt(this,"ImperativeState")}reset(){this.records=this.init()}}});function e_e(){return X7({length:7})}function t_e(e,i){let n=Object.create(null);return e.reduce((e,t)=>{var r=i(t);return n[r]||(n[r]=!0,e.push(t)),e},[])}function r_e(e,t,r){-1===(t=e.indexOf(t))?e.push(r):e.splice(t,1,r)}function i_e(e){let t=e.reduce((e,t)=>e.seq>t.seq?e:t,e[0]),r="";e.forEach(function(e){e===t?r+="\t*":r+="\t|"});var i,n=[r,t.id,t.seq];for(i in y.records.branches)y.records.branches.get(i)===t.id&&n.push(i);if(M.debug(n.join(" ")),t.parents&&2==t.parents.length&&t.parents[0]&&t.parents[1]){var a=y.records.commits.get(t.parents[0]);r_e(e,t,a),t.parents[1]&&e.push(y.records.commits.get(t.parents[1]))}else{if(0==t.parents.length)return;t.parents[0]&&(a=y.records.commits.get(t.parents[0]),r_e(e,t,a))}i_e(e=t_e(e,e=>e.id))}var n_e,a_e,y,s_e,o_e,l_e,c_e,h_e,u_e,d_e,p_e,g_e,f_e,m_e,y_e,v_e,b_e,x_e,T_e,w_e,k_e,E_e,__e,S_e,C_e,A_e,R_e,L_e,N_e,I_e,D_e,M_e,O_e,P_e,$_e,B_e,F_e,z_e,q_e,U_e,G_e,j_e,W_e,Y_e,V_e,H_e,X_e,K_e,Z_e,Q_e,J_e,eSe,tSe,rSe,iSe,nSe,aSe,sSe,oSe,lSe,cSe,hSe=s(()=>{e(),hC(),li(),zc(),Cu(),QEe(),JEe(),si(),n_e=Ht.gitGraph,a_e=mt(()=>I7({...n_e,...cr().gitGraph}),"getConfig"),y=new KEe(()=>{var e=(t=a_e()).mainBranchName,t=t.mainBranchOrder;return{mainBranchName:e,commits:new Map,head:null,branchConfig:new Map([[e,{name:e,order:t}]]),branches:new Map([[e,null]]),currBranch:e,direction:"LR",seq:0,options:{}}}),mt(e_e,"getID"),mt(t_e,"uniqBy"),s_e=mt(function(e){y.records.direction=e},"setDirection"),o_e=mt(function(e){M.debug("options str",e),e=e?.trim()||"{}";try{y.records.options=JSON.parse(e)}catch(e){M.error("error while parsing gitGraph options",e.message)}},"setOptions"),l_e=mt(function(){return y.records.options},"getOptions"),c_e=mt(function(e){let t=e.msg,r=e.id,i=e.type,n=e.tags,a=(M.info("commit",t,r,i,n),M.debug("Entering commit:",t,r,i,n),a_e());r=L.sanitizeText(r,a),t=L.sanitizeText(t,a),n=n?.map(e=>L.sanitizeText(e,a)),e={id:r||y.records.seq+"-"+e_e(),message:t,seq:y.records.seq++,type:i??XEe.NORMAL,tags:n??[],parents:null==y.records.head?[]:[y.records.head.id],branch:y.records.currBranch},y.records.head=e,M.info("main branch",a.mainBranchName),y.records.commits.has(e.id)&&M.warn(`Commit ID ${e.id} already exists`),y.records.commits.set(e.id,e),y.records.branches.set(y.records.currBranch,e.id),M.debug("in pushCommit "+e.id)},"commit"),h_e=mt(function(e){var t=e.name,e=e.order,t=L.sanitizeText(t,a_e());if(y.records.branches.has(t))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 ${t}")`);y.records.branches.set(t,null!=y.records.head?y.records.head.id:null),y.records.branchConfig.set(t,{name:t,order:e}),p_e(t),M.debug("in createBranch")},"branch"),u_e=mt(e=>{var t=e.branch,r=e.id,i=e.type,n=e.tags,a=a_e(),t=L.sanitizeText(t,a),r=r&&L.sanitizeText(r,a),e=y.records.branches.get(y.records.currBranch),a=y.records.branches.get(t),e=e?y.records.commits.get(e):void 0,s=a?y.records.commits.get(a):void 0;if(e&&s&&e.branch===t)throw new Error(`Cannot merge branch '${t}' into itself.`);if(y.records.currBranch===t)throw(o=new Error('Incorrect usage of "merge". Cannot merge a branch to itself')).hash={text:"merge "+t,token:"merge "+t,expected:["branch abc"]},o;if(void 0===e||!e)throw(o=new Error(`Incorrect usage of "merge". Current branch (${y.records.currBranch})has no commits`)).hash={text:"merge "+t,token:"merge "+t,expected:["commit"]},o;if(!y.records.branches.has(t))throw(o=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist")).hash={text:"merge "+t,token:"merge "+t,expected:["branch "+t]},o;if(void 0===s||!s)throw(o=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits")).hash={text:"merge "+t,token:"merge "+t,expected:['"commit"']},o;if(e===s)throw(o=new Error('Incorrect usage of "merge". Both branches have same head')).hash={text:"merge "+t,token:"merge "+t,expected:["branch abc"]},o;if(r&&y.records.commits.has(r))throw(e=new Error('Incorrect usage of "merge". Commit with id:'+r+" already exists, use different custom id")).hash={text:`merge ${t} ${r} ${i} `+n?.join(" "),token:`merge ${t} ${r} ${i} `+n?.join(" "),expected:[`merge ${t} ${r}_UNIQUE ${i} `+n?.join(" ")]},e;var s=a||"",o={id:r||y.records.seq+"-"+e_e(),message:`merged branch ${t} into `+y.records.currBranch,seq:y.records.seq++,parents:null==y.records.head?[]:[y.records.head.id,s],branch:y.records.currBranch,type:XEe.MERGE,customType:i,customId:!!r,tags:n??[]};y.records.head=o,y.records.commits.set(o.id,o),y.records.branches.set(y.records.currBranch,o.id),M.debug(y.records.branches),M.debug("in mergeBranch")},"merge"),d_e=mt(function(e){let t=e.id,r=e.targetId,i=e.tags,n=e.parent,a=(M.debug("Entering cherryPick:",t,r,i),a_e());if(t=L.sanitizeText(t,a),r=L.sanitizeText(r,a),i=i?.map(e=>L.sanitizeText(e,a)),n=L.sanitizeText(n,a),!t||!y.records.commits.has(t))throw(e=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided')).hash={text:`cherryPick ${t} `+r,token:`cherryPick ${t} `+r,expected:["cherry-pick abc"]},e;if(void 0===(e=y.records.commits.get(t))||!e)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(n&&(!Array.isArray(e.parents)||!e.parents.includes(n)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");var s=e.branch;if(e.type===XEe.MERGE&&!n)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!r||!y.records.commits.has(r)){if(s===y.records.currBranch)throw(s=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch')).hash={text:`cherryPick ${t} `+r,token:`cherryPick ${t} `+r,expected:["cherry-pick abc"]},s;if(void 0===(s=y.records.branches.get(y.records.currBranch))||!s)throw(o=new Error(`Incorrect usage of "cherry-pick". Current branch (${y.records.currBranch})has no commits`)).hash={text:`cherryPick ${t} `+r,token:`cherryPick ${t} `+r,expected:["cherry-pick abc"]},o;var o=y.records.commits.get(s);if(void 0===o||!o)throw(s=new Error(`Incorrect usage of "cherry-pick". Current branch (${y.records.currBranch})has no commits`)).hash={text:`cherryPick ${t} `+r,token:`cherryPick ${t} `+r,expected:["cherry-pick abc"]},s;o={id:y.records.seq+"-"+e_e(),message:`cherry-picked ${e?.message} into `+y.records.currBranch,seq:y.records.seq++,parents:null==y.records.head?[]:[y.records.head.id,e.id],branch:y.records.currBranch,type:XEe.CHERRY_PICK,tags:i?i.filter(Boolean):["cherry-pick:"+e.id+(e.type===XEe.MERGE?"|parent:"+n:"")]},y.records.head=o,y.records.commits.set(o.id,o),y.records.branches.set(y.records.currBranch,o.id),M.debug(y.records.branches),M.debug("in cherryPick")}},"cherryPick"),p_e=mt(function(e){var t;if(e=L.sanitizeText(e,a_e()),!y.records.branches.has(e))throw(t=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`)).hash={text:"checkout "+e,token:"checkout "+e,expected:["branch "+e]},t;y.records.currBranch=e,t=y.records.branches.get(y.records.currBranch),y.records.head=void 0!==t&&t?y.records.commits.get(t)??null:null},"checkout"),mt(r_e,"upsert"),mt(i_e,"prettyPrintCommitHistory"),g_e=mt(function(){M.debug(y.records.commits),i_e([b_e()[0]])},"prettyPrint"),f_e=mt(function(){y.reset(),xh()},"clear"),m_e=mt(function(){return[...y.records.branchConfig.values()].map((e,t)=>null!=e.order?e:{...e,order:parseFloat("0."+t)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},"getBranchesAsObjArray"),y_e=mt(function(){return y.records.branches},"getBranches"),v_e=mt(function(){return y.records.commits},"getCommits"),b_e=mt(function(){var e=[...y.records.commits.values()];return e.forEach(function(e){M.debug(e.id)}),e.sort((e,t)=>e.seq-t.seq),e},"getCommitsArray"),x_e=mt(function(){return y.records.currBranch},"getCurrentBranch"),T_e=mt(function(){return y.records.direction},"getDirection"),w_e=mt(function(){return y.records.head},"getHead"),k_e={commitType:XEe,getConfig:a_e,setDirection:s_e,setOptions:o_e,getOptions:l_e,commit:c_e,branch:h_e,merge:u_e,cherryPick:d_e,checkout:p_e,prettyPrint:g_e,clear:f_e,getBranchesAsObjArray:m_e,getBranches:y_e,getCommits:v_e,getCommitsArray:b_e,getCurrentBranch:x_e,getDirection:T_e,getHead:w_e,setAccTitle:Th,getAccTitle:wh,getAccDescription:Eh,setAccDescription:kh,setDiagramTitle:_h,getDiagramTitle:Sh}}),uSe=s(()=>{VEe(),e(),ZEe(),hSe(),QEe(),E_e=mt((e,t)=>{HEe(e,t),e.dir&&t.setDirection(e.dir);for(var r of e.statements)__e(r,t)},"populate"),__e=mt((e,t)=>{var r={Commit:mt(e=>t.commit(S_e(e)),"Commit"),Branch:mt(e=>t.branch(C_e(e)),"Branch"),Merge:mt(e=>t.merge(A_e(e)),"Merge"),Checkout:mt(e=>t.checkout(R_e(e)),"Checkout"),CherryPicking:mt(e=>t.cherryPick(L_e(e)),"CherryPicking")}[e.$type];r?r(e):M.error("Unknown statement type: "+e.$type)},"parseStatement"),S_e=mt(e=>({id:e.id,msg:e.message??"",type:void 0!==e.type?XEe[e.type]:XEe.NORMAL,tags:e.tags??void 0}),"parseCommit"),C_e=mt(e=>({name:e.name,order:e.order??0}),"parseBranch"),A_e=mt(e=>({branch:e.branch,id:e.id??"",type:void 0!==e.type?XEe[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),R_e=mt(e=>e.branch,"parseCheckout"),L_e=mt(e=>({id:e.id,targetId:"",tags:0===e.tags?.length?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),N_e={parse:mt(async e=>{e=await GEe("gitGraph",e),M.debug(e),E_e(e,k_e)},"parse")}}),dSe=s(()=>{hw(),Au(),e(),hC(),QEe(),I_e=new Map,D_e=new Map,M_e=new Map,O_e=[],P_e=0,$_e="LR",B_e=mt(()=>{I_e.clear(),D_e.clear(),M_e.clear(),P_e=0,O_e=[],$_e="LR"},"clear"),F_e=mt(e=>{let r=document.createElementNS("http://www.w3.org/2000/svg","text");return("string"==typeof e?e.split(/\\n|\n|/gi):e).forEach(e=>{var t=document.createElementNS("http://www.w3.org/2000/svg","tspan");t.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),t.setAttribute("dy","1em"),t.setAttribute("x","0"),t.setAttribute("class","row"),t.textContent=e.trim(),r.appendChild(t)}),r},"drawText"),z_e=mt(e=>{let r,i,n;return n="BT"===$_e?(i=mt((e,t)=>e<=t,"comparisonFunc"),1/0):(i=mt((e,t)=>t<=e,"comparisonFunc"),0),e.forEach(e=>{var t="TB"===$_e||"BT"==$_e?D_e.get(e)?.y:D_e.get(e)?.x;void 0!==t&&i(t,n)&&(r=e,n=t)}),r},"findClosestParent"),q_e=mt(e=>{let r="",i=1/0;return e.forEach(e=>{var t=D_e.get(e).y;t<=i&&(r=e,i=t)}),r||void 0},"findClosestParentBT"),U_e=mt((e,i,t)=>{let n=t,a=t,r=[];e.forEach(e=>{var t=i.get(e);if(!t)throw new Error("Commit not found for key "+e);t.parents.length?(n=j_e(t),a=Math.max(n,a)):r.push(t),W_e(t,n)}),n=a,r.forEach(e=>{Y_e(e,n,t)}),e.forEach(e=>{var t,r;(e=i.get(e))?.parents.length&&(t=q_e(e.parents),(n=D_e.get(t).y-40)<=a&&(a=n),t=I_e.get(e.branch).pos,r=n-10,D_e.set(e.id,{x:t,y:r}))})},"setParallelBTPos"),G_e=mt(e=>{var t=z_e(e.parents.filter(e=>null!==e));if(!t)throw new Error("Closest parent not found for commit "+e.id);if(void 0===(t=D_e.get(t)?.y))throw new Error("Closest parent position not found for commit "+e.id);return t},"findClosestParentPos"),j_e=mt(e=>G_e(e)+40,"calculateCommitPosition"),W_e=mt((e,t)=>{var r=I_e.get(e.branch);if(r)return r=r.pos,D_e.set(e.id,{x:r,y:t+=10}),{x:r,y:t};throw new Error("Branch not found for commit "+e.id)},"setCommitPosition"),Y_e=mt((e,t,r)=>{var i=I_e.get(e.branch);if(!i)throw new Error("Branch not found for commit "+e.id);i=i.pos,D_e.set(e.id,{x:i,y:t+r})},"setRootPosition"),V_e=mt((e,t,r,i,n,a)=>{var s;a===XEe.HIGHLIGHT?(e.append("rect").attr("x",r.x-10).attr("y",r.y-10).attr("width",20).attr("height",20).attr("class",`commit ${t.id} commit-highlight${n%8} ${i}-outer`),e.append("rect").attr("x",r.x-6).attr("y",r.y-6).attr("width",12).attr("height",12).attr("class",`commit ${t.id} commit${n%8} ${i}-inner`)):a===XEe.CHERRY_PICK?(e.append("circle").attr("cx",r.x).attr("cy",r.y).attr("r",10).attr("class",`commit ${t.id} `+i),e.append("circle").attr("cx",r.x-3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${t.id} `+i),e.append("circle").attr("cx",r.x+3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${t.id} `+i),e.append("line").attr("x1",r.x+3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke","#fff").attr("class",`commit ${t.id} `+i),e.append("line").attr("x1",r.x-3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke","#fff").attr("class",`commit ${t.id} `+i)):((s=e.append("circle")).attr("cx",r.x),s.attr("cy",r.y),s.attr("r",t.type===XEe.MERGE?9:10),s.attr("class",`commit ${t.id} commit`+n%8),a===XEe.MERGE&&((s=e.append("circle")).attr("cx",r.x),s.attr("cy",r.y),s.attr("r",6),s.attr("class",`commit ${i} ${t.id} commit`+n%8)),a===XEe.REVERSE&&e.append("path").attr("d",`M ${r.x-5},${r.y-5}L${r.x+5},${r.y+5}M${r.x-5},${r.y+5}L${r.x+5},`+(r.y-5)).attr("class",`commit ${i} ${t.id} commit`+n%8))},"drawCommitBullet"),H_e=mt((e,t,r,i,n)=>{var a,s;t.type!==XEe.CHERRY_PICK&&(t.customId&&t.type===XEe.MERGE||t.type!==XEe.MERGE)&&n.showCommitLabel&&(a=(e=e.append("g")).insert("rect").attr("class","commit-label-bkg"),s=(t=e.append("text").attr("x",i).attr("y",r.y+25).attr("class","commit-label").text(t.id)).node()?.getBBox())&&(a.attr("x",r.posWithOffset-s.width/2-2).attr("y",r.y+13.5).attr("width",s.width+4).attr("height",s.height+4),"TB"===$_e||"BT"===$_e?(a.attr("x",r.x-(s.width+16+5)).attr("y",r.y-12),t.attr("x",r.x-(s.width+16)).attr("y",r.y+s.height-12)):t.attr("x",r.posWithOffset-s.width/2),n.rotateCommitLabel)&&("TB"===$_e||"BT"===$_e?(t.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),a.attr("transform","rotate(-45, "+r.x+", "+r.y+")")):(n=-7.5-(s.width+10)/25*9.5,t=10+s.width/25*8.5,e.attr("transform","translate("+n+", "+t+") rotate(-45, "+i+", "+r.y+")")))},"drawCommitLabel"),X_e=mt((n,a,s,o)=>{if(0{switch(e.customType??e.type){case XEe.NORMAL:return"commit-normal";case XEe.REVERSE:return"commit-reverse";case XEe.HIGHLIGHT:return"commit-highlight";case XEe.MERGE:return"commit-merge";case XEe.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),Z_e=mt((e,t,r,i)=>{var n,a={x:0,y:0};return 0{var r="BT"===$_e&&r?t:t+10,t="TB"===$_e||"BT"===$_e?r:I_e.get(e.branch)?.pos,i="TB"===$_e||"BT"===$_e?I_e.get(e.branch)?.pos:r;if(void 0===i||void 0===t)throw new Error("Position were undefined for commit "+e.id);return{x:i,y:t,posWithOffset:r}},"getCommitPosition"),J_e=mt((e,a,s,o)=>{let l=e.append("g").attr("class","commit-bullets"),c=e.append("g").attr("class","commit-labels"),h="TB"===$_e||"BT"===$_e?30:0,t=[...a.keys()],u=o.parallelCommits??!1,r=mt((e,t)=>(e=a.get(e)?.seq,t=a.get(t)?.seq,void 0!==e&&void 0!==t?e-t:0),"sortKeys"),i=t.sort(r);"BT"===$_e&&(u&&U_e(i,a,h),i=i.reverse()),i.forEach(e=>{var t=a.get(e);if(!t)throw new Error("Commit not found for key "+e);u&&(h=Z_e(t,$_e,h,D_e));var r,i,n,e=Q_e(t,h,u);s&&(r=K_e(t),i=t.customType??t.type,n=I_e.get(t.branch)?.index??0,V_e(l,t,e,r,n,i),H_e(c,t,e,h,o),X_e(c,t,e,h)),"TB"===$_e||"BT"===$_e?D_e.set(t.id,{x:e.x,y:e.posWithOffset}):D_e.set(t.id,{x:e.posWithOffset,y:e.y}),(h="BT"===$_e&&u?h+40:h+40+10)>P_e&&(P_e=h)})},"drawCommits"),eSe=mt((t,r,e,i,n)=>{let a=(("TB"===$_e||"BT"===$_e?e.xe.branch===a,"isOnBranchToGetCurve"),o=mt(e=>e.seq>t.seq&&e.seqo(e)&&s(e))},"shouldRerouteArrow"),tSe=mt((e,t,r=0)=>{let i=e+Math.abs(e-t)/2,n;return 510<=Math.abs(e-i))?(O_e.push(i),i):(n=Math.abs(e-t),tSe(e,t-n/5,r+1))},"findLane"),rSe=mt((e,t,r,i)=>{var n,a=D_e.get(t.id),s=D_e.get(r.id);if(void 0===a||void 0===s)throw new Error(`Commit positions not found for commits ${t.id} and `+r.id);let o=eSe(t,r,a,s,i),l="",c="",h=0,u=0,d=I_e.get(r.branch)?.index;r.type===XEe.MERGE&&t.id!==r.parents[0]&&(d=I_e.get(t.branch)?.index);let p;if(o?(l="A 10 10, 0, 0, 0,",c="A 10 10, 0, 0, 1,",h=10,u=10,i=a.ys.x&&(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,p=r.type===XEe.MERGE&&t.id!==r.parents[0]?`M ${a.x} ${a.y} L ${a.x} ${s.y-h} ${c} ${a.x-u} ${s.y} L ${s.x} `+s.y:`M ${a.x} ${a.y} L ${s.x+h} ${a.y} ${l} ${s.x} ${a.y+u} L ${s.x} `+s.y),a.x===s.x&&(p=`M ${a.x} ${a.y} L ${s.x} `+s.y)):"BT"===$_e?(a.xs.x&&(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,p=r.type===XEe.MERGE&&t.id!==r.parents[0]?`M ${a.x} ${a.y} L ${a.x} ${s.y+h} ${l} ${a.x-u} ${s.y} L ${s.x} `+s.y:`M ${a.x} ${a.y} L ${s.x+h} ${a.y} ${c} ${s.x} ${a.y-u} L ${s.x} `+s.y),a.x===s.x&&(p=`M ${a.x} ${a.y} L ${s.x} `+s.y)):(a.ys.y&&(p=r.type===XEe.MERGE&&t.id!==r.parents[0]?`M ${a.x} ${a.y} L ${s.x-h} ${a.y} ${l} ${s.x} ${a.y-u} L ${s.x} `+s.y:`M ${a.x} ${a.y} L ${a.x} ${s.y+h} ${c} ${a.x+u} ${s.y} L ${s.x} `+s.y),a.y===s.y&&(p=`M ${a.x} ${a.y} L ${s.x} `+s.y))),void 0===p)throw new Error("Line definition not found");e.append("path").attr("d",p).attr("class","arrow arrow"+d%8)},"drawArrow"),iSe=mt((e,r)=>{let i=e.append("g").attr("class","commit-arrows");[...r.keys()].forEach(e=>{let t=r.get(e);t.parents&&0{rSe(i,r.get(e),t,r)})})},"drawArrows"),nSe=mt((e,t,a)=>{let s=e.append("g");t.forEach((e,t)=>{var t=t%8,r=I_e.get(e.name)?.pos;if(void 0===r)throw new Error("Position not found for branch "+e.name);(i=s.append("line")).attr("x1",0),i.attr("y1",r),i.attr("x2",P_e),i.attr("y2",r),i.attr("class","branch branch"+t),"TB"===$_e?(i.attr("y1",30),i.attr("x1",r),i.attr("y2",P_e),i.attr("x2",r)):"BT"===$_e&&(i.attr("y1",P_e),i.attr("x1",r),i.attr("y2",30),i.attr("x2",r)),O_e.push(r);var i=e.name,e=F_e(i),i=s.insert("rect"),n=s.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+t),e=(n.node().appendChild(e),e.getBBox());i.attr("class","branchLabelBkg label"+t).attr("rx",4).attr("ry",4).attr("x",-e.width-4-(!0===a.rotateCommitLabel?30:0)).attr("y",-e.height/2+8).attr("width",e.width+18).attr("height",e.height+4),n.attr("transform","translate("+(-e.width-14-(!0===a.rotateCommitLabel?30:0))+", "+(r-e.height/2-1)+")"),"TB"===$_e?(i.attr("x",r-e.width/2-10).attr("y",0),n.attr("transform","translate("+(r-e.width/2-5)+", 0)")):"BT"===$_e?(i.attr("x",r-e.width/2-10).attr("y",P_e),n.attr("transform","translate("+(r-e.width/2-5)+", "+P_e+")")):i.attr("transform","translate(-19, "+(r-e.height/2)+")")})},"drawBranches"),aSe=mt(function(e,t,r,i,n){return I_e.set(e,{pos:t,index:r}),t+(50+(n?40:0)+("TB"===$_e||"BT"===$_e?i.width/2:0))},"setBranchPosition"),sSe=mt(function(t,r,i,e){if(B_e(),M.debug("in gitgraph renderer",t+` `,"id:",r,i),(t=e.db).getConfig){let e=t.getConfig(),s=e.rotateCommitLabel??!1,o=(M_e=t.getCommits(),i=t.getBranchesAsObjArray(),$_e=t.getDirection(),V(`[id="${r}"]`)),l=0;i.forEach((e,t)=>{var r=F_e(e.name),i=o.append("g"),n=i.insert("g").attr("class","branchLabel"),a=n.insert("g").attr("class","label branch-label"),r=(a.node()?.appendChild(r),r.getBBox());l=aSe(e.name,l,t,r,s),a.remove(),n.remove(),i.remove()}),J_e(o,M_e,!1,e),e.showBranches&&nSe(o,i,e),iSe(o,M_e),J_e(o,M_e,!0,e),sC.insertTitle(o,"gitTitleText",e.titleTopMargin??0,t.getDiagramTitle()),Ih(void 0,o,e.diagramPadding,e.useMaxWidth)}else M.error("getConfig method is not available on db")},"draw"),oSe={draw:sSe}}),pSe=s(()=>{lSe=mt(t=>` .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(e=>` .branch-label${e} { fill: ${t["gitBranchLabel"+e]}; } .commit${e} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; } .commit-highlight${e} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; } .label${e} { fill: ${t["git"+e]}; } .arrow${e} { stroke: ${t["git"+e]}; } `).join(` `)} .branch { stroke-width: 1; stroke: ${t.lineColor}; stroke-dasharray: 2; } .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};} .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; } .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};} .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; } .tag-hole { fill: ${t.textColor}; } .commit-merge { stroke: ${t.primaryColor}; fill: ${t.primaryColor}; } .commit-reverse { stroke: ${t.primaryColor}; fill: ${t.primaryColor}; stroke-width: 3; } .commit-highlight-outer { } .commit-highlight-inner { stroke: ${t.primaryColor}; fill: ${t.primaryColor}; } .arrow { stroke-width: 8; stroke-linecap: round; fill: none} .gitTitleText { text-anchor: middle; font-size: 18px; fill: ${t.textColor}; } `,"getStyles"),cSe=lSe}),gSe={};PGe(gSe,{diagram:()=>fSe});var fSe,mSe,ySe,vSe=s(()=>{uSe(),hSe(),dSe(),pSe(),fSe={parser:N_e,db:k_e,renderer:oSe,styles:cSe}}),bSe=s(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);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],i=[1,26],n=[1,27],a=[1,28],s=[1,29],o=[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],b=[1,16],x=[1,19],T=[1,20],w=[1,21],k=[1,22],E=[1,23],_=[1,25],S=[1,35],i={trace:mt(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:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 1:return a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:i.setWeekday("monday");break;case 9:i.setWeekday("tuesday");break;case 10:i.setWeekday("wednesday");break;case 11:i.setWeekday("thursday");break;case 12:i.setWeekday("friday");break;case 13:i.setWeekday("saturday");break;case 14:i.setWeekday("sunday");break;case 15:i.setWeekend("friday");break;case 16:i.setWeekend("saturday");break;case 17:i.setDateFormat(a[o].substr(11)),this.$=a[o].substr(11);break;case 18:i.enableInclusiveEndDates(),this.$=a[o].substr(18);break;case 19:i.TopAxis(),this.$=a[o].substr(8);break;case 20:i.setAxisFormat(a[o].substr(11)),this.$=a[o].substr(11);break;case 21:i.setTickInterval(a[o].substr(13)),this.$=a[o].substr(13);break;case 22:i.setExcludes(a[o].substr(9)),this.$=a[o].substr(9);break;case 23:i.setIncludes(a[o].substr(9)),this.$=a[o].substr(9);break;case 24:i.setTodayMarker(a[o].substr(12)),this.$=a[o].substr(12);break;case 27:i.setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 28:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 29:case 30:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 31:i.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 33:i.addTask(a[o-1],a[o]),this.$="task";break;case 34:this.$=a[o-1],i.setClickEvent(a[o-1],a[o],null);break;case 35:this.$=a[o-2],i.setClickEvent(a[o-2],a[o-1],a[o]);break;case 36:this.$=a[o-2],i.setClickEvent(a[o-2],a[o-1],null),i.setLink(a[o-2],a[o]);break;case 37:this.$=a[o-3],i.setClickEvent(a[o-3],a[o-2],a[o-1]),i.setLink(a[o-3],a[o]);break;case 38:this.$=a[o-2],i.setClickEvent(a[o-2],a[o],null),i.setLink(a[o-2],a[o-1]);break;case 39:this.$=a[o-3],i.setClickEvent(a[o-3],a[o-1],a[o]),i.setLink(a[o-3],a[o-2]);break;case 40:this.$=a[o-1],i.setLink(a[o-1],a[o]);break;case 41:case 47:this.$=a[o-1]+" "+a[o];break;case 42:case 43:case 45:this.$=a[o-2]+" "+a[o-1]+" "+a[o];break;case 44:case 46:this.$=a[o-3]+" "+a[o-2]+" "+a[o-1]+" "+a[o]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:i,13:n,14:a,15:s,16:o,17:l,18:c,19:18,20:h,21:u,22:d,23:p,24:g,25:f,26:m,27:y,28:v,29:b,30:x,31:T,33:w,35:k,36:E,37:24,38:_,40:S},t(r,[2,7],{1:[2,1]}),t(r,[2,3]),{9:36,11:17,12:i,13:n,14:a,15:s,16:o,17:l,18:c,19:18,20:h,21:u,22:d,23:p,24:g,25:f,26:m,27:y,28:v,29:b,30:x,31:T,33:w,35:k,36:E,37:24,38:_,40:S},t(r,[2,5]),t(r,[2,6]),t(r,[2,17]),t(r,[2,18]),t(r,[2,19]),t(r,[2,20]),t(r,[2,21]),t(r,[2,22]),t(r,[2,23]),t(r,[2,24]),t(r,[2,25]),t(r,[2,26]),t(r,[2,27]),{32:[1,37]},{34:[1,38]},t(r,[2,30]),t(r,[2,31]),t(r,[2,32]),{39:[1,39]},t(r,[2,8]),t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),t(r,[2,12]),t(r,[2,13]),t(r,[2,14]),t(r,[2,15]),t(r,[2,16]),{41:[1,40],43:[1,41]},t(r,[2,4]),t(r,[2,28]),t(r,[2,29]),t(r,[2,33]),t(r,[2,34],{42:[1,42],43:[1,43]}),t(r,[2,40],{41:[1,44]}),t(r,[2,35],{43:[1,45]}),t(r,[2,36]),t(r,[2,38],{42:[1,46]}),t(r,[2,37]),t(r,[2,39])],defaultActions:{},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0{function r(){return function(e,t,n){var a=mt(function(e){return e.add(4-e.isoWeekday(),"day")},"a"),s=((t=t.prototype).isoWeekYear=function(){return a(this).year()},t.isoWeek=function(e){var t,r,i;return this.$utils().u(e)?(r=a(this),i=this.isoWeekYear(),t=4-(i=(this.$u?n.utc:n)().year(i).startOf("year")).isoWeekday(),4{function r(){var o={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},l=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,e=/\d/,t=/\d\d/,r=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,g={},n=mt(function(e){return(e=+e)+(68{try{if(-1<["x","X"].indexOf(t))return new Date(("X"===t?1e3:1)*e);var n=k(t)(e),a=n.year,s=n.month,o=n.day,l=n.hours,c=n.minutes,h=n.seconds,u=n.milliseconds,d=n.zone,p=n.week,g=new Date,f=o||(a||s?1:g.getDate()),m=a||g.getFullYear(),y=0;a&&!s||(y=0{function r(){return function(e,t){var a=(t=t.prototype).format;t.format=function(e){var t,r,i=this,n=this.$locale();return this.isValid()?(t=this.$utils(),r=(e||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(e){switch(e){case"Q":return Math.ceil((i.$M+1)/3);case"Do":return n.ordinal(i.$D);case"gggg":return i.weekYear();case"GGGG":return i.isoWeekYear();case"wo":return n.ordinal(i.week(),"W");case"w":case"ww":return t.s(i.week(),"w"===e?1:2,"0");case"W":case"WW":return t.s(i.isoWeek(),"W"===e?1:2,"0");case"k":case"kk":return t.s(String(0===i.$H?24:i.$H),"k"===e?1:2,"0");case"X":return Math.floor(i.$d.getTime()/1e3);case"x":return i.$d.getTime();case"z":return"["+i.offsetName()+"]";case"zzz":return"["+i.offsetName("long")+"]";default:return e}}),a.bind(this)(r)):a.bind(this)(e)}}}"object"==typeof e&&typeof t<"u"?t.exports=r():"function"==typeof define&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_advancedFormat=r()});function kSe(r,i,e){let n=!0;for(;n;)n=!1,e.forEach(function(e){var t=new RegExp("^\\s*"+e+"\\s*$");r[0].match(t)&&(i[e]=!0,r.shift(1),n=!0)})}var ESe,_Se,SSe,CSe,ASe,RSe,LSe,NSe,ISe,DSe,MSe,OSe,PSe,$Se,BSe,FSe,zSe,qSe,USe,GSe,jSe,WSe,YSe,VSe,HSe,XSe,KSe,ZSe,QSe,JSe,e7e,t7e,r7e,i7e,n7e,a7e,s7e,o7e,l7e,c7e,h7e,u7e,d7e,p7e,g7e,f7e,m7e,y7e,v7e,b7e,x7e,T7e,w7e,k7e,E7e,_7e,S7e,C7e,A7e,R7e,L7e,N7e,I7e,D7e,M7e,O7e,P7e,$7e,B7e,F7e,z7e,q7e,U7e,G7e,j7e,W7e,Y7e,V7e,H7e,X7e,K7e,Z7e=s(()=>{ESe=G(dw(),1),_Se=G(wr(),1),WSe=G(xSe(),1),YSe=G(TSe(),1),VSe=G(wSe(),1),e(),Au(),hC(),Cu(),_Se.default.extend(WSe.default),_Se.default.extend(YSe.default),_Se.default.extend(VSe.default),SSe={friday:5,saturday:6},LSe=ASe=CSe="",NSe=[],ISe=[],DSe=new Map,MSe=[],OSe=[],$Se=PSe="",BSe=["active","done","crit","milestone","vert"],qSe=zSe=!(FSe=[]),USe="sunday",GSe="saturday",jSe=0,WSe=mt(function(){MSe=[],OSe=[],FSe=[],R7e=[],RSe=A7e=C7e=void(k7e=0),LSe=$Se=ASe=CSe=PSe="",NSe=[],qSe=zSe=!(ISe=[]),jSe=0,DSe=new Map,xh(),USe="sunday",GSe="saturday"},"clear"),YSe=mt(function(e){ASe=e},"setAxisFormat"),VSe=mt(function(){return ASe},"getAxisFormat"),HSe=mt(function(e){RSe=e},"setTickInterval"),XSe=mt(function(){return RSe},"getTickInterval"),KSe=mt(function(e){LSe=e},"setTodayMarker"),ZSe=mt(function(){return LSe},"getTodayMarker"),QSe=mt(function(e){CSe=e},"setDateFormat"),JSe=mt(function(){zSe=!0},"enableInclusiveEndDates"),e7e=mt(function(){return zSe},"endDatesAreInclusive"),t7e=mt(function(){qSe=!0},"enableTopAxis"),r7e=mt(function(){return qSe},"topAxisEnabled"),i7e=mt(function(e){$Se=e},"setDisplayMode"),n7e=mt(function(){return $Se},"getDisplayMode"),a7e=mt(function(){return CSe},"getDateFormat"),s7e=mt(function(e){NSe=e.toLowerCase().split(/[\s,]+/)},"setIncludes"),o7e=mt(function(){return NSe},"getIncludes"),l7e=mt(function(e){ISe=e.toLowerCase().split(/[\s,]+/)},"setExcludes"),c7e=mt(function(){return ISe},"getExcludes"),h7e=mt(function(){return DSe},"getLinks"),u7e=mt(function(e){PSe=e,MSe.push(e)},"addSection"),d7e=mt(function(){return MSe},"getSections"),p7e=mt(function(){let e=M7e(),t=0;for(;!e&&t<10;)e=M7e(),t++;return OSe=R7e},"getTasks"),g7e=mt(function(e,t,r,i){var t=e.format(t.trim()),n=e.format("YYYY-MM-DD");return!i.includes(t)&&!i.includes(n)&&(!((!r.includes("weekends")||e.isoWeekday()!==SSe[GSe]&&e.isoWeekday()!==SSe[GSe]+1)&&!r.includes(e.format("dddd").toLowerCase()))||r.includes(t)||r.includes(n))},"isInvalidDate"),f7e=mt(function(e){USe=e},"setWeekday"),m7e=mt(function(){return USe},"getWeekday"),y7e=mt(function(e){GSe=e},"setWeekend"),v7e=mt(function(t,r,i,n){if(i.length&&!t.manualEndTime){let e;e=(e=t.startTime instanceof Date?(0,_Se.default)(t.startTime):(0,_Se.default)(t.startTime,r,!0)).add(1,"d");var a=t.endTime instanceof Date?(0,_Se.default)(t.endTime):(0,_Se.default)(t.endTime,r,!0),[r,i]=b7e(e,a,r,i,n);t.endTime=r.toDate(),t.renderEndTime=i}},"checkTaskDates"),b7e=mt(function(e,t,r,i,n){let a=!1,s=null;for(;e<=t;)a||(s=t.toDate()),(a=g7e(e,r,i,n))&&(t=t.add(1,"d")),e=e.add(1,"d");return[t,s]},"fixTaskDates"),x7e=mt(function(e,t,r){if(r=r.trim(),mt(e=>"x"===(e=e.trim())||"X"===e,"isTimestampFormat")(t)&&/^\d+$/.test(r))return new Date(Number(r));var i=/^after\s+(?[\d\w- ]+)/.exec(r);if(null!==i){let e=null;for(var n of i.groups.ids.split(" "))void 0!==(n=I7e(n))&&(!e||n.endTime>e.endTime)&&(e=n);return e?e.endTime:((i=new Date).setHours(0,0,0,0),i)}if((i=(0,_Se.default)(r,t.trim(),!0)).isValid())return i.toDate();if(M.debug("Invalid date:"+r),M.debug("With date format:"+t.trim()),void 0===(i=new Date(r))||isNaN(i.getTime())||i.getFullYear()<-1e4||1e4[\d\w- ]+)/.exec(r);if(null!==n){let e=null;for(var a of n.groups.ids.split(" "))void 0!==(a=I7e(a))&&(!e||a.startTime{window.open(r,"_self")}),DSe.set(e,r))}),P7e(e,"clickable")},"setLink"),P7e=mt(function(e,t){e.split(",").forEach(function(e){void 0!==(e=I7e(e))&&e.classes.push(t)})},"setClass"),$7e=mt(function(e,t,i){if("loose"===O().securityLevel&&void 0!==t){let r=[];if("string"==typeof i){r=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t{sC.runFunc(t,...r)})}},"setClickFun"),B7e=mt(function(t,r){FSe.push(function(){var e=document.querySelector(`[id="${t}"]`);null!==e&&e.addEventListener("click",function(){r()})},function(){var e=document.querySelector(`[id="${t}-text"]`);null!==e&&e.addEventListener("click",function(){r()})})},"pushFun"),F7e=mt(function(e,t,r){e.split(",").forEach(function(e){$7e(e,t,r)}),P7e(e,"clickable")},"setClickEvent"),z7e=mt(function(t){FSe.forEach(function(e){e(t)})},"bindFunctions"),q7e={getConfig:mt(()=>O().gantt,"getConfig"),clear:WSe,setDateFormat:QSe,getDateFormat:a7e,enableInclusiveEndDates:JSe,endDatesAreInclusive:e7e,enableTopAxis:t7e,topAxisEnabled:r7e,setAxisFormat:YSe,getAxisFormat:VSe,setTickInterval:HSe,getTickInterval:XSe,setTodayMarker:KSe,getTodayMarker:ZSe,setAccTitle:Th,getAccTitle:wh,setDiagramTitle:_h,getDiagramTitle:Sh,setDisplayMode:i7e,getDisplayMode:n7e,setAccDescription:kh,getAccDescription:Eh,addSection:u7e,getSections:d7e,getTasks:p7e,addTask:N7e,findTaskById:I7e,addTaskOrg:D7e,setIncludes:s7e,getIncludes:o7e,setExcludes:l7e,getExcludes:c7e,setClickEvent:F7e,setLink:O7e,getLinks:h7e,bindFunctions:z7e,parseDuration:T7e,isInvalidDate:g7e,setWeekday:f7e,getWeekday:m7e,setWeekend:y7e},mt(kSe,"getTaskTags")}),Q7e=NGe((e,t)=>{function r(){var a,s,e,t=/\[([^\]]+)]|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,n=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,o={years:31536e6,months:2628e6,days:864e5,hours:36e5,minutes:6e4,seconds:1e3,milliseconds:1,weeks:6048e5},l=mt(function(e){return e instanceof p},"c"),c=mt(function(e,t,r){return new p(e,r,t.$l)},"f"),h=mt(function(e){return s.p(e)+"s"},"m"),r=mt(function(e){return e<0},"l"),i=mt(function(e){return r(e)?Math.ceil(e):Math.floor(e)},"$"),u=mt(function(e){return Math.abs(e)},"y"),d=mt(function(e,t){return e?r(e)?{negative:!0,format:""+u(e)+t}:{negative:!1,format:""+e+t}:{negative:!1,format:""}},"v"),p=(mt(f,"l"),(e=f.prototype).calMilliseconds=function(){var r=this;this.$ms=Object.keys(this.$d).reduce(function(e,t){return e+(r.$d[t]||0)*o[t]},0)},e.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=i(e/31536e6),this.$d.months=i((e%=31536e6)/2628e6),this.$d.days=i((e%=2628e6)/864e5),this.$d.hours=i((e%=864e5)/36e5),this.$d.minutes=i((e%=36e5)/6e4),this.$d.seconds=i((e%=6e4)/1e3),this.$d.milliseconds=e%=1e3},e.toISOString=function(){var e=d(this.$d.years,"Y"),t=d(this.$d.months,"M"),r=+this.$d.days||0,r=(this.$d.weeks&&(r+=7*this.$d.weeks),d(r,"D")),i=d(this.$d.hours,"H"),n=d(this.$d.minutes,"M"),a=this.$d.seconds||0,a=(this.$d.milliseconds&&(a+=this.$d.milliseconds/1e3,a=Math.round(1e3*a)/1e3),d(a,"S")),s=e.negative||t.negative||r.negative||i.negative||n.negative||a.negative,o=i.format||n.format||a.format?"T":"";return"P"==(s=(s?"-":"")+"P"+e.format+t.format+r.format+o+i.format+n.format+a.format)||"-P"==s?"P0D":s},e.toJSON=function(){return this.toISOString()},e.format=function(e){var e=e||"YYYY-MM-DDTHH:mm:ss",r={Y:this.$d.years,YY:s.s(this.$d.years,2,"0"),YYYY:s.s(this.$d.years,4,"0"),M:this.$d.months,MM:s.s(this.$d.months,2,"0"),D:this.$d.days,DD:s.s(this.$d.days,2,"0"),H:this.$d.hours,HH:s.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:s.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:s.s(this.$d.seconds,2,"0"),SSS:s.s(this.$d.milliseconds,3,"0")};return e.replace(t,function(e,t){return t||String(r[e])})},e.as=function(e){return this.$ms/o[h(e)]},e.get=function(e){var t=this.$ms;return"milliseconds"===(e=h(e))?t%=1e3:t="weeks"===e?i(t/o[e]):this.$d[e],t||0},e.add=function(e,t,r){return t=t?e*o[h(t)]:(l(e)?e:c(e,this)).$ms,c(this.$ms+t*(r?-1:1),this)},e.subtract=function(e,t){return this.add(e,t,!0)},e.locale=function(e){var t=this.clone();return t.$l=e,t},e.clone=function(){return c(this.$ms,this)},e.humanize=function(e){return a().add(this.$ms,"ms").locale(this.$l).fromNow(!e)},e.valueOf=function(){return this.asMilliseconds()},e.milliseconds=function(){return this.get("milliseconds")},e.asMilliseconds=function(){return this.as("milliseconds")},e.seconds=function(){return this.get("seconds")},e.asSeconds=function(){return this.as("seconds")},e.minutes=function(){return this.get("minutes")},e.asMinutes=function(){return this.as("minutes")},e.hours=function(){return this.get("hours")},e.asHours=function(){return this.as("hours")},e.days=function(){return this.get("days")},e.asDays=function(){return this.as("days")},e.weeks=function(){return this.get("weeks")},e.asWeeks=function(){return this.as("weeks")},e.months=function(){return this.get("months")},e.asMonths=function(){return this.as("months")},e.years=function(){return this.get("years")},e.asYears=function(){return this.as("years")},f),g=mt(function(e,t,r){return e.add(t.years()*r,"y").add(t.months()*r,"M").add(t.days()*r,"d").add(t.hours()*r,"h").add(t.minutes()*r,"m").add(t.seconds()*r,"s").add(t.milliseconds()*r,"ms")},"p");function f(t,e,r){var i=this;return this.$d={},this.$l=r,void 0===t&&(this.$ms=0,this.parseFromMilliseconds()),e?c(t*o[h(e)],this):("number"==typeof t?(this.$ms=t,this.parseFromMilliseconds()):"object"==typeof t?(Object.keys(t).forEach(function(e){i.$d[h(e)]=t[e]}),this.calMilliseconds()):"string"==typeof t&&(r=t.match(n))&&(e=r.slice(2).map(function(e){return null!=e?Number(e):0}),this.$d.years=e[0],this.$d.months=e[1],this.$d.weeks=e[2],this.$d.days=e[3],this.$d.hours=e[4],this.$d.minutes=e[5],this.$d.seconds=e[6],this.calMilliseconds()),this)}return function(e,t,i){s=(a=i)().$utils(),i.duration=function(e,t){var r=i.locale();return c(e,{$l:r},t)},i.isDuration=l;var r=t.prototype.add,n=t.prototype.subtract;t.prototype.add=function(e,t){return l(e)?g(this,e,1):r.bind(this)(e,t)},t.prototype.subtract=function(e,t){return l(e)?g(this,e,-1):n.bind(this)(e,t)}}}"object"==typeof e&&typeof t<"u"?t.exports=r():"function"==typeof define&&define.amd?define(r):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_duration=r()}),J7e=s(()=>{U7e=G(wr(),1),G7e=G(Q7e(),1),e(),hw(),zc(),Au(),ph(),U7e.default.extend(G7e.default),G7e=mt(function(){M.debug("Something is calling, setConf, remove the call")},"setConf"),j7e={monday:fx,tuesday:mx,wednesday:yx,thursday:vx,friday:bx,saturday:xx,sunday:gx},W7e=mt((e,t)=>{let r=[...e].map(()=>-1/0),i=[...e].sort((e,t)=>e.startTime-t.startTime||e.order-t.order),n=0;for(var a of i)for(let e=0;e=r[e]){r[e]=a.endTime,a.order=e+t,e>n&&(n=e);break}return n},"getMaxIntersections"),V7e=mt(function(e,l,t,g){let f=O().gantt,r=O().securityLevel,i,n=("sandbox"===r&&(i=V("#i"+l)),V("sandbox"===r?i.nodes()[0].contentDocument.body:"body")),s="sandbox"===r?i.nodes()[0].contentDocument:document,a=s.getElementById(l),u=(void 0===(Y7e=a.parentElement.offsetWidth)&&(Y7e=1200),void 0!==f.useWidth&&(Y7e=f.useWidth),g.db.getTasks()),d=[];for(var o of u)d.push(o.type);d=R(d);let c={},h=2*f.topPadding;if("compact"===g.db.getDisplayMode()||"compact"===f.displayMode){var p,m,y={};for(p of u)void 0===y[p.section]?y[p.section]=[p]:y[p.section].push(p);let e=0;for(m of Object.keys(y)){var v=W7e(y[m],e)+1;e+=v,h+=v*(f.barHeight+f.barGap),c[m]=v}}else{h+=u.length*(f.barHeight+f.barGap);for(let t of d)c[t]=u.filter(e=>e.type===t).length}a.setAttribute("viewBox","0 0 "+Y7e+" "+h);let b=n.select(`[id="${l}"]`),x=v5().domain([nd(u,function(e){return e.startTime}),rd(u,function(e){return e.endTime})]).rangeRound([0,Y7e-f.leftPadding-f.rightPadding]);function T(e,t){let r=e.startTime,i=t.startTime,n=0;return ie.vert===t.vert?0:e.vert?1:-1);var a=[...new Set(e.map(e=>e.order))].map(t=>e.find(e=>e.order===t));b.append("g").selectAll("rect").data(a).enter().append("rect").attr("x",0).attr("y",function(e,t){return e.order*r+i-2}).attr("width",function(){return h-f.rightPadding/2}).attr("height",r).attr("class",function(e){for(var[t,r]of d.entries())if(e.type===r)return"section section"+t%f.numberSectionStyles;return"section section0"}).enter();let s=b.append("g").selectAll("rect").data(e).enter(),o=g.db.getLinks();if(s.append("rect").attr("id",function(e){return e.id}).attr("rx",3).attr("ry",3).attr("x",function(e){return e.milestone?x(e.startTime)+n+.5*(x(e.endTime)-x(e.startTime))-.5*c:x(e.startTime)+n}).attr("y",function(e,t){return t=e.order,e.vert?f.gridLineStartPadding:t*r+i}).attr("width",function(e){return e.milestone?c:e.vert?.08*c:x(e.renderEndTime||e.endTime)-x(e.startTime)}).attr("height",function(e){return e.vert?u.length*(f.barHeight+f.barGap)+2*f.barHeight:c}).attr("transform-origin",function(e,t){return t=e.order,(x(e.startTime)+n+.5*(x(e.endTime)-x(e.startTime))).toString()+"px "+(t*r+i+.5*c).toString()+"px"}).attr("class",function(e){let t="",r=(0r-t?r+e+1.5*f.leftPadding>h?t+n-5:r+n+5:(r-t)/2+t+n}).attr("y",function(e,t){return e.vert?f.gridLineStartPadding+u.length*(f.barHeight+f.barGap)+60:e.order*r+f.barHeight/2+(f.fontSize/2-2)+i}).attr("text-height",c).attr("class",function(e){let t=x(e.startTime),r=x(e.endTime),i=(e.milestone&&(r=t+c),this.getBBox().width),n="",a=(0r-t?r+i+1.5*f.leftPadding>h?n+" taskTextOutsideLeft taskTextOutside"+a+" "+l:n+" taskTextOutsideRight taskTextOutside"+a+" "+l+" width-"+i:n+" taskText taskText"+a+" "+l+" width-"+i}),"sandbox"===O().securityLevel){let a=V("#i"+l).nodes()[0].contentDocument;s.filter(function(e){return o.has(e.id)}).each(function(e){var t=a.querySelector("#"+e.id),r=a.querySelector("#"+e.id+"-text"),i=t.parentNode,n=a.createElement("a");n.setAttribute("xlink:href",o.get(e.id)),n.setAttribute("target","_top"),i.appendChild(n),n.appendChild(t),n.appendChild(r)})}}function E(s,o,l,e,c,t,h,u){if(0!==h.length||0!==u.length){let n,a;for(var{startTime:r,endTime:i}of t)(void 0===n||ra)&&(a=i);if(n&&a)if(5<(0,U7e.default)(a).diff((0,U7e.default)(n),"year"))M.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");else{let e=g.db.getDateFormat(),t=[],r=null,i=(0,U7e.default)(n);for(;i.valueOf()<=a;)g.db.isInvalidDate(i,e,h,u)?r?r.end=i:r={start:i,end:i}:r&&(t.push(r),r=null),i=i.add(1,"d");b.append("g").selectAll("rect").data(t).enter().append("rect").attr("id",e=>"exclude-"+e.start.format("YYYY-MM-DD")).attr("x",e=>x(e.start.startOf("day"))+l).attr("y",f.gridLineStartPadding).attr("width",e=>x(e.end.endOf("day"))-x(e.start.startOf("day"))).attr("height",c-o-f.gridLineStartPadding).attr("transform-origin",function(e,t){return(x(e.start)+l+.5*(x(e.end)-x(e.start))).toString()+"px "+(t*s+.5*c).toString()+"px"}).attr("class","exclude-range")}}}function _(e,t,r,i){return r<=0||t[e,c[e]]);b.append("g").selectAll("text").data(a).enter().append(function(e){var t,r,i=-((e=e[0].split(L.lineBreakRegex)).length-1)/2,n=s.createElementNS("http://www.w3.org/2000/svg","text");n.setAttribute("dy",i+"em");for([t,r]of e.entries()){var a=s.createElementNS("http://www.w3.org/2000/svg","tspan");a.setAttribute("alignment-baseline","central"),a.setAttribute("x","10"),0{X7e=mt(e=>` .mermaid-main-font { font-family: ${e.fontFamily}; } .exclude-range { fill: ${e.excludeBkgColor}; } .section { stroke: none; opacity: 0.2; } .section0 { fill: ${e.sectionBkgColor}; } .section2 { fill: ${e.sectionBkgColor2}; } .section1, .section3 { fill: ${e.altSectionBkgColor}; opacity: 0.2; } .sectionTitle0 { fill: ${e.titleColor}; } .sectionTitle1 { fill: ${e.titleColor}; } .sectionTitle2 { fill: ${e.titleColor}; } .sectionTitle3 { fill: ${e.titleColor}; } .sectionTitle { text-anchor: start; font-family: ${e.fontFamily}; } /* Grid and axis */ .grid .tick { stroke: ${e.gridColor}; opacity: 0.8; shape-rendering: crispEdges; } .grid .tick text { font-family: ${e.fontFamily}; fill: ${e.textColor}; } .grid path { stroke-width: 0; } /* Today line */ .today { fill: none; stroke: ${e.todayLineColor}; stroke-width: 2px; } /* Task styling */ /* Default task */ .task { stroke-width: 2; } .taskText { text-anchor: middle; font-family: ${e.fontFamily}; } .taskTextOutsideRight { fill: ${e.taskTextDarkColor}; text-anchor: start; font-family: ${e.fontFamily}; } .taskTextOutsideLeft { fill: ${e.taskTextDarkColor}; text-anchor: end; } /* Special case clickable */ .task.clickable { cursor: pointer; } .taskText.clickable { cursor: pointer; fill: ${e.taskTextClickableColor} !important; font-weight: bold; } .taskTextOutsideLeft.clickable { cursor: pointer; fill: ${e.taskTextClickableColor} !important; font-weight: bold; } .taskTextOutsideRight.clickable { cursor: pointer; fill: ${e.taskTextClickableColor} !important; font-weight: bold; } /* Specific task settings for the sections*/ .taskText0, .taskText1, .taskText2, .taskText3 { fill: ${e.taskTextColor}; } .task0, .task1, .task2, .task3 { fill: ${e.taskBkgColor}; stroke: ${e.taskBorderColor}; } .taskTextOutside0, .taskTextOutside2 { fill: ${e.taskTextOutsideColor}; } .taskTextOutside1, .taskTextOutside3 { fill: ${e.taskTextOutsideColor}; } /* Active task */ .active0, .active1, .active2, .active3 { fill: ${e.activeTaskBkgColor}; stroke: ${e.activeTaskBorderColor}; } .activeText0, .activeText1, .activeText2, .activeText3 { fill: ${e.taskTextDarkColor} !important; } /* Completed task */ .done0, .done1, .done2, .done3 { stroke: ${e.doneTaskBorderColor}; fill: ${e.doneTaskBkgColor}; stroke-width: 2; } .doneText0, .doneText1, .doneText2, .doneText3 { fill: ${e.taskTextDarkColor} !important; } /* Done task text displayed outside the bar sits against the diagram background, not against the done-task bar, so it must use the outside/contrast color. */ .doneText0.taskTextOutsideLeft, .doneText0.taskTextOutsideRight, .doneText1.taskTextOutsideLeft, .doneText1.taskTextOutsideRight, .doneText2.taskTextOutsideLeft, .doneText2.taskTextOutsideRight, .doneText3.taskTextOutsideLeft, .doneText3.taskTextOutsideRight { fill: ${e.taskTextOutsideColor} !important; } /* Tasks on the critical line */ .crit0, .crit1, .crit2, .crit3 { stroke: ${e.critBorderColor}; fill: ${e.critBkgColor}; stroke-width: 2; } .activeCrit0, .activeCrit1, .activeCrit2, .activeCrit3 { stroke: ${e.critBorderColor}; fill: ${e.activeTaskBkgColor}; stroke-width: 2; } .doneCrit0, .doneCrit1, .doneCrit2, .doneCrit3 { stroke: ${e.critBorderColor}; fill: ${e.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: ${e.taskTextDarkColor} !important; } /* Done-crit task text outside the bar — same reasoning as doneText above. */ .doneCritText0.taskTextOutsideLeft, .doneCritText0.taskTextOutsideRight, .doneCritText1.taskTextOutsideLeft, .doneCritText1.taskTextOutsideRight, .doneCritText2.taskTextOutsideLeft, .doneCritText2.taskTextOutsideRight, .doneCritText3.taskTextOutsideLeft, .doneCritText3.taskTextOutsideRight { fill: ${e.taskTextOutsideColor} !important; } .vert { stroke: ${e.vertLineColor}; } .vertText { font-size: 15px; text-anchor: middle; fill: ${e.vertLineColor} !important; } .activeCritText0, .activeCritText1, .activeCritText2, .activeCritText3 { fill: ${e.taskTextDarkColor} !important; } .titleText { text-anchor: middle; font-size: 18px; fill: ${e.titleColor||e.textColor}; font-family: ${e.fontFamily}; } `,"getStyles"),K7e=X7e}),tCe={};PGe(tCe,{diagram:()=>rCe});var rCe,iCe,nCe,aCe,sCe,oCe,lCe,cCe,hCe=s(()=>{bSe(),Z7e(),J7e(),eCe(),rCe={parser:ySe,db:q7e,renderer:H7e,styles:K7e}}),uCe=s(()=>{VEe(),e(),iCe={parse:mt(async e=>{e=await GEe("info",e),M.debug(e)},"parse")}}),dCe=s(()=>{nCe={version:"11.13.0"},aCe=mt(()=>nCe.version,"getVersion"),sCe={getVersion:aCe}}),pCe=s(()=>{hw(),Au(),oCe=mt(e=>{let t=O().securityLevel,r=V("body"),i;return"sandbox"===t&&(i=V("#i"+e).node()?.contentDocument??document,r=V(i.body)),r.select("#"+e)},"selectSvgElement")}),gCe=s(()=>{e(),pCe(),ph(),lCe=mt((e,t,r)=>{M.debug(`rendering info diagram `+e),e=oCe(t),rh(e,100,400,!0),e.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"),cCe={draw:lCe}}),fCe={};PGe(fCe,{diagram:()=>mCe});var mCe,yCe,vCe,bCe,xCe,TCe,wCe,kCe,ECe,_Ce,SCe,CCe,ACe,RCe,LCe,NCe,ICe,DCe,MCe,OCe=s(()=>{uCe(),dCe(),gCe(),mCe={parser:iCe,db:sCe,renderer:cCe}}),PCe=s(()=>{e(),Cu(),si(),TCe=Ht.pie,yCe={sections:new Map,showData:!1,config:TCe},vCe=yCe.sections,bCe=yCe.showData,xCe=structuredClone(TCe),TCe=mt(()=>structuredClone(xCe),"getConfig"),wCe=mt(()=>{vCe=new Map,bCe=yCe.showData,xh()},"clear"),kCe=mt(({label:e,value:t})=>{if(t<0)throw new Error(`"${e}" has invalid value: ${t}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);vCe.has(e)||(vCe.set(e,t),M.debug(`added new section: ${e}, with value: `+t))},"addSection"),ECe=mt(()=>vCe,"getSections"),_Ce=mt(e=>{bCe=e},"setShowData"),SCe=mt(()=>bCe,"getShowData"),CCe={getConfig:TCe,clear:wCe,setDiagramTitle:_h,getDiagramTitle:Sh,setAccTitle:Th,getAccTitle:wh,setAccDescription:kh,getAccDescription:Eh,addSection:kCe,getSections:ECe,setShowData:_Ce,getShowData:SCe}}),$Ce=s(()=>{VEe(),e(),ZEe(),PCe(),ACe=mt((e,t)=>{HEe(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},"populateDb"),RCe={parse:mt(async e=>{e=await GEe("pie",e),M.debug(e),ACe(e,CCe)},"parse")}}),BCe=s(()=>{LCe=mt(e=>` .pieCircle{ stroke: ${e.pieStrokeColor}; stroke-width : ${e.pieStrokeWidth}; opacity : ${e.pieOpacity}; } .pieOuterCircle{ stroke: ${e.pieOuterStrokeColor}; stroke-width: ${e.pieOuterStrokeWidth}; fill: none; } .pieTitleText { text-anchor: middle; font-size: ${e.pieTitleTextSize}; fill: ${e.pieTitleTextColor}; font-family: ${e.fontFamily}; } .slice { font-family: ${e.fontFamily}; fill: ${e.pieSectionTextColor}; font-size:${e.pieSectionTextSize}; // fill: white; } .legend text { fill: ${e.pieLegendTextColor}; font-family: ${e.fontFamily}; font-size: ${e.pieLegendTextSize}; } `,"getStyles"),NCe=LCe}),FCe=s(()=>{hw(),Au(),e(),pCe(),ph(),hC(),ICe=mt(e=>{let t=[...e.values()].reduce((e,t)=>e+t,0),r=[...e.entries()].map(([e,t])=>({label:e,value:t})).filter(e=>1<=e.value/t*100).sort((e,t)=>t.value-e.value);return p3().value(e=>e.value)(r)},"createPieArcs"),DCe=mt((e,t,r,i)=>{M.debug(`rendering pie chart `+e);let n=i.db,a=O(),s=I7(n.getConfig(),a.pie),o=oCe(t),l=o.append("g");l.attr("transform","translate(225,225)");var e=a.themeVariables,[i]=aC(e.pieOuterStrokeWidth);i??=2;let c=s.textPosition,h=Math.min(450,450)/2-40,u=Z5().innerRadius(0).outerRadius(h),d=Z5().innerRadius(h*c).outerRadius(h*c),p=(l.append("circle").attr("cx",0).attr("cy",0).attr("r",h+i/2).attr("class","pieOuterCircle"),n.getSections()),g=ICe(p),f=[e.pie1,e.pie2,e.pie3,e.pie4,e.pie5,e.pie6,e.pie7,e.pie8,e.pie9,e.pie10,e.pie11,e.pie12],m=0,y=(p.forEach(e=>{m+=e}),g.filter(e=>"0"!==(e.data.value/m*100).toFixed(0))),v=wb(f),b=(l.selectAll("mySlices").data(y).enter().append("path").attr("d",u).attr("fill",e=>v(e.data.label)).attr("class","pieCircle"),l.selectAll("mySlices").data(y).enter().append("text").text(e=>(e.data.value/m*100).toFixed(0)+"%").attr("transform",e=>"translate("+d.centroid(e)+")").style("text-anchor","middle").attr("class","slice"),l.append("text").text(n.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText"),[...p.entries()].map(([e,t])=>({label:e,value:t}))),x=l.selectAll(".legend").data(b).enter().append("g").attr("class","legend").attr("transform",(e,t)=>"translate(216,"+(22*t-22*b.length/2)+")");x.append("rect").attr("width",18).attr("height",18).style("fill",e=>v(e.label)).style("stroke",e=>v(e.label)),x.append("text").attr("x",22).attr("y",14).text(e=>n.getShowData()?e.label+` [${e.value}]`:e.label),t=512+Math.max(...x.selectAll("text").nodes().map(e=>e?.getBoundingClientRect().width??0)),o.attr("viewBox",`0 0 ${t} 450`),rh(o,450,t,s.useMaxWidth)},"draw"),MCe={draw:DCe}}),zCe={};PGe(zCe,{diagram:()=>qCe});var qCe,UCe,GCe,jCe,WCe,YCe=s(()=>{$Ce(),PCe(),BCe(),FCe(),qCe={parser:RCe,db:CCe,renderer:MCe,styles:NCe}}),VCe=s(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[1,3],i=[1,4],n=[1,5],a=[1,6],s=[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],$=[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],o=[55,56,57],B=[2,36],l=[1,37],c=[1,36],h=[1,38],u=[1,35],d=[1,43],p=[1,41],F=[1,14],z=[1,23],q=[1,18],U=[1,19],G=[1,20],j=[1,21],W=[1,22],Y=[1,24],V=[1,25],H=[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],b=[1,42],x=[1,44],T=[1,62],w=[1,61],k=[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],ee=[1,67],te=[1,68],re=[1,69],ie=[1,70],ne=[1,71],ae=[1,72],se=[1,73],oe=[1,74],le=[1,75],ce=[1,76],E=[4,5,6,7,8,9,10,11,12,13,14,15,18],_=[1,90],S=[1,91],C=[1,92],A=[1,99],R=[1,93],L=[1,96],N=[1,94],I=[1,95],D=[1,97],M=[1,98],he=[1,102],ue=[10,55,56,57],O=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],r={trace:mt(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:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 23:this.$=a[o];break;case 24:this.$=a[o-1]+""+a[o];break;case 26:this.$=a[o-1]+a[o];break;case 27:this.$=[a[o].trim()];break;case 28:a[o-2].push(a[o].trim()),this.$=a[o-2];break;case 29:this.$=a[o-4],i.addClass(a[o-2],a[o]);break;case 37:this.$=[];break;case 42:this.$=a[o].trim(),i.setDiagramTitle(this.$);break;case 43:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 44:case 45:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 46:i.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 47:i.addPoint(a[o-3],"",a[o-1],a[o],[]);break;case 48:i.addPoint(a[o-4],a[o-3],a[o-1],a[o],[]);break;case 49:i.addPoint(a[o-4],"",a[o-2],a[o-1],a[o]);break;case 50:i.addPoint(a[o-5],a[o-4],a[o-2],a[o-1],a[o]);break;case 51:i.setXAxisLeftText(a[o-2]),i.setXAxisRightText(a[o]);break;case 52:a[o-1].text+=" ⟶ ",i.setXAxisLeftText(a[o-1]);break;case 53:i.setXAxisLeftText(a[o]);break;case 54:i.setYAxisBottomText(a[o-2]),i.setYAxisTopText(a[o]);break;case 55:a[o-1].text+=" ⟶ ",i.setYAxisBottomText(a[o-1]);break;case 56:i.setYAxisBottomText(a[o]);break;case 57:i.setQuadrant1Text(a[o]);break;case 58:i.setQuadrant2Text(a[o]);break;case 59:i.setQuadrant3Text(a[o]);break;case 60:i.setQuadrant4Text(a[o]);break;case 64:this.$={text:a[o],type:"text"};break;case 65:this.$={text:a[o-1].text+""+a[o],type:a[o-1].type};break;case 66:this.$={text:a[o],type:"text"};break;case 67:this.$={text:a[o],type:"markdown"};break;case 68:this.$=a[o];break;case 69:this.$=a[o-1]+""+a[o]}},"anonymous"),table:[{18:r,26:1,27:2,28:i,55:n,56:a,57:s},{1:[3]},{18:r,26:8,27:2,28:i,55:n,56:a,57:s},{18:r,26:9,27:2,28:i,55:n,56:a,57:s},t(P,[2,33],{29:10}),t($,[2,61]),t($,[2,62]),t($,[2,63]),{1:[2,30]},{1:[2,31]},t(o,B,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:l,5:c,10:h,12:u,13:d,14:p,18:F,25:z,35:q,37:U,39:G,41:j,42:W,48:Y,50:V,51:H,52:X,53:K,54:Z,60:g,61:f,63:m,64:y,65:v,66:b,67:x}),t(P,[2,34]),{27:45,55:n,56:a,57:s},t(o,[2,37]),t(o,B,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:l,5:c,10:h,12:u,13:d,14:p,18:F,25:z,35:q,37:U,39:G,41:j,42:W,48:Y,50:V,51:H,52:X,53:K,54:Z,60:g,61:f,63:m,64:y,65:v,66:b,67:x}),t(o,[2,39]),t(o,[2,40]),t(o,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(o,[2,45]),t(o,[2,46]),{18:[1,50]},{4:l,5:c,10:h,12:u,13:d,14:p,43:51,58:31,60:g,61:f,63:m,64:y,65:v,66:b,67:x},{4:l,5:c,10:h,12:u,13:d,14:p,43:52,58:31,60:g,61:f,63:m,64:y,65:v,66:b,67:x},{4:l,5:c,10:h,12:u,13:d,14:p,43:53,58:31,60:g,61:f,63:m,64:y,65:v,66:b,67:x},{4:l,5:c,10:h,12:u,13:d,14:p,43:54,58:31,60:g,61:f,63:m,64:y,65:v,66:b,67:x},{4:l,5:c,10:h,12:u,13:d,14:p,43:55,58:31,60:g,61:f,63:m,64:y,65:v,66:b,67:x},{4:l,5:c,10:h,12:u,13:d,14:p,43:56,58:31,60:g,61:f,63:m,64:y,65:v,66:b,67:x},{4:l,5:c,8:T,10:h,12:u,13:d,14:p,18:w,44:[1,57],47:[1,58],58:60,59:59,63:m,64:y,65:v,66:b,67:x},t(k,[2,64]),t(k,[2,66]),t(k,[2,67]),t(k,[2,70]),t(k,[2,71]),t(k,[2,72]),t(k,[2,73]),t(k,[2,74]),t(k,[2,75]),t(k,[2,76]),t(k,[2,77]),t(k,[2,78]),t(k,[2,79]),t(k,[2,80]),t(P,[2,35]),t(o,[2,38]),t(o,[2,42]),t(o,[2,43]),t(o,[2,44]),{3:64,4:Q,5:J,6:ee,7:te,8:re,9:ie,10:ne,11:ae,12:se,13:oe,14:le,15:ce,21:63},t(o,[2,53],{59:59,58:60,4:l,5:c,8:T,10:h,12:u,13:d,14:p,18:w,49:[1,77],63:m,64:y,65:v,66:b,67:x}),t(o,[2,56],{59:59,58:60,4:l,5:c,8:T,10:h,12:u,13:d,14:p,18:w,49:[1,78],63:m,64:y,65:v,66:b,67:x}),t(o,[2,57],{59:59,58:60,4:l,5:c,8:T,10:h,12:u,13:d,14:p,18:w,63:m,64:y,65:v,66:b,67:x}),t(o,[2,58],{59:59,58:60,4:l,5:c,8:T,10:h,12:u,13:d,14:p,18:w,63:m,64:y,65:v,66:b,67:x}),t(o,[2,59],{59:59,58:60,4:l,5:c,8:T,10:h,12:u,13:d,14:p,18:w,63:m,64:y,65:v,66:b,67:x}),t(o,[2,60],{59:59,58:60,4:l,5:c,8:T,10:h,12:u,13:d,14:p,18:w,63:m,64:y,65:v,66:b,67:x}),{45:[1,79]},{44:[1,80]},t(k,[2,65]),t(k,[2,81]),t(k,[2,82]),t(k,[2,83]),{3:82,4:Q,5:J,6:ee,7:te,8:re,9:ie,10:ne,11:ae,12:se,13:oe,14:le,15:ce,18:[1,81]},t(E,[2,23]),t(E,[2,1]),t(E,[2,2]),t(E,[2,3]),t(E,[2,4]),t(E,[2,5]),t(E,[2,6]),t(E,[2,7]),t(E,[2,8]),t(E,[2,9]),t(E,[2,10]),t(E,[2,11]),t(E,[2,12]),t(o,[2,52],{58:31,43:83,4:l,5:c,10:h,12:u,13:d,14:p,60:g,61:f,63:m,64:y,65:v,66:b,67:x}),t(o,[2,55],{58:31,43:84,4:l,5:c,10:h,12:u,13:d,14:p,60:g,61:f,63:m,64:y,65:v,66:b,67:x}),{46:[1,85]},{45:[1,86]},{4:_,5:S,6:C,8:A,11:R,13:L,16:89,17:N,18:I,19:D,20:M,22:88,23:87},t(E,[2,24]),t(o,[2,51],{59:59,58:60,4:l,5:c,8:T,10:h,12:u,13:d,14:p,18:w,63:m,64:y,65:v,66:b,67:x}),t(o,[2,54],{59:59,58:60,4:l,5:c,8:T,10:h,12:u,13:d,14:p,18:w,63:m,64:y,65:v,66:b,67:x}),t(o,[2,47],{22:88,16:89,23:100,4:_,5:S,6:C,8:A,11:R,13:L,17:N,18:I,19:D,20:M}),{46:[1,101]},t(o,[2,29],{10:he}),t(ue,[2,27],{16:103,4:_,5:S,6:C,8:A,11:R,13:L,17:N,18:I,19:D,20:M}),t(O,[2,25]),t(O,[2,13]),t(O,[2,14]),t(O,[2,15]),t(O,[2,16]),t(O,[2,17]),t(O,[2,18]),t(O,[2,19]),t(O,[2,20]),t(O,[2,21]),t(O,[2,22]),t(o,[2,49],{10:he}),t(o,[2,48],{22:88,16:89,23:104,4:_,5:S,6:C,8:A,11:R,13:L,17:N,18:I,19:D,20:M}),{4:_,5:S,6:C,8:A,11:R,13:L,16:89,17:N,18:I,19:D,20:M,22:105},t(O,[2,26]),t(o,[2,50],{10:he}),t(ue,[2,28],{16:103,4:_,5:S,6:C,8:A,11:R,13:L,17:N,18:I,19:D,20:M})],defaultActions:{8:[2,30],9:[2,31]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0 *)/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=i,mt(e,"Parser"),(UCe=new((e.prototype=r).Parser=e)).parser=UCe,GCe=UCe}),HCe=s(()=>{hw(),si(),e(),ti(),jCe=Bt(),WCe=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{mt(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:Ht.quadrantChart?.chartWidth||500,chartWidth:Ht.quadrantChart?.chartHeight||500,titlePadding:Ht.quadrantChart?.titlePadding||10,titleFontSize:Ht.quadrantChart?.titleFontSize||20,quadrantPadding:Ht.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:Ht.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:Ht.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:Ht.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:Ht.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:Ht.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:Ht.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:Ht.quadrantChart?.pointTextPadding||5,pointLabelFontSize:Ht.quadrantChart?.pointLabelFontSize||12,pointRadius:Ht.quadrantChart?.pointRadius||5,xAxisPosition:Ht.quadrantChart?.xAxisPosition||"top",yAxisPosition:Ht.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:Ht.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:Ht.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:jCe.quadrant1Fill,quadrant2Fill:jCe.quadrant2Fill,quadrant3Fill:jCe.quadrant3Fill,quadrant4Fill:jCe.quadrant4Fill,quadrant1TextFill:jCe.quadrant1TextFill,quadrant2TextFill:jCe.quadrant2TextFill,quadrant3TextFill:jCe.quadrant3TextFill,quadrant4TextFill:jCe.quadrant4TextFill,quadrantPointFill:jCe.quadrantPointFill,quadrantPointTextFill:jCe.quadrantPointTextFill,quadrantXAxisTextFill:jCe.quadrantXAxisTextFill,quadrantYAxisTextFill:jCe.quadrantYAxisTextFill,quadrantTitleFill:jCe.quadrantTitleFill,quadrantInternalBorderStrokeFill:jCe.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:jCe.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,M.info("clear called")}setData(e){this.data={...this.data,...e}}addPoints(e){this.data.points=[...e,...this.data.points]}addClass(e,t){this.classes.set(e,t)}setConfig(e){M.trace("setConfig called with: ",e),this.config={...this.config,...e}}setThemeConfig(e){M.trace("setThemeConfig called with: ",e),this.themeConfig={...this.themeConfig,...e}}calculateSpace(e,t,r,i){var n=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,e={top:"top"===e&&t?n:0,bottom:"bottom"===e&&t?n:0},t=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,n={left:"left"===this.config.yAxisPosition&&r?t:0,right:"right"===this.config.yAxisPosition&&r?t:0},r=this.config.titleFontSize+2*this.config.titlePadding,t={top:i?r:0},i=this.config.quadrantPadding+n.left,r=this.config.quadrantPadding+e.top+t.top,a=this.config.chartWidth-2*this.config.quadrantPadding-n.left-n.right,s=this.config.chartHeight-2*this.config.quadrantPadding-e.top-e.bottom-t.top;return{xAxisSpace:e,yAxisSpace:n,titleSpace:t,quadrantSpace:{quadrantLeft:i,quadrantTop:r,quadrantWidth:a,quadrantHalfWidth:a/2,quadrantHeight:s,quadrantHalfHeight:s/2}}}getAxisLabels(e,t,r,i){var{quadrantSpace:i,titleSpace:n}=i,{quadrantHalfHeight:i,quadrantHeight:a,quadrantLeft:s,quadrantHalfWidth:o,quadrantTop:l,quadrantWidth:c}=i,h=!!this.data.xAxisRightText,u=!!this.data.yAxisTopText,d=[];return this.data.xAxisLeftText&&t&&d.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:s+(h?o/2:0),y:"top"===e?this.config.xAxisLabelPadding+n.top:this.config.xAxisLabelPadding+l+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:h?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&t&&d.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:s+o+(h?o/2:0),y:"top"===e?this.config.xAxisLabelPadding+n.top:this.config.xAxisLabelPadding+l+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:h?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&r&&d.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+s+c+this.config.quadrantPadding,y:l+a-(u?i/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&r&&d.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+s+c+this.config.quadrantPadding,y:l+i-(u?i/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:-90}),d}getQuadrants(e){var t,{quadrantHalfHeight:e,quadrantLeft:r,quadrantHalfWidth:i,quadrantTop:n}=e=e.quadrantSpace;for(t of r=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:r+i,y:n,width:i,height:e,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:r,y:n,width:i,height:e,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:r,y:n+e,width:i,height:e,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:r+i,y:n+e,width:i,height:e,fill:this.themeConfig.quadrant4Fill}])t.text.x=t.x+t.width/2,0===this.data.points.length?(t.text.y=t.y+t.height/2,t.text.horizontalPos="middle"):(t.text.y=t.y+this.config.quadrantTextTopPadding,t.text.horizontalPos="top");return r}getQuadrantPoints(e){let t=e.quadrantSpace,{quadrantHeight:r,quadrantLeft:i,quadrantTop:n,quadrantWidth:a}=t,s=jb().domain([0,1]).range([i,a+i]),o=jb().domain([0,1]).range([r+n,n]);return this.data.points.map(e=>{var t=this.classes.get(e.className);return t&&(e={...t,...e}),{x:s(e.x),y:o(e.y),fill:e.color??this.themeConfig.quadrantPointFill,radius:e.radius??this.config.pointRadius,text:{text:e.text,fill:this.themeConfig.quadrantPointTextFill,x:s(e.x),y:o(e.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:e.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:e.strokeWidth??"0px"}})}getBorders(e){var t=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantHalfHeight:e,quadrantHeight:r,quadrantLeft:i,quadrantHalfWidth:n,quadrantTop:a,quadrantWidth:s}=e=e.quadrantSpace;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:i-t,y1:a,x2:i+s+t,y2:a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:i+s,y1:a+t,x2:i+s,y2:a+r-t},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:i-t,y1:a+r,x2:i+s+t,y2:a+r},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:i,y1:a+t,x2:i,y2:a+r-t},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:i+n,y1:a+t,x2:i+n,y2:a+r-t},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:i+t,y1:a+e,x2:i+s-t,y2:a+e}]}getTitle(e){if(e)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){var e=this.config.showXAxis&&!(!this.data.xAxisLeftText&&!this.data.xAxisRightText),t=this.config.showYAxis&&!(!this.data.yAxisTopText&&!this.data.yAxisBottomText),r=this.config.showTitle&&!!this.data.titleText,i=0{QCe=class extends Error{static{mt(this,"InvalidStyleError")}constructor(e,t,r){super(`value for ${e} ${t} is invalid, please use a valid `+r),this.name="InvalidStyleError"}},mt(XCe,"validateHexCode"),mt(KCe,"validateNumber"),mt(ZCe,"validateSizeInPixels")});function e8e(e){return gc(e.trim(),f8e)}function t8e(e){m8e.setData({quadrant1Text:e8e(e.text)})}function r8e(e){m8e.setData({quadrant2Text:e8e(e.text)})}function i8e(e){m8e.setData({quadrant3Text:e8e(e.text)})}function n8e(e){m8e.setData({quadrant4Text:e8e(e.text)})}function a8e(e){m8e.setData({xAxisLeftText:e8e(e.text)})}function s8e(e){m8e.setData({xAxisRightText:e8e(e.text)})}function o8e(e){m8e.setData({yAxisTopText:e8e(e.text)})}function l8e(e){m8e.setData({yAxisBottomText:e8e(e.text)})}function c8e(e){var t,r={};for(t of e){var[i,n]=t.trim().split(/\s*:\s*/);if("radius"===i){if(KCe(n))throw new QCe(i,n,"number");r.radius=parseInt(n)}else if("color"===i){if(XCe(n))throw new QCe(i,n,"hex code");r.color=n}else if("stroke-color"===i){if(XCe(n))throw new QCe(i,n,"hex code");r.strokeColor=n}else{if("stroke-width"!==i)throw new Error(`style named ${i} is not supported.`);if(ZCe(n))throw new QCe(i,n,"number of pixels (eg. 10px)");r.strokeWidth=n}}return r}function h8e(e,t,r,i,n){n=c8e(n),m8e.addPoints([{x:r,y:i,text:e8e(e.text),className:t,...n}])}function u8e(e,t){m8e.addClass(e,c8e(t))}function d8e(e){m8e.setConfig({chartWidth:e})}function p8e(e){m8e.setConfig({chartHeight:e})}function g8e(){var{themeVariables:e,quadrantChart:t}=O();return t&&m8e.setConfig(t),m8e.setThemeConfig({quadrant1Fill:e.quadrant1Fill,quadrant2Fill:e.quadrant2Fill,quadrant3Fill:e.quadrant3Fill,quadrant4Fill:e.quadrant4Fill,quadrant1TextFill:e.quadrant1TextFill,quadrant2TextFill:e.quadrant2TextFill,quadrant3TextFill:e.quadrant3TextFill,quadrant4TextFill:e.quadrant4TextFill,quadrantPointFill:e.quadrantPointFill,quadrantPointTextFill:e.quadrantPointTextFill,quadrantXAxisTextFill:e.quadrantXAxisTextFill,quadrantYAxisTextFill:e.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:e.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:e.quadrantInternalBorderStrokeFill,quadrantTitleFill:e.quadrantTitleFill}),m8e.setData({titleText:Sh()}),m8e.build()}var f8e,m8e,y8e,v8e,b8e,x8e,T8e=s(()=>{Au(),zc(),Cu(),HCe(),JCe(),f8e=O(),mt(e8e,"textSanitizer"),m8e=new WCe,mt(t8e,"setQuadrant1Text"),mt(r8e,"setQuadrant2Text"),mt(i8e,"setQuadrant3Text"),mt(n8e,"setQuadrant4Text"),mt(a8e,"setXAxisLeftText"),mt(s8e,"setXAxisRightText"),mt(o8e,"setYAxisTopText"),mt(l8e,"setYAxisBottomText"),mt(c8e,"parseStyles"),mt(h8e,"addPoint"),mt(u8e,"addClass"),mt(d8e,"setWidth"),mt(p8e,"setHeight"),mt(g8e,"getQuadrantData"),y8e=mt(function(){m8e.clear(),xh()},"clear"),v8e={setWidth:d8e,setHeight:p8e,setQuadrant1Text:t8e,setQuadrant2Text:r8e,setQuadrant3Text:i8e,setQuadrant4Text:n8e,setXAxisLeftText:a8e,setXAxisRightText:s8e,setYAxisTopText:o8e,setYAxisBottomText:l8e,parseStyles:c8e,addPoint:h8e,addClass:u8e,getQuadrantData:g8e,clear:y8e,setAccTitle:Th,getAccTitle:wh,setDiagramTitle:_h,getDiagramTitle:Sh,getAccDescription:Eh,setAccDescription:kh}}),w8e=s(()=>{hw(),Au(),e(),ph(),b8e=mt((e,t,r,i)=>{function n(e){return"top"===e?"hanging":"middle"}function a(e){return"left"===e?"start":"middle"}function s(e){return`translate(${e.x}, ${e.y}) rotate(${e.rotation||0})`}mt(n,"getDominantBaseLine"),mt(a,"getTextAnchor"),mt(s,"getTransformation");var o=O();M.debug(`Rendering quadrant chart `+e);let l=o.securityLevel,c;"sandbox"===l&&(c=V("#i"+t));var t=(e=V("sandbox"===l?c.nodes()[0].contentDocument.body:"body").select(`[id="${t}"]`)).append("g").attr("class","main"),h=o.quadrantChart?.chartWidth??500,u=o.quadrantChart?.chartHeight??500,o=(rh(e,u,h,o.quadrantChart?.useMaxWidth??!0),e.attr("viewBox","0 0 "+h+" "+u),i.db.setHeight(u),i.db.setWidth(h),i.db.getQuadrantData()),e=t.append("g").attr("class","quadrants"),u=t.append("g").attr("class","border"),h=t.append("g").attr("class","data-points"),i=t.append("g").attr("class","labels"),t=t.append("g").attr("class","title");o.title&&t.append("text").attr("x",0).attr("y",0).attr("fill",o.title.fill).attr("font-size",o.title.fontSize).attr("dominant-baseline",n(o.title.horizontalPos)).attr("text-anchor",a(o.title.verticalPos)).attr("transform",s(o.title)).text(o.title.text),o.borderLines&&u.selectAll("line").data(o.borderLines).enter().append("line").attr("x1",e=>e.x1).attr("y1",e=>e.y1).attr("x2",e=>e.x2).attr("y2",e=>e.y2).style("stroke",e=>e.strokeFill).style("stroke-width",e=>e.strokeWidth),(t=e.selectAll("g.quadrant").data(o.quadrants).enter().append("g").attr("class","quadrant")).append("rect").attr("x",e=>e.x).attr("y",e=>e.y).attr("width",e=>e.width).attr("height",e=>e.height).attr("fill",e=>e.fill),t.append("text").attr("x",0).attr("y",0).attr("fill",e=>e.text.fill).attr("font-size",e=>e.text.fontSize).attr("dominant-baseline",e=>n(e.text.horizontalPos)).attr("text-anchor",e=>a(e.text.verticalPos)).attr("transform",e=>s(e.text)).text(e=>e.text.text),i.selectAll("g.label").data(o.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(e=>e.text).attr("fill",e=>e.fill).attr("font-size",e=>e.fontSize).attr("dominant-baseline",e=>n(e.horizontalPos)).attr("text-anchor",e=>a(e.verticalPos)).attr("transform",e=>s(e)),(u=h.selectAll("g.data-point").data(o.points).enter().append("g").attr("class","data-point")).append("circle").attr("cx",e=>e.x).attr("cy",e=>e.y).attr("r",e=>e.radius).attr("fill",e=>e.fill).attr("stroke",e=>e.strokeColor).attr("stroke-width",e=>e.strokeWidth),u.append("text").attr("x",0).attr("y",0).text(e=>e.text.text).attr("fill",e=>e.text.fill).attr("font-size",e=>e.text.fontSize).attr("dominant-baseline",e=>n(e.text.horizontalPos)).attr("text-anchor",e=>a(e.text.verticalPos)).attr("transform",e=>s(e.text))},"draw"),x8e={draw:b8e}}),k8e={};PGe(k8e,{diagram:()=>E8e});var E8e,_8e,S8e,C8e=s(()=>{VCe(),T8e(),w8e(),E8e={parser:GCe,db:v8e,renderer:x8e,styles:mt(()=>"","styles")}}),A8e=s(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[1,10,12,14,16,18,19,21,23],i=[2,6],n=[1,3],a=[1,5],s=[1,6],o=[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],b=[1,36],x=[1,37],T=[1,43],w=[1,42],k=[1,47],E=[1,50],_=[1,10,12,14,16,18,19,21,23,34,35,36],S=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],C=[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],i={trace:mt(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:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 5:i.setOrientation(a[o]);break;case 9:i.setDiagramTitle(a[o].text.trim());break;case 12:i.setLineData({text:"",type:"text"},a[o]);break;case 13:i.setLineData(a[o-1],a[o]);break;case 14:i.setBarData({text:"",type:"text"},a[o]);break;case 15:i.setBarData(a[o-1],a[o]);break;case 16:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 17:case 18:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 19:this.$=a[o-1];break;case 20:this.$=[Number(a[o-2]),...a[o]];break;case 21:this.$=[Number(a[o])];break;case 22:i.setXAxisTitle(a[o]);break;case 23:i.setXAxisTitle(a[o-1]);break;case 24:i.setXAxisTitle({type:"text",text:""});break;case 25:i.setXAxisBand(a[o]);break;case 26:i.setXAxisRangeData(Number(a[o-2]),Number(a[o]));break;case 27:this.$=a[o-1];break;case 28:this.$=[a[o-2],...a[o]];break;case 29:this.$=[a[o]];break;case 30:i.setYAxisTitle(a[o]);break;case 31:i.setYAxisTitle(a[o-1]);break;case 32:i.setYAxisTitle({type:"text",text:""});break;case 33:i.setYAxisRangeData(Number(a[o-2]),Number(a[o]));break;case 37:case 38:this.$={text:a[o],type:"text"};break;case 39:this.$={text:a[o],type:"markdown"};break;case 40:this.$=a[o];break;case 41:this.$=a[o-1]+""+a[o]}},"anonymous"),table:[t(r,i,{3:1,4:2,7:4,5:n,34:a,35:s,36:o}),{1:[3]},t(r,i,{4:2,7:4,3:8,5:n,34:a,35:s,36:o}),t(r,i,{4:2,7:4,6:9,3:10,5:n,8:[1,11],34:a,35:s,36:o}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(l,[2,34]),t(l,[2,35]),t(l,[2,36]),{1:[2,1]},t(r,i,{4:2,7:4,3:21,5:n,34:a,35:s,36:o}),{1:[2,3]},t(l,[2,5]),t(r,[2,7],{4:22,34:a,35:s,36:o}),{11:23,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:b,50:x},{11:39,13:38,24:T,27:w,29:40,30:41,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:b,50:x},{11:45,15:44,27:k,33:46,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:b,50:x},{11:49,17:48,24:E,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:b,50:x},{11:52,17:51,24:E,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:b,50:x},{20:[1,53]},{22:[1,54]},t(_,[2,18]),{1:[2,2]},t(_,[2,8]),t(_,[2,9]),t(S,[2,37],{40:55,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:b,50:x}),t(S,[2,38]),t(S,[2,39]),t(C,[2,40]),t(C,[2,42]),t(C,[2,43]),t(C,[2,44]),t(C,[2,45]),t(C,[2,46]),t(C,[2,47]),t(C,[2,48]),t(C,[2,49]),t(C,[2,50]),t(C,[2,51]),t(_,[2,10]),t(_,[2,22],{30:41,29:56,24:T,27:w}),t(_,[2,24]),t(_,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:b,50:x},t(_,[2,11]),t(_,[2,30],{33:60,27:k}),t(_,[2,32]),{31:[1,61]},t(_,[2,12]),{17:62,24:E},{25:63,27:A},t(_,[2,14]),{17:65,24:E},t(_,[2,16]),t(_,[2,17]),t(C,[2,41]),t(_,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(_,[2,31]),{27:[1,69]},t(_,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(_,[2,15]),t(_,[2,26]),t(_,[2,27]),{11:59,32:72,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:b,50:x},t(_,[2,33]),t(_,[2,19]),{25:73,27:A},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/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,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],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:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};i.lexer=n,mt(e,"Parser"),(_8e=new((e.prototype=i).Parser=e)).parser=_8e,S8e=_8e});function R8e(e){return"bar"===e.type}function L8e(e){return"band"===e.type}function N8e(e){return"linear"===e.type}var I8e,D8e,M8e,O8e,P8e=s(()=>{mt(R8e,"isBarPlot"),mt(L8e,"isBandAxisData"),mt(N8e,"isLinearAxisData")}),$8e=s(()=>{lL(),I8e=class{constructor(e){this.parentGroup=e}static{mt(this,"TextDimensionCalculatorWithFont")}getMaxDimension(e,t){if(!this.parentGroup)return{width:e.reduce((e,t)=>Math.max(t.length,e),0)*t,height:t};var r,i={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",t);for(r of e){var a=(s=iL(n,1,r))?s.width:r.length*t,s=s?s.height:t;i.width=Math.max(i.width,a),i.height=Math.max(i.height,s)}return n.remove(),i}}}),B8e=s(()=>{D8e=class{constructor(e,t,r,i){this.axisConfig=e,this.title=t,this.textDimensionCalculator=r,this.axisThemeConfig=i,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}static{mt(this,"BaseAxis")}setRange(e){this.range=e,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=e[1]-e[0]:this.boundingRect.width=e[1]-e[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){var e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(e=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let t=e.height;var r,i;this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel&&(r=this.getLabelDimension(),i=.2*e.width,this.outerPadding=Math.min(r.width/2,i),i=r.height+2*this.axisConfig.labelPadding,this.labelTextHeight=r.height,i<=t)&&(t-=i,this.showLabel=!0),this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title&&(i=(r=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize)).height+2*this.axisConfig.titlePadding,this.titleTextHeight=r.height,i<=t)&&(t-=i,this.showTitle=!0),this.boundingRect.width=e.width,this.boundingRect.height=e.height-t}calculateSpaceIfDrawnVertical(e){let t=e.width;var r,i;this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel&&(r=this.getLabelDimension(),i=.2*e.height,this.outerPadding=Math.min(r.height/2,i),(i=r.width+2*this.axisConfig.labelPadding)<=t)&&(t-=i,this.showLabel=!0),this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title&&(i=(r=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize)).height+2*this.axisConfig.titlePadding,this.titleTextHeight=r.height,i<=t)&&(t-=i,this.showTitle=!0),this.boundingRect.width=e.width-t,this.boundingRect.height=e.height}calculateSpace(e){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(e):this.calculateSpaceIfDrawnHorizontally(e),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}getDrawableElementsForLeftAxis(){var e,r=[];if(this.showAxisLine&&(e=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2,r.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${e},${this.boundingRect.y} L ${e},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})),this.showLabel&&r.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(e),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let t=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);r.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${t},${this.getScaleValue(e)} L ${t-this.axisConfig.tickLength},`+this.getScaleValue(e),strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&r.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),r}getDrawableElementsForBottomAxis(){var e,r=[];if(this.showAxisLine&&(e=this.boundingRect.y+this.axisConfig.axisLineWidth/2,r.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${e} L ${this.boundingRect.x+this.boundingRect.width},`+e,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})),this.showLabel&&r.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let t=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);r.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${t} L ${this.getScaleValue(e)},`+(t+this.axisConfig.tickLength),strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&r.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),r}getDrawableElementsForTopAxis(){var e,r=[];if(this.showAxisLine&&(e=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2,r.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${e} L ${this.boundingRect.x+this.boundingRect.width},`+e,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})),this.showLabel&&r.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let t=this.boundingRect.y;r.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${t+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(e)},`+(t+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)),strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&r.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),r}getDrawableElements(){if("left"===this.axisPosition)return this.getDrawableElementsForLeftAxis();if("right"===this.axisPosition)throw Error("Drawing of right axis is not implemented");return"bottom"===this.axisPosition?this.getDrawableElementsForBottomAxis():"top"===this.axisPosition?this.getDrawableElementsForTopAxis():[]}}}),F8e=s(()=>{hw(),e(),B8e(),M8e=class extends D8e{static{mt(this,"BandAxis")}constructor(e,t,r,i,n){super(e,i,n,t),this.categories=r,this.scale=_b().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=_b().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),M.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}}}),z8e=s(()=>{hw(),B8e(),O8e=class extends D8e{static{mt(this,"LinearAxis")}constructor(e,t,r,i,n){super(e,i,n,t),this.domain=r,this.scale=jb().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){var e=[...this.domain];"left"===this.axisPosition&&e.reverse(),this.scale=jb().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}}});function q8e(e,t,r,i){return i=new I8e(i),L8e(e)?new M8e(t,r,e.categories,e.title,i):new O8e(t,r,[e.min,e.max],e.title,i)}var U8e=s(()=>{P8e(),$8e(),F8e(),z8e(),mt(q8e,"getAxis")});function G8e(e,t,r,i){return i=new I8e(i),new j8e(i,e,t,r)}var j8e,W8e,Y8e,V8e=s(()=>{$8e(),j8e=class{constructor(e,t,r,i){this.textDimensionCalculator=e,this.chartConfig=t,this.chartData=r,this.chartThemeConfig=i,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{mt(this,"ChartTitle")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){var t=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),e=Math.max(t.width,e.width),r=t.height+2*this.chartConfig.titlePadding;return t.width<=e&&t.height<=r&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=e,this.boundingRect.height=r,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){var e=[];return this.showChartTitle&&e.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),e}},mt(G8e,"getChartTitleComponent")}),H8e=s(()=>{hw(),W8e=class{constructor(e,t,r,i,n){this.plotData=e,this.xAxis=t,this.yAxis=r,this.orientation=i,this.plotIndex=n}static{mt(this,"LinePlot")}getDrawableElement(){var e=this.plotData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]);return(e=("horizontal"===this.orientation?o3().y(e=>e[0]).x(e=>e[1]):o3().x(e=>e[0]).y(e=>e[1]))(e))?[{groupTexts:["plot","line-plot-"+this.plotIndex],type:"path",data:[{path:e,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}}}),X8e=s(()=>{Y8e=class{constructor(e,t,r,i,n,a){this.barData=e,this.boundingRect=t,this.xAxis=r,this.yAxis=i,this.orientation=n,this.plotIndex=a}static{mt(this,"BarPlot")}getDrawableElement(){let e=this.barData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]),t=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),r=t/2;return"horizontal"===this.orientation?[{groupTexts:["plot","bar-plot-"+this.plotIndex],type:"rect",data:e.map(e=>({x:this.boundingRect.x,y:e[0]-r,height:t,width:e[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot","bar-plot-"+this.plotIndex],type:"rect",data:e.map(e=>({x:e[0]-r,y:e[1],width:t,height:this.boundingRect.y+this.boundingRect.height-e[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}}});function K8e(e,t,r){return new Z8e(e,t,r)}var Z8e,Q8e,J8e,eAe=s(()=>{H8e(),X8e(),Z8e=class{constructor(e,t,r){this.chartConfig=e,this.chartData=t,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0}}static{mt(this,"BasePlot")}setAxes(e,t){this.xAxis=e,this.yAxis=t}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!this.xAxis||!this.yAxis)throw Error("Axes must be passed to render Plots");var e,t,r=[];for([e,t]of this.chartData.plots.entries())switch(t.type){case"line":var i=new W8e(t,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);r.push(...i.getDrawableElement());break;case"bar":i=new Y8e(t,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e),r.push(...i.getDrawableElement())}return r}},mt(K8e,"getPlotComponent")}),tAe=s(()=>{U8e(),V8e(),eAe(),P8e(),Q8e=class{constructor(e,t,r,i){this.chartConfig=e,this.chartData=t,this.componentStore={title:G8e(e,t,r,i),plot:K8e(e,t,r),xAxis:q8e(t.xAxis,e.xAxis,{titleColor:r.xAxisTitleColor,labelColor:r.xAxisLabelColor,tickColor:r.xAxisTickColor,axisLineColor:r.xAxisLineColor},i),yAxis:q8e(t.yAxis,e.yAxis,{titleColor:r.yAxisTitleColor,labelColor:r.yAxisLabelColor,tickColor:r.yAxisTickColor,axisLineColor:r.yAxisLineColor},i)}}static{mt(this,"Orchestrator")}calculateVerticalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,r,i,n=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),s=this.componentStore.plot.calculateSpace({width:n,height:a});e-=s.width,i=(s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t-=s.height})).height,t-=s.height,this.componentStore.xAxis.setAxisPosition("bottom"),t-=this.componentStore.xAxis.calculateSpace({width:e,height:t}).height,this.componentStore.yAxis.setAxisPosition("left"),r=(s=this.componentStore.yAxis.calculateSpace({width:e,height:t})).width,0<(e-=s.width)&&(n+=e),0R8e(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,r,i,n,a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),s=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:a,height:s});e-=o.width,r=(o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t-=o.height})).height,t-=o.height,this.componentStore.xAxis.setAxisPosition("left"),e-=(o=this.componentStore.xAxis.calculateSpace({width:e,height:t})).width,i=o.width,this.componentStore.yAxis.setAxisPosition("top"),t-=(o=this.componentStore.yAxis.calculateSpace({width:e,height:t})).height,n=r+o.height,0R8e(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();var e,t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(e of Object.values(this.componentStore))t.push(...e.getDrawableElements());return t}}}),rAe=s(()=>{tAe(),J8e=class{static{mt(this,"XYChartBuilder")}static build(e,t,r,i){return new Q8e(e,t,r,i).getDrawableElement()}}});function iAe(){var e=Bt(),t=cr();return I7(e.xyChart,t.themeVariables.xyChart)}function nAe(){var e=cr();return I7(Ht.xyChart,e.xyChart)}function aAe(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function sAe(e){var t=cr();return gc(e.trim(),t)}function oAe(e){EAe=e}function lAe(e){_Ae.chartOrientation="horizontal"===e?"horizontal":"vertical"}function cAe(e){CAe.xAxis.title=sAe(e.text)}function hAe(e,t){CAe.xAxis={type:"linear",title:CAe.xAxis.title,min:e,max:t},RAe=!0}function uAe(e){CAe.xAxis={type:"band",title:CAe.xAxis.title,categories:e.map(e=>sAe(e.text))},RAe=!0}function dAe(e){CAe.yAxis.title=sAe(e.text)}function pAe(e,t){CAe.yAxis={type:"linear",title:CAe.yAxis.title,min:e,max:t},LAe=!0}function gAe(e){var t=Math.min(...e),e=Math.max(...e),r=N8e(CAe.yAxis)?CAe.yAxis.min:1/0,i=N8e(CAe.yAxis)?CAe.yAxis.max:-1/0;CAe.yAxis={type:"linear",title:CAe.yAxis.title,min:Math.min(r,t),max:Math.max(i,e)}}function fAe(r){let e=[],t;if(0!==r.length&&(RAe||(i=N8e(CAe.xAxis)?CAe.xAxis.min:1/0,t=N8e(CAe.xAxis)?CAe.xAxis.max:-1/0,hAe(Math.min(i,1),Math.max(t,r.length))),LAe||gAe(r),L8e(CAe.xAxis)&&(e=CAe.xAxis.categories.map((e,t)=>[e,r[t]])),N8e(CAe.xAxis))){var i=CAe.xAxis.min,n=CAe.xAxis.max,a=(n-i)/(r.length-1),s=[];for(let e=i;e<=n;e+=a)s.push(""+e);e=s.map((e,t)=>[e,r[t]])}return e}function mAe(e){return AAe[0===e?0:e%AAe.length]}function yAe(e,t){t=fAe(t),CAe.plots.push({type:"line",strokeFill:mAe(kAe),strokeWidth:2,data:t}),kAe++}function vAe(e,t){t=fAe(t),CAe.plots.push({type:"bar",fill:mAe(kAe),data:t}),kAe++}function bAe(){if(0===CAe.plots.length)throw Error("No Plot to render, please provide a plot with some data");return CAe.title=Sh(),J8e.build(_Ae,CAe,SAe,EAe)}function xAe(){return SAe}function TAe(){return _Ae}function wAe(){return CAe}var kAe,EAe,_Ae,SAe,CAe,AAe,RAe,LAe,NAe,IAe,DAe,MAe,OAe=s(()=>{li(),si(),ti(),hC(),zc(),Cu(),rAe(),P8e(),kAe=0,_Ae=nAe(),SAe=iAe(),CAe=aAe(),AAe=SAe.plotColorPalette.split(",").map(e=>e.trim()),LAe=RAe=!1,mt(iAe,"getChartDefaultThemeConfig"),mt(nAe,"getChartDefaultConfig"),mt(aAe,"getChartDefaultData"),mt(sAe,"textSanitizer"),mt(oAe,"setTmpSVGG"),mt(lAe,"setOrientation"),mt(cAe,"setXAxisTitle"),mt(hAe,"setXAxisRangeData"),mt(uAe,"setXAxisBand"),mt(dAe,"setYAxisTitle"),mt(pAe,"setYAxisRangeData"),mt(gAe,"setYAxisRangeFromPlotData"),mt(fAe,"transformDataWithoutCategory"),mt(mAe,"getPlotColorFromPalette"),mt(yAe,"setLineData"),mt(vAe,"setBarData"),mt(bAe,"getDrawableElem"),mt(xAe,"getChartThemeConfig"),mt(TAe,"getChartConfig"),mt(wAe,"getXYChartData"),NAe=mt(function(){xh(),kAe=0,_Ae=nAe(),CAe=aAe(),SAe=iAe(),AAe=SAe.plotColorPalette.split(",").map(e=>e.trim()),LAe=RAe=!1},"clear"),IAe={getDrawableElem:bAe,clear:NAe,setAccTitle:Th,getAccTitle:wh,setDiagramTitle:_h,getDiagramTitle:Sh,getAccDescription:Eh,setAccDescription:kh,setOrientation:lAe,setXAxisTitle:cAe,setXAxisRangeData:hAe,setXAxisBand:uAe,setYAxisTitle:dAe,setYAxisRangeData:pAe,setLineData:yAe,setBarData:vAe,setTmpSVGG:oAe,getChartThemeConfig:xAe,getChartConfig:TAe,getXYChartData:wAe}}),PAe=s(()=>{e(),pCe(),ph(),DAe=mt((e,t,r,i)=>{let n=i.db,a=n.getChartThemeConfig(),s=n.getChartConfig(),o=n.getXYChartData().plots[0].data.map(e=>e[1]);function l(e){return"top"===e?"text-before-edge":"middle"}function c(e){return"left"===e?"start":"right"===e?"end":"middle"}function h(e){return`translate(${e.x}, ${e.y}) rotate(${e.rotation||0})`}mt(l,"getDominantBaseLine"),mt(c,"getTextAnchor"),mt(h,"getTextTransformation"),M.debug(`Rendering xychart chart `+e);let u=oCe(t),d=u.append("g").attr("class","main"),p=d.append("rect").attr("width",s.width).attr("height",s.height).attr("class","background"),g=(rh(u,s.height,s.width,!0),u.attr("viewBox",`0 0 ${s.width} `+s.height),p.attr("fill",a.backgroundColor),n.setTmpSVGG(u.append("g").attr("class","mermaid-tmp-group")),n.getDrawableElem()),f={};function m(t){let r=d,i="";for(var[n]of t.entries()){let e=d;0e.x).attr("y",e=>e.y).attr("width",e=>e.width).attr("height",e=>e.height).attr("fill",e=>e.fill).attr("stroke",e=>e.strokeFill).attr("stroke-width",e=>e.strokeWidth),s.showDataLabel)if("horizontal"===s.chartOrientation){let i=function(e,t){var{data:e,label:r}=e;return t*r.length*.7<=e.width-10};i,mt(i,"fitsHorizontally");var b=(x=y.data.map((e,t)=>({data:e,label:o[t].toString()})).filter(e=>0{let t=e.data,r=.7*t.height;for(;!i(e,r)&&0e.data.x+e.data.width-10).attr("y",e=>e.data.y+e.data.height/2).attr("text-anchor","end").attr("dominant-baseline","middle").attr("fill","black").attr("font-size",b+"px").text(e=>e.label)}else{let n=function(e,t,r){var{data:e,label:i}=e,i=t*i.length*.7,n=e.x+e.width/2;return e.x<=n-i/2&&n+i/2<=e.x+e.width&&e.y+r+t<=e.y+e.height};n,mt(n,"fitsInBar");var x,b=(x=y.data.map((e,t)=>({data:e,label:o[t].toString()})).filter(e=>0{let{data:t,label:r}=e,i=t.width/(.7*r.length);for(;!n(e,i,10)&&0e.data.x+e.data.width/2).attr("y",e=>e.data.y+10).attr("text-anchor","middle").attr("dominant-baseline","hanging").attr("fill","black").attr("font-size",T+"px").text(e=>e.label)}break;case"text":v.selectAll("text").data(y.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",e=>e.fill).attr("font-size",e=>e.fontSize).attr("dominant-baseline",e=>l(e.verticalPos)).attr("text-anchor",e=>c(e.horizontalPos)).attr("transform",e=>h(e)).text(e=>e.text);break;case"path":v.selectAll("path").data(y.data).enter().append("path").attr("d",e=>e.path).attr("fill",e=>e.fill||"none").attr("stroke",e=>e.strokeFill).attr("stroke-width",e=>e.strokeWidth)}}},"draw"),MAe={draw:DAe}}),$Ae={};PGe($Ae,{diagram:()=>BAe});var BAe,FAe,zAe,qAe,UAe,GAe,jAe=s(()=>{A8e(),OAe(),PAe(),BAe={parser:S8e,db:IAe,renderer:MAe}}),WAe=s(()=>{function P(){this.yy={}}var e=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),t=[1,3],r=[1,4],i=[1,5],n=[1,6],$=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],a=[1,22],s=[2,7],o=[1,26],l=[1,27],c=[1,28],h=[1,29],u=[1,33],d=[1,34],p=[1,35],g=[1,36],f=[1,37],m=[1,38],y=[1,24],v=[1,31],b=[1,32],x=[1,30],T=[1,39],w=[1,40],k=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,61],_=[89,90],B=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],F=[27,29],z=[1,70],q=[1,71],U=[1,72],G=[1,73],j=[1,74],W=[1,75],Y=[1,76],S=[1,83],C=[1,80],V=[1,84],H=[1,85],X=[1,86],K=[1,87],Z=[1,88],Q=[1,89],J=[1,90],ee=[1,91],te=[1,92],re=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],A=[63,64],ie=[1,101],ne=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],R=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],L=[1,110],N=[1,106],I=[1,107],D=[1,108],M=[1,109],O=[1,111],ae=[1,116],se=[1,117],oe=[1,114],le=[1,115],t={trace:mt(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,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$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",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"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],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 4:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 5:case 6:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:i.setDirection("TB");break;case 18:i.setDirection("BT");break;case 19:i.setDirection("RL");break;case 20:i.setDirection("LR");break;case 21:i.addRequirement(a[o-3],a[o-4]);break;case 22:i.addRequirement(a[o-5],a[o-6]),i.setClass([a[o-5]],a[o-3]);break;case 23:i.setNewReqId(a[o-2]);break;case 24:i.setNewReqText(a[o-2]);break;case 25:i.setNewReqRisk(a[o-2]);break;case 26:i.setNewReqVerifyMethod(a[o-2]);break;case 29:this.$=i.RequirementType.REQUIREMENT;break;case 30:this.$=i.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=i.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=i.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=i.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=i.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=i.RiskLevel.LOW_RISK;break;case 36:this.$=i.RiskLevel.MED_RISK;break;case 37:this.$=i.RiskLevel.HIGH_RISK;break;case 38:this.$=i.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=i.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=i.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=i.VerifyType.VERIFY_TEST;break;case 42:i.addElement(a[o-3]);break;case 43:i.addElement(a[o-5]),i.setClass([a[o-5]],a[o-3]);break;case 44:i.setNewElementType(a[o-2]);break;case 45:i.setNewElementDocRef(a[o-2]);break;case 48:i.addRelationship(a[o-2],a[o],a[o-4]);break;case 49:i.addRelationship(a[o-2],a[o-4],a[o]);break;case 50:this.$=i.Relationships.CONTAINS;break;case 51:this.$=i.Relationships.COPIES;break;case 52:this.$=i.Relationships.DERIVES;break;case 53:this.$=i.Relationships.SATISFIES;break;case 54:this.$=i.Relationships.VERIFIES;break;case 55:this.$=i.Relationships.REFINES;break;case 56:this.$=i.Relationships.TRACES;break;case 57:this.$=a[o-2],i.defineClass(a[o-1],a[o]);break;case 58:i.setClass(a[o-1],a[o]);break;case 59:i.setClass([a[o-2]],a[o]);break;case 60:case 62:this.$=[a[o]];break;case 61:case 63:this.$=a[o-2].concat([a[o]]);break;case 64:this.$=a[o-2],i.setCssStyle(a[o-1],a[o]);break;case 65:this.$=[a[o]];break;case 66:a[o-2].push(a[o]),this.$=a[o-2];break;case 68:this.$=a[o-1]+a[o]}},"anonymous"),table:[{3:1,4:2,6:t,9:r,11:i,13:n},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:r,11:i,13:n},{5:[1,9]},{10:[1,10]},{12:[1,11]},e($,[2,6]),{3:12,4:2,6:t,9:r,11:i,13:n},{1:[2,2]},{4:17,5:a,7:13,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:b,77:x,89:T,90:w},e($,[2,4]),e($,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:a,7:42,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:b,77:x,89:T,90:w},{4:17,5:a,7:43,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:b,77:x,89:T,90:w},{4:17,5:a,7:44,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:b,77:x,89:T,90:w},{4:17,5:a,7:45,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:b,77:x,89:T,90:w},{4:17,5:a,7:46,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:b,77:x,89:T,90:w},{4:17,5:a,7:47,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:b,77:x,89:T,90:w},{4:17,5:a,7:48,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:b,77:x,89:T,90:w},{4:17,5:a,7:49,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:b,77:x,89:T,90:w},{4:17,5:a,7:50,8:s,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:l,23:c,24:h,25:23,33:25,41:u,42:d,43:p,44:g,45:f,46:m,54:y,72:v,74:b,77:x,89:T,90:w},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(k,[2,17]),e(k,[2,18]),e(k,[2,19]),e(k,[2,20]),{30:60,33:62,75:E,89:T,90:w},{30:63,33:62,75:E,89:T,90:w},{30:64,33:62,75:E,89:T,90:w},e(_,[2,29]),e(_,[2,30]),e(_,[2,31]),e(_,[2,32]),e(_,[2,33]),e(_,[2,34]),e(B,[2,81]),e(B,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(F,[2,79]),e(F,[2,80]),{27:[1,67],29:[1,68]},e(F,[2,85]),e(F,[2,86]),{62:69,65:z,66:q,67:U,68:G,69:j,70:W,71:Y},{62:77,65:z,66:q,67:U,68:G,69:j,70:W,71:Y},{30:78,33:62,75:E,89:T,90:w},{73:79,75:S,76:C,78:81,79:82,80:V,81:H,82:X,83:K,84:Z,85:Q,86:J,87:ee,88:te},e(re,[2,60]),e(re,[2,62]),{73:93,75:S,76:C,78:81,79:82,80:V,81:H,82:X,83:K,84:Z,85:Q,86:J,87:ee,88:te},{30:94,33:62,75:E,76:C,89:T,90:w},{5:[1,95]},{30:96,33:62,75:E,89:T,90:w},{5:[1,97]},{30:98,33:62,75:E,89:T,90:w},{63:[1,99]},e(A,[2,50]),e(A,[2,51]),e(A,[2,52]),e(A,[2,53]),e(A,[2,54]),e(A,[2,55]),e(A,[2,56]),{64:[1,100]},e(k,[2,59],{76:C}),e(k,[2,64],{76:ie}),{33:103,75:[1,102],89:T,90:w},e(ne,[2,65],{79:104,75:S,80:V,81:H,82:X,83:K,84:Z,85:Q,86:J,87:ee,88:te}),e(R,[2,67]),e(R,[2,69]),e(R,[2,70]),e(R,[2,71]),e(R,[2,72]),e(R,[2,73]),e(R,[2,74]),e(R,[2,75]),e(R,[2,76]),e(R,[2,77]),e(R,[2,78]),e(k,[2,57],{76:ie}),e(k,[2,58],{76:C}),{5:L,28:105,31:N,34:I,36:D,38:M,40:O},{27:[1,112],76:C},{5:ae,40:se,56:113,57:oe,59:le},{27:[1,118],76:C},{33:119,89:T,90:w},{33:120,89:T,90:w},{75:S,78:121,79:82,80:V,81:H,82:X,83:K,84:Z,85:Q,86:J,87:ee,88:te},e(re,[2,61]),e(re,[2,63]),e(R,[2,68]),e(k,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:L,28:126,31:N,34:I,36:D,38:M,40:O},e(k,[2,28]),{5:[1,127]},e(k,[2,42]),{32:[1,128]},{32:[1,129]},{5:ae,40:se,56:130,57:oe,59:le},e(k,[2,47]),{5:[1,131]},e(k,[2,48]),e(k,[2,49]),e(ne,[2,66],{79:104,75:S,80:V,81:H,82:X,83:K,84:Z,85:Q,86:J,87:ee,88:te}),{33:132,89:T,90:w},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(k,[2,27]),{5:L,28:145,31:N,34:I,36:D,38:M,40:O},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(k,[2,46]),{5:ae,40:se,56:152,57:oe,59:le},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(k,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(k,[2,43]),{5:L,28:159,31:N,34:I,36:D,38:M,40:O},{5:L,28:160,31:N,34:I,36:D,38:M,40:O},{5:L,28:161,31:N,34:I,36:D,38:M,40:O},{5:L,28:162,31:N,34:I,36:D,38:M,40:O},{5:ae,40:se,56:163,57:oe,59:le},{5:ae,40:se,56:164,57:oe,59:le},e(k,[2,23]),e(k,[2,24]),e(k,[2,25]),e(k,[2,26]),e(k,[2,44]),e(k,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],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,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}};t.lexer=$,mt(P,"Parser"),(FAe=new((P.prototype=t).Parser=P)).parser=FAe,zAe=FAe}),YAe=s(()=>{Au(),e(),Cu(),qAe=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=Th,this.getAccTitle=wh,this.setAccDescription=kh,this.getAccDescription=Eh,this.setDiagramTitle=_h,this.getDiagramTitle=Sh,this.getConfig=mt(()=>O().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{mt(this,"RequirementDB")}getDirection(){return this.direction}setDirection(e){this.direction=e}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(e,t){return this.requirements.has(e)||this.requirements.set(e,{name:e,type:t,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(e)}getRequirements(){return this.requirements}setNewReqId(e){void 0!==this.latestRequirement&&(this.latestRequirement.requirementId=e)}setNewReqText(e){void 0!==this.latestRequirement&&(this.latestRequirement.text=e)}setNewReqRisk(e){void 0!==this.latestRequirement&&(this.latestRequirement.risk=e)}setNewReqVerifyMethod(e){void 0!==this.latestRequirement&&(this.latestRequirement.verifyMethod=e)}addElement(e){return this.elements.has(e)||(this.elements.set(e,{name:e,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),M.info("Added new element: ",e)),this.resetLatestElement(),this.elements.get(e)}getElements(){return this.elements}setNewElementType(e){void 0!==this.latestElement&&(this.latestElement.type=e)}setNewElementDocRef(e){void 0!==this.latestElement&&(this.latestElement.docRef=e)}addRelationship(e,t,r){this.relations.push({type:e,src:t,dst:r})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,xh()}setCssStyle(e,t){for(var r of e){var i,n=this.requirements.get(r)??this.elements.get(r);if(!t||!n)return;for(i of t)i.includes(",")?n.cssStyles.push(...i.split(",")):n.cssStyles.push(i)}}setClass(e,t){for(var r of e){var i=this.requirements.get(r)??this.elements.get(r);if(i)for(var n of t)i.classes.push(n),(n=this.classes.get(n)?.styles)&&i.cssStyles.push(...n)}}defineClass(e,i){for(let t of e){let r=this.classes.get(t);void 0===r&&(r={id:t,styles:[],textStyles:[]},this.classes.set(t,r)),i&&i.forEach(function(e){var t;/color/.exec(e)&&(t=e.replace("fill","bgFill"),r.textStyles.push(t)),r.styles.push(e)}),this.requirements.forEach(e=>{e.classes.includes(t)&&e.cssStyles.push(...i.flatMap(e=>e.split(",")))}),this.elements.forEach(e=>{e.classes.includes(t)&&e.cssStyles.push(...i.flatMap(e=>e.split(",")))})}}getClasses(){return this.classes}getData(){var e,t,r,i=O(),n=[],a=[];for(e of this.requirements.values()){var s=e;s.id=e.name,s.cssStyles=e.cssStyles,s.cssClasses=e.classes.join(" "),s.shape="requirementBox",s.look=i.look,n.push(s)}for(t of this.elements.values()){var o=t;o.shape="requirementBox",o.look=i.look,o.id=t.name,o.cssStyles=t.cssStyles,o.cssClasses=t.classes.join(" "),n.push(o)}for(r of this.relations){var l=r.type===this.Relationships.CONTAINS,l={id:r.src+`-${r.dst}-0`,start:this.requirements.get(r.src)?.name??this.elements.get(r.src)?.name,end:this.requirements.get(r.dst)?.name??this.elements.get(r.dst)?.name,label:`«${r.type}»`,classes:"relationshipLine",style:["fill:none",l?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:l?"normal":"dashed",arrowTypeStart:l?"requirement_contains":"",arrowTypeEnd:l?"":"requirement_arrow",look:i.look,labelType:"markdown"};a.push(l)}return{nodes:n,edges:a,other:{},config:i,direction:this.getDirection()}}}}),VAe=s(()=>{UAe=mt(e=>` marker { fill: ${e.relationColor}; stroke: ${e.relationColor}; } marker.cross { stroke: ${e.lineColor}; } svg { font-family: ${e.fontFamily}; font-size: ${e.fontSize}; } .reqBox { fill: ${e.requirementBackground}; fill-opacity: 1.0; stroke: ${e.requirementBorderColor}; stroke-width: ${e.requirementBorderSize}; } .reqTitle, .reqLabel{ fill: ${e.requirementTextColor}; } .reqLabelBox { fill: ${e.relationLabelBackground}; fill-opacity: 1.0; } .req-title-line { stroke: ${e.requirementBorderColor}; stroke-width: ${e.requirementBorderSize}; } .relationshipLine { stroke: ${e.relationColor}; stroke-width: 1; } .relationshipLabel { fill: ${e.relationLabelColor}; } .edgeLabel { background-color: ${e.edgeLabelBackground}; } .edgeLabel .label rect { fill: ${e.edgeLabelBackground}; } .edgeLabel .label text { fill: ${e.relationLabelColor}; } .divider { stroke: ${e.nodeBorder}; stroke-width: 1; } .label { font-family: ${e.fontFamily}; color: ${e.nodeTextColor||e.textColor}; } .label text,span { fill: ${e.nodeTextColor||e.textColor}; color: ${e.nodeTextColor||e.textColor}; } .labelBkg { background-color: ${e.edgeLabelBackground}; } `,"getStyles"),GAe=UAe}),HAe={};PGe(HAe,{draw:()=>XAe});var XAe,KAe=s(()=>{Au(),e(),gO(),cue(),hue(),hC(),XAe=mt(async function(e,t,r,i){M.info("REF0:"),M.info("Drawing requirement diagram (unified)",t);var{securityLevel:n,state:a,layout:s}=O(),o=i.db.getData(),n=eO(t,n);o.type=i.type,o.layoutAlgorithm=Vhe(s),o.nodeSpacing=a?.nodeSpacing??50,o.rankSpacing=a?.rankSpacing??50,o.markers=["requirement_contains","requirement_arrow"],o.diagramId=t,await Yhe(o,n),sC.insertTitle(n,"requirementDiagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),Hhe(n,8,"requirementDiagram",a?.useMaxWidth??!0)},"draw")}),ZAe={};PGe(ZAe,{diagram:()=>QAe});var QAe,JAe,e9e,t9e,r9e,i9e,n9e,a9e,s9e,o9e,l9e,c9e,h9e,u9e,d9e,p9e,g9e,f9e,m9e,y9e,v9e,b9e,x9e,T9e,w9e,k9e,E9e,_9e,S9e,C9e,A9e,R9e,L9e,N9e,I9e,D9e,M9e,O9e,P9e,$9e,B9e,F9e,z9e,q9e,U9e,G9e,j9e,W9e,Y9e,V9e,H9e,X9e,K9e,Z9e,Q9e=s(()=>{WAe(),YAe(),VAe(),KAe(),QAe={parser:zAe,get db(){return new qAe},renderer:HAe,styles:GAe}}),J9e=s(()=>{function P(){this.yy={}}var e=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),t=[1,2],$=[1,3],B=[1,4],r=[2,4],i=[1,9],n=[1,11],a=[1,12],s=[1,14],o=[1,15],l=[1,17],c=[1,18],h=[1,19],u=[1,25],d=[1,26],p=[1,27],g=[1,28],f=[1,29],m=[1,30],y=[1,31],v=[1,32],b=[1,33],x=[1,34],T=[1,35],w=[1,36],k=[1,37],E=[1,38],_=[1,39],S=[1,40],C=[1,42],A=[1,43],R=[1,44],L=[1,45],N=[1,46],I=[1,47],D=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],F=[1,74],z=[1,80],q=[1,81],U=[1,82],G=[1,83],j=[1,84],W=[1,85],Y=[1,86],V=[1,87],H=[1,88],X=[1,89],K=[1,90],Z=[1,91],Q=[1,92],J=[1,93],ee=[1,94],te=[1,95],re=[1,96],ie=[1,97],ne=[1,98],ae=[1,99],se=[1,100],oe=[1,101],le=[1,102],ce=[1,103],he=[1,104],ue=[1,105],de=[2,78],pe=[4,5,17,51,53,54],ge=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],fe=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],me=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],ye=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],ve=[5,52],M=[70,71,72,73],O=[1,151],t={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 3:return i.apply(a[o]),a[o];case 4:case 10:this.$=[];break;case 5:case 11:a[o-1].push(a[o]),this.$=a[o-1];break;case 6:case 7:case 12:case 13:this.$=a[o];break;case 8:case 9:case 14:this.$=[];break;case 16:a[o].type="createParticipant",this.$=a[o];break;case 17:a[o-1].unshift({type:"boxStart",boxData:i.parseBoxData(a[o-2])}),a[o-1].push({type:"boxEnd",boxText:a[o-2]}),this.$=a[o-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(a[o-2]),sequenceIndexStep:Number(a[o-1]),sequenceVisible:!0,signalType:i.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(a[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:i.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:i.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:i.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:i.LINETYPE.ACTIVE_START,actor:a[o-1].actor};break;case 24:this.$={type:"activeEnd",signalType:i.LINETYPE.ACTIVE_END,actor:a[o-1].actor};break;case 30:i.setDiagramTitle(a[o].substring(6)),this.$=a[o].substring(6);break;case 31:i.setDiagramTitle(a[o].substring(7)),this.$=a[o].substring(7);break;case 32:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 33:case 34:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 35:a[o-1].unshift({type:"loopStart",loopText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.LOOP_START}),a[o-1].push({type:"loopEnd",loopText:a[o-2],signalType:i.LINETYPE.LOOP_END}),this.$=a[o-1];break;case 36:a[o-1].unshift({type:"rectStart",color:i.parseMessage(a[o-2]),signalType:i.LINETYPE.RECT_START}),a[o-1].push({type:"rectEnd",color:i.parseMessage(a[o-2]),signalType:i.LINETYPE.RECT_END}),this.$=a[o-1];break;case 37:a[o-1].unshift({type:"optStart",optText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.OPT_START}),a[o-1].push({type:"optEnd",optText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.OPT_END}),this.$=a[o-1];break;case 38:a[o-1].unshift({type:"altStart",altText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.ALT_START}),a[o-1].push({type:"altEnd",signalType:i.LINETYPE.ALT_END}),this.$=a[o-1];break;case 39:a[o-1].unshift({type:"parStart",parText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.PAR_START}),a[o-1].push({type:"parEnd",signalType:i.LINETYPE.PAR_END}),this.$=a[o-1];break;case 40:a[o-1].unshift({type:"parStart",parText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.PAR_OVER_START}),a[o-1].push({type:"parEnd",signalType:i.LINETYPE.PAR_END}),this.$=a[o-1];break;case 41:a[o-1].unshift({type:"criticalStart",criticalText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.CRITICAL_START}),a[o-1].push({type:"criticalEnd",signalType:i.LINETYPE.CRITICAL_END}),this.$=a[o-1];break;case 42:a[o-1].unshift({type:"breakStart",breakText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.BREAK_START}),a[o-1].push({type:"breakEnd",optText:i.parseMessage(a[o-2]),signalType:i.LINETYPE.BREAK_END}),this.$=a[o-1];break;case 44:this.$=a[o-3].concat([{type:"option",optionText:i.parseMessage(a[o-1]),signalType:i.LINETYPE.CRITICAL_OPTION},a[o]]);break;case 46:this.$=a[o-3].concat([{type:"and",parText:i.parseMessage(a[o-1]),signalType:i.LINETYPE.PAR_AND},a[o]]);break;case 48:this.$=a[o-3].concat([{type:"else",altText:i.parseMessage(a[o-1]),signalType:i.LINETYPE.ALT_ELSE},a[o]]);break;case 49:a[o-3].draw="participant",a[o-3].type="addParticipant",a[o-3].description=i.parseMessage(a[o-1]),this.$=a[o-3];break;case 50:a[o-1].draw="participant",a[o-1].type="addParticipant",this.$=a[o-1];break;case 51:a[o-3].draw="actor",a[o-3].type="addParticipant",a[o-3].description=i.parseMessage(a[o-1]),this.$=a[o-3];break;case 52:case 57:a[o-1].draw="actor",a[o-1].type="addParticipant",this.$=a[o-1];break;case 53:a[o-1].type="destroyParticipant",this.$=a[o-1];break;case 54:a[o-3].draw="participant",a[o-3].type="addParticipant",a[o-3].description=i.parseMessage(a[o-1]),this.$=a[o-3];break;case 55:a[o-1].draw="participant",a[o-1].type="addParticipant",this.$=a[o-1];break;case 56:a[o-3].draw="actor",a[o-3].type="addParticipant",a[o-3].description=i.parseMessage(a[o-1]),this.$=a[o-3];break;case 58:this.$=[a[o-1],{type:"addNote",placement:a[o-2],actor:a[o-1].actor,text:a[o]}];break;case 59:a[o-2]=[].concat(a[o-1],a[o-1]).slice(0,2),a[o-2][0]=a[o-2][0].actor,a[o-2][1]=a[o-2][1].actor,this.$=[a[o-1],{type:"addNote",placement:i.PLACEMENT.OVER,actor:a[o-2].slice(0,2),text:a[o]}];break;case 60:this.$=[a[o-1],{type:"addLinks",actor:a[o-1].actor,text:a[o]}];break;case 61:this.$=[a[o-1],{type:"addALink",actor:a[o-1].actor,text:a[o]}];break;case 62:this.$=[a[o-1],{type:"addProperties",actor:a[o-1].actor,text:a[o]}];break;case 63:this.$=[a[o-1],{type:"addDetails",actor:a[o-1].actor,text:a[o]}];break;case 66:this.$=[a[o-2],a[o]];break;case 67:this.$=a[o];break;case 68:this.$=i.PLACEMENT.LEFTOF;break;case 69:this.$=i.PLACEMENT.RIGHTOF;break;case 70:this.$=[a[o-4],a[o-1],{type:"addMessage",from:a[o-4].actor,to:a[o-1].actor,signalType:a[o-3],msg:a[o],activate:!0},{type:"activeStart",signalType:i.LINETYPE.ACTIVE_START,actor:a[o-1].actor}];break;case 71:this.$=[a[o-4],a[o-1],{type:"addMessage",from:a[o-4].actor,to:a[o-1].actor,signalType:a[o-3],msg:a[o]},{type:"activeEnd",signalType:i.LINETYPE.ACTIVE_END,actor:a[o-4].actor}];break;case 72:this.$=[a[o-4],a[o-1],{type:"addMessage",from:a[o-4].actor,to:a[o-1].actor,signalType:a[o-3],msg:a[o],activate:!0,centralConnection:i.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:i.LINETYPE.CENTRAL_CONNECTION,actor:a[o-1].actor}];break;case 73:this.$=[a[o-4],a[o-1],{type:"addMessage",from:a[o-4].actor,to:a[o-1].actor,signalType:a[o-2],msg:a[o],activate:!1,centralConnection:i.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:i.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[o-4].actor}];break;case 74:this.$=[a[o-5],a[o-1],{type:"addMessage",from:a[o-5].actor,to:a[o-1].actor,signalType:a[o-3],msg:a[o],activate:!0,centralConnection:i.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:i.LINETYPE.CENTRAL_CONNECTION,actor:a[o-1].actor},{type:"centralConnectionReverse",signalType:i.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[o-5].actor}];break;case 75:this.$=[a[o-3],a[o-1],{type:"addMessage",from:a[o-3].actor,to:a[o-1].actor,signalType:a[o-2],msg:a[o]}];break;case 76:this.$={type:"addParticipant",actor:a[o-1],config:a[o]};break;case 77:this.$=a[o-1].trim();break;case 78:this.$={type:"addParticipant",actor:a[o]};break;case 79:this.$=i.LINETYPE.SOLID_OPEN;break;case 80:this.$=i.LINETYPE.DOTTED_OPEN;break;case 81:this.$=i.LINETYPE.SOLID;break;case 82:this.$=i.LINETYPE.SOLID_TOP;break;case 83:this.$=i.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=i.LINETYPE.STICK_TOP;break;case 85:this.$=i.LINETYPE.STICK_BOTTOM;break;case 86:this.$=i.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=i.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=i.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=i.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=i.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=i.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=i.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=i.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=i.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=i.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=i.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=i.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=i.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=i.LINETYPE.DOTTED;break;case 100:this.$=i.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=i.LINETYPE.SOLID_CROSS;break;case 102:this.$=i.LINETYPE.DOTTED_CROSS;break;case 103:this.$=i.LINETYPE.SOLID_POINT;break;case 104:this.$=i.LINETYPE.DOTTED_POINT;break;case 105:this.$=i.parseMessage(a[o].trim().substring(1))}},"anonymous"),table:[{3:1,4:t,5:$,6:B},{1:[3]},{3:5,4:t,5:$,6:B},{3:6,4:t,5:$,6:B},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:n,8:8,9:10,10:a,13:13,14:s,15:o,18:16,19:l,22:c,23:41,24:h,25:20,26:21,27:22,28:23,29:24,30:u,31:d,32:p,34:g,36:f,37:m,38:y,39:v,40:b,42:x,44:T,45:w,47:k,51:E,53:_,54:S,56:C,61:A,62:R,63:L,64:N,73:I},e(D,[2,5]),{9:48,13:13,14:s,15:o,18:16,19:l,22:c,23:41,24:h,25:20,26:21,27:22,28:23,29:24,30:u,31:d,32:p,34:g,36:f,37:m,38:y,39:v,40:b,42:x,44:T,45:w,47:k,51:E,53:_,54:S,56:C,61:A,62:R,63:L,64:N,73:I},e(D,[2,7]),e(D,[2,8]),e(D,[2,9]),e(D,[2,15]),{13:49,51:E,53:_,54:S},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:I},{23:56,73:I},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(D,[2,30]),e(D,[2,31]),{33:[1,62]},{35:[1,63]},e(D,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:F},{23:75,55:76,73:F},{23:77,73:I},{69:78,72:[1,79],78:z,79:q,80:U,81:G,82:j,83:W,84:Y,85:V,86:H,87:X,88:K,89:Z,90:Q,91:J,92:ee,93:te,94:re,95:ie,96:ne,97:ae,98:se,99:oe,100:le,101:ce,102:he,103:ue},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:I},{23:111,73:I},{23:112,73:I},{23:113,73:I},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],de),e(D,[2,6]),e(D,[2,16]),e(pe,[2,10],{11:114}),e(D,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(D,[2,22]),{5:[1,118]},{5:[1,119]},e(D,[2,25]),e(D,[2,26]),e(D,[2,27]),e(D,[2,28]),e(D,[2,29]),e(D,[2,32]),e(D,[2,33]),e(ge,r,{7:120}),e(ge,r,{7:121}),e(ge,r,{7:122}),e(fe,r,{41:123,7:124}),e(me,r,{43:125,7:126}),e(me,r,{7:126,43:127}),e(ye,r,{46:128,7:129}),e(ge,r,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(ve,de,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:I},{69:146,78:z,79:q,80:U,81:G,82:j,83:W,84:Y,85:V,86:H,87:X,88:K,89:Z,90:Q,91:J,92:ee,93:te,94:re,95:ie,96:ne,97:ae,98:se,99:oe,100:le,101:ce,102:he,103:ue},e(M,[2,79]),e(M,[2,80]),e(M,[2,81]),e(M,[2,82]),e(M,[2,83]),e(M,[2,84]),e(M,[2,85]),e(M,[2,86]),e(M,[2,87]),e(M,[2,88]),e(M,[2,89]),e(M,[2,90]),e(M,[2,91]),e(M,[2,92]),e(M,[2,93]),e(M,[2,94]),e(M,[2,95]),e(M,[2,96]),e(M,[2,97]),e(M,[2,98]),e(M,[2,99]),e(M,[2,100]),e(M,[2,101]),e(M,[2,102]),e(M,[2,103]),e(M,[2,104]),{23:147,73:I},{23:149,60:148,73:I},{73:[2,68]},{73:[2,69]},{58:150,104:O},{58:152,104:O},{58:153,104:O},{58:154,104:O},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:E,53:_,54:S},{5:[1,160]},e(D,[2,20]),e(D,[2,21]),e(D,[2,23]),e(D,[2,24]),{4:i,5:n,8:8,9:10,10:a,13:13,14:s,15:o,17:[1,161],18:16,19:l,22:c,23:41,24:h,25:20,26:21,27:22,28:23,29:24,30:u,31:d,32:p,34:g,36:f,37:m,38:y,39:v,40:b,42:x,44:T,45:w,47:k,51:E,53:_,54:S,56:C,61:A,62:R,63:L,64:N,73:I},{4:i,5:n,8:8,9:10,10:a,13:13,14:s,15:o,17:[1,162],18:16,19:l,22:c,23:41,24:h,25:20,26:21,27:22,28:23,29:24,30:u,31:d,32:p,34:g,36:f,37:m,38:y,39:v,40:b,42:x,44:T,45:w,47:k,51:E,53:_,54:S,56:C,61:A,62:R,63:L,64:N,73:I},{4:i,5:n,8:8,9:10,10:a,13:13,14:s,15:o,17:[1,163],18:16,19:l,22:c,23:41,24:h,25:20,26:21,27:22,28:23,29:24,30:u,31:d,32:p,34:g,36:f,37:m,38:y,39:v,40:b,42:x,44:T,45:w,47:k,51:E,53:_,54:S,56:C,61:A,62:R,63:L,64:N,73:I},{17:[1,164]},{4:i,5:n,8:8,9:10,10:a,13:13,14:s,15:o,17:[2,47],18:16,19:l,22:c,23:41,24:h,25:20,26:21,27:22,28:23,29:24,30:u,31:d,32:p,34:g,36:f,37:m,38:y,39:v,40:b,42:x,44:T,45:w,47:k,50:[1,165],51:E,53:_,54:S,56:C,61:A,62:R,63:L,64:N,73:I},{17:[1,166]},{4:i,5:n,8:8,9:10,10:a,13:13,14:s,15:o,17:[2,45],18:16,19:l,22:c,23:41,24:h,25:20,26:21,27:22,28:23,29:24,30:u,31:d,32:p,34:g,36:f,37:m,38:y,39:v,40:b,42:x,44:T,45:w,47:k,49:[1,167],51:E,53:_,54:S,56:C,61:A,62:R,63:L,64:N,73:I},{17:[1,168]},{17:[1,169]},{4:i,5:n,8:8,9:10,10:a,13:13,14:s,15:o,17:[2,43],18:16,19:l,22:c,23:41,24:h,25:20,26:21,27:22,28:23,29:24,30:u,31:d,32:p,34:g,36:f,37:m,38:y,39:v,40:b,42:x,44:T,45:w,47:k,48:[1,170],51:E,53:_,54:S,56:C,61:A,62:R,63:L,64:N,73:I},{4:i,5:n,8:8,9:10,10:a,13:13,14:s,15:o,17:[1,171],18:16,19:l,22:c,23:41,24:h,25:20,26:21,27:22,28:23,29:24,30:u,31:d,32:p,34:g,36:f,37:m,38:y,39:v,40:b,42:x,44:T,45:w,47:k,51:E,53:_,54:S,56:C,61:A,62:R,63:L,64:N,73:I},{16:[1,172]},e(D,[2,50]),{16:[1,173]},e(D,[2,55]),e(ve,[2,76]),{76:[1,174]},{16:[1,175]},e(D,[2,52]),{16:[1,176]},e(D,[2,57]),e(D,[2,53]),{23:177,73:I},{23:178,73:I},{23:179,73:I},{58:180,104:O},{23:181,72:[1,182],73:I},{58:183,104:O},{58:184,104:O},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(D,[2,17]),e(pe,[2,11]),{13:186,51:E,53:_,54:S},e(pe,[2,13]),e(pe,[2,14]),e(D,[2,19]),e(D,[2,35]),e(D,[2,36]),e(D,[2,37]),e(D,[2,38]),{16:[1,187]},e(D,[2,39]),{16:[1,188]},e(D,[2,40]),e(D,[2,41]),{16:[1,189]},e(D,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:O},{58:196,104:O},{58:197,104:O},{5:[2,75]},{58:198,104:O},{23:199,73:I},{5:[2,58]},{5:[2,59]},{23:200,73:I},e(pe,[2,12]),e(fe,r,{7:124,41:201}),e(me,r,{7:126,43:202}),e(ye,r,{7:129,46:203}),e(D,[2,49]),e(D,[2,54]),e(ve,[2,77]),e(D,[2,51]),e(D,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:O},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/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,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[52,53],inclusive:!1},acc_descr:{rules:[50],inclusive:!1},acc_title:{rules:[48],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14],inclusive:!1},ALIAS:{rules:[2,3,20,21],inclusive:!1},LINE:{rules:[2,3,33],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,15,16,17,18,19,22,23,24,25,26,27,28,29,30,31,32,34,35,36,37,38,39,40,41,42,43,44,45,46,47,49,51,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92],inclusive:!0}}};t.lexer=$,mt(P,"Parser"),(JAe=new((P.prototype=t).Parser=P)).parser=JAe,e9e=JAe}),eRe=s(()=>{Au(),Y9(),e(),JEe(),zc(),Cu(),t9e={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34,SOLID_TOP:41,SOLID_BOTTOM:42,STICK_TOP:43,STICK_BOTTOM:44,SOLID_ARROW_TOP_REVERSE:45,SOLID_ARROW_BOTTOM_REVERSE:46,STICK_ARROW_TOP_REVERSE:47,STICK_ARROW_BOTTOM_REVERSE:48,SOLID_TOP_DOTTED:51,SOLID_BOTTOM_DOTTED:52,STICK_TOP_DOTTED:53,STICK_BOTTOM_DOTTED:54,SOLID_ARROW_TOP_REVERSE_DOTTED:55,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:56,STICK_ARROW_TOP_REVERSE_DOTTED:57,STICK_ARROW_BOTTOM_REVERSE_DOTTED:58,CENTRAL_CONNECTION:59,CENTRAL_CONNECTION_REVERSE:60,CENTRAL_CONNECTION_DUAL:61},r9e={FILLED:0,OPEN:1},i9e={LEFTOF:0,RIGHTOF:1,OVER:2},n9e={ACTOR:"actor",BOUNDARY:"boundary",COLLECTIONS:"collections",CONTROL:"control",DATABASE:"database",ENTITY:"entity",PARTICIPANT:"participant",QUEUE:"queue"},a9e=class{constructor(){this.state=new KEe(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=Th,this.setAccDescription=kh,this.setDiagramTitle=_h,this.getAccTitle=wh,this.getAccDescription=Eh,this.getDiagramTitle=Sh,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(O().wrap),this.LINETYPE=t9e,this.ARROWTYPE=r9e,this.PLACEMENT=i9e}static{mt(this,"SequenceDB")}addBox(e){this.state.records.boxes.push({name:e.text,wrap:e.wrap??this.autoWrap(),fill:e.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(e,t,r,i,n){let a=this.state.records.currentBox,s,o;if(void 0!==n&&(o=n.includes(` `)?n+` `:`{ `+n+` }`,s=W9(o,{schema:j9})),i=s?.type??i,!s?.alias||r&&r.text!==t||(r={text:s.alias,wrap:r?.wrap,type:i}),n=this.state.records.actors.get(e)){if(this.state.records.currentBox&&n.box&&this.state.records.currentBox!==n.box)throw new Error(`A same participant should only be defined in one Box: ${n.name} can't be in '${n.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(a=n.box||this.state.records.currentBox,n.box=a,n&&t===n.name&&null==r)return}null==r?.text&&(r={text:t,type:i}),null!=i&&null!=r.text||(r={text:t,type:i}),this.state.records.actors.set(e,{box:a,name:t,description:r.text,wrap:r.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:i??"participant"}),this.state.records.prevActor&&(n=this.state.records.actors.get(this.state.records.prevActor))&&(n.nextActor=e),this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(e),this.state.records.prevActor=e}activationCount(e){let t,r=0;if(!e)return 0;for(t=0;t>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},s;return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e,to:t,message:r?.text??"",wrap:r?.wrap??this.autoWrap(),type:i,activate:n,centralConnection:a??0}),!0}hasAtLeastOneBox(){return 0e.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(e){return this.state.records.actors.get(e)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(e){this.state.records.wrapEnabled=e}extractWrap(e){if(void 0===e)return{};e=e.trim();var t=null!==/^:?wrap:/.exec(e)||null===/^:?nowrap:/.exec(e)&&void 0;return{cleanedText:(void 0===t?e:e.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:t}}autoWrap(){return void 0!==this.state.records.wrapEnabled?this.state.records.wrapEnabled:O().sequence?.wrap??!1}clear(){this.state.reset(),xh()}parseMessage(e){var e=e.trim(),{wrap:e,cleanedText:t}=this.extractWrap(e),t={text:t,wrap:e};return M.debug("parseMessage: "+JSON.stringify(t)),t}parseBoxData(e){let t=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(e),r=t?.[1]?t[1].trim():"transparent",i=t?.[2]?t[2].trim():void 0;window?.CSS?window.CSS.supports("color",r)||(r="transparent",i=e.trim()):((n=(new Option).style).color=r,n.color!==r&&(r="transparent",i=e.trim()));var{wrap:n,cleanedText:e}=this.extractWrap(i);return{text:e?gc(e,O()):void 0,color:r,wrap:n}}addNote(e,t,r){var i={actor:e,placement:t,message:r.text,wrap:r.wrap??this.autoWrap()},e=[].concat(e,e);this.state.records.notes.push(i),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e[0],to:e[1],message:r.text,wrap:r.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:t})}addLinks(t,r){t=this.getActor(t);try{let e=gc(r.text,O());e=(e=e.replace(/=/g,"=")).replace(/&/g,"&");var i=JSON.parse(e);this.insertLinks(t,i)}catch(e){M.error("error while parsing actor link text",e)}}addALink(a,s){a=this.getActor(a);try{let e={},t=gc(s.text,O()),r=t.indexOf("@"),i=(t=(t=t.replace(/=/g,"=")).replace(/&/g,"&")).slice(0,r-1).trim(),n=t.slice(r+1).trim();e[i]=n,this.insertLinks(a,e)}catch(e){M.error("error while parsing actor link text",e)}}insertLinks(e,t){if(null==e.links)e.links=t;else for(var r in t)e.links[r]=t[r]}addProperties(e,t){e=this.getActor(e);try{var r=gc(t.text,O()),i=JSON.parse(r);this.insertProperties(e,i)}catch(e){M.error("error while parsing actor properties text",e)}}insertProperties(e,t){if(null==e.properties)e.properties=t;else for(var r in t)e.properties[r]=t[r]}boxEnd(){this.state.records.currentBox=void 0}addDetails(e,t){e=this.getActor(e),t=document.getElementById(t.text);try{var r=t.innerHTML,i=JSON.parse(r);i.properties&&this.insertProperties(e,i.properties),i.links&&this.insertLinks(e,i.links)}catch(e){M.error("error while parsing actor details text",e)}}getActorProperty(e,t){if(void 0!==e?.properties)return e.properties[t]}apply(e){if(Array.isArray(e))e.forEach(e=>{this.apply(e)});else switch(e.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:e.sequenceIndex,step:e.sequenceIndexStep,visible:e.sequenceVisible},wrap:!1,type:e.signalType});break;case"addParticipant":this.addActor(e.actor,e.actor,e.description,e.draw,e.config);break;case"createParticipant":if(this.state.records.actors.has(e.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=e.actor,this.addActor(e.actor,e.actor,e.description,e.draw,e.config),this.state.records.createdActors.set(e.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=e.actor,this.state.records.destroyedActors.set(e.actor,this.state.records.messages.length);break;case"activeStart":case"centralConnection":case"centralConnectionReverse":case"activeEnd":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"addNote":this.addNote(e.actor,e.placement,e.text);break;case"addLinks":this.addLinks(e.actor,e.text);break;case"addALink":this.addALink(e.actor,e.text);break;case"addProperties":this.addProperties(e.actor,e.text);break;case"addDetails":this.addDetails(e.actor,e.text);break;case"addMessage":if(this.state.records.lastCreated){if(e.to!==this.state.records.lastCreated)throw new Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(e.to!==this.state.records.lastDestroyed&&e.from!==this.state.records.lastDestroyed)throw new Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(e.from,e.to,e.msg,e.signalType,e.activate,e.centralConnection);break;case"boxStart":this.addBox(e.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,e.loopText,e.signalType);break;case"loopEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"rectStart":this.addSignal(void 0,void 0,e.color,e.signalType);break;case"rectEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"optStart":this.addSignal(void 0,void 0,e.optText,e.signalType);break;case"optEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"altStart":case"else":this.addSignal(void 0,void 0,e.altText,e.signalType);break;case"altEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"setAccTitle":Th(e.text);break;case"parStart":case"and":this.addSignal(void 0,void 0,e.parText,e.signalType);break;case"parEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,e.criticalText,e.signalType);break;case"option":this.addSignal(void 0,void 0,e.optionText,e.signalType);break;case"criticalEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"breakStart":this.addSignal(void 0,void 0,e.breakText,e.signalType);break;case"breakEnd":this.addSignal(void 0,void 0,void 0,e.signalType)}}getConfig(){return O().sequence}}}),tRe=s(()=>{s9e=mt(e=>`.actor { stroke: ${e.actorBorder}; fill: ${e.actorBkg}; } text.actor > tspan { fill: ${e.actorTextColor}; stroke: none; } .actor-line { stroke: ${e.actorLineColor}; } .innerArc { stroke-width: 1.5; stroke-dasharray: none; } .messageLine0 { stroke-width: 1.5; stroke-dasharray: none; stroke: ${e.signalColor}; } .messageLine1 { stroke-width: 1.5; stroke-dasharray: 2, 2; stroke: ${e.signalColor}; } #arrowhead path { fill: ${e.signalColor}; stroke: ${e.signalColor}; } .sequenceNumber { fill: ${e.sequenceNumberColor}; } #sequencenumber { fill: ${e.signalColor}; } #crosshead path { fill: ${e.signalColor}; stroke: ${e.signalColor}; } .messageText { fill: ${e.signalTextColor}; stroke: none; } .labelBox { stroke: ${e.labelBoxBorderColor}; fill: ${e.labelBoxBkgColor}; } .labelText, .labelText > tspan { fill: ${e.labelTextColor}; stroke: none; } .loopText, .loopText > tspan { fill: ${e.loopTextColor}; stroke: none; } .loopLine { stroke-width: 2px; stroke-dasharray: 2, 2; stroke: ${e.labelBoxBorderColor}; fill: ${e.labelBoxBorderColor}; } .note { //stroke: #decc93; stroke: ${e.noteBorderColor}; fill: ${e.noteBkgColor}; } .noteText, .noteText > tspan { fill: ${e.noteTextColor}; stroke: none; } .activation0 { fill: ${e.activationBkgColor}; stroke: ${e.activationBorderColor}; } .activation1 { fill: ${e.activationBkgColor}; stroke: ${e.activationBorderColor}; } .activation2 { fill: ${e.activationBkgColor}; stroke: ${e.activationBorderColor}; } .actorPopupMenu { position: absolute; } .actorPopupMenuPanel { position: absolute; fill: ${e.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: ${e.actorBorder}; fill: ${e.actorBkg}; } .actor-man circle, line { stroke: ${e.actorBorder}; fill: ${e.actorBkg}; stroke-width: 2px; } `,"getStyles"),o9e=s9e}),rRe=s(()=>{function t(e,t,r,i,n,a,s){g(t.append("text").attr("x",r).attr("y",i).style("text-anchor","start").text(e),s)}function l(e,t,r,i,n,a,s,o){var{actorFontSize:l,actorFontFamily:c,actorFontWeight:h}=o,u=e.split(L.lineBreakRegex);for(let e=0;er?o.width:r);if((e=l.append("rect")).attr("class","actorPopupMenuPanel"+n),e.attr("x",o.x),e.attr("y",o.height),e.attr("fill",o.fill),e.attr("stroke",o.stroke),e.attr("width",c),e.attr("height",o.height),e.attr("rx",o.rx),e.attr("ry",o.ry),null!=a){var h,u=20;for(h in a){var d=l.append("a"),p=(0,l9e.sanitizeUrl)(a[h]);d.attr("xlink:href",p),d.attr("target","_blank"),Y9e(i)(h,d,o.x+10,o.height+u,c,20,{class:"actor"},i),u+=30}}return e.attr("height",u),{height:o.height+u,width:c}},"drawPopup"),m9e=mt(function(e){return"var pu = document.getElementById('"+e+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),y9e=mt(async function(i,n,a=null){var s=i.append("foreignObject"),o=await Ic(n.text,cr()),o=s.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(o).node().getBoundingClientRect();if(s.attr("height",Math.round(o.height)).attr("width",Math.round(o.width)),"noteText"===n.class)(i=i.node().firstChild).setAttribute("height",o.height+2*n.textMargin),i=i.getBBox(),s.attr("x",Math.round(i.x+i.width/2-o.width/2)).attr("y",Math.round(i.y+i.height/2-o.height/2));else if(a){let{startx:e,stopx:t,starty:r}=a;e>t&&(i=e,e=t,t=i),s.attr("x",Math.round(e+Math.abs(e-t)/2-o.width/2)),"loopText"===n.class?s.attr("y",Math.round(r)):s.attr("y",Math.round(r-o.height))}return[s]},"drawKatex"),v9e=mt(function(e,t){let r=0,i=0,n=t.text.split(L.lineBreakRegex),[a,s]=aC(t.fontSize),o=[],l=0,c=mt(()=>t.y,"yfunc");if(void 0!==t.valign&&void 0!==t.textMargin&&0Math.round(t.y+t.textMargin),"yfunc");break;case"middle":case"center":c=mt(()=>Math.round(t.y+(r+i+t.textMargin)/2),"yfunc");break;case"bottom":case"end":c=mt(()=>Math.round(t.y+(r+i+2*t.textMargin)-t.textMargin),"yfunc")}if(void 0!==t.anchor&&void 0!==t.textMargin&&void 0!==t.width)switch(t.anchor){case"left":case"start":t.x=Math.round(t.x+t.textMargin),t.anchor="start",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"middle":case"center":t.x=Math.round(t.x+t.width/2),t.anchor="middle",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"right":case"end":t.x=Math.round(t.x+t.width-t.textMargin),t.anchor="end",t.dominantBaseline="middle",t.alignmentBaseline="middle"}for(var[h,u]of n.entries()){void 0!==t.textMargin&&0===t.textMargin&&void 0!==a&&(l=h*a),(h=e.append("text")).attr("x",t.x),h.attr("y",c()),void 0!==t.anchor&&h.attr("text-anchor",t.anchor).attr("dominant-baseline",t.dominantBaseline).attr("alignment-baseline",t.alignmentBaseline),void 0!==t.fontFamily&&h.style("font-family",t.fontFamily),void 0!==s&&h.style("font-size",s),void 0!==t.fontWeight&&h.style("font-weight",t.fontWeight),void 0!==t.fill&&h.attr("fill",t.fill),void 0!==t.class&&h.attr("class",t.class),void 0!==t.dy?h.attr("dy",t.dy):0!==l&&h.attr("dy",l);var d,u=u||P7;(t.tspan?((d=h.append("tspan")).attr("x",t.x),void 0!==t.fill&&d.attr("fill",t.fill),d):h).text(u),void 0!==t.valign&&void 0!==t.textMargin&&0{r.select&&e.forEach(e=>{var e=i.get(e),t=r.select("#actor"+e.actorCnt);!n.mirrorActors&&e.stopy?t.attr("y2",e.stopy+e.height/2):n.mirrorActors&&t.attr("y2",e.stopy)})},"fixLifeLineHeights"),w9e=mt(function(e,t,r,i){var n=i?t.stopy:t.starty,a=t.x+t.width/2,s=n+t.height,o=e=e.append("g").lower(),s=(i||(x9e++,Object.keys(t.links||{}).length&&!r.forceMenus&&o.attr("onclick",m9e(`actor${x9e}_popup`)).attr("cursor","pointer"),o.append("line").attr("id","actor"+x9e).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),o=e.append("g"),t.actorCnt=x9e,null!=t.links&&o.attr("id","root-"+x9e)),MT()),a="actor",e=(t.properties?.class?a=t.properties.class:s.fill="#eaeaea",a+=i?" "+u9e:" "+h9e,s.x=t.x,s.y=n,s.width=t.width,s.height=t.height,s.class=a,s.rx=3,s.ry=3,s.name=t.name,g9e(o,s));t.rectData=s,t.properties?.icon&&("@"===(i=t.properties.icon.trim()).charAt(0)?DT(o,s.x+s.width-20,s.y+10,i.substr(1)):IT(o,s.x+s.width-20,s.y+10,i)),W9e(r,Rc(t.description))(t.description,o,s.x,s.y,s.width,s.height,{class:"actor "+d9e},r);let l=t.height;return e.node&&(n=e.node().getBBox(),t.height=n.height,l=n.height),l},"drawActorTypeParticipant"),k9e=mt(function(e,t,r,i){var n=i?t.stopy:t.starty,a=t.x+t.width/2,s=n+t.height,o=e=e.append("g").lower(),s=(i||(x9e++,Object.keys(t.links||{}).length&&!r.forceMenus&&o.attr("onclick",m9e(`actor${x9e}_popup`)).attr("cursor","pointer"),o.append("line").attr("id","actor"+x9e).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),o=e.append("g"),t.actorCnt=x9e,null!=t.links&&o.attr("id","root-"+x9e)),MT()),a="actor",e=(t.properties?.class?a=t.properties.class:s.fill="#eaeaea",a+=i?" "+u9e:" "+h9e,s.x=t.x,s.y=n,s.width=t.width,s.height=t.height,s.class=a,s.name=t.name,{...s,x:s.x+-6,y:s.y+6,class:"actor"}),i=g9e(o,s);g9e(o,e),t.rectData=s,t.properties?.icon&&("@"===(n=t.properties.icon.trim()).charAt(0)?DT(o,s.x+s.width-20,s.y+10,n.substr(1)):IT(o,s.x+s.width-20,s.y+10,n)),W9e(r,Rc(t.description))(t.description,o,s.x-6,s.y+6,s.width,s.height,{class:"actor "+d9e},r);let l=t.height;return i.node&&(a=i.node().getBBox(),t.height=a.height,l=a.height),l},"drawActorTypeCollections"),E9e=mt(function(e,t,r,i){let n=i?t.stopy:t.starty,a=t.x+t.width/2,s=n+t.height,o=e.append("g").lower(),l=o,c=(i||(x9e++,Object.keys(t.links||{}).length&&!r.forceMenus&&l.attr("onclick",m9e(`actor${x9e}_popup`)).attr("cursor","pointer"),l.append("line").attr("id","actor"+x9e).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),l=o.append("g"),t.actorCnt=x9e,null!=t.links&&l.attr("id","root-"+x9e)),MT()),h="actor";t.properties?.class?h=t.properties.class:c.fill="#eaeaea",h+=i?" "+u9e:" "+h9e,c.x=t.x,c.y=n,c.width=t.width,c.height=t.height,c.class=h,c.name=t.name;var i=(e=c.height/2)/(2.5+c.height/50),u=l.append("g"),d=l.append("g");u.append("path").attr("d",`M ${c.x},${c.y+e} a ${i},${e} 0 0 0 0,${c.height} h ${c.width-2*i} a ${i},${e} 0 0 0 0,-${c.height} Z `).attr("class",h),d.append("path").attr("d",`M ${c.x},${c.y+e} a ${i},${e} 0 0 0 0,`+c.height).attr("stroke","#666").attr("stroke-width","1px").attr("class",h),u.attr("transform",`translate(${i}, ${-c.height/2})`),d.attr("transform",`translate(${c.width-i}, ${-c.height/2})`),t.rectData=c,t.properties?.icon&&(e=t.properties.icon.trim(),d=c.x+c.width-20,i=c.y+10,"@"===e.charAt(0)?DT(l,d,i,e.substr(1)):IT(l,d,i,e)),W9e(r,Rc(t.description))(t.description,l,c.x,c.y,c.width,c.height,{class:"actor "+d9e},r);let p=t.height,g=u.select("path:last-child");return g.node()&&(d=g.node().getBBox(),t.height=d.height,p=d.height),p},"drawActorTypeQueue"),_9e=mt(function(e,t,r,i){var n=i?t.stopy:t.starty,a=t.x+t.width/2,s=n+75,o=e.append("g").lower(),l=(i||(x9e++,o.append("line").attr("id","actor"+x9e).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=x9e),e.append("g")),c=p9e;return l.attr("class",c+=i?" "+u9e:" "+h9e),l.attr("name",t.name),(o=MT()).x=t.x,o.y=n,o.fill="#eaeaea",o.width=t.width,o.height=t.height,o.class="actor",s=t.x+t.width/2,a=n+32,l.append("defs").append("marker").attr("id","filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),l.append("circle").attr("cx",s).attr("cy",a).attr("r",22).attr("fill","#eaeaf7").attr("stroke","#666").attr("stroke-width",1.2),l.append("line").attr("marker-end","url(#filled-head-control)").attr("transform",`translate(${s}, ${a-22})`),e=l.node().getBBox(),t.height=e.height+2*(r?.sequence?.labelBoxHeight??0),W9e(r,Rc(t.description))(t.description,l,o.x,o.y+22+(i?5:12),o.width,o.height,{class:"actor "+p9e},r),t.height},"drawActorTypeControl"),S9e=mt(function(e,t,r,i){var n=i?t.stopy:t.starty,a=t.x+t.width/2,s=n+75,o=e.append("g").lower(),l=e.append("g"),c="actor";return l.attr("class",c+=i?" "+u9e:" "+h9e),l.attr("name",t.name),(e=MT()).x=t.x,e.y=n,e.fill="#eaeaea",e.width=t.width,e.height=t.height,e.class="actor",c=t.x+t.width/2,n+=i?10:25,l.append("circle").attr("cx",c).attr("cy",n).attr("r",22).attr("width",t.width).attr("height",t.height),l.append("line").attr("x1",c-22).attr("x2",c+22).attr("y1",n+22).attr("y2",n+22).attr("stroke-width",2),c=l.node().getBBox(),t.height=c.height+(r?.sequence?.labelBoxHeight??0),i||(x9e++,o.append("line").attr("id","actor"+x9e).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=x9e),W9e(r,Rc(t.description))(t.description,l,e.x,e.y+(i?15:30),e.width,e.height,{class:"actor "+p9e},r),i?l.attr("transform","translate(0, 22)"):l.attr("transform","translate(0, 6)"),t.height},"drawActorTypeEntity"),C9e=mt(function(e,t,r,i){let n=i?t.stopy:t.starty,a=t.x+t.width/2,s=n+t.height+2*r.boxTextMargin,o=e.append("g").lower(),l=o,c=(i||(x9e++,Object.keys(t.links||{}).length&&!r.forceMenus&&l.attr("onclick",m9e(`actor${x9e}_popup`)).attr("cursor","pointer"),l.append("line").attr("id","actor"+x9e).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),l=o.append("g"),t.actorCnt=x9e,null!=t.links&&l.attr("id","root-"+x9e)),MT()),h="actor";t.properties?.class?h=t.properties.class:c.fill="#eaeaea",h+=i?" "+u9e:" "+h9e,c.x=t.x,c.y=n,c.width=t.width,c.height=t.height,c.class=h,c.name=t.name,c.x=t.x,c.y=n;var e=c.width/3,i=c.width/3,u=(p=e/2)/(2.5+e/50),d=l.append("g"),p=` M ${c.x},${c.y+u} a ${p},${u} 0 0 0 ${e},0 a ${p},${u} 0 0 0 -${e},0 l 0,${i-2*u} a ${p},${u} 0 0 0 ${e},0 l 0,-${i-2*u} `;return d.append("path").attr("d",p).attr("fill","#eaeaea").attr("stroke","#000").attr("stroke-width",1).attr("class",h),d.attr("transform",`translate(${e}, ${u})`),t.rectData=c,W9e(r,Rc(t.description))(t.description,l,c.x,c.y+35,c.width,c.height,{class:"actor "+d9e},r),(i=d.select("path:last-child")).node()&&(p=i.node().getBBox(),t.height=p.height+(r.sequence.labelBoxHeight??0)),t.height},"drawActorTypeDatabase"),A9e=mt(function(e,t,r,i){var n=i?t.stopy:t.starty,a=t.x+t.width/2,s=n+80,o=e.append("g").lower(),a=(i||(x9e++,o.append("line").attr("id","actor"+x9e).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=x9e),e.append("g")),e=p9e;return a.attr("class",e+=i?" "+u9e:" "+h9e),a.attr("name",t.name),(o=MT()).x=t.x,o.y=n,o.fill="#eaeaea",o.width=t.width,o.height=t.height,o.class="actor",a.append("line").attr("id","actor-man-torso"+x9e).attr("x1",t.x+t.width/2-55).attr("y1",n+12).attr("x2",t.x+t.width/2-15).attr("y2",n+12),a.append("line").attr("id","actor-man-arms"+x9e).attr("x1",t.x+t.width/2-55).attr("y1",n+2).attr("x2",t.x+t.width/2-55).attr("y2",n+22),a.append("circle").attr("cx",t.x+t.width/2).attr("cy",n+12).attr("r",22),s=a.node().getBBox(),t.height=s.height+(r.sequence.labelBoxHeight??0),W9e(r,Rc(t.description))(t.description,a,o.x,o.y+15,o.width,o.height,{class:"actor "+p9e},r),a.attr("transform","translate(0,21)"),t.height},"drawActorTypeBoundary"),R9e=mt(function(e,t,r,i){var n=i?t.stopy:t.starty,a=t.x+t.width/2,s=n+80,o=e.append("g").lower(),l=(i||(x9e++,o.append("line").attr("id","actor"+x9e).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=x9e),e.append("g")),c=p9e;return l.attr("class",c+=i?" "+u9e:" "+h9e),l.attr("name",t.name),(o=MT()).x=t.x,o.y=n,o.fill="#eaeaea",o.width=t.width,o.height=t.height,o.class="actor",o.rx=3,o.ry=3,l.append("line").attr("id","actor-man-torso"+x9e).attr("x1",a).attr("y1",n+25).attr("x2",a).attr("y2",n+45),l.append("line").attr("id","actor-man-arms"+x9e).attr("x1",a-c9e/2).attr("y1",n+33).attr("x2",a+c9e/2).attr("y2",n+33),l.append("line").attr("x1",a-c9e/2).attr("y1",n+60).attr("x2",a).attr("y2",n+45),l.append("line").attr("x1",a).attr("y1",n+45).attr("x2",a+c9e/2-2).attr("y2",n+60),(s=l.append("circle")).attr("cx",t.x+t.width/2),s.attr("cy",n+10),s.attr("r",15),s.attr("width",t.width),s.attr("height",t.height),e=l.node().getBBox(),t.height=e.height,W9e(r,Rc(t.description))(t.description,l,o.x,o.y+35,o.width,o.height,{class:"actor "+p9e},r),t.height},"drawActorTypeActor"),L9e=mt(async function(e,t,r,i){switch(t.type){case"actor":return R9e(e,t,r,i);case"participant":return w9e(e,t,r,i);case"boundary":return A9e(e,t,r,i);case"control":return _9e(e,t,r,i);case"entity":return S9e(e,t,r,i);case"database":return C9e(e,t,r,i);case"collections":return k9e(e,t,r,i);case"queue":return E9e(e,t,r,i)}},"drawActor"),N9e=mt(function(e,t,r){e=e.append("g"),O9e(e,t),t.name&&W9e(r)(t.name,e,t.x,t.y+r.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:"text"},r),e.lower()},"drawBox"),I9e=mt(function(e){return e.append("g")},"anchorElement"),D9e=mt(function(e,t,r,i,n){var a=MT(),s=t.anchored;a.x=t.startx,a.y=t.starty,a.class="activation"+n%3,a.width=t.stopx-t.startx,a.height=r-t.starty,g9e(s,a)},"drawActivation"),M9e=mt(async function(e,t,r,i){let{boxMargin:n,boxTextMargin:a,labelBoxHeight:s,labelBoxWidth:o,messageFontFamily:l,messageFontSize:c,messageFontWeight:h}=i,u=e.append("g"),d=mt(function(e,t,r,i){return u.append("line").attr("x1",e).attr("y1",t).attr("x2",r).attr("y2",i).attr("class","loopLine")},"drawLoopLine"),p=(d(t.startx,t.starty,t.stopx,t.starty),d(t.stopx,t.starty,t.stopx,t.stopy),d(t.startx,t.stopy,t.stopx,t.stopy),d(t.startx,t.starty,t.startx,t.stopy),void 0!==t.sections&&t.sections.forEach(function(e){d(t.startx,e.y,t.stopx,e.y).style("stroke-dasharray","3, 3")}),OT());p.text=r,p.x=t.startx,p.y=t.starty,p.fontFamily=l,p.fontSize=c,p.fontWeight=h,p.anchor="middle",p.valign="middle",p.tspan=!1,p.width=o||50,p.height=s||20,p.textMargin=a,p.class="labelText",b9e(u,p),(p=G9e()).text=t.title,p.x=t.startx+o/2+(t.stopx-t.startx)/2,p.y=t.starty+n+a,p.anchor="middle",p.valign="middle",p.textMargin=a,p.class="loopText",p.fontFamily=l,p.fontSize=c,p.fontWeight=h,p.wrap=!0;var g=Rc(p.text)?await y9e(u,p,t):v9e(u,p);if(void 0!==t.sectionTitles)for(var[f,m]of Object.entries(t.sectionTitles))m.message&&(p.text=m.message,p.x=t.startx+(t.stopx-t.startx)/2,p.y=t.sections[f].y+n+a,p.class="loopText",p.anchor="middle",p.valign="middle",p.tspan=!1,p.fontFamily=l,p.fontSize=c,p.fontWeight=h,p.wrap=t.wrap,Rc(p.text)?(t.starty=t.sections[f].y,await y9e(u,p,t)):v9e(u,p),m=Math.round(g.map(e=>(e._groups||e)[0][0].getBBox().height).reduce((e,t)=>e+t)),t.sections[f].height+=m-(n+a));return t.height=Math.round(t.stopy-t.starty),u},"drawLoop"),O9e=mt(function(e,t){LT(e,t)},"drawBackgroundRect"),P9e=mt(function(e){e.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),$9e=mt(function(e){e.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),B9e=mt(function(e){e.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),F9e=mt(function(e){e.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),z9e=mt(function(e){e.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).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")},"insertArrowFilledHead"),q9e=mt(function(e){e.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),U9e=mt(function(e){e.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),G9e=mt(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),j9e=mt(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),mt(i,"byText"),mt(c,"byTspan"),mt(n,"byFo"),mt(a,"byKatex"),mt(f,"_setTextAttrs"),W9e=function(e,t=!1){return t?a:"fo"===e.textPlacement?n:"old"===e.textPlacement?i:c},mt(t,"byText"),mt(l,"byTspan"),mt(r,"byFo"),mt(g,"_setTextAttrs"),Y9e=function(e){return"fo"===e.textPlacement?r:"old"===e.textPlacement?t:l},V9e=mt(function(e){e.append("defs").append("marker").attr("id","solidTopArrowHead").attr("refX",7.9).attr("refY",7.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 8 L 0 8 z")},"insertSolidTopArrowHead"),H9e=mt(function(e){e.append("defs").append("marker").attr("id","solidBottomArrowHead").attr("refX",7.9).attr("refY",.75).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 0 L 0 8 z")},"insertSolidBottomArrowHead"),X9e=mt(function(e){e.append("defs").append("marker").attr("id","stickTopArrowHead").attr("refX",7.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 7 7").attr("stroke","black").attr("stroke-width",1.5).attr("fill","none")},"insertStickTopArrowHead"),K9e=mt(function(e){e.append("defs").append("marker").attr("id","stickBottomArrowHead").attr("refX",7.5).attr("refY",0).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 7 L 7 0").attr("stroke","black").attr("stroke-width",1.5).attr("fill","none")},"insertStickBottomArrowHead"),Z9e={drawRect:g9e,drawText:v9e,drawLabel:b9e,drawActor:L9e,drawBox:N9e,drawPopup:f9e,anchorElement:I9e,drawActivation:D9e,drawLoop:M9e,drawBackgroundRect:O9e,insertArrowHead:F9e,insertArrowFilledHead:z9e,insertSequenceNumber:q9e,insertArrowCrossHead:U9e,insertDatabaseIcon:P9e,insertComputerIcon:$9e,insertClockIcon:B9e,getTextObj:G9e,getNoteRect:j9e,fixLifeLineHeights:T9e,sanitizeUrl:l9e.sanitizeUrl,insertSolidTopArrowHead:V9e,insertSolidBottomArrowHead:H9e,insertStickTopArrowHead:X9e,insertStickBottomArrowHead:K9e}});async function iRe(e,t){$.bumpVerticalPos(10);var{startx:r,stopx:i,message:n}=t,a=L.splitBreaks(n).length,s=Rc(n),n=s?await Lc(n,O()):sC.calculateTextDimensions(n,hRe(P));s||(s=n.height/a,t.height+=s,$.bumpVerticalPos(s));let o,l=n.height-10,c=n.width;return r===i?(o=$.getVerticalPos()+l,P.rightAngles||(l+=P.boxMargin,o=$.getVerticalPos()+l),l+=30,a=L.getMax(c/2,P.width/2),$.insert(r-a,$.getVerticalPos()-10+l,i+a,$.getVerticalPos()+30+l)):(l+=P.boxMargin,o=$.getVerticalPos()+l,$.insert(r,o-10,i,o)),$.bumpVerticalPos(l),t.height+=l,t.stopy=t.starty+t.height,$.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),o}function nRe(e,t,r,i,n){$.bumpVerticalPos(r);let a=i;t.id&&t.message&&e[t.id]&&(r=e[t.id].width,e=hRe(P),t.message=sC.wrapLabel(`[${t.message}]`,r-2*P.wrapPadding,e),t.width=r,t.wrap=!0,r=sC.calculateTextDimensions(t.message,e),e=L.getMax(r.height,P.labelBoxHeight),a=i+e,M.debug(e+" - "+t.message)),n(t),$.bumpVerticalPos(a)}function aRe(r,i,e,t,n,a,s){function o(e,t){e.x{var t,r=hRe(P),r=(t=e.actorKeys.reduce((e,t)=>e+(i.get(t).width+(i.get(t).margin||0)),0)+8*P.boxMargin-2*P.boxTextMargin,e.wrap&&(e.name=sC.wrapLabel(e.name,t-2*P.wrapPadding,r)),sC.calculateTextDimensions(e.name,r)),r=(c=L.getMax(r.height,c),L.getMax(t,r.width+2*P.wrapPadding));e.margin=P.boxTextMargin,te.textMaxHeight=c),L.getMax(r,P.height)}var P,$,lRe,cRe,hRe,uRe,dRe,pRe,gRe,fRe,mRe,yRe,vRe,bRe,xRe,TRe,wRe,kRe,ERe,_Re,SRe,CRe,ARe,RRe,LRe=s(()=>{hw(),rRe(),e(),zc(),zc(),pw(),Au(),Tr(),hC(),ph(),eRe(),P={},$={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:mt(function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map(e=>e.height||0))+(0===this.loops.length?0:this.loops.map(e=>e.height||0).reduce((e,t)=>e+t))+(0===this.messages.length?0:this.messages.map(e=>e.height||0).reduce((e,t)=>e+t))+(0===this.notes.length?0:this.notes.map(e=>e.height||0).reduce((e,t)=>e+t))},"getHeight"),clear:mt(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:mt(function(e){this.boxes.push(e)},"addBox"),addActor:mt(function(e){this.actors.push(e)},"addActor"),addLoop:mt(function(e){this.loops.push(e)},"addLoop"),addMessage:mt(function(e){this.messages.push(e)},"addMessage"),addNote:mt(function(e){this.notes.push(e)},"addNote"),lastActor:mt(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:mt(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:mt(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:mt(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:mt(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,yRe(O())},"init"),updateVal:mt(function(e,t,r,i){void 0===e[t]?e[t]=r:e[t]=i(r,e[t])},"updateVal"),updateBounds:mt(function(i,n,a,s){let o=this,l=0;function e(r){return mt(function(e){l++;var t=o.sequenceItems.length-l+1;o.updateVal(e,"starty",n-t*P.boxMargin,Math.min),o.updateVal(e,"stopy",s+t*P.boxMargin,Math.max),o.updateVal($.data,"startx",i-t*P.boxMargin,Math.min),o.updateVal($.data,"stopx",a+t*P.boxMargin,Math.max),"activation"!==r&&(o.updateVal(e,"startx",i-t*P.boxMargin,Math.min),o.updateVal(e,"stopx",a+t*P.boxMargin,Math.max),o.updateVal($.data,"starty",n-t*P.boxMargin,Math.min),o.updateVal($.data,"stopy",s+t*P.boxMargin,Math.max))},"updateItemBounds")}mt(e,"updateFn"),this.sequenceItems.forEach(e()),this.activations.forEach(e("activation"))},"updateBounds"),insert:mt(function(e,t,r,i){var n=L.getMin(e,r),e=L.getMax(e,r),r=L.getMin(t,i),t=L.getMax(t,i);this.updateVal($.data,"startx",n,Math.min),this.updateVal($.data,"starty",r,Math.min),this.updateVal($.data,"stopx",e,Math.max),this.updateVal($.data,"stopy",t,Math.max),this.updateBounds(n,r,e,t)},"insert"),newActivation:mt(function(e,t,r){var r=r.get(e.from),i=vRe(e.from).length||0,r=r.x+r.width/2+(i-1)*P.activationWidth/2;this.activations.push({startx:r,starty:this.verticalPos+2,stopx:r+P.activationWidth,stopy:void 0,actor:e.from,anchored:Z9e.anchorElement(t)})},"newActivation"),endActivation:mt(function(e){return e=this.activations.map(function(e){return e.actor}).lastIndexOf(e.from),this.activations.splice(e,1)[0]},"endActivation"),createLoop:mt(function(e={message:void 0,wrap:!1,width:void 0},t){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:e.message,wrap:e.wrap,width:e.width,height:0,fill:t}},"createLoop"),newLoop:mt(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},"newLoop"),endLoop:mt(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:mt(function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap},"isLoopOverlap"),addSectionToLoop:mt(function(e){var t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:$.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},"addSectionToLoop"),saveVerticalPos:mt(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:mt(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:mt(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=L.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:mt(function(){return this.verticalPos},"getVerticalPos"),getBounds:mt(function(){return{bounds:this.data,models:this.models}},"getBounds")},lRe=mt(async function(e,t){$.bumpVerticalPos(P.boxMargin),t.height=P.boxMargin,t.starty=$.getVerticalPos();var r=MT(),e=(r.x=t.startx,r.y=t.starty,r.width=t.width||P.width,r.class="note",e.append("g")),i=Z9e.drawRect(e,r),e=((n=OT()).x=t.startx,n.y=t.starty,n.width=r.width,n.dy="1em",n.text=t.message,n.class="noteText",n.fontFamily=P.noteFontFamily,n.fontSize=P.noteFontSize,n.fontWeight=P.noteFontWeight,n.anchor=P.noteAlign,n.textMargin=P.noteMargin,n.valign="center",Rc(n.text)?await y9e(e,n):v9e(e,n)),n=Math.round(e.map(e=>(e._groups||e)[0][0].getBBox().height).reduce((e,t)=>e+t));i.attr("height",n+2*P.noteMargin),t.height+=n+2*P.noteMargin,$.bumpVerticalPos(n+2*P.noteMargin),t.stopy=t.starty+n+2*P.noteMargin,t.stopx=t.startx+r.width,$.insert(t.startx,t.starty,t.stopx,t.stopy),$.models.addNote(t)},"drawNote"),cRe=mt(function(e,t,r,i,n,a,s){let o=i.db.getActors(),l=o.get(t.from),c=o.get(t.to),h=r.sequenceVisible,u=l.x+l.width/2,d=c.x+c.width/2,p=u<=d,g=_Re(t,i),f=e.append("g"),m=mt((e,t)=>(e=e?16.5:-16.5,t?-e:e),"getCircleOffset"),y=mt(e=>{f.append("circle").attr("cx",e).attr("cy",s).attr("r",5).attr("width",10).attr("height",10)},"drawCircle"),{CENTRAL_CONNECTION:v,CENTRAL_CONNECTION_REVERSE:b,CENTRAL_CONNECTION_DUAL:x}=i.db.LINETYPE;if(h)switch(t.centralConnection){case v:g&&(d+=m(p,!0));break;case b:g||(u+=m(p,!1));break;case x:g?d+=m(p,!0):u+=m(p,!1)}switch(t.centralConnection){case v:y(d);break;case b:y(u);break;case x:y(u),y(d)}},"drawCentralConnection"),hRe=mt(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),uRe=mt(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),"noteFont"),dRe=mt(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),"actorFont"),mt(iRe,"boundMessage"),pRe=mt(async function(l,c,h,u,d){var{startx:p,stopx:g,starty:e,message:t,type:f,sequenceIndex:m,sequenceVisible:r}=c,i=sC.calculateTextDimensions(t,hRe(P)),n=OT();n.x=p,n.y=e+10,n.width=g-p,n.class="messageText",n.dy="1em",n.text=t,n.fontFamily=P.messageFontFamily,n.fontSize=P.messageFontSize,n.fontWeight=P.messageFontWeight,n.anchor=P.messageAlign,n.valign="center",n.textMargin=P.wrapPadding,n.tspan=!1,Rc(n.text)?await y9e(l,n,{startx:p,stopx:g,starty:h}):v9e(l,n);let a=i.width,y,v=(p===g?(e=r||P.showSequenceNumbers,t=_Re(d,u),n=SRe(d,u),i=p+(e&&(t||n)?10:0),y=P.rightAngles?l.append("path").attr("d",`M ${i},${h} H ${p+L.getMax(P.width/2,a/2)} V ${h+25} H `+p):l.append("path").attr("d","M "+i+","+h+" C "+(i+60)+","+(h-10)+" "+(p+60)+","+(h+30)+" "+p+","+(h+20))):((y=l.append("line")).attr("x1",p),y.attr("y1",h),y.attr("x2",g),y.attr("y2",h),kRe(d,u)&&cRe(l,d,c,u,p,g,h)),f===u.db.LINETYPE.DOTTED||f===u.db.LINETYPE.DOTTED_CROSS||f===u.db.LINETYPE.DOTTED_POINT||f===u.db.LINETYPE.DOTTED_OPEN||f===u.db.LINETYPE.BIDIRECTIONAL_DOTTED||f===u.db.LINETYPE.SOLID_TOP_DOTTED||f===u.db.LINETYPE.SOLID_BOTTOM_DOTTED||f===u.db.LINETYPE.STICK_TOP_DOTTED||f===u.db.LINETYPE.STICK_BOTTOM_DOTTED||f===u.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||f===u.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||f===u.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||f===u.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(y.style("stroke-dasharray","3, 3"),y.attr("class","messageLine1")):y.attr("class","messageLine0"),"");if(P.arrowMarkerAbsolute&&(v=xc(!0)),y.attr("stroke-width",2),y.attr("stroke","none"),y.style("fill","none"),f!==u.db.LINETYPE.SOLID_TOP&&f!==u.db.LINETYPE.SOLID_TOP_DOTTED||y.attr("marker-end","url("+v+"#solidTopArrowHead)"),f!==u.db.LINETYPE.SOLID_BOTTOM&&f!==u.db.LINETYPE.SOLID_BOTTOM_DOTTED||y.attr("marker-end","url("+v+"#solidBottomArrowHead)"),f!==u.db.LINETYPE.STICK_TOP&&f!==u.db.LINETYPE.STICK_TOP_DOTTED||y.attr("marker-end","url("+v+"#stickTopArrowHead)"),f!==u.db.LINETYPE.STICK_BOTTOM&&f!==u.db.LINETYPE.STICK_BOTTOM_DOTTED||y.attr("marker-end","url("+v+"#stickBottomArrowHead)"),f!==u.db.LINETYPE.SOLID_ARROW_TOP_REVERSE&&f!==u.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||y.attr("marker-start","url("+v+"#solidBottomArrowHead)"),f!==u.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE&&f!==u.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||y.attr("marker-start","url("+v+"#solidTopArrowHead)"),f!==u.db.LINETYPE.STICK_ARROW_TOP_REVERSE&&f!==u.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||y.attr("marker-start","url("+v+"#stickBottomArrowHead)"),f!==u.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE&&f!==u.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED||y.attr("marker-start","url("+v+"#stickTopArrowHead)"),f!==u.db.LINETYPE.SOLID&&f!==u.db.LINETYPE.DOTTED||y.attr("marker-end","url("+v+"#arrowhead)"),f!==u.db.LINETYPE.BIDIRECTIONAL_SOLID&&f!==u.db.LINETYPE.BIDIRECTIONAL_DOTTED||(y.attr("marker-start","url("+v+"#arrowhead)"),y.attr("marker-end","url("+v+"#arrowhead)")),f!==u.db.LINETYPE.SOLID_POINT&&f!==u.db.LINETYPE.DOTTED_POINT||y.attr("marker-end","url("+v+"#filled-head)"),f!==u.db.LINETYPE.SOLID_CROSS&&f!==u.db.LINETYPE.DOTTED_CROSS||y.attr("marker-end","url("+v+"#crosshead)"),r||P.showSequenceNumbers){let e=f===u.db.LINETYPE.BIDIRECTIONAL_SOLID||f===u.db.LINETYPE.BIDIRECTIONAL_DOTTED,t=f===u.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||f===u.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||f===u.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||f===u.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||f===u.db.LINETYPE.STICK_ARROW_TOP_REVERSE||f===u.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||f===u.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||f===u.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r=kRe(d,u),i=p,n=g,a=void(e?(pn&&(n=o.height),o.width+s.x>a&&(a=o.width+s.x)}return{maxHeight:n,maxWidth:a}},"drawActorsPopup"),yRe=mt(function(e){Re(P,e),e.fontFamily&&(P.actorFontFamily=P.noteFontFamily=P.messageFontFamily=e.fontFamily),e.fontSize&&(P.actorFontSize=P.noteFontSize=P.messageFontSize=e.fontSize),e.fontWeight&&(P.actorFontWeight=P.noteFontWeight=P.messageFontWeight=e.fontWeight)},"setConf"),vRe=mt(function(t){return $.activations.filter(function(e){return e.actor===t})},"actorActivations"),bRe=mt(function(e,t){return t=t.get(e),[(e=vRe(e)).reduce(function(e,t){return L.getMin(e,t.startx)},t.x+t.width/2-1),e.reduce(function(e,t){return L.getMax(e,t.stopx)},t.x+t.width/2+1)]},"activationBounds"),mt(nRe,"adjustLoopHeightForWrap"),mt(aRe,"adjustCreatedDestroyedData"),xRe=mt(async function(i,e,t,n){var{securityLevel:r,sequence:a}=O();P=a;let s;"sandbox"===r&&(s=V("#i"+e));var a=V("sandbox"===r?s.nodes()[0].contentDocument.body:"body"),o="sandbox"===r?s.nodes()[0].contentDocument:document;$.init(),M.debug(n.db);let l="sandbox"===r?a.select(`[id="${e}"]`):V(`[id="${e}"]`),c=n.db.getActors(),h=n.db.getCreatedActors(),u=n.db.getDestroyedActors(),d=n.db.getBoxes(),p=n.db.getActorKeys(),g=n.db.getMessages(),f=n.db.getDiagramTitle(),m=n.db.hasAtLeastOneBox(),y=n.db.hasAtLeastOneBoxWithTitle(),v=await sRe(c,g,n);if(P.height=await oRe(c,v,d),Z9e.insertComputerIcon(l),Z9e.insertDatabaseIcon(l),Z9e.insertClockIcon(l),m&&($.bumpVerticalPos(P.boxMargin),y)&&$.bumpVerticalPos(d[0].textMaxHeight),!0===P.hideUnusedParticipants){let t=new Set;g.forEach(e=>{t.add(e.from),t.add(e.to)}),p=p.filter(e=>t.has(e))}gRe(l,c,h,p,0,g,!1);var b,x,T,w=await ARe(g,c,v,n);function k(e,t){var r=$.endActivation(e);r.starty+18>t&&(r.starty=t-6,t+=12),Z9e.drawActivation(l,r,t,P,vRe(e.from).length),$.insert(r.startx,t-10,r.stopx,t)}Z9e.insertArrowHead(l),Z9e.insertArrowCrossHead(l),Z9e.insertArrowFilledHead(l),Z9e.insertSequenceNumber(l),Z9e.insertSolidTopArrowHead(l),Z9e.insertSolidBottomArrowHead(l),Z9e.insertStickTopArrowHead(l),Z9e.insertStickBottomArrowHead(l),mt(k,"activeEnd");let E=1,_=1,S=[],C=[],A=0;for(b of g){let e,t,r;switch(b.type){case n.db.LINETYPE.NOTE:$.resetVerticalPos(),t=b.noteModel,await lRe(l,t);break;case n.db.LINETYPE.ACTIVE_START:case n.db.LINETYPE.CENTRAL_CONNECTION:case n.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:$.newActivation(b,l,c);break;case n.db.LINETYPE.ACTIVE_END:k(b,$.getVerticalPos());break;case n.db.LINETYPE.LOOP_START:nRe(w,b,P.boxMargin,P.boxMargin+P.boxTextMargin,e=>$.newLoop(e));break;case n.db.LINETYPE.LOOP_END:e=$.endLoop(),await Z9e.drawLoop(l,e,"loop",P),$.bumpVerticalPos(e.stopy-$.getVerticalPos()),$.models.addLoop(e);break;case n.db.LINETYPE.RECT_START:nRe(w,b,P.boxMargin,P.boxMargin,e=>$.newLoop(void 0,e.message));break;case n.db.LINETYPE.RECT_END:e=$.endLoop(),C.push(e),$.models.addLoop(e),$.bumpVerticalPos(e.stopy-$.getVerticalPos());break;case n.db.LINETYPE.OPT_START:nRe(w,b,P.boxMargin,P.boxMargin+P.boxTextMargin,e=>$.newLoop(e));break;case n.db.LINETYPE.OPT_END:e=$.endLoop(),await Z9e.drawLoop(l,e,"opt",P),$.bumpVerticalPos(e.stopy-$.getVerticalPos()),$.models.addLoop(e);break;case n.db.LINETYPE.ALT_START:nRe(w,b,P.boxMargin,P.boxMargin+P.boxTextMargin,e=>$.newLoop(e));break;case n.db.LINETYPE.ALT_ELSE:nRe(w,b,P.boxMargin+P.boxTextMargin,P.boxMargin,e=>$.addSectionToLoop(e));break;case n.db.LINETYPE.ALT_END:e=$.endLoop(),await Z9e.drawLoop(l,e,"alt",P),$.bumpVerticalPos(e.stopy-$.getVerticalPos()),$.models.addLoop(e);break;case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:nRe(w,b,P.boxMargin,P.boxMargin+P.boxTextMargin,e=>$.newLoop(e)),$.saveVerticalPos();break;case n.db.LINETYPE.PAR_AND:nRe(w,b,P.boxMargin+P.boxTextMargin,P.boxMargin,e=>$.addSectionToLoop(e));break;case n.db.LINETYPE.PAR_END:e=$.endLoop(),await Z9e.drawLoop(l,e,"par",P),$.bumpVerticalPos(e.stopy-$.getVerticalPos()),$.models.addLoop(e);break;case n.db.LINETYPE.AUTONUMBER:E=b.message.start||E,_=b.message.step||_,b.message.visible?n.db.enableSequenceNumbers():n.db.disableSequenceNumbers();break;case n.db.LINETYPE.CRITICAL_START:nRe(w,b,P.boxMargin,P.boxMargin+P.boxTextMargin,e=>$.newLoop(e));break;case n.db.LINETYPE.CRITICAL_OPTION:nRe(w,b,P.boxMargin+P.boxTextMargin,P.boxMargin,e=>$.addSectionToLoop(e));break;case n.db.LINETYPE.CRITICAL_END:e=$.endLoop(),await Z9e.drawLoop(l,e,"critical",P),$.bumpVerticalPos(e.stopy-$.getVerticalPos()),$.models.addLoop(e);break;case n.db.LINETYPE.BREAK_START:nRe(w,b,P.boxMargin,P.boxMargin+P.boxTextMargin,e=>$.newLoop(e));break;case n.db.LINETYPE.BREAK_END:e=$.endLoop(),await Z9e.drawLoop(l,e,"break",P),$.bumpVerticalPos(e.stopy-$.getVerticalPos()),$.models.addLoop(e);break;default:try{(r=b.msgModel).starty=$.getVerticalPos(),r.sequenceIndex=E,r.sequenceVisible=n.db.showSequenceNumbers();var R=await iRe(l,r);aRe(b,r,R,A,c,h,u),S.push({messageModel:r,lineStartY:R,msg:b}),$.models.addMessage(r)}catch(i){M.error("error while drawing message",i)}}[n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.SOLID,n.db.LINETYPE.SOLID_TOP,n.db.LINETYPE.SOLID_BOTTOM,n.db.LINETYPE.STICK_TOP,n.db.LINETYPE.STICK_BOTTOM,n.db.LINETYPE.SOLID_TOP_DOTTED,n.db.LINETYPE.SOLID_BOTTOM_DOTTED,n.db.LINETYPE.STICK_TOP_DOTTED,n.db.LINETYPE.STICK_BOTTOM_DOTTED,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,n.db.LINETYPE.STICK_ARROW_TOP_REVERSE,n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.DOTTED,n.db.LINETYPE.SOLID_CROSS,n.db.LINETYPE.DOTTED_CROSS,n.db.LINETYPE.SOLID_POINT,n.db.LINETYPE.DOTTED_POINT,n.db.LINETYPE.BIDIRECTIONAL_SOLID,n.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(b.type)&&(E+=_),A++}M.debug("createdActors",h),M.debug("destroyedActors",u),await fRe(l,c,p,!1);for(x of S)await pRe(l,x.messageModel,x.lineStartY,n,x.msg);P.mirrorActors&&await fRe(l,c,p,!0),C.forEach(e=>Z9e.drawBackgroundRect(l,e)),T9e(l,c,p,P);for(T of $.models.boxes){T.height=$.getVerticalPos()-T.y,$.insert(T.x,T.y,T.x+T.width,T.height);var L=2*P.boxMargin;T.startx=T.x-L,T.starty=T.y-.25*L,T.stopx=T.startx+T.width+2*L,T.stopy=T.starty+T.height+.75*L,T.stroke="rgb(0,0,0, 0.5)",Z9e.drawBox(l,T,P)}m&&$.bumpVerticalPos(P.boxMargin),r=mRe(l,c,p,o),void 0===(a=$.getBounds().bounds).startx&&(a.startx=0),void 0===a.starty&&(a.starty=0),void 0===a.stopx&&(a.stopx=0),void 0===a.stopy&&(a.stopy=0);let N=a.stopy-a.starty,I=(No?-e:e,"adjustValue"),t=(e.from===e.to?c=l:(e.activate&&!t&&(c+=h(P.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)||(c+=h(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)&&(l-=h(3))),[i,n,a,s]),r=Math.abs(l-c),h=(e.wrap&&e.message&&(e.message=sC.wrapLabel(e.message,L.getMax(r+2*P.wrapPadding,P.width),hRe(P))),sC.calculateTextDimensions(e.message,hRe(P)));return{width:L.getMax(e.wrap?0:h.width+2*P.wrapPadding,r+2*P.wrapPadding,P.width),height:0,startx:l,stopx:c,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,t),toBounds:Math.max.apply(null,t)}},"buildMessageModel"),ARe=mt(async function(e,i,t,n){let a={},s=[],o,l,c;for(let r of e){switch(r.type){case n.db.LINETYPE.LOOP_START:case n.db.LINETYPE.ALT_START:case n.db.LINETYPE.OPT_START:case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:case n.db.LINETYPE.CRITICAL_START:case n.db.LINETYPE.BREAK_START:s.push({id:r.id,msg:r.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case n.db.LINETYPE.ALT_ELSE:case n.db.LINETYPE.PAR_AND:case n.db.LINETYPE.CRITICAL_OPTION:r.message&&(o=s.pop(),a[o.id]=o,a[r.id]=o,s.push(o));break;case n.db.LINETYPE.LOOP_END:case n.db.LINETYPE.ALT_END:case n.db.LINETYPE.OPT_END:case n.db.LINETYPE.PAR_END:case n.db.LINETYPE.CRITICAL_END:case n.db.LINETYPE.BREAK_END:o=s.pop(),a[o.id]=o;break;case n.db.LINETYPE.ACTIVE_START:var h=i.get(r.from||r.to.actor),u=vRe(r.from||r.to.actor).length,u={startx:h=h.x+h.width/2+(u-1)*P.activationWidth/2,stopx:h+P.activationWidth,actor:r.from,enabled:!0};$.activations.push(u);break;case n.db.LINETYPE.ACTIVE_END:h=$.activations.map(e=>e.actor).lastIndexOf(r.from),$.activations.splice(h,1).splice(0,1)}void 0!==r.placement?(l=await wRe(r,i,n),r.noteModel=l,s.forEach(e=>{(o=e).from=L.getMin(o.from,l.startx),o.to=L.getMax(o.to,l.startx+l.width),o.width=L.getMax(o.width,Math.abs(o.from-o.to))-P.labelBoxWidth})):(c=CRe(r,i,n),(r.msgModel=c).startx&&c.stopx&&0{var t;o=e,c.startx===c.stopx?(e=i.get(r.from),t=i.get(r.to),o.from=L.getMin(e.x-c.width/2,e.x-e.width/2,o.from),o.to=L.getMax(t.x+c.width/2,t.x+e.width/2,o.to),o.width=L.getMax(o.width,Math.abs(o.to-o.from))-P.labelBoxWidth):(o.from=L.getMin(c.startx,o.from),o.to=L.getMax(c.stopx,o.to),o.width=L.getMax(o.width,c.width)-P.labelBoxWidth)}))}return $.activations=[],M.debug("Loop type widths:",a),a},"calculateLoopBounds"),RRe={bounds:$,drawActors:fRe,drawActorsPopup:mRe,setConf:yRe,draw:xRe}}),NRe={};PGe(NRe,{diagram:()=>IRe});var IRe,DRe,MRe,ORe,PRe,$Re,BRe,FRe,zRe,qRe,URe,GRe,jRe,WRe,YRe,VRe=s(()=>{J9e(),eRe(),tRe(),Au(),LRe(),IRe={parser:e9e,get db(){return new a9e},renderer:RRe,styles:o9e,init:mt(e=>{e.sequence||(e.sequence={}),e.wrap&&(e.sequence.wrap=e.wrap,Rh({sequence:{wrap:e.wrap}}))},"init")}}),HRe=s(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[1,18],i=[1,19],n=[1,20],a=[1,41],s=[1,42],P=[1,26],$=[1,24],B=[1,25],o=[1,32],l=[1,33],F=[1,34],c=[1,45],z=[1,35],q=[1,36],U=[1,37],G=[1,38],j=[1,27],W=[1,28],Y=[1,29],V=[1,30],H=[1,31],h=[1,44],u=[1,46],d=[1,43],p=[1,47],X=[1,9],g=[1,8,9],f=[1,58],m=[1,59],y=[1,60],v=[1,61],b=[1,62],K=[1,63],Z=[1,64],x=[1,8,9,41],Q=[1,76],T=[1,8,9,12,13,22,39,41,44,68,69,70,71,72,73,74,79,81],w=[1,8,9,12,13,18,20,22,39,41,44,50,60,68,69,70,71,72,73,74,79,81,86,100,102,103],k=[13,60,86,100,102,103],E=[13,60,73,74,86,100,102,103],J=[13,60,68,69,70,71,72,86,100,102,103],ee=[1,101],_=[1,118],S=[1,114],C=[1,110],A=[1,116],R=[1,111],L=[1,112],N=[1,113],I=[1,115],D=[1,117],te=[22,48,60,61,82,86,87,88,89,90],re=[1,8,9,39,41,44],M=[1,8,9,22],ie=[1,147],ne=[1,8,9,61],O=[1,8,9,22,48,60,61,82,86,87,88,89,90],w={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,CLASS:46,emptyBody:47,SPACE:48,ANNOTATION_START:49,ANNOTATION_END:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"CLASS",48:"SPACE",49:"ANNOTATION_START",50:"ANNOTATION_END",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[43,2],[43,3],[47,0],[47,2],[47,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 8:this.$=a[o-1];break;case 9:case 10:case 13:case 15:this.$=a[o];break;case 11:case 14:this.$=a[o-2]+"."+a[o];break;case 12:case 16:this.$=a[o-1]+a[o];break;case 17:case 18:this.$=a[o-1]+"~"+a[o]+"~";break;case 19:i.addRelation(a[o]);break;case 20:a[o-1].title=i.cleanupLabel(a[o]),i.addRelation(a[o-1]);break;case 31:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 32:case 33:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 34:i.addClassesToNamespace(a[o-3],a[o-1][0],a[o-1][1]);break;case 35:i.addClassesToNamespace(a[o-4],a[o-1][0],a[o-1][1]);break;case 36:this.$=a[o],i.addNamespace(a[o]);break;case 37:this.$=[[a[o]],[]];break;case 38:this.$=[[a[o-1]],[]];break;case 39:a[o][0].unshift(a[o-2]),this.$=a[o];break;case 40:this.$=[[],[a[o]]];break;case 41:this.$=[[],[a[o-1]]];break;case 42:a[o][1].unshift(a[o-2]),this.$=a[o];break;case 44:i.setCssClass(a[o-2],a[o]);break;case 45:i.addMembers(a[o-3],a[o-1]);break;case 47:i.setCssClass(a[o-5],a[o-3]),i.addMembers(a[o-5],a[o-1]);break;case 48:this.$=a[o],i.addClass(a[o]);break;case 49:this.$=a[o-1],i.addClass(a[o-1]),i.setClassLabel(a[o-1],a[o]);break;case 53:i.addAnnotation(a[o],a[o-2]);break;case 54:case 67:this.$=[a[o]];break;case 55:a[o].push(a[o-1]),this.$=a[o];break;case 56:break;case 57:i.addMember(a[o-1],i.cleanupLabel(a[o]));break;case 58:case 59:break;case 60:this.$={id1:a[o-2],id2:a[o],relation:a[o-1],relationTitle1:"none",relationTitle2:"none"};break;case 61:this.$={id1:a[o-3],id2:a[o],relation:a[o-1],relationTitle1:a[o-2],relationTitle2:"none"};break;case 62:this.$={id1:a[o-3],id2:a[o],relation:a[o-2],relationTitle1:"none",relationTitle2:a[o-1]};break;case 63:this.$={id1:a[o-4],id2:a[o],relation:a[o-2],relationTitle1:a[o-3],relationTitle2:a[o-1]};break;case 64:this.$=i.addNote(a[o],a[o-1]);break;case 65:this.$=i.addNote(a[o]);break;case 66:this.$=a[o-2],i.defineClass(a[o-1],a[o]);break;case 68:this.$=a[o-2].concat([a[o]]);break;case 69:i.setDirection("TB");break;case 70:i.setDirection("BT");break;case 71:i.setDirection("RL");break;case 72:i.setDirection("LR");break;case 73:this.$={type1:a[o-2],type2:a[o],lineType:a[o-1]};break;case 74:this.$={type1:"none",type2:a[o],lineType:a[o-1]};break;case 75:this.$={type1:a[o-1],type2:"none",lineType:a[o]};break;case 76:this.$={type1:"none",type2:"none",lineType:a[o]};break;case 77:this.$=i.relationType.AGGREGATION;break;case 78:this.$=i.relationType.EXTENSION;break;case 79:this.$=i.relationType.COMPOSITION;break;case 80:this.$=i.relationType.DEPENDENCY;break;case 81:this.$=i.relationType.LOLLIPOP;break;case 82:this.$=i.lineType.LINE;break;case 83:this.$=i.lineType.DOTTED_LINE;break;case 84:case 90:this.$=a[o-2],i.setClickEvent(a[o-1],a[o]);break;case 85:case 91:this.$=a[o-3],i.setClickEvent(a[o-2],a[o-1]),i.setTooltip(a[o-2],a[o]);break;case 86:this.$=a[o-2],i.setLink(a[o-1],a[o]);break;case 87:this.$=a[o-3],i.setLink(a[o-2],a[o-1],a[o]);break;case 88:this.$=a[o-3],i.setLink(a[o-2],a[o-1]),i.setTooltip(a[o-2],a[o]);break;case 89:this.$=a[o-4],i.setLink(a[o-3],a[o-2],a[o]),i.setTooltip(a[o-3],a[o-1]);break;case 92:this.$=a[o-3],i.setClickEvent(a[o-2],a[o-1],a[o]);break;case 93:this.$=a[o-4],i.setClickEvent(a[o-3],a[o-2],a[o-1]),i.setTooltip(a[o-3],a[o]);break;case 94:this.$=a[o-3],i.setLink(a[o-2],a[o]);break;case 95:this.$=a[o-4],i.setLink(a[o-3],a[o-1],a[o]);break;case 96:this.$=a[o-4],i.setLink(a[o-3],a[o-1]),i.setTooltip(a[o-3],a[o]);break;case 97:this.$=a[o-5],i.setLink(a[o-4],a[o-2],a[o]),i.setTooltip(a[o-4],a[o-1]);break;case 98:this.$=a[o-2],i.setCssStyle(a[o-1],a[o]);break;case 99:i.setCssClass(a[o-1],a[o]);break;case 100:this.$=[a[o]];break;case 101:a[o-2].push(a[o]),this.$=a[o-2];break;case 103:this.$=a[o-1]+a[o]}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:r,35:i,37:n,38:22,42:a,43:23,46:s,49:P,51:$,52:B,54:o,56:l,57:F,60:c,62:z,63:q,64:U,65:G,75:j,76:W,78:Y,82:V,83:H,86:h,100:u,102:d,103:p},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(X,[2,5],{8:[1,48]}),{8:[1,49]},t(g,[2,19],{22:[1,50]}),t(g,[2,21]),t(g,[2,22]),t(g,[2,23]),t(g,[2,24]),t(g,[2,25]),t(g,[2,26]),t(g,[2,27]),t(g,[2,28]),t(g,[2,29]),t(g,[2,30]),{34:[1,51]},{36:[1,52]},t(g,[2,33]),t(g,[2,56],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:f,69:m,70:y,71:v,72:b,73:K,74:Z}),{39:[1,65]},t(x,[2,43],{39:[1,67],44:[1,66]}),t(g,[2,58]),t(g,[2,59]),{16:68,60:c,86:h,100:u,102:d},{16:39,17:40,19:69,60:c,86:h,100:u,102:d,103:p},{16:39,17:40,19:70,60:c,86:h,100:u,102:d,103:p},{16:39,17:40,19:71,60:c,86:h,100:u,102:d,103:p},{60:[1,72]},{13:[1,73]},{16:39,17:40,19:74,60:c,86:h,100:u,102:d,103:p},{13:Q,55:75},{58:77,60:[1,78]},t(g,[2,69]),t(g,[2,70]),t(g,[2,71]),t(g,[2,72]),t(T,[2,13],{16:39,17:40,19:80,18:[1,79],20:[1,81],60:c,86:h,100:u,102:d,103:p}),t(T,[2,15],{20:[1,82]}),{15:83,16:84,17:85,60:c,86:h,100:u,102:d,103:p},{16:39,17:40,19:86,60:c,86:h,100:u,102:d,103:p},t(w,[2,126]),t(w,[2,127]),t(w,[2,128]),t(w,[2,129]),t([1,8,9,12,13,20,22,39,41,44,68,69,70,71,72,73,74,79,81],[2,130]),t(X,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:87,33:r,35:i,37:n,42:a,46:s,49:P,51:$,52:B,54:o,56:l,57:F,60:c,62:z,63:q,64:U,65:G,75:j,76:W,78:Y,82:V,83:H,86:h,100:u,102:d,103:p}),{5:88,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:r,35:i,37:n,38:22,42:a,43:23,46:s,49:P,51:$,52:B,54:o,56:l,57:F,60:c,62:z,63:q,64:U,65:G,75:j,76:W,78:Y,82:V,83:H,86:h,100:u,102:d,103:p},t(g,[2,20]),t(g,[2,31]),t(g,[2,32]),{13:[1,90],16:39,17:40,19:89,60:c,86:h,100:u,102:d,103:p},{53:91,66:56,67:57,68:f,69:m,70:y,71:v,72:b,73:K,74:Z},t(g,[2,57]),{67:92,73:K,74:Z},t(k,[2,76],{66:93,68:f,69:m,70:y,71:v,72:b}),t(E,[2,77]),t(E,[2,78]),t(E,[2,79]),t(E,[2,80]),t(E,[2,81]),t(J,[2,82]),t(J,[2,83]),{8:[1,95],24:96,30:97,40:94,43:23,46:s,54:o,56:l},{16:98,60:c,86:h,100:u,102:d},{41:[1,100],45:99,51:ee},{50:[1,102]},{13:[1,103]},{13:[1,104]},{79:[1,105],81:[1,106]},{22:_,48:S,59:107,60:C,82:A,84:108,85:109,86:R,87:L,88:N,89:I,90:D},{60:[1,119]},{13:Q,55:120},t(x,[2,65]),t(x,[2,131]),{22:_,48:S,59:121,60:C,61:[1,122],82:A,84:108,85:109,86:R,87:L,88:N,89:I,90:D},t(te,[2,67]),{16:39,17:40,19:123,60:c,86:h,100:u,102:d,103:p},t(T,[2,16]),t(T,[2,17]),t(T,[2,18]),{39:[2,36]},{15:125,16:84,17:85,18:[1,124],39:[2,9],60:c,86:h,100:u,102:d,103:p},{39:[2,10]},t(re,[2,48],{11:126,12:[1,127]}),t(X,[2,7]),{9:[1,128]},t(M,[2,60]),{16:39,17:40,19:129,60:c,86:h,100:u,102:d,103:p},{13:[1,131],16:39,17:40,19:130,60:c,86:h,100:u,102:d,103:p},t(k,[2,75],{66:132,68:f,69:m,70:y,71:v,72:b}),t(k,[2,74]),{41:[1,133]},{24:96,30:97,40:134,43:23,46:s,54:o,56:l},{8:[1,135],41:[2,37]},{8:[1,136],41:[2,40]},t(x,[2,44],{39:[1,137]}),{41:[1,138]},t(x,[2,46]),{41:[2,54],45:139,51:ee},{16:39,17:40,19:140,60:c,86:h,100:u,102:d,103:p},t(g,[2,84],{13:[1,141]}),t(g,[2,86],{13:[1,143],77:[1,142]}),t(g,[2,90],{13:[1,144],80:[1,145]}),{13:[1,146]},t(g,[2,98],{61:ie}),t(ne,[2,100],{85:148,22:_,48:S,60:C,82:A,86:R,87:L,88:N,89:I,90:D}),t(O,[2,102]),t(O,[2,104]),t(O,[2,105]),t(O,[2,106]),t(O,[2,107]),t(O,[2,108]),t(O,[2,109]),t(O,[2,110]),t(O,[2,111]),t(O,[2,112]),t(g,[2,99]),t(x,[2,64]),t(g,[2,66],{61:ie}),{60:[1,149]},t(T,[2,14]),{15:150,16:84,17:85,60:c,86:h,100:u,102:d,103:p},{39:[2,12]},t(re,[2,49]),{13:[1,151]},{1:[2,4]},t(M,[2,62]),t(M,[2,61]),{16:39,17:40,19:152,60:c,86:h,100:u,102:d,103:p},t(k,[2,73]),t(g,[2,34]),{41:[1,153]},{24:96,30:97,40:154,41:[2,38],43:23,46:s,54:o,56:l},{24:96,30:97,40:155,41:[2,41],43:23,46:s,54:o,56:l},{45:156,51:ee},t(x,[2,45]),{41:[2,55]},t(g,[2,53]),t(g,[2,85]),t(g,[2,87]),t(g,[2,88],{77:[1,157]}),t(g,[2,91]),t(g,[2,92],{13:[1,158]}),t(g,[2,94],{13:[1,160],77:[1,159]}),{22:_,48:S,60:C,82:A,84:161,85:109,86:R,87:L,88:N,89:I,90:D},t(O,[2,103]),t(te,[2,68]),{39:[2,11]},{14:[1,162]},t(M,[2,63]),t(g,[2,35]),{41:[2,39]},{41:[2,42]},{41:[1,163]},t(g,[2,89]),t(g,[2,93]),t(g,[2,95]),t(g,[2,96],{77:[1,164]}),t(ne,[2,101],{85:148,22:_,48:S,60:C,82:A,86:R,87:L,88:N,89:I,90:D}),t(re,[2,8]),t(x,[2,47]),t(g,[2,97])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,36],85:[2,10],125:[2,12],128:[2,4],139:[2,55],150:[2,11],154:[2,39],155:[2,42]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,33,34,35,36,37,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},namespace:{rules:[26,29,30,31,32,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},"class-body":{rules:[26,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},class:{rules:[26,39,40,41,42,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr:{rules:[9,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_title:{rules:[7,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_args:{rules:[22,23,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_name:{rules:[19,20,21,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},href:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},struct:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},generic:{rules:[26,49,50,51,52,53,54,55,56,57,58,59,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},bqstring:{rules:[26,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},string:{rules:[24,25,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],inclusive:!0}}};w.lexer=r,mt(e,"Parser"),(DRe=new((e.prototype=w).Parser=e)).parser=DRe,MRe=DRe}),XRe=s(()=>{Au(),zc(),ORe=["#","+","~","-",""],PRe=class{static{mt(this,"ClassMember")}constructor(e,t){this.memberType=t,this.visibility="",this.classifier="",this.text="",t=gc(e,O()),this.parseMember(t)}getDisplayDetails(){let e=this.visibility+kc(this.id);"method"===this.memberType&&(e+=`(${kc(this.parameters.trim())})`,this.returnType)&&(e+=" : "+kc(this.returnType)),e=e.trim();var t=this.parseClassifier();return{displayText:e,cssStyle:t}}parseMember(e){let t="";"method"===this.memberType?(r=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(e))&&(n=r[1]?r[1].trim():"",ORe.includes(n)&&(this.visibility=n),this.id=r[2],this.parameters=r[3]?r[3].trim():"",t=r[4]?r[4].trim():"",this.returnType=r[5]?r[5].trim():"",""===t)&&(n=this.returnType.substring(this.returnType.length-1),/[$*]/.exec(n))&&(t=n,this.returnType=this.returnType.substring(0,this.returnType.length-1)):(r=e.length,n=e.substring(0,1),i=e.substring(r-1),ORe.includes(n)&&(this.visibility=n),/[$*]/.exec(i)&&(t=i),this.id=e.substring(""===this.visibility?0:1,""===t?r:r-1)),this.classifier=t,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();var r,i,n=(this.visibility?"\\"+this.visibility:"")+kc(this.id)+("method"===this.memberType?`(${kc(this.parameters)})`+(this.returnType?" : "+kc(this.returnType):""):"");this.text=n.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\<")&&(this.text=this.text.replace("\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}}}),KRe=s(()=>{hw(),e(),Au(),zc(),hC(),Cu(),pw(),XRe(),pn(),$Re="classId-",BRe=0,FRe=mt(e=>L.sanitizeText(e,O()),"sanitizeText"),zRe=class{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=new Map,this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=mt(e=>{let i=PT();V(e).select("svg").selectAll("g").filter(function(){return null!==V(this).attr("title")}).on("mouseover",e=>{var t=V(e.currentTarget),r=t.attr("title");r&&(e=e.currentTarget.getBoundingClientRect(),i.transition().duration(200).style("opacity",".9"),i.html(dn.sanitize(r)).style("left",window.scrollX+e.left+e.width/2+"px").style("top",window.scrollY+e.bottom+4+"px"),t.classed("hover",!0))}).on("mouseout",e=>{i.transition().duration(500).style("opacity",0),V(e.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=Th,this.getAccTitle=wh,this.setAccDescription=kh,this.getAccDescription=Eh,this.setDiagramTitle=_h,this.getDiagramTitle=Sh,this.getConfig=mt(()=>O().class,"getConfig"),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}static{mt(this,"ClassDB")}splitClassNameAndType(e){let t=L.sanitizeText(e,O()),r="",i=t;return 0`:"")}addClass(e){var e=L.sanitizeText(e,O()),{className:e,type:t}=this.splitClassNameAndType(e);this.classes.has(e)||(e=L.sanitizeText(e,O()),this.classes.set(e,{id:e,type:t,label:e,text:e+(t?`<${t}>`:""),shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:$Re+e+"-"+BRe}),BRe++)}addInterface(e,t){e={id:"interface"+this.interfaces.length,label:e,classId:t},this.interfaces.push(e)}lookUpDomId(e){if(e=L.sanitizeText(e,O()),this.classes.has(e))return this.classes.get(e).domId;throw new Error("Class not found: "+e)}clear(){this.relations=[],this.classes=new Map,this.notes=new Map,this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.direction="TB",xh()}getClass(e){return this.classes.get(e)}getClasses(){return this.classes}getRelations(){return this.relations}getNote(e){return this.notes.get("number"==typeof e?"note"+e:e)}getNotes(){return this.notes}addRelation(e){M.debug("Adding relation: "+JSON.stringify(e));var t=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];e.relation.type1!==this.relationType.LOLLIPOP||t.includes(e.relation.type2)?e.relation.type2!==this.relationType.LOLLIPOP||t.includes(e.relation.type1)?(this.addClass(e.id1),this.addClass(e.id2)):(this.addClass(e.id1),this.addInterface(e.id2,e.id1),e.id2="interface"+(this.interfaces.length-1)):(this.addClass(e.id2),this.addInterface(e.id1,e.id2),e.id1="interface"+(this.interfaces.length-1)),e.id1=this.splitClassNameAndType(e.id1).className,e.id2=this.splitClassNameAndType(e.id2).className,e.relationTitle1=L.sanitizeText(e.relationTitle1.trim(),O()),e.relationTitle2=L.sanitizeText(e.relationTitle2.trim(),O()),this.relations.push(e)}addAnnotation(e,t){e=this.splitClassNameAndType(e).className,this.classes.get(e).annotations.push(t)}addMember(e,t){this.addClass(e),e=this.splitClassNameAndType(e).className,e=this.classes.get(e),"string"==typeof t&&((t=t.trim()).startsWith("<<")&&t.endsWith(">>")?e.annotations.push(FRe(t.substring(2,t.length-2))):0this.addMember(t,e)))}addNote(e,t){var r=this.notes.size,t={id:"note"+r,class:t,text:e,index:r};return this.notes.set(t.id,t),t.id}cleanupLabel(e){return e.startsWith(":")&&(e=e.substring(1)),FRe(e.trim())}setCssClass(e,r){e.split(",").forEach(e=>{let t=e;/\d/.exec(e[0])&&(t=$Re+t),(e=this.classes.get(t))&&(e.cssClasses+=" "+r)})}defineClass(e,i){for(let t of e){let r=this.styleClasses.get(t);void 0===r&&(r={id:t,styles:[],textStyles:[]},this.styleClasses.set(t,r)),i&&i.forEach(e=>{var t;/color/.exec(e)&&(t=e.replace("fill","bgFill"),r.textStyles.push(t)),r.styles.push(e)}),this.classes.forEach(e=>{e.cssClasses.includes(t)&&e.styles.push(...i.flatMap(e=>e.split(",")))})}}setTooltip(e,t){e.split(",").forEach(e=>{void 0!==t&&(this.classes.get(e).tooltip=FRe(t))})}getTooltip(e,t){return(t&&this.namespaces.has(t)?this.namespaces.get(t):this).classes.get(e).tooltip}setLink(e,r,i){let n=O();e.split(",").forEach(e=>{let t=e;/\d/.exec(e[0])&&(t=$Re+t),(e=this.classes.get(t))&&(e.link=sC.formatUrl(r,n),"sandbox"===n.securityLevel?e.linkTarget="_top":e.linkTarget="string"==typeof i?FRe(i):"_blank")}),this.setCssClass(e,"clickable")}setClickEvent(e,t,r){e.split(",").forEach(e=>{this.setClickFunc(e,t,r),this.classes.get(e).haveCallback=!0}),this.setCssClass(e,"clickable")}setClickFunc(e,i,n){if(e=L.sanitizeText(e,O()),"loose"===O().securityLevel&&void 0!==i&&this.classes.has(e)){let t=this.lookUpDomId(e),r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t{var e=document.querySelector(`[id="${t}"]`);null!==e&&e.addEventListener("click",()=>{sC.runFunc(i,...r)},!1)})}}bindFunctions(t){this.functions.forEach(e=>{e(t)})}escapeHtml(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}getDirection(){return this.direction}setDirection(e){this.direction=e}addNamespace(e){this.namespaces.has(e)||(this.namespaces.set(e,{id:e,classes:new Map,notes:new Map,children:new Map,domId:$Re+e+"-"+this.namespaceCounter}),this.namespaceCounter++)}getNamespace(e){return this.namespaces.get(e)}getNamespaces(){return this.namespaces}addClassesToNamespace(e,t,r){if(this.namespaces.has(e)){for(var i of t){var i=this.splitClassNameAndType(i).className,n=this.getClass(i);n.parent=e,this.namespaces.get(e).classes.set(i,n)}for(var a of r){var s=this.getNote(a);s.parent=e,this.namespaces.get(e).notes.set(a,s)}}}setCssStyle(e,t){var r=this.classes.get(e);if(t&&r)for(var i of t)i.includes(",")?r.styles.push(...i.split(",")):r.styles.push(i)}getArrowMarker(e){let t;switch(e){case 0:t="aggregation";break;case 1:t="extension";break;case 2:t="composition";break;case 3:t="dependency";break;case 4:t="lollipop";break;default:t="none"}return t}getData(){var e,t,r,i,n,a=[],s=[],o=O();for(e of this.namespaces.values()){var l={id:e.id,label:e.id,isGroup:!0,padding:o.class.padding??16,shape:"rect",cssStyles:[],look:o.look};a.push(l)}for(t of this.classes.values()){var c={...t,type:void 0,isGroup:!1,parentId:t.parent,look:o.look};a.push(c)}for(r of this.notes.values()){var h={id:r.id,label:r.text,isGroup:!1,shape:"note",padding:o.class.padding??6,cssStyles:["text-align: left","white-space: nowrap","fill: "+o.themeVariables.noteBkgColor,"stroke: "+o.themeVariables.noteBorderColor],look:o.look,parentId:r.parent,labelType:"markdown"};a.push(h),(h=this.classes.get(r.class)?.id)&&(h={id:"edgeNote"+r.index,start:r.id,end:h,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:o.look},s.push(h))}for(i of this.interfaces){var u={id:i.id,label:i.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:o.look};a.push(u)}let d=0;for(n of this.relations){d++;var p={id:cC(n.id1,n.id2,{prefix:"id",counter:d}),start:n.id1,end:n.id2,type:"normal",label:n.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(n.relation.type1),arrowTypeEnd:this.getArrowMarker(n.relation.type2),startLabelRight:"none"===n.relationTitle1?"":n.relationTitle1,endLabelLeft:"none"===n.relationTitle2?"":n.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:n.style||"",pattern:1==n.relation.lineType?"dashed":"solid",look:o.look,labelType:"markdown"};s.push(p)}return{nodes:a,edges:s,other:{},config:o,direction:this.getDirection()}}}}),ZRe=s(()=>{gue(),qRe=mt(e=>`g.classGroup text { fill: ${e.nodeBorder||e.classText}; stroke: none; font-family: ${e.fontFamily}; font-size: 10px; .title { font-weight: bolder; } } .cluster-label text { fill: ${e.titleColor}; } .cluster-label span { color: ${e.titleColor}; } .cluster-label span p { background-color: transparent; } .cluster rect { fill: ${e.clusterBkg}; stroke: ${e.clusterBorder}; stroke-width: 1px; } .cluster text { fill: ${e.titleColor}; } .cluster span { color: ${e.titleColor}; } .nodeLabel, .edgeLabel { color: ${e.classText}; } .edgeLabel .label rect { fill: ${e.mainBkg}; } .label text { fill: ${e.classText}; } .labelBkg { background: ${e.mainBkg}; } .edgeLabel .label span { background: ${e.mainBkg}; } .classTitle { font-weight: bolder; } .node rect, .node circle, .node ellipse, .node polygon, .node path { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; stroke-width: 1px; } .divider { stroke: ${e.nodeBorder}; stroke-width: 1; } g.clickable { cursor: pointer; } g.classGroup rect { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; } g.classGroup line { stroke: ${e.nodeBorder}; stroke-width: 1; } .classLabel .box { stroke: none; stroke-width: 0; fill: ${e.mainBkg}; opacity: 0.5; } .classLabel .label { fill: ${e.nodeBorder}; font-size: 10px; } .relation { stroke: ${e.lineColor}; stroke-width: 1; fill: none; } .dashed-line{ stroke-dasharray: 3; } .dotted-line{ stroke-dasharray: 1 2; } #compositionStart, .composition { fill: ${e.lineColor} !important; stroke: ${e.lineColor} !important; stroke-width: 1; } #compositionEnd, .composition { fill: ${e.lineColor} !important; stroke: ${e.lineColor} !important; stroke-width: 1; } #dependencyStart, .dependency { fill: ${e.lineColor} !important; stroke: ${e.lineColor} !important; stroke-width: 1; } #dependencyStart, .dependency { fill: ${e.lineColor} !important; stroke: ${e.lineColor} !important; stroke-width: 1; } #extensionStart, .extension { fill: transparent !important; stroke: ${e.lineColor} !important; stroke-width: 1; } #extensionEnd, .extension { fill: transparent !important; stroke: ${e.lineColor} !important; stroke-width: 1; } #aggregationStart, .aggregation { fill: transparent !important; stroke: ${e.lineColor} !important; stroke-width: 1; } #aggregationEnd, .aggregation { fill: transparent !important; stroke: ${e.lineColor} !important; stroke-width: 1; } #lollipopStart, .lollipop { fill: ${e.mainBkg} !important; stroke: ${e.lineColor} !important; stroke-width: 1; } #lollipopEnd, .lollipop { fill: ${e.mainBkg} !important; stroke: ${e.lineColor} !important; stroke-width: 1; } .edgeTerminals { font-size: 11px; line-height: initial; } .classTitleText { text-anchor: middle; font-size: 18px; fill: ${e.textColor}; } ${nue()} `,"getStyles"),URe=qRe}),QRe=s(()=>{Au(),e(),gO(),cue(),hue(),hC(),GRe=mt((e,t="TB")=>{if(!e.doc)return t;let r=t;for(var i of e.doc)"dir"===i.stmt&&(r=i.value);return r},"getDir"),jRe=mt(function(e,t){return t.db.getClasses()},"getClasses"),WRe=mt(async function(e,t,r,i){M.info("REF0:"),M.info("Drawing class diagram (v3)",t);var{securityLevel:n,state:a,layout:s}=O(),o=i.db.getData(),n=eO(t,n);o.type=i.type,o.layoutAlgorithm=Vhe(s),o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["aggregation","extension","composition","dependency","lollipop"],o.diagramId=t,await Yhe(o,n),sC.insertTitle(n,"classDiagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),Hhe(n,8,"classDiagram",a?.useMaxWidth??!0)},"draw"),YRe={getClasses:jRe,draw:WRe,getDir:GRe}}),JRe={};PGe(JRe,{diagram:()=>eLe});var eLe,tLe=s(()=>{HRe(),KRe(),ZRe(),QRe(),eLe={parser:MRe,get db(){return new zRe},renderer:YRe,styles:URe,init:mt(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}),rLe={};PGe(rLe,{diagram:()=>iLe});var iLe,nLe,aLe,sLe,oLe,lLe,cLe,hLe,uLe,dLe,pLe,gLe,fLe,mLe,yLe,vLe,bLe,xLe,TLe,wLe,kLe,ELe,_Le,SLe,CLe,ALe,RLe,LLe,NLe,ILe,DLe,MLe,OLe,PLe,$Le,BLe,FLe=s(()=>{HRe(),KRe(),ZRe(),QRe(),iLe={parser:MRe,get db(){return new zRe},renderer:YRe,styles:URe,init:mt(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}),zLe=s(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[1,2],i=[1,3],n=[1,4],a=[2,4],s=[1,9],o=[1,11],l=[1,16],c=[1,17],h=[1,18],u=[1,19],d=[1,33],p=[1,20],g=[1,21],f=[1,22],m=[1,23],y=[1,24],v=[1,26],b=[1,27],x=[1,28],T=[1,29],w=[1,30],k=[1,31],E=[1,32],_=[1,35],S=[1,36],C=[1,37],A=[1,38],R=[1,34],L=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],N=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],I=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],r={trace:mt(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,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$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:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"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,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 3:return i.setRootDoc(a[o]),a[o];case 4:this.$=[];break;case 5:"nl"!=a[o]&&(a[o-1].push(a[o]),this.$=a[o-1]);break;case 6:case 7:this.$=a[o];break;case 8:this.$="nl";break;case 12:this.$=a[o];break;case 13:(c=a[o-1]).description=i.trimColon(a[o]),this.$=c;break;case 14:this.$={stmt:"relation",state1:a[o-2],state2:a[o]};break;case 15:c=i.trimColon(a[o]),this.$={stmt:"relation",state1:a[o-3],state2:a[o-1],description:c};break;case 19:this.$={stmt:"state",id:a[o-3],type:"default",description:"",doc:a[o-1]};break;case 20:var l,c=a[o],h=a[o-2].trim();a[o].match(":")&&(c=(l=a[o].split(":"))[0],h=[h,l[1]]),this.$={stmt:"state",id:c,type:"default",description:h};break;case 21:this.$={stmt:"state",id:a[o-3],type:"default",description:a[o-5],doc:a[o-1]};break;case 22:this.$={stmt:"state",id:a[o],type:"fork"};break;case 23:this.$={stmt:"state",id:a[o],type:"join"};break;case 24:this.$={stmt:"state",id:a[o],type:"choice"};break;case 25:this.$={stmt:"state",id:i.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:a[o-1].trim(),note:{position:a[o-2].trim(),text:a[o].trim()}};break;case 29:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 30:case 31:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:a[o-3],url:a[o-2],tooltip:a[o-1]};break;case 33:this.$={stmt:"click",id:a[o-3],url:a[o-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:a[o-1].trim(),classes:a[o].trim()};break;case 36:this.$={stmt:"style",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 37:this.$={stmt:"applyClass",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 38:i.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:i.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:i.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:i.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:a[o].trim(),type:"default",description:""};break;case 46:case 47:this.$={stmt:"state",id:a[o-2].trim(),classes:[a[o].trim()],type:"default",description:""}}},"anonymous"),table:[{3:1,4:r,5:i,6:n},{1:[3]},{3:5,4:r,5:i,6:n},{3:6,4:r,5:i,6:n},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:s,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:b,37:x,38:T,41:w,45:k,48:E,51:_,52:S,53:C,54:A,57:R},t(L,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:l,17:c,19:h,22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:b,37:x,38:T,41:w,45:k,48:E,51:_,52:S,53:C,54:A,57:R},t(L,[2,7]),t(L,[2,8]),t(L,[2,9]),t(L,[2,10]),t(L,[2,11]),t(L,[2,12],{14:[1,40],15:[1,41]}),t(L,[2,16]),{18:[1,42]},t(L,[2,18],{20:[1,43]}),{23:[1,44]},t(L,[2,22]),t(L,[2,23]),t(L,[2,24]),t(L,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(L,[2,28]),{34:[1,49]},{36:[1,50]},t(L,[2,31]),{13:51,24:d,57:R},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(N,[2,44],{58:[1,56]}),t(N,[2,45],{58:[1,57]}),t(L,[2,38]),t(L,[2,39]),t(L,[2,40]),t(L,[2,41]),t(L,[2,6]),t(L,[2,13]),{13:58,24:d,57:R},t(L,[2,17]),t(I,a,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(L,[2,29]),t(L,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(L,[2,14],{14:[1,71]}),{4:s,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,21:[1,72],22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:b,37:x,38:T,41:w,45:k,48:E,51:_,52:S,53:C,54:A,57:R},t(L,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(L,[2,34]),t(L,[2,35]),t(L,[2,36]),t(L,[2,37]),t(N,[2,46]),t(N,[2,47]),t(L,[2,15]),t(L,[2,19]),t(I,a,{7:78}),t(L,[2,26]),t(L,[2,27]),{5:[1,79]},{5:[1,80]},{4:s,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,21:[1,81],22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:b,37:x,38:T,41:w,45:k,48:E,51:_,52:S,53:C,54:A,57:R},t(L,[2,32]),t(L,[2,33]),t(L,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[12,13],inclusive:!1},struct:{rules:[12,13,25,29,32,38,45,46,47,48,57,58,59,60,74,75,76,77,78],inclusive:!1},FLOATING_NOTE_ID:{rules:[67],inclusive:!1},FLOATING_NOTE:{rules:[64,65,66],inclusive:!1},NOTE_TEXT:{rules:[69,70],inclusive:!1},NOTE_ID:{rules:[68],inclusive:!1},NOTE:{rules:[61,62,63],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[34],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[33],inclusive:!1},CLASS_STYLE:{rules:[31],inclusive:!1},CLASS:{rules:[30],inclusive:!1},CLASSDEFID:{rules:[28],inclusive:!1},CLASSDEF:{rules:[26,27],inclusive:!1},acc_descr_multiline:{rules:[23,24],inclusive:!1},acc_descr:{rules:[21],inclusive:!1},acc_title:{rules:[19],inclusive:!1},SCALE:{rules:[16,17,36,37],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[51],inclusive:!1},STATE_STRING:{rules:[52,53],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[12,13,39,40,41,42,43,44,49,50,54,55,56],inclusive:!1},ID:{rules:[12,13],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,18,20,22,25,29,32,35,38,56,60,71,72,73,74,75,76,77,79,80,81],inclusive:!0}}};r.lexer=i,mt(e,"Parser"),(nLe=new((e.prototype=r).Parser=e)).parser=nLe,aLe=nLe}),qLe=s(()=>{oLe="root",lLe="relation",cLe="classDef",hLe="style",uLe="applyClass",dLe="default",gLe="fill:none",fLe="fill: #333",mLe="markdown",yLe="normal",vLe="rect",bLe="rectWithTitle",xLe="stateStart",TLe="stateEnd",wLe=pLe="divider",kLe="roundedWithTitle",_Le="noteGroup",CLe=(SLe="statediagram")+"-state",RLe=(ALe="transition")+" note-edge",LLe=SLe+"-note",NLe=SLe+"-cluster",ILe=SLe+"-cluster-alt",OLe=sLe="state",$Le=(PLe="----")+(MLe=ELe="note"),BLe=""+PLe+(DLe="parent")});function ULe(e="",t=0,r="",i=PLe){return i=null!==r&&0"!==t.id&&""!==t.id&&(t.cssClasses&&(Array.isArray(t.cssCompiledStyles)||(t.cssCompiledStyles=[]),t.cssClasses.split(" ").forEach(e=>{(e=r.get(e))&&(t.cssCompiledStyles=[...t.cssCompiledStyles??[],...e.styles])})),(i=e.find(e=>e.id===t.id))?Object.assign(i,t):e.push(t))}function jLe(e){return e?.classes?.join(" ")??""}function WLe(e){return e?.styles??[]}var YLe,VLe,HLe,XLe,KLe,ZLe,QLe,JLe,eNe,tNe,rNe,iNe,nNe,aNe,sNe,oNe,lNe,cNe,hNe,uNe,dNe,pNe,gNe,fNe,mNe,yNe,vNe,bNe,xNe,TNe,wNe,kNe,ENe,_Ne,SNe,CNe,ANe,RNe=s(()=>{Au(),e(),zc(),qLe(),YLe=new Map,VLe=0,mt(ULe,"stateDomId"),HLe=mt((r,e,i,n,a,s,o,l)=>{M.trace("items",e),e.forEach(e=>{switch(e.stmt){case sLe:case dLe:KLe(r,e,i,n,a,s,o,l);break;case lLe:KLe(r,e.state1,i,n,a,s,o,l),KLe(r,e.state2,i,n,a,s,o,l);var t={id:"edge"+VLe,start:e.state1.id,end:e.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:gLe,labelStyle:"",label:L.sanitizeText(e.description??"",O()),arrowheadStyle:fLe,labelpos:"c",labelType:mLe,thickness:yLe,classes:ALe,look:o};a.push(t),VLe++}})},"setupDoc"),XLe=mt((e,t="TB")=>{let r=t;if(e.doc)for(var i of e.doc)"dir"===i.stmt&&(r=i.value);return r},"getDir"),mt(GLe,"insertOrUpdateNode"),mt(jLe,"getClassesFromDbInfo"),mt(WLe,"getStylesFromDbInfo"),KLe=mt((r,i,e,n,a,t,s,o)=>{var l=i.id,c=e.get(l),h=jLe(c),u=WLe(c),d=O();if(M.info("dataFetcher parsedItem",i,c,u),"root"!==l){let e=vLe;if(!0===i.start?e=xLe:!1===i.start&&(e=TLe),i.type!==dLe&&(e=i.type),YLe.get(l)||YLe.set(l,{id:l,shape:e,description:L.sanitizeText(l,d),cssClasses:h+" "+CLe,cssStyles:u}),c=YLe.get(l),i.description&&(Array.isArray(c.description)?(c.shape=bLe,c.description.push(i.description)):c.description?.length&&0{YLe.clear(),VLe=0},"reset")}),LNe=s(()=>{Au(),e(),gO(),cue(),hue(),hC(),qLe(),QLe=mt((e,t="TB")=>{if(!e.doc)return t;let r=t;for(var i of e.doc)"dir"===i.stmt&&(r=i.value);return r},"getDir"),JLe=mt(function(e,t){return t.db.getClasses()},"getClasses"),eNe=mt(async function(e,t,r,i){M.info("REF0:"),M.info("Drawing state diagram (v2)",t);var{securityLevel:n,state:a,layout:s}=O();i.db.extract(i.db.getRootDocV2());let o=i.db.getData(),l=eO(t,n);o.type=i.type,o.layoutAlgorithm=s,o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["barb"],o.diagramId=t,await Yhe(o,l);try{("function"==typeof i.db.getLinks?i.db.getLinks():new Map).forEach((a,e)=>{let s="string"==typeof e?e:"string"==typeof e?.id?e.id:"";if(s){let e=l.node()?.querySelectorAll("g"),t,r,i,n;e?.forEach(e=>{e.textContent?.trim()===s&&(t=e)}),t?(r=t.parentNode)?(i=document.createElementNS("http://www.w3.org/2000/svg","a"),n=a.url.replace(/^"+|"+$/g,""),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n),i.setAttribute("target","_blank"),a.tooltip&&(n=a.tooltip.replace(/^"+|"+$/g,""),i.setAttribute("title",n)),r.replaceChild(i,t),i.appendChild(t),M.info("🔗 Wrapped node in
tag for:",s,a.url)):M.warn("⚠️ Node has no parent, cannot wrap:",s):M.warn("⚠️ Could not find node matching text:",s)}else M.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(e))})}catch(e){M.error("❌ Error injecting clickable links:",e)}sC.insertTitle(l,"statediagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),Hhe(l,8,SLe,a?.useMaxWidth??!0)},"draw"),tNe={getClasses:JLe,draw:eNe,getDir:QLe}}),NNe=s(()=>{Au(),e(),hC(),zc(),Cu(),RNe(),LNe(),qLe(),rNe={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},iNe=mt(()=>new Map,"newClassesList"),nNe=mt(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),aNe=mt(e=>JSON.parse(JSON.stringify(e)),"clone"),sNe=class{constructor(e){this.version=e,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=iNe(),this.documents={root:nNe()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=wh,this.setAccTitle=Th,this.getAccDescription=Eh,this.setAccDescription=kh,this.setDiagramTitle=_h,this.getDiagramTitle=Sh,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this)}static{mt(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(e){this.clear(!0);for(var t of Array.isArray(e)?e:e.doc)switch(t.stmt){case sLe:this.addState(t.id.trim(),t.type,t.doc,t.description,t.note);break;case lLe:this.addRelation(t.state1,t.state2,t.description);break;case cLe:this.addStyleClass(t.id.trim(),t.classes);break;case hLe:this.handleStyleDef(t);break;case uLe:this.setCssClass(t.id.trim(),t.styleClass);break;case"click":this.addLink(t.id,t.url,t.tooltip)}var r,e=this.getStates(),i=O();ZLe(),KLe(void 0,this.getRootDocV2(),e,this.nodes,this.edges,!0,i.look,this.classes);for(r of this.nodes)if(Array.isArray(r.label)){if(r.description=r.label.slice(1),r.isGroup&&0e.replace(/;/g,"")?.trim()))}}setRootDoc(e){M.info("Setting root doc",e),this.rootDoc=e,1===this.version?this.extract(e):this.extract(this.getRootDocV2())}docTranslator(r,i,e){if(i.stmt===lLe)this.docTranslator(r,i.state1,!0),this.docTranslator(r,i.state2,!1);else if(i.stmt===sLe&&(i.id===rNe.START_NODE?(i.id=r.id+(e?"_start":"_end"),i.start=e):i.id=i.id.trim()),(i.stmt===oLe||i.stmt===sLe)&&i.doc){let e=[],t=[];for(var n of i.doc){var a;n.type===pLe?((a=aNe(n)).doc=aNe(t),e.push(a),t=[]):t.push(n)}0this.docTranslator(i,e,!0))}}getRootDocV2(){return this.docTranslator({id:oLe,stmt:oLe},{id:oLe,stmt:oLe,doc:this.rootDoc},!0),{id:oLe,doc:this.rootDoc}}addState(e,t=dLe,r=void 0,i=void 0,n=void 0,a=void 0,s=void 0,o=void 0){let l=e?.trim();if(this.currentDocument.states.has(l)){if(!(e=this.currentDocument.states.get(l)))throw new Error("State not found: "+l);e.doc||(e.doc=r),e.type||(e.type=t)}else M.info("Adding state ",l,i),this.currentDocument.states.set(l,{stmt:sLe,id:l,descriptions:[],type:t,doc:r,note:n,classes:[],styles:[],textStyles:[]});if(i&&(M.info("Setting state description",l,i),(Array.isArray(i)?i:[i]).forEach(e=>this.addDescription(l,e.trim()))),n){if(!(e=this.currentDocument.states.get(l)))throw new Error("State not found: "+l);e.note=n,e.note.text=L.sanitizeText(e.note.text,O())}a&&(M.info("Setting state classes",l,a),(Array.isArray(a)?a:[a]).forEach(e=>this.setCssClass(l,e.trim()))),s&&(M.info("Setting state styles",l,s),(Array.isArray(s)?s:[s]).forEach(e=>this.setStyle(l,e.trim()))),o&&(M.info("Setting state styles",l,s),(Array.isArray(o)?o:[o]).forEach(e=>this.setTextStyle(l,e.trim())))}clear(e){this.nodes=[],this.edges=[],this.documents={root:nNe()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=iNe(),e||(this.links=new Map,xh())}getState(e){return this.currentDocument.states.get(e)}getStates(){return this.currentDocument.states}logDocuments(){M.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(e,t,r){this.links.set(e,{url:t,tooltip:r}),M.warn("Adding link",e,t,r)}getLinks(){return this.links}startIdIfNeeded(e=""){return e===rNe.START_NODE?(this.startEndCount++,""+rNe.START_TYPE+this.startEndCount):e}startTypeIfNeeded(e="",t=dLe){return e===rNe.START_NODE?rNe.START_TYPE:t}endIdIfNeeded(e=""){return e===rNe.END_NODE?(this.startEndCount++,""+rNe.END_TYPE+this.startEndCount):e}endTypeIfNeeded(e="",t=dLe){return e===rNe.END_NODE?rNe.END_TYPE:t}addRelationObjs(e,t,r=""){var i=this.startIdIfNeeded(e.id.trim()),n=this.startTypeIfNeeded(e.id.trim(),e.type),a=this.startIdIfNeeded(t.id.trim()),s=this.startTypeIfNeeded(t.id.trim(),t.type);this.addState(i,n,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.addState(a,s,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.currentDocument.relations.push({id1:i,id2:a,relationTitle:L.sanitizeText(r,O())})}addRelation(e,t,r){var i,n;"object"==typeof e&&"object"==typeof t?this.addRelationObjs(e,t,r):"string"==typeof e&&"string"==typeof t&&(i=this.startIdIfNeeded(e.trim()),e=this.startTypeIfNeeded(e),n=this.endIdIfNeeded(t.trim()),t=this.endTypeIfNeeded(t),this.addState(i,e),this.addState(n,t),this.currentDocument.relations.push({id1:i,id2:n,relationTitle:r?L.sanitizeText(r,O()):void 0}))}addDescription(e,t){e=this.currentDocument.states.get(e),t=t.startsWith(":")?t.replace(":","").trim():t,e?.descriptions?.push(L.sanitizeText(t,O()))}cleanupLabel(e){return(e.startsWith(":")?e.slice(2):e).trim()}getDividerId(){return this.dividerCnt++,"divider-id-"+this.dividerCnt}addStyleClass(e,t=""){this.classes.has(e)||this.classes.set(e,{id:e,styles:[],textStyles:[]});let r=this.classes.get(e);t&&r&&t.split(rNe.STYLECLASS_SEP).forEach(e=>{var t=e.replace(/([^;]*);/,"$1").trim();RegExp(rNe.COLOR_KEYWORD).exec(e)&&(e=t.replace(rNe.FILL_KEYWORD,rNe.BG_FILL).replace(rNe.COLOR_KEYWORD,rNe.FILL_KEYWORD),r.textStyles.push(e)),r.styles.push(t)})}getClasses(){return this.classes}setCssClass(e,r){e.split(",").forEach(e=>{let t=this.getState(e);t||(e=e.trim(),this.addState(e),t=this.getState(e)),t?.classes?.push(r)})}setStyle(e,t){this.getState(e)?.styles?.push(t)}setTextStyle(e,t){this.getState(e)?.textStyles?.push(t)}getDirectionStatement(){return this.rootDoc.find(e=>"dir"===e.stmt)}getDirection(){return this.getDirectionStatement()?.value??"TB"}setDirection(e){var t=this.getDirectionStatement();t?t.value=e:this.rootDoc.unshift({stmt:"dir",value:e})}trimColon(e){return(e.startsWith(":")?e.slice(1):e).trim()}getData(){var e=O();return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:QLe(this.getRootDocV2())}}getConfig(){return O().state}}}),INe=s(()=>{oNe=mt(e=>` defs #statediagram-barbEnd { fill: ${e.transitionColor}; stroke: ${e.transitionColor}; } g.stateGroup text { fill: ${e.nodeBorder}; stroke: none; font-size: 10px; } g.stateGroup text { fill: ${e.textColor}; stroke: none; font-size: 10px; } g.stateGroup .state-title { font-weight: bolder; fill: ${e.stateLabelColor}; } g.stateGroup rect { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; } g.stateGroup line { stroke: ${e.lineColor}; stroke-width: 1; } .transition { stroke: ${e.transitionColor}; stroke-width: 1; fill: none; } .stateGroup .composit { fill: ${e.background}; border-bottom: 1px } .stateGroup .alt-composit { fill: #e0e0e0; border-bottom: 1px } .state-note { stroke: ${e.noteBorderColor}; fill: ${e.noteBkgColor}; text { fill: ${e.noteTextColor}; stroke: none; font-size: 10px; } } .stateLabel .box { stroke: none; stroke-width: 0; fill: ${e.mainBkg}; opacity: 0.5; } .edgeLabel .label rect { fill: ${e.labelBackgroundColor}; opacity: 0.5; } .edgeLabel { background-color: ${e.edgeLabelBackground}; p { background-color: ${e.edgeLabelBackground}; } rect { opacity: 0.5; background-color: ${e.edgeLabelBackground}; fill: ${e.edgeLabelBackground}; } text-align: center; } .edgeLabel .label text { fill: ${e.transitionLabelColor||e.tertiaryTextColor}; } .label div .edgeLabel { color: ${e.transitionLabelColor||e.tertiaryTextColor}; } .stateLabel text { fill: ${e.stateLabelColor}; font-size: 10px; font-weight: bold; } .node circle.state-start { fill: ${e.specialStateColor}; stroke: ${e.specialStateColor}; } .node .fork-join { fill: ${e.specialStateColor}; stroke: ${e.specialStateColor}; } .node circle.state-end { fill: ${e.innerEndBackground}; stroke: ${e.background}; stroke-width: 1.5 } .end-state-inner { fill: ${e.compositeBackground||e.background}; // stroke: ${e.background}; stroke-width: 1.5 } .node rect { fill: ${e.stateBkg||e.mainBkg}; stroke: ${e.stateBorder||e.nodeBorder}; stroke-width: 1px; } .node polygon { fill: ${e.mainBkg}; stroke: ${e.stateBorder||e.nodeBorder};; stroke-width: 1px; } #statediagram-barbEnd { fill: ${e.lineColor}; } .statediagram-cluster rect { fill: ${e.compositeTitleBackground}; stroke: ${e.stateBorder||e.nodeBorder}; stroke-width: 1px; } .cluster-label, .nodeLabel { color: ${e.stateLabelColor}; // line-height: 1; } .statediagram-cluster rect.outer { rx: 5px; ry: 5px; } .statediagram-state .divider { stroke: ${e.stateBorder||e.nodeBorder}; } .statediagram-state .title-state { rx: 5px; ry: 5px; } .statediagram-cluster.statediagram-cluster .inner { fill: ${e.compositeBackground||e.background}; } .statediagram-cluster.statediagram-cluster-alt .inner { fill: ${e.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: ${e.altBackground||"#efefef"}; } .note-edge { stroke-dasharray: 5; } .statediagram-note rect { fill: ${e.noteBkgColor}; stroke: ${e.noteBorderColor}; stroke-width: 1px; rx: 0; ry: 0; } .statediagram-note rect { fill: ${e.noteBkgColor}; stroke: ${e.noteBorderColor}; stroke-width: 1px; rx: 0; ry: 0; } .statediagram-note text { fill: ${e.noteTextColor}; } .statediagram-note .nodeLabel { color: ${e.noteTextColor}; } .statediagram .edgeLabel { color: red; // ${e.noteTextColor}; } #dependencyStart, #dependencyEnd { fill: ${e.lineColor}; stroke: ${e.lineColor}; stroke-width: 1; } .statediagramTitleText { text-anchor: middle; font-size: 18px; fill: ${e.textColor}; } `,"getStyles"),lNe=oNe}),DNe=s(()=>{hw(),NNe(),hC(),zc(),Au(),e(),cNe=mt(e=>e.append("circle").attr("class","start-state").attr("r",O().state.sizeUnit).attr("cx",O().state.padding+O().state.sizeUnit).attr("cy",O().state.padding+O().state.sizeUnit),"drawStartState"),hNe=mt(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",O().state.textHeight).attr("class","divider").attr("x2",2*O().state.textHeight).attr("y1",0).attr("y2",0),"drawDivider"),uNe=mt((e,t)=>{var r=(t=e.append("text").attr("x",2*O().state.padding).attr("y",O().state.textHeight+2*O().state.padding).attr("font-size",O().state.fontSize).attr("class","state-title").text(t.id)).node().getBBox();return e.insert("rect",":first-child").attr("x",O().state.padding).attr("y",O().state.padding).attr("width",r.width+2*O().state.padding).attr("height",r.height+2*O().state.padding).attr("rx",O().state.radius),t},"drawSimpleState"),dNe=mt((e,t)=>{let r=mt(function(e,t,r){e=e.append("tspan").attr("x",2*O().state.padding).text(t),r||e.attr("dy",O().state.textHeight)},"addTspan"),i=e.append("text").attr("x",2*O().state.padding).attr("y",O().state.textHeight+1.3*O().state.padding).attr("font-size",O().state.fontSize).attr("class","state-title").text(t.descriptions[0]).node().getBBox(),n=i.height,a=e.append("text").attr("x",O().state.padding).attr("y",n+.4*O().state.padding+O().state.dividerMargin+O().state.textHeight).attr("class","state-description"),s=!0,o=!0;t.descriptions.forEach(function(e){s||(r(a,e,o),o=!1),s=!1});var t=e.append("line").attr("x1",O().state.padding).attr("y1",O().state.padding+n+O().state.dividerMargin/2).attr("y2",O().state.padding+n+O().state.dividerMargin/2).attr("class","descr-divider"),l=a.node().getBBox(),c=Math.max(l.width,i.width);return t.attr("x2",c+3*O().state.padding),e.insert("rect",":first-child").attr("x",O().state.padding).attr("y",O().state.padding).attr("width",c+2*O().state.padding).attr("height",l.height+n+2*O().state.padding).attr("rx",O().state.radius),e},"drawDescrState"),pNe=mt((e,t,r)=>{let i=O().state.padding,n=2*O().state.padding,a=e.node().getBBox(),s=a.width,o=a.x,l=e.append("text").attr("x",0).attr("y",O().state.titleShift).attr("font-size",O().state.fontSize).attr("class","state-title").text(t.id),c=l.node().getBBox().width+n,h=Math.max(c,s);h===s&&(h+=n);let u,d=e.node().getBBox();return t.doc,u=o-i,s(e.append("circle").attr("class","end-state-outer").attr("r",O().state.sizeUnit+O().state.miniPadding).attr("cx",O().state.padding+O().state.sizeUnit+O().state.miniPadding).attr("cy",O().state.padding+O().state.sizeUnit+O().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",O().state.sizeUnit).attr("cx",O().state.padding+O().state.sizeUnit+2).attr("cy",O().state.padding+O().state.sizeUnit+2)),"drawEndState"),fNe=mt((e,t)=>{let r=O().state.forkWidth,i=O().state.forkHeight;return t.parentId&&(t=r,r=i,i=t),e.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",i).attr("x",O().state.padding).attr("y",O().state.padding)},"drawForkJoinState"),mNe=mt((e,t,r,i)=>{let n=0,a=i.append("text"),s=(a.style("text-anchor","start"),a.attr("class","noteText"),e.replace(/\r\n/g,"
")),o=(s=s.replace(/\n/g,"
")).split(L.lineBreakRegex),l=1.25*O().state.noteMargin;for(var c of o){var h;0<(c=c.trim()).length&&((h=a.append("tspan")).text(c),0===l&&(c=h.node().getBBox(),l+=c.height),n+=l,h.attr("x",t+O().state.noteMargin),h.attr("y",r+n+1.25*O().state.noteMargin))}return{textWidth:a.node().getBBox().width,textHeight:n}},"_drawLongText"),yNe=mt((e,t)=>{t.attr("class","state-note");var r=t.append("rect").attr("x",0).attr("y",O().state.padding),t=t.append("g"),{textWidth:e,textHeight:t}=mNe(e,0,0,t);return r.attr("height",t+2*O().state.noteMargin),r.attr("width",e+2*O().state.noteMargin),r},"drawNote"),vNe=mt(function(e,t){var r={id:i=t.id,label:t.id,width:0,height:0},e=e.append("g").attr("id",i).attr("class","stateGroup"),i=("start"===t.type&&cNe(e),"end"===t.type&&gNe(e),"fork"!==t.type&&"join"!==t.type||fNe(e,t),"note"===t.type&&yNe(t.note.text,e),"divider"===t.type&&hNe(e),"default"===t.type&&0===t.descriptions.length&&uNe(e,t),"default"===t.type&&0!Number.isNaN(e.y));let e=h.points,t=o3().x(function(e){return e.x}).y(function(e){return e.y}).curve(k3),r=c.append("path").attr("d",t(e)).attr("id","edge"+bNe).attr("class","transition"),i="";if(O().state.arrowMarkerAbsolute&&(i=xc(!0)),r.attr("marker-end","url("+i+"#"+d(sNe.relationType.DEPENDENCY)+"End)"),void 0!==u.title){let t=c.append("g").attr("class","stateLabel"),{x:r,y:i}=sC.calcLabelPosition(h.points),n=L.getRows(u.title),a=0,s=[],o=0,l=0;for(let e=0;e<=n.length;e++){var p=t.append("text").attr("text-anchor","middle").text(n[e]).attr("x",r).attr("y",i+a),g=p.node().getBBox();o=Math.max(o,g.width),l=Math.min(l,g.x),M.info(g.x,r,i+a),0===a&&(a=p.node().getBBox().height,M.info("Title height",a,i)),s.push(p)}let e=a*n.length;if(1e.attr("y",i+t*a-r)),e=a*n.length}d=t.node().getBBox(),t.insert("rect",":first-child").attr("class","box").attr("x",r-o/2-O().state.padding/2).attr("y",i-e/2-O().state.padding/2-3.5).attr("width",o+O().state.padding).attr("height",e+O().state.padding),M.info(d)}bNe++},"drawEdge")}),MNe=s(()=>{hw(),RK(),mV(),e(),zc(),DNe(),Au(),ph(),wNe={},kNe=mt(function(){},"setConf"),ENe=mt(function(e){e.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 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),_Ne=mt(function(e,t,r,i){TNe=O().state;let n=O().securityLevel,a;"sandbox"===n&&(a=V("#i"+t));var s=V("sandbox"===n?a.nodes()[0].contentDocument.body:"body"),o="sandbox"===n?a.nodes()[0].contentDocument:document,e=(M.debug("Rendering diagram "+e),s.select(`[id='${t}']`)),t=(ENe(e),i.db.getRootDoc()),t=(CNe(t,e,void 0,!1,s,o,i),TNe.padding),o=(s=e.node().getBBox()).width+2*t;rh(e,i=s.height+2*t,1.75*o,TNe.useMaxWidth),e.attr("viewBox",`${s.x-TNe.padding} ${s.y-TNe.padding} `+o+" "+i)},"draw"),SNe=mt(e=>e?e.length*TNe.fontSizeFactor:1,"getLabelWidth"),CNe=mt((e,t,r,i,n,a,s)=>{let o=new gV({compound:!0,multigraph:!0}),l,c=!0;for(l=0;l{let t=e.parentElement,r=0,i=0;t&&(t.parentElement&&(r=t.parentElement.getBBox().width),i=parseInt(t.getAttribute("data-x-shift"),10),Number.isNaN(i))&&(i=0),e.setAttribute("x1",0-i+8),e.setAttribute("x2",r-i-8)})):M.debug("No Node "+e+": "+JSON.stringify(o.node(e)))}),y.getBBox(),o.edges().forEach(function(e){void 0!==e&&void 0!==o.edge(e)&&(M.debug("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(o.edge(e))),xNe(t,o.edge(e),o.edge(e).relation))});var d=y.getBBox(),v={id:r||"root",label:r||"root",width:0,height:0};return v.width=d.width+2*TNe.padding,v.height=d.height+2*TNe.padding,M.debug("Doc rendered",v,o),v},"renderDoc"),ANe={setConf:kNe,draw:_Ne}}),ONe={};PGe(ONe,{diagram:()=>PNe});var PNe,$Ne=s(()=>{zLe(),NNe(),INe(),MNe(),PNe={parser:aLe,get db(){return new sNe(1)},renderer:ANe,styles:lNe,init:mt(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}),BNe={};PGe(BNe,{diagram:()=>FNe});var FNe,zNe,qNe,UNe,GNe,jNe,WNe,YNe,VNe,HNe,XNe,KNe,ZNe,QNe,JNe,eIe,tIe,rIe,iIe,nIe,aIe,sIe,oIe,lIe,cIe,hIe,uIe,dIe,pIe,gIe,fIe,mIe=s(()=>{zLe(),NNe(),INe(),LNe(),FNe={parser:aLe,get db(){return new sNe(2)},renderer:tNe,styles:lNe,init:mt(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}),yIe=s(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[6,8,10,11,12,14,16,17,18],i=[1,9],n=[1,10],a=[1,11],s=[1,12],o=[1,13],l=[1,14],i={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 1:return a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:i.setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 9:this.$=a[o].trim(),i.setAccTitle(this.$);break;case 10:case 11:this.$=a[o].trim(),i.setAccDescription(this.$);break;case 12:i.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 13:i.addTask(a[o-1],a[o]),this.$="task"}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:i,12:n,14:a,16:s,17:o,18:l},t(r,[2,7],{1:[2,1]}),t(r,[2,3]),{9:15,11:i,12:n,14:a,16:s,17:o,18:l},t(r,[2,5]),t(r,[2,6]),t(r,[2,8]),{13:[1,16]},{15:[1,17]},t(r,[2,11]),t(r,[2,12]),{19:[1,18]},t(r,[2,4]),t(r,[2,9]),t(r,[2,10]),t(r,[2,13])],defaultActions:{},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0{Au(),Cu(),UNe="",GNe=[],jNe=[],WNe=[],YNe=mt(function(){GNe.length=0,jNe.length=0,UNe="",WNe.length=0,xh()},"clear"),VNe=mt(function(e){UNe=e,GNe.push(e)},"addSection"),HNe=mt(function(){return GNe},"getSections"),XNe=mt(function(){let e=JNe(),t=0;for(;!e&&t<100;)e=JNe(),t++;return jNe.push(...WNe),jNe},"getTasks"),KNe=mt(function(){let t=[];return jNe.forEach(e=>{e.people&&t.push(...e.people)}),[...new Set(t)].sort()},"updateActors"),ZNe=mt(function(e,t){let r=t.substr(1).split(":"),i=0;t=(1===r.length?(i=Number(r[0]),[]):(i=Number(r[0]),r[1].split(","))).map(e=>e.trim()),t={section:UNe,type:UNe,people:t,task:e,score:i},WNe.push(t)},"addTask"),QNe=mt(function(e){e={section:UNe,type:UNe,description:e,task:e,classes:[]},jNe.push(e)},"addTaskOrg"),JNe=mt(function(){let e=mt(function(e){return WNe[e].processed},"compileTask"),t=!0;for(var[r,i]of WNe.entries())e(r),t=t&&i.processed;return t},"compileTasks"),eIe=mt(function(){return KNe()},"getActors"),tIe={getConfig:mt(()=>O().journey,"getConfig"),clear:YNe,setDiagramTitle:_h,getDiagramTitle:Sh,setAccTitle:Th,getAccTitle:wh,setAccDescription:kh,getAccDescription:Eh,addSection:VNe,getSections:HNe,getTasks:XNe,addTask:ZNe,addTaskOrg:QNe,getActors:eIe}}),bIe=s(()=>{gue(),rIe=mt(e=>`.label { font-family: ${e.fontFamily}; color: ${e.textColor}; } .mouth { stroke: #666; } line { stroke: ${e.textColor} } .legend { fill: ${e.textColor}; font-family: ${e.fontFamily}; } .label text { fill: #333; } .label { color: ${e.textColor} } .face { ${e.faceColor?"fill: "+e.faceColor:"fill: #FFF8DC"}; stroke: #999; } .node rect, .node circle, .node ellipse, .node polygon, .node path { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; stroke-width: 1px; } .node .label { text-align: center; } .node.clickable { cursor: pointer; } .arrowheadPath { fill: ${e.arrowheadColor}; } .edgePath .path { stroke: ${e.lineColor}; stroke-width: 1.5px; } .flowchart-link { stroke: ${e.lineColor}; fill: none; } .edgeLabel { background-color: ${e.edgeLabelBackground}; rect { opacity: 0.5; } text-align: center; } .cluster rect { } .cluster text { fill: ${e.titleColor}; } div.mermaidTooltip { position: absolute; text-align: center; max-width: 200px; padding: 2px; font-family: ${e.fontFamily}; font-size: 12px; background: ${e.tertiaryColor}; border: 1px solid ${e.border2}; border-radius: 2px; pointer-events: none; z-index: 100; } .task-type-0, .section-type-0 { ${e.fillType0?"fill: "+e.fillType0:""}; } .task-type-1, .section-type-1 { ${e.fillType0?"fill: "+e.fillType1:""}; } .task-type-2, .section-type-2 { ${e.fillType0?"fill: "+e.fillType2:""}; } .task-type-3, .section-type-3 { ${e.fillType0?"fill: "+e.fillType3:""}; } .task-type-4, .section-type-4 { ${e.fillType0?"fill: "+e.fillType4:""}; } .task-type-5, .section-type-5 { ${e.fillType0?"fill: "+e.fillType5:""}; } .task-type-6, .section-type-6 { ${e.fillType0?"fill: "+e.fillType6:""}; } .task-type-7, .section-type-7 { ${e.fillType0?"fill: "+e.fillType7:""}; } .actor-0 { ${e.actor0?"fill: "+e.actor0:""}; } .actor-1 { ${e.actor1?"fill: "+e.actor1:""}; } .actor-2 { ${e.actor2?"fill: "+e.actor2:""}; } .actor-3 { ${e.actor3?"fill: "+e.actor3:""}; } .actor-4 { ${e.actor4?"fill: "+e.actor4:""}; } .actor-5 { ${e.actor5?"fill: "+e.actor5:""}; } ${nue()} `,"getStyles"),iIe=rIe}),xIe=s(()=>{function t(e,t,r,i,n,a,s,o){g(t.append("text").attr("x",r+n/2).attr("y",i+a/2+5).style("font-color",o).style("text-anchor","middle").text(e),s)}function c(e,t,r,i,n,a,s,o,l){var{taskFontSize:c,taskFontFamily:h}=o,u=e.split(//gi);for(let e=0;e{var t=r.actors[e].color,t={cx:a,cy:r.y,r:7,fill:t,stroke:"#000",title:e,pos:r.actors[e].position};sIe(n,t),a+=10}),pIe(t)(r.task,n,e.x,e.y,e.width,e.height,{class:"task"},t,r.colour)},"drawTask"),dIe=mt(function(e,t){LT(e,t)},"drawBackgroundRect"),mt(t,"byText"),mt(c,"byTspan"),mt(r,"byFo"),mt(g,"_setTextAttrs"),pIe=function(e){return"fo"===e.textPlacement?r:"old"===e.textPlacement?t:c},gIe=mt(function(e){e.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics"),fIe={drawRect:nIe,drawCircle:sIe,drawSection:cIe,drawText:oIe,drawLabel:lIe,drawTask:uIe,drawBackgroundRect:dIe,initGraphics:gIe}});function TIe(s){let i=O().journey,o=i.maxLabelWidth,l=(EIe=0,60);Object.keys(kIe).forEach(t=>{var e=kIe[t].color,e={cx:20,cy:l,r:7,fill:e,stroke:"#000",pos:kIe[t].position};fIe.drawCircle(s,e);let n=s.append("text").attr("visibility","hidden").text(t),r=n.node().getBoundingClientRect().width,a=(n.remove(),[]);if(r<=o)a=[t];else{let e=t.split(" "),i="";n=s.append("text").attr("visibility","hidden"),e.forEach(t=>{var e=i?i+" "+t:t;if(n.text(e),n.node().getBoundingClientRect().width>o){if(i&&a.push(i),i=t,n.text(t),n.node().getBoundingClientRect().width>o){let e="";for(var r of t)e+=r,n.text(e+"-"),n.node().getBoundingClientRect().width>o&&(a.push(e.slice(0,-1)+"-"),e=r);i=e}}else i=e}),i&&a.push(i),n.remove()}a.forEach((e,t)=>{t={x:40,y:l+7+20*t,fill:"#666",text:e,textMargin:i.boxTextMargin??5},e=fIe.drawText(s,t).node().getBoundingClientRect().width,EIei.leftMargin-e&&(EIe=e)}),l+=Math.max(20,20*a.length)})}var wIe,kIe,EIe,_Ie,SIe,CIe,AIe,RIe,LIe,NIe,IIe,DIe=s(()=>{hw(),xIe(),Au(),ph(),wIe=mt(function(t){Object.keys(t).forEach(function(e){_Ie[e]=t[e]})},"setConf"),kIe={},EIe=0,mt(TIe,"drawActorLegend"),_Ie=O().journey,SIe=0,CIe=mt(function(e,t,r,i){let n=O(),a=n.journey.titleColor,s=n.journey.titleFontSize,o=n.journey.titleFontFamily,l=n.securityLevel,c;"sandbox"===l&&(c=V("#i"+t));var h,u=V("sandbox"===l?c.nodes()[0].contentDocument.body:"body"),u=(AIe.init(),u.select("#"+t)),t=(fIe.initGraphics(u),i.db.getTasks()),d=i.db.getDiagramTitle(),i=i.db.getActors();for(h in kIe)delete kIe[h];let p=0;i.forEach(e=>{kIe[e]={color:_Ie.actorColours[p%_Ie.actorColours.length],position:p},p++}),TIe(u),SIe=_Ie.leftMargin+EIe,AIe.insert(0,0,SIe,50*Object.keys(kIe).length),NIe(u,t,0);var i=AIe.getBounds(),t=(d&&u.append("text").text(d).attr("x",SIe).attr("font-size",s).attr("font-weight","bold").attr("y",25).attr("fill",a).attr("font-family",o),i.stopy-i.starty+2*_Ie.diagramMarginY),g=SIe+i.stopx+2*_Ie.diagramMarginX,d=(rh(u,t,g,_Ie.useMaxWidth),u.append("line").attr("x1",SIe).attr("y1",4*_Ie.height).attr("x2",g-SIe-4).attr("y2",4*_Ie.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),d?70:0);u.attr("viewBox",i.startx+` -25 ${g} `+(t+d)),u.attr("preserveAspectRatio","xMinYMin meet"),u.attr("height",t+d+25)},"draw"),AIe={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:mt(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:mt(function(e,t,r,i){void 0===e[t]?e[t]=r:e[t]=i(r,e[t])},"updateVal"),updateBounds:mt(function(i,n,a,s){let o=O().journey,l=this,c=0;function e(r){return mt(function(e){c++;var t=l.sequenceItems.length-c+1;l.updateVal(e,"starty",n-t*o.boxMargin,Math.min),l.updateVal(e,"stopy",s+t*o.boxMargin,Math.max),l.updateVal(AIe.data,"startx",i-t*o.boxMargin,Math.min),l.updateVal(AIe.data,"stopx",a+t*o.boxMargin,Math.max),"activation"!==r&&(l.updateVal(e,"startx",i-t*o.boxMargin,Math.min),l.updateVal(e,"stopx",a+t*o.boxMargin,Math.max),l.updateVal(AIe.data,"starty",n-t*o.boxMargin,Math.min),l.updateVal(AIe.data,"stopy",s+t*o.boxMargin,Math.max))},"updateItemBounds")}mt(e,"updateFn"),this.sequenceItems.forEach(e())},"updateBounds"),insert:mt(function(e,t,r,i){var n=Math.min(e,r),e=Math.max(e,r),r=Math.min(t,i),t=Math.max(t,i);this.updateVal(AIe.data,"startx",n,Math.min),this.updateVal(AIe.data,"starty",r,Math.min),this.updateVal(AIe.data,"stopx",e,Math.max),this.updateVal(AIe.data,"stopy",t,Math.max),this.updateBounds(n,r,e,t)},"insert"),bumpVerticalPos:mt(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:mt(function(){return this.verticalPos},"getVerticalPos"),getBounds:mt(function(){return this.data},"getBounds")},RIe=_Ie.sectionFills,LIe=_Ie.sectionColours,NIe=mt(function(e,i,t){let n=O().journey,a="",r=2*n.height+n.diagramMarginY,s=t+r,o=0,l="#CCC",c="black",h=0;for(var[u,d]of i.entries()){if(a!==d.section){l=RIe[o%RIe.length],h=o%RIe.length,c=LIe[o%LIe.length];let t=0,r=d.section;for(let e=u;e(kIe[t]&&(e[t]=kIe[t]),e),{}),d.x=u*n.taskMargin+u*n.width+SIe,d.y=s,d.width=n.diagramMarginX,d.height=n.diagramMarginY,d.colour=c,d.fill=l,d.num=h,d.actors=p,fIe.drawTask(e,d,n),AIe.insert(d.x,d.y,d.x+d.width+n.taskMargin,450)}},"drawTasks"),IIe={setConf:wIe,draw:CIe}}),MIe={};PGe(MIe,{diagram:()=>OIe});var OIe,PIe,$Ie,BIe=s(()=>{yIe(),vIe(),bIe(),DIe(),OIe={parser:qNe,db:tIe,renderer:IIe,styles:iIe,init:mt(e=>{IIe.setConf(e.journey),tIe.clear()},"init")}}),FIe=s(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[6,8,10,11,12,14,16,17,20,21],i=[1,9],n=[1,10],a=[1,11],s=[1,12],o=[1,13],l=[1,16],c=[1,17],i={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 1:return a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:i.getCommonDb().setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 9:this.$=a[o].trim(),i.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=a[o].trim(),i.getCommonDb().setAccDescription(this.$);break;case 12:i.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 15:i.addTask(a[o],0,""),this.$=a[o];break;case 16:i.addEvent(a[o].substr(2)),this.$=a[o]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:i,12:n,14:a,16:s,17:o,18:14,19:15,20:l,21:c},t(r,[2,7],{1:[2,1]}),t(r,[2,3]),{9:18,11:i,12:n,14:a,16:s,17:o,18:14,19:15,20:l,21:c},t(r,[2,5]),t(r,[2,6]),t(r,[2,8]),{13:[1,19]},{15:[1,20]},t(r,[2,11]),t(r,[2,12]),t(r,[2,13]),t(r,[2,14]),t(r,[2,15]),t(r,[2,16]),t(r,[2,4]),t(r,[2,9]),t(r,[2,10])],defaultActions:{},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0QIe,addSection:()=>HIe,addTask:()=>ZIe,addTaskOrg:()=>JIe,clear:()=>VIe,default:()=>tDe,getCommonDb:()=>YIe,getSections:()=>XIe,getTasks:()=>KIe});var qIe,UIe,GIe,jIe,WIe,YIe,VIe,HIe,XIe,KIe,ZIe,QIe,JIe,eDe,tDe,rDe=s(()=>{Cu(),qIe="",UIe=0,GIe=[],jIe=[],WIe=[],YIe=mt(()=>fh,"getCommonDb"),VIe=mt(function(){GIe.length=0,jIe.length=0,qIe="",WIe.length=0,xh()},"clear"),HIe=mt(function(e){qIe=e,GIe.push(e)},"addSection"),XIe=mt(function(){return GIe},"getSections"),KIe=mt(function(){let e=eDe(),t=0;for(;!e&&t<100;)e=eDe(),t++;return jIe.push(...WIe),jIe},"getTasks"),ZIe=mt(function(e,t,r){e={id:UIe++,section:qIe,type:qIe,task:e,score:t||0,events:r?[r]:[]},WIe.push(e)},"addTask"),QIe=mt(function(e){WIe.find(e=>e.id===UIe-1).events.push(e)},"addEvent"),JIe=mt(function(e){e={section:qIe,type:qIe,description:e,task:e,classes:[]},jIe.push(e)},"addTaskOrg"),eDe=mt(function(){let e=mt(function(e){return WIe[e].processed},"compileTask"),t=!0;for(var[r,i]of WIe.entries())e(r),t=t&&i.processed;return t},"compileTasks"),tDe={clear:VIe,getCommonDb:YIe,addSection:HIe,getSections:XIe,getTasks:KIe,addTask:ZIe,addTaskOrg:JIe,addEvent:QIe}});function iDe(e,o){e.each(function(){var t,r=V(this),i=r.text().split(/(\s+|
)/).reverse(),n=[],a=r.attr("y"),e=parseFloat(r.attr("dy")),s=r.text(null).append("tspan").attr("x",0).attr("y",a).attr("dy",e+"em");for(let e=0;eo||"
"===t)&&(n.pop(),s.text(n.join(" ").trim()),n="
"===t?[""]:[t],s=r.append("tspan").attr("x",0).attr("y",a).attr("dy","1.1em").text(t))})}var nDe,aDe,sDe,oDe,lDe,cDe,hDe,uDe,dDe,pDe,gDe,fDe,mDe,yDe,vDe,bDe,xDe,TDe,wDe,kDe,EDe,_De,SDe,CDe,ADe=s(()=>{function t(e,t,r,i,n,a,s,o){g(t.append("text").attr("x",r+n/2).attr("y",i+a/2+5).style("font-color",o).style("text-anchor","middle").text(e),s)}function c(e,t,r,i,n,a,s,o,l){var{taskFontSize:c,taskFontFamily:h}=o,u=e.split(//gi);for(let e=0;e/gi," "),i=((e=e.append("text")).attr("x",t.x),e.attr("y",t.y),e.attr("class","legend"),e.style("text-anchor",t.anchor),void 0!==t.class&&e.attr("class",t.class),e.append("tspan"));return i.attr("x",t.x+2*t.textMargin),i.text(r),e},"drawText"),lDe=mt(function(e,t){function r(e,t,r,i,n){return e+","+t+" "+(e+r)+","+t+" "+(e+r)+","+(t+i-n)+" "+(e+r-1.2*n)+","+(t+i)+" "+e+","+(t+i)}mt(r,"genPoints");var i=e.append("polygon");i.attr("points",r(t.x,t.y,50,20,7)),i.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,oDe(e,t)},"drawLabel"),cDe=mt(function(e,t,r){var e=e.append("g"),i=gDe();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=r.width,i.height=r.height,i.class="journey-section section-type-"+t.num,i.rx=3,i.ry=3,nDe(e,i),fDe(r)(t.text,e,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+t.num},r,t.colour)},"drawSection"),hDe=-1,uDe=mt(function(e,t,r){var i=t.x+r.width/2,e=e.append("g");hDe++,e.append("line").attr("id","task"+hDe).attr("x1",i).attr("y1",t.y).attr("x2",i).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),aDe(e,{cx:i,cy:300+30*(5-t.score),score:t.score}),(i=gDe()).x=t.x,i.y=t.y,i.fill=t.fill,i.width=r.width,i.height=r.height,i.class="task task-type-"+t.num,i.rx=3,i.ry=3,nDe(e,i),fDe(r)(t.task,e,i.x,i.y,i.width,i.height,{class:"task"},r,t.colour)},"drawTask"),dDe=mt(function(e,t){nDe(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),pDe=mt(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),gDe=mt(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),mt(t,"byText"),mt(c,"byTspan"),mt(r,"byFo"),mt(g,"_setTextAttrs"),fDe=function(e){return"fo"===e.textPlacement?r:"old"===e.textPlacement?t:c},mDe=mt(function(e){e.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics"),mt(iDe,"wrap"),yDe=mt(function(e,t,r,i){var r=r%12-1,e=e.append("g"),n=(t.section=r,e.attr("class",(t.class?t.class+" ":"")+"timeline-node section-"+r),e.append("g")),a=(e=e.append("g")).append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(iDe,t.width).node().getBBox(),s=i.fontSize?.replace?i.fontSize.replace("px",""):i.fontSize;return t.height=a.height+1.1*s*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width=t.width+2*t.padding,e.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),bDe(n,t,r,i),t},"drawNode"),vDe=mt(function(e,t,r){var i=(e=e.append("g")).append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(iDe,t.width).node().getBBox(),r=r.fontSize?.replace?r.fontSize.replace("px",""):r.fontSize;return e.remove(),i.height+1.1*r*.5+t.padding},"getVirtualNodeHeight"),bDe=mt(function(e,t,r){e.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("d",`M0 ${t.height-5} v${10-t.height} q0,-5 5,-5 h${t.width-10} q5,0 5,5 v${t.height-5} H0 Z`),e.append("line").attr("class","node-line-"+r).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},"defaultBkg"),xDe={drawRect:nDe,drawCircle:sDe,drawSection:cDe,drawText:oDe,drawLabel:lDe,drawTask:uDe,drawBackgroundRect:dDe,getTextObj:pDe,getNoteRect:gDe,initGraphics:mDe,drawNode:yDe,getVirtualNodeHeight:vDe}}),RDe=s(()=>{hw(),ADe(),e(),Au(),ph(),TDe=mt(function(e,t,r,i){let n=O(),a=n.timeline?.leftMargin??50,s=(M.debug("timeline",i.db),n.securityLevel),o,l=("sandbox"===s&&(o=V("#i"+t)),V("sandbox"===s?o.nodes()[0].contentDocument.body:"body").select("#"+t)),c=(l.append("g"),i.db.getTasks()),h=i.db.getCommonDb().getDiagramTitle();M.debug("task",c),xDe.initGraphics(l);var u,d,t=i.db.getSections();M.debug("sections",t);let p=0,g=0,f,m=50+a,y=50,v=0,b=!0,x=(t.forEach(function(e){e={number:v,descr:e,section:v,width:150,padding:20,maxHeight:p},e=xDe.getVirtualNodeHeight(l,e,n),M.debug("sectionHeight before draw",e),p=Math.max(p,e+20)}),0),T=0;M.debug("tasks.length",c.length);for([u,d]of c.entries()){var w,k={number:u,descr:d,section:d.section,width:150,padding:20,maxHeight:g},k=xDe.getVirtualNodeHeight(l,k,n);M.debug("taskHeight before draw",k),g=Math.max(g,k+20),x=Math.max(x,d.events.length);let e=0;for(w of d.events){var E={descr:w,section:d.section,number:d.section,width:150,padding:20,maxHeight:50};e+=xDe.getVirtualNodeHeight(l,E,n)}0{var e=c.filter(e=>e.section===t),r={number:v,descr:t,section:v,width:200*Math.max(e.length,1)-50,padding:20,maxHeight:p},i=(M.debug("sectionNode",r),l.append("g")),r=xDe.drawNode(i,r,v,n);M.debug("sectionNode output",r),i.attr("transform",`translate(${m}, 50)`),y+=p+50,0{},"setConf"),draw:TDe}}),LDe=s(()=>{Kr(),_De=mt(t=>{let r="";for(let e=0;e` .edge { stroke-width: 3; } ${_De(e)} .section-root rect, .section-root path, .section-root circle { fill: ${e.git0}; } .section-root text { fill: ${e.gitBranchLabel0}; } .icon-container { height:100%; display: flex; justify-content: center; align-items: center; } .edge { fill: none; } .eventWrapper { filter: brightness(120%); } `,"getStyles"),CDe=SDe}),NDe={};PGe(NDe,{diagram:()=>IDe});var IDe,DDe,MDe,ODe=s(()=>{FIe(),rDe(),RDe(),LDe(),IDe={db:zIe,renderer:EDe,parser:$Ie,styles:CDe}}),PDe=s(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[1,4],i=[1,13],n=[1,12],a=[1,15],s=[1,16],o=[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:mt(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:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",a[o].id),i.addNode(a[o-1].length,a[o].id,a[o].descr,a[o].type);break;case 16:i.getLogger().trace("Icon: ",a[o]),i.decorateNode({icon:a[o]});break;case 17:case 21:i.decorateNode({class:a[o]});break;case 18:i.getLogger().trace("SPACELIST");break;case 19:i.getLogger().trace("Node: ",a[o].id),i.addNode(0,a[o].id,a[o].descr,a[o].type);break;case 20:i.decorateNode({icon:a[o]});break;case 25:i.getLogger().trace("node found ..",a[o-2]),this.$={id:a[o-1],descr:a[o-1],type:i.getType(a[o-2],a[o])};break;case 26:this.$={id:a[o],descr:a[o],type:i.nodeType.DEFAULT};break;case 27:i.getLogger().trace("node found ..",a[o-3]),this.$={id:a[o-3],descr:a[o-1],type:i.getType(a[o-2],a[o])}}},"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:i,7:[1,10],9:9,12:11,13:n,14:14,15:a,16:s,17:17,18:18,19:o,22:l},t(c,[2,3]),{1:[2,2]},t(c,[2,4]),t(c,[2,5]),{1:[2,6],6:i,12:21,13:n,14:14,15:a,16:s,17:17,18:18,19:o,22:l},{6:i,9:22,12:11,13:n,14:14,15:a,16:s,17:17,18:18,19:o,22:l},{6:h,7:u,10:23,11:d},t(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:o,22:l}),t(p,[2,18]),t(p,[2,19]),t(p,[2,20]),t(p,[2,21]),t(p,[2,23]),t(p,[2,24]),t(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:h,7:u,10:32,11:d},{1:[2,7],6:i,12:21,13:n,14:14,15:a,16:s,17:17,18:18,19:o,22:l},t(g,[2,14],{7:f,11:m}),t(y,[2,8]),t(y,[2,9]),t(y,[2,10]),t(p,[2,15]),t(p,[2,16]),t(p,[2,17]),{20:[1,35]},{21:[1,36]},t(g,[2,13],{7:f,11:m}),t(y,[2,11]),t(y,[2,12]),{21:[1,37]},t(p,[2,25]),t(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0{BDe=[];for(let e=0;e<256;++e)BDe.push((e+256).toString(16).slice(1));mt($De,"unsafeStringify")});function zDe(){if(!qDe){if("u"{UDe=new Uint8Array(16),mt(zDe,"rng")}),YDe=s(()=>{GDe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),jDe={randomUUID:GDe}});function VDe(e,t,r){if(jDe.randomUUID&&!t&&!e)return jDe.randomUUID();var i=(e=e||{}).random??e.rng?.()??zDe();if(i.length<16)throw new Error("Random bytes length must be >= 16");if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){if((r=r||0)<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[r+e]=i[e];return t}return $De(i)}var HDe,XDe,KDe,ZDe,QDe,JDe,eMe,tMe,rMe,iMe=s(()=>{YDe(),WDe(),FDe(),mt(VDe,"v4"),HDe=VDe}),nMe=s(()=>{iMe()}),aMe=s(()=>{lL(),hC(),XDe=12}),sMe=s(()=>{Au(),nMe(),zc(),e(),si(),li(),aMe(),KDe={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},ZDe=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=KDe,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{mt(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(t){for(let e=this.nodes.length-1;0<=e;e--)if(this.nodes[e].level{switch(e){case KDe.CIRCLE:return"mindmapCircle";case KDe.RECT:return"rect";case KDe.ROUNDED_RECT:return"rounded";case KDe.CLOUD:return"cloud";case KDe.BANG:return"bang";case KDe.HEXAGON:return"hexagon";case KDe.DEFAULT:return"defaultMindmapNode";default:return"rect"}},"getShapeFromType"),i={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,labelType:"markdown",isGroup:!1,shape:i(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:r,cssStyles:[],look:"default",icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(t.push(i),e.children)for(var n of e.children)this.flattenNodes(n,t)}generateEdges(t,r){if(t.children)for(var i of t.children){let e="edge";void 0!==i.section&&(e+=" section-edge-"+i.section);var n=t.level+1,n=(e+=" edge-depth-"+n,{id:`edge_${t.id}_`+i.id,start:t.id.toString(),end:i.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:"default",classes:e,depth:t.level,section:i.section});r.push(n),this.generateEdges(i,r)}}getData(){var e=this.getMindmap(),t=O(),r=t;if(void 0===yr().layout&&(r.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:r};M.debug("getData: mindmapRoot",e,t),this.assignSections(e);var i,n=[],a=(this.flattenNodes(e,t=[]),this.generateEdges(e,n),M.debug(`getData: processed ${t.length} nodes and ${n.length} edges`),new Map);for(i of t)a.set(i.id,{shape:i.shape,width:i.width,height:i.height,padding:i.padding});return{nodes:t,edges:n,config:r,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(a),type:"mindmap",diagramId:"mindmap-"+HDe()}}getLogger(){return M}}}),oMe=s(()=>{e(),gO(),cue(),hue(),si(),QDe=mt(async(e,t,r,i)=>{M.debug(`Rendering mindmap diagram `+e);var n=(e=i.db).getData(),a=eO(t,n.config.securityLevel);n.type=i.type,n.layoutAlgorithm=Vhe(n.config.layout,{fallback:"cose-bilkent"}),n.diagramId=t,e.getMindmap()&&(n.nodes.forEach(e=>{"rounded"===e.shape?(e.radius=15,e.taper=15,e.stroke="none",e.width=0,e.padding=15):"circle"===e.shape?e.padding=10:"rect"===e.shape&&(e.width=0,e.padding=10)}),await Yhe(n,a),Hhe(a,n.config.mindmap?.padding??Ht.mindmap.padding,"mindmapDiagram",n.config.mindmap?.useMaxWidth??Ht.mindmap.useMaxWidth))},"draw"),JDe={draw:QDe}}),lMe=s(()=>{Kr(),eMe=mt(t=>{let r="";for(let e=0;e` .edge { stroke-width: 3; } ${eMe(e)} .section-root rect, .section-root path, .section-root circle, .section-root polygon { fill: ${e.git0}; } .section-root text { fill: ${e.gitBranchLabel0}; } .section-root span { color: ${e.gitBranchLabel0}; } .section-2 span { color: ${e.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"),rMe=tMe}),cMe={};PGe(cMe,{diagram:()=>hMe});var hMe,uMe,dMe,pMe,gMe,fMe,mMe,yMe,vMe,bMe,xMe,TMe,wMe,kMe,EMe,_Me,SMe,CMe,AMe,RMe,LMe,NMe,IMe,DMe,MMe,OMe=s(()=>{PDe(),sMe(),oMe(),lMe(),hMe={get db(){return new ZDe},renderer:JDe,parser:MDe,styles:rMe}}),PMe=s(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[1,4],i=[1,13],n=[1,12],a=[1,15],s=[1,16],o=[1,20],l=[1,19],c=[6,7,8],h=[1,26],u=[1,24],d=[1,25],p=[6,7,11],g=[1,31],f=[6,7,11,24],m=[1,6,13,16,17,20,23],y=[1,35],v=[1,36],b=[1,6,7,11,13,16,17,20,23],x=[1,38],r={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},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,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",a[o-1].id),i.addNode(a[o-2].length,a[o-1].id,a[o-1].descr,a[o-1].type,a[o]);break;case 16:i.getLogger().info("Node: ",a[o].id),i.addNode(a[o-1].length,a[o].id,a[o].descr,a[o].type);break;case 17:i.getLogger().trace("Icon: ",a[o]),i.decorateNode({icon:a[o]});break;case 18:case 23:i.decorateNode({class:a[o]});break;case 19:i.getLogger().trace("SPACELIST");break;case 20:i.getLogger().trace("Node: ",a[o-1].id),i.addNode(0,a[o-1].id,a[o-1].descr,a[o-1].type,a[o]);break;case 21:i.getLogger().trace("Node: ",a[o].id),i.addNode(0,a[o].id,a[o].descr,a[o].type);break;case 22:i.decorateNode({icon:a[o]});break;case 27:i.getLogger().trace("node found ..",a[o-2]),this.$={id:a[o-1],descr:a[o-1],type:i.getType(a[o-2],a[o])};break;case 28:this.$={id:a[o],descr:a[o],type:0};break;case 29:i.getLogger().trace("node found ..",a[o-3]),this.$={id:a[o-3],descr:a[o-1],type:i.getType(a[o-2],a[o])};break;case 30:this.$=a[o-1]+a[o];break;case 31:this.$=a[o]}},"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:i,7:[1,10],9:9,12:11,13:n,14:14,16:a,17:s,18:17,19:18,20:o,23:l},t(c,[2,3]),{1:[2,2]},t(c,[2,4]),t(c,[2,5]),{1:[2,6],6:i,12:21,13:n,14:14,16:a,17:s,18:17,19:18,20:o,23:l},{6:i,9:22,12:11,13:n,14:14,16:a,17:s,18:17,19:18,20:o,23:l},{6:h,7:u,10:23,11:d},t(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:o,23:l}),t(p,[2,19]),t(p,[2,21],{15:30,24:g}),t(p,[2,22]),t(p,[2,23]),t(f,[2,25]),t(f,[2,26]),t(f,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:u,10:34,11:d},{1:[2,7],6:i,12:21,13:n,14:14,16:a,17:s,18:17,19:18,20:o,23:l},t(m,[2,14],{7:y,11:v}),t(b,[2,8]),t(b,[2,9]),t(b,[2,10]),t(p,[2,16],{15:37,24:g}),t(p,[2,17]),t(p,[2,18]),t(p,[2,20],{24:x}),t(f,[2,31]),{21:[1,39]},{22:[1,40]},t(m,[2,13],{7:y,11:v}),t(b,[2,11]),t(b,[2,12]),t(p,[2,15],{24:x}),t(f,[2,30]),{22:[1,41]},t(f,[2,27]),t(f,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0"),24;case 4:return 24;case 5:this.popState();break;case 6:return e.getLogger().trace("Found comment",t.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 10:this.popState();break;case 11:e.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return e.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:e.getLogger().trace("end icon"),this.popState();break;case 16:return e.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return e.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return e.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return e.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:e.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return e.getLogger().trace("description:",t.yytext),"NODE_DESCR";case 32:this.popState();break;case 33:return this.popState(),e.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),e.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),e.getLogger().trace("node end ...",t.yytext),"NODE_DEND";case 36:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 39:case 40:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 41:case 42:return e.getLogger().trace("Long description:",t.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\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:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};r.lexer=c,mt(e,"Parser"),(uMe=new((e.prototype=r).Parser=e)).parser=uMe,dMe=uMe}),$Me=s(()=>{Au(),zc(),e(),si(),Y9(),pMe=[],gMe=[],fMe=0,mMe={},yMe=mt(()=>{pMe=[],gMe=[],fMe=0,mMe={}},"clear"),vMe=mt(e=>{if(0===pMe.length)return null;let t=pMe[0].level,r=null;for(let e=pMe.length-1;0<=e;e--)if(pMe[e].level===t&&(r=r||pMe[e]),pMe[e].levele.parentId===t.id)){var s={id:n.id,parentId:t.id,label:gc(n.label??"",i),labelType:"markdown",isGroup:!1,ticket:n?.ticket,priority:n?.priority,assigned:n?.assigned,icon:n?.icon,shape:"kanbanItem",level:n.level,rx:5,ry:5,cssStyles:["text-align: left"]};e.push(s)}}return{nodes:e,edges:[],other:{},config:O()}},"getData"),TMe=mt((e,t,r,i,n)=>{let a=O(),s=a.mindmap?.padding??Ht.mindmap.padding;switch(i){case wMe.ROUNDED_RECT:case wMe.RECT:case wMe.HEXAGON:s*=2}if(i={id:gc(t,a)||"kbn"+fMe++,level:e,label:gc(r,a),width:a.mindmap?.maxNodeWidth??Ht.mindmap.maxNodeWidth,padding:s,isGroup:!1},void 0!==n){if(n=n.includes(` `)?n+` `:`{ `+n+` }`,(t=W9(n,{schema:j9})).shape&&(t.shape!==t.shape.toLowerCase()||t.shape.includes("_")))throw new Error(`No such shape: ${t.shape}. Shape names should be lowercase.`);t?.shape&&"kanbanItem"===t.shape&&(i.shape=t?.shape),t?.label&&(i.label=t?.label),t?.icon&&(i.icon=t?.icon.toString()),t?.assigned&&(i.assigned=t?.assigned.toString()),t?.ticket&&(i.ticket=t?.ticket.toString()),t?.priority&&(i.priority=t?.priority)}(r=vMe(e))?i.parentId=r.id||"kbn"+fMe++:gMe.push(i),pMe.push(i)},"addNode"),wMe={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},kMe=mt((e,t)=>{switch(M.debug("In get type",e,t),e){case"[":return wMe.RECT;case"(":return")"===t?wMe.ROUNDED_RECT:wMe.CLOUD;case"((":return wMe.CIRCLE;case")":return wMe.CLOUD;case"))":return wMe.BANG;case"{{":return wMe.HEXAGON;default:return wMe.DEFAULT}},"getType"),EMe=mt((e,t)=>{mMe[e]=t},"setElementForId"),_Me=mt(e=>{var t,r;e&&(t=O(),r=pMe[pMe.length-1],e.icon&&(r.icon=gc(e.icon,t)),e.class)&&(r.cssClasses=gc(e.class,t))},"decorateNode"),SMe=mt(e=>{switch(e){case wMe.DEFAULT:return"no-border";case wMe.RECT:return"rect";case wMe.ROUNDED_RECT:return"rounded-rect";case wMe.CIRCLE:return"circle";case wMe.CLOUD:return"cloud";case wMe.BANG:return"bang";case wMe.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),CMe=mt(()=>M,"getLogger"),AMe=mt(e=>mMe[e],"getElementById"),RMe={clear:yMe,addNode:TMe,getSections:bMe,getData:xMe,nodeType:wMe,getType:kMe,setElementForId:EMe,decorateNode:_Me,type2Str:SMe,getLogger:CMe,getElementById:AMe}}),BMe=s(()=>{Au(),e(),pCe(),ph(),si(),mO(),bP(),LMe=mt(async(e,t,r,i)=>{M.debug(`Rendering kanban diagram `+e);var n,a=i.db.getData(),s=O(),o=(s.htmlLabels=!1,(e=oCe(t)).append("g")),l=(o.attr("class","sections"),e.append("g"));l.attr("class","items");let c=a.nodes.filter(e=>e.isGroup),h=0,u=[],d=25;for(n of c){var p=s?.kanban?.sectionWidth||200,p=(h+=1,n.x=p*h+10*(h-1)/2,n.width=p,n.y=0,n.height=3*p,n.rx=5,n.ry=5,n.cssClasses=n.cssClasses+" section-"+h,await cO(o,n));d=Math.max(d,p?.labelBBox?.height),u.push(p)}let g=0;for(let n of c){var f,m=u[g];g+=1;let e=s?.kanban?.sectionWidth||200,t=3*-e/2+d,r=t,i=a.nodes.filter(e=>e.parentId===n.id);for(f of i){if(f.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");f.x=n.x,f.width=e-15;var y=(await pP(l,f,{config:s})).node().getBBox();f.y=r+y.height/2,await yP(f),r=f.y+y.height/2+5}var m=m.cluster.select("rect"),v=Math.max(r-t+30,50)+(d-25);m.attr("height",v)}ih(void 0,e,s.mindmap?.padding??Ht.kanban.padding,s.mindmap?.useMaxWidth??Ht.kanban.useMaxWidth)},"draw"),NMe={draw:LMe}}),FMe=s(()=>{Kr(),gue(),IMe=mt(r=>{let t="";for(let e=0;e(r.darkMode?kt:R)(e,t),"adjuster");for(let e=0;e` .edge { stroke-width: 3; } ${IMe(e)} .section-root rect, .section-root path, .section-root circle, .section-root polygon { fill: ${e.git0}; } .section-root text { fill: ${e.gitBranchLabel0}; } .icon-container { height:100%; display: flex; justify-content: center; align-items: center; } .edge { fill: none; } .cluster-label, .label { color: ${e.textColor}; fill: ${e.textColor}; } .kanban-label { dy: 1em; alignment-baseline: middle; text-anchor: middle; dominant-baseline: middle; text-align: center; } ${nue()} `,"getStyles"),MMe=DMe}),zMe={};PGe(zMe,{diagram:()=>qMe});var qMe,UMe,GMe,jMe,WMe,YMe,VMe,HMe,XMe,KMe,ZMe,QMe,JMe,eOe,tOe,rOe=s(()=>{PMe(),$Me(),BMe(),FMe(),qMe={db:RMe,renderer:NMe,parser:dMe,styles:MMe}}),iOe=s(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[1,9],i=[1,10],n=[1,5,10,12],n={trace:mt(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:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 7:var l=i.findOrCreateNode(a[o-4].trim().replaceAll('""','"')),c=i.findOrCreateNode(a[o-2].trim().replaceAll('""','"')),h=parseFloat(a[o].trim());i.addLink(l,c,h);break;case 8:case 9:case 11:this.$=a[o];break;case 10:this.$=a[o-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:i},{1:[2,6],7:11,10:[1,12]},t(i,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(n,[2,8]),t(n,[2,9]),{19:[1,16]},t(n,[2,11]),{1:[2,1]},{1:[2,5]},t(i,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:r,20:i},{15:18,16:7,17:8,18:r,20:i},{18:[1,19]},t(i,[2,3]),{12:[1,20]},t(n,[2,10]),{15:21,16:7,17:8,18:r,20:i},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0{Au(),zc(),Cu(),jMe=[],WMe=[],YMe=new Map,VMe=mt(()=>{jMe=[],WMe=[],YMe=new Map,xh()},"clear"),HMe=class{constructor(e,t,r=0){this.source=e,this.target=t,this.value=r}static{mt(this,"SankeyLink")}},XMe=mt((e,t,r)=>{jMe.push(new HMe(e,t,r))},"addLink"),KMe=class{constructor(e){this.ID=e}static{mt(this,"SankeyNode")}},ZMe=mt(e=>{e=L.sanitizeText(e,O());let t=YMe.get(e);return void 0===t&&(t=new KMe(e),YMe.set(e,t),WMe.push(t)),t},"findOrCreateNode"),QMe=mt(()=>WMe,"getNodes"),JMe=mt(()=>jMe,"getLinks"),eOe=mt(()=>({nodes:WMe.map(e=>({id:e.ID})),links:jMe.map(e=>({source:e.source.ID,target:e.target.ID,value:e.value}))}),"getGraph"),tOe={nodesMap:YMe,getConfig:mt(()=>O().sankey,"getConfig"),getNodes:QMe,getLinks:JMe,getGraph:eOe,addLink:XMe,findOrCreateNode:ZMe,getAccTitle:wh,setAccTitle:Th,getAccDescription:Eh,setAccDescription:kh,getDiagramTitle:Sh,setDiagramTitle:_h,clear:VMe}});function aOe(t,r){let i;if(void 0===r)for(var e of t)null!=e&&(i{mt(aOe,"max")});function oOe(t,r){let i;if(void 0===r)for(var e of t)null!=e&&(i>e||void 0===i&&e<=e)&&(i=e);else{let e=-1;for(var n of t)null!=(n=r(n,++e,t))&&(i>n||void 0===i&&n<=n)&&(i=n)}return i}var lOe=s(()=>{mt(oOe,"min")});function cOe(t,r){let i=0;if(void 0===r)for(var e of t)(e=+e)&&(i+=e);else{let e=-1;for(var n of t)(n=+r(n,++e,t))&&(i+=n)}return i}var hOe=s(()=>{mt(cOe,"sum")}),uOe=s(()=>{sOe(),lOe(),hOe()});function dOe(e){return e.target.depth}function pOe(e){return e.depth}function gOe(e,t){return t-1-e.height}function fOe(e,t){return e.sourceLinks.length?e.depth:t-1}function mOe(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?oOe(e.sourceLinks,dOe)-1:0}var yOe=s(()=>{uOe(),mt(dOe,"targetDepth"),mt(pOe,"left"),mt(gOe,"right"),mt(fOe,"justify"),mt(mOe,"center")});function vOe(e){return function(){return e}}var bOe=s(()=>{mt(vOe,"constant")});function xOe(e,t){return wOe(e.source,t.source)||e.index-t.index}function TOe(e,t){return wOe(e.target,t.target)||e.index-t.index}function wOe(e,t){return e.y0-t.y0}function kOe(e){return e.value}function EOe(e){return e.index}function _Oe(e){return e.nodes}function SOe(e){return e.links}function COe(e,t){if(e=e.get(t))return e;throw new Error("missing: "+t)}function AOe({nodes:e}){for(var r of e){let e=r.y0,t=e;for(var i of r.sourceLinks)i.y0=e+i.width/2,e+=i.width;for(var n of r.targetLinks)n.y1=t+n.width/2,t+=n.width}}function ROe(){let o=0,l=0,c=1,h=1,u=24,n=8,d,p=EOe,g=fOe,f,m,t=_Oe,r=SOe,a=6;function i(){var e={nodes:t.apply(null,arguments),links:r.apply(null,arguments)};return s(e),y(e),v(e),b(e),w(e),AOe(e),e}function s({nodes:r,links:e}){for(var[t,i]of r.entries())i.index=t,i.sourceLinks=[],i.targetLinks=[];var n,a,s=new Map(r.map((e,t)=>[p(e,t,r),e]));for([n,a]of e.entries()){a.index=n;let{source:e,target:t}=a;"object"!=typeof e&&(e=a.source=COe(s,e)),"object"!=typeof t&&(t=a.target=COe(s,t)),e.sourceLinks.push(a),t.targetLinks.push(a)}if(null!=m)for(var{sourceLinks:o,targetLinks:l}of r)o.sort(m),l.sort(m)}function y({nodes:e}){for(var t of e)t.value=void 0===t.fixedValue?Math.max(cOe(t.sourceLinks,kOe),cOe(t.targetLinks,kOe)):t.fixedValue}function v({nodes:e}){let t=e.length,r=new Set(e),i=new Set,n=0;for(;r.size;){for(var a of r){a.depth=n;for(var{target:s}of a.sourceLinks)i.add(s)}if(++n>t)throw new Error("circular link");r=i,i=new Set}}function b({nodes:e}){let t=e.length,r=new Set(e),i=new Set,n=0;for(;r.size;){for(var a of r){a.height=n;for(var{source:s}of a.targetLinks)i.add(s)}if(++n>t)throw new Error("circular link");r=i,i=new Set}}function x({nodes:e}){var t,r=aOe(e,e=>e.depth)+1,i=(c-o-u)/(r-1),n=new Array(r);for(t of e){var a=Math.max(0,Math.min(r-1,Math.floor(g.call(null,t,r))));t.layer=a,t.x0=o+a*i,t.x1=t.x0+u,n[a]?n[a].push(t):n[a]=[t]}if(f)for(var s of n)s.sort(f);return n}function T(e){var r,i=oOe(e,e=>(h-l-(e.length-1)*d)/cOe(e,kOe));for(r of e){let t=l;for(var n of r){n.y0=t,n.y1=t+n.value*i,t=n.y1+d;for(var a of n.sourceLinks)a.width=a.value*i}t=(h-t+d)/(r.length+1);for(let e=0;ee.length)-1)),T(t);for(let e=0;e>1,i=e[r];C(e,i.y0-d,r-1,t),S(e,i.y1+d,1+r,t),C(e,h,e.length-1,t),S(e,l,0,t)}function S(e,t,r,i){for(;r{uOe(),yOe(),bOe(),mt(xOe,"ascendingSourceBreadth"),mt(TOe,"ascendingTargetBreadth"),mt(wOe,"ascendingBreadth"),mt(kOe,"value"),mt(EOe,"defaultId"),mt(_Oe,"defaultNodes"),mt(SOe,"defaultLinks"),mt(COe,"find"),mt(AOe,"computeLinkBreadths"),mt(ROe,"Sankey")});function NOe(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function IOe(){return new NOe}var DOe,MOe,OOe,POe,$Oe=s(()=>{DOe=Math.PI,OOe=(MOe=2*DOe)-1e-6,mt(NOe,"Path"),mt(IOe,"path"),NOe.prototype=IOe.prototype={constructor:NOe,moveTo:mt(function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},"moveTo"),closePath:mt(function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},"closePath"),lineTo:mt(function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},"lineTo"),quadraticCurveTo:mt(function(e,t,r,i){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+i)},"quadraticCurveTo"),bezierCurveTo:mt(function(e,t,r,i,n,a){this._+="C"+ +e+","+ +t+","+ +r+","+ +i+","+(this._x1=+n)+","+(this._y1=+a)},"bezierCurveTo"),arcTo:mt(function(e,t,r,i,n){var a,s,o=this._x1,l=this._y1,c=(r=+r)-(e=+e),h=(i=+i)-(t=+t),u=o-e,d=l-t,p=u*u+d*d;if((n=+n)<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+(this._x1=e)+","+(this._y1=t):1e-6{$Oe()});function FOe(e){return mt(function(){return e},"constant")}var zOe=s(()=>{mt(FOe,"default")});function qOe(e){return e[0]}function UOe(e){return e[1]}var GOe,jOe=s(()=>{mt(qOe,"x"),mt(UOe,"y")}),WOe=s(()=>{GOe=Array.prototype.slice});function YOe(e){return e.source}function VOe(e){return e.target}function HOe(n){var a=YOe,s=VOe,o=qOe,l=UOe,c=null;function t(){var e,t=GOe.call(arguments),r=a.apply(this,t),i=s.apply(this,t);if(c=c||(e=POe()),n(c,+o.apply(this,(t[0]=r,t)),+l.apply(this,t),+o.apply(this,(t[0]=i,t)),+l.apply(this,t)),e)return c=null,e+""||null}return mt(t,"link"),t.source=function(e){return arguments.length?(a=e,t):a},t.target=function(e){return arguments.length?(s=e,t):s},t.x=function(e){return arguments.length?(o="function"==typeof e?e:FOe(+e),t):o},t.y=function(e){return arguments.length?(l="function"==typeof e?e:FOe(+e),t):l},t.context=function(e){return arguments.length?(c=e??null,t):c},t}function XOe(e,t,r,i,n){e.moveTo(t,r),e.bezierCurveTo(t=(t+i)/2,r,t,n,i,n)}function KOe(){return HOe(XOe)}var ZOe=s(()=>{BOe(),WOe(),zOe(),jOe(),mt(YOe,"linkSource"),mt(VOe,"linkTarget"),mt(HOe,"link"),mt(XOe,"curveHorizontal"),mt(KOe,"linkHorizontal")}),QOe=s(()=>{ZOe()});function JOe(e){return[e.source.x1,e.y0]}function ePe(e){return[e.target.x0,e.y1]}function tPe(){return KOe().source(JOe).target(ePe)}var rPe,iPe,nPe,aPe,sPe,oPe,lPe,cPe=s(()=>{QOe(),mt(JOe,"horizontalSource"),mt(ePe,"horizontalTarget"),mt(tPe,"default")}),hPe=s(()=>{LOe(),yOe(),cPe()}),uPe=s(()=>{rPe=class t{static{mt(this,"Uid")}static{this.count=0}static next(e){return new t(e+ ++t.count)}constructor(e){this.id=e,this.href="#"+e}toString(){return"url("+this.href+")"}}}),dPe=s(()=>{Au(),hw(),hPe(),ph(),uPe(),iPe={left:pOe,right:gOe,center:mOe,justify:fOe},nPe=mt(function(e,t,r,i){let{securityLevel:n,sankey:a}=O(),s=Lh.sankey,o,l=("sandbox"===n&&(o=V("#i"+t)),V("sandbox"===n?o.nodes()[0].contentDocument.body:"body")),c="sandbox"===n?l.select(`[id="${t}"]`):V(`[id="${t}"]`),h=a?.width??s.width,u=a?.height??s.width,d=a?.useMaxWidth??s.useMaxWidth,p=a?.nodeAlignment??s.nodeAlignment,g=a?.prefix??s.prefix,f=a?.suffix??s.suffix,m=a?.showValues??s.showValues,y=i.db.getGraph(),v=iPe[p],b=(ROe().nodeId(e=>e.id).nodeWidth(10).nodePadding(10+(m?15:0)).nodeAlign(v).extent([[0,0],[h,u]])(y),wb(w5));c.append("g").attr("class","nodes").selectAll(".node").data(y.nodes).join("g").attr("class","node").attr("id",e=>(e.uid=rPe.next("node-")).id).attr("transform",function(e){return"translate("+e.x0+","+e.y0+")"}).attr("x",e=>e.x0).attr("y",e=>e.y0).append("rect").attr("height",e=>e.y1-e.y0).attr("width",e=>e.x1-e.x0).attr("fill",e=>b(e.id));var t=mt(({id:e,value:t})=>m?e+` `+g+Math.round(100*t)/100+f:e,"getText"),i=(c.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(y.nodes).join("text").attr("x",e=>e.x0(e.y1+e.y0)/2).attr("dy",`${m?"0":"0.35"}em`).attr("text-anchor",e=>e.x0(e.uid=rPe.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",e=>e.source.x1).attr("x2",e=>e.target.x0)).append("stop").attr("offset","0%").attr("stop-color",e=>b(e.source.id)),t.append("stop").attr("offset","100%").attr("stop-color",e=>b(e.target.id)));let T;switch(x){case"gradient":T=mt(e=>e.uid,"coloring");break;case"source":T=mt(e=>b(e.source.id),"coloring");break;case"target":T=mt(e=>b(e.target.id),"coloring");break;default:T=x}i.append("path").attr("d",tPe()).attr("stroke",T).attr("stroke-width",e=>Math.max(1,e.width)),ih(void 0,c,0,d)},"draw"),aPe={draw:nPe}}),pPe=s(()=>{sPe=mt(e=>e.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,` `).trim(),"prepareTextForParsing")}),gPe=s(()=>{oPe=mt(e=>`.label { font-family: ${e.fontFamily}; }`,"getStyles"),lPe=oPe}),fPe={};PGe(fPe,{diagram:()=>yPe});var mPe,yPe,vPe,bPe,xPe,TPe,wPe,kPe,EPe,_Pe,SPe,CPe,APe=s(()=>{iOe(),nOe(),dPe(),pPe(),gPe(),mPe=GMe.parse.bind(GMe),GMe.parse=e=>mPe(sPe(e)),yPe={styles:lPe,parser:GMe,db:tOe,renderer:aPe}}),RPe=s(()=>{li(),si(),hC(),Cu(),vPe=Ht.packet,bPe=class{constructor(){this.packet=[],this.setAccTitle=Th,this.getAccTitle=wh,this.setDiagramTitle=_h,this.getDiagramTitle=Sh,this.getAccDescription=Eh,this.setAccDescription=kh}static{mt(this,"PacketDB")}getConfig(){var e=I7({...vPe,...cr().packet});return e.showBits&&(e.paddingY+=10),e}getPacket(){return this.packet}pushWord(e){0{VEe(),e(),ZEe(),RPe(),xPe=mt((e,t)=>{HEe(e,t);let r=-1,i=[],n=1,a=t.getConfig().bitsPerRow;for(var{start:s,end:o,bits:l,label:c}of e.blocks){if(void 0!==s&&void 0!==o&&o{if(void 0===e.start)throw new Error("start should have been set during first phase");if(void 0===e.end)throw new Error("end should have been set during first phase");if(e.end{var e=await GEe("packet",e),t=wPe.parser?.yy;if(!(t instanceof bPe))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");M.debug(e),xPe(e,t)},"parse")}}),NPe=s(()=>{pCe(),ph(),kPe=mt((e,t,r,i)=>{var n,a,s=(i=i.db).getConfig(),{rowHeight:o,paddingY:l,bitWidth:c,bitsPerRow:h}=s,u=i.getPacket(),i=i.getDiagramTitle(),o=(l=o+l)*(u.length+1)-(i?0:o),c=c*h+2,d=oCe(t);d.attr("viewBox",`0 0 ${c} `+o),rh(d,o,c,s.useMaxWidth);for([n,a]of u.entries())EPe(d,a,n,s);d.append("text").text(i).attr("x",c/2).attr("y",o-l/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),EPe=mt((e,t,r,{rowHeight:i,paddingX:n,paddingY:a,bitWidth:s,bitsPerRow:o,showBits:l})=>{var c,h=e.append("g"),u=r*(i+a)+a;for(c of t){var d,p,g=c.start%o*s+1,f=(c.end-c.start+1)*s-n;h.append("rect").attr("x",g).attr("y",u).attr("width",f).attr("height",i).attr("class","packetBlock"),h.append("text").attr("x",g+f/2).attr("y",u+i/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"),_Pe={draw:kPe}}),IPe=s(()=>{hC(),SPe={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},CPe=mt(({packet:e}={})=>` .packetByte { font-size: ${(e=I7(SPe,e)).byteFontSize}; } .packetByte.start { fill: ${e.startByteColor}; } .packetByte.end { fill: ${e.endByteColor}; } .packetLabel { fill: ${e.labelColor}; font-size: ${e.labelFontSize}; } .packetTitle { fill: ${e.titleColor}; font-size: ${e.titleFontSize}; } .packetBlock { stroke: ${e.blockStrokeColor}; stroke-width: ${e.blockStrokeWidth}; fill: ${e.blockFillColor}; } `,"styles")}),DPe={};PGe(DPe,{diagram:()=>MPe});var MPe,OPe,PPe,$Pe,BPe,FPe,zPe,qPe,UPe,GPe,jPe,WPe,YPe,VPe,HPe,XPe,KPe,ZPe=s(()=>{RPe(),LPe(),NPe(),IPe(),MPe={parser:wPe,get db(){return new bPe},renderer:_Pe,styles:CPe}}),QPe=s(()=>{li(),si(),hC(),Cu(),PPe={axes:[],curves:[],options:OPe={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"}},$Pe=structuredClone(PPe),BPe=Ht.radar,FPe=mt(()=>I7({...BPe,...cr().radar}),"getConfig"),zPe=mt(()=>$Pe.axes,"getAxes"),qPe=mt(()=>$Pe.curves,"getCurves"),UPe=mt(()=>$Pe.options,"getOptions"),GPe=mt(e=>{$Pe.axes=e.map(e=>({name:e.name,label:e.label??e.name}))},"setAxes"),jPe=mt(e=>{$Pe.curves=e.map(e=>({name:e.name,label:e.label??e.name,entries:WPe(e.entries)}))},"setCurves"),WPe=mt(r=>{if(null==r[0].axis)return r.map(e=>e.value);var e=zPe();if(0===e.length)throw new Error("Axes must be populated before curves for reference entries");return e.map(t=>{var e=r.find(e=>e.axis?.$refText===t.name);if(void 0===e)throw new Error("Missing entry for axis "+t.label);return e.value})},"computeCurveEntries"),YPe=mt(e=>{e=e.reduce((e,t)=>(e[t.name]=t,e),{}),$Pe.options={showLegend:e.showLegend?.value??OPe.showLegend,ticks:e.ticks?.value??OPe.ticks,max:e.max?.value??OPe.max,min:e.min?.value??OPe.min,graticule:e.graticule?.value??OPe.graticule}},"setOptions"),VPe=mt(()=>{xh(),$Pe=structuredClone(PPe)},"clear"),HPe={getAxes:zPe,getCurves:qPe,getOptions:UPe,setAxes:GPe,setCurves:jPe,setOptions:YPe,getConfig:FPe,clear:VPe,setAccTitle:Th,getAccTitle:wh,setDiagramTitle:_h,getDiagramTitle:Sh,getAccDescription:Eh,setAccDescription:kh}}),JPe=s(()=>{VEe(),e(),ZEe(),QPe(),XPe=mt(e=>{HEe(e,HPe);var{axes:e,curves:t,options:r}=e;HPe.setAxes(e),HPe.setCurves(t),HPe.setOptions(r)},"populate"),KPe={parse:mt(async e=>{e=await GEe("radar",e),M.debug(e),XPe(e)},"parse")}});function e$e(r,e,t,i,n,a,s){let o=e.length,l=Math.min(s.width,s.height)/2;t.forEach((e,t)=>{e.entries.length===o&&(e=e.entries.map((e,t)=>(t=2*Math.PI*t/o-Math.PI/2,{x:(e=t$e(e,i,n,l))*Math.cos(t),y:e*Math.sin(t)})),"circle"===a?r.append("path").attr("d",r$e(e,s.curveTension)).attr("class","radarCurve-"+t):"polygon"===a&&r.append("polygon").attr("points",e.map(e=>e.x+","+e.y).join(" ")).attr("class","radarCurve-"+t))})}function t$e(e,t,r,i){return i*(Math.min(Math.max(e,t),r)-t)/(r-t)}function r$e(t,r){let i=t.length,n=`M${t[0].x},`+t[0].y;for(let e=0;e{var r=a.append("g").attr("transform",`translate(${i}, ${n+20*t})`);r.append("rect").attr("width",12).attr("height",12).attr("class","radarLegendBox-"+t),r.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(e.label)})}}var n$e,a$e,s$e,o$e,l$e,c$e,h$e,u$e,d$e=s(()=>{pCe(),ph(),n$e=mt((e,t,r,i)=>{var n=(i=i.db).getAxes(),a=i.getCurves(),s=i.getOptions(),o=i.getConfig(),i=i.getDiagramTitle(),t=oCe(t),t=a$e(t,o),l=s.max??Math.max(...a.map(e=>Math.max(...e.entries))),c=s.min,h=Math.min(o.width,o.height)/2;s$e(t,n,h,s.ticks,s.graticule),o$e(t,n,h,o),e$e(t,n,a,c,l,s.graticule,o),i$e(t,a,s.showLegend,o),t.append("text").attr("class","radarTitle").text(i).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),a$e=mt((e,t)=>{var r=t.width+t.marginLeft+t.marginRight,i=t.height+t.marginTop+t.marginBottom,n=t.marginLeft+t.width/2,a=t.marginTop+t.height/2;return rh(e,i,r,t.useMaxWidth??!0),e.attr("viewBox",`0 0 ${r} `+i),e.append("g").attr("transform",`translate(${n}, ${a})`)},"drawFrame"),s$e=mt((n,a,s,o,e)=>{if("circle"===e)for(let e=0;e(t=2*t*Math.PI/i-Math.PI/2,r*Math.cos(t)+","+r*Math.sin(t))).join(" ");n.append("polygon").attr("points",e).attr("class","radarGraticule")}}},"drawGraticule"),o$e=mt((t,r,i,n)=>{var a=r.length;for(let e=0;e{hC(),ti(),li(),c$e=mt((t,r)=>{let i="";for(let e=0;e{var t=I7(Bt(),cr().themeVariables);return{themeVariables:t,radarOptions:I7(t.radar,e)}},"buildRadarStyleOptions"),u$e=mt(({radar:e}={})=>{var{themeVariables:e,radarOptions:t}=h$e(e);return` .radarTitle { font-size: ${e.fontSize}; color: ${e.titleColor}; dominant-baseline: hanging; text-anchor: middle; } .radarAxisLine { stroke: ${t.axisColor}; stroke-width: ${t.axisStrokeWidth}; } .radarAxisLabel { dominant-baseline: middle; text-anchor: middle; font-size: ${t.axisLabelFontSize}px; color: ${t.axisColor}; } .radarGraticule { fill: ${t.graticuleColor}; fill-opacity: ${t.graticuleOpacity}; stroke: ${t.graticuleColor}; stroke-width: ${t.graticuleStrokeWidth}; } .radarLegendText { text-anchor: start; font-size: ${t.legendFontSize}px; dominant-baseline: hanging; } ${c$e(e,t)} `},"styles")}),g$e={};PGe(g$e,{diagram:()=>f$e});var f$e,m$e,y$e,v$e=s(()=>{QPe(),JPe(),d$e(),p$e(),f$e={parser:KPe,db:HPe,renderer:l$e,styles:u$e}}),b$e=s(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[1,15],i=[1,7],n=[1,13],a=[1,14],s=[1,19],o=[1,16],l=[1,17],c=[1,18],h=[8,30],u=[8,10,21,28,29,30,31,39,43,46],d=[1,23],p=[1,24],g=[8,10,15,16,21,28,29,30,31,39,43,46],f=[8,10,15,16,21,27,28,29,30,31,39,43,46],m=[1,49],h={trace:mt(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,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$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:"NODE_ID",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"},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],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 4:i.getLogger().debug("Rule: separator (NL) ");break;case 5:i.getLogger().debug("Rule: separator (Space) ");break;case 6:i.getLogger().debug("Rule: separator (EOF) ");break;case 7:i.getLogger().debug("Rule: hierarchy: ",a[o-1]),i.setHierarchy(a[o-1]);break;case 8:i.getLogger().debug("Stop NL ");break;case 9:i.getLogger().debug("Stop EOF ");break;case 10:i.getLogger().debug("Stop NL2 ");break;case 11:i.getLogger().debug("Stop EOF2 ");break;case 12:i.getLogger().debug("Rule: statement: ",a[o]),"number"==typeof a[o].length?this.$=a[o]:this.$=[a[o]];break;case 13:i.getLogger().debug("Rule: statement #2: ",a[o-1]),this.$=[a[o-1]].concat(a[o]);break;case 14:i.getLogger().debug("Rule: link: ",a[o],e),this.$={edgeTypeStr:a[o],label:""};break;case 15:i.getLogger().debug("Rule: LABEL link: ",a[o-3],a[o-1],a[o]),this.$={edgeTypeStr:a[o],label:a[o-1]};break;case 18:var l=parseInt(a[o]),c=i.generateId();this.$={id:c,type:"space",label:"",width:l,children:[]};break;case 23:i.getLogger().debug("Rule: (nodeStatement link node) ",a[o-2],a[o-1],a[o]," typestr: ",a[o-1].edgeTypeStr),c=i.edgeStrToEdgeData(a[o-1].edgeTypeStr),this.$=[{id:a[o-2].id,label:a[o-2].label,type:a[o-2].type,directions:a[o-2].directions},{id:a[o-2].id+"-"+a[o].id,start:a[o-2].id,end:a[o].id,label:a[o-1].label,type:"edge",directions:a[o].directions,arrowTypeEnd:c,arrowTypeStart:"arrow_open"},{id:a[o].id,label:a[o].label,type:i.typeStr2Type(a[o].typeStr),directions:a[o].directions}];break;case 24:i.getLogger().debug("Rule: nodeStatement (abc88 node size) ",a[o-1],a[o]),this.$={id:a[o-1].id,label:a[o-1].label,type:i.typeStr2Type(a[o-1].typeStr),directions:a[o-1].directions,widthInColumns:parseInt(a[o],10)};break;case 25:i.getLogger().debug("Rule: nodeStatement (node) ",a[o]),this.$={id:a[o].id,label:a[o].label,type:i.typeStr2Type(a[o].typeStr),directions:a[o].directions,widthInColumns:1};break;case 26:i.getLogger().debug("APA123",this||"na"),i.getLogger().debug("COLUMNS: ",a[o]),this.$={type:"column-setting",columns:"auto"===a[o]?-1:parseInt(a[o])};break;case 27:i.getLogger().debug("Rule: id-block statement : ",a[o-2],a[o-1]),i.generateId(),this.$={...a[o-2],type:"composite",children:a[o-1]};break;case 28:i.getLogger().debug("Rule: blockStatement : ",a[o-2],a[o-1],a[o]),l=i.generateId(),this.$={id:l,type:"composite",label:"",children:a[o-1]};break;case 29:i.getLogger().debug("Rule: node (NODE_ID separator): ",a[o]),this.$={id:a[o]};break;case 30:i.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",a[o-1],a[o]),this.$={id:a[o-1],label:a[o].label,typeStr:a[o].typeStr,directions:a[o].directions};break;case 31:i.getLogger().debug("Rule: dirList: ",a[o]),this.$=[a[o]];break;case 32:i.getLogger().debug("Rule: dirList: ",a[o-1],a[o]),this.$=[a[o-1]].concat(a[o]);break;case 33:i.getLogger().debug("Rule: nodeShapeNLabel: ",a[o-2],a[o-1],a[o]),this.$={typeStr:a[o-2]+a[o],label:a[o-1]};break;case 34:i.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",a[o-3],a[o-2]," #3:",a[o-1],a[o]),this.$={typeStr:a[o-3]+a[o],label:a[o-2],directions:a[o-1]};break;case 35:case 36:this.$={type:"classDef",id:a[o-1].trim(),css:a[o].trim()};break;case 37:this.$={type:"applyClass",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 38:this.$={type:"applyStyles",id:a[o-1].trim(),stylesStr:a[o].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:r,11:3,13:4,19:5,20:6,21:i,22:8,23:9,24:10,25:11,26:12,28:n,29:a,31:s,39:o,43:l,46:c},{8:[1,20]},t(h,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:r,21:i,28:n,29:a,31:s,39:o,43:l,46:c}),t(u,[2,16],{14:22,15:d,16:p}),t(u,[2,17]),t(u,[2,18]),t(u,[2,19]),t(u,[2,20]),t(u,[2,21]),t(u,[2,22]),t(g,[2,25],{27:[1,25]}),t(u,[2,26]),{19:26,26:12,31:s},{10:r,11:27,13:4,19:5,20:6,21:i,22:8,23:9,24:10,25:11,26:12,28:n,29:a,31:s,39:o,43:l,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(f,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(h,[2,13]),{26:35,31:s},{31:[2,14]},{17:[1,36]},t(g,[2,24]),{10:r,11:37,13:4,14:22,15:d,16:p,19:5,20:6,21:i,22:8,23:9,24:10,25:11,26:12,28:n,29:a,31:s,39:o,43:l,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(f,[2,30]),{18:[1,43]},{18:[1,44]},t(g,[2,23]),{18:[1,45]},{30:[1,46]},t(u,[2,28]),t(u,[2,35]),t(u,[2,36]),t(u,[2,37]),t(u,[2,38]),{36:[1,47]},{33:48,34:m},{15:[1,50]},t(u,[2,27]),t(f,[2,33]),{38:[1,51]},{33:52,34:m,38:[2,31]},{31:[2,15]},t(f,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0"),"NODE_DEND";case 53:return this.popState(),e.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return e.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return e.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return e.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:return e.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return e.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 59:case 60:case 61:return e.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 62:return e.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return e.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 64:return e.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 65:case 66:case 67:case 68:case 69:case 70:case 71:return this.pushState("NODE"),35;case 72:return e.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),e.getLogger().debug("LEX ARR START"),37;case 74:return e.getLogger().debug("Lex: NODE_ID",t.yytext),31;case 75:return e.getLogger().debug("Lex: EOF",t.yytext),8;case 76:case 77:this.pushState("md_string");break;case 78:return"NODE_DESCR";case 79:this.popState();break;case 80:e.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:e.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return e.getLogger().debug("LEX: NODE_DESCR:",t.yytext),"NODE_DESCR";case 83:e.getLogger().debug("LEX POPPING"),this.popState();break;case 84:e.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (right): dir:",t.yytext),"DIR";case 86:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (left):",t.yytext),"DIR";case 87:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (x):",t.yytext),"DIR";case 88:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (y):",t.yytext),"DIR";case 89:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (up):",t.yytext),"DIR";case 90:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (down):",t.yytext),"DIR";case 91:return t.yytext="]>",e.getLogger().debug("Lex (ARROW_DIR end):",t.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return e.getLogger().debug("Lex: LINK","#"+t.yytext+"#"),15;case 93:case 94:case 95:return e.getLogger().debug("Lex: LINK",t.yytext),15;case 96:case 97:case 98:return e.getLogger().debug("Lex: START_LINK",t.yytext),this.pushState("LLABEL"),16;case 99:this.pushState("md_string");break;case 100:return e.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),e.getLogger().debug("Lex: LINK","#"+t.yytext+"#"),15;case 102:case 103:return this.popState(),e.getLogger().debug("Lex: LINK",t.yytext),15;case 104:return e.getLogger().debug("Lex: COLON",t.yytext),t.yytext=t.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}};h.lexer=r,mt(e,"Parser"),(m$e=new((e.prototype=h).Parser=e)).parser=m$e,y$e=m$e});function x$e(e){switch(M.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return M.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function T$e(e){return"=="!==(M.debug("typeStr2Type",e),e)?"normal":"thick"}function w$e(e){switch(e.replace(/^[\s-]+|[\s-]+$/g,"")){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}var k$e,E$e,_$e,S$e,C$e,A$e,R$e,L$e,N$e,I$e,D$e,M$e,O$e,P$e,$$e,B$e,F$e,z$e,q$e,U$e,G$e,j$e,W$e,Y$e,V$e,H$e,X$e,K$e,Z$e,Q$e,J$e,eBe,tBe,rBe,iBe,nBe,aBe,sBe,oBe,lBe,cBe=s(()=>{Mz(),li(),Au(),e(),zc(),Cu(),k$e=new Map,E$e=[],_$e=new Map,S$e=O(),C$e=new Map,A$e=mt(e=>L.sanitizeText(e,S$e),"sanitizeText"),R$e=mt(function(e,t=""){let r=C$e.get(e);r||(r={id:e,styles:[],textStyles:[]},C$e.set(e,r)),t?.split(",").forEach(e=>{var t=e.replace(/([^;]*);/,"$1").trim();RegExp("color").exec(e)&&(e=t.replace("fill","bgFill").replace("color","fill"),r.textStyles.push(e)),r.styles.push(t)})},"addStyleClass"),L$e=mt(function(e,t=""){e=k$e.get(e),null!=t&&(e.styles=t.split(","))},"addStyle2Node"),N$e=mt(function(e,r){e.split(",").forEach(function(e){let t=k$e.get(e);void 0===t&&(e=e.trim(),t={id:e,type:"na",children:[]},k$e.set(e,t)),t.classes||(t.classes=[]),t.classes.push(r)})},"setCssClass"),I$e=mt((e,t)=>{var r,i=[],n=(e=e.flat()).find(e=>"column-setting"===e?.type)?.columns??-1;for(r of e)if("number"==typeof n&&0n&&M.warn(`Block ${r.id} width ${r.widthInColumns} exceeds configured column width `+n),r.label&&(r.label=A$e(r.label)),"classDef"===r.type)R$e(r.id,r.css);else if("applyClass"===r.type)N$e(r.id,r?.styleClass??"");else if("applyStyles"===r.type)r?.stylesStr&&L$e(r.id,r?.stylesStr);else if("column-setting"===r.type)t.columns=r.columns??-1;else if("edge"===r.type){var a=(_$e.get(r.id)??0)+1;_$e.set(r.id,a),r.id=a+"-"+r.id,E$e.push(r)}else if(r.label||("composite"===r.type?r.label="":r.label=r.id),void 0===(a=k$e.get(r.id))?k$e.set(r.id,r):("na"!==r.type&&(a.type=r.type),r.label!==r.id&&(a.label=r.label)),r.children&&I$e(r.children,r),"space"===r.type){var s=r.width??1;for(let e=0;e{M.debug("Clear called"),xh(),M$e={id:"root",type:"composite",children:[],columns:-1},k$e=new Map([["root",M$e]]),D$e=[],C$e=new Map,E$e=[],_$e=new Map},"clear"),mt(x$e,"typeStr2Type"),mt(T$e,"edgeTypeStr2Type"),mt(w$e,"edgeStrToEdgeData"),P$e=0,$$e=mt(()=>(P$e++,"id-"+Math.random().toString(36).substr(2,12)+"-"+P$e),"generateId"),B$e=mt(e=>{M$e.children=e,I$e(e,M$e),D$e=M$e.children},"setHierarchy"),F$e=mt(e=>(e=k$e.get(e))?e.columns||(e.children?e.children.length:-1):-1,"getColumns"),z$e=mt(()=>[...k$e.values()],"getBlocksFlat"),q$e=mt(()=>D$e||[],"getBlocks"),U$e=mt(()=>E$e,"getEdges"),G$e=mt(e=>k$e.get(e),"getBlock"),j$e=mt(e=>{k$e.set(e.id,e)},"setBlock"),Y$e=mt(()=>M,"getLogger"),W$e=mt(function(){return C$e},"getClasses"),Y$e={getConfig:mt(()=>cr().block,"getConfig"),typeStr2Type:x$e,edgeTypeStr2Type:T$e,edgeStrToEdgeData:w$e,getLogger:Y$e,getBlocksFlat:z$e,getBlocks:q$e,getEdges:U$e,setHierarchy:B$e,getBlock:G$e,setBlock:j$e,getColumns:F$e,getClasses:W$e,clear:O$e,generateId:$$e},V$e=Y$e}),hBe=s(()=>{Kr(),gue(),H$e=mt((e,t)=>{var r=(n=ht)(e,"r"),i=n(e,"g"),n=n(e,"b");return lt(r,i,n,t)},"fade"),X$e=mt(e=>`.label { font-family: ${e.fontFamily}; color: ${e.nodeTextColor||e.textColor}; } .cluster-label text { fill: ${e.titleColor}; } .cluster-label span,p { color: ${e.titleColor}; } .label text,span,p { fill: ${e.nodeTextColor||e.textColor}; color: ${e.nodeTextColor||e.textColor}; } .node rect, .node circle, .node ellipse, .node polygon, .node path { fill: ${e.mainBkg}; stroke: ${e.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: ${e.arrowheadColor}; } .edgePath .path { stroke: ${e.lineColor}; stroke-width: 2.0px; } .flowchart-link { stroke: ${e.lineColor}; fill: none; } .edgeLabel { background-color: ${e.edgeLabelBackground}; /* * This is for backward compatibility with existing code that didn't * add a \`

\` around edge labels. * * TODO: We should probably remove this in a future release. */ p { margin: 0; padding: 0; display: inline; } rect { opacity: 0.5; background-color: ${e.edgeLabelBackground}; fill: ${e.edgeLabelBackground}; } text-align: center; } /* For html labels only */ .labelBkg { background-color: ${e.edgeLabelBackground}; } .node .cluster { // fill: ${H$e(e.mainBkg,.5)}; fill: ${H$e(e.clusterBkg,.5)}; stroke: ${H$e(e.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: ${e.titleColor}; } .cluster span,p { color: ${e.titleColor}; } /* .cluster div { color: ${e.titleColor}; } */ div.mermaidTooltip { position: absolute; text-align: center; max-width: 200px; padding: 2px; font-family: ${e.fontFamily}; font-size: 12px; background: ${e.tertiaryColor}; border: 1px solid ${e.border2}; border-radius: 2px; pointer-events: none; z-index: 100; } .flowchartTitleText { text-anchor: middle; font-size: 18px; fill: ${e.textColor}; } ${nue()} `,"getStyles"),K$e=X$e}),uBe=s(()=>{e(),Z$e=mt((t,e,r,i)=>{e.forEach(e=>{oBe[e](t,r,i)})},"insertMarkers"),Q$e=mt((e,t,r)=>{M.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),J$e=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).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")},"composition"),eBe=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).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")},"aggregation"),tBe=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).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")},"dependency"),rBe=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),iBe=mt((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),nBe=mt((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),aBe=mt((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),sBe=mt((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),oBe={extension:Q$e,composition:J$e,aggregation:eBe,dependency:tBe,lollipop:rBe,point:iBe,circle:nBe,cross:aBe,barb:sBe},lBe=Z$e});function dBe(e,t){if(0===e||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);return e<0?{px:t,py:0}:1===e?{px:0,py:t}:{px:t%e,py:Math.floor(t/e)}}function pBe(s,o,l=0,c=0){if(M.debug("setBlockSizes abc95 (start)",s.id,s?.size?.x,"block width =",s?.size,"siblingWidth",l),s?.size?.width||(s.size={width:l,height:c,x:0,y:0}),0layoutBlocks) ${n.id} x: ${n?.size?.x} y: ${n?.size?.y} width: `+n?.size?.width);var s=n.columns??-1;if(M.debug("layoutBlocks columns abc95",n.id,"=>",s,n),n.children&&0h&&o.set(c,l.size.height);let e=l?.widthInColumns??1;0e-t);for(var p of t)d.set(p,e),e+=(o.get(p)??0)+yBe}let t=0,r=(M.debug("abc91 block?.size?.x",n.id,n?.size?.x),n?.size?.x?n?.size?.x+(-n?.size?.width/2||0):-yBe),i=0;for(u of n.children){var g=n;if(u.size){var f,{width:m,height:y}=u.size,{px:v,py:b}=dBe(s,t);b!=i&&(i=b,r=n?.size?.x?n?.size?.x+(-n?.size?.width/2||0):-yBe,M.debug("New row in layout for block",n.id," and child ",u.id,i)),M.debug(`abc89 layout blocks (child) id: ${u.id} Pos: ${t} (px, py) ${v},${b} (${g?.size?.x},${g?.size?.y}) parent: ${g.id} width: `+m+yBe),g.size&&(v=m/2,u.size.x=r+yBe+v,M.debug(`abc91 layout blocks (calc) px, pyid:${u.id} startingPos=X${r} new startingPosX${u.size.x} ${v} padding=${yBe} width=${m} halfWidth=${v} => x:${u.size.x} y:${u.size.y} ${u.widthInColumns} (width * (child?.w || 1)) / 2 `+m*(u?.widthInColumns??1)/2),r=u.size.x+v,f=d.get(b)??0,b=o.get(b)??y,u.size.y=g.size.y-g.size.height/2+f+b/2+yBe,M.debug(`abc88 layout blocks (calc) px, pyid:${u.id}startingPosX${r}${yBe}${v}=>x:${u.size.x}y:${u.size.y}${u.widthInColumns}(width * (child?.w || 1)) / 2`+m*(u?.widthInColumns??1)/2)),u.children&&gBe(u,a);let e=u?.widthInColumns??1;0{e(),Au(),yBe=O()?.block?.padding??8,mt(dBe,"calculateBlockPosition"),vBe=mt(e=>{let t=0,r=0;for(var i of e.children){var{width:n,height:a,x:s,y:o}=i.size??{width:0,height:0,x:0,y:0};M.debug("getMaxChildSize abc95 child:",i.id,"width:",n,"height:",a,"x:",s,"y:",o,i.type),"space"!==i.type&&(n>t&&(t=n/(i.widthInColumns??1)),a>r)&&(r=a)}return{width:t,height:r}},"getMaxChildSize"),mt(pBe,"setBlockSizes"),mt(gBe,"layoutBlocks"),mt(fBe,"findBounds"),mt(mBe,"layout")}),_Be=s(()=>{li(),Au(),lL(),bBe=mt(async(e,t,r,i=!1,n=!1)=>{let a=t||"";"object"==typeof a&&(a=a[0]);var t=O(),s=vr(t);return oL(e,a,{style:r,isTitle:i,useHtmlLabels:s,markdown:!1,isNode:n,width:Number.POSITIVE_INFINITY},t)},"createLabel"),xBe=bBe}),SBe=s(()=>{e(),TBe=mt((e,t,r,i,n)=>{t.arrowTypeStart&&kBe(e,"start",t.arrowTypeStart,r,i,n),t.arrowTypeEnd&&kBe(e,"end",t.arrowTypeEnd,r,i,n)},"addEdgeMarkers"),wBe={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},kBe=mt((e,t,r,i,n,a)=>{var s=wBe[r];s?e.attr("marker-"+t,`url(${i}#${n}_${a}-${s}${"start"===t?"Start":"End"})`):M.warn("Unknown arrow type: "+r)},"addEdgeMarker")});function CBe(e,t){vr(O())&&e&&(e.style.width=9*t.length+"px",e.style.height="12px")}var ABe,RBe,LBe,NBe,IBe,DBe,MBe,OBe,PBe,$Be,BBe=s(()=>{e(),_Be(),lL(),yO(),hw(),Au(),li(),hC(),zc(),SO(),fO(),SBe(),ABe={},RBe={},LBe=mt(async(t,r)=>{var i=O(),n=vr(i),a=(h=t.insert("g").attr("class","edgeLabel")).insert("g").attr("class","label"),e="markdown"===r.labelType,e=await oL(t,r.label,{style:r.labelStyle,useHtmlLabels:n,addSvgBackground:e,isNode:!1,markdown:e,width:e?void 0:Number.POSITIVE_INFINITY},i);a.node().appendChild(e);let s=e.getBBox(),o=s;n?(i=e.children[0],c=V(e),s=i.getBoundingClientRect(),o=s,c.attr("width",s.width),c.attr("height",s.height)):(i=V(e).select("text").node())&&"function"==typeof i.getBBox&&(o=i.getBBox()),a.attr("transform",uO(o,n)),ABe[r.id]=h,r.width=s.width,r.height=s.height;let l;if(r.startLabelLeft){var c=t.insert("g").attr("class","edgeTerminals"),i=c.insert("g").attr("class","inner"),a=await xBe(i,r.startLabelLeft,r.labelStyle);let e=(l=a).getBBox();n&&(h=a.children[0],a=V(a),e=h.getBoundingClientRect(),a.attr("width",e.width),a.attr("height",e.height)),i.attr("transform",uO(e,n)),RBe[r.id]||(RBe[r.id]={}),RBe[r.id].startLeft=c,CBe(l,r.startLabelLeft)}if(r.startLabelRight){a=(h=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),i=await xBe(h,r.startLabelRight,r.labelStyle),l=i,a.node().appendChild(i);let e=i.getBBox();n&&(c=i.children[0],i=V(i),e=c.getBoundingClientRect(),i.attr("width",e.width),i.attr("height",e.height)),a.attr("transform",uO(e,n)),RBe[r.id]||(RBe[r.id]={}),RBe[r.id].startRight=h,CBe(l,r.startLabelRight)}if(r.endLabelLeft){i=(c=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),a=await xBe(i,r.endLabelLeft,r.labelStyle);let e=(l=a).getBBox();n&&(h=a.children[0],u=V(a),e=h.getBoundingClientRect(),u.attr("width",e.width),u.attr("height",e.height)),i.attr("transform",uO(e,n)),c.node().appendChild(a),RBe[r.id]||(RBe[r.id]={}),RBe[r.id].endLeft=c,CBe(l,r.endLabelLeft)}if(r.endLabelRight){var h,u=(h=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),i=await xBe(u,r.endLabelRight,r.labelStyle);let e=(l=i).getBBox();n&&(a=i.children[0],c=V(i),e=a.getBoundingClientRect(),c.attr("width",e.width),c.attr("height",e.height)),u.attr("transform",uO(e,n)),h.node().appendChild(i),RBe[r.id]||(RBe[r.id]={}),RBe[r.id].endRight=h,CBe(l,r.endLabelRight)}return e},"insertEdgeLabel"),mt(CBe,"setTerminalWidth"),NBe=mt((i,n)=>{M.debug("Moving label abc88 ",i.id,i.label,ABe[i.id],n);var a,s=n.updatedPath||n.originalPath,o=O(),o=tO(o).subGraphTitleTotalMargin;if(i.label){let e=ABe[i.id],t=i.x,r=i.y;s&&(a=sC.calcLabelPosition(s),M.debug("Moving label "+i.label+" from (",t,",",r,") to (",a.x,",",a.y,") abc88"),n.updatedPath)&&(t=a.x,r=a.y),e.attr("transform",`translate(${t}, ${r+o/2})`)}if(i.startLabelLeft){let e=RBe[i.id].startLeft,t=i.x,r=i.y;s&&(n=sC.calcTerminalLabelPosition(i.arrowTypeStart?10:0,"start_left",s),t=n.x,r=n.y),e.attr("transform",`translate(${t}, ${r})`)}if(i.startLabelRight){let e=RBe[i.id].startRight,t=i.x,r=i.y;s&&(a=sC.calcTerminalLabelPosition(i.arrowTypeStart?10:0,"start_right",s),t=a.x,r=a.y),e.attr("transform",`translate(${t}, ${r})`)}if(i.endLabelLeft){let e=RBe[i.id].endLeft,t=i.x,r=i.y;s&&(o=sC.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_left",s),t=o.x,r=o.y),e.attr("transform",`translate(${t}, ${r})`)}if(i.endLabelRight){let e=RBe[i.id].endRight,t=i.x,r=i.y;s&&(n=sC.calcTerminalLabelPosition(i.arrowTypeEnd?10:0,"end_right",s),t=n.x,r=n.y),e.attr("transform",`translate(${t}, ${r})`)}},"positionEdgeLabel"),IBe=mt((e,t)=>{var r=e.x,i=e.y,r=Math.abs(t.x-r),t=Math.abs(t.y-i);return e.width/2<=r||e.height/2<=t},"outsideNode"),DBe=mt((e,i,n)=>{M.debug(`intersection calc abc89: outsidePoint: ${JSON.stringify(i)} insidePoint : ${JSON.stringify(n)} node : x:${e.x} y:${e.y} w:${e.width} h:`+e.height);let a=e.x,t=e.y,r=Math.abs(a-n.x),s=e.width/2,o=n.xMath.abs(a-i.x)*l)return e=n.y{M.debug("abc88 cutPathAtIntersect",e,i);let n=[],a=e[0],s=!1;return e.forEach(e=>{if(IBe(i,e)||s)a=e,s||n.push(e);else{let t=DBe(i,a,e),r=!1;n.forEach(e=>{r=r||e.x===t.x&&e.y===t.y}),n.some(e=>e.x===t.x&&e.y===t.y)||n.push(t),s=!0}}),n},"cutPathAtIntersect"),OBe=mt(function(e,t,r,i,n,a,s){let o=r.points,l=(M.debug("abc88 InsertEdge: edge=",r,"e=",t),!1),c=a.node(t.v),h=a.node(t.w),u=(h?.intersect&&c?.intersect&&((o=o.slice(1,r.points.length-1)).unshift(c.intersect(o[0])),o.push(h.intersect(o[o.length-1]))),r.toCluster&&(M.debug("to cluster abc88",i[r.toCluster]),o=MBe(r.points,i[r.toCluster].node),l=!0),r.fromCluster&&(M.debug("from cluster abc88",i[r.fromCluster]),o=MBe(o.reverse(),i[r.fromCluster].node).reverse(),l=!0),o.filter(e=>!Number.isNaN(e.y))),d=k3,{x:p,y:g}=(!r.curve||"graph"!==n&&"flowchart"!==n||(d=r.curve),wO(r)),f=o3().x(p).y(g).curve(d),m;switch(r.thickness){case"normal":m="edge-thickness-normal";break;case"thick":case"invisible":m="edge-thickness-thick";break;default:m=""}switch(r.pattern){case"solid":m+=" edge-pattern-solid";break;case"dotted":m+=" edge-pattern-dotted";break;case"dashed":m+=" edge-pattern-dashed"}let y=e.append("path").attr("d",f(u)).attr("id",r.id).attr("class"," "+m+(r.classes?" "+r.classes:"")).attr("style",r.style),v="";return(O().flowchart.arrowMarkerAbsolute||O().state.arrowMarkerAbsolute)&&(v=xc(!0)),TBe(y,r,v,s,n),a={},l&&(a.updatedPath=o),a.originalPath=r.points,a},"insertEdge")}),FBe=s(()=>{PBe=mt(e=>{var t,r=new Set;for(t of e)switch(t){case"x":r.add("right"),r.add("left");break;case"y":r.add("up"),r.add("down");break;default:r.add(t)}return r},"expandAndDeduplicateDirections"),$Be=mt((e,t,r)=>{var e=PBe(e),i=t.height+2*r.padding,n=i/2,t=t.width+2*n+r.padding,r=r.padding/2;return e.has("right")&&e.has("left")&&e.has("up")&&e.has("down")?[{x:0,y:0},{x:n,y:0},{x:t/2,y:2*r},{x:t-n,y:0},{x:t,y:0},{x:t,y:-i/3},{x:t+2*r,y:-i/2},{x:t,y:-2*i/3},{x:t,y:-i},{x:t-n,y:-i},{x:t/2,y:-i-2*r},{x:n,y:-i},{x:0,y:-i},{x:0,y:-2*i/3},{x:-2*r,y:-i/2},{x:0,y:-i/3}]:e.has("right")&&e.has("left")&&e.has("up")?[{x:n,y:0},{x:t-n,y:0},{x:t,y:-i/2},{x:t-n,y:-i},{x:n,y:-i},{x:0,y:-i/2}]:e.has("right")&&e.has("left")&&e.has("down")?[{x:0,y:0},{x:n,y:-i},{x:t-n,y:-i},{x:t,y:0}]:e.has("right")&&e.has("up")&&e.has("down")?[{x:0,y:0},{x:t,y:-n},{x:t,y:n-i},{x:0,y:-i}]:e.has("left")&&e.has("up")&&e.has("down")?[{x:t,y:0},{x:0,y:-n},{x:0,y:n-i},{x:t,y:-i}]:e.has("right")&&e.has("left")?[{x:n,y:0},{x:n,y:-r},{x:t-n,y:-r},{x:t-n,y:0},{x:t,y:-i/2},{x:t-n,y:-i},{x:t-n,y:r-i},{x:n,y:r-i},{x:n,y:-i},{x:0,y:-i/2}]:e.has("up")&&e.has("down")?[{x:t/2,y:0},{x:0,y:-r},{x:n,y:-r},{x:n,y:r-i},{x:0,y:r-i},{x:t/2,y:-i},{x:t,y:r-i},{x:t-n,y:r-i},{x:t-n,y:-r},{x:t,y:-r}]:e.has("right")&&e.has("up")?[{x:0,y:0},{x:t,y:-n},{x:0,y:-i}]:e.has("right")&&e.has("down")?[{x:0,y:0},{x:t,y:0},{x:0,y:-i}]:e.has("left")&&e.has("up")?[{x:t,y:0},{x:0,y:-n},{x:t,y:-i}]:e.has("left")&&e.has("down")?[{x:t,y:0},{x:0,y:0},{x:t,y:-i}]:e.has("right")?[{x:n,y:-r},{x:n,y:-r},{x:t-n,y:-r},{x:t-n,y:0},{x:t,y:-i/2},{x:t-n,y:-i},{x:t-n,y:r-i},{x:n,y:r-i},{x:n,y:r-i}]:e.has("left")?[{x:n,y:0},{x:n,y:-r},{x:t-n,y:-r},{x:t-n,y:r-i},{x:n,y:r-i},{x:n,y:-i},{x:0,y:-i/2}]:e.has("up")?[{x:n,y:-r},{x:n,y:r-i},{x:0,y:r-i},{x:t/2,y:-i},{x:t,y:r-i},{x:t-n,y:r-i},{x:t-n,y:-r}]:e.has("down")?[{x:t/2,y:0},{x:0,y:-r},{x:n,y:-r},{x:n,y:r-i},{x:t-n,y:r-i},{x:t-n,y:-r},{x:t,y:-r}]:[{x:0,y:0}]},"getArrowPoints")});function zBe(e,t){return e.intersect(t)}var qBe,UBe=s(()=>{mt(zBe,"intersectNode"),qBe=zBe});function GBe(e,t,r,i){var n=e.x,e=e.y,a=n-i.x,s=e-i.y,o=Math.sqrt(t*t*s*s+r*r*a*a),a=Math.abs(t*r*a/o),t=(i.x{mt(GBe,"intersectEllipse"),jBe=GBe});function YBe(e,t,r){return jBe(e,t,t,r)}var VBe,HBe=s(()=>{WBe(),mt(YBe,"intersectCircle"),VBe=YBe});function XBe(e,t,r,i){var n,a,s,o,l=t.y-e.y,c=e.x-t.x,h=t.x*e.y-e.x*t.y,u=l*r.x+c*r.y+h,d=l*i.x+c*i.y+h;if(!(0!=u&&0!=d&&0{mt(XBe,"intersectLine"),mt(KBe,"sameSign"),ZBe=XBe});function JBe(e,t,i){var r=e.x,n=e.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof t.forEach?t.forEach(function(e){s=Math.min(s,e.x),o=Math.min(o,e.y)}):(s=Math.min(s,t.x),o=Math.min(o,t.y));for(var l=r-e.width/2-s,c=n-e.height/2-o,h=0;h{QBe(),mt(eFe=JBe,"intersectPolygon")}),aFe=s(()=>{tFe=mt((e,t)=>{var r,i=e.x,n=e.y,a=t.x-i,t=t.y-n,s=e.width/2,e=e.height/2,e=Math.abs(t)*s>Math.abs(a)*e?(t<0&&(e=-e),r=0==t?0:e*a/t,e):(r=s=a<0?-s:s,0==a?0:s*t/a);return{x:i+r,y:n+e}},"intersectRect"),rFe=tFe}),sFe=s(()=>{UBe(),HBe(),WBe(),nFe(),aFe(),iFe={node:qBe,circle:VBe,ellipse:jBe,polygon:eFe,rect:rFe}});function oFe(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(e){return e.x+","+e.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}var lFe,cFe,hFe,uFe,dFe=s(()=>{_Be(),lL(),Au(),li(),hw(),zc(),hC(),hL(),lFe=mt(async(e,t,r,i)=>{var n=O(),a=t.useHtmlLabels||vr(n),s=(s=r||"node default",e.insert("g").attr("class",s).attr("id",t.domId||t.id)),o=s.insert("g").attr("class","label").attr("style",t.labelStyle),l=void 0===t.labelText?"":"string"==typeof t.labelText?t.labelText:t.labelText[0];let c,h=(c="markdown"===t.labelType?oL(o,gc(lC(l),n),{useHtmlLabels:a,width:t.width||n.flowchart.wrappingWidth,classes:"markdown-node-label"},n):await xBe(o,gc(lC(l),n),t.labelStyle,!1,i)).getBBox(),u=t.padding/2;return vr(n)&&(r=c.children[0],e=V(c),await cL(r,l),h=r.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)),a?o.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"):o.attr("transform","translate(0, "+-h.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:s,bbox:h,halfPadding:u,label:o}},"labelHelper"),cFe=mt((e,t)=>{t=t.node().getBBox(),e.width=t.width,e.height=t.height},"updateNodeBounds"),mt(oFe,"insertPolygonShape")}),pFe=s(()=>{dFe(),e(),Au(),li(),sFe(),hFe=mt(async(e,t)=>{t.useHtmlLabels||vr(O())||(t.centerLabel=!0);var{shapeSvg:e,bbox:r,halfPadding:i}=await lFe(e,t,"node "+t.classes,!0),n=(M.info("Classes = ",t.classes),e.insert("rect",":first-child"));return n.attr("rx",t.rx).attr("ry",t.ry).attr("x",-r.width/2-i).attr("y",-r.height/2-i).attr("width",r.width+t.padding).attr("height",r.height+t.padding),cFe(t,n),t.intersect=function(e){return iFe.rect(t,e)},e},"note"),uFe=hFe});function gFe(e,t,r,i){let n=[],a=mt(e=>{n.push(e,0)},"addBorder"),s=mt(e=>{n.push(0,e)},"skipBorder");(t.includes("t")?(M.debug("add top border"),a):s)(r),(t.includes("r")?(M.debug("add right border"),a):s)(i),(t.includes("b")?(M.debug("add bottom border"),a):s)(r),(t.includes("l")?(M.debug("add left border"),a):s)(i),e.attr("stroke-dasharray",n.join(" "))}var fFe,mFe,yFe,vFe,bFe,xFe,TFe,wFe,kFe,EFe,_Fe,SFe,CFe,AFe,RFe,LFe,NFe,IFe,DFe,MFe,OFe,PFe,$Fe,BFe,FFe,zFe,qFe,UFe,GFe,jFe=s(()=>{hw(),Au(),li(),e(),FBe(),_Be(),sFe(),pFe(),dFe(),fFe=mt(e=>e?" "+e:"","formatClass"),mFe=mt((e,t)=>`${t||"node default"}${fFe(e.classes)} `+fFe(e.class),"getClassesFromNode"),yFe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await lFe(e,t,mFe(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,s=n+a,o=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];return M.info("Question main (Circle)"),(e=oFe(r,s,s,o)).attr("style",t.style),cFe(t,e),t.intersect=function(e){return M.warn("Intersect called"),iFe.polygon(t,o,e)},r},"question"),vFe=mt((e,t)=>((e=e.insert("g").attr("class","node default").attr("id",t.domId||t.id)).insert("polygon",":first-child").attr("points",[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}].map(function(e){return e.x+","+e.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(e){return iFe.circle(t,14,e)},e),"choice"),bFe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await lFe(e,t,mFe(t,void 0),!0),n=i.height+t.padding,a=n/4,s=i.width+2*a+t.padding,o=[{x:a,y:0},{x:s-a,y:0},{x:s,y:-n/2},{x:s-a,y:-n},{x:a,y:-n},{x:0,y:-n/2}],l=oFe(r,s,n,o);return l.attr("style",t.style),cFe(t,l),t.intersect=function(e){return iFe.polygon(t,o,e)},r},"hexagon"),xFe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await lFe(e,t,void 0,!0),n=i.height+2*t.padding,a=n/2,s=i.width+2*a+t.padding,o=$Be(t.directions,i,t),l=oFe(r,s,n,o);return l.attr("style",t.style),cFe(t,l),t.intersect=function(e){return iFe.polygon(t,o,e)},r},"block_arrow"),TFe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await lFe(e,t,mFe(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,s=[{x:-a/2,y:0},{x:n,y:0},{x:n,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return oFe(r,n,a,s).attr("style",t.style),t.width=n+a,t.height=a,t.intersect=function(e){return iFe.polygon(t,s,e)},r},"rect_left_inv_arrow"),wFe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await lFe(e,t,mFe(t),!0),n=i.width+t.padding,a=i.height+t.padding,s=[{x:-2*a/6,y:0},{x:n-a/6,y:0},{x:n+2*a/6,y:-a},{x:a/6,y:-a}],o=oFe(r,n,a,s);return o.attr("style",t.style),cFe(t,o),t.intersect=function(e){return iFe.polygon(t,s,e)},r},"lean_right"),kFe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await lFe(e,t,mFe(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,s=[{x:2*a/6,y:0},{x:n+a/6,y:0},{x:n-2*a/6,y:-a},{x:-a/6,y:-a}],o=oFe(r,n,a,s);return o.attr("style",t.style),cFe(t,o),t.intersect=function(e){return iFe.polygon(t,s,e)},r},"lean_left"),EFe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await lFe(e,t,mFe(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,s=[{x:-2*a/6,y:0},{x:n+2*a/6,y:0},{x:n-a/6,y:-a},{x:a/6,y:-a}],o=oFe(r,n,a,s);return o.attr("style",t.style),cFe(t,o),t.intersect=function(e){return iFe.polygon(t,s,e)},r},"trapezoid"),_Fe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await lFe(e,t,mFe(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,s=[{x:a/6,y:0},{x:n-a/6,y:0},{x:n+2*a/6,y:-a},{x:-2*a/6,y:-a}],o=oFe(r,n,a,s);return o.attr("style",t.style),cFe(t,o),t.intersect=function(e){return iFe.polygon(t,s,e)},r},"inv_trapezoid"),SFe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await lFe(e,t,mFe(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,s=[{x:0,y:0},{x:n+a/2,y:0},{x:n,y:-a/2},{x:n+a/2,y:-a},{x:0,y:-a}],o=oFe(r,n,a,s);return o.attr("style",t.style),cFe(t,o),t.intersect=function(e){return iFe.polygon(t,s,e)},r},"rect_right_inv_arrow"),CFe=mt(async(e,n)=>{let{shapeSvg:t,bbox:r}=await lFe(e,n,mFe(n,void 0),!0),i=r.width+n.padding,a=i/2,s=a/(2.5+i/50),o=r.height+s+n.padding,l="M 0,"+s+" a "+a+","+s+" 0,0,0 "+i+" 0 a "+a+","+s+" 0,0,0 "+-i+" 0 l 0,"+o+" a "+a+","+s+" 0,0,0 "+i+" 0 l 0,"+-o,c=t.attr("label-offset-y",s).insert("path",":first-child").attr("style",n.style).attr("d",l).attr("transform","translate("+-i/2+","+-(o/2+s)+")");return cFe(n,c),n.intersect=function(t){var r=iFe.rect(n,t),i=r.x-n.x;if(0!=a&&(Math.abs(i)n.height/2-s)){let e=s*s*(1-i*i/(a*a));0!=e&&(e=Math.sqrt(e)),e=s-e,0{var{shapeSvg:e,bbox:r,halfPadding:i}=await lFe(e,t,"node "+t.classes+" "+t.class,!0),n=e.insert("rect",":first-child"),a=t.positioned?t.width:r.width+t.padding,s=t.positioned?t.height:r.height+t.padding,o=t.positioned?-a/2:-r.width/2-i,r=t.positioned?-s/2:-r.height/2-i;return n.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",o).attr("y",r).attr("width",a).attr("height",s),t.props&&(i=new Set(Object.keys(t.props)),t.props.borders&&(gFe(n,t.props.borders,a,s),i.delete("borders")),i.forEach(e=>{M.warn("Unknown node property "+e)})),cFe(t,n),t.intersect=function(e){return iFe.rect(t,e)},e},"rect"),RFe=mt(async(e,t)=>{var{shapeSvg:e,bbox:r,halfPadding:i}=await lFe(e,t,"node "+t.classes,!0),n=e.insert("rect",":first-child"),a=t.positioned?t.width:r.width+t.padding,s=t.positioned?t.height:r.height+t.padding,o=t.positioned?-a/2:-r.width/2-i,r=t.positioned?-s/2:-r.height/2-i;return n.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",o).attr("y",r).attr("width",a).attr("height",s),t.props&&(i=new Set(Object.keys(t.props)),t.props.borders&&(gFe(n,t.props.borders,a,s),i.delete("borders")),i.forEach(e=>{M.warn("Unknown node property "+e)})),cFe(t,n),t.intersect=function(e){return iFe.rect(t,e)},e},"composite"),LFe=mt(async(e,t)=>{var r,e=(await lFe(e,t,"label",!0)).shapeSvg,i=(M.trace("Classes = ",t.class),e.insert("rect",":first-child"));return i.attr("width",0).attr("height",0),e.attr("class","label edgeLabel"),t.props&&(r=new Set(Object.keys(t.props)),t.props.borders&&(gFe(i,t.props.borders,0,0),r.delete("borders")),r.forEach(e=>{M.warn("Unknown node property "+e)})),cFe(t,i),t.intersect=function(e){return iFe.rect(t,e)},e},"labelRect"),mt(gFe,"applyNodePropertyBorders"),NFe=mt(async(e,t)=>{let r,i=(r=t.classes?"node "+t.classes:"node default",e.insert("g").attr("class",r).attr("id",t.domId||t.id)),n=i.insert("rect",":first-child"),a=i.insert("line"),s=i.insert("g").attr("class","label"),o=t.labelText.flat?t.labelText.flat():t.labelText,l,c=(l="object"==typeof o?o[0]:o,M.info("Label text abc79",l,o,"object"==typeof o),await xBe(s,l,t.labelStyle,!0,!0)),h={width:0,height:0};vr(O())&&(e=c.children[0],d=V(c),h=e.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)),M.info("Text 2",o);var u,e=o.slice(1,o.length),d=c.getBBox(),e=await xBe(s,e.join?e.join("
"):e,t.labelStyle,!0,!0),p=(vr(O())&&(p=e.children[0],u=V(e),h=p.getBoundingClientRect(),u.attr("width",h.width),u.attr("height",h.height)),t.padding/2);return V(e).attr("transform","translate( "+(h.width>d.width?0:(d.width-h.width)/2)+", "+(d.height+p+5)+")"),V(c).attr("transform","translate( "+(h.width{var{shapeSvg:e,bbox:r}=await lFe(e,t,mFe(t,void 0),!0),i=r.height+t.padding,r=r.width+i/4+t.padding,r=e.insert("rect",":first-child").attr("style",t.style).attr("rx",i/2).attr("ry",i/2).attr("x",-r/2).attr("y",-i/2).attr("width",r).attr("height",i);return cFe(t,r),t.intersect=function(e){return iFe.rect(t,e)},e},"stadium"),DFe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i,halfPadding:n}=await lFe(e,t,mFe(t,void 0),!0),a=r.insert("circle",":first-child");return a.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+n).attr("width",i.width+t.padding).attr("height",i.height+t.padding),M.info("Circle main"),cFe(t,a),t.intersect=function(e){return M.info("Circle intersect",t,i.width/2+n,e),iFe.circle(t,i.width/2+n,e)},r},"circle"),MFe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i,halfPadding:n}=await lFe(e,t,mFe(t,void 0),!0),a=r.insert("g",":first-child"),s=a.insert("circle"),o=a.insert("circle");return a.attr("class",t.class),s.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+n+5).attr("width",i.width+t.padding+10).attr("height",i.height+t.padding+10),o.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+n).attr("width",i.width+t.padding).attr("height",i.height+t.padding),M.info("DoubleCircle main"),cFe(t,s),t.intersect=function(e){return M.info("DoubleCircle intersect",t,i.width/2+n+5,e),iFe.circle(t,i.width/2+n+5,e)},r},"doublecircle"),OFe=mt(async(e,t)=>{let{shapeSvg:r,bbox:i}=await lFe(e,t,mFe(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,s=[{x:0,y:0},{x:n,y:0},{x:n,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],o=oFe(r,n,a,s);return o.attr("style",t.style),cFe(t,o),t.intersect=function(e){return iFe.polygon(t,s,e)},r},"subroutine"),PFe=mt((e,t)=>{var r=(e=e.insert("g").attr("class","node default").attr("id",t.domId||t.id)).insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),cFe(t,r),t.intersect=function(e){return iFe.circle(t,7,e)},e},"start"),$Fe=mt((e,t,r)=>{let i=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=70,a=10;return"LR"===r&&(n=10,a=70),e=i.append("rect").attr("x",-1*n/2).attr("y",-1*a/2).attr("width",n).attr("height",a).attr("class","fork-join"),cFe(t,e),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(e){return iFe.rect(t,e)},i},"forkJoin"),BFe=mt((e,t)=>{var r=(e=e.insert("g").attr("class","node default").attr("id",t.domId||t.id)).insert("circle",":first-child"),i=e.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),r.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),cFe(t,i),t.intersect=function(e){return iFe.circle(t,7,e)},e},"end"),FFe=mt(async(e,s)=>{let t=s.padding/2,r,i=(r=s.classes?"node "+s.classes:"node default",e.insert("g").attr("class",r).attr("id",s.domId||s.id)),n=i.insert("rect",":first-child"),a=i.insert("line"),o=i.insert("line"),l=0,c=4,h=i.insert("g").attr("class","label"),u=0,d=s.classData.annotations?.[0],p=s.classData.annotations[0]?"«"+s.classData.annotations[0]+"»":"",g=await xBe(h,p,s.labelStyle,!0,!0),f=g.getBBox(),m=(vr(O())&&(e=g.children[0],y=V(g),f=e.getBoundingClientRect(),y.attr("width",f.width),y.attr("height",f.height)),s.classData.annotations[0]&&(c+=f.height+4,l+=f.width),s.classData.label);var y;void 0!==s.classData.type&&""!==s.classData.type&&(vr(O())?m+="<"+s.classData.type+">":m+="<"+s.classData.type+">"),V(e=await xBe(h,m,s.labelStyle,!0,!0)).attr("class","classTitle");let v=e.getBBox(),b=(vr(O())&&(y=e.children[0],T=V(e),v=y.getBoundingClientRect(),T.attr("width",v.width),T.attr("height",v.height)),c+=v.height+4,v.width>l&&(l=v.width),[]),x=(s.classData.members.forEach(async e=>{let t=e.getDisplayDetails(),r=t.displayText,i=(vr(O())&&(r=r.replace(//g,">")),await xBe(h,r,t.cssStyle||s.labelStyle,!0,!0)),n=i.getBBox(),a;vr(O())&&(e=i.children[0],a=V(i),n=e.getBoundingClientRect(),a.attr("width",n.width),a.attr("height",n.height)),n.width>l&&(l=n.width),c+=n.height+4,b.push(i)}),c+=8,[]);s.classData.methods.forEach(async e=>{let t=e.getDisplayDetails(),r=t.displayText,i=(vr(O())&&(r=r.replace(//g,">")),await xBe(h,r,t.cssStyle||s.labelStyle,!0,!0)),n=i.getBBox(),a;vr(O())&&(e=i.children[0],a=V(i),n=e.getBoundingClientRect(),a.attr("width",n.width),a.attr("height",n.height)),n.width>l&&(l=n.width),c+=n.height+4,x.push(i)}),c+=8,d&&(y=(l-f.width)/2,V(g).attr("transform","translate( "+(-1*l/2+y)+", "+-1*c/2+")"),u=f.height+4);var T=(l-v.width)/2;return V(e).attr("transform","translate( "+(-1*l/2+T)+", "+(-1*c/2+u)+")"),u+=v.height+4,a.attr("class","divider").attr("x1",-l/2-t).attr("x2",l/2+t).attr("y1",-c/2-t+8+u).attr("y2",-c/2-t+8+u),u+=8,b.forEach(e=>{V(e).attr("transform","translate( "+-l/2+", "+(-1*c/2+u+4)+")"),e=e?.getBBox(),u+=(e?.height??0)+4}),u+=8,o.attr("class","divider").attr("x1",-l/2-t).attr("x2",l/2+t).attr("y1",-c/2-t+8+u).attr("y2",-c/2-t+8+u),u+=8,x.forEach(e=>{V(e).attr("transform","translate( "+-l/2+", "+(-1*c/2+u)+")"),e=e?.getBBox(),u+=(e?.height??0)+4}),n.attr("style",s.style).attr("class","outer title-state").attr("x",-l/2-t).attr("y",-c/2-t).attr("width",l+s.padding).attr("height",c+s.padding),cFe(s,n),s.intersect=function(e){return iFe.rect(s,e)},i},"class_box"),zFe={rhombus:yFe,composite:RFe,question:yFe,rect:AFe,labelRect:LFe,rectWithTitle:NFe,choice:vFe,circle:DFe,doublecircle:MFe,stadium:IFe,hexagon:bFe,block_arrow:xFe,rect_left_inv_arrow:TFe,lean_right:wFe,lean_left:kFe,trapezoid:EFe,inv_trapezoid:_Fe,rect_right_inv_arrow:SFe,cylinder:CFe,start:PFe,end:BFe,note:uFe,subroutine:OFe,fork:$Fe,join:$Fe,class_box:FFe},qFe={},UFe=mt(async(t,r,i)=>{let n,a;if(r.link){let e;"sandbox"===O().securityLevel?e="_top":r.linkTarget&&(e=r.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",r.link).attr("target",e),a=await zFe[r.shape](n,r,i)}else a=await zFe[r.shape](t,r,i),n=a;return r.tooltip&&a.attr("title",r.tooltip),r.class&&a.attr("class","node default "+r.class),qFe[r.id]=n,r.haveCallback&&qFe[r.id].attr("class",qFe[r.id].attr("class")+" clickable"),n},"insertNode"),GFe=mt(e=>{var t=qFe[e.id],r=(M.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")"),e.diff||0);return e.clusterNode?t.attr("transform","translate("+(e.x+r-e.width/2)+", "+(e.y-e.height/2-8)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),r},"positionNode")});function WFe(e,t,r=!1){let i=e,n="default",a=(0<(i?.classes?.length||0)&&(n=(i?.classes??[]).join(" ")),n+=" flowchart-label",0),s="",o;switch(i.type){case"round":a=5,s="rect";break;case"composite":a=0,s="composite",o=0;break;case"square":s="rect";break;case"diamond":s="question";break;case"hexagon":s="hexagon";break;case"block_arrow":s="block_arrow";break;case"odd":s="rect_left_inv_arrow";break;case"lean_right":s="lean_right";break;case"lean_left":s="lean_left";break;case"trapezoid":s="trapezoid";break;case"inv_trapezoid":s="inv_trapezoid";break;case"rect_left_inv_arrow":s="rect_left_inv_arrow";break;case"circle":s="circle";break;case"ellipse":s="ellipse";break;case"stadium":s="stadium";break;case"subroutine":s="subroutine";break;case"cylinder":s="cylinder";break;case"group":s="rect";break;case"doublecircle":s="doublecircle";break;default:s="rect"}var e=C7(i?.styles??[]),l=i.size??{width:0,height:0,x:0,y:0};return{labelStyle:e.labelStyle,shape:s,labelText:i.label,rx:a,ry:a,class:n,style:e.style,id:i.id,directions:i.directions,width:l.width,height:l.height,x:l.x,y:l.y,positioned:r,intersect:void 0,type:i.type,padding:o??cr()?.block?.padding??0}}async function YFe(e,t,r){var i;"group"!==(t=WFe(t,0,!1)).type&&(i=cr(),i=(e=await UFe(e,t,{config:i})).node().getBBox(),(t=r.getBlock(t.id)).size={width:i.width,height:i.height,x:0,y:0,node:e},r.setBlock(t),e.remove())}async function VFe(e,t,r){var i=WFe(t,0,!0);"space"!==r.getBlock(i.id).type&&(r=cr(),await UFe(e,i,{config:r}),t.intersect=i?.intersect,GFe(i))}async function HFe(e,t,r,i){for(var n of t)await i(e,n,r),n.children&&await HFe(e,n.children,r,i)}async function XFe(e,t,r){await HFe(e,t,r,YFe)}async function KFe(e,t,r){await HFe(e,t,r,VFe)}async function ZFe(e,t,r,i,n){var a,s,o,l,c=new gV({multigraph:!0,compound:!0});c.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(a of r)a.size&&c.setNode(a.id,{width:a.size.width,height:a.size.height,intersect:a.intersect});for(s of t)s.start&&s.end&&(l=i.getBlock(s.start),o=i.getBlock(s.end),l?.size)&&o?.size&&(l=l.size,o=o.size,l=[{x:l.x,y:l.y},{x:l.x+(o.x-l.x)/2,y:l.y+(o.y-l.y)/2},{x:o.x,y:o.y}],OBe(e,{v:s.start,w:s.end,name:s.id},{...s,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",c,n),s.label)&&(await LBe(e,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),NBe({...s,x:l[1].x,y:l[1].y},{originalPath:l}))}var QFe,JFe,eze,tze=s(()=>{mV(),li(),BBe(),jFe(),hC(),mt(WFe,"getNodeFromBlock"),mt(YFe,"calculateBlockSize"),mt(VFe,"insertBlockPositioned"),mt(HFe,"performOperations"),mt(XFe,"calculateBlockSizes"),mt(KFe,"insertBlocks"),mt(ZFe,"insertEdges")}),rze=s(()=>{hw(),li(),uBe(),e(),ph(),EBe(),tze(),QFe=mt(function(e,t){return t.db.getClasses()},"getClasses"),JFe=mt(async function(e,t,r,i){let{securityLevel:n,block:a}=cr(),s=i.db,o;"sandbox"===n&&(o=V("#i"+t));var l=V("sandbox"===n?o.nodes()[0].contentDocument.body:"body"),l="sandbox"===n?l.select(`[id="${t}"]`):V(`[id="${t}"]`),i=(lBe(l,["point","circle","cross"],i.type,t),s.getBlocks()),c=s.getBlocksFlat(),h=s.getEdges(),u=l.insert("g").attr("class","block"),d=(await XFe(u,i,s),mBe(s));await KFe(u,i,s),await ZFe(u,h,c,s,t),d&&(i=d,u=Math.max(1,Math.round(i.width/i.height*.125)),h=i.height+u+10,c=i.width+10,t=a.useMaxWidth,rh(l,h,c,!!t),M.debug("Here Bounds",d,i),l.attr("viewBox",`${i.x-5} ${i.y-5} ${i.width+10} `+(i.height+10)))},"draw"),eze={draw:JFe,getClasses:QFe}}),ize={};PGe(ize,{diagram:()=>nze});var nze,aze,sze,oze,lze,cze,hze,uze,dze,pze,gze,fze,mze,yze,vze,bze,xze,Tze,wze,kze,Eze,_ze,Sze,Cze,Aze,Rze,Lze,Nze,Ize,Dze,Mze,Oze=s(()=>{b$e(),cBe(),hBe(),rze(),nze={parser:y$e,db:V$e,renderer:eze,styles:K$e}}),Pze=s(()=>{aze={L:"left",R:"right",T:"top",B:"bottom"},sze={L:mt(e=>e+`,${e/2} 0,${e} 0,0`,"L"),R:mt(e=>`0,${e/2} ${e},0 ${e},`+e,"R"),T:mt(e=>`0,0 ${e},0 ${e/2},`+e,"T"),B:mt(e=>e/2+`,0 ${e},${e} 0,`+e,"B")},oze={L:mt((e,t)=>e-t+2,"L"),R:mt((e,t)=>e-2,"R"),T:mt((e,t)=>e-t+2,"T"),B:mt((e,t)=>e-2,"B")},lze=mt(function(e){return hze(e)?"L"===e?"R":"L":"T"===e?"B":"T"},"getOppositeArchitectureDirection"),cze=mt(function(e){return"L"===e||"R"===e||"T"===e||"B"===e},"isArchitectureDirection"),hze=mt(function(e){return"L"===e||"R"===e},"isArchitectureDirectionX"),uze=mt(function(e){return"T"===e||"B"===e},"isArchitectureDirectionY"),dze=mt(function(e,t){var r=hze(e)&&uze(t),e=uze(e)&&hze(t);return r||e},"isArchitectureDirectionXY"),pze=mt(function(e){var t=e[0],e=e[1],r=hze(t)&&uze(e),t=uze(t)&&hze(e);return r||t},"isArchitecturePairXY"),gze=mt(function(e){return"LL"!==e&&"RR"!==e&&"TT"!==e&&"BB"!==e},"isValidArchitectureDirectionPair"),fze=mt(function(e,t){return gze(e=""+e+t)?e:void 0},"getArchitectureDirectionPair"),mze=mt(function([e,t],r){var i=r[0],r=r[1];return hze(i)?uze(r)?[e+("L"===i?-1:1),t+("T"===r?1:-1)]:[e+("L"===i?-1:1),t]:hze(r)?[e+("L"===r?1:-1),t+("T"===i?1:-1)]:[e,t+("T"===i?1:-1)]},"shiftPositionByArchitectureDirectionPair"),yze=mt(function(e){return"LT"===e||"TL"===e?[1,1]:"BL"===e||"LB"===e?[1,-1]:"BR"===e||"RB"===e?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),vze=mt(function(e,t){return dze(e,t)?"bend":hze(e)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),bze=mt(function(e){return"service"===e.type},"isArchitectureService"),xze=mt(function(e){return"junction"===e.type},"isArchitectureJunction"),Tze=mt(e=>e.data(),"edgeData"),wze=mt(e=>e.data(),"nodeData")}),$ze=s(()=>{li(),si(),hC(),Cu(),Pze(),kze=Ht.architecture,Eze=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.setAccTitle=Th,this.getAccTitle=wh,this.setDiagramTitle=_h,this.getDiagramTitle=Sh,this.getAccDescription=Eh,this.setAccDescription=kh,this.clear()}static{mt(this,"ArchitectureDB")}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},xh()}addService({id:e,icon:t,in:r,title:i,iconText:n}){if(void 0!==this.registeredIds[e])throw new Error(`The service id [${e}] is already in use by another `+this.registeredIds[e]);if(void 0!==r){if(e===r)throw new Error(`The service [${e}] cannot be placed within itself`);if(void 0===this.registeredIds[r])throw new Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if("node"===this.registeredIds[r])throw new Error(`The service [${e}]'s parent is not a group`)}this.registeredIds[e]="node",this.nodes[e]={id:e,type:"service",icon:t,iconText:n,title:i,edges:[],in:r}}getServices(){return Object.values(this.nodes).filter(bze)}addJunction({id:e,in:t}){if(void 0!==this.registeredIds[e])throw new Error(`The junction id [${e}] is already in use by another `+this.registeredIds[e]);if(void 0!==t){if(e===t)throw new Error(`The junction [${e}] cannot be placed within itself`);if(void 0===this.registeredIds[t])throw new Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);if("node"===this.registeredIds[t])throw new Error(`The junction [${e}]'s parent is not a group`)}this.registeredIds[e]="node",this.nodes[e]={id:e,type:"junction",edges:[],in:t}}getJunctions(){return Object.values(this.nodes).filter(xze)}getNodes(){return Object.values(this.nodes)}getNode(e){return this.nodes[e]??null}addGroup({id:e,icon:t,in:r,title:i}){if(void 0!==this.registeredIds?.[e])throw new Error(`The group id [${e}] is already in use by another `+this.registeredIds[e]);if(void 0!==r){if(e===r)throw new Error(`The group [${e}] cannot be placed within itself`);if(void 0===this.registeredIds?.[r])throw new Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if("node"===this.registeredIds?.[r])throw new Error(`The group [${e}]'s parent is not a group`)}this.registeredIds[e]="group",this.groups[e]={id:e,icon:t,title:i,in:r}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:e,rhsId:t,lhsDir:r,rhsDir:i,lhsInto:n,rhsInto:a,lhsGroup:s,rhsGroup:o,title:l}){if(!cze(r))throw new Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got `+String(r));if(!cze(i))throw new Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got `+String(i));if(void 0===this.nodes[e]&&void 0===this.groups[e])throw new Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(void 0===this.nodes[t]&&void 0===this.groups[t])throw new Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);var c=this.nodes[e].in,h=this.nodes[t].in;if(s&&c&&h&&c==h)throw new Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(o&&c&&h&&c==h)throw new Error(`The right-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);this.edges.push({lhsId:e,lhsDir:r,lhsInto:n,lhsGroup:s,rhsId:t,rhsDir:i,rhsInto:a,rhsGroup:o,title:l}),this.nodes[e]&&this.nodes[t]&&(this.nodes[e].edges.push(this.edges[this.edges.length-1]),this.nodes[t].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(void 0===this.dataStructures){let s={},o=Object.entries(this.nodes).reduce((e,[a,t])=>(e[a]=t.edges.reduce((e,t)=>{var r,i=this.getNode(t.lhsId)?.in,n=this.getNode(t.rhsId)?.in;return i&&n&&i!==n&&"bend"!==(r=vze(t.lhsDir,t.rhsDir))&&(s[i]??={},s[i][n]=r,s[n]??={},s[n][i]=r),t.lhsId===a?(n=fze(t.lhsDir,t.rhsDir))&&(e[n]=t.rhsId):(i=fze(t.rhsDir,t.lhsDir))&&(e[i]=t.lhsId),e},{}),e),{}),r=Object.keys(o)[0],l={[r]:1},c=Object.keys(o).reduce((e,t)=>t===r?e:{...e,[t]:1},{}),e=mt(e=>{let n={[e]:[0,0]},a=[e];for(;0{l[t]||(n[t]=mze([r,i],e),a.push(t))})}}return n},"BFS"),t=[e(r)];for(;0{VEe(),e(),ZEe(),$ze(),_ze=mt((e,t)=>{HEe(e,t),e.groups.map(e=>t.addGroup(e)),e.services.map(e=>t.addService({...e,type:"service"})),e.junctions.map(e=>t.addJunction({...e,type:"junction"})),e.edges.map(e=>t.addEdge(e))},"populateDb"),Sze={parser:{yy:void 0},parse:mt(async e=>{var e=await GEe("architecture",e),t=(M.debug(e),Sze.parser?.yy);if(!(t instanceof Eze))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");_ze(e,t)},"parse")}}),Fze=s(()=>{Cze=mt(e=>` .edge { stroke-width: ${e.archEdgeWidth}; stroke: ${e.archEdgeColor}; fill: none; } .arrow { fill: ${e.archEdgeArrowColor}; } .node-bkg { fill: none; stroke: ${e.archGroupBorderColor}; stroke-width: ${e.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"),Aze=Cze}),zze=NGe((r,i)=>{mt(function(e,t){"object"==typeof r&&"object"==typeof i?i.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof r?r.layoutBase=t():e.layoutBase=t()},"webpackUniversalModuleDefinition")(r,function(){return r=[function(e,t,r){function i(){}mt(i,"LayoutConstants"),i.QUALITY=1,i.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,i.DEFAULT_INCREMENTAL=!1,i.DEFAULT_ANIMATION_ON_LAYOUT=!0,i.DEFAULT_ANIMATION_DURING_LAYOUT=!1,i.DEFAULT_ANIMATION_PERIOD=50,i.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,i.DEFAULT_GRAPH_MARGIN=15,i.NODE_DIMENSIONS_INCLUDE_LABELS=!1,i.SIMPLE_NODE_HALF_SIZE=(i.SIMPLE_NODE_SIZE=40)/2,i.EMPTY_COMPOUND_NODE_SIZE=40,i.MIN_EDGE_LENGTH=1,i.INITIAL_WORLD_BOUNDARY=(i.WORLD_BOUNDARY=1e6)/1e3,i.WORLD_CENTER_X=1200,i.WORLD_CENTER_Y=900,e.exports=i},function(e,t,r){var i,n=r(2),a=r(8),s=r(9);function o(e,t,r){n.call(this,r),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=r,this.bendpoints=[],this.source=e,this.target=t}for(i in mt(o,"LEdge"),o.prototype=Object.create(n.prototype),n)o[i]=n[i];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(e){if(this.source===e)return this.target;if(this.target===e)return this.source;throw"Node is not incident with this edge"},o.prototype.getOtherEndInGraph=function(e,t){for(var r=this.getOtherEnd(e),i=t.getGraphManager().getRoot();;){if(r.getOwner()==t)return r;if(r.getOwner()==i)break;r=r.getOwner().getParent()}return null},o.prototype.updateLength=function(){var e=new Array(4);this.isOverlapingSourceAndTarget=a.getIntersection(this.target.getRect(),this.source.getRect(),e),this.isOverlapingSourceAndTarget||(this.lengthX=e[0]-e[2],this.lengthY=e[1]-e[3],Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.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=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=o},function(e,t,r){function i(e){this.vGraphObject=e}mt(i,"LGraphObject"),e.exports=i},function(e,t,r){var i,n=r(2),a=r(10),s=r(13),o=r(0),l=r(16),c=r(5);function h(e,t,r,i){n.call(this,i=null==r&&null==i?t:i),null!=e.graphManager&&(e=e.graphManager),this.estimatedSize=a.MIN_VALUE,this.inclusionTreeDepth=a.MAX_VALUE,this.vGraphObject=i,this.edges=[],this.graphManager=e,this.rect=null!=r&&null!=t?new s(t.x,t.y,r.width,r.height):new s}for(i in mt(h,"LNode"),h.prototype=Object.create(n.prototype),n)h[i]=n[i];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(e){this.rect.width=e},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(e){this.rect.height=e},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(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},h.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},h.prototype.setRect=function(e,t){this.rect.x=e.x,this.rect.y=e.y,this.rect.width=t.width,this.rect.height=t.height},h.prototype.setCenter=function(e,t){this.rect.x=e-this.rect.width/2,this.rect.y=t-this.rect.height/2},h.prototype.setLocation=function(e,t){this.rect.x=e,this.rect.y=t},h.prototype.moveBy=function(e,t){this.rect.x+=e,this.rect.y+=t},h.prototype.getEdgeListToNode=function(t){var r=[],i=this;return i.edges.forEach(function(e){if(e.target==t){if(e.source!=i)throw"Incorrect edge source!";r.push(e)}}),r},h.prototype.getEdgesBetween=function(t){var r=[],i=this;return i.edges.forEach(function(e){if(e.source!=i&&e.target!=i)throw"Incorrect edge source and/or target";e.target!=t&&e.source!=t||r.push(e)}),r},h.prototype.getNeighborsList=function(){var t=new Set,r=this;return r.edges.forEach(function(e){if(e.source==r)t.add(e.target);else{if(e.target!=r)throw"Incorrect incidency!";t.add(e.source)}}),t},h.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),r=0;re?(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)):"right"==this.labelPosHorizontal&&this.setWidth(e+this.labelWidth)),this.labelHeight)&&("top"==this.labelPosVertical?(this.rect.y-=this.labelHeight,this.setHeight(t+this.labelHeight)):"center"==this.labelPosVertical&&this.labelHeight>t?(this.rect.y-=(this.labelHeight-t)/2,this.setHeight(this.labelHeight)):"bottom"==this.labelPosVertical&&this.setHeight(t+this.labelHeight))},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==a.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(e){(t=this.rect.x)>o.WORLD_BOUNDARY?t=o.WORLD_BOUNDARY:t<-o.WORLD_BOUNDARY&&(t=-o.WORLD_BOUNDARY),(r=this.rect.y)>o.WORLD_BOUNDARY?r=o.WORLD_BOUNDARY:r<-o.WORLD_BOUNDARY&&(r=-o.WORLD_BOUNDARY);var t=new c(t,r),r=e.inverseTransformPoint(t);this.setLocation(r.x,r.y)},h.prototype.getLeft=function(){return this.rect.x},h.prototype.getRight=function(){return this.rect.x+this.rect.width},h.prototype.getTop=function(){return this.rect.y},h.prototype.getBottom=function(){return this.rect.y+this.rect.height},h.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},e.exports=h},function(e,t,r){var i,n=r(0);function a(){}for(i in mt(a,"FDLayoutConstants"),n)a[i]=n[i];a.MAX_ITERATIONS=2500,a.DEFAULT_EDGE_LENGTH=50,a.DEFAULT_SPRING_STRENGTH=.45,a.DEFAULT_REPULSION_STRENGTH=4500,a.DEFAULT_GRAVITY_STRENGTH=.4,a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,a.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,a.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,a.COOLING_ADAPTATION_FACTOR=.33,a.ADAPTATION_LOWER_NODE_LIMIT=1e3,a.ADAPTATION_UPPER_NODE_LIMIT=5e3,a.MAX_NODE_DISPLACEMENT=3*(a.MAX_NODE_DISPLACEMENT_INCREMENTAL=100),a.MIN_REPULSION_DIST=a.DEFAULT_EDGE_LENGTH/10,a.CONVERGENCE_CHECK_PERIOD=100,a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,a.MIN_EDGE_LENGTH=1,a.GRID_CALCULATION_CHECK_PERIOD=10,e.exports=a},function(e,t,r){function i(e,t){null==e&&null==t?(this.x=0,this.y=0):(this.x=e,this.y=t)}mt(i,"PointD"),i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.setX=function(e){this.x=e},i.prototype.setY=function(e){this.y=e},i.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},i.prototype.getCopy=function(){return new i(this.x,this.y)},i.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=i},function(e,t,r){var i,n=r(2),d=r(10),a=r(0),s=r(7),o=r(3),l=r(1),p=r(13),c=r(12),h=r(11);function u(e,t,r){n.call(this,r),this.estimatedSize=d.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=e,null!=t&&t instanceof s?this.graphManager=t:null!=t&&t instanceof Layout&&(this.graphManager=t.graphManager)}for(i in mt(u,"LGraph"),u.prototype=Object.create(n.prototype),n)u[i]=n[i];u.prototype.getNodes=function(){return this.nodes},u.prototype.getEdges=function(){return this.edges},u.prototype.getGraphManager=function(){return this.graphManager},u.prototype.getParent=function(){return this.parent},u.prototype.getLeft=function(){return this.left},u.prototype.getRight=function(){return this.right},u.prototype.getTop=function(){return this.top},u.prototype.getBottom=function(){return this.bottom},u.prototype.isConnected=function(){return this.isConnected},u.prototype.add=function(e,t,r){if(null==t&&null==r){var i=e;if(null==this.graphManager)throw"Graph has no graph mgr!";if(-1=this.nodes.length&&(r=0,n.forEach(function(e){e.owner==t&&r++}),r==this.nodes.length)&&(this.isConnected=!0)}},e.exports=u},function(e,t,r){var c,h=r(1);function i(e){c=r(6),this.layout=e,this.graphs=[],this.edges=[]}mt(i,"LGraphManager"),i.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),e=this.add(e,t);return this.setRootGraph(e),this.rootGraph},i.prototype.add=function(e,t,r,i,n){if(null==r&&null==i&&null==n){if(null==e)throw"Graph is null!";if(null==t)throw"Parent node is null!";if(-1=t.getRight()?r[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(r[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?r[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(r[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom())),Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()))),t=(a=t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()?1:a)*r[0],e=r[1]/a;r[0]p.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*p.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-p.ADAPTATION_LOWER_NODE_LIMIT)/(p.ADAPTATION_UPPER_NODE_LIMIT-p.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-p.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=p.MAX_NODE_DISPLACEMENT_INCREMENTAL):(e>p.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(p.COOLING_ADAPTATION_FACTOR,1-(e-p.ADAPTATION_LOWER_NODE_LIMIT)/(p.ADAPTATION_UPPER_NODE_LIMIT-p.ADAPTATION_LOWER_NODE_LIMIT)*(1-p.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=p.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.displacementThresholdPerNode=3*p.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},a.prototype.calcSpringForces=function(){for(var e,t=this.getAllEdges(),r=0;rthis.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement=a.length||o>=a[0].length))for(var l=0;l{for(var t=[];0{for(var t=[];0{for(var t=[];0=this.s[u+1]);){var D=this.s[u];if(this.s[u]=this.s[u+1],this.s[u+1]=D,uMath.abs(t)?(r=t/e,Math.abs(e)*Math.sqrt(1+r*r)):0!=t?(r=e/t,Math.abs(t)*Math.sqrt(1+r*r)):0},e.exports=Ae},function(e,t,r){var i,n;function a(e,t){for(var r=0;r{mt(function(e,t){"object"==typeof r&&"object"==typeof i?i.exports=t(zze()):"function"==typeof define&&define.amd?define(["layout-base"],t):"object"==typeof r?r.coseBase=t(zze()):e.coseBase=t(e.layoutBase)},"webpackUniversalModuleDefinition")(r,function(t){return i={45:(e,t,r)=>{var i={};i.layoutBase=r(551),i.CoSEConstants=r(806),i.CoSEEdge=r(767),i.CoSEGraph=r(880),i.CoSEGraphManager=r(578),i.CoSELayout=r(765),i.CoSENode=r(991),i.ConstraintHandler=r(902),e.exports=i},806:(e,t,r)=>{var i,n=r(551).FDLayoutConstants;function a(){}for(i in mt(a,"CoSEConstants"),n)a[i]=n[i];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=n.DEFAULT_EDGE_LENGTH,a.DEFAULT_COMPONENT_SEPERATION=60,a.TILE=!0,a.TILING_PADDING_VERTICAL=10,a.TILING_PADDING_HORIZONTAL=10,a.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,a.ENFORCE_CONSTRAINTS=!0,a.APPLY_LAYOUT=!0,a.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,a.TREE_REDUCTION_ON_INCREMENTAL=!0,a.PURE_INCREMENTAL=a.DEFAULT_INCREMENTAL,e.exports=a},767:(e,t,r)=>{var i,n=r(551).FDLayoutEdge;function a(e,t,r){n.call(this,e,t,r)}for(i in mt(a,"CoSEEdge"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];e.exports=a},880:(e,t,r)=>{var i,n=r(551).LGraph;function a(e,t,r){n.call(this,e,t,r)}for(i in mt(a,"CoSEGraph"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];e.exports=a},578:(e,t,r)=>{var i,n=r(551).LGraphManager;function a(e){n.call(this,e)}for(i in mt(a,"CoSEGraphManager"),a.prototype=Object.create(n.prototype),n)a[i]=n[i];e.exports=a},765:(e,t,r)=>{var i,n=r(551).FDLayout,a=r(578),s=r(880),h=r(991),o=r(767),f=r(806),l=r(902),m=r(551).FDLayoutConstants,u=r(551).LayoutConstants,d=r(551).Point,p=r(551).PointD,c=r(551).DimensionD,g=r(551).Layout,y=r(551).Integer,v=r(551).IGeometry,b=r(551).LGraph,x=r(551).Transform,T=r(551).LinkedList;function w(){n.call(this),this.toBeTiled={},this.constraints={}}for(i in mt(w,"CoSELayout"),w.prototype=Object.create(n.prototype),n)w[i]=n[i];w.prototype.newGraphManager=function(){var e=new a(this);return this.graphManager=e},w.prototype.newGraph=function(e){return new s(null,this.graphManager,e)},w.prototype.newNode=function(e){return new h(this.graphManager,e)},w.prototype.newEdge=function(e){return new o(null,null,e)},w.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.isSubLayout||(f.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=f.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=f.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=m.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=m.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=m.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=m.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},w.prototype.initSpringEmbedder=function(){n.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/m.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},w.prototype.layout=function(){return u.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},w.prototype.classicLayout=function(){var e,t,r;return this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental?f.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),t=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(e){return t.has(e)}),this.graphManager.setAllNodesToApplyGravitation(r)):0<(e=this.getFlatForest()).length?this.positionNodesRadially(e):(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),t=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(e){return t.has(e)}),this.graphManager.setAllNodesToApplyGravitation(r),this.positionNodesRandomly()),0=2*e.length/3;i--)t=Math.floor(Math.random()*(i+1)),r=e[i],e[i]=e[t],e[t]=r;return e},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(e){var t,r;e.left?(r=h.has(e.left)?h.get(e.left):e.left,t=h.has(e.right)?h.get(e.right):e.right,s.nodesInRelativeHorizontal.includes(r)||(s.nodesInRelativeHorizontal.push(r),s.nodeToRelativeConstraintMapHorizontal.set(r,[]),s.dummyToNodeForVerticalAlignment.has(r)?s.nodeToTempPositionMapHorizontal.set(r,s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(r)[0]).getCenterX()):s.nodeToTempPositionMapHorizontal.set(r,s.idToNodeMap.get(r).getCenterX())),s.nodesInRelativeHorizontal.includes(t)||(s.nodesInRelativeHorizontal.push(t),s.nodeToRelativeConstraintMapHorizontal.set(t,[]),s.dummyToNodeForVerticalAlignment.has(t)?s.nodeToTempPositionMapHorizontal.set(t,s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(t)[0]).getCenterX()):s.nodeToTempPositionMapHorizontal.set(t,s.idToNodeMap.get(t).getCenterX())),s.nodeToRelativeConstraintMapHorizontal.get(r).push({right:t,gap:e.gap}),s.nodeToRelativeConstraintMapHorizontal.get(t).push({left:r,gap:e.gap})):(t=u.has(e.top)?u.get(e.top):e.top,r=u.has(e.bottom)?u.get(e.bottom):e.bottom,s.nodesInRelativeVertical.includes(t)||(s.nodesInRelativeVertical.push(t),s.nodeToRelativeConstraintMapVertical.set(t,[]),s.dummyToNodeForHorizontalAlignment.has(t)?s.nodeToTempPositionMapVertical.set(t,s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(t)[0]).getCenterY()):s.nodeToTempPositionMapVertical.set(t,s.idToNodeMap.get(t).getCenterY())),s.nodesInRelativeVertical.includes(r)||(s.nodesInRelativeVertical.push(r),s.nodeToRelativeConstraintMapVertical.set(r,[]),s.dummyToNodeForHorizontalAlignment.has(r)?s.nodeToTempPositionMapVertical.set(r,s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(r)[0]).getCenterY()):s.nodeToTempPositionMapVertical.set(r,s.idToNodeMap.get(r).getCenterY())),s.nodeToRelativeConstraintMapVertical.get(t).push({bottom:r,gap:e.gap}),s.nodeToRelativeConstraintMapVertical.get(r).push({top:t,gap:e.gap}))})):(a=new Map,o=new Map,this.constraints.relativePlacementConstraint.forEach(function(e){var t,r;e.left?(r=h.has(e.left)?h.get(e.left):e.left,t=h.has(e.right)?h.get(e.right):e.right,a.has(r)?a.get(r).push(t):a.set(r,[t]),a.has(t)?a.get(t).push(r):a.set(t,[r])):(t=u.has(e.top)?u.get(e.top):e.top,r=u.has(e.bottom)?u.get(e.bottom):e.bottom,o.has(t)?o.get(t).push(r):o.set(t,[r]),o.has(r)?o.get(r).push(t):o.set(r,[t]))}),c=(l=mt(function(i,n){var a=[],s=[],o=new T,l=new Set,c=0;return i.forEach(function(e,t){if(!l.has(t)){for(a[c]=[],s[c]=!1,o.push(r=t),l.add(r),a[c].push(r);0!=o.length;){var r=o.shift();n.has(r)&&(s[c]=!0),i.get(r).forEach(function(e){l.has(e)||(o.push(e),l.add(e),a[c].push(e))})}c++}}),{components:a,isFixed:s}},"constructComponents"))(a,s.fixedNodesOnHorizontal),this.componentsOnHorizontal=c.components,this.fixedComponentsOnHorizontal=c.isFixed,c=l(o,s.fixedNodesOnVertical),this.componentsOnVertical=c.components,this.fixedComponentsOnVertical=c.isFixed)}},w.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(e){(e=n.idToNodeMap.get(e.nodeId)).displacementX=0,e.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var e=this.constraints.alignmentConstraint.vertical,t=0;ti&&(i=Math.floor(s.y)),a=Math.floor(s.x+f.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(u.WORLD_CENTER_X-s.x/2,u.WORLD_CENTER_Y-s.y/2))},w.radialLayout=function(e,t,r){var i=Math.max(this.maxDiagonalInTree(e),f.DEFAULT_RADIAL_SEPARATION),t=(w.branchRadialLayout(t,null,0,359,0,i),b.calculateBounds(e)),n=new x;n.setDeviceOrgX(t.getMinX()),n.setDeviceOrgY(t.getMinY()),n.setWorldOrgX(r.x),n.setWorldOrgY(r.y);for(var a=0;ae?(r.rect.x-=(r.labelWidth-e)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-e)/2):"right"==r.labelPosHorizontal&&r.setWidth(e+r.labelWidth)),r.labelHeight)&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(t+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>t?(r.rect.y-=(r.labelHeight-t)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-t)/2):"bottom"==r.labelPosVertical&&r.setHeight(t+r.labelHeight))})},w.prototype.repopulateCompounds=function(){for(var e=this.compoundOrder.length-1;0<=e;e--){var t=this.compoundOrder[e],r=t.id;this.adjustLocations(this.tiledMemberPack[r],t.rect.x,t.rect.y,t.paddingLeft,t.paddingTop,t.labelMarginLeft,t.labelMarginTop)}},w.prototype.repopulateZeroDegreeMembers=function(){var i=this,n=this.tiledZeroDegreePack;Object.keys(n).forEach(function(e){var t=i.idToDummyNode[e],r=t.paddingLeft;i.adjustLocations(n[e],t.rect.x,t.rect.y,r,t.paddingTop,t.labelMarginLeft,t.labelMarginTop)})},w.prototype.getToBeTiled=function(e){var t=e.id;if(null!=this.toBeTiled[t])return this.toBeTiled[t];if(null==(e=e.getChild()))return this.toBeTiled[t]=!1;for(var r=e.getNodes(),i=0;ih&&(h=d.rect.height)}r+=h+e.verticalPadding}},w.prototype.tileCompoundMembers=function(i,n){var a=this;this.tiledMemberPack=[],Object.keys(i).forEach(function(e){var t,r=n[e];a.tiledMemberPack[e]=a.tileNodes(i[e],r.paddingLeft+r.paddingRight),r.rect.width=a.tiledMemberPack[e].width,r.rect.height=a.tiledMemberPack[e].height,r.setCenter(a.tiledMemberPack[e].centerX,a.tiledMemberPack[e].centerY),r.labelMarginLeft=0,r.labelMarginTop=0,f.NODE_DIMENSIONS_INCLUDE_LABELS&&(e=r.rect.width,t=r.rect.height,r.labelWidth&&("left"==r.labelPosHorizontal?(r.rect.x-=r.labelWidth,r.setWidth(e+r.labelWidth),r.labelMarginLeft=r.labelWidth):"center"==r.labelPosHorizontal&&r.labelWidth>e?(r.rect.x-=(r.labelWidth-e)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-e)/2):"right"==r.labelPosHorizontal&&r.setWidth(e+r.labelWidth)),r.labelHeight)&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(t+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>t?(r.rect.y-=(r.labelHeight-t)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-t)/2):"bottom"==r.labelPosVertical&&r.setHeight(t+r.labelHeight))})},w.prototype.tileNodes=function(e,t){var r=this.tileNodesByFavoringDim(e,t,!0),e=this.tileNodesByFavoringDim(e,t,!1),t=this.getOrgRatio(r);return this.getOrgRatio(e)l&&(l=e.getWidth())}),s/a),c=o/a,c=Math.pow(i-n,2)+4*(e+n)*(c+i)*a,a=(n-i+Math.sqrt(c))/(2*(e+n));return t?(r=Math.ceil(a))==a&&r++:r=Math.floor(a),((i=r*(e+n)-n)e.rowHeight[r]&&(n=e.rowHeight[r],e.rowHeight[r]=i,n=e.rowHeight[r]-n),e.height+=n,e.rows[r].push(t)},w.prototype.getShortestRowIndex=function(e){for(var t=-1,r=Number.MAX_VALUE,i=0;ir&&(t=i,r=e.rowWidth[i]);return t},w.prototype.canAddHorizontal=function(e,t,r){var i,n,a;return e.idealRowWidth?(n=e.rows.length-1,e.rowWidth[n]+t+e.horizontalPadding<=e.idealRowWidth):(n=this.getShortestRowIndex(e))<0||(a=e.rowWidth[n])+e.horizontalPadding+t<=e.width||(i=0,e.rowHeight[n]a&&t!=r){i.splice(-1,1),e.rows[r].push(n),e.rowWidth[t]=e.rowWidth[t]-a,e.rowWidth[r]=e.rowWidth[r]+a,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var s=Number.MIN_VALUE,o=0;os&&(s=i[o].height);0{var i,n=r(551).FDLayoutNode,a=r(551).IMath;function s(e,t,r,i){n.call(this,e,t,r,i)}for(i in mt(s,"CoSENode"),s.prototype=Object.create(n.prototype),n)s[i]=n[i];s.prototype.calculateDisplacement=function(){var e=this.graphManager.getLayout();null!=this.getChild()&&this.fixedNodeWeight?(this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*a.sign(this.displacementY)),this.child&&0{function Pe(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);tX&&(X=m[T].length,K=T);X{e.exports=t}},n={},mt(r,"__webpack_require__"),r(45);function r(e){var t=n[e];return void 0===t&&(t=n[e]={exports:{}},i[e](t,t.exports,r)),t.exports}var i,n})}),Uze=NGe((r,i)=>{mt(function(e,t){"object"==typeof r&&"object"==typeof i?i.exports=t(qze()):"function"==typeof define&&define.amd?define(["cose-base"],t):"object"==typeof r?r.cytoscapeFcose=t(qze()):e.cytoscapeFcose=t(e.coseBase)},"webpackUniversalModuleDefinition")(r,function(t){return i={658:e=>{e.exports=null!=Object.assign?Object.assign.bind(Object):function(r){for(var e=arguments.length,t=Array(1{mt(_,"sliceIterator");var i=r(140).layoutBase.LinkedList;function _(e,t){var r=[],i=!0,n=!1,a=void 0;try{for(var s,o=e[Symbol.iterator]();!(i=(s=o.next()).done)&&(r.push(s.value),!t||r.length!==t);i=!0);}catch(e){n=!0,a=e}finally{try{!i&&o.return&&o.return()}finally{if(n)throw a}}return r}e.exports=r={getTopMostNodes:function(e){for(var i={},t=0;t{if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return _(e,2);throw new TypeError("Invalid attempt to destructure non-iterable instance")})(h.value),v=y[0],b=y[1],x=t.cy.getElementById(v);x&&(d=x.boundingBox(),p=n.xCoords[b]-d.w/2,g=n.xCoords[b]+d.w/2,f=n.yCoords[b]-d.h/2,m=n.yCoords[b]+d.h/2,p{var v=r(548),o=r(140).CoSELayout,b=r(140).CoSENode,x=r(140).layoutBase.PointD,T=r(140).layoutBase.DimensionD,l=r(140).layoutBase.LayoutConstants,u=r(140).layoutBase.FDLayoutConstants,w=r(140).CoSEConstants,r=mt(function(c,e){var t=c.cy,r=(n=c.eles).nodes(),i=n.edges(),d=void 0,p=void 0,g=void 0,f={},h=(c.randomize&&(d=e.nodeIndexes,p=e.xCoords,g=e.yCoords),mt(function(e){return"function"==typeof e},"isFn")),m=mt(function(e,t){return h(e)?e(t):e},"optFn"),y=v.calcParentsWithoutChildren(t,n),e=mt(function e(t,r,i,n){for(var a=r.length,s=0;s{function i(e,t){for(var r=0;r{var q=r(548),U=r(140).layoutBase.Matrix,G=r(140).layoutBase.SVD,r=mt(function(e){var n=e.cy,a=e.eles,t=a.nodes(),r=a.nodes(":parent"),s=new Map,m=new Map,o=new Map,y=[],g=[],f=[],h=[],v=[],b=[],u=[],x=[],T=void 0,w=e.piTol,i=e.samplingType,k=e.nodeSeparation,d=void 0,P=mt(function(){for(var e=0,t=!1;e{var i=r(212),r=mt(function(e){e&&e("layout","fcose",i)},"register");typeof cytoscape<"u"&&r(cytoscape),e.exports=r},140:e=>{e.exports=t}},n={},mt(r,"__webpack_require__"),r(579);function r(e){var t=n[e];return void 0===t&&(t=n[e]={exports:{}},i[e](t,t.exports,r)),t.exports}var i,n})}),Gze=s(()=>{qc(),Rze=mt(e=>`${e}`,"wrapIcon"),Lze={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:Rze('')},server:{body:Rze('')},disk:{body:Rze('')},internet:{body:Rze('')},cloud:{body:Rze('')},unknown:Dc,blank:{body:Rze("")}}}}),jze=s(()=>{Au(),lL(),qc(),zc(),Gze(),Pze(),hC(),Nze=mt(async function(T,e,w){let k=w.getConfigField("padding"),t=w.getConfigField("iconSize"),E=t/2,_=t/6,S=_/2;await Promise.all(e.edges().map(async e=>{let{source:t,sourceDir:r,sourceArrow:i,sourceGroup:n,target:a,targetDir:s,targetArrow:o,targetGroup:l,label:c}=Tze(e),{x:h,y:u}=e[0].sourceEndpoint(),{x:d,y:p}=e[0].midpoint(),{x:g,y:f}=e[0].targetEndpoint(),m=k+4;var y,v,b,x;n&&(hze(r)?h+="L"===r?-m:m:u+="T"===r?-m:m+18),l&&(hze(s)?g+="L"===s?-m:m:f+="T"===s?-m:m+18),n||"junction"!==w.getNode(t)?.type||(hze(r)?h+="L"===r?E:-E:u+="T"===r?E:-E),l||"junction"!==w.getNode(a)?.type||(hze(s)?g+="L"===s?E:-E:f+="T"===s?E:-E),e[0]._private.rscratch&&((e=T.insert("g")).insert("path").attr("d",`M ${h},${u} L ${d},${p} L${g},${f} `).attr("class","edge").attr("id",cC(t,a,{prefix:"L"})),i&&(x=hze(r)?oze[r](h,_):h-S,y=uze(r)?oze[r](u,_):u-S,e.insert("polygon").attr("points",sze[r](_)).attr("transform",`translate(${x},${y})`).attr("class","arrow")),o&&(x=hze(s)?oze[s](g,_):g-S,y=uze(s)?oze[s](f,_):f-S,e.insert("polygon").attr("points",sze[s](_)).attr("transform",`translate(${x},${y})`).attr("class","arrow")),c)&&(v=0,v="X"==(b=dze(r,s)?"XY":hze(r)?"X":"Y")?Math.abs(h-g):"Y"==b?Math.abs(u-f)/1.5:Math.abs(h-g)/2,x=e.append("g"),await oL(x,c,{useHtmlLabels:!1,width:v,classes:"architecture-service-label"},O()),x.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),"X"==b?x.attr("transform","translate("+d+", "+p+")"):"Y"==b?x.attr("transform","translate("+d+", "+p+") rotate(-90)"):"XY"==b&&(y=fze(r,s))&&pze(y)&&(e=x.node().getBoundingClientRect(),[y,v]=yze(y),x.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*y*v*45})`),b=x.node().getBoundingClientRect(),x.attr("transform",` translate(${d}, ${p-e.height/2}) translate(${y*b.width/2}, ${v*b.height/2}) rotate(${-1*y*v*45}, 0, ${e.height/2}) `)))}))},"drawEdges"),Ize=mt(async function(c,e,h){let u=.75*h.getConfigField("padding"),d=h.getConfigField("fontSize"),p=h.getConfigField("iconSize")/2;await Promise.all(e.nodes().map(async i=>{var n=wze(i);if("group"===n.type){var{h:i,w:a,x1:s,y1:o}=i.boundingBox(),l=c.append("rect");l.attr("id","group-"+n.id).attr("x",s+p).attr("y",o+p).attr("width",a).attr("height",i).attr("class","node-bkg");let e=c.append("g"),t=s,r=o;n.icon&&((i=e.append("g")).html(`${await Fc(n.icon,{height:u,width:u,fallbackPrefix:Lze.prefix})}`),i.attr("transform","translate("+(t+p+1)+", "+(r+p+1)+")"),t+=u,r+=d/2-1-2),n.label&&(s=e.append("g"),await oL(s,n.label,{useHtmlLabels:!1,width:a,classes:"architecture-service-label"},O()),s.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),s.attr("transform","translate("+(t+p+4)+", "+(r+p+2)+")")),h.setElementForId(n.id,l)}}))},"drawGroups"),Dze=mt(async function(e,t,r){var i,n=O();for(i of r){var a=t.append("g"),s=e.getConfigField("iconSize"),o=(i.title&&(o=a.append("g"),await oL(o,i.title,{useHtmlLabels:!1,width:1.5*s,classes:"architecture-service-label"},n),o.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),o.attr("transform","translate("+s/2+", "+s+")")),a.append("g")),{width:l,height:c}=(i.icon?o.html(`${await Fc(i.icon,{height:s,width:s,fallbackPrefix:Lze.prefix})}`):i.iconText?(o.html(`${await Fc("blank",{height:s,width:s,fallbackPrefix:Lze.prefix})}`),l=o.append("g").append("foreignObject").attr("width",s).attr("height",s).append("div").attr("class","node-icon-text").attr("style",`height: ${s}px;`).append("div").html(gc(i.iconText,n)),c=parseInt(window.getComputedStyle(l.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16,l.attr("style",`-webkit-line-clamp: ${Math.floor((s-2)/c)};`)):o.append("path").attr("class","node-bkg").attr("id","node-"+i.id).attr("d",`M0,${s} V5 Q0,0 5,0 H${s-5} Q${s},0 ${s},5 V${s} Z`),a.attr("id","service-"+i.id).attr("class","architecture-service"),a.node().getBBox());i.width=l,i.height=c,e.setElementForId(i.id,a)}return 0},"drawServices"),Mze=mt(function(n,a,e){e.forEach(e=>{var t=a.append("g"),r=n.getConfigField("iconSize"),{width:r,height:i}=(t.append("g").append("rect").attr("id","node-"+e.id).attr("fill-opacity","0").attr("width",r).attr("height",r),t.attr("class","architecture-junction"),t._groups[0][0].getBBox());t.width=r,t.height=i,n.setElementForId(e.id,t)})},"drawJunctions")});function Wze(e,t,r){e.forEach(e=>{t.add({group:"nodes",data:{type:"service",id:e.id,icon:e.icon,label:e.title,parent:e.in,width:r.getConfigField("iconSize"),height:r.getConfigField("iconSize")},classes:"node-service"})})}function Yze(e,t,r){e.forEach(e=>{t.add({group:"nodes",data:{type:"junction",id:e.id,parent:e.in,width:r.getConfigField("iconSize"),height:r.getConfigField("iconSize")},classes:"node-junction"})})}function Vze(r,e){e.nodes().map(e=>{var t=wze(e);"group"!==t.type&&(t.x=e.position().x,t.y=e.position().y,r.getElementById(t.id).attr("transform","translate("+(t.x||0)+","+(t.y||0)+")"))})}function Hze(e,t){e.forEach(e=>{t.add({group:"nodes",data:{type:"group",id:e.id,icon:e.icon,label:e.title,parent:e.in},classes:"node-group"})})}function Xze(e,h){e.forEach(e=>{var{lhsId:t,rhsId:r,lhsInto:i,lhsGroup:n,rhsInto:a,lhsDir:s,rhsDir:o,rhsGroup:l,title:c}=e,e=dze(e.lhsDir,e.rhsDir)?"segments":"straight";h.add({group:"edges",data:{id:t+"-"+r,label:c,source:t,sourceDir:s,sourceArrow:i,sourceGroup:n,sourceEndpoint:"L"===s?"0 50%":"R"===s?"100% 50%":"T"===s?"50% 0":"50% 100%",target:r,targetDir:o,targetArrow:a,targetGroup:l,targetEndpoint:"L"===o?"0 50%":"R"===o?"100% 50%":"T"===o?"50% 0":"50% 100%"},classes:e})})}function Kze(s,e,u){let t=mt((e,h)=>Object.entries(e).reduce((r,[i,e])=>{let n=0,a=Object.entries(e);if(1===a.length)r[i]=a[0][1];else for(let t=0;t{let n={},a={};return Object.entries(e).forEach(([e,[t,r]])=>{var i=s.getNode(e)?.in??"default";n[r]??={},n[r][i]??=[],n[r][i].push(e),a[t]??={},a[t][i]??=[],a[t][i].push(e)}),{horiz:Object.values(t(n,"horizontal")).filter(e=>11[[...e,...r],[...t,...i]],[[],[]]);return{horizontal:i,vertical:n}}function Zze(e,l){let c=[],h=mt(e=>e[0]+","+e[1],"posToStr"),u=mt(e=>e.split(",").map(e=>parseInt(e)),"strToPos");return e.forEach(e=>{let a=Object.fromEntries(Object.entries(e).map(([e,t])=>[h(t),e])),s=[h([0,0])],o={},t={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;0{var t=h([i[0]+t[0],i[1]+t[1]]),r=a[t];r&&!o[t]&&(s.push(t),c.push({[aze[e]]:r,[aze[lze(e)]]:n,gap:1.5*l.getConfigField("iconSize")}))})}}}}),c}function Qze(n,a,l,c,h,{spatialMaps:u,groupAlignments:d}){return new Promise(t=>{let e=V("body").append("div").attr("id","cy").attr("style","display:none"),s=_he({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":h.getConfigField("fontSize")+"px"}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:h.getConfigField("padding")+"px"}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}}),r=(e.remove(),Hze(l,s),Wze(n,s,h),Yze(a,s,h),Xze(c,s),Kze(h,u,d)),i=Zze(u,h),o=s.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(e){var[e,t]=e.connectedNodes();return(e=wze(e).parent)===wze(t).parent?1.5*h.getConfigField("iconSize"):.5*h.getConfigField("iconSize")},edgeElasticity(e){var[e,t]=e.connectedNodes();return(e=wze(e).parent)===wze(t).parent?.45:.001},alignmentConstraint:r,relativePlacementConstraint:i});o.one("layoutstop",()=>{function e(e,t,r,i){var{x:e,y:n}=e,{x:t,y:a}=t,s=(i-n+(e-r)*(n-a)/(e-t))/Math.sqrt(1+Math.pow((n-a)/(e-t),2)),o=Math.sqrt(Math.pow(i-n,2)+Math.pow(r-e,2)-Math.pow(s,2));o/=Math.sqrt(Math.pow(t-e,2)+Math.pow(a-n,2));let l=(t-e)*(i-n)-(a-n)*(r-e);switch(!0){case 0<=l:l=1;break;case l<0:l=-1}let c=(t-e)*(r-e)+(a-n)*(i-n);switch(!0){case 0<=c:c=1;break;case c<0:c=-1}return{distances:Math.abs(s)*l,weights:o*=c}}mt(e,"getSegmentWeights"),s.startBatch();for(var t of Object.values(s.edges())){var r,i,n,a;t.data?.()&&({x:n,y:i}=t.source().position(),{x:a,y:r}=t.target().position(),n!==a)&&i!==r&&(n=t.sourceEndpoint(),a=t.targetEndpoint(),i=Tze(t).sourceDir,[r,i]=uze(i)?[n.x,a.y]:[a.x,n.y],{weights:n,distances:a}=e(n,a,r,i),t.style("segment-distances",a),t.style("segment-weights",n))}s.endBatch(),o.run()}),o.run(),s.ready(e=>{M.info("Ready",e),t(s)})})}var Jze,eqe,tqe=s(()=>{She(),Jze=G(Uze(),1),hw(),e(),qc(),pCe(),ph(),Gze(),Pze(),jze(),Pc([{name:Lze.prefix,icons:Lze}]),_he.use(Jze.default),mt(Wze,"addServices"),mt(Yze,"addJunctions"),mt(Vze,"positionNodes"),mt(Hze,"addGroups"),mt(Xze,"addEdges"),mt(Kze,"getAlignments"),mt(Zze,"getRelativeConstraints"),mt(Qze,"layoutArchitecture"),Jze=mt(async(e,t,r,i)=>{var n=(i=i.db).getServices(),a=i.getJunctions(),s=i.getGroups(),o=i.getEdges(),l=i.getDataStructures(),c=(t=oCe(t)).append("g"),h=(c.attr("class","architecture-edges"),(u=t.append("g")).attr("class","architecture-services"),t.append("g")),u=(h.attr("class","architecture-groups"),await Dze(i,u,n),Mze(i,u,a),await Qze(n,a,s,o,i,l));await Nze(c,u,i),await Ize(h,u,i),Vze(i,u),ih(void 0,t,i.getConfigField("padding"),i.getConfigField("useMaxWidth"))},"draw"),eqe={draw:Jze}}),rqe={};PGe(rqe,{diagram:()=>iqe});var iqe,nqe,aqe,sqe,oqe,lqe,cqe,hqe,uqe,dqe,pqe,gqe,fqe,mqe,yqe,vqe,bqe,xqe,Tqe,wqe,kqe,Eqe,_qe=s(()=>{Bze(),$ze(),Fze(),tqe(),iqe={parser:Sze,get db(){return new Eze},renderer:eqe,styles:Aze}}),Sqe=s(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[1,4],i=[1,14],n=[1,12],a=[1,13],s=[6,7,8],o=[1,20],l=[1,18],c=[1,19],h=[6,7,11],u=[1,6,13,14],d=[1,23],p=[1,24],g=[1,6,7,11,13,14],r={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},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,1],[12,1],[12,1]],performAction:mt(function(e,t,r,i,n,a,s){var o=a.length-1;switch(n){case 6:case 7:return i;case 15:i.addNode(a[o-1].length,a[o].trim());break;case 16:i.addNode(0,a[o].trim())}},"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:i,7:[1,10],9:9,12:11,13:n,14:a},t(s,[2,3]),{1:[2,2]},t(s,[2,4]),t(s,[2,5]),{1:[2,6],6:i,12:15,13:n,14:a},{6:i,9:16,12:11,13:n,14:a},{6:o,7:l,10:17,11:c},t(h,[2,18],{14:[1,21]}),t(h,[2,16]),t(h,[2,17]),{6:o,7:l,10:22,11:c},{1:[2,7],6:i,12:15,13:n,14:a},t(u,[2,14],{7:d,11:p}),t(g,[2,8]),t(g,[2,9]),t(g,[2,10]),t(h,[2,15]),t(u,[2,13],{7:d,11:p}),t(g,[2,11]),t(g,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0{Au(),zc(),Cu(),sqe=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{mt(this,"IshikawaDB")}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,xh()}getRoot(){return this.root}addNode(t,r){if(r=L.sanitizeText(r,O()),this.root){let e=t-(this.baseLevel??0);for(e<=0&&(e=1);1=e;)this.stack.pop();var i={text:r,children:[]};this.stack[this.stack.length-1].node.children.push(i),this.stack.push({level:e,node:i})}else this.baseLevel=t,this.root={text:r,children:[]},this.stack=[{level:0,node:this.root}],_h(r)}getAccTitle(){return wh()}setAccTitle(e){Th(e)}getAccDescription(){return Eh()}setAccDescription(e){kh(e)}getDiagramTitle(){return Sh()}setDiagramTitle(e){_h(e)}}}),Aqe=s(()=>{Au(),pCe(),ph(),hC(),ZN(),hqe=82*Math.PI/180,oqe=Math.cos(hqe),lqe=Math.sin(hqe),cqe=mt((e,t,r)=>{var i=e.node().getBBox(),n=i.width+2*t,a=i.height+2*t;rh(e,a,n,r),e.attr("viewBox",`${i.x-t} ${i.y-t} ${n} `+a)},"applyPaddedViewBox"),hqe=mt((e,t,r,i)=>{if(i=i.db.getRoot()){var{look:h,handDrawnSeed:u,themeVariables:d}=a=O(),p=aC(a.fontSize)[0]??14,h="handDrawn"===h,g=i.children??[],n=a.ishikawa?.diagramPadding??20,a=a.ishikawa?.useMaxWidth??!1,s=oCe(t),f=s.append("g").attr("class","ishikawa"),m=(y=h?KN.svg(s.node()):void 0)?{roughSvg:y,seed:u??0,lineColor:d?.lineColor??"#333",fillColor:d?.mainBkg??"#fff"}:void 0,y="ishikawa-arrow-"+t;h||f.append("defs").append("marker").attr("id",y).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let o=0,l,c=h?void 0:Tqe(f,o,250,o,250,"ishikawa-spine");if(dqe(f,o,250,i.text,p,m),g.length){o-=20;let e=g.filter((e,t)=>t%2==0),t=g.filter((e,t)=>t%2==1),r=uqe(e),i=uqe(t),n=r.total+i.total,a=250,s=250;0Math.min(e,t.getBBox().x),1/0)}h?Tqe(f,o,l,0,l,"ishikawa-spine",m):(c.attr("x1",o),d=`url(#${y})`,f.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",d))}else h&&Tqe(f,o,250,o,250,"ishikawa-spine",m);cqe(s,n,a)}},"draw"),uqe=mt(e=>{let r=mt(e=>e.children.reduce((e,t)=>e+1+r(t),0),"countDescendants");return e.reduce((e,t)=>(t=r(t),e.total+=t,e.max=Math.max(e.max,t),e),{total:0,max:0})},"sideStats"),dqe=mt((t,e,r,i,n,a)=>{var s=Math.max(6,Math.floor(110/(.6*n))),t=t.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${e},${r})`),r=(e=bqe(t,vqe(i,s),0,0,"ishikawa-head-label","start",n)).node().getBBox(),i=Math.max(60,r.width+6),n=`M 0 ${-(s=Math.max(40,2*r.height+40))/2} L 0 ${s/2} Q ${2.4*i} 0 0 ${-s/2} Z`;if(a){let e=a.roughSvg.path(n,{roughness:1.5,seed:a.seed,fill:a.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:a.lineColor,strokeWidth:2});t.insert(()=>e,":first-child").attr("class","ishikawa-head")}else t.insert("path",":first-child").attr("class","ishikawa-head").attr("d",n);e.attr("transform",`translate(${(i-r.width)/2-r.x+3},${-r.y-r.height/2})`)},"drawHead"),pqe=mt((e,s)=>{let o=[],l=[],c=mt((e,t,r)=>{var i;for(i of-1===s?[...e].reverse():e){var n=o.length,a=i.children??[];o.push({depth:r,text:vqe(i.text,15),parentIndex:t,childCount:a.length}),r%2==0?(l.push(n),a.length&&c(a,n,r+1)):(a.length&&c(a,n,r+1),l.push(n))}},"walk");return c(e,-1,2),{entries:o,yOrder:l}},"flattenTree"),gqe=mt((t,r,e,i,n,a,s)=>{if(t=t.append("g").attr("class","ishikawa-label-group"),r=bqe(t,r,e,i+11*n,"ishikawa-label cause","middle",a).node().getBBox(),s){let e=s.roughSvg.rectangle(r.x-20,r.y-2,r.width+40,r.height+4,{roughness:1.5,seed:s.seed,fill:s.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:s.lineColor,strokeWidth:2});t.insert(()=>e,":first-child").attr("class","ishikawa-label-box")}else t.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",r.x-20).attr("y",r.y-2).attr("width",r.width+40).attr("height",r.height+4)},"drawCauseLabel"),fqe=mt((l,c,h,u,d,p)=>{var g=Math.sqrt(u*u+d*d);if(0!==g){let e=u/g,t=d/g,r=6*-t,i=6*e,n=c,a=h,s=`M ${n} ${a} L ${n-6*e*2+r} ${a-6*t*2+i} L ${n-6*e*2-r} ${a-6*t*2-i} Z`,o=p.roughSvg.path(s,{roughness:1,seed:p.seed,fill:p.lineColor,fillStyle:"solid",stroke:p.lineColor,strokeWidth:1});l.append(()=>o)}},"drawArrowMarker"),mqe=mt((s,e,t,r,i,n,o,l)=>{var a=e.children??[],n=n*(a.length?1:.2),c=lqe*n*i,h=r+c;if(Tqe(s,t,r,n=t+-oqe*n,h,"ishikawa-branch",l),l&&fqe(s,t,r,t-n,r-h,l),gqe(s,e.text,n,h,i,o,l),a.length){var u,d,{entries:e,yOrder:p}=pqe(a,i),g=e.length,f=new Array(g);for([u,d]of p.entries())f[d]=r+(u+1)/(g+1)*c;var m,y,v,b=new Map,x=(b.set(-1,{x0:t,y0:r,x1:n,y1:h,childCount:a.length,childrenDrawn:0}),-oqe),T=lqe*i,w=i<0?"ishikawa-label up":"ishikawa-label down";for([m,y]of e.entries()){let e=f[m],t=b.get(y.parentIndex),r=s.append("g").attr("class","ishikawa-sub-group"),i=0,n=0,a=0;y.depth%2==0?(v=t.y1-t.y0,i=xqe(t.x0,t.x1,v?(e-t.y0)/v:.5),n=e,a=i-(0e.split(/|\n/),"splitLines"),vqe=mt((e,t)=>{if(e.length<=t)return e;var r,i=[];for(r of e.split(/\s+/)){var n=i.length-1;0<=n&&i[n].length+1+r.length<=t?i[n]+=" "+r:i.push(r)}return i.join(` `)},"wrapText"),bqe=mt((e,t,r,i,n,a,s)=>{var o,l,t=yqe(t),c=1.05*s,h=e.append("text").attr("class",n).attr("text-anchor",a).attr("x",r).attr("y",i-(t.length-1)*c/2);for([o,l]of t.entries())h.append("tspan").attr("x",r).attr("dy",0===o?0:c).text(l);return h},"drawMultilineText"),xqe=mt((e,t,r)=>e+(t-e)*r,"lerp"),Tqe=mt((t,r,i,n,a,s,o)=>{if(!o)return t.append("line").attr("class",s).attr("x1",r).attr("y1",i).attr("x2",n).attr("y2",a);{let e=o.roughSvg.line(r,i,n,a,{roughness:1.5,seed:o.seed,stroke:o.lineColor,strokeWidth:2});t.append(()=>e).attr("class",s)}},"drawLine"),wqe={draw:hqe}}),Rqe=s(()=>{kqe=mt(e=>` .ishikawa .ishikawa-spine, .ishikawa .ishikawa-branch, .ishikawa .ishikawa-sub-branch { stroke: ${e.lineColor}; stroke-width: 2; fill: none; } .ishikawa .ishikawa-sub-branch { stroke-width: 1; } .ishikawa .ishikawa-arrow { fill: ${e.lineColor}; } .ishikawa .ishikawa-head { fill: ${e.mainBkg}; stroke: ${e.lineColor}; stroke-width: 2; } .ishikawa .ishikawa-label-box { fill: ${e.mainBkg}; stroke: ${e.lineColor}; stroke-width: 2; } .ishikawa text { font-family: ${e.fontFamily}; font-size: ${e.fontSize}; fill: ${e.textColor}; } .ishikawa .ishikawa-head-label { font-weight: 600; text-anchor: middle; dominant-baseline: middle; font-size: 14px; } .ishikawa .ishikawa-label { text-anchor: end; } .ishikawa .ishikawa-label.cause { text-anchor: middle; dominant-baseline: middle; } .ishikawa .ishikawa-label.align { text-anchor: end; dominant-baseline: middle; } .ishikawa .ishikawa-label.up { dominant-baseline: baseline; } .ishikawa .ishikawa-label.down { dominant-baseline: hanging; } `,"getStyles"),Eqe=kqe}),Lqe={};PGe(Lqe,{diagram:()=>Nqe});var Nqe,Iqe,Dqe,Mqe=s(()=>{Sqe(),Cqe(),Aqe(),Rqe(),Nqe={parser:aqe,get db(){return new sqe},renderer:wqe,styles:Eqe}}),Oqe=s(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,i){for(r=r||{},i=e.length;i--;r[e[i]]=t);return r},"o"),r=[5,8],i=[7,8,11,12,17,19,22,24],n=[1,17],a=[1,18],s=[7,8,11,12,14,15,16,17,19,20,21,22,24,27],o=[1,31],l=[1,39],c=[7,8,11,12,17,19,22,24,27],h=[1,57],u=[1,56],d=[1,58],p=[1,59],g=[1,60],f=[7,8,11,12,16,17,19,20,22,24,27,31,32,33],r={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,start:3,optNewlines:4,VENN:5,document:6,EOF:7,NEWLINE:8,line:9,statement:10,TITLE:11,SET:12,identifier:13,BRACKET_LABEL:14,COLON:15,NUMERIC:16,UNION:17,identifierList:18,TEXT:19,IDENTIFIER:20,STRING:21,INDENT_TEXT:22,indentedTextTail:23,STYLE:24,stylesOpt:25,styleField:26,COMMA:27,styleValue:28,valueTokens:29,valueToken:30,HEXCOLOR:31,RGBCOLOR:32,RGBACOLOR:33,$accept:0,$end:1},terminals_:{2:"error",5:"VENN",7:"EOF",8:"NEWLINE",11:"TITLE",12:"SET",14:"BRACKET_LABEL",15:"COLON",16:"NUMERIC",17:"UNION",19:"TEXT",20:"IDENTIFIER",21:"STRING",22:"INDENT_TEXT",24:"STYLE",27:"COMMA",31:"HEXCOLOR",32:"RGBCOLOR",33:"RGBACOLOR"},productions_:[0,[3,4],[4,0],[4,2],[6,0],[6,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,5],[10,2],[10,3],[10,4],[10,5],[10,3],[10,3],[10,3],[10,4],[10,4],[10,2],[10,3],[23,1],[23,1],[23,1],[23,2],[23,2],[25,1],[25,3],[26,3],[28,1],[28,1],[29,1],[29,2],[30,1],[30,1],[30,1],[30,1],[30,1],[18,1],[18,3],[13,1],[13,1]],performAction:mt(function(e,t,r,i,n,a,s){var o,l=a.length-1;switch(n){case 1:return a[l-1];case 2:case 3:case 4:this.$=[];break;case 5:a[l-1].push(a[l]),this.$=a[l-1];break;case 6:this.$=[];break;case 7:case 22:case 32:case 36:case 37:case 38:case 39:case 40:this.$=a[l];break;case 8:i.setDiagramTitle(a[l].substr(6)),this.$=a[l].substr(6);break;case 9:i.addSubsetData([a[l]],void 0,void 0),i.setIndentMode&&i.setIndentMode(!0);break;case 10:i.addSubsetData([a[l-1]],a[l],void 0),i.setIndentMode&&i.setIndentMode(!0);break;case 11:i.addSubsetData([a[l-2]],void 0,parseFloat(a[l])),i.setIndentMode&&i.setIndentMode(!0);break;case 12:i.addSubsetData([a[l-3]],a[l-2],parseFloat(a[l])),i.setIndentMode&&i.setIndentMode(!0);break;case 13:if(a[l].length<2)throw new Error("union requires multiple identifiers");i.validateUnionIdentifiers&&i.validateUnionIdentifiers(a[l]),i.addSubsetData(a[l],void 0,void 0),i.setIndentMode&&i.setIndentMode(!0);break;case 14:if(a[l-1].length<2)throw new Error("union requires multiple identifiers");i.validateUnionIdentifiers&&i.validateUnionIdentifiers(a[l-1]),i.addSubsetData(a[l-1],a[l],void 0),i.setIndentMode&&i.setIndentMode(!0);break;case 15:if(a[l-2].length<2)throw new Error("union requires multiple identifiers");i.validateUnionIdentifiers&&i.validateUnionIdentifiers(a[l-2]),i.addSubsetData(a[l-2],void 0,parseFloat(a[l])),i.setIndentMode&&i.setIndentMode(!0);break;case 16:if(a[l-3].length<2)throw new Error("union requires multiple identifiers");i.validateUnionIdentifiers&&i.validateUnionIdentifiers(a[l-3]),i.addSubsetData(a[l-3],a[l-2],parseFloat(a[l])),i.setIndentMode&&i.setIndentMode(!0);break;case 17:case 18:case 19:i.addTextData(a[l-1],a[l],void 0);break;case 20:case 21:i.addTextData(a[l-2],a[l-1],a[l]);break;case 23:i.addStyleData(a[l-1],a[l]);break;case 24:case 25:case 26:if(!(o=i.getCurrentSets()))throw new Error("text requires set");i.addTextData(o,a[l],void 0);break;case 27:case 28:if(!(o=i.getCurrentSets()))throw new Error("text requires set");i.addTextData(o,a[l-1],a[l]);break;case 29:case 41:this.$=[a[l]];break;case 30:case 42:this.$=[...a[l-2],a[l]];break;case 31:this.$=[a[l-2],a[l]];break;case 33:this.$=a[l].join(" ");break;case 34:this.$=[a[l]];break;case 35:a[l-1].push(a[l]),this.$=a[l-1];break;case 43:case 44:this.$=a[l]}},"anonymous"),table:[t(r,[2,2],{3:1,4:2}),{1:[3]},{5:[1,3],8:[1,4]},t(i,[2,4],{6:5}),t(r,[2,3]),{7:[1,6],8:[1,8],9:7,10:9,11:[1,10],12:[1,11],17:[1,12],19:[1,13],22:[1,14],24:[1,15]},{1:[2,1]},t(i,[2,5]),t(i,[2,6]),t(i,[2,7]),t(i,[2,8]),{13:16,20:n,21:a},{13:20,18:19,20:n,21:a},{13:20,18:21,20:n,21:a},{16:[1,25],20:[1,23],21:[1,24],23:22},{13:20,18:26,20:n,21:a},t(i,[2,9],{14:[1,27],15:[1,28]}),t(s,[2,43]),t(s,[2,44]),t(i,[2,13],{14:[1,29],15:[1,30],27:o}),t(s,[2,41]),{16:[1,34],20:[1,32],21:[1,33],27:o},t(i,[2,22]),t(i,[2,24],{14:[1,35]}),t(i,[2,25],{14:[1,36]}),t(i,[2,26]),{20:l,25:37,26:38,27:o},t(i,[2,10],{15:[1,40]}),{16:[1,41]},t(i,[2,14],{15:[1,42]}),{16:[1,43]},{13:44,20:n,21:a},t(i,[2,17],{14:[1,45]}),t(i,[2,18],{14:[1,46]}),t(i,[2,19]),t(i,[2,27]),t(i,[2,28]),t(i,[2,23],{27:[1,47]}),t(c,[2,29]),{15:[1,48]},{16:[1,49]},t(i,[2,11]),{16:[1,50]},t(i,[2,15]),t(s,[2,42]),t(i,[2,20]),t(i,[2,21]),{20:l,26:51},{16:h,20:u,21:[1,53],28:52,29:54,30:55,31:d,32:p,33:g},t(i,[2,12]),t(i,[2,16]),t(c,[2,30]),t(c,[2,31]),t(c,[2,32]),t(c,[2,33],{30:61,16:h,20:u,31:d,32:p,33:g}),t(f,[2,34]),t(f,[2,36]),t(f,[2,37]),t(f,[2,38]),t(f,[2,39]),t(f,[2,40]),t(f,[2,35])],defaultActions:{6:[2,1]},parseError:mt(function(e,t){var r;if(!t.recoverable)throw(r=new Error(e)).hash=t,r;this.trace(e)},"parseError"),parse:mt(function(e){var t,r=this,i=[0],n=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(t in this.yy)Object.prototype.hasOwnProperty.call(this.yy,t)&&(f.yy[t]=this.yy[t]);g.setInput(e,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,i=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,n[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===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:mt(function(){return this.next()||this.lex()},"lex"),begin:mt(function(e){this.conditionStack.push(e)},"begin"),popState:mt(function(){return 0{hC(),li(),Cu(),si(),$qe=[],Bqe=[],Fqe=[],zqe=new Set,Uqe=!1,Gqe=mt((e,t,r)=>{var i=Kqe(e).sort(),r=r??10/Math.pow(e.length,2);1===(qqe=i).length&&zqe.add(i[0]),$qe.push({sets:i,size:r,label:t?Wqe(t):void 0})},"addSubsetData"),jqe=mt(()=>$qe,"getSubsetData"),Wqe=mt(e=>2<=(e=e.trim()).length&&e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e,"normalizeText"),Yqe=mt(e=>e&&Wqe(e),"normalizeStyleValue"),Vqe=mt((e,t,r)=>{t=Wqe(t),Bqe.push({sets:Kqe(e).sort(),id:t,label:r?Wqe(r):void 0})},"addTextData"),Hqe=mt((e,t)=>{var r,i,e=Kqe(e).sort(),n={};for([r,i]of t)n[r]=Yqe(i)??i;Fqe.push({targets:e,styles:n})},"addStyleData"),Xqe=mt(()=>Fqe,"getStyleData"),Kqe=mt(e=>e.map(e=>Wqe(e)),"normalizeIdentifierList"),Zqe=mt(e=>{if(0<(e=Kqe(e).filter(e=>!zqe.has(e))).length)throw new Error("unknown set identifier: "+e.join(", "))},"validateUnionIdentifiers"),Qqe=mt(()=>Bqe,"getTextData"),Jqe=mt(()=>qqe,"getCurrentSets"),eUe=mt(()=>Uqe,"getIndentMode"),tUe=mt(e=>{Uqe=e},"setIndentMode"),rUe=Ht.venn,mt(Pqe,"getConfig"),iUe=mt(()=>{xh(),$qe.length=0,Bqe.length=0,Fqe.length=0,zqe.clear(),qqe=void 0,Uqe=!1},"customClear"),nUe={getConfig:Pqe,clear:iUe,setAccTitle:Th,getAccTitle:wh,setDiagramTitle:_h,getDiagramTitle:Sh,getAccDescription:Eh,setAccDescription:kh,addSubsetData:Gqe,getSubsetData:jqe,addTextData:Vqe,addStyleData:Hqe,validateUnionIdentifiers:Zqe,getTextData:Qqe,getStyleData:Xqe,getCurrentSets:Jqe,getIndentMode:eUe,setIndentMode:tUe}}),lUe=s(()=>{aUe=mt(e=>` .venn-title { font-size: 32px; fill: ${e.vennTitleTextColor}; font-family: ${e.fontFamily}; } .venn-circle text { font-size: 48px; font-family: ${e.fontFamily}; } .venn-intersection text { font-size: 48px; fill: ${e.vennSetTextColor}; font-family: ${e.fontFamily}; } .venn-text-node { font-family: ${e.fontFamily}; color: ${e.vennSetTextColor}; } `,"getStyles"),sUe=aUe});function cUe(h,e){let t=uUe(h),r=t.filter(e=>hUe(e,h)),i=0,n=0,a=[];if(1t.angle-e.angle);let c=r[r.length-1];for(let e=0;e2*e.radius&&(a=2*e.radius),(null==l||l.width>a)&&(l={circle:e,width:a,p1:u,p2:c,large:a>e.radius,sweep:!0})}null!=l&&(a.push(l),i+=dUe(l.circle.radius,l.width),c=u)}}else{let t=h[0];for(let e=1;eMath.abs(t.radius-h[e].radius)){r=!0;break}r?i=n=0:(i=t.radius*t.radius*Math.PI,a.push({circle:t,p1:{x:t.x,y:t.y+t.radius},p2:{x:t.x-1e-10,y:t.y+t.radius},width:2*t.radius,large:!0,sweep:!0}))}return n/=2,e&&(e.area=i+n,e.arcArea=i,e.polygonArea=n,e.arcs=a,e.innerPoints=r,e.intersectionPoints=t),i+n}function hUe(t,e){return e.every(e=>pUe(t,e)vUe(t))}function xUe(t,r){let i=0;for(let e=0;ee.fx-t.fx,"sortOrder"),b=r.slice(),x=r.slice(),T=r.slice(),w=r.slice();for(let e=0;e{var t=e.slice();return t.fx=e.fx,t.id=e.id,t})).sort((e,t)=>e.id-t.id),i.history.push({x:f[0].slice(),fx:f[0].fx,simplex:k}));for(let e=p=0;e=f[g-1].fx){let e=!1;if(x.fx>k.fx?(kUe(T,1+u,b,-u,k),T.fx=t(T),T.fxu+c*l*d||p>=i)r=l;else{if(Math.abs(g)<=-h*d)return l;0<=g*(r-t)&&(r=t),t=l,i=p}return 0}l=l||1,c=c||1e-6,h=h||.1,mt(i,"zoom");for(let e=0;e<10;++e){if(kUe(o.x,1,s.x,l,a),p=o.fx=n(o.x,o.fxprime),g=xUe(o.fxprime,a),p>u+c*l*d||e&&p>=t)return i(r,l,t);if(Math.abs(g)<=-h*d)return l;if(0<=g)return i(l,r,p);t=p,r=l,l*=2}return l}function SUe(t,e,r){let i={x:e.slice(),fx:0,fxprime:e.slice()},n={x:e.slice(),fx:0,fxprime:e.slice()},a=e.slice(),s,o,l=1,c;c=(r=r||{}).maxIterations||20*e.length,i.fx=t(i.x,i.fxprime),wUe(s=i.fxprime.slice(),i.fxprime,-1);for(let e=0;e{var r={};for(let e=0;egUe(t,r,e)-i,0,t+r)}function RUe(e,t={}){var t=t.distinct,r=e.map(e=>Object.assign({},e));function i(e){return e.join(";")}if(mt(i,"toKey"),t){var n,a,s=new Map;for(n of r)for(let t=0;te===t?0:e2===e.sets.length).forEach(e=>{var t=s[e.sets[0]],r=s[e.sets[1]],i=AUe(Math.sqrt(a[t].size/Math.PI),Math.sqrt(a[r].size/Math.PI),e.size);o[t][r]=o[r][t]=i;let n=0;e.size+1e-10>=Math.min(a[t].size,a[r].size)?n=1:e.size<=1e-10&&(n=-1),l[t][r]=l[r][t]=n}),{distances:o,constraints:l}}function NUe(r,i,n,a){for(let e=0;ee.map(e=>e/l)),mt((e,t)=>NUe(e,t,s,o),"obj")),h=null;for(let e=0;e2===e.sets.length)){let e=null!=o.weight?o.weight:1,t=o.sets[0],r=o.sets[1];o.size+rGe>=Math.min(a[t].size,a[r].size)&&(e=0),s[t].push({set:r,size:o.size,weight:e}),s[r].push({set:t,size:o.size,weight:e})}let l=[];function c(e,t){return t.size-e.size}Object.keys(s).forEach(t=>{let r=0;for(let e=0;et[e])),a=null!=i.weight?i.weight:1,r+=a*(n-i.size)*(n-i.size))}return r}function PUe(t,e){let r=0;for(var i of e){var n,a,s;1!==i.sets.length&&(n=2===i.sets.length?(a=t[i.sets[0]],s=t[i.sets[1]],gUe(a.radius,s.radius,pUe(a,s))):cUe(i.sets.map(e=>t[e])),a=null!=i.weight?i.weight:1,s=Math.log((n+1)/(i.size+1)),r+=a*s*s)}return r}function $Ue(t,r,e){if(null==e?t.sort((e,t)=>t.radius-e.radius):t.sort(e),02*Math.PI;)e-=2*Math.PI;if(e>Math.PI){var u,d=t[1].y/(1e-10+t[1].x);for(u of t){var p=(u.x+d*u.y)/(1+d*d);u.x=2*p-u.x,u.y=2*p*d-u.y}}}}function BUe(r){function i(e){return e.parent!==e&&(e.parent=i(e.parent)),e.parent}function n(e,t){e=i(e),t=i(t),e.parent=t}r.forEach(e=>{e.parent=e}),mt(i,"find"),mt(n,"union");for(let t=0;t{delete e.parent}),Array.from(t.values())}function FUe(e){var t=mt(r=>({max:e.reduce((e,t)=>Math.max(e,t[r]+t.radius),Number.NEGATIVE_INFINITY),min:e.reduce((e,t)=>Math.min(e,t[r]-t.radius),Number.POSITIVE_INFINITY)}),"minMax");return{xRange:t("x"),yRange:t("y")}}function zUe(e,t,r){null==t&&(t=Math.PI/2);let o=GUe(e).map(e=>Object.assign({},e)),i=BUe(o);for(var n of i){$Ue(n,t,r);var a=FUe(n);n.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),n.bounds=a}i.sort((e,t)=>t.size-e.size);let l=(o=i[0]).bounds,c=(l.xRange.max-l.xRange.min)/50;function s(i,n,a){if(i){let e=i.bounds,t,r;var s;n?t=l.xRange.max-e.xRange.min+c:(t=l.xRange.max-e.xRange.max,(n=(e.xRange.max-e.xRange.min)/2-(l.xRange.max-l.xRange.min)/2)<0&&(t+=n)),a?r=l.yRange.max-e.yRange.min+c:(r=l.yRange.max-e.yRange.max,(n=(e.yRange.max-e.yRange.min)/2-(l.yRange.max-l.yRange.min)/2)<0&&(r+=n));for(s of i)s.x+=t,s.y+=r,o.push(s)}}mt(s,"addCluster");let h=1;for(;h({radius:h*e.radius,x:i+u+(e.x-s.min)*h,y:i+d+(e.y-o.min)*h,setid:e.setid})))}function UUe(e){var t,r={};for(t of e)r[t.setid]=t;return r}function GUe(t){return Object.keys(t).map(e=>Object.assign(t[e],{setid:e}))}function jUe(y={}){let v=!1,b=600,x=350,T=15,w=1e3,k=Math.PI/2,E=!0,_=null,S=!0,C=!0,A=null,R=null,L=!1,N=null,I=!(!y||!y.symmetricalTextCentre)&&y.symmetricalTextCentre,t={},r=y&&y.colourScheme?y.colourScheme:y&&y.colorScheme?y.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],i=0,D=mt(function(e){return e in t?t[e]:(e=t[e]=r[i],(i+=1)>=r.length&&(i=0),e)},"colours"),M=CUe,O=OUe;function n(e){let t=e.datum(),r=new Set,i=(t.forEach(e=>{0==e.size&&1==e.sets.length&&r.add(e.sets[0])}),t=t.filter(e=>!e.sets.some(e=>r.has(e))),{}),n={};if(0{e.label&&(a[e.sets]=e.label)}),mt(s,"label"),e.selectAll("svg").data([i]).enter().append("svg");var o=e.select("svg");v?o.attr("viewBox",`0 0 ${b} `+x):o.attr("width",b).attr("height",x);let l={},c=!1;function h(e){return r=>eGe(e.sets.map(e=>{var t=l[e],e=i[e],t=t||{x:b/2,y:x/2,radius:1},e=e||{x:b/2,y:x/2,radius:1};return{x:t.x*(1-r)+e.x*r,y:t.y*(1-r)+e.y*r,radius:t.radius*(1-r)+e.radius*r}}),N)}o.selectAll(".venn-area path").each(function(e){var t=this.getAttribute("d");1==e.sets.length&&t&&!L&&(c=!0,l[e.sets[0]]=ZUe(t))}),mt(h,"pathTween");var u=(o=o.selectAll(".venn-area").data(t,e=>e.sets)).enter().append("g").attr("class",e=>"venn-area venn-"+(1==e.sets.length?"circle":"intersection")+(e.colour||e.color?" venn-coloured":"")).attr("data-venn-sets",e=>e.sets.join("_")),d=u.append("path"),p=u.append("text").attr("class","label").text(e=>s(e)).attr("text-anchor","middle").attr("dy",".35em").attr("x",b/2).attr("y",x/2);function g(e){return"function"==typeof e.transition?e.transition("venn").duration(w):e}C&&(d.style("fill-opacity","0").filter(e=>1==e.sets.length).style("fill",e=>e.colour||e.color||D(e.sets)).style("fill-opacity",".25"),p.style("fill",e=>e.colour||e.color?"#FFF":y.textFill||(1==e.sets.length?D(e.sets):"#444"))),mt(g,"asTransition");let f=e;c&&"function"==typeof f.transition?(f=g(e)).selectAll("path").attrTween("d",h):f.selectAll("path").attr("d",e=>eGe(e.sets.map(e=>i[e])),N);var d=f.selectAll("text").filter(e=>e.sets in n).text(e=>s(e)).attr("x",e=>Math.floor(n[e.sets].x)).attr("y",e=>Math.floor(n[e.sets].y)),e=(S&&(c?"on"in d?d.on("end",WUe(i,s)):d.each("end",WUe(i,s)):d.each(WUe(i,s))),g(o.exit()).remove()),m=("function"==typeof o.transition&&e.selectAll("path").attrTween("d",h),e.selectAll("text").attr("x",b/2).attr("y",x/2));return null!==A&&(p.style("font-size","0px"),d.style("font-size",A),m.style("font-size","0px")),{circles:i,textCentres:n,nodes:o,enter:u,update:f,exit:e}}return mt(n,"chart"),n.wrap=function(e){return arguments.length?(S=e,n):S},n.useViewBox=function(){return v=!0,n},n.width=function(e){return arguments.length?(b=e,n):b},n.height=function(e){return arguments.length?(x=e,n):x},n.padding=function(e){return arguments.length?(T=e,n):T},n.distinct=function(e){return arguments.length?(L=e,n):L},n.colours=function(e){return arguments.length?(D=e,n):D},n.colors=function(e){return arguments.length?(D=e,n):D},n.fontSize=function(e){return arguments.length?(A=e,n):A},n.round=function(e){return arguments.length?(N=e,n):N},n.duration=function(e){return arguments.length?(w=e,n):w},n.layoutFunction=function(e){return arguments.length?(M=e,n):M},n.normalize=function(e){return arguments.length?(E=e,n):E},n.scaleToFit=function(e){return arguments.length?(_=e,n):_},n.styled=function(e){return arguments.length?(C=e,n):C},n.orientation=function(e){return arguments.length?(k=e,n):k},n.orientationOrder=function(e){return arguments.length?(R=e,n):R},n.lossFunction=function(e){return arguments.length?(O="default"===e?OUe:"logRatio"===e?PUe:e,n):O},n}function WUe(m,y){return function(e){let r=this,t=m[e.sets[0]].radius||50,i=y(e)||"",n=i.split(/\s+/).reverse(),a=(i.length+n.length)/3,s=n.pop(),o=[s],l=0,c=(r.textContent=null,[]);function h(e){var t=r.ownerDocument.createElementNS(r.namespaceURI,"tspan");return t.textContent=e,c.push(t),r.append(t),t}mt(h,"append");let u=h(s);for(;s=n.pop();){o.push(s);var d=o.join(" ");(u.textContent=d).length>a&&u.getComputedTextLength()>t&&(o.pop(),u.textContent=o.join(" "),o=[s],u=h(s),l++)}let p=.35-1.1*l/2,g=r.getAttribute("x"),f=r.getAttribute("y");c.forEach((e,t)=>{e.setAttribute("x",g),e.setAttribute("y",f),e.setAttribute("dy",p+1.1*t+"em")})}}function YUe(t,r,i){let n=r[0].radius-pUe(r[0],t);for(let e=1;e=l&&(o=s[e],l=c)}let h=EUe(e=>-1*YUe({x:e[0],y:e[1]},t,r),[o.x,o.y],{maxIterations:500,minErrorDelta:1e-10}).x,u={x:e?0:h[0],y:h[1]},d=!0;for(n of t)if(pUe(u,n)>n.radius){d=!1;break}for(a of r)if(pUe(u,a)e.p1)))}function HUe(r){var e,i={},n=Object.keys(r);for(e of n)i[e]=[];for(let t=0;tMath.round(e*r)/r:e=>e;if(1==e.length)return t=e[0].circle,KUe(i(t.x),i(t.y),i(t.radius));var n,a=[` M`,i(e[0].p2.x),i(e[0].p2.y)];for(n of e){var s=i(n.circle.radius);a.push(` A`,s,s,0,n.large?1:0,n.sweep?1:0,i(n.p1.x),i(n.p1.y))}return a.join(" ")}function eGe(e,t){return JUe(QUe(e),t)}function tGe(e,t={}){let{lossFunction:r,layoutFunction:i=CUe,normalize:n=!0,orientation:a=Math.PI/2,orientationOrder:s,width:o=600,height:l=350,padding:c=15,scaleToFit:h=!1,symmetricalTextCentre:u=!1,distinct:d,round:p=2}=t,g=i(e,{lossFunction:"default"!==r&&r?"logRatio"===r?PUe:r:OUe,distinct:d}),f=qUe(n?zUe(g,a,s):g,o,l,c,h),m=XUe(f,e,u),y=new Map(Object.keys(f).map(e=>[e,{set:e,x:f[e].x,y:f[e].y,radius:f[e].radius}])),v=e.map(e=>{var t=e.sets.map(e=>y.get(e)),r=QUe(t);return{circles:t,arcs:r,path:JUe(r,p),area:e,has:new Set(e.sets)}});function b(e){let r="";for(let t of v)t.has.size>e.length&&e.every(e=>t.has.has(e))&&(r+=" "+t.path);return r}return mt(b,"genDistinctPath"),v.map(({circles:e,arcs:t,path:r,area:i})=>({data:i,text:m[i.sets],circles:e,arcs:t,path:r,distinctPath:r+b(i.sets)}))}var rGe,iGe=s(()=>{mt(cUe,"intersectionArea"),mt(hUe,"containedInCircles"),mt(uUe,"getIntersectionPoints"),mt(dUe,"circleArea"),mt(pUe,"distance"),mt(gUe,"circleOverlap"),mt(fUe,"circleCircleIntersection"),mt(mUe,"getCenter"),mt(yUe,"bisect"),mt(vUe,"zeros"),mt(bUe,"zerosM"),mt(xUe,"dot"),mt(TUe,"norm2"),mt(wUe,"scale"),mt(kUe,"weightedSum"),mt(EUe,"nelderMead"),mt(_Ue,"wolfeLineSearch"),mt(SUe,"conjugateGradient"),mt(CUe,"venn"),rGe=1e-10,mt(AUe,"distanceFromIntersectArea"),mt(RUe,"addMissingAreas"),mt(LUe,"getDistanceMatrices"),mt(NUe,"constrainedMDSGradient"),mt(IUe,"bestInitialLayout"),mt(DUe,"constrainedMDSLayout"),mt(MUe,"greedyLayout"),mt(OUe,"lossFunction"),mt(PUe,"logRatioLossFunction"),mt($Ue,"orientateCircles"),mt(BUe,"disjointCluster"),mt(FUe,"getBoundingBox"),mt(zUe,"normalizeSolution"),mt(qUe,"scaleSolution"),mt(UUe,"toObjectNotation"),mt(GUe,"fromObjectNotation"),mt(jUe,"VennDiagram"),mt(WUe,"wrapText"),mt(YUe,"circleMargin"),mt(VUe,"computeTextCentre"),mt(HUe,"getOverlappingCircles"),mt(XUe,"computeTextCentres"),mt(KUe,"circlePath"),mt(ZUe,"circleFromPath"),mt(QUe,"intersectionAreaArcs"),mt(JUe,"arcsToPath"),mt(eGe,"intersectionAreaPath"),mt(tGe,"layout")});function nGe(e){var t,r=new Map;for(t of e){var i=t.targets.join("|"),n=r.get(i);n?Object.assign(n,t.styles):r.set(i,{...t.styles})}return r}function aGe(e){return e.join("|")}function sGe(e,t,r,i,a,s){var n,o,l,c=e?.useDebugLayout??!1,h=r.select("svg").append("g").attr("class","venn-text-nodes"),u=new Map;for(n of i){var d=aGe(n.sets),p=u.get(d);p?p.push(n):u.set(d,[n])}for([o,l]of u.entries())if((b=t.get(o))?.text){let t=b.text.x,r=b.text.y,e=Math.min(...b.circles.map(e=>e.radius)),i=Math.min(...b.circles.map(e=>e.radius-Math.hypot(t-e.x,r-e.y))),n=Number.isFinite(i)?Math.max(0,i):0;0===n&&Number.isFinite(e)&&(n=.6*e);var g,f,m=h.append("g").attr("class","venn-text-area").attr("font-size",40*a+"px"),y=(c&&m.append("circle").attr("class","venn-text-debug-circle").attr("cx",t).attr("cy",r).attr("r",n).attr("fill","none").attr("stroke","purple").attr("stroke-width",1.5*a).attr("stroke-dasharray",6*a+" "+4*a),Math.max(80*a,2*n*.95)),v=Math.max(60*a,2*n*.95),b=(b.data.label&&0{hw(),Kr(),li(),pCe(),iGe(),ph(),ZN(),mt(nGe,"buildStyleByKey"),oGe=mt((e,t,r,i)=>{let n=i.db,a=n.getConfig?.(),{themeVariables:l,look:s,handDrawnSeed:c}=cr(),h="handDrawn"===s,u=[l.venn1,l.venn2,l.venn3,l.venn4,l.venn5,l.venn6,l.venn7,l.venn8].filter(Boolean),o=n.getDiagramTitle?.(),d=n.getSubsetData(),p=n.getTextData(),g=nGe(n.getStyleData()),f=a?.width??800,m=a?.height??450,y=f/1600,v=o?48*y:0,b=l.primaryTextColor??l.textColor,x=oCe(t);x.attr("viewBox",`0 0 ${f} `+m),o&&x.append("text").text(o).attr("class","venn-title").attr("font-size",32*y+"px").attr("text-anchor","middle").attr("dominant-baseline","middle").attr("x","50%").attr("y",32*y).style("fill",l.vennTitleTextColor||l.titleColor);var T,i=V(document.createElement("div")),t=jUe().width(f).height(m-v);i.datum(d).call(t);let w=h?KN.svg(i.select("svg").node()):void 0,k=tGe(d,{width:f,height:m-v,padding:a?.padding??15}),E=new Map;for(T of k){var _=aGe([...T.data.sets].sort());E.set(_,T)}0(e=aGe([...e.sets].sort()),g.get(e)?.color??l.vennSetTextColor??b)),i.selectAll(".venn-intersection path").style("fill-opacity",e=>(e=aGe([...e.sets].sort()),g.get(e)?.fill?1:0)).style("fill",e=>(e=aGe([...e.sets].sort()),g.get(e)?.fill??"transparent")));var C=x.append("g").attr("transform",`translate(0, ${v})`);if((t=i.select("svg").node())&&"childNodes"in t)for(var A of[...t.childNodes])C.node()?.appendChild(A);rh(x,m,f,a?.useMaxWidth??!0)},"draw"),mt(aGe,"stableSetsKey"),mt(sGe,"renderTextNodes"),lGe={draw:oGe}}),hGe={};PGe(hGe,{diagram:()=>uGe});var uGe,dGe,pGe=s(()=>{Oqe(),oUe(),lUe(),cGe(),uGe={parser:Dqe,db:nUe,renderer:lGe,styles:sUe}}),gGe=s(()=>{si(),li(),hC(),jL(),Cu(),dGe=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=Th,this.getAccTitle=wh,this.setDiagramTitle=_h,this.getDiagramTitle=Sh,this.getAccDescription=Eh,this.setAccDescription=kh}static{mt(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){var e=Ht,t=cr();return I7({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),0===t&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:"",children:this.outerNodes}}addClass(e,t){let r=this.classes.get(e)??{id:e,styles:[],textStyles:[]},i=t.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");i&&i.forEach(e=>{BL(e)&&(r?.textStyles?r.textStyles.push(e):r.textStyles=[e]),r?.styles?r.styles.push(e):r.styles=[e]}),this.classes.set(e,r)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){xh(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}}});function fGe(e){if(!e.length)return[];let i=[],n=[];return e.forEach(e=>{var t,r={name:e.name,children:"Leaf"===e.type?void 0:[]};for(r.classSelector=e?.classSelector,e?.cssCompiledStyles&&(r.cssCompiledStyles=e.cssCompiledStyles),"Leaf"===e.type&&void 0!==e.value&&(r.value=e.value);0=e.level;)n.pop();0===n.length?i.push(r):(t=n[n.length-1].node).children?t.children.push(r):t.children=[r],"Leaf"!==e.type&&n.push({node:r,level:e.level})}),i}var mGe,yGe,vGe,bGe,xGe,TGe,wGe,kGe,EGe,_Ge=s(()=>{mt(fGe,"buildHierarchy")}),SGe=s(()=>{VEe(),e(),ZEe(),_Ge(),gGe(),mGe=mt((e,i)=>{HEe(e,i);var t,r,n=[];for(t of e.TreemapRows??[])"ClassDefStatement"===t.$type&&i.addClass(t.className??"",t.styleText??"");for(r of e.TreemapRows??[]){var a,s,o,l=r.item;l&&(o=r.indent?parseInt(r.indent):0,a=yGe(l),s=0<(s=l.classSelector?i.getStylesForClass(l.classSelector):[]).length?s:void 0,o={level:o,name:a,type:l.$type,value:l.value,classSelector:l.classSelector,cssCompiledStyles:s},n.push(o))}let c=fGe(n),h=mt((e,t)=>{for(var r of e)i.addNode(r,t),r.children&&0e.name?String(e.name):"","getItemName"),vGe={parser:{yy:void 0},parse:mt(async e=>{try{var t=await GEe("treemap",e),r=(M.debug("Treemap AST:",t),vGe.parser?.yy);if(!(r instanceof dGe))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");mGe(t,r)}catch(e){throw M.error("Error parsing treemap:",e),e}},"parse")}}),CGe=s(()=>{pCe(),hue(),ph(),hw(),jL(),li(),e(),bGe=mt((e,a,t,s)=>{let r=s.db,o=r.getConfig(),l=o.padding??10,c=r.getDiagramTitle(),h=r.getRoot(),u=cr().themeVariables;if(h){var s=c?30:0,d=oCe(a),p=o.nodeWidth?10*o.nodeWidth:960,g=o.nodeHeight?10*o.nodeHeight:500,f=p,m=g+s;d.attr("viewBox",`0 0 ${f} `+m),rh(d,m,f,o.useMaxWidth);let r;try{var y=o.valueFormat||",";if("$0,0"===y)r=mt(e=>"$"+ov(",")(e),"valueFormat");else if(y.startsWith("$")&&y.includes(",")){let e=/\.\d+/.exec(y),t=e?e[0]:"";r=mt(e=>"$"+ov(","+t)(e),"valueFormat")}else if(y.startsWith("$")){let t=y.substring(1);r=mt(e=>"$"+ov(t||"")(e),"valueFormat")}else r=ov(y)}catch(e){M.error("Error creating format function:",e),r=ov(",")}let t=wb().range(["transparent",u.cScale0,u.cScale1,u.cScale2,u.cScale3,u.cScale4,u.cScale5,u.cScale6,u.cScale7,u.cScale8,u.cScale9,u.cScale10,u.cScale11]),i=wb().range(["transparent",u.cScalePeer0,u.cScalePeer1,u.cScalePeer2,u.cScalePeer3,u.cScalePeer4,u.cScalePeer5,u.cScalePeer6,u.cScalePeer7,u.cScalePeer8,u.cScalePeer9,u.cScalePeer10,u.cScalePeer11]),n=wb().range([u.cScaleLabel0,u.cScaleLabel1,u.cScaleLabel2,u.cScaleLabel3,u.cScaleLabel4,u.cScaleLabel5,u.cScaleLabel6,u.cScaleLabel7,u.cScaleLabel8,u.cScaleLabel9,u.cScaleLabel10,u.cScaleLabel11]);c&&d.append("text").attr("x",f/2).attr("y",s/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(c),m=d.append("g").attr("transform",`translate(0, ${s})`).attr("class","treemapContainer"),y=Yv(h).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),s=(f=fb().size([p,g]).paddingTop(e=>e.children&&0e.children&&0e.children&&0e.children&&0e.children&&0`translate(${e.x0},${e.y0})`)).append("rect").attr("width",e=>e.x1-e.x0).attr("height",25).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>0===e.depth?"display: none;":""),p.append("clipPath").attr("id",(e,t)=>`clip-section-${a}-`+t).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",25),p.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,t)=>"treemapSection section"+t).attr("fill",e=>t(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>i(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>0===e.depth?"display: none;":(e=Q({cssCompiledStyles:e.data.cssCompiledStyles})).nodeStyles+";"+e.borderStyles.join(";")),p.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",12.5).attr("dominant-baseline","middle").text(e=>0===e.depth?"":e.data.name).attr("font-weight","bold").attr("style",e=>0===e.depth?"display: none;":"dominant-baseline: middle; font-size: 12px; fill:"+n(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+Q({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).each(function(e){if(0!==e.depth){var t=V(this),r=e.data.name,i=(t.text(r),e.x1-e.x0),e=!1!==o.showValues&&e.value?i-10-30-10-6:i-6-6,n=Math.max(15,e),a=t.node();if(a.getComputedTextLength()>n){let e=r;for(;0n&&t.text("");break}if(t.text(e+"..."),a.getComputedTextLength()<=n)break}}}}),!1!==o.showValues&&p.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",12.5).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?r(e.value):"").attr("font-style","italic").attr("style",e=>0===e.depth?"display: none;":"text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+n(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+Q({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")),g=f.leaves(),(y=m.selectAll(".treemapLeafGroup").data(g).enter().append("g").attr("class",(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?" "+e.data.classSelector:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`)).append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?t(e.parent.data.name):t(e.data.name)).attr("style",e=>Q({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?t(e.parent.data.name):t(e.data.name)).attr("stroke-width",3),y.append("clipPath").attr("id",(e,t)=>`clip-${a}-`+t).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),y.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>"text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+n(e.data.name)+";"+Q({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(e,t)=>`url(#clip-${a}-${t})`).text(e=>e.data.name).each(function(e){var i=V(this),t=e.x1-e.x0,e=e.y1-e.y0,n=i.node(),a=t-8,s=e-8;if(a<10||s<10)i.style("display","none");else{let e=parseInt(i.style("font-size"),10);for(;n.getComputedTextLength()>a&&8s&&8a||e<8||s(e.x1-e.x0)/2).attr("y",function(e){return(e.y1-e.y0)/2}).attr("style",e=>"text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+n(e.data.name)+";"+Q({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(e,t)=>`url(#clip-${a}-${t})`).text(e=>e.value?r(e.value):"").each(function(e){var t,r,i=V(this),n=this.parentNode;!n||(n=V(n).select(".treemapLabel")).empty()||"none"===n.style("display")||(n=parseFloat(n.style("font-size")),t=Math.max(6,Math.min(28,Math.round(.6*n))),i.style("font-size",t+"px"),n=(e.y1-e.y0)/2+n/2+2,i.attr("y",n),r=e.x1-e.x0,e=e.y1-e.y0-4,r-=8,i.node().getComputedTextLength()>r)||e{hC(),wGe={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelColor:"black",labelFontSize:"12px",valueFontSize:"10px",valueColor:"black",titleColor:"black",titleFontSize:"14px"},kGe=mt(({treemap:e}={})=>` .treemapNode.section { stroke: ${(e=I7(wGe,e)).sectionStrokeColor}; stroke-width: ${e.sectionStrokeWidth}; fill: ${e.sectionFillColor}; } .treemapNode.leaf { stroke: ${e.leafStrokeColor}; stroke-width: ${e.leafStrokeWidth}; fill: ${e.leafFillColor}; } .treemapLabel { fill: ${e.labelColor}; font-size: ${e.labelFontSize}; } .treemapValue { fill: ${e.valueColor}; font-size: ${e.valueFontSize}; } .treemapTitle { fill: ${e.titleColor}; font-size: ${e.titleFontSize}; } `,"getStyles"),EGe=kGe}),RGe={};PGe(RGe,{diagram:()=>LGe});var LGe,NGe,IGe=s(()=>{gGe(),SGe(),CGe(),AGe(),LGe={parser:vGe,get db(){return new dGe},renderer:TGe,styles:EGe}}),DGe=(PGe(NGe={},{default:()=>HWe}),qc(),lh(),uh(),{id:"c4",detector:mt(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),loader:mt(async()=>({id:"c4",diagram:(await Promise.resolve().then(()=>($C(),OC))).diagram}),"loader")}),MGe={id:"flowchart",detector:mt((e,t)=>"dagre-wrapper"!==t?.flowchart?.defaultRenderer&&"elk"!==t?.flowchart?.defaultRenderer&&/^\s*graph/.test(e),"detector"),loader:mt(async()=>({id:"flowchart",diagram:(await Promise.resolve().then(()=>(Tue(),mue))).diagram}),"loader")},OGe="flowchart-v2",s=mt((e,t)=>"dagre-d3"!==t?.flowchart?.defaultRenderer&&("elk"===t?.flowchart?.defaultRenderer&&(t.layout="elk"),!(!/^\s*graph/.test(e)||"dagre-wrapper"!==t?.flowchart?.defaultRenderer)||/^\s*flowchart/.test(e)),"detector"),PGe=mt(async()=>{var e=(await Promise.resolve().then(()=>(Tue(),mue))).diagram;return{id:OGe,diagram:e}},"loader"),$Ge={id:OGe,detector:s,loader:PGe},BGe={id:"er",detector:mt(e=>/^\s*erDiagram/.test(e),"detector"),loader:mt(async()=>({id:"er",diagram:(await Promise.resolve().then(()=>(Due(),Nue))).diagram}),"loader")},FGe={id:"gitGraph",detector:mt(e=>/^\s*gitGraph/.test(e),"detector"),loader:mt(async()=>({id:"gitGraph",diagram:(await Promise.resolve().then(()=>(vSe(),gSe))).diagram}),"loader")},zGe={id:"gantt",detector:mt(e=>/^\s*gantt/.test(e),"detector"),loader:mt(async()=>({id:"gantt",diagram:(await Promise.resolve().then(()=>(hCe(),tCe))).diagram}),"loader")},qGe={id:"info",detector:mt(e=>/^\s*info/.test(e),"detector"),loader:mt(async()=>({id:"info",diagram:(await Promise.resolve().then(()=>(OCe(),fCe))).diagram}),"loader")},UGe={id:"pie",detector:mt(e=>/^\s*pie/.test(e),"detector"),loader:mt(async()=>({id:"pie",diagram:(await Promise.resolve().then(()=>(YCe(),zCe))).diagram}),"loader")},GGe="quadrantChart",s=mt(e=>/^\s*quadrantChart/.test(e),"detector"),PGe=mt(async()=>{var e=(await Promise.resolve().then(()=>(C8e(),k8e))).diagram;return{id:GGe,diagram:e}},"loader"),jGe={id:GGe,detector:s,loader:PGe},WGe={id:"xychart",detector:mt(e=>/^\s*xychart(-beta)?/.test(e),"detector"),loader:mt(async()=>({id:"xychart",diagram:(await Promise.resolve().then(()=>(jAe(),$Ae))).diagram}),"loader")},YGe="requirement",s=mt(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),PGe=mt(async()=>{var e=(await Promise.resolve().then(()=>(Q9e(),ZAe))).diagram;return{id:YGe,diagram:e}},"loader"),VGe={id:YGe,detector:s,loader:PGe},HGe={id:"sequence",detector:mt(e=>/^\s*sequenceDiagram/.test(e),"detector"),loader:mt(async()=>({id:"sequence",diagram:(await Promise.resolve().then(()=>(VRe(),NRe))).diagram}),"loader")},XGe={id:"class",detector:mt((e,t)=>"dagre-wrapper"!==t?.class?.defaultRenderer&&/^\s*classDiagram/.test(e),"detector"),loader:mt(async()=>({id:"class",diagram:(await Promise.resolve().then(()=>(tLe(),JRe))).diagram}),"loader")},KGe="classDiagram",s=mt((e,t)=>!(!/^\s*classDiagram/.test(e)||"dagre-wrapper"!==t?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(e),"detector"),PGe=mt(async()=>{var e=(await Promise.resolve().then(()=>(FLe(),rLe))).diagram;return{id:KGe,diagram:e}},"loader"),ZGe={id:KGe,detector:s,loader:PGe},QGe={id:"state",detector:mt((e,t)=>"dagre-wrapper"!==t?.state?.defaultRenderer&&/^\s*stateDiagram/.test(e),"detector"),loader:mt(async()=>({id:"state",diagram:(await Promise.resolve().then(()=>($Ne(),ONe))).diagram}),"loader")},JGe="stateDiagram",s=mt((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&"dagre-wrapper"===t?.state?.defaultRenderer),"detector"),PGe=mt(async()=>{var e=(await Promise.resolve().then(()=>(mIe(),BNe))).diagram;return{id:JGe,diagram:e}},"loader"),eje={id:JGe,detector:s,loader:PGe},tje={id:"journey",detector:mt(e=>/^\s*journey/.test(e),"detector"),loader:mt(async()=>({id:"journey",diagram:(await Promise.resolve().then(()=>(BIe(),MIe))).diagram}),"loader")},rje=(e(),pCe(),ph(),s={draw:mt((e,t,r)=>{M.debug(`rendering svg for syntax error `);var i=(t=oCe(t)).append("g");t.attr("viewBox","0 0 2412 512"),rh(t,100,512,!0),i.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"),i.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"),i.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"),i.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"),i.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"),i.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"),i.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"),i.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")}),ije={db:{},renderer:s,parser:{parse:mt(()=>{},"parse")}},nje="flowchart-elk",PGe=mt((e,t={})=>!!(/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&"elk"===t?.flowchart?.defaultRenderer)&&(t.layout="elk",!0),"detector"),s=mt(async()=>{var e=(await Promise.resolve().then(()=>(Tue(),mue))).diagram;return{id:nje,diagram:e}},"loader"),aje={id:nje,detector:PGe,loader:s},sje={id:"timeline",detector:mt(e=>/^\s*timeline/.test(e),"detector"),loader:mt(async()=>({id:"timeline",diagram:(await Promise.resolve().then(()=>(ODe(),NDe))).diagram}),"loader")},oje={id:"mindmap",detector:mt(e=>/^\s*mindmap/.test(e),"detector"),loader:mt(async()=>({id:"mindmap",diagram:(await Promise.resolve().then(()=>(OMe(),cMe))).diagram}),"loader")},lje={id:"kanban",detector:mt(e=>/^\s*kanban/.test(e),"detector"),loader:mt(async()=>({id:"kanban",diagram:(await Promise.resolve().then(()=>(rOe(),zMe))).diagram}),"loader")},cje={id:"sankey",detector:mt(e=>/^\s*sankey(-beta)?/.test(e),"detector"),loader:mt(async()=>({id:"sankey",diagram:(await Promise.resolve().then(()=>(APe(),fPe))).diagram}),"loader")},hje={id:"packet",detector:mt(e=>/^\s*packet(-beta)?/.test(e),"detector"),loader:mt(async()=>({id:"packet",diagram:(await Promise.resolve().then(()=>(ZPe(),DPe))).diagram}),"loader")},uje={id:"radar",detector:mt(e=>/^\s*radar-beta/.test(e),"detector"),loader:mt(async()=>({id:"radar",diagram:(await Promise.resolve().then(()=>(v$e(),g$e))).diagram}),"loader")},dje={id:"block",detector:mt(e=>/^\s*block(-beta)?/.test(e),"detector"),loader:mt(async()=>({id:"block",diagram:(await Promise.resolve().then(()=>(Oze(),ize))).diagram}),"loader")},pje="architecture",PGe=mt(e=>/^\s*architecture/.test(e),"detector"),s=mt(async()=>{var e=(await Promise.resolve().then(()=>(_qe(),rqe))).diagram;return{id:pje,diagram:e}},"loader"),gje={id:pje,detector:PGe,loader:s},fje={id:"ishikawa",detector:mt(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),loader:mt(async()=>({id:"ishikawa",diagram:(await Promise.resolve().then(()=>(Mqe(),Lqe))).diagram}),"loader")},mje={id:"venn",detector:mt(e=>/^\s*venn-beta/.test(e),"detector"),loader:mt(async()=>({id:"venn",diagram:(await Promise.resolve().then(()=>(pGe(),hGe))).diagram}),"loader")},yje=(uh(),Au(),{id:"treemap",detector:mt(e=>/^\s*treemap/.test(e),"detector"),loader:mt(async()=>({id:"treemap",diagram:(await Promise.resolve().then(()=>(IGe(),RGe))).diagram}),"loader")}),vje=!1,bje=mt(()=>{vje||(vje=!0,Oh("error",ije,e=>"error"===e.toLowerCase().trim()),Oh("---",{db:{clear:mt(()=>{},"clear")},styles:{},renderer:{draw:mt(()=>{},"draw")},parser:{parse:mt(()=>{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:mt(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Xc(aje,oje,gje),Xc(DGe,lje,ZGe,XGe,BGe,zGe,qGe,UGe,VGe,HGe,$Ge,MGe,sje,FGe,eje,QGe,tje,jGe,cje,hje,WGe,dje,uje,fje,yje,mje))},"addDiagrams"),xje=(e(),uh(),Au(),mt(async()=>{M.debug("Loading registered diagrams");var e=(await Promise.allSettled(Object.entries(Vc).map(async([e,{detector:t,loader:r}])=>{if(r)try{Ph(e)}catch{try{var{diagram:i,id:n}=await r();Oh(n,i,t)}catch(t){throw M.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete Vc[e],t}}}))).filter(e=>"rejected"===e.status);if(0{hWe.forEach(e=>{e()}),hWe=[]},"attachFunctions"),dWe=(e(),mt(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments"));function pWe(e){var t,r,i=e.match(Gc);return i?(r={},(t="object"!=typeof(t=W9(i[1],{schema:j9})??{})||Array.isArray(t)?{}:t).displayMode&&(r.displayMode=t.displayMode.toString()),t.title&&(r.title=t.title.toString()),t.config&&(r.config=t.config),{text:e.slice(i[0].length),metadata:r}):{text:e,metadata:{}}}ch(),Y9(),mt(pWe,"extractFrontMatter"),hC();var gWe=mt(e=>e.replace(/\r\n?/g,` `).replace(/<(\w+)([^>]*)>/g,(e,t,r)=>"<"+t+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),fWe=mt(e=>{var{text:e,metadata:t}=pWe(e),{displayMode:t,title:r,config:i={}}=t;return t&&(i.gantt||(i.gantt={}),i.gantt.displayMode=t),{title:r,config:i,text:e}},"processFrontmatter"),mWe=mt(e=>{var t=sC.detectInit(e)??{},r=sC.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:e})=>"wrap"===e):"wrap"===r?.type&&(t.wrap=!0),{text:q7(e),directive:t}},"processDirectives");function yWe(e){var t=gWe(e),t=fWe(t),r=mWe(t.text),i=I7(t.config,r.directive);return{code:e=dWe(r.text),title:t.title,config:i}}function vWe(e){return e=(new TextEncoder).encode(e),e=Array.from(e,e=>String.fromCodePoint(e)).join(""),btoa(e)}mt(yWe,"preprocessDiagram"),gh(),ni(),hC(),mt(vWe,"toBase64");var bWe=["foreignobject"],xWe=["dominant-baseline"];function TWe(e){return e=yWe(e),dr(),ur(e.config??{}),e}async function wWe(e,t){bje();try{var{code:r,config:i}=TWe(e);return{diagramType:(await IWe(r)).type,config:i}}catch(e){if(t?.suppressErrors)return!1;throw e}}mt(TWe,"processAndSetConfigs"),mt(wWe,"parse");var kWe=mt((e,t,r=[])=>` .${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),EWe=mt((t,r=new Map)=>{let i="";if(void 0!==t.themeCSS&&(i+=` `+t.themeCSS),void 0!==t.fontFamily&&(i+=` :root { --mermaid-font-family: ${t.fontFamily}}`),void 0!==t.altFontFamily&&(i+=` :root { --mermaid-alt-font-family: ${t.altFontFamily}}`),r instanceof Map){let e=vr(t)?["> *","span"]:["rect","polygon","ellipse","circle","path"];r.forEach(t=>{$j(t.styles)||e.forEach(e=>{i+=kWe(t.id,e,t.styles)}),$j(t.textStyles)||(i+=kWe(t.id,"tspan",(t?.textStyles||[]).map(e=>e.replace("color","fill"))))})}return i},"createCssStyles"),_We=mt((e,t,r,i)=>(r=EWe(e,r),aWe(eWe(i+`{${oh(t,r,e.themeVariables)}}`),sWe)),"createUserStyles"),SWe=mt((e="",t,r)=>{let i=e;return r||t||(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=(i=lC(i)).replace(/
/g,"
")},"cleanUpSvgCode"),CWe=mt((e="",t)=>``,"putIntoIFrame"),AWe=mt((e,t,r,i,n)=>{var a=e.append("div"),r=(a.attr("id",r),i&&a.attr("style",i),a.append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg"));return n&&r.attr("xmlns:xlink",n),r.append("g"),e},"appendDivSvgG");function RWe(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}mt(RWe,"sandboxedIframe");var LWe=mt((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),PGe=mt(async function(e,t,r){bje();var i=TWe(t),n=(t=i.code,cr());M.debug(n),t.length>(n?.maxTextSize??5e4)&&(t="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");let a="#"+e,s="i"+e,o="#"+s,l="d"+e,c="#"+l,h=mt(()=>{var e=V(d?o:c).node();e&&"remove"in e&&e.remove()},"removeTempElements"),u=V("body"),d="sandbox"===n.securityLevel,p="loose"===n.securityLevel,g=n.fontFamily;void 0!==r?(r&&(r.innerHTML=""),d?(y=RWe(V(r),s),(u=V(y.nodes()[0].contentDocument.body)).node().style.margin=0):u=V(r),AWe(u,e,l,"font-family: "+g,"http://www.w3.org/1999/xlink")):(LWe(document,e,l,s),d?(y=RWe(V("body"),s),(u=V(y.nodes()[0].contentDocument.body)).node().style.margin=0):u=V("body"),AWe(u,e,l));let f,m;try{f=await cWe.fromText(t,{title:i.title})}catch(r){if(n.suppressErrorRendering)throw h(),r;f=await cWe.fromText("error"),m=r}var r=u.select(c).node(),y=f.type,r=(i=r.firstChild).firstChild,v=f.renderer.getClasses?.(t,f),v=_We(n,y,v,a),b=document.createElement("style");b.innerHTML=v,i.insertBefore(b,r);try{await f.renderer.draw(t,e,"11.13.0",f)}catch(r){throw n.suppressErrorRendering?h():rje.draw(t,e,"11.13.0"),r}DWe(y,u.select(c+" svg"),f.db.getAccTitle?.(),f.db.getAccDescription?.()),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let x=u.select(c).node().innerHTML;if(M.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),x=SWe(x,d,Qt(n.arrowMarkerAbsolute)),d?(v=u.select(c+" svg").node(),x=CWe(x,v)):p||(x=dn.sanitize(x,{ADD_TAGS:bWe,ADD_ATTR:xWe,HTML_INTEGRATION_POINTS:{foreignobject:!0}})),uWe(),m)throw m;return h(),{diagramType:y,svg:x,bindFunctions:f.db.bindFunctions}},"render");function NWe(e={}){(e=Re({},e))?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),ar(e),e?.theme&&e.theme in Gt?e.themeVariables=Gt[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=Gt.default.getThemeVariables(e.themeVariables)),e="object"==typeof e?nr(e):or(),Ie(e.logLevel),bje()}mt(NWe,"initialize");var IWe=mt((e,t={})=>(e=yWe(e).code,cWe.fromText(e,t)),"getDiagramFromText");function DWe(e,t,r,i){oWe(t,e),lWe(t,r,i,t.attr("id"))}mt(DWe,"addA11yInfo");var MWe=Object.freeze({render:PGe,parse:wWe,getDiagramFromText:IWe,initialize:NWe,getConfig:cr,setConfig:lr,getSiteConfig:or,updateSiteConfig:sr,reset:mt(()=>{dr()},"reset"),globalReset:mt(()=>{dr(Zt)},"globalReset"),defaultConfig:Zt}),OWe=(Ie(cr().logLevel),dr(cr()),cue(),hC(),mt((e,t,r)=>{M.warn(e),N7(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError")),PWe=mt(async function(t={querySelector:".mermaid"}){try{await $We(t)}catch(e){if(N7(e)&&M.error(e.str),VWe.parseError&&VWe.parseError(e),!t.suppressErrors)throw M.error("Use the suppressErrors option to suppress these errors"),e}},"run"),$We=mt(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){var i=MWe.getConfig();M.debug(`${e?"":"No "}Callback function found`);let n;if(r)n=r;else{if(!t)throw new Error("Nodes and querySelector are both undefined");n=document.querySelectorAll(t)}M.debug(`Found ${n.length} diagrams`),void 0!==i?.startOnLoad&&(M.debug("Start On Load: "+i?.startOnLoad),MWe.updateSiteConfig({startOnLoad:i?.startOnLoad}));var a,s=new sC.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed),o=[];for(a of Array.from(n))if(M.info("Rendering diagram: "+a.id),!a.getAttribute("data-processed")){a.setAttribute("data-processed","true");var l="mermaid-"+s.next(),c=a.innerHTML,h=(c=Uc(sC.entityDecode(c)).trim().replace(//gi,"
"),sC.detectInit(c));h&&M.debug("Detected early reinit: ",h);try{var{svg:u,bindFunctions:d}=await WWe(l,c,a);a.innerHTML=u,e&&await e(l),d&&d(a)}catch(e){OWe(e,o,VWe.parseError)}}if(0{bje(),Xc(...e),!1===t&&await xje()},"registerExternalDiagrams"),FWe=mt(function(){VWe.startOnLoad&&MWe.getConfig().startOnLoad&&VWe.run().catch(e=>M.error("Mermaid failed to initialize",e))},"contentLoaded"),zWe=(typeof document<"u"&&window.addEventListener("load",FWe,!1),mt(function(e){VWe.parseError=e},"setParseErrorHandler")),qWe=[],UWe=!1,GWe=mt(async()=>{if(!UWe){for(UWe=!0;0new Promise((i,n)=>{var e=mt(()=>new Promise((t,r)=>{MWe.parse(a,s).then(e=>{t(e),i(e)},e=>{M.error("Error parsing",e),VWe.parseError?.(e),r(e),n(e)})}),"performCall");qWe.push(e),GWe().catch(n)}),"parse"),WWe=mt((a,s,o)=>new Promise((i,n)=>{var e=mt(()=>new Promise((t,r)=>{MWe.render(a,s,o).then(e=>{t(e),i(e)},e=>{M.error("Error parsing",e),VWe.parseError?.(e),r(e),n(e)})}),"performCall");qWe.push(e),GWe().catch(n)}),"render"),YWe=mt(()=>Object.keys(Vc).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),VWe={startOnLoad:!0,mermaidAPI:MWe,parse:jWe,render:WWe,init:s,run:PWe,registerExternalDiagrams:PGe,registerLayoutLoaders:Whe,initialize:BWe,parseError:void 0,contentLoaded:FWe,setParseErrorHandler:zWe,detectType:Hc,registerIconPacks:Pc,getRegisteredDiagramsMetadata:YWe},HWe=VWe;return j(NGe)})(),globalThis.mermaid=globalThis.__esbuild_esm_mermaid_nm.mermaid.default;